1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

doc-view: inhibit keybinding message if window is not selected

* lisp/doc-view.el (doc-view-initiate-display): Only echo key-binding
message when the document buffer is shown in the selected
window (bug#79145).
This commit is contained in:
Tassilo Horn 2025-08-08 06:50:18 +02:00
parent 2b3eb8d3f0
commit 4456f7bd31

View file

@ -2143,7 +2143,13 @@ If FILE-NAME is nil, use the current file instead."
(defun doc-view-initiate-display () (defun doc-view-initiate-display ()
;; Switch to image display if possible. ;; Switch to image display if possible.
(if (doc-view-mode-p doc-view-doc-type) (if (doc-view-mode-p doc-view-doc-type)
(progn ;; Inhibit the echo area display of the "Type C-c C-c..." message
;; if the doc-view buffer is not shown in the selected window
;; which can happen due to auto-reverting the buffer (bug#79145).
(let ((inhibit-message
(not (eq (selected-window)
(get-buffer-window (current-buffer)
(selected-frame))))))
(doc-view-buffer-message) (doc-view-buffer-message)
(setf (doc-view-current-page) (or (doc-view-current-page) 1)) (setf (doc-view-current-page) (or (doc-view-current-page) 1))
(if (doc-view-already-converted-p) (if (doc-view-already-converted-p)