Mercurial > emacs
changeset 23591:9487b796b92c
(describe-variable): Hyperlink the definition.
author | Dave Love <fx@gnu.org> |
---|---|
date | Fri, 30 Oct 1998 19:07:09 +0000 |
parents | 79d5477f09fd |
children | 43a9efaf1ee2 |
files | lisp/help.el |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/help.el Fri Oct 30 19:00:25 1998 +0000 +++ b/lisp/help.el Fri Oct 30 19:07:09 1998 +0000 @@ -743,6 +743,23 @@ (help-xref-button 1 #'(lambda (v) (customize-variable v)) variable) )))) + ;; Make a hyperlink to the library if appropriate. (Don't + ;; change the format of the buffer's initial line in case + ;; anything expects the current format.) + (let ((file-name (describe-function-find-file variable))) + (when file-name + (princ "\n\nDefined in `") + (princ file-name) + (princ "'.") + (with-current-buffer "*Help*" + (save-excursion + (re-search-backward "`\\([^`']+\\)'" nil t) + (help-xref-button 1 (lambda (arg) + (let ((location + (find-variable-noselect arg))) + (pop-to-buffer (car location)) + (goto-char (cdr location)))) + variable))))) (print-help-return-message) (save-excursion