[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 b8775f0: * lisp/simple.el (newline): Place the ho
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] emacs-24 b8775f0: * lisp/simple.el (newline): Place the hook buffer-locally, |
Date: |
Mon, 01 Dec 2014 18:10:13 +0000 |
branch: emacs-24
commit b8775f0217b670f3a55ca014e3ecfc3fe9199fef
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>
* lisp/simple.el (newline): Place the hook buffer-locally,
to make sure it's first.
---
lisp/ChangeLog | 3 +++
lisp/simple.el | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ac36c05..12e5ef0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2014-12-01 Stefan Monnier <address@hidden>
+ * 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.
diff --git a/lisp/simple.el b/lisp/simple.el
index 65fcf6e..b8b1579 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 b8775f0: * lisp/simple.el (newline): Place the hook buffer-locally,,
Stefan Monnier <=