]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/simple.el (newline): Place the hook buffer-locally,
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 1 Dec 2014 18:10:05 +0000 (13:10 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 1 Dec 2014 18:10:05 +0000 (13:10 -0500)
to make sure it's first.

lisp/ChangeLog
lisp/simple.el

index ac36c059bd30d366c5190bcd01c46c0d0d54a5a3..12e5ef0e34675fd116871f584b8c1028a692d70c 100644 (file)
@@ -1,5 +1,8 @@
 2014-12-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * simple.el (newline): Place the hook buffer-locally,
+       to make sure it's first.
+
        * progmodes/prog-mode.el (prettify-symbols--compose-symbol):
        Fix handling of symbols with different syntax at beginning/end or with
        symbol rather than word syntax.
index 65fcf6e90b2076cd9921abdce9bbc74efb3033b0..b8b15796a263d8436a6f8b9e05834f5c7efa11c8 100644 (file)
@@ -440,12 +440,12 @@ A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'."
           (self-insert-command (prefix-numeric-value arg)))
       (unwind-protect
           (progn
-            (add-hook 'post-self-insert-hook postproc)
+            (add-hook 'post-self-insert-hook postproc nil t)
             (self-insert-command (prefix-numeric-value arg)))
         ;; We first used let-binding to protect the hook, but that was naive
         ;; since add-hook affects the symbol-default value of the variable,
         ;; whereas the let-binding might only protect the buffer-local value.
-        (remove-hook 'post-self-insert-hook postproc)))
+        (remove-hook 'post-self-insert-hook postproc t)))
       (cl-assert (not (member postproc post-self-insert-hook)))
       (cl-assert (not (member postproc (default-value 'post-self-insert-hook))))))
   nil)