diff options
| author | Dave Love | 1998-10-30 19:07:09 +0000 |
|---|---|---|
| committer | Dave Love | 1998-10-30 19:07:09 +0000 |
| commit | 3476e1595542523a3c26ba719b49eea6249d62dc (patch) | |
| tree | 60834ea7a54b99b68a7ba86779188dc117eca1cf | |
| parent | e0a3686bfd545304842ac2519fb73c4b050071e0 (diff) | |
| download | emacs-3476e1595542523a3c26ba719b49eea6249d62dc.tar.gz emacs-3476e1595542523a3c26ba719b49eea6249d62dc.zip | |
(describe-variable): Hyperlink the definition.
| -rw-r--r-- | lisp/help.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lisp/help.el b/lisp/help.el index 850cf3078d9..2e2b9459b53 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -743,6 +743,23 @@ Returns the documentation as a string, also." | |||
| 743 | (help-xref-button 1 #'(lambda (v) | 743 | (help-xref-button 1 #'(lambda (v) |
| 744 | (customize-variable v)) variable) | 744 | (customize-variable v)) variable) |
| 745 | )))) | 745 | )))) |
| 746 | ;; Make a hyperlink to the library if appropriate. (Don't | ||
| 747 | ;; change the format of the buffer's initial line in case | ||
| 748 | ;; anything expects the current format.) | ||
| 749 | (let ((file-name (describe-function-find-file variable))) | ||
| 750 | (when file-name | ||
| 751 | (princ "\n\nDefined in `") | ||
| 752 | (princ file-name) | ||
| 753 | (princ "'.") | ||
| 754 | (with-current-buffer "*Help*" | ||
| 755 | (save-excursion | ||
| 756 | (re-search-backward "`\\([^`']+\\)'" nil t) | ||
| 757 | (help-xref-button 1 (lambda (arg) | ||
| 758 | (let ((location | ||
| 759 | (find-variable-noselect arg))) | ||
| 760 | (pop-to-buffer (car location)) | ||
| 761 | (goto-char (cdr location)))) | ||
| 762 | variable))))) | ||
| 746 | 763 | ||
| 747 | (print-help-return-message) | 764 | (print-help-return-message) |
| 748 | (save-excursion | 765 | (save-excursion |