emacs-diffs
[Top][All Lists]
Advanced

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

master 0725124: Make the `s' command in *Help* work for Lisp variables d


From: Lars Ingebrigtsen
Subject: master 0725124: Make the `s' command in *Help* work for Lisp variables defined in C
Date: Mon, 19 Jul 2021 12:35:16 -0400 (EDT)

branch: master
commit 072512414efa80a680d9380ad8b7c9d1e2a1c1a6
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Make the `s' command in *Help* work for Lisp variables defined in C
    
    * lisp/help-fns.el (describe-variable): Store the type.
    * lisp/help-mode.el (help-view-source): Use the type.  This fixes
    the problem when looking for a variable defined in a C file.
---
 lisp/help-fns.el  | 4 +++-
 lisp/help-mode.el | 6 ++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 81d7f23..76417746 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -1078,6 +1078,7 @@ it is displayed along with the global value."
                           (with-current-buffer standard-output
                              (setq help-mode--current-data
                                    (list :symbol variable
+                                         :type 'variable
                                          :file file-name))
                              (save-excursion
                               (re-search-backward (substitute-command-keys
@@ -1089,7 +1090,8 @@ it is displayed along with the global value."
                               "It is void as a variable."
                              "Its "))
                       (with-current-buffer standard-output
-                         (setq help-mode--current-data (list :symbol 
variable)))
+                         (setq help-mode--current-data (list :symbol variable
+                                                             :type 'variable)))
                        (if valvoid
                           " is void as a variable."
                          (substitute-command-keys "'s ")))))
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 4e73551..3976a9a 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -738,8 +738,10 @@ See `help-make-xrefs'."
   (interactive nil help-mode)
   (unless (plist-get help-mode--current-data :file)
     (error "Source file for the current help item is not defined"))
-  (help-function-def--button-function (plist-get help-mode--current-data 
:symbol)
-                                      (plist-get help-mode--current-data 
:file)))
+  (help-function-def--button-function
+   (plist-get help-mode--current-data :symbol)
+   (plist-get help-mode--current-data :file)
+   (plist-get help-mode--current-data :type)))
 
 (defun help-goto-info ()
   "View the *info* node of the current help item."



reply via email to

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