mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-08 23:40:24 -08:00
help.el: Don't abuse inhibit-modification-hooks
* lisp/help.el (substitute-command-keys):
Set `inhibit-modification-hooks` locally so it doesn't affect
downstream function.
(help--window-setup): Don't let-bind `inhibit-modification-hooks`.
It was introduced accidentally in commit cd87a5c7a1.
This commit is contained in:
parent
8726587648
commit
40559bf71c
1 changed files with 5 additions and 4 deletions
|
|
@ -305,6 +305,8 @@ specifies what to do when the user exits the help buffer.
|
||||||
|
|
||||||
Do not call this in the scope of `with-help-window'."
|
Do not call this in the scope of `with-help-window'."
|
||||||
(and (not (get-buffer-window standard-output))
|
(and (not (get-buffer-window standard-output))
|
||||||
|
;; FIXME: Call this code *after* we display the buffer, so we can
|
||||||
|
;; detect reliably whether it's been put in its own frame or what.
|
||||||
(let ((first-message
|
(let ((first-message
|
||||||
(cond ((or
|
(cond ((or
|
||||||
pop-up-frames
|
pop-up-frames
|
||||||
|
|
@ -331,7 +333,7 @@ Do not call this in the scope of `with-help-window'."
|
||||||
(list (selected-window) (window-buffer)
|
(list (selected-window) (window-buffer)
|
||||||
(window-start) (window-point)))
|
(window-start) (window-point)))
|
||||||
"Type \\[switch-to-buffer] RET to remove help window."))))
|
"Type \\[switch-to-buffer] RET to remove help window."))))
|
||||||
(funcall (or function 'message)
|
(funcall (or function #'message)
|
||||||
(concat
|
(concat
|
||||||
(if first-message
|
(if first-message
|
||||||
(substitute-command-keys first-message))
|
(substitute-command-keys first-message))
|
||||||
|
|
@ -1396,10 +1398,10 @@ Otherwise, return a new string."
|
||||||
;; overriding-local-map, or from a \\<mapname> construct in STRING
|
;; overriding-local-map, or from a \\<mapname> construct in STRING
|
||||||
;; itself.
|
;; itself.
|
||||||
(let ((keymap overriding-local-map)
|
(let ((keymap overriding-local-map)
|
||||||
(inhibit-modification-hooks t)
|
|
||||||
(inhibit-read-only t)
|
(inhibit-read-only t)
|
||||||
(orig-buf (current-buffer)))
|
(orig-buf (current-buffer)))
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
|
(setq-local inhibit-modification-hooks t) ;; For speed.
|
||||||
(insert string)
|
(insert string)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (< (point) (point-max))
|
(while (< (point) (point-max))
|
||||||
|
|
@ -2170,8 +2172,7 @@ The `temp-buffer-window-setup-hook' hook is called."
|
||||||
buffer-file-name nil)
|
buffer-file-name nil)
|
||||||
(setq-local help-mode--current-data nil)
|
(setq-local help-mode--current-data nil)
|
||||||
(buffer-disable-undo)
|
(buffer-disable-undo)
|
||||||
(let ((inhibit-read-only t)
|
(let ((inhibit-read-only t))
|
||||||
(inhibit-modification-hooks t))
|
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(delete-all-overlays)
|
(delete-all-overlays)
|
||||||
(prog1
|
(prog1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue