summaryrefslogtreecommitdiff
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2013-11-17 20:48:46 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2013-11-17 20:48:46 -0500
commit1f35d401baa3e1d5715fecc734e803b538afa257 (patch)
tree5d61f844aada6f5b1e1aa2ff15202583a738aa14 /lisp/textmodes
parent986545b57f27403e9f8729bb6252957bc8baf2ea (diff)
downloademacs-1f35d401baa3e1d5715fecc734e803b538afa257.tar.gz
* lisp/textmodes/text-mode.el (paragraph-indent-minor-mode): Use add-function.
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/text-mode.el7
1 files changed, 4 insertions, 3 deletions
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)