mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -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'."
|
||||
(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
|
||||
(cond ((or
|
||||
pop-up-frames
|
||||
|
|
@ -331,7 +333,7 @@ Do not call this in the scope of `with-help-window'."
|
|||
(list (selected-window) (window-buffer)
|
||||
(window-start) (window-point)))
|
||||
"Type \\[switch-to-buffer] RET to remove help window."))))
|
||||
(funcall (or function 'message)
|
||||
(funcall (or function #'message)
|
||||
(concat
|
||||
(if 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
|
||||
;; itself.
|
||||
(let ((keymap overriding-local-map)
|
||||
(inhibit-modification-hooks t)
|
||||
(inhibit-read-only t)
|
||||
(orig-buf (current-buffer)))
|
||||
(with-temp-buffer
|
||||
(setq-local inhibit-modification-hooks t) ;; For speed.
|
||||
(insert string)
|
||||
(goto-char (point-min))
|
||||
(while (< (point) (point-max))
|
||||
|
|
@ -2170,8 +2172,7 @@ The `temp-buffer-window-setup-hook' hook is called."
|
|||
buffer-file-name nil)
|
||||
(setq-local help-mode--current-data nil)
|
||||
(buffer-disable-undo)
|
||||
(let ((inhibit-read-only t)
|
||||
(inhibit-modification-hooks t))
|
||||
(let ((inhibit-read-only t))
|
||||
(erase-buffer)
|
||||
(delete-all-overlays)
|
||||
(prog1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue