]> git.eshelyaron.com Git - emacs.git/commitdiff
(help-variable-def): Handle find-variable-noselect returning no position.
authorRichard M. Stallman <rms@gnu.org>
Wed, 12 Jul 2006 16:00:45 +0000 (16:00 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 12 Jul 2006 16:00:45 +0000 (16:00 +0000)
(help-function-def): Likewise for find-function-search-for-symbol.
(help-face-def): Likewise.

lisp/help-mode.el

index 72b2554185fcc463c57d831fac72ab2232de4faf..7cdf78fbe137c74b9c163216708945f9ceec9c77 100644 (file)
@@ -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,7 +168,8 @@ 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))))
+                    (when (cdr location)
+                      (goto-char (cdr location)))))
   'help-echo (purecopy "mouse-2, RET: find variable's definition"))
 
 (define-button-type 'help-face-def
@@ -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"))
 
 \f