From 84c2fd9f350c15f5f742646bd3480be7e6988230 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Tue, 9 Nov 2004 08:20:44 +0000 Subject: [PATCH] * help-fns.el (help-C-file-name): File name must be in build-files to be returned. --- lisp/ChangeLog | 5 +++++ lisp/help-fns.el | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) 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) -- 2.39.5