]> git.eshelyaron.com Git - emacs.git/commitdiff
`g' in *Help* doesn't require confirmation
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 27 Oct 2020 07:23:31 +0000 (08:23 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 27 Oct 2020 07:23:31 +0000 (08:23 +0100)
* lisp/help-mode.el (help-mode-revert-buffer): Don't require
confirmation before reverting (bug#44202).  This mimics how most
other non-file reverting functions work.

etc/NEWS
lisp/help-mode.el

index a77c1c883eb333ac5b37577eac5925fb365b6c04..71749d1b1ff19da6dbd31f74f69f2b6d07ca29d9 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -583,6 +583,9 @@ skipped.
 
 ** Help
 
+---
+*** 'g' ('revert-buffer') in 'help-mode' no longer requires confirmation.
+
 +++
 *** New command 'describe-keymap' describes keybindings in a keymap.
 
index 0dc6c9ffae089c40bc506b2996f651ca2c56e620..f0770fb6602b9d0a65cc5afd62422af620f0d770 100644 (file)
@@ -756,16 +756,15 @@ Show all docs for that symbol as either a variable, function or face."
         (help-do-xref pos #'describe-symbol (list sym))
       (user-error "No symbol here"))))
 
-(defun help-mode-revert-buffer (_ignore-auto noconfirm)
-  (when (or noconfirm (yes-or-no-p "Revert help buffer? "))
-    (let ((pos (point))
-         (item help-xref-stack-item)
-         ;; Pretend there is no current item to add to the history.
-         (help-xref-stack-item nil)
-         ;; Use the current buffer.
-         (help-xref-following t))
-      (apply (car item) (cdr item))
-      (goto-char pos))))
+(defun help-mode-revert-buffer (_ignore-auto _noconfirm)
+  (let ((pos (point))
+       (item help-xref-stack-item)
+       ;; Pretend there is no current item to add to the history.
+       (help-xref-stack-item nil)
+       ;; Use the current buffer.
+       (help-xref-following t))
+    (apply (car item) (cdr item))
+    (goto-char pos)))
 
 (defun help-insert-string (string)
   "Insert STRING to the help buffer and install xref info for it.