* lisp/help-macro.el: Add 'help-for-help-use-variable-pitch' option.
authorPaul W. Rankin <rnkn@rnkn.xyz>
Thu, 8 Aug 2024 02:16:07 +0000 (12:16 +1000)
committerEli Zaretskii <eliz@gnu.org>
Thu, 8 Aug 2024 10:30:55 +0000 (13:30 +0300)
This makes 'variable-pitch-mode' optional, by default ON (to
preserve previous behavior), in Help buffers.  (Bug#72521)

lisp/help-macro.el

index 8a16e85a3291ba0513956c4b2497cacea470cdb4..2e4d9fbb2e921d70b45061dbc723e65df167c8a4 100644 (file)
@@ -78,6 +78,12 @@ gives the window that lists the options."
   :type 'boolean
   :group 'help)
 
+(defcustom help-for-help-use-variable-pitch t
+  "If non-nil, `help-for-help' should use `variable-pitch-mode'."
+  :type 'boolean
+  :version "30.1"
+  :group 'help)
+
 (defmacro make-help-screen (fname help-line help-text helped-map
                                   &optional buffer-name)
   "Construct help-menu function name FNAME.
@@ -146,7 +152,8 @@ and then returns."
                 (insert (substitute-command-keys help-screen)))
               (let ((minor-mode-map-alist new-minor-mode-map-alist))
                 (help-mode)
-                (variable-pitch-mode)
+                (when help-for-help-use-variable-pitch
+                  (variable-pitch-mode))
                 (setq new-minor-mode-map-alist minor-mode-map-alist))
               (goto-char (point-min))
               (while (or (memq char (append help-event-list