aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2006-07-12 16:00:45 +0000
committerRichard M. Stallman2006-07-12 16:00:45 +0000
commit84333e068eca39d0867d169b8bc479bb2c32a69c (patch)
tree4eac75e300f5def9e714f11c32d30d41f390586b
parent38586111b136a4d4b77cb8c9dc78a84ec7884144 (diff)
downloademacs-84333e068eca39d0867d169b8bc479bb2c32a69c.tar.gz
emacs-84333e068eca39d0867d169b8bc479bb2c32a69c.zip
(help-variable-def): Handle find-variable-noselect returning no position.
(help-function-def): Likewise for find-function-search-for-symbol. (help-face-def): Likewise.
-rw-r--r--lisp/help-mode.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 72b2554185f..7cdf78fbe13 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -157,7 +157,8 @@ The format is (FUNCTION ARGS...).")
157 (let ((location 157 (let ((location
158 (find-function-search-for-symbol fun nil file))) 158 (find-function-search-for-symbol fun nil file)))
159 (pop-to-buffer (car location)) 159 (pop-to-buffer (car location))
160 (goto-char (cdr location)))) 160 (when (cdr location)
161 (goto-char (cdr location)))))
161 'help-echo (purecopy "mouse-2, RET: find function's definition")) 162 'help-echo (purecopy "mouse-2, RET: find function's definition"))
162 163
163(define-button-type 'help-variable-def 164(define-button-type 'help-variable-def
@@ -167,7 +168,8 @@ The format is (FUNCTION ARGS...).")
167 (setq file (help-C-file-name var 'var))) 168 (setq file (help-C-file-name var 'var)))
168 (let ((location (find-variable-noselect var file))) 169 (let ((location (find-variable-noselect var file)))
169 (pop-to-buffer (car location)) 170 (pop-to-buffer (car location))
170 (goto-char (cdr location)))) 171 (when (cdr location)
172 (goto-char (cdr location)))))
171 'help-echo (purecopy "mouse-2, RET: find variable's definition")) 173 'help-echo (purecopy "mouse-2, RET: find variable's definition"))
172 174
173(define-button-type 'help-face-def 175(define-button-type 'help-face-def
@@ -179,7 +181,8 @@ The format is (FUNCTION ARGS...).")
179 (let ((location 181 (let ((location
180 (find-function-search-for-symbol fun 'defface file))) 182 (find-function-search-for-symbol fun 'defface file)))
181 (pop-to-buffer (car location)) 183 (pop-to-buffer (car location))
182 (goto-char (cdr location)))) 184 (when (cdr location)
185 (goto-char (cdr location)))))
183 'help-echo (purecopy "mouse-2, RET: find face's definition")) 186 'help-echo (purecopy "mouse-2, RET: find face's definition"))
184 187
185 188