summaryrefslogtreecommitdiff
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-12-01 13:10:05 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2014-12-01 13:10:05 -0500
commitb8775f0217b670f3a55ca014e3ecfc3fe9199fef (patch)
tree6994573689cb84b50d3e34f3cde77f82ac82a683 /lisp/simple.el
parentec7e07b333873789774cea53b45248fd0bf00600 (diff)
* lisp/simple.el (newline): Place the hook buffer-locally,
to make sure it's first.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 65fcf6e90b2..b8b15796a26 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)