aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2022-06-17 16:03:52 +0200
committerStefan Kangas2022-06-17 16:30:51 +0200
commit250f9e7f8380e208d8ef32dd4d64218b41abbddf (patch)
tree9ba175f797416669fee681f1f1e01e9676a3c38a
parentaf8ec14cd73888af462c8a67b5c1b0f613513a25 (diff)
downloademacs-250f9e7f8380e208d8ef32dd4d64218b41abbddf.tar.gz
emacs-250f9e7f8380e208d8ef32dd4d64218b41abbddf.zip
Improve help-enable-variable-value-editing help
* lisp/help-fns.el (help-enable-variable-value-editing): Expand docstring to better explain what effect it has. (help-fns-edit-variable): Use command substitution.
-rw-r--r--lisp/help-fns.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index ca5750723f3..18b12ee7b37 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -135,6 +135,11 @@ with the current prefix. The files are chosen according to
135 135
136(defcustom help-enable-variable-value-editing nil 136(defcustom help-enable-variable-value-editing nil
137 "If non-nil, allow editing values in *Help* buffers. 137 "If non-nil, allow editing values in *Help* buffers.
138
139To edit the value of a variable, use \\[describe-variable] to
140display a \"*Help*\" buffer, move point after the text
141\"Its value is\" and type \\`e'.
142
138Values that aren't readable by the Emacs Lisp reader can't be 143Values that aren't readable by the Emacs Lisp reader can't be
139edited even if this option is enabled." 144edited even if this option is enabled."
140 :type 'boolean 145 :type 'boolean
@@ -1376,9 +1381,10 @@ it is displayed along with the global value."
1376 (prin1 (nth 1 var) (current-buffer)) 1381 (prin1 (nth 1 var) (current-buffer))
1377 (pp-buffer) 1382 (pp-buffer)
1378 (goto-char (point-min)) 1383 (goto-char (point-min))
1379 (insert (format ";; Edit the `%s' variable.\n" (nth 0 var))
1380 ";; C-c C-c to update the value and exit.\n\n")
1381 (help-fns--edit-value-mode) 1384 (help-fns--edit-value-mode)
1385 (insert (format ";; Edit the `%s' variable.\n" (nth 0 var))
1386 (substitute-command-keys
1387 ";; \\[help-fns-edit-mode-done] to update the value and exit.\n\n"))
1382 (setq-local help-fns--edit-variable var))) 1388 (setq-local help-fns--edit-variable var)))
1383 1389
1384(defvar-keymap help-fns--edit-value-mode-map 1390(defvar-keymap help-fns--edit-value-mode-map