unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#44202: [PATCH] Add variable to control confirmation of help-mode-revert-buffer
@ 2020-10-24 20:25 Kevin Foley
  2020-10-24 23:40 ` Drew Adams
  2020-10-25  0:01 ` Stefan Kangas
  0 siblings, 2 replies; 17+ messages in thread
From: Kevin Foley @ 2020-10-24 20:25 UTC (permalink / raw)
  To: 44202

Allows users to control the `noconfirm' parameter of
`help-mode-revert-buffer'.

I've assigned copyright to FSF but this is my first patch on this list
so please let me know if I've missed any standards.

---
 lisp/help-mode.el | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 0dc6c9ffae..458b959aec 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -98,6 +98,13 @@ The format is (FUNCTION ARGS...).")
   "Hook run by `help-mode'."
   :type 'hook
   :group 'help)
+
+(defcustom help-mode-revert-buffer-noconfirm nil
+  "Indicates whether to prompt for confirmation when reverting a
+help buffer."
+  :type 'boolean
+  :group 'help
+  :version "28.1")
 \f
 ;; Button types used by help
 
@@ -757,7 +764,12 @@ Show all docs for that symbol as either a variable, function or face."
       (user-error "No symbol here"))))
 
 (defun help-mode-revert-buffer (_ignore-auto noconfirm)
-  (when (or noconfirm (yes-or-no-p "Revert help buffer? "))
+  "Revert help-mode buffer.  See
+`help-mode-revert-buffer-noconfirm' to control whether user is
+prompted for confirmation."
+  (when (or noconfirm
+            help-mode-revert-buffer-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.
-- 
2.28.0





^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-11-25  7:01 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-24 20:25 bug#44202: [PATCH] Add variable to control confirmation of help-mode-revert-buffer Kevin Foley
2020-10-24 23:40 ` Drew Adams
2020-10-25  0:01 ` Stefan Kangas
2020-10-25 13:39   ` Kevin Foley
2020-10-25 13:50     ` Lars Ingebrigtsen
2020-10-25 14:47       ` Kevin Foley
2020-10-25 16:50         ` Lars Ingebrigtsen
2020-10-25 18:42           ` Stefan Kangas
2020-10-25 20:08             ` Kevin Foley
2020-10-26 10:22               ` Lars Ingebrigtsen
2020-10-26 14:59                 ` Stefan Kangas
2020-10-26 22:05                   ` Kevin Foley
2020-10-27  7:27                     ` Lars Ingebrigtsen
2020-11-17 13:04                       ` Stefan Kangas
2020-11-24  5:26                         ` Lars Ingebrigtsen
2020-11-24 15:57                           ` Stefan Kangas
2020-11-25  7:01                             ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).