diff options
Diffstat (limited to 'lisp/help-mode.el')
-rw-r--r-- | lisp/help-mode.el | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 0c6e0f47453..7cdf78fbe13 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -157,7 +157,8 @@ The format is (FUNCTION ARGS...).") (let ((location (find-function-search-for-symbol fun nil file))) (pop-to-buffer (car location)) - (goto-char (cdr location)))) + (when (cdr location) + (goto-char (cdr location))))) 'help-echo (purecopy "mouse-2, RET: find function's definition")) (define-button-type 'help-variable-def @@ -167,8 +168,9 @@ The format is (FUNCTION ARGS...).") (setq file (help-C-file-name var 'var))) (let ((location (find-variable-noselect var file))) (pop-to-buffer (car location)) - (goto-char (cdr location)))) - 'help-echo (purecopy"mouse-2, RET: find variable's definition")) + (when (cdr location) + (goto-char (cdr location))))) + 'help-echo (purecopy "mouse-2, RET: find variable's definition")) (define-button-type 'help-face-def :supertype 'help-xref @@ -179,7 +181,8 @@ The format is (FUNCTION ARGS...).") (let ((location (find-function-search-for-symbol fun 'defface file))) (pop-to-buffer (car location)) - (goto-char (cdr location)))) + (when (cdr location) + (goto-char (cdr location))))) 'help-echo (purecopy "mouse-2, RET: find face's definition")) @@ -238,9 +241,9 @@ Commands: (defconst help-xref-symbol-regexp (purecopy (concat "\\(\\<\\(\\(variable\\|option\\)\\|" ; Link to var - "\\(function\\|command\\)\\|" ; Link to function - "\\(face\\)\\|" ; Link to face - "\\(symbol\\|program\\)\\|" ; Don't link + "\\(function\\|command\\)\\|" ; Link to function + "\\(face\\)\\|" ; Link to face + "\\(symbol\\|program\\|property\\)\\|" ; Don't link "\\(source \\(?:code \\)?\\(?:of\\|for\\)\\)\\)" "[ \t\n]+\\)?" ;; Note starting with word-syntax character: |