aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier2013-11-17 20:48:46 -0500
committerStefan Monnier2013-11-17 20:48:46 -0500
commit1f35d401baa3e1d5715fecc734e803b538afa257 (patch)
tree5d61f844aada6f5b1e1aa2ff15202583a738aa14 /lisp
parent986545b57f27403e9f8729bb6252957bc8baf2ea (diff)
downloademacs-1f35d401baa3e1d5715fecc734e803b538afa257.tar.gz
emacs-1f35d401baa3e1d5715fecc734e803b538afa257.zip
* lisp/textmodes/text-mode.el (paragraph-indent-minor-mode): Use add-function.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/textmodes/text-mode.el7
2 files changed, 8 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a749f70b4fc..e2d1747795c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12013-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * textmodes/text-mode.el (paragraph-indent-minor-mode): Use add-function.
4
12013-11-17 Stefan Monnier <monnier@iro.umontreal.ca> 52013-11-17 Stefan Monnier <monnier@iro.umontreal.ca>
2 6
3 * emacs-lisp/nadvice.el (remove-function): Align with 7 * 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
121 (concat ps-re paragraph-start))))) 121 (concat ps-re paragraph-start)))))
122 ;; Change the indentation function. 122 ;; Change the indentation function.
123 (if paragraph-indent-minor-mode 123 (if paragraph-indent-minor-mode
124 (set (make-local-variable 'indent-line-function) 'indent-to-left-margin) 124 (add-function :override (local 'indent-line-function)
125 (if (eq indent-line-function 'indent-to-left-margin) 125 #'indent-to-left-margin)
126 (set (make-local-variable 'indent-line-function) 'indent-region)))) 126 (remove-function (local 'indent-line-function)
127 #'indent-to-left-margin)))
127 128
128(defalias 'indented-text-mode 'text-mode) 129(defalias 'indented-text-mode 'text-mode)
129 130