[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master be2b43c 2/2: `g' in *Help* doesn't require confirmation
From: |
Lars Ingebrigtsen |
Subject: |
master be2b43c 2/2: `g' in *Help* doesn't require confirmation |
Date: |
Tue, 27 Oct 2020 03:23:42 -0400 (EDT) |
branch: master
commit be2b43c4d6ee7a4f63caf0d496789963fcf4fb00
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
`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.
---
etc/NEWS | 3 +++
lisp/help-mode.el | 19 +++++++++----------
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index a77c1c8..71749d1 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 0dc6c9f..f0770fb 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.