emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115135: * lisp/textmodes/text-mode.el (paragraph-in


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r115135: * lisp/textmodes/text-mode.el (paragraph-indent-minor-mode): Use add-function.
Date: Mon, 18 Nov 2013 01:48:50 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115135
revision-id: address@hidden
parent: address@hidden
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Sun 2013-11-17 20:48:46 -0500
message:
  * lisp/textmodes/text-mode.el (paragraph-indent-minor-mode): Use add-function.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/textmodes/text-mode.el    textmode.el-20091113204419-o5vbwnq5f7feedwu-90
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-11-17 23:11:27 +0000
+++ b/lisp/ChangeLog    2013-11-18 01:48:46 +0000
@@ -1,3 +1,7 @@
+2013-11-18  Stefan Monnier  <address@hidden>
+
+       * textmodes/text-mode.el (paragraph-indent-minor-mode): Use 
add-function.
+
 2013-11-17  Stefan Monnier  <address@hidden>
 
        * emacs-lisp/nadvice.el (remove-function): Align with

=== modified file 'lisp/textmodes/text-mode.el'
--- a/lisp/textmodes/text-mode.el       2013-10-10 00:32:36 +0000
+++ b/lisp/textmodes/text-mode.el       2013-11-18 01:48:46 +0000
@@ -121,9 +121,10 @@
                (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)
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]