; Improve robustness of 'help-fns-edit-variable'
* lisp/help-fns.el (help-fns-edit-variable): Extract the text property directly at point instead of trying to determine the variable at point and always assuming there is one. (Bug#71374)
This commit is contained in:
parent
92ea393a16
commit
d277123f4b
1 changed files with 2 additions and 3 deletions
|
@ -1530,9 +1530,8 @@ it is displayed along with the global value."
|
|||
"Edit the variable under point."
|
||||
(declare (completion ignore))
|
||||
(interactive)
|
||||
(let* ((val (thing-at-point 'sexp))
|
||||
(var (get-text-property 0 'help-fns--edit-variable val)))
|
||||
(unless val
|
||||
(let ((var (get-text-property (point) 'help-fns--edit-variable)))
|
||||
(unless var
|
||||
(error "No variable under point"))
|
||||
(let ((str (read-string-from-buffer
|
||||
(format ";; Edit the `%s' variable." (nth 0 var))
|
||||
|
|
Loading…
Add table
Reference in a new issue