Some minor changes in yank-pop

This commit is contained in:
Bozhidar Batsov 2013-11-19 12:02:36 +02:00
parent 79ac17db8c
commit dae1e4d1bc

View file

@ -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)