diff --git a/core/prelude-editor.el b/core/prelude-editor.el index a3f0a86..996a013 100644 --- a/core/prelude-editor.el +++ b/core/prelude-editor.el @@ -350,14 +350,14 @@ indent yanked text (with prefix arg don't indent)." (yank-advised-indent-function (region-beginning) (region-end))))) (defadvice yank-pop (after yank-pop-indent activate) - "If current mode is one of 'yank-indent-modes, + "If current mode is one of `yank-indent-modes', indent yanked text (with prefix arg don't indent)." - (if (and (not (ad-get-arg 0)) - (not (member major-mode yank-indent-blacklisted-modes)) - (or (derived-mode-p 'prog-mode) - (member major-mode yank-indent-modes))) + (when (and (not (ad-get-arg 0)) + (not (member major-mode yank-indent-blacklisted-modes)) + (or (derived-mode-p 'prog-mode) + (member major-mode yank-indent-modes))) (let ((transient-mark-mode nil)) - (yank-advised-indent-function (region-beginning) (region-end))))) + (yank-advised-indent-function (region-beginning) (region-end))))) ;; abbrev config (add-hook 'text-mode-hook 'abbrev-mode)