From: Stefan Monnier Date: Mon, 18 Nov 2013 01:48:46 +0000 (-0500) Subject: * lisp/textmodes/text-mode.el (paragraph-indent-minor-mode): Use add-function. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~796 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1f35d401baa3e1d5715fecc734e803b538afa257;p=emacs.git * lisp/textmodes/text-mode.el (paragraph-indent-minor-mode): Use add-function. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a749f70b4fc..e2d1747795c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2013-11-18 Stefan Monnier + + * textmodes/text-mode.el (paragraph-indent-minor-mode): Use add-function. + 2013-11-17 Stefan Monnier * emacs-lisp/nadvice.el (remove-function): Align with diff --git a/lisp/textmodes/text-mode.el b/lisp/textmodes/text-mode.el index a045af8522f..6c97ce6372b 100644 --- a/lisp/textmodes/text-mode.el +++ b/lisp/textmodes/text-mode.el @@ -121,9 +121,10 @@ Turning on Paragraph-Indent minor mode runs the normal hook (concat ps-re paragraph-start))))) ;; Change the indentation function. (if paragraph-indent-minor-mode - (set (make-local-variable 'indent-line-function) 'indent-to-left-margin) - (if (eq indent-line-function 'indent-to-left-margin) - (set (make-local-variable 'indent-line-function) 'indent-region)))) + (add-function :override (local 'indent-line-function) + #'indent-to-left-margin) + (remove-function (local 'indent-line-function) + #'indent-to-left-margin))) (defalias 'indented-text-mode 'text-mode)