changeset 107028:25a4d659d068

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Mon, 25 Jan 2010 21:57:27 +0000
parents a64b73ff7ed5 (current diff) 69a56b685af8 (diff)
children e760b002759b
files
diffstat 18 files changed, 152 insertions(+), 51 deletions(-) [+]
line wrap: on
line diff
--- a/.bzrignore	Sun Jan 24 21:58:18 2010 +0000
+++ b/.bzrignore	Mon Jan 25 21:57:27 2010 +0000
@@ -61,3 +61,4 @@
 src/stamp-oldxmenu
 src/temacs
 src/deps
+configure.lineno
--- a/doc/emacs/ChangeLog	Sun Jan 24 21:58:18 2010 +0000
+++ b/doc/emacs/ChangeLog	Mon Jan 25 21:57:27 2010 +0000
@@ -1,3 +1,8 @@
+2010-01-24  Mark A. Hershberger  <mah@everybody.org>
+
+	* programs.texi (Other C Commands): Replace reference to obsolete
+	c-subword-mode.
+
 2010-01-21  Glenn Morris  <rgm@gnu.org>
 
 	* trouble.texi (Bugs): Fix PROBLEMS keybinding.
--- a/doc/emacs/programs.texi	Sun Jan 24 21:58:18 2010 +0000
+++ b/doc/emacs/programs.texi	Mon Jan 25 21:57:27 2010 +0000
@@ -1609,13 +1609,13 @@
 
 @table @kbd
 @item C-c C-w
-@itemx M-x c-subword-mode
-@findex c-subword-mode
+@itemx M-x subword-mode
+@findex subword-mode
 Enable (or disable) @dfn{subword mode}.  In subword mode, Emacs's word
 commands recognize upper case letters in
 @samp{StudlyCapsIdentifiers} as word boundaries.  This is indicated by
 the flag @samp{/w} on the mode line after the mode name
-(e.g. @samp{C/law}).  You can even use @kbd{M-x c-subword-mode} in
+(e.g. @samp{C/law}).  You can even use @kbd{M-x subword-mode} in
 non-CC Mode buffers.
 
 In the GNU project, we recommend using underscores to separate words
--- a/doc/misc/ChangeLog	Sun Jan 24 21:58:18 2010 +0000
+++ b/doc/misc/ChangeLog	Mon Jan 25 21:57:27 2010 +0000
@@ -1,7 +1,11 @@
-2010-01-21  Katsumi Yamaoka  <yamaoka@jpl.org>
+2010-01-24  Mark A. Hershberger  <mah@everybody.org>
 
 	* gnus.texi (Score File Format): Fix typo.
 
+2010-01-21  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* cc-mode.texi: Replace references to obsolete c-subword-mode.
+
 2010-01-18  Juanma Barranquero  <lekktu@gmail.com>
 
 	* ada-mode.texi (Project File Overview): Fix typo.
--- a/doc/misc/cc-mode.texi	Sun Jan 24 21:58:18 2010 +0000
+++ b/doc/misc/cc-mode.texi	Mon Jan 25 21:57:27 2010 +0000
@@ -1012,7 +1012,7 @@
 If @var{n} is negative, move in the opposite direction.
 
 Note that these two commands have been superseded by
-@code{c-subword-mode}, which you should use instead.  @xref{Subword
+@code{subword-mode}, which you should use instead.  @xref{Subword
 Movement}.  They might be removed from a future release of @ccmode{}.
 @end table
 
@@ -1194,10 +1194,9 @@
 @findex toggle-auto-hungry-state (c-)
 Toggle both auto-newline and hungry delete minor modes.
 
-@item @kbd{C-c C-w} (@code{M-x c-subword-mode})
+@item @kbd{C-c C-w} (@code{M-x subword-mode})
 @kindex C-c C-w
-@findex c-subword-mode
-@findex subword-mode (c-)
+@findex subword-mode
 Toggle subword mode.
 
 @item @kbd{M-x c-toggle-syntactic-indentation}
@@ -1694,11 +1693,11 @@
 
 @example
 (add-hook 'c-mode-common-hook
-          (lambda () (c-subword-mode 1)))
+          (lambda () (subword-mode 1)))
 @end example
 
-As a bonus, you can also use @code{c-subword-mode} in non-@ccmode{}
-buffers by typing @kbd{M-x c-subword-mode}.
+As a bonus, you can also use @code{subword-mode} in non-@ccmode{}
+buffers by typing @kbd{M-x subword-mode}.
 
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 @node    Other Commands,  , Subword Movement, Commands
--- a/etc/NEWS	Sun Jan 24 21:58:18 2010 +0000
+++ b/etc/NEWS	Mon Jan 25 21:57:27 2010 +0000
@@ -328,6 +328,8 @@
 
 **** vc-dir displays the stash status
 
+**** vc-dir requires at least git-1.5.5.
+
 *** vc-bzr supports operating with shelves: the shelve list is
 displayed in the *vc-dir* header, shelves can be created, removed and applied.
 
--- a/lisp/ChangeLog	Sun Jan 24 21:58:18 2010 +0000
+++ b/lisp/ChangeLog	Mon Jan 25 21:57:27 2010 +0000
@@ -1,3 +1,24 @@
+2010-01-25  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* vc-annotate.el (vc-annotate-revision-at-line): Compare file
+	names too.
+
+	* vc-bzr.el (vc-bzr-print-log): Use the more compact --line option
+	for the short log.
+	(vc-bzr-log-view-mode): Adjust regexp for the above change.
+
+2010-01-25  Mark A. Hershberger  <mah@everybody.org>
+
+	* progmodes/python.el: Replace reference to obsolete
+	c-subward-mode.
+
+	* vc-bzr.el: (vc-bzr-revision-table) New function.
+
+2010-01-25  Eric Hanchrow  <eric.hanchrow@gmail.com>  (tiny change)
+
+	* vc-git.el (vc-git-dir-status-goto-stage): Pass --relative to the
+	diff-index command.  This requires at least git-1.5.5.  (Bug#1589).
+
 2010-01-24  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	Remove support for adding --signoff on commit.
--- a/lisp/erc/ChangeLog	Sun Jan 24 21:58:18 2010 +0000
+++ b/lisp/erc/ChangeLog	Mon Jan 25 21:57:27 2010 +0000
@@ -1,3 +1,12 @@
+2010-01-25  Vivek Dasmohapatra  <vivek@etla.org>
+
+	* erc-backend.el (erc-session-connector): New var.
+	(erc-server-reconnect): Use it to reconnect via old
+	connector (Bug#4958).
+
+	* erc.el (erc-determine-parameters): Save
+	erc-server-connect-function to erc-session-connector.
+
 2009-11-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* erc.el (erc-display-line-1, erc-process-away):
--- a/lisp/erc/erc-backend.el	Sun Jan 24 21:58:18 2010 +0000
+++ b/lisp/erc/erc-backend.el	Mon Jan 25 21:57:27 2010 +0000
@@ -130,6 +130,10 @@
   "The server name used to connect to for this session.")
 (make-variable-buffer-local 'erc-session-server)
 
+(defvar erc-session-connector nil
+  "The function used to connect to this session (nil for the default).")
+(make-variable-buffer-local 'erc-session-connector)
+
 (defvar erc-session-port nil
   "The port used to connect to.")
 (make-variable-buffer-local 'erc-session-port)
@@ -538,8 +542,10 @@
       (erc-set-active-buffer (current-buffer))
       (setq erc-server-last-sent-time 0)
       (setq erc-server-lines-sent 0)
-      (erc-open erc-session-server erc-session-port erc-server-current-nick
-                erc-session-user-full-name t erc-session-password))))
+      (let ((erc-server-connect-function (or erc-session-connector
+                                             'open-network-stream)))
+        (erc-open erc-session-server erc-session-port erc-server-current-nick
+                  erc-session-user-full-name t erc-session-password)))))
 
 (defun erc-server-filter-function (process string)
   "The process filter for the ERC server."
--- a/lisp/erc/erc.el	Sun Jan 24 21:58:18 2010 +0000
+++ b/lisp/erc/erc.el	Mon Jan 25 21:57:27 2010 +0000
@@ -5654,11 +5654,13 @@
   "Determine the connection and authentication parameters.
 Sets the buffer local variables:
 
+- `erc-session-connector'
 - `erc-session-server'
 - `erc-session-port'
 - `erc-session-full-name'
 - `erc-server-current-nick'"
-  (setq erc-session-server (erc-compute-server server)
+  (setq erc-session-connector erc-server-connect-function
+        erc-session-server (erc-compute-server server)
 	erc-session-port (or port erc-default-port)
 	erc-session-user-full-name (erc-compute-full-name name))
   (erc-set-current-nick (erc-compute-nick nick)))
--- a/lisp/progmodes/python.el	Sun Jan 24 21:58:18 2010 +0000
+++ b/lisp/progmodes/python.el	Mon Jan 25 21:57:27 2010 +0000
@@ -45,7 +45,7 @@
 ;; `forward-into-nomenclature' should be done separately, since it's
 ;; not specific to Python, and I've installed a minor mode to do the
 ;; job properly in Emacs 23.  [CC mode 5.31 contains an incompatible
-;; feature, `c-subword-mode' which is intended to have a similar
+;; feature, `subword-mode' which is intended to have a similar
 ;; effect, but actually only affects word-oriented keybindings.]
 
 ;; Other things seem more natural or canonical here, e.g. the
--- a/lisp/vc-annotate.el	Sun Jan 24 21:58:18 2010 +0000
+++ b/lisp/vc-annotate.el	Mon Jan 25 21:57:27 2010 +0000
@@ -447,7 +447,8 @@
     (let ((rev-at-line (vc-annotate-extract-revision-at-line)))
       (if (not rev-at-line)
 	  (message "Cannot extract revision number from the current line")
-	(if (equal (car rev-at-line) vc-annotate-parent-rev)
+	(if (and (equal (car rev-at-line) vc-annotate-parent-rev)
+		 (string= (cdr rev-at-line) vc-annotate-parent-file))
 	    (message "Already at revision %s" rev-at-line)
 	  (vc-annotate-warp-revision (car rev-at-line) (cdr rev-at-line)))))))
 
--- a/lisp/vc-bzr.el	Sun Jan 24 21:58:18 2010 +0000
+++ b/lisp/vc-bzr.el	Mon Jan 25 21:57:27 2010 +0000
@@ -487,7 +487,7 @@
   (set (make-local-variable 'log-view-file-re) "\\`a\\`")
   (set (make-local-variable 'log-view-message-re)
        (if vc-short-log
-	   "^ *\\([0-9.]+\\) \\(.*?\\)[ \t]+\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\)\\( \\[merge\\]\\)?"
+	   "^ *\\([0-9.]+\\): \\(.*?\\)[ \t]+\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\)\\( \\[merge\\]\\)?"
 	 "^ *\\(?:revno: \\([0-9.]+\\)\\|merged: .+\\)"))
   (set (make-local-variable 'log-view-font-lock-keywords)
        ;; log-view-font-lock-keywords is careful to use the buffer-local
@@ -519,7 +519,7 @@
   (with-current-buffer buffer
     (apply 'vc-bzr-command "log" buffer 'async files
 	   (append
-	    (when shortlog '("--short"))
+	    (when shortlog '("--line"))
 	    (when start-revision (list (format "-r..%s" start-revision)))
 	    (when limit (list "-l" (format "%s" limit)))
 	    (if (stringp vc-bzr-log-switches)
@@ -898,6 +898,19 @@
   (interactive "e")
   (vc-dir-at-event e (popup-menu vc-bzr-shelve-menu-map e)))
 
+(defun vc-bzr-revision-table (files)
+  (let ((vc-bzr-revisions '())
+        (default-directory (file-name-directory (car files))))
+    (with-temp-buffer
+      (vc-bzr-command "log" t 0 files "--line")
+      (let ((start (point-min))
+            (loglines (buffer-substring-no-properties (point-min) (point-max))))
+        (while (string-match "^\\([0-9]+\\):" loglines)
+          (push (match-string 1 loglines) vc-bzr-revisions)
+          (setq start (+ start (match-end 0)))
+          (setq loglines (buffer-substring-no-properties start (point-max))))))
+    vc-bzr-revisions))
+
 ;;; Revision completion
 
 (eval-and-compile
--- a/lisp/vc-git.el	Sun Jan 24 21:58:18 2010 +0000
+++ b/lisp/vc-git.el	Mon Jan 25 21:57:27 2010 +0000
@@ -381,7 +381,7 @@
      (vc-git-command (current-buffer) 'async files "ls-files" "-z" "-o" "-i"
                      "--directory" "--no-empty-directory" "--exclude-standard" "--"))
     ('diff-index
-     (vc-git-command (current-buffer) 'async files "diff-index" "-z" "-M" "HEAD" "--")))
+     (vc-git-command (current-buffer) 'async files "diff-index" "--relative" "-z" "-M" "HEAD" "--")))
   (vc-exec-after
    `(vc-git-after-dir-status-stage (quote ,stage) (quote ,files) (quote ,update-function))))
 
--- a/src/ChangeLog	Sun Jan 24 21:58:18 2010 +0000
+++ b/src/ChangeLog	Mon Jan 25 21:57:27 2010 +0000
@@ -1,3 +1,22 @@
+2010-01-25  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* xfns.c (Fx_create_frame): If frame height is too big, try
+	sizes 24 and 10. Bug #3643.
+
+2010-01-24  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	Try and fix bug#788, hopefully for real this time.
+	* keymap.c (shadow_lookup): Add `remap' arg.
+	(describe_map, describe_vector): Update calls to shadow_lookup.
+	(Fwhere_is_internal): Fix up handling of `remapped_sequences' and
+	`remapped' so this flag is applicable to `sequence'.  Be careful to
+	perform remapping during shadow_lookup check of remapped_sequences.
+
+2010-01-24  Eric Bélanger  <snowmaniscool@gmail.com>  (tiny change)
+
+	* image.c (png_load): Use png_sig_cmp instead of the obsolete
+	png_check_sig, which has been removed in libpng 1.4.
+
 2010-01-23  Giorgos Keramidas  <keramida@ceid.upatras.gr>  (tiny change)
 
 	* filelock.c: Include utmp.h only when HAVE_UTMP_H (FreeBSD 9.x
--- a/src/image.c	Sun Jan 24 21:58:18 2010 +0000
+++ b/src/image.c	Mon Jan 25 21:57:27 2010 +0000
@@ -33,7 +33,7 @@
 #else
 # include <png.h>
 #endif
-#endif 
+#endif
 
 #include <setjmp.h>
 
@@ -3051,7 +3051,7 @@
             int nbytes, i;
             /* Windows mono bitmaps are reversed compared with X.  */
             invertedBits = bits;
-            nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR 
+            nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR
               * img->height;
             bits = (char *) alloca(nbytes);
             for (i = 0; i < nbytes; i++)
@@ -5559,7 +5559,7 @@
 /* PNG library details.  */
 
 DEF_IMGLIB_FN (png_get_io_ptr);
-DEF_IMGLIB_FN (png_check_sig);
+DEF_IMGLIB_FN (png_sig_cmp);
 DEF_IMGLIB_FN (png_create_read_struct);
 DEF_IMGLIB_FN (png_create_info_struct);
 DEF_IMGLIB_FN (png_destroy_read_struct);
@@ -5590,7 +5590,7 @@
     return 0;
 
   LOAD_IMGLIB_FN (library, png_get_io_ptr);
-  LOAD_IMGLIB_FN (library, png_check_sig);
+  LOAD_IMGLIB_FN (library, png_sig_cmp);
   LOAD_IMGLIB_FN (library, png_create_read_struct);
   LOAD_IMGLIB_FN (library, png_create_info_struct);
   LOAD_IMGLIB_FN (library, png_destroy_read_struct);
@@ -5615,7 +5615,7 @@
 #else
 
 #define fn_png_get_io_ptr		png_get_io_ptr
-#define fn_png_check_sig		png_check_sig
+#define fn_png_sig_cmp			png_sig_cmp
 #define fn_png_create_read_struct	png_create_read_struct
 #define fn_png_create_info_struct	png_create_info_struct
 #define fn_png_destroy_read_struct	png_destroy_read_struct
@@ -5762,7 +5762,7 @@
 
       /* Check PNG signature.  */
       if (fread (sig, 1, sizeof sig, fp) != sizeof sig
-	  || !fn_png_check_sig (sig, sizeof sig))
+	  || fn_png_sig_cmp (sig, 0, sizeof sig))
 	{
 	  image_error ("Not a PNG file: `%s'", file, Qnil);
 	  UNGCPRO;
@@ -5779,7 +5779,7 @@
 
       /* Check PNG signature.  */
       if (tbr.len < sizeof sig
-	  || !fn_png_check_sig (tbr.bytes, sizeof sig))
+	  || fn_png_sig_cmp (tbr.bytes, 0, sizeof sig))
 	{
 	  image_error ("Not a PNG image: `%s'", img->spec, Qnil);
 	  UNGCPRO;
--- a/src/keymap.c	Sun Jan 24 21:58:18 2010 +0000
+++ b/src/keymap.c	Mon Jan 25 21:57:27 2010 +0000
@@ -2650,11 +2650,13 @@
 				     Lisp_Object args, void *data));
 
 /* Like Flookup_key, but uses a list of keymaps SHADOW instead of a single map.
-   Returns the first non-nil binding found in any of those maps.  */
+   Returns the first non-nil binding found in any of those maps.
+   If REMAP is true, pass the result of the lookup through command
+   remapping before returning it.  */
 
 static Lisp_Object
-shadow_lookup (shadow, key, flag)
-     Lisp_Object shadow, key, flag;
+shadow_lookup (Lisp_Object shadow, Lisp_Object key, Lisp_Object flag,
+	       int remap)
 {
   Lisp_Object tail, value;
 
@@ -2669,7 +2671,15 @@
 	    return Qnil;
 	}
       else if (!NILP (value))
-	return value;
+	{
+	  Lisp_Object remapping;
+	  if (remap && SYMBOLP (value)
+	      && (remapping = Fcommand_remapping (value, Qnil, shadow),
+		  !NILP (remapping)))
+	    return remapping;
+	  else
+	    return value;
+	}
     }
   return Qnil;
 }
@@ -2860,30 +2870,30 @@
     {
       /* We have a list of advertized bindings.  */
       while (CONSP (tem))
-	if (EQ (shadow_lookup (keymaps, XCAR (tem), Qnil), definition))
+	if (EQ (shadow_lookup (keymaps, XCAR (tem), Qnil, 0), definition))
 	  return XCAR (tem);
 	else
 	  tem = XCDR (tem);
-      if (EQ (shadow_lookup (keymaps, tem, Qnil), definition))
+      if (EQ (shadow_lookup (keymaps, tem, Qnil, 0), definition))
 	return tem;
     }
 
   sequences = Freverse (where_is_internal (definition, keymaps,
 					   !NILP (noindirect), nomenus));
 
-  while (CONSP (sequences))
+  while (CONSP (sequences)
+	 /* If we're at the end of the `sequences' list and we haven't
+	    considered remapped sequences yet, copy them over and
+	    process them.  */
+	 || (!remapped && (sequences = remapped_sequences,
+			   remapped = 1),
+	     CONSP (sequences)))
     {
       Lisp_Object sequence, function;
 	  
       sequence = XCAR (sequences);
       sequences = XCDR (sequences);
 
-      if (NILP (sequences) && !remapped)
-	{
-	  sequences = remapped_sequences;
-	  remapped = 1;
-	}
-
       /* Verify that this key binding is not shadowed by another
 	 binding for the same key, before we say it exists.
 
@@ -2893,7 +2903,8 @@
 
 	 Either nil or number as value from Flookup_key
 	 means undefined.  */
-      if (!EQ (shadow_lookup (keymaps, sequence, Qnil), definition))
+      if (!EQ (shadow_lookup (keymaps, sequence, Qnil, remapped),
+	       definition))
 	continue;
 
       /* If the current sequence is a command remapping with
@@ -3506,7 +3517,7 @@
 	  ASET (kludge, 0, event);
 	  if (!NILP (shadow))
 	    {
-	      tem = shadow_lookup (shadow, kludge, Qt);
+	      tem = shadow_lookup (shadow, kludge, Qt, 0);
 	      if (!NILP (tem))
 		{
 		  /* If both bindings are keymaps, this key is a prefix key,
@@ -3776,7 +3787,7 @@
 	{
 	  Lisp_Object tem;
 
-	  tem = shadow_lookup (shadow, kludge, Qt);
+	  tem = shadow_lookup (shadow, kludge, Qt, 0);
 
 	  if (!NILP (tem))
 	    {
--- a/src/xfns.c	Sun Jan 24 21:58:18 2010 +0000
+++ b/src/xfns.c	Mon Jan 25 21:57:27 2010 +0000
@@ -3518,27 +3518,35 @@
   window_prompting = x_figure_window_size (f, parms, 1);
 
   /* Don't make height higher than display height unless the user asked
-     for it.  */
+     for it.  Try sizes 24 and 10 if current is too large.  */
   height = FRAME_LINES (f);
   tem = x_get_arg (dpyinfo, parms, Qheight, 0, 0, RES_TYPE_NUMBER);
   if (EQ (tem, Qunbound))
     {
-      int ph = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, FRAME_LINES (f));
+      int h = FRAME_LINES (f) + FRAME_TOOL_BAR_LINES (f)
+        + FRAME_MENU_BAR_LINES (f) + 2;
+      int ph = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, h);
       int dph = DisplayHeight (FRAME_X_DISPLAY (f), FRAME_X_SCREEN_NUMBER (f));
+      static int tryheight[] = { 24, 10, 0 } ;
+      int i;
+
+      ph += (FRAME_EXTERNAL_TOOL_BAR (f) ? 32 : 0) /* Gtk toolbar size */
+        + (FRAME_EXTERNAL_MENU_BAR (f) ? 24 : 0); /* Arbitrary */
+
       /* Some desktops have fixed menus above and/or panels below.  Try to
          figure out the usable size we have for emacs.  */
       current_desktop = x_get_current_desktop (f);
       x_get_desktop_workarea (f, current_desktop, &deskw, &deskh);
       if (deskh > 0 && deskh < dph) dph = deskh;
       
-      if (ph > dph)
+      /* Allow 40 pixels for manager decorations.  */
+      for (i = 0; ph+40 > dph && tryheight[i] != 0; ++i)
         {
-          height = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, dph) -
-            FRAME_TOOL_BAR_LINES (f) - FRAME_MENU_BAR_LINES (f);
-          if (FRAME_EXTERNAL_TOOL_BAR (f))
-            height -= 2; /* We can't know how big it will be.  */
-          if (FRAME_EXTERNAL_MENU_BAR (f))
-            height -= 2; /* We can't know how big it will be.  */
+          height = tryheight[i];
+          h = height + FRAME_TOOL_BAR_LINES (f) + FRAME_MENU_BAR_LINES (f) + 2;
+          ph = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, h)
+            + (FRAME_EXTERNAL_TOOL_BAR (f) ? 32 : 0)
+            + (FRAME_EXTERNAL_MENU_BAR (f) ? 24 : 0);
         }
     }