Commit 07251241 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen
Browse files

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.
parent f5640a3b
Pipeline #11484 failed with stages
in 37 seconds
......@@ -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 ")))))
......
......@@ -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."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment