changeset 71850:5da49f1eb585

(help-variable-def): Handle find-variable-noselect returning no position. (help-function-def): Likewise for find-function-search-for-symbol. (help-face-def): Likewise.
author Richard M. Stallman <rms@gnu.org>
date Wed, 12 Jul 2006 16:00:45 +0000
parents 2227a7e3b7eb
children fcc45339ef47
files lisp/help-mode.el
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/help-mode.el	Wed Jul 12 15:58:10 2006 +0000
+++ b/lisp/help-mode.el	Wed Jul 12 16:00:45 2006 +0000
@@ -157,7 +157,8 @@
 		   (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 @@
 		     (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 @@
 		   (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"))