From dae1e4d1bcd1446b16bcf4d8c7697684f65261af Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Tue, 19 Nov 2013 12:02:36 +0200 Subject: [PATCH] Some minor changes in yank-pop --- core/prelude-editor.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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)