   :config
   (with-eval-after-load 'powerline
     (advice-add 'powerline-major-mode :around
-                (lambda (old-powerline-major-mode &rest args)
-                  (let* ((major-mode-segment (apply old-powerline-major-mode args))
+                (lambda (fn &rest args)
+                  (let* ((major-mode-segment (apply fn args))
                          (props (text-properties-at 0 major-mode-segment))
                          (icon (all-the-icons-icon-for-mode major-mode))
                          (face-prop (and (stringp icon) (get-text-property 0 'face icon))))

                           (remove-unrestorable-file-buffers tail)
                         tail))))))

    (defun frameset--restore-frame-advice (old-func &rest args)
      (let ((window-state (cadr args)))
        (apply old-func
               (car args)
               (remove-unrestorable-file-buffers window-state)
               (cddr args))))

line if no region is defined.

Optional argument ARG same as `comment-dwim''s."
    (interactive "*P")
    (if (and (not (use-region-p)))
        (comment-or-uncomment-region (line-beginning-position) (line-end-position))
      (apply comment-dwim args)))
  (advice-add 'comment-dwim :around 'comment-dwim-advice))

(use-package bind-key)

