]> git.eshelyaron.com Git - emacs.git/commitdiff
(help-function-def, help-variable-def)
authorNick Roberts <nickrob@snap.net.nz>
Fri, 21 Jul 2006 22:54:40 +0000 (22:54 +0000)
committerNick Roberts <nickrob@snap.net.nz>
Fri, 21 Jul 2006 22:54:40 +0000 (22:54 +0000)
(help-face-def): Print a message in the minibuffer.

lisp/help-mode.el

index 7cdf78fbe137c74b9c163216708945f9ceec9c77..ce79e618cd50c89f2424b01bbe894276042aefb8 100644 (file)
@@ -157,8 +157,9 @@ The format is (FUNCTION ARGS...).")
                   (let ((location
                          (find-function-search-for-symbol fun nil file)))
                     (pop-to-buffer (car location))
-                    (when (cdr location)
-                      (goto-char (cdr location)))))
+                    (if (cdr location)
+                        (goto-char (cdr location))
+                      (message "Unable to find location in file"))))
   'help-echo (purecopy "mouse-2, RET: find function's definition"))
 
 (define-button-type 'help-variable-def
@@ -168,8 +169,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))
-                    (when (cdr location)
-                      (goto-char (cdr location)))))
+                    (if (cdr location)
+                      (goto-char (cdr location))
+                      (message "Unable to find location in file"))))
   'help-echo (purecopy "mouse-2, RET: find variable's definition"))
 
 (define-button-type 'help-face-def
@@ -181,8 +183,9 @@ The format is (FUNCTION ARGS...).")
                   (let ((location
                          (find-function-search-for-symbol fun 'defface file)))
                     (pop-to-buffer (car location))
-                    (when (cdr location)
-                      (goto-char (cdr location)))))
+                    (if (cdr location)
+                        (goto-char (cdr location))
+                      (message "Unable to find location in file"))))
   'help-echo (purecopy "mouse-2, RET: find face's definition"))
 
 \f