diff options
| author | Richard M. Stallman | 1998-11-30 23:55:42 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-11-30 23:55:42 +0000 |
| commit | 5f373960a60c5f765d7877cac14dec7224deb9d8 (patch) | |
| tree | be0c1989347bfd85edd75de26ed2de6e01110985 | |
| parent | 71c78f01ad177f731fdf51f26809fec7d24de757 (diff) | |
| download | emacs-5f373960a60c5f765d7877cac14dec7224deb9d8.tar.gz emacs-5f373960a60c5f765d7877cac14dec7224deb9d8.zip | |
(help-xref-button): Do nothing if text already has the help-xref property.
(describe-variable): Revert previous change to hyperlink to source.
| -rw-r--r-- | lisp/help.el | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lisp/help.el b/lisp/help.el index d4623decb0e..31ed2251ec9 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -751,14 +751,12 @@ Returns the documentation as a string, also." | |||
| 751 | ;; anything expects the current format.) | 751 | ;; anything expects the current format.) |
| 752 | (let ((file-name (describe-function-find-file variable))) | 752 | (let ((file-name (describe-function-find-file variable))) |
| 753 | (when file-name | 753 | (when file-name |
| 754 | ;; Don't quote this, or it can get re-interpreted later | 754 | (princ "\n\nDefined in `") |
| 755 | ;; by `help-make-xrefs'. | ||
| 756 | (princ "\n\nDefined in ") | ||
| 757 | (princ file-name) | 755 | (princ file-name) |
| 758 | (princ ".") | 756 | (princ "'.") |
| 759 | (with-current-buffer "*Help*" | 757 | (with-current-buffer "*Help*" |
| 760 | (save-excursion | 758 | (save-excursion |
| 761 | (re-search-backward "Defined in \\([^.]+\\)." nil t) | 759 | (re-search-backward "`\\([^`']+\\)'" nil t) |
| 762 | (help-xref-button 1 (lambda (arg) | 760 | (help-xref-button 1 (lambda (arg) |
| 763 | (let ((location | 761 | (let ((location |
| 764 | (find-variable-noselect arg))) | 762 | (find-variable-noselect arg))) |
| @@ -1029,17 +1027,19 @@ MATCH-NUMBER is the subexpression of interest in the last matched | |||
| 1029 | regexp. FUNCTION is a function to invoke when the button is | 1027 | regexp. FUNCTION is a function to invoke when the button is |
| 1030 | activated, applied to DATA. DATA may be a single value or a list. | 1028 | activated, applied to DATA. DATA may be a single value or a list. |
| 1031 | See `help-make-xrefs'." | 1029 | See `help-make-xrefs'." |
| 1032 | (add-text-properties (match-beginning match-number) | 1030 | ;; Don't mung properties we've added specially in some instances. |
| 1033 | (match-end match-number) | 1031 | (unless (get-text-property (match-beginning match-number) 'help-xref) |
| 1034 | (list 'mouse-face 'highlight | 1032 | (add-text-properties (match-beginning match-number) |
| 1035 | 'help-xref (cons function | 1033 | (match-end match-number) |
| 1036 | (if (listp data) | 1034 | (list 'mouse-face 'highlight |
| 1037 | data | 1035 | 'help-xref (cons function |
| 1038 | (list data))))) | 1036 | (if (listp data) |
| 1039 | (if help-highlight-p | 1037 | data |
| 1040 | (put-text-property (match-beginning match-number) | 1038 | (list data))))) |
| 1041 | (match-end match-number) | 1039 | (if help-highlight-p |
| 1042 | 'face help-highlight-face))) | 1040 | (put-text-property (match-beginning match-number) |
| 1041 | (match-end match-number) | ||
| 1042 | 'face help-highlight-face)))) | ||
| 1043 | 1043 | ||
| 1044 | 1044 | ||
| 1045 | ;; Additional functions for (re-)creating types of help buffers. | 1045 | ;; Additional functions for (re-)creating types of help buffers. |