   (let* ((current-alpha (car (frame-parameter (selected-frame) 'alpha)))
          (increased-alpha (- current-alpha 5)))
     (when (>= increased-alpha frame-alpha-lower-limit)
-      (set-frame-parameter (selected-frame) 'alpha (list increased-alpha increased-alpha)))))
+      (set-frame-parameter (selected-frame) 'alpha
+                           (cons increased-alpha increased-alpha)))))
 
 (defun spacemacs/decrease-transparency ()
   "Decrease transparency of current frame."

  (let* ((current-alpha (car (frame-parameter (selected-frame) 'alpha)))
         (decreased-alpha (+ current-alpha 5)))
    (when (<= decreased-alpha 100)
      (set-frame-parameter (selected-frame) 'alpha (list decreased-alpha decreased-alpha)))))

(spacemacs|define-micro-state scale-transparency
  :doc "[+] increase [-] decrease [T] toggle transparency [q] quit"

(defun spacemacs/toggle-transparency ()
  "Toggle between transparent or opaque display."
  (interactive)
  (let* ((frame (selected-frame))
         (alpha (frame-parameter frame 'alpha)))
    (set-frame-parameter
     frame 'alpha
     (if (or (null alpha) (= (cdr-safe alpha) 100))
         (cons dotspacemacs-active-transparency
               dotspacemacs-inactive-transparency)
       '(100 . 100))))
  ;; Immediately enter the micro-state, but also keep toggle
  ;; accessible from helm-spacemacs
  (spacemacs/scale-transparency-micro-state))
