changeset 58069:42823717f9da

* help-fns.el (help-C-file-name): File name must be in build-files to be returned.
author Jan Djärv <jan.h.d@swipnet.se>
date Tue, 09 Nov 2004 08:20:44 +0000
parents df00cdb75fc6
children 3d3c06296275
files lisp/ChangeLog lisp/help-fns.el
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Nov 09 08:19:51 2004 +0000
+++ b/lisp/ChangeLog	Tue Nov 09 08:20:44 2004 +0000
@@ -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)
--- a/lisp/help-fns.el	Tue Nov 09 08:19:51 2004 +0000
+++ b/lisp/help-fns.el	Tue Nov 09 08:20:44 2004 +0000
@@ -228,9 +228,14 @@
       (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)