diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 8a2ae79736f..97d054ce6db 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -1507,9 +1507,8 @@ help-fns-edit-variable "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))