diff -c src/Makefile.in.~1.303.~ src/Makefile.in Index: src/Makefile.in *** src/Makefile.in.~1.303.~ 2004-10-20 17:44:02.000000000 +0200 --- src/Makefile.in 2004-10-30 19:46:52.000000000 +0200 *************** *** 943,949 **** #define MAKE_PARALLEL #endif ! temacs${EXEEXT}: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args${EXEEXT} $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${TEMACS_LDFLAGS}) $(LDFLAGS) \ -o temacs ${STARTFILES} ${obj} ${otherobj} \ OBJECTS_MACHINE ${LIBES} --- 943,950 ---- #define MAKE_PARALLEL #endif ! temacs${EXEEXT}: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args${EXEEXT} buildobj.lst ! echo "${obj} ${otherobj} " OBJECTS_MACHINE > buildobj.lst $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${TEMACS_LDFLAGS}) $(LDFLAGS) \ -o temacs ${STARTFILES} ${obj} ${otherobj} \ OBJECTS_MACHINE ${LIBES} *************** *** 1272,1277 **** --- 1273,1279 ---- rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a rm -f ../etc/DOC rm -f bootstrap-emacs${EXEEXT} + rm -f buildobj.lst clean: mostlyclean rm -f emacs-*${EXEEXT} emacs${EXEEXT} /**/# This is used in making a distribution. diff -c src/doc.c.~1.108.~ src/doc.c Index: src/doc.c *** src/doc.c.~1.108.~ 2004-10-28 22:22:33.000000000 +0200 --- src/doc.c 2004-10-30 19:25:02.000000000 +0200 *************** *** 51,56 **** --- 51,59 ---- Lisp_Object Qfunction_documentation; + /* A list of files used to build this Emacs binary. */ + static Lisp_Object Vbuild_files; + extern Lisp_Object Voverriding_local_map; /* For VMS versions with limited file name syntax, *************** *** 581,586 **** --- 584,590 ---- register char *p, *end; Lisp_Object sym; char *name; + int skip_file = 0; CHECK_STRING (filename); *************** *** 617,622 **** --- 621,657 ---- strcpy (name, sys_translate_unix (name)); #endif /* VMS4_4 */ #endif /* VMS */ + + if (NILP (Vbuild_files)) + { + size_t cp_size = 0; + size_t to_read; + int nr_read; + char *cp = NULL; + + fd = emacs_open ("buildobj.lst", O_RDONLY, 0); + if (fd < 0) + report_file_error ("Opening file buildobj.lst", Qnil); + + filled = 0; + for (;;) + { + cp_size += 1024; + to_read = cp_size - 1 - filled; + cp = xrealloc (cp, cp_size); + nr_read = emacs_read (fd, &cp[filled], to_read); + filled += nr_read; + if (nr_read < to_read) + break; + } + + cp[filled] = 0; + + Vbuild_files = Feval (Fcons (intern ("split-string"), + Fcons (build_string (cp), Qnil))); + emacs_close (fd); + xfree (cp); + } fd = emacs_open (name, O_RDONLY, 0); if (fd < 0) *************** *** 640,649 **** if (p != end) { end = (char *) index (p, '\n'); sym = oblookup (Vobarray, p + 2, multibyte_chars_in_text (p + 2, end - p - 2), end - p - 2); ! if (SYMBOLP (sym)) { /* Attach a docstring to a variable? */ if (p[1] == 'V') --- 675,699 ---- if (p != end) { end = (char *) index (p, '\n'); + + /* See if this is a file name, and if it is a file in build-files. */ + if (p[1] == 'S' && end - p > 4 && end[-2] == '.' && end[-1] == 'o') + { + int len = end - p - 2; + char *fromfile = alloca (len + 1); + strncpy (fromfile, &p[2], len); + fromfile[len] = 0; + + if (EQ (Fmember (build_string (fromfile), Vbuild_files), Qnil)) + skip_file = 1; + else + skip_file = 0; + } + sym = oblookup (Vobarray, p + 2, multibyte_chars_in_text (p + 2, end - p - 2), end - p - 2); ! if (! skip_file && SYMBOLP (sym)) { /* Attach a docstring to a variable? */ if (p[1] == 'V') *************** *** 919,924 **** --- 969,978 ---- doc: /* Name of file containing documentation strings of built-in symbols. */); Vdoc_file_name = Qnil; + DEFVAR_LISP ("build-files", &Vbuild_files, + doc: /* A list of files used to build this Emacs binary. */); + Vbuild_files = Qnil; + defsubr (&Sdocumentation); defsubr (&Sdocumentation_property); defsubr (&Ssnarf_documentation); diff -c lisp/help-fns.el.~1.57.~ lisp/help-fns.el Index: lisp/help-fns.el *** lisp/help-fns.el.~1.57.~ 2004-11-01 09:25:38.000000000 +0100 --- lisp/help-fns.el 2004-11-01 09:21:49.000000000 +0100 *************** *** 228,236 **** (if (eobp) (insert-file-contents-literally (expand-file-name internal-doc-file-name doc-directory))) ! (search-forward (concat "" name "\n")) ! (re-search-backward "S\\(.*\\)") ! (let ((file (match-string 1))) (if (string-match "\\.\\(o\\|obj\\)\\'" file) (setq file (replace-match ".c" t t file))) (if (string-match "\\.c\\'" file) --- 228,241 ---- (if (eobp) (insert-file-contents-literally (expand-file-name internal-doc-file-name doc-directory))) ! (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)