emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master d277123f4bf: ; Improve robustness of 'help-fns-edit-variable'


From: Philip Kaludercic
Subject: master d277123f4bf: ; Improve robustness of 'help-fns-edit-variable'
Date: Mon, 2 Sep 2024 16:56:03 -0400 (EDT)

branch: master
commit d277123f4bf855f0d055d283a42166f123fa1fde
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    ; 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)
---
 lisp/help-fns.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 3d3b841d827..e1daa8977f0 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]