diff options
| author | Eli Zaretskii | 2012-10-20 12:01:19 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2012-10-20 12:01:19 +0200 |
| commit | 2068905bb73c32afb4bb5e908b438fbd8b80bb64 (patch) | |
| tree | 64786383b45240c0f06d16812d3c89411a7f5dd5 /lib-src | |
| parent | 4c9e95500fc913ad934e65c6625114e3f5532078 (diff) | |
| download | emacs-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')
| -rw-r--r-- | lib-src/ChangeLog | 9 | ||||
| -rw-r--r-- | lib-src/make-docfile.c | 33 | ||||
| -rw-r--r-- | lib-src/makefile.w32-in | 46 |
3 files changed, 62 insertions, 26 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 1f28000e110..07fd4658172 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2012-10-20 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | Prevent silent omission of doc strings from uncompile Lisp files. | ||
| 4 | * make-docfile.c (scan_lisp_file): Barf if called with a .el file | ||
| 5 | other than one of a small list of supported un-compiled files. | ||
| 6 | |||
| 7 | * makefile.w32-in (lisp1, lisp2): Name .elc files wherever they | ||
| 8 | exist. (Bug#12395) | ||
| 9 | |||
| 1 | 2012-10-17 Eli Zaretskii <eliz@gnu.org> | 10 | 2012-10-17 Eli Zaretskii <eliz@gnu.org> |
| 2 | 11 | ||
| 3 | * ntlib.c: Include <mbstring.h>, to avoid compiler warning about | 12 | * ntlib.c: Include <mbstring.h>, to avoid compiler warning about |
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) |
diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index ecc5fb866b3..640e8a7c468 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in | |||
| @@ -209,38 +209,38 @@ lisp1= \ | |||
| 209 | $(lispsource)emacs-lisp/map-ynp.elc \ | 209 | $(lispsource)emacs-lisp/map-ynp.elc \ |
| 210 | $(lispsource)menu-bar.elc \ | 210 | $(lispsource)menu-bar.elc \ |
| 211 | $(lispsource)international/mule.elc \ | 211 | $(lispsource)international/mule.elc \ |
| 212 | $(lispsource)international/mule-conf.el \ | 212 | $(lispsource)international/mule-conf.elc \ |
| 213 | $(lispsource)international/mule-cmds.elc \ | 213 | $(lispsource)international/mule-cmds.elc \ |
| 214 | $(lispsource)international/characters.elc \ | 214 | $(lispsource)international/characters.elc \ |
| 215 | $(lispsource)international/charprop.el \ | 215 | $(lispsource)international/charprop.el \ |
| 216 | $(lispsource)case-table.elc | 216 | $(lispsource)case-table.elc |
| 217 | 217 | ||
| 218 | lisp2 = \ | 218 | lisp2 = \ |
| 219 | $(lispsource)language/chinese.el \ | 219 | $(lispsource)language/chinese.elc \ |
| 220 | $(lispsource)language/cyrillic.el \ | 220 | $(lispsource)language/cyrillic.elc \ |
| 221 | $(lispsource)language/indian.el \ | 221 | $(lispsource)language/indian.elc \ |
| 222 | $(lispsource)language/sinhala.el \ | 222 | $(lispsource)language/sinhala.elc \ |
| 223 | $(lispsource)language/english.el \ | 223 | $(lispsource)language/english.elc \ |
| 224 | $(lispsource)language/ethiopic.elc \ | 224 | $(lispsource)language/ethiopic.elc \ |
| 225 | $(lispsource)language/european.elc \ | 225 | $(lispsource)language/european.elc \ |
| 226 | $(lispsource)language/czech.el \ | 226 | $(lispsource)language/czech.elc \ |
| 227 | $(lispsource)language/slovak.el \ | 227 | $(lispsource)language/slovak.elc \ |
| 228 | $(lispsource)language/romanian.el \ | 228 | $(lispsource)language/romanian.elc \ |
| 229 | $(lispsource)language/greek.el \ | 229 | $(lispsource)language/greek.elc \ |
| 230 | $(lispsource)language/hebrew.elc \ | 230 | $(lispsource)language/hebrew.elc \ |
| 231 | $(lispsource)language/japanese.el \ | 231 | $(lispsource)language/japanese.elc \ |
| 232 | $(lispsource)language/korean.el \ | 232 | $(lispsource)language/korean.elc \ |
| 233 | $(lispsource)language/lao.el \ | 233 | $(lispsource)language/lao.elc \ |
| 234 | $(lispsource)language/cham.el \ | 234 | $(lispsource)language/cham.elc \ |
| 235 | $(lispsource)language/tai-viet.el \ | 235 | $(lispsource)language/tai-viet.elc \ |
| 236 | $(lispsource)language/thai.el \ | 236 | $(lispsource)language/thai.elc \ |
| 237 | $(lispsource)language/tibetan.elc \ | 237 | $(lispsource)language/tibetan.elc \ |
| 238 | $(lispsource)language/vietnamese.el \ | 238 | $(lispsource)language/vietnamese.elc \ |
| 239 | $(lispsource)language/misc-lang.el \ | 239 | $(lispsource)language/misc-lang.elc \ |
| 240 | $(lispsource)language/utf-8-lang.el \ | 240 | $(lispsource)language/utf-8-lang.elc \ |
| 241 | $(lispsource)language/georgian.el \ | 241 | $(lispsource)language/georgian.elc \ |
| 242 | $(lispsource)language/khmer.el \ | 242 | $(lispsource)language/khmer.elc \ |
| 243 | $(lispsource)language/burmese.el \ | 243 | $(lispsource)language/burmese.elc \ |
| 244 | $(lispsource)register.elc \ | 244 | $(lispsource)register.elc \ |
| 245 | $(lispsource)replace.elc \ | 245 | $(lispsource)replace.elc \ |
| 246 | $(lispsource)simple.elc \ | 246 | $(lispsource)simple.elc \ |
| @@ -266,7 +266,7 @@ lisp2 = \ | |||
| 266 | $(WINDOW_SUPPORT) \ | 266 | $(WINDOW_SUPPORT) \ |
| 267 | $(lispsource)widget.elc \ | 267 | $(lispsource)widget.elc \ |
| 268 | $(lispsource)window.elc \ | 268 | $(lispsource)window.elc \ |
| 269 | $(lispsource)version.el | 269 | $(lispsource)version.elc |
| 270 | 270 | ||
| 271 | # This is needed the first time we build the tree, since temacs.exe | 271 | # This is needed the first time we build the tree, since temacs.exe |
| 272 | # does not exist yet, and the DOC rule needs it to rebuild DOC whenever | 272 | # does not exist yet, and the DOC rule needs it to rebuild DOC whenever |