emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r110597: Fix bug #12395 with doc stri


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110597: Fix bug #12395 with doc strings silently omitted from DOC on MS-Windows.
Date: Sat, 20 Oct 2012 12:01:19 +0200
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110597
fixes bug: http://debbugs.gnu.org/12395
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2012-10-20 12:01:19 +0200
message:
  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.
modified:
  lib-src/ChangeLog
  lib-src/make-docfile.c
  lib-src/makefile.w32-in
  lisp/ChangeLog
  lisp/loadup.el
=== modified file 'lib-src/ChangeLog'
--- a/lib-src/ChangeLog 2012-10-17 21:13:20 +0000
+++ b/lib-src/ChangeLog 2012-10-20 10:01:19 +0000
@@ -1,3 +1,12 @@
+2012-10-20  Eli Zaretskii  <address@hidden>
+
+       Prevent silent omission of doc strings from uncompile Lisp files.
+       * 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.
+
+       * makefile.w32-in (lisp1, lisp2): Name .elc files wherever they
+       exist.  (Bug#12395)
+
 2012-10-17  Eli Zaretskii  <address@hidden>
 
        * ntlib.c: Include <mbstring.h>, to avoid compiler warning about

=== modified file 'lib-src/make-docfile.c'
--- a/lib-src/make-docfile.c    2012-10-01 14:22:23 +0000
+++ b/lib-src/make-docfile.c    2012-10-20 10:01:19 +0000
@@ -1025,9 +1025,9 @@
  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 @@
   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)

=== modified file 'lib-src/makefile.w32-in'
--- a/lib-src/makefile.w32-in   2012-10-08 12:21:04 +0000
+++ b/lib-src/makefile.w32-in   2012-10-20 10:01:19 +0000
@@ -209,38 +209,38 @@
        $(lispsource)emacs-lisp/map-ynp.elc \
        $(lispsource)menu-bar.elc \
        $(lispsource)international/mule.elc \
-       $(lispsource)international/mule-conf.el \
+       $(lispsource)international/mule-conf.elc \
        $(lispsource)international/mule-cmds.elc \
        $(lispsource)international/characters.elc \
        $(lispsource)international/charprop.el \
        $(lispsource)case-table.elc
 
 lisp2 = \
-       $(lispsource)language/chinese.el \
-       $(lispsource)language/cyrillic.el \
-       $(lispsource)language/indian.el \
-       $(lispsource)language/sinhala.el \
-       $(lispsource)language/english.el \
+       $(lispsource)language/chinese.elc \
+       $(lispsource)language/cyrillic.elc \
+       $(lispsource)language/indian.elc \
+       $(lispsource)language/sinhala.elc \
+       $(lispsource)language/english.elc \
        $(lispsource)language/ethiopic.elc \
        $(lispsource)language/european.elc \
-       $(lispsource)language/czech.el \
-       $(lispsource)language/slovak.el \
-       $(lispsource)language/romanian.el \
-       $(lispsource)language/greek.el \
+       $(lispsource)language/czech.elc \
+       $(lispsource)language/slovak.elc \
+       $(lispsource)language/romanian.elc \
+       $(lispsource)language/greek.elc \
        $(lispsource)language/hebrew.elc \
-       $(lispsource)language/japanese.el \
-       $(lispsource)language/korean.el \
-       $(lispsource)language/lao.el \
-       $(lispsource)language/cham.el \
-       $(lispsource)language/tai-viet.el \
-       $(lispsource)language/thai.el \
+       $(lispsource)language/japanese.elc \
+       $(lispsource)language/korean.elc \
+       $(lispsource)language/lao.elc \
+       $(lispsource)language/cham.elc \
+       $(lispsource)language/tai-viet.elc \
+       $(lispsource)language/thai.elc \
        $(lispsource)language/tibetan.elc \
-       $(lispsource)language/vietnamese.el \
-       $(lispsource)language/misc-lang.el \
-       $(lispsource)language/utf-8-lang.el \
-       $(lispsource)language/georgian.el \
-       $(lispsource)language/khmer.el \
-       $(lispsource)language/burmese.el \
+       $(lispsource)language/vietnamese.elc \
+       $(lispsource)language/misc-lang.elc \
+       $(lispsource)language/utf-8-lang.elc \
+       $(lispsource)language/georgian.elc \
+       $(lispsource)language/khmer.elc \
+       $(lispsource)language/burmese.elc \
        $(lispsource)register.elc \
        $(lispsource)replace.elc \
        $(lispsource)simple.elc \
@@ -266,7 +266,7 @@
        $(WINDOW_SUPPORT) \
        $(lispsource)widget.elc \
        $(lispsource)window.elc \
-       $(lispsource)version.el
+       $(lispsource)version.elc
 
 # This is needed the first time we build the tree, since temacs.exe
 # does not exist yet, and the DOC rule needs it to rebuild DOC whenever

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-10-20 04:14:32 +0000
+++ b/lisp/ChangeLog    2012-10-20 10:01:19 +0000
@@ -1,3 +1,7 @@
+2012-10-20  Eli Zaretskii  <address@hidden>
+
+       * loadup.el: Update comment about uncompiled Lisp files.  (Bug#12395)
+
 2012-10-20  Jay Belanger  <address@hidden>
 
        * calc/calc-units.el (math-extract-units): Properly extract powers

=== modified file 'lisp/loadup.el'
--- a/lisp/loadup.el    2012-09-17 12:07:36 +0000
+++ b/lisp/loadup.el    2012-10-20 10:01:19 +0000
@@ -38,7 +38,8 @@
 ;; doc strings in the dumped Emacs.)  Because of this:
 
 ;; ii) If the file is loaded uncompiled, it should (where possible)
-;; obey the doc-string conventions expected by make-docfile.
+;; obey the doc-string conventions expected by make-docfile.  It
+;; should also be added to the uncompiled[] list in make-docfile.c.
 
 ;;; Code:
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]