aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src/make-docfile.c
diff options
context:
space:
mode:
authorEli Zaretskii2012-10-20 12:01:19 +0200
committerEli Zaretskii2012-10-20 12:01:19 +0200
commit2068905bb73c32afb4bb5e908b438fbd8b80bb64 (patch)
tree64786383b45240c0f06d16812d3c89411a7f5dd5 /lib-src/make-docfile.c
parent4c9e95500fc913ad934e65c6625114e3f5532078 (diff)
downloademacs-2068905bb73c32afb4bb5e908b438fbd8b80bb64.tar.gz
emacs-2068905bb73c32afb4bb5e908b438fbd8b80bb64.zip
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.c33
1 files changed, 30 insertions, 3 deletions
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index 411b7057861..555a563d748 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)
1025 arglist, but the doc string must still have a backslash and newline 1025 arglist, but the doc string must still have a backslash and newline
1026 immediately after the double quote. 1026 immediately after the double quote.
1027 The only source files that must follow this convention are preloaded 1027 The only source files that must follow this convention are preloaded
1028 uncompiled ones like loaddefs.el and bindings.el; aside 1028 uncompiled ones like loaddefs.el; aside from that, it is always the .elc
1029 from that, it is always the .elc file that we look at, and they are no 1029 file that we should look at, and they are no problem because byte-compiler
1030 problem because byte-compiler output follows this convention. 1030 output follows this convention.
1031 The NAME and DOCSTRING are output. 1031 The NAME and DOCSTRING are output.
1032 NAME is preceded by `F' for a function or `V' for a variable. 1032 NAME is preceded by `F' for a function or `V' for a variable.
1033 An entry is output only if DOCSTRING has \ newline just after the opening ". 1033 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)
1104 FILE *infile; 1104 FILE *infile;
1105 register int c; 1105 register int c;
1106 char *saved_string = 0; 1106 char *saved_string = 0;
1107 /* These are the only files that are loaded uncompiled, and must
1108 follow the conventions of the doc strings expected by this
1109 function. These conventions are automatically followed by the
1110 byte compiler when it produces the .elc files. */
1111 static struct {
1112 const char *fn;
1113 size_t fl;
1114 } uncompiled[] = {
1115 { "loaddefs.el", sizeof("loaddefs.el") - 1 },
1116 { "loadup.el", sizeof("loadup.el") - 1 },
1117 { "charprop.el", sizeof("charprop.el") - 1 }
1118 };
1119 int i, match;
1120 size_t flen = strlen (filename);
1107 1121
1108 if (generate_globals) 1122 if (generate_globals)
1109 fatal ("scanning lisp file when -g specified", 0); 1123 fatal ("scanning lisp file when -g specified", 0);
1124 if (!strcmp (filename + flen - 3, ".el"))
1125 {
1126 for (i = 0, match = 0; i < sizeof(uncompiled)/sizeof(uncompiled[0]); i++)
1127 {
1128 if (!strcmp (filename + flen - uncompiled[i].fl, uncompiled[i].fn))
1129 {
1130 match = 1;
1131 break;
1132 }
1133 }
1134 if (!match)
1135 fatal ("uncompiled lisp file %s is not supported", filename);
1136 }
1110 1137
1111 infile = fopen (filename, mode); 1138 infile = fopen (filename, mode);
1112 if (infile == NULL) 1139 if (infile == NULL)