diff options
author | Eli Zaretskii <eliz@gnu.org> | 2012-10-20 12:01:19 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2012-10-20 12:01:19 +0200 |
commit | 2068905bb73c32afb4bb5e908b438fbd8b80bb64 (patch) | |
tree | 64786383b45240c0f06d16812d3c89411a7f5dd5 /lib-src/make-docfile.c | |
parent | 4c9e95500fc913ad934e65c6625114e3f5532078 (diff) |
Fix bug #12395 with doc strings silently omitted from DOC on MS-Windows.
lib-src/make-docfile.c (scan_lisp_file): Barf if called with a .el file
other than one of a small list of supported un-compiled files.
lib-src/makefile.w32-in (lisp1, lisp2): Name .elc files wherever they
exist.
lisp/loadup.el: Update comment about uncompiled Lisp files.
Diffstat (limited to 'lib-src/make-docfile.c')
-rw-r--r-- | lib-src/make-docfile.c | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 411b705786..555a563d74 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -1025,9 +1025,9 @@ scan_c_file (char *filename, const char *mode) arglist, but the doc string must still have a backslash and newline immediately after the double quote. The only source files that must follow this convention are preloaded - uncompiled ones like loaddefs.el and bindings.el; aside - from that, it is always the .elc file that we look at, and they are no - problem because byte-compiler output follows this convention. + uncompiled ones like loaddefs.el; aside from that, it is always the .elc + file that we should look at, and they are no problem because byte-compiler + output follows this convention. The NAME and DOCSTRING are output. NAME is preceded by `F' for a function or `V' for a variable. An entry is output only if DOCSTRING has \ newline just after the opening ". @@ -1104,9 +1104,36 @@ scan_lisp_file (const char *filename, const char *mode) FILE *infile; register int c; char *saved_string = 0; + /* These are the only files that are loaded uncompiled, and must + follow the conventions of the doc strings expected by this + function. These conventions are automatically followed by the + byte compiler when it produces the .elc files. */ + static struct { + const char *fn; + size_t fl; + } uncompiled[] = { + { "loaddefs.el", sizeof("loaddefs.el") - 1 }, + { "loadup.el", sizeof("loadup.el") - 1 }, + { "charprop.el", sizeof("charprop.el") - 1 } + }; + int i, match; + size_t flen = strlen (filename); if (generate_globals) fatal ("scanning lisp file when -g specified", 0); + if (!strcmp (filename + flen - 3, ".el")) + { + for (i = 0, match = 0; i < sizeof(uncompiled)/sizeof(uncompiled[0]); i++) + { + if (!strcmp (filename + flen - uncompiled[i].fl, uncompiled[i].fn)) + { + match = 1; + break; + } + } + if (!match) + fatal ("uncompiled lisp file %s is not supported", filename); + } infile = fopen (filename, mode); if (infile == NULL) |