Function: help-fns-edit-variable
help-fns-edit-variable is an interactive and byte-compiled function
defined in help-fns.el.gz.
Signature
(help-fns-edit-variable)
Documentation
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 C-h v (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.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/help-fns.el.gz
(defun help-fns-edit-variable ()
"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))
(interactive)
(let ((var (get-text-property (point) 'help-fns--edit-variable)))
(unless var
(error "No variable under point"))
(pop-to-buffer-same-window (format "*edit %s*" (nth 0 var)))
(prin1 (nth 1 var) (current-buffer))
(pp-buffer)
(goto-char (point-min))
(help-fns--edit-value-mode)
(insert (format ";; Edit the `%s' variable.\n" (nth 0 var))
(substitute-command-keys
";; `\\[help-fns-edit-mode-done]' to update the value and exit; \
`\\[help-fns-edit-mode-cancel]' to cancel.\n\n"))
(setq-local help-fns--edit-variable var)))