From: Jan Djärv Date: Tue, 9 Nov 2004 08:20:44 +0000 (+0000) Subject: * help-fns.el (help-C-file-name): File name must be in build-files X-Git-Tag: ttn-vms-21-2-B4~4073 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=84c2fd9f350c15f5f742646bd3480be7e6988230;p=emacs.git * help-fns.el (help-C-file-name): File name must be in build-files to be returned. --- 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 + + * help-fns.el (help-C-file-name): File name must be in build-files + to be returned. + 2004-11-09 Jay Belanger * 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)