emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r108435: Merge from emacs-24; up to r


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108435: Merge from emacs-24; up to r108025
Date: Thu, 31 May 2012 14:08:06 +0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108435 [merge]
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Thu 2012-05-31 14:08:06 +0800
message:
  Merge from emacs-24; up to r108025
modified:
  lib-src/ChangeLog
  lib-src/makefile.w32-in
  lisp/ChangeLog
  lisp/desktop.el
  lisp/emacs-lisp/bytecomp.el
  nt/ChangeLog
  nt/configure.bat
  nt/gmake.defs
  nt/nmake.defs
  src/ChangeLog
  src/charset.c
  src/doc.c
  src/keymap.c
  src/keymap.h
  src/ralloc.c
  src/search.c
  src/xdisp.c
=== modified file 'lib-src/ChangeLog'
--- a/lib-src/ChangeLog 2012-05-30 03:59:42 +0000
+++ b/lib-src/ChangeLog 2012-05-31 06:08:06 +0000
@@ -1,3 +1,9 @@
+2012-05-31  Eli Zaretskii  <address@hidden>
+
+       * makefile.w32-in ($(BLD)/emacsclientw.exe): Use $(MWINDOWS)
+       instead of a literal -mwindows, which is not supported by MSVC.
+       (Bug#11405)
+
 2012-05-30  Stefan Monnier  <address@hidden>
 
        * make-docfile.c: Improve comment style.

=== modified file 'lib-src/makefile.w32-in'
--- a/lib-src/makefile.w32-in   2012-05-22 16:20:27 +0000
+++ b/lib-src/makefile.w32-in   2012-05-31 06:06:42 +0000
@@ -65,7 +65,7 @@
 
 $(BLD)/emacsclientw.exe:       $(ECLIENTOBJS) $(CLIENTRES)
 # put wsock32.lib before $(LIBS) to ensure we don't link to ws2_32.lib
-               $(LINK) $(LINK_OUT)$@ $(CLIENTRES) -mwindows $(LINK_FLAGS) 
$(ECLIENTOBJS) $(WSOCK32) $(USER32) $(COMCTL32) $(LIBS)
+               $(LINK) $(LINK_OUT)$@ $(CLIENTRES) $(MWINDOWS) $(LINK_FLAGS) 
$(ECLIENTOBJS) $(WSOCK32) $(USER32) $(COMCTL32) $(LIBS)
 
 $(BLD)/emacsclient.$(O):       emacsclient.c
                $(CC) $(CFLAGS) $(ECLIENT_CFLAGS) $(CC_OUT)$@ emacsclient.c

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-05-31 01:41:17 +0000
+++ b/lisp/ChangeLog    2012-05-31 06:06:42 +0000
@@ -1,5 +1,21 @@
 2012-05-31  Stefan Monnier  <address@hidden>
 
+       * emacs-lisp/bytecomp.el (byte-compile-fix-header): Handle
+       arbitrary file name lengths (Bug#11585).
+
+2012-05-31  Martin Rudalics  <address@hidden>
+
+       * desktop.el (desktop-read): Clear previous and next buffers for
+       all windows and bury *Messages* buffer (bug#11556).
+
+2012-05-31  Eli Zaretskii  <address@hidden>
+
+       * mail/sendmail.el (mail-yank-region): Recognize
+       rmail-yank-current-message in addition to insert-buffer.  Fixes
+       mail-mode's "C-c C-r" that otherwise does nothing when invoked in
+
+2012-05-31  Stefan Monnier  <address@hidden>
+
        Add `declare' for `defun'.  Align `defmacro's with it.
        * emacs-lisp/easy-mmode.el (define-minor-mode)
        (define-globalized-minor-mode): Don't autoload the var definitions.

=== modified file 'lisp/desktop.el'
--- a/lisp/desktop.el   2012-05-13 03:05:06 +0000
+++ b/lisp/desktop.el   2012-05-31 06:06:42 +0000
@@ -1020,6 +1020,18 @@
                         (format ", %d to restore lazily"
                                 (length desktop-buffer-args-list))
                       ""))
+           ;; Bury the *Messages* buffer to not reshow it when burying
+           ;; the buffer we switched to above.
+           (when (buffer-live-p (get-buffer "*Messages*"))
+             (bury-buffer "*Messages*"))
+           ;; Clear all windows' previous and next buffers, these have
+           ;; been corrupted by the `switch-to-buffer' calls in
+           ;; `desktop-restore-file-buffer' (bug#11556).  This is a
+           ;; brute force fix and should be replaced by a more subtle
+           ;; strategy eventually.
+           (walk-window-tree (lambda (window)
+                               (set-window-prev-buffers window nil)
+                               (set-window-next-buffers window nil)))
            t))
       ;; No desktop file found.
       (desktop-clear)

=== modified file 'lisp/emacs-lisp/bytecomp.el'
--- a/lisp/emacs-lisp/bytecomp.el       2012-05-30 03:59:42 +0000
+++ b/lisp/emacs-lisp/bytecomp.el       2012-05-31 06:06:42 +0000
@@ -1937,7 +1937,7 @@
             (byte-compile-fix-header byte-compile-current-file))))
      byte-compile--outbuffer)))
 
-(defun byte-compile-fix-header (filename)
+(defun byte-compile-fix-header (_filename)
   "If the current buffer has any multibyte characters, insert a version test."
   (when (< (point-max) (position-bytes (point-max)))
     (goto-char (point-min))
@@ -1962,12 +1962,10 @@
        ;; don't try to check the version number.
        "     (< (aref emacs-version (1- (length emacs-version))) ?A)\n"
        (format "     (string-lessp emacs-version \"%s\")\n" minimum-version)
-       "     (error \"`"
-       ;; prin1-to-string is used to quote backslashes.
-       (substring (prin1-to-string (file-name-nondirectory filename))
-                 1 -1)
-       (format "' was compiled for Emacs %s or later\"))\n\n"
-              minimum-version))
+       ;; Because the header must fit in a fixed width, we cannot
+       ;; insert arbitrary-length file names (Bug#11585).
+       "     (error \"`%s' was compiled for "
+       (format "Emacs %s or later\" load-file-name))\n\n" minimum-version))
       ;; Now compensate for any change in size, to make sure all
       ;; positions in the file remain valid.
       (setq delta (- (point-max) old-header-end))

=== modified file 'nt/ChangeLog'
--- a/nt/ChangeLog      2012-05-28 17:00:18 +0000
+++ b/nt/ChangeLog      2012-05-31 06:06:42 +0000
@@ -1,3 +1,20 @@
+2012-05-31  Eli Zaretskii  <address@hidden>
+
+       * configure.bat (genmakefiles): Move the redirection away from the
+       end of the command, to avoid excess whitespace at the end of Make
+       variables created at configure time, and also avoid things like
+       "FOO1>>config.settings", where "1" gets interpreted as the file
+       descriptor and eaten up.  This fixes breakage introduced by the
+       last change, without reintroducing the bug fixed by that change.
+
+2012-05-31  Eli Zaretskii  <address@hidden>
+
+       * nmake.defs (MWINDOWS): Define as
+       "-subsystem:windows -entry:mainCRTStartup".  Suggested by Fabrice
+       Popineau <address@hidden>.  (Bug#11405)
+
+       * gmake.defs (MWINDOWS): Define as "-mwindows".
+
 2012-05-28  Eli Zaretskii  <address@hidden>
 
        * config.nt (HAVE_SYSINFO): Remove; unused.

=== modified file 'nt/configure.bat'
--- a/nt/configure.bat  2012-05-27 01:06:44 +0000
+++ b/nt/configure.bat  2012-05-31 06:06:42 +0000
@@ -753,29 +753,36 @@
 if %COMPILER% == cl set MAKECMD=nmake
 
 rem   Pass on chosen settings to makefiles.
-rem   NB. Be very careful to not have a space before redirection symbols
-rem   except when there is a preceding digit, when a space is required.
 rem
+rem   The weird place we put the redirection is to make sure no extra
+rem   whitespace winds up at the end of the Make variables, since some
+rem   variables, e.g. INSTALL_DIR, cannot stand that.  Yes, echo will
+rem   write the blanks between the end of command arguments and the
+rem   redirection symbol to the file.  OTOH, we cannot put the
+rem   redirection immediately after the last character of the command,
+rem   because environment variable expansion can yield a digit there,
+rem   which will then be misinterpreted as the file descriptor to
+rem   redirect...
 echo # Start of settings from configure.bat >config.settings
-echo COMPILER=%COMPILER% >>config.settings
-if not "(%mf%)" == "()" echo MCPU_FLAG=%mf% >>config.settings
-if not "(%dbginfo%)" == "()" echo DEBUG_INFO=%dbginfo% >>config.settings
-if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings
-if (%noopt%) == (Y) echo NOOPT=1 >>config.settings
-if (%enablechecking%) == (Y) echo ENABLECHECKS=1 >>config.settings
-if (%profile%) == (Y) echo PROFILE=1 >>config.settings
-if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings
-if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix% >>config.settings
-if not "(%distfiles%)" == "()" echo DIST_FILES=%distfiles% >>config.settings
+>>config.settings echo COMPILER=%COMPILER%
+if not "(%mf%)" == "()" >>config.settings echo MCPU_FLAG=%mf%
+if not "(%dbginfo%)" == "()" >>config.settings echo DEBUG_INFO=%dbginfo%
+if (%nodebug%) == (Y) >>config.settings echo NODEBUG=1
+if (%noopt%) == (Y) >>config.settings echo NOOPT=1
+if (%enablechecking%) == (Y) >>config.settings echo ENABLECHECKS=1
+if (%profile%) == (Y) >>config.settings echo PROFILE=1
+if (%nocygwin%) == (Y) >>config.settings echo NOCYGWIN=1
+if not "(%prefix%)" == "()" >>config.settings echo INSTALL_DIR=%prefix%
+if not "(%distfiles%)" == "()" >>config.settings echo DIST_FILES=%distfiles%
 rem We go thru docflags because usercflags could be "-DFOO=bar" -something
 rem and the if command cannot cope with this
 for %%v in (%usercflags%) do if not (%%v)==() set docflags=Y
-if (%docflags%)==(Y) echo USER_CFLAGS=%usercflags% >>config.settings
-if (%docflags%)==(Y) echo ESC_USER_CFLAGS=%escusercflags% >>config.settings
+if (%docflags%)==(Y) >>config.settings echo USER_CFLAGS=%usercflags%
+if (%docflags%)==(Y) >>config.settings echo ESC_USER_CFLAGS=%escusercflags%
 for %%v in (%userldflags%) do if not (%%v)==() set doldflags=Y
-if (%doldflags%)==(Y) echo USER_LDFLAGS=%userldflags% >>config.settings
+if (%doldflags%)==(Y) >>config.settings echo USER_LDFLAGS=%userldflags%
 for %%v in (%extrauserlibs%) do if not (%%v)==() set doextralibs=Y
-if (%doextralibs%)==(Y) echo USER_LIBS=%extrauserlibs% >>config.settings
+if (%doextralibs%)==(Y) >>config.settings echo USER_LIBS=%extrauserlibs%
 echo # End of settings from configure.bat>>config.settings
 echo. >>config.settings
 

=== modified file 'nt/gmake.defs'
--- a/nt/gmake.defs     2012-03-25 18:17:46 +0000
+++ b/nt/gmake.defs     2012-05-29 16:15:12 +0000
@@ -210,6 +210,8 @@
 CHECKING_CFLAGS        =
 endif
 
+MWINDOWS        = -mwindows
+
 CFLAGS          = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(CHECKING_CFLAGS) 
$(PROFILE_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)
 ESC_CFLAGS      = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(CHECKING_CFLAGS) 
$(PROFILE_CFLAGS) $(ESC_USER_CFLAGS) $(LOCAL_FLAGS)
 EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1

=== modified file 'nt/nmake.defs'
--- a/nt/nmake.defs     2012-03-25 18:17:46 +0000
+++ b/nt/nmake.defs     2012-05-29 16:15:12 +0000
@@ -151,6 +151,8 @@
 CHECKING_CFLAGS        =
 !endif
 
+MWINDOWS        = -subsystem:windows -entry:mainCRTStartup
+
 CFLAGS          = -I. $(ARCH_CFLAGS) \
                  $(DEBUG_CFLAGS) $(CHECKING_CFLAGS) $(USER_CFLAGS) 
$(LOCAL_FLAGS)
 ESC_CFLAGS      = -I. $(ARCH_CFLAGS) \

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-05-31 05:08:37 +0000
+++ b/src/ChangeLog     2012-05-31 06:06:42 +0000
@@ -1,3 +1,34 @@
+2012-05-31  Eli Zaretskii  <address@hidden>
+
+       * xdisp.c (handle_stop): Detect whether we have overlay strings
+       loaded by testing it->current.overlay_string_index to be
+       non-negative, instead of checking whether n_overlay_strings is
+       positive.  (Bug#11587)
+
+2012-05-31  Chong Yidong  <address@hidden>
+
+       * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
+
+       * doc.c (Fsubstitute_command_keys): Doc fix.
+
+2012-05-31  Eli Zaretskii  <address@hidden>
+
+       * search.c (search_buffer): Remove calls to
+       r_alloc_inhibit_buffer_relocation, as it is now called by
+       maybe_unify_char, which was the cause of relocation of buffer text
+       in bug#11519.
+
+2012-05-31  Eli Zaretskii  <address@hidden>
+
+       * charset.c (maybe_unify_char): Inhibit relocation of buffer text
+       for the duration of call to load_charset, to avoid problems with
+       callers of maybe_unify_char that access buffer text through C
+       pointers.
+
+       * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
+       decrement the inhibition flag, instead of just setting or
+       resetting it.
+
 2012-05-31  Paul Eggert  <address@hidden>
 
        Remove obsolete '#define static' cruft.

=== modified file 'src/charset.c'
--- a/src/charset.c     2012-04-09 22:54:59 +0000
+++ b/src/charset.c     2012-05-31 06:06:42 +0000
@@ -1633,6 +1633,12 @@
     return c;
 
   CHECK_CHARSET_GET_CHARSET (val, charset);
+#ifdef REL_ALLOC
+  /* The call to load_charset below can allocate memory, which screws
+     callers of this function through STRING_CHAR_* macros that hold C
+     pointers to buffer text, if REL_ALLOC is used.  */
+  r_alloc_inhibit_buffer_relocation (1);
+#endif
   load_charset (charset, 1);
   if (! inhibit_load_charset_map)
     {
@@ -1648,6 +1654,9 @@
       if (unified > 0)
        c = unified;
     }
+#ifdef REL_ALLOC
+  r_alloc_inhibit_buffer_relocation (0);
+#endif
   return c;
 }
 

=== modified file 'src/doc.c'
--- a/src/doc.c 2012-04-09 22:54:59 +0000
+++ b/src/doc.c 2012-05-31 06:06:42 +0000
@@ -705,18 +705,23 @@
 DEFUN ("substitute-command-keys", Fsubstitute_command_keys,
        Ssubstitute_command_keys, 1, 1, 0,
        doc: /* Substitute key descriptions for command names in STRING.
-Substrings of the form \\=\\[COMMAND] replaced by either: a keystroke
-sequence that will invoke COMMAND, or "M-x COMMAND" if COMMAND is not
-on any keys.
-Substrings of the form \\=\\{MAPVAR} are replaced by summaries
-\(made by `describe-bindings') of the value of MAPVAR, taken as a keymap.
-Substrings of the form \\=\\<MAPVAR> specify to use the value of MAPVAR
+Each substring of the form \\=\\[COMMAND] is replaced by either a
+keystroke sequence that invokes COMMAND, or "M-x COMMAND" if COMMAND
+is not on any keys.
+
+Each substring of the form \\=\\{MAPVAR} is replaced by a summary of
+the value of MAPVAR as a keymap.  This summary is similar to the one
+produced by `describe-bindings'.  The summary ends in two newlines
+\(used by the helper function `help-make-xrefs' to find the end of the
+summary).
+
+Each substring of the form \\=\\<MAPVAR> specifies the use of MAPVAR
 as the keymap for future \\=\\[COMMAND] substrings.
 \\=\\= quotes the following character and is discarded;
 thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ 
into the output.
 
-Returns original STRING if no substitutions were made.  Otherwise,
-a new string, without any text properties, is returned.  */)
+Return the original STRING if no substitutions are made.
+Otherwise, return a new string, without any text properties.  */)
   (Lisp_Object string)
 {
   char *buf;

=== modified file 'src/keymap.c'
--- a/src/keymap.c      2012-05-25 18:19:24 +0000
+++ b/src/keymap.c      2012-05-31 06:06:42 +0000
@@ -2996,9 +2996,9 @@
    If MENTION_SHADOW is nonzero, then when something is shadowed by SHADOW,
    don't omit it; instead, mention it but say it is shadowed.
 
-   Return whether something was inserted or not.  */
+   Any inserted text ends in two newlines (used by `help-make-xrefs').  */
 
-int
+void
 describe_map_tree (Lisp_Object startmap, int partial, Lisp_Object shadow,
                   Lisp_Object prefix, const char *title, int nomenu, int 
transl,
                   int always_title, int mention_shadow)
@@ -3108,8 +3108,10 @@
     skip: ;
     }
 
+  if (something)
+    insert_string ("\n");
+
   UNGCPRO;
-  return something;
 }
 
 static int previous_description_column;

=== modified file 'src/keymap.h'
--- a/src/keymap.h      2012-01-19 07:21:25 +0000
+++ b/src/keymap.h      2012-05-30 14:08:58 +0000
@@ -47,7 +47,7 @@
 extern Lisp_Object access_keymap (Lisp_Object, Lisp_Object, int, int, int);
 extern Lisp_Object get_keymap (Lisp_Object, int, int);
 EXFUN (Fset_keymap_parent, 2);
-extern int describe_map_tree (Lisp_Object, int, Lisp_Object, Lisp_Object,
+extern void describe_map_tree (Lisp_Object, int, Lisp_Object, Lisp_Object,
                              const char *, int, int, int, int);
 extern ptrdiff_t current_minor_maps (Lisp_Object **, Lisp_Object **);
 extern void initial_define_key (Lisp_Object, int, const char *);

=== modified file 'src/ralloc.c'
--- a/src/ralloc.c      2012-05-27 01:06:44 +0000
+++ b/src/ralloc.c      2012-05-31 06:06:42 +0000
@@ -1142,7 +1142,12 @@
 void
 r_alloc_inhibit_buffer_relocation (int inhibit)
 {
-  use_relocatable_buffers = !inhibit;
+  if (use_relocatable_buffers < 0)
+    use_relocatable_buffers = 0;
+  if (inhibit)
+    use_relocatable_buffers++;
+  else if (use_relocatable_buffers > 0)
+    use_relocatable_buffers--;
 }
 
 

=== modified file 'src/search.c'
--- a/src/search.c      2012-05-27 01:06:44 +0000
+++ b/src/search.c      2012-05-31 06:06:42 +0000
@@ -1160,24 +1160,12 @@
        {
          ptrdiff_t val;
 
-#ifdef REL_ALLOC
-         /* re_search_2 below is passed C pointers to buffer text.
-            If some code called by it causes memory (re)allocation,
-            buffer text could be relocated on platforms that use
-            REL_ALLOC, which invalidates those C pointers.  So we
-            inhibit relocation of buffer text for as long as
-            re_search_2 runs.  */
-         r_alloc_inhibit_buffer_relocation (1);
-#endif
          val = re_search_2 (bufp, (char *) p1, s1, (char *) p2, s2,
                             pos_byte - BEGV_BYTE, lim_byte - pos_byte,
                             (NILP (Vinhibit_changing_match_data)
                              ? &search_regs : &search_regs_1),
                             /* Don't allow match past current point */
                             pos_byte - BEGV_BYTE);
-#ifdef REL_ALLOC
-         r_alloc_inhibit_buffer_relocation (0);
-#endif
          if (val == -2)
            {
              matcher_overflow ();
@@ -1217,19 +1205,11 @@
        {
          ptrdiff_t val;
 
-#ifdef REL_ALLOC
-         /* See commentary above for the reasons for inhibiting
-            buffer text relocation here.  */
-         r_alloc_inhibit_buffer_relocation (1);
-#endif
          val = re_search_2 (bufp, (char *) p1, s1, (char *) p2, s2,
                             pos_byte - BEGV_BYTE, lim_byte - pos_byte,
                             (NILP (Vinhibit_changing_match_data)
                              ? &search_regs : &search_regs_1),
                             lim_byte - BEGV_BYTE);
-#ifdef REL_ALLOC
-         r_alloc_inhibit_buffer_relocation (0);
-#endif
          if (val == -2)
            {
              matcher_overflow ();

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2012-05-27 01:06:44 +0000
+++ b/src/xdisp.c       2012-05-31 06:06:42 +0000
@@ -3170,7 +3170,7 @@
                     onto the stack one more time, which is not
                     expected by the rest of the code that processes
                     overlay strings.  */
-                 || (it->n_overlay_strings <= 0
+                 || (it->current.overlay_string_index < 0
                      ? !get_overlay_strings_1 (it, 0, 0)
                      : 0))
                {


reply via email to

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