From: Lars Ingebrigtsen Date: Tue, 27 Oct 2020 07:23:31 +0000 (+0100) Subject: `g' in *Help* doesn't require confirmation X-Git-Tag: emacs-28.0.90~5402 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=be2b43c4d6ee7a4f63caf0d496789963fcf4fb00;p=emacs.git `g' in *Help* doesn't require confirmation * 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. --- diff --git a/etc/NEWS b/etc/NEWS index a77c1c883eb..71749d1b1ff 100644 --- 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. diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 0dc6c9ffae0..f0770fb6602 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -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.