1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-02 08:22:22 +00:00

* lisp/textmodes/text-mode.el (paragraph-indent-minor-mode): Use add-function.

This commit is contained in:
Stefan Monnier 2013-11-17 20:48:46 -05:00
parent 986545b57f
commit 1f35d401ba
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2013-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
* textmodes/text-mode.el (paragraph-indent-minor-mode): Use add-function.
2013-11-17 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/nadvice.el (remove-function): Align with

View File

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