1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

; Improve documentation of 'help-fns-edit-variable'

* lisp/help-fns.el (help-fns-edit-variable)
(help-enable-variable-value-editing): Doc fixes.

(cherry picked from commit bf737dc42a)
This commit is contained in:
Eli Zaretskii 2025-04-16 11:13:41 +03:00
parent 2b535a9c77
commit 275712a18c

View file

@ -134,11 +134,11 @@ with the current prefix. The files are chosen according to
:version "26.3") :version "26.3")
(defcustom help-enable-variable-value-editing nil (defcustom help-enable-variable-value-editing nil
"If non-nil, allow editing values in *Help* buffers. "If non-nil, allow editing variable values in *Help* buffers.
To edit the value of a variable, use \\[describe-variable] to To edit the value of a variable, use \\[describe-variable] to
display a \"*Help*\" buffer, move point after the text display a \"*Help*\" buffer, move point after the text
\"Its value is\" and type \\`e'. \"Its value is\" and type \\`e' to invoke `help-fns-edit-variable'.
Values that aren't readable by the Emacs Lisp reader can't be Values that aren't readable by the Emacs Lisp reader can't be
edited even if this option is enabled." edited even if this option is enabled."
@ -1506,7 +1506,16 @@ it is displayed along with the global value."
(put 'help-fns-edit-variable 'disabled t) (put 'help-fns-edit-variable 'disabled t)
(defun help-fns-edit-variable () (defun help-fns-edit-variable ()
"Edit the variable under point." "Edit the variable value at point in \"*Help*\" buffer.
This command only works if `help-enable-variable-value-editing' is non-nil.
To edit the value of a variable, use \\[describe-variable] followed by the name
of a variable, to display a \"*Help*\" buffer, move point to
the variable's value, usually after the text \"Its value is\", and
type \\`e' to invoke this command.
Values that aren't readable by the Emacs Lisp reader can't be edited
by this command."
(declare (completion ignore)) (declare (completion ignore))
(interactive) (interactive)
(let ((var (get-text-property (point) 'help-fns--edit-variable))) (let ((var (get-text-property (point) 'help-fns--edit-variable)))