diff options
| author | Tassilo Horn | 2025-08-08 06:50:18 +0200 |
|---|---|---|
| committer | Tassilo Horn | 2025-08-08 06:50:18 +0200 |
| commit | 4456f7bd313ab829ba3ec6375349a693dbbc1930 (patch) | |
| tree | 1ed22bf1594097d7d33f6ea07699932c78bf161d | |
| parent | 2b3eb8d3f026d166210eaa57d565d7e3509c40e4 (diff) | |
| download | emacs-4456f7bd313ab829ba3ec6375349a693dbbc1930.tar.gz emacs-4456f7bd313ab829ba3ec6375349a693dbbc1930.zip | |
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).
| -rw-r--r-- | lisp/doc-view.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index b9bde21eaa8..26604f326fa 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el | |||
| @@ -2143,7 +2143,13 @@ If FILE-NAME is nil, use the current file instead." | |||
| 2143 | (defun doc-view-initiate-display () | 2143 | (defun doc-view-initiate-display () |
| 2144 | ;; Switch to image display if possible. | 2144 | ;; Switch to image display if possible. |
| 2145 | (if (doc-view-mode-p doc-view-doc-type) | 2145 | (if (doc-view-mode-p doc-view-doc-type) |
| 2146 | (progn | 2146 | ;; Inhibit the echo area display of the "Type C-c C-c..." message |
| 2147 | ;; if the doc-view buffer is not shown in the selected window | ||
| 2148 | ;; which can happen due to auto-reverting the buffer (bug#79145). | ||
| 2149 | (let ((inhibit-message | ||
| 2150 | (not (eq (selected-window) | ||
| 2151 | (get-buffer-window (current-buffer) | ||
| 2152 | (selected-frame)))))) | ||
| 2147 | (doc-view-buffer-message) | 2153 | (doc-view-buffer-message) |
| 2148 | (setf (doc-view-current-page) (or (doc-view-current-page) 1)) | 2154 | (setf (doc-view-current-page) (or (doc-view-current-page) 1)) |
| 2149 | (if (doc-view-already-converted-p) | 2155 | (if (doc-view-already-converted-p) |