summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2004-11-09 08:20:44 +0000
committerJan Djärv <jan.h.d@swipnet.se>2004-11-09 08:20:44 +0000
commit84c2fd9f350c15f5f742646bd3480be7e6988230 (patch)
tree3839d2779f30b105d97e4cd5dafa1d9e9c11cfb0 /lisp
parentd87a9ab8930c5460b3ca510083679351c4178a7c (diff)
downloademacs-84c2fd9f350c15f5f742646bd3480be7e6988230.tar.gz
emacs-84c2fd9f350c15f5f742646bd3480be7e6988230.tar.bz2
emacs-84c2fd9f350c15f5f742646bd3480be7e6988230.zip
* help-fns.el (help-C-file-name): File name must be in build-files
to be returned.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/help-fns.el7
2 files changed, 11 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 767b00eae77..90dcebcc23e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2004-11-09 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
+
+ * help-fns.el (help-C-file-name): File name must be in build-files
+ to be returned.
+
2004-11-09 Jay Belanger <belanger@truman.edu>
* calc/calc.el (calc-mode-hook, calc-trail-mode-hook)
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 8f2a1b7fa6e..c06a7b1ee73 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -228,9 +228,14 @@ KIND should be `var' for a variable or `subr' for a subroutine."
(if (eobp)
(insert-file-contents-literally
(expand-file-name internal-doc-file-name doc-directory)))
- (search-forward (concat "" name "\n"))
+ (let ((file (catch 'loop
+ (while t
+ (let ((pnt (search-forward (concat "" name "\n"))))
(re-search-backward "S\\(.*\\)")
(let ((file (match-string 1)))
+ (if (member file build-files)
+ (throw 'loop file)
+ (goto-char pnt))))))))
(if (string-match "\\.\\(o\\|obj\\)\\'" file)
(setq file (replace-match ".c" t t file)))
(if (string-match "\\.c\\'" file)