diff options
| author | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-11-17 20:48:46 -0500 |
|---|---|---|
| committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-11-17 20:48:46 -0500 |
| commit | 1f35d401baa3e1d5715fecc734e803b538afa257 (patch) | |
| tree | 5d61f844aada6f5b1e1aa2ff15202583a738aa14 /lisp/textmodes | |
| parent | 986545b57f27403e9f8729bb6252957bc8baf2ea (diff) | |
| download | emacs-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.el | 7 |
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) |
