changeset 108704:912915c9edd9

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Wed, 19 May 2010 22:54:44 +0000
parents 391df511b305 (current diff) 665253a7d3f6 (diff)
children 915a03d2dfb2
files
diffstat 32 files changed, 343 insertions(+), 128 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue May 18 23:23:58 2010 +0000
+++ b/ChangeLog	Wed May 19 22:54:44 2010 +0000
@@ -1,3 +1,9 @@
+2010-05-19  Glenn Morris  <rgm@gnu.org>
+
+	* configure.in (LINKER, YMF_PASS_LDFLAGS): New output variables.
+	(ORDINARY_LINK): New AC_DEFINE.
+	(LIB_GCC): No need to set if ORDINARY_LINK.
+
 2010-05-18  Glenn Morris  <rgm@gnu.org>
 
 	* configure.in (POST_ALLOC_OBJ) [cygwin]: Omit vm-limit.o.
--- a/configure	Tue May 18 23:23:58 2010 +0000
+++ b/configure	Wed May 19 22:54:44 2010 +0000
@@ -818,6 +818,8 @@
 POST_ALLOC_OBJ
 LD_SWITCH_SYSTEM_TEMACS
 LD_SWITCH_SYSTEM_EXTRA
+YMF_PASS_LDFLAGS
+LINKER
 LIB_GCC
 MOUSE_SUPPORT
 TOOLTIP_SUPPORT
@@ -26616,8 +26618,79 @@
 
 
 
+LINKER=
+ORDINARY_LINK=
+case "$opsys" in
+  ## gnu: GNU needs its own crt0.
+  aix4-2|darwin|gnu|usg5-4|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
+
+  cygwin) LINKER="\$(CC)" ;;
+
+  ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the
+  ## library search parth, i.e. it won't search /usr/lib for libc and
+  ## friends.  Using -nostartfiles instead avoids this problem, and
+  ## will also work on earlier NetBSD releases.
+  netbsd|openbsd) LINKER="\$(CC) -nostartfiles" ;;
+
+  ## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
+  ##   MkLinux/LinuxPPC needs this.
+  ## ibms390x only supports opsys = gnu-linux so it can be added here.
+  gnu-*)
+    case "$machine" in
+      macppc|ibms390x) LINKER="\$(CC) -nostdlib" ;;
+    esac
+    ;;
+esac
+
+## A macro which other sections of Makefile can redefine to munge the
+## flags before they are passed to LD.  This is helpful if you have
+## redefined LD to something odd, like "gcc".
+## (The YMF prefix is a holdover from the old name "ymakefile".)
+YMF_PASS_LDFLAGS=flags
+if test "x$ORDINARY_LINK" = "xyes"; then
+
+  LINKER="\$(CC)"
+
+cat >>confdefs.h <<\_ACEOF
+#define ORDINARY_LINK 1
+_ACEOF
+
+
+## The system files defining neither ORDINARY_LINK nor LINKER are:
+## (bsd-common), freebsd, gnu-* not on macppc|ibms390x, hpux*.
+elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then
+
+  ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
+  ## places that are difficult to figure out at make time.  Fortunately,
+  ## these same versions allow you to pass arbitrary flags on to the
+  ## linker, so there is no reason not to use it as a linker.
+  ##
+  ## Well, it is not quite perfect.  The "-nostdlib" keeps GCC from
+  ## searching for libraries in its internal directories, so we have to
+  ## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
+  LINKER="\$(CC) -nostdlib"
+  ## GCC passes any argument prefixed with -Xlinker directly to the linker.
+  ## See prefix-args.c for an explanation of why we do not do this with the
+  ## shell''s ``for'' construct.  Note that sane people do not have '.' in
+  ## their paths, so we must use ./prefix-args.
+  ## TODO either make prefix-args check ORDINARY_LINK internally,
+  ## or remove it altogether (bug#6184), removing the need for this macro.
+  YMF_PASS_LDFLAGS='`./prefix-args -Xlinker flags`'
+fi
+
+
+test "x$LINKER" = "x" && LINKER=ld
+## FIXME? What setting of YMF_PASS_LDFLAGS should this have?
+test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic"
+
+
+
+
+## FIXME? The logic here is not precisely the same as that above
+## setting YMF_PASS_LDFLAGS.  There is no check here for a pre-defined
+## LINKER.  Should we only be setting LIB_GCC if LD ~ -nostdlib?
 LIB_GCC=
-if test "x$GCC" = "xyes"; then
+if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
 
   case "$opsys" in
     ## cygwin: don't link against static libgcc.
--- a/configure.in	Tue May 18 23:23:58 2010 +0000
+++ b/configure.in	Wed May 19 22:54:44 2010 +0000
@@ -3277,8 +3277,75 @@
 AC_SUBST(LD_SWITCH_SYSTEM_EXTRA)
 
 
+LINKER=
+ORDINARY_LINK=
+case "$opsys" in
+  ## gnu: GNU needs its own crt0.
+  aix4-2|darwin|gnu|usg5-4|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
+
+  cygwin) LINKER="\$(CC)" ;;
+
+  ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the
+  ## library search parth, i.e. it won't search /usr/lib for libc and
+  ## friends.  Using -nostartfiles instead avoids this problem, and
+  ## will also work on earlier NetBSD releases.
+  netbsd|openbsd) LINKER="\$(CC) -nostartfiles" ;;
+
+  ## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
+  ##   MkLinux/LinuxPPC needs this.
+  ## ibms390x only supports opsys = gnu-linux so it can be added here.
+  gnu-*)
+    case "$machine" in
+      macppc|ibms390x) LINKER="\$(CC) -nostdlib" ;;
+    esac
+    ;;
+esac
+
+## A macro which other sections of Makefile can redefine to munge the
+## flags before they are passed to LD.  This is helpful if you have
+## redefined LD to something odd, like "gcc".
+## (The YMF prefix is a holdover from the old name "ymakefile".) 
+YMF_PASS_LDFLAGS=flags
+if test "x$ORDINARY_LINK" = "xyes"; then
+
+  LINKER="\$(CC)"
+  AC_DEFINE(ORDINARY_LINK, 1, [Define if the C compiler is the linker.])
+
+## The system files defining neither ORDINARY_LINK nor LINKER are:
+## (bsd-common), freebsd, gnu-* not on macppc|ibms390x, hpux*.
+elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then
+
+  ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
+  ## places that are difficult to figure out at make time.  Fortunately,
+  ## these same versions allow you to pass arbitrary flags on to the
+  ## linker, so there is no reason not to use it as a linker.
+  ##
+  ## Well, it is not quite perfect.  The "-nostdlib" keeps GCC from
+  ## searching for libraries in its internal directories, so we have to
+  ## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
+  LINKER="\$(CC) -nostdlib"
+  ## GCC passes any argument prefixed with -Xlinker directly to the linker.
+  ## See prefix-args.c for an explanation of why we do not do this with the
+  ## shell''s ``for'' construct.  Note that sane people do not have '.' in
+  ## their paths, so we must use ./prefix-args.
+  ## TODO either make prefix-args check ORDINARY_LINK internally,
+  ## or remove it altogether (bug#6184), removing the need for this macro.
+  YMF_PASS_LDFLAGS='`./prefix-args -Xlinker flags`'
+fi
+AC_SUBST(YMF_PASS_LDFLAGS)
+
+test "x$LINKER" = "x" && LINKER=ld
+## FIXME? What setting of YMF_PASS_LDFLAGS should this have?
+test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic"
+
+AC_SUBST(LINKER)
+
+
+## FIXME? The logic here is not precisely the same as that above
+## setting YMF_PASS_LDFLAGS.  There is no check here for a pre-defined
+## LINKER.  Should we only be setting LIB_GCC if LD ~ -nostdlib?
 LIB_GCC=
-if test "x$GCC" = "xyes"; then
+if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
 
   case "$opsys" in
     ## cygwin: don't link against static libgcc.
--- a/etc/TODO	Tue May 18 23:23:58 2010 +0000
+++ b/etc/TODO	Wed May 19 22:54:44 2010 +0000
@@ -40,9 +40,9 @@
   fix_submap_inheritance hack and to more cleanly express the
   relationship between minibuffer-local-*-map): I've had this locally
   for a long time, but the details of the semantics is somewhat ... delicate.
-*** prog-mode (a parent-mode, like text-mode).  Could/should provide
-  a better fill-paragraph default that uses syntax-tables to recognize
-  string/comment boundaries.
+*** Derive from prog-mode in more places, close bug#5532.
+*** prog-mode could/should provide a better fill-paragraph default
+  that uses syntax-tables to recognize string/comment boundaries.
 *** provide more completion-at-point-functions.  Make existing
   in-buffer completion use completion-at-point.
 *** "functional" function-key-map that would make it easy to add (and
--- a/lisp/ChangeLog	Tue May 18 23:23:58 2010 +0000
+++ b/lisp/ChangeLog	Wed May 19 22:54:44 2010 +0000
@@ -1,3 +1,45 @@
+2010-05-19  Juri Linkov  <juri@jurta.org>
+
+	* emacs-lisp/cl-macs.el (window-parameter): Add defsetf with
+	set-window-parameter.
+
+2010-05-19  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/tramp.el (tramp-methods): Add `tramp-async-args' attribute
+	where appropriate.
+	(tramp-maybe-open-connection): Use it.
+
+2010-05-19  Eli Zaretskii  <eliz@gnu.org>
+
+	* simple.el (move-end-of-line): Make sure we are at line beginning
+	before backing up to end of previous line.
+
+2010-05-19  Michael Albinus  <michael.albinus@gmx.de>
+
+	* password-cache.el (password-cache-remove): Fix docstring.
+
+	* net/secrets.el: Autoload the widget functions.
+	(secrets-search-items, secrets-create-item)
+	(secrets-get-attributes, secrets-expand-item): Attributes will be
+	stored on the password database without leading ":", as all other
+	clients do as well.
+	(secrets-mode): Fix docstring.
+	(secrets-show-secrets): Provide it as autoloaded command only when
+	D-Bus support is available.  Check existence of Secret Service API.
+
+2010-05-19  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* indent.el (indent-region): Deactivate region (bug#6200).
+
+2010-05-19  Glenn Morris  <rgm@gnu.org>
+
+	* vc-dir.el (vc-dir): Don't pop-up-windows.  (Bug#6204)
+
+2010-05-19  Kenichi Handa  <handa@m17n.org>
+
+	* composite.el: Register compose-gstring-for-graphic in
+	composition-function-table only for combining characters (Mn, Mc, Me).
+
 2010-05-18  Jay Belanger  <jay.p.belanger@gmail.com>
 
 	* calc/calc-trail.el (calc-trail-isearch-forward)
--- a/lisp/composite.el	Tue May 18 23:23:58 2010 +0000
+++ b/lisp/composite.el	Wed May 19 22:54:44 2010 +0000
@@ -532,9 +532,9 @@
 
 (defun compose-gstring-for-graphic (gstring)
   "Compose glyph-string GSTRING for graphic display.
-Non-spacing characters are composed with the preceding base
+Combining characters are composed with the preceding base
 character.  If the preceding character is not a base character,
-each non-spacing character is composed as a spacing character by
+each combining character is composed as a spacing character by
 a padding space before and/or after the character.
 
 All non-spacing characters has this function in
@@ -660,9 +660,9 @@
 	     [nil 0 compose-gstring-for-graphic])))
   (map-char-table
    #'(lambda (key val)
-       (if (= val 0)
+       (if (memq val '(Mn Mc Me))
 	   (set-char-table-range composition-function-table key elt)))
-   char-width-table))
+   unicode-category-table))
 
 (defun compose-gstring-for-terminal (gstring)
   "Compose glyph string GSTRING for terminal display.
--- a/lisp/emacs-lisp/cl-macs.el	Tue May 18 23:23:58 2010 +0000
+++ b/lisp/emacs-lisp/cl-macs.el	Wed May 19 22:54:44 2010 +0000
@@ -1813,6 +1813,7 @@
 (defsetf window-height () (store)
   (list 'progn (list 'enlarge-window (list '- store '(window-height))) store))
 (defsetf window-hscroll set-window-hscroll)
+(defsetf window-parameter set-window-parameter)
 (defsetf window-point set-window-point)
 (defsetf window-start set-window-start)
 (defsetf window-width () (store)
--- a/lisp/indent.el	Tue May 18 23:23:58 2010 +0000
+++ b/lisp/indent.el	Wed May 19 22:54:44 2010 +0000
@@ -431,7 +431,11 @@
 	(or (eolp)
 	    (indent-to column 0))
 	(forward-line 1))
-      (move-marker end nil))))
+      (move-marker end nil)))
+  ;; In most cases, reindenting modifies the buffer, but it may also
+  ;; leave it unmodified, in which case we have to deactivate the mark
+  ;; by hand.
+  (deactivate-mark))
 
 (defun indent-relative-maybe ()
   "Indent a new line like previous nonblank line.
--- a/lisp/mh-e/ChangeLog	Tue May 18 23:23:58 2010 +0000
+++ b/lisp/mh-e/ChangeLog	Wed May 19 22:54:44 2010 +0000
@@ -1,3 +1,10 @@
+2010-05-14  Peter S Galbraith  <psg@debian.org>
+
+	* mh-mime.el (mh-decode-message-subject): New function to decode
+	RFC2047 encoded Subject lines. Used for reply drafts.
+	* mh-comp.el (mh-compose-and-send-mail): Call
+	`mh-decode-message-subject' on (reply or forward) message drafts.
+
 2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
 
 	* Version 23.2 released.
--- a/lisp/mh-e/mh-comp.el	Tue May 18 23:23:58 2010 +0000
+++ b/lisp/mh-e/mh-comp.el	Wed May 19 22:54:44 2010 +0000
@@ -905,6 +905,9 @@
   (mh-identity-make-menu)
   (mh-identity-add-menu)
 
+  ;; Cleanup possibly RFC2047 encoded subject header
+  (mh-decode-message-subject)
+
   ;; Insert extra fields.
   (mh-insert-x-mailer)
   (mh-insert-x-face)
--- a/lisp/mh-e/mh-mime.el	Tue May 18 23:23:58 2010 +0000
+++ b/lisp/mh-e/mh-mime.el	Wed May 19 22:54:44 2010 +0000
@@ -508,6 +508,15 @@
       (rfc2047-decode-region (point-min) (mh-mail-header-end)))))
 
 ;;;###mh-autoload
+(defun mh-decode-message-subject ()
+  "Decode RFC2047 encoded message header fields."
+  (when mh-decode-mime-flag
+    (save-excursion
+      (let ((buffer-read-only nil))
+        (rfc2047-decode-region (progn (mh-goto-header-field "subject:") (point))
+                               (progn (mh-header-field-end) (point)))))))
+
+;;;###mh-autoload
 (defun mh-mime-display (&optional pre-dissected-handles)
   "Display (and possibly decode) MIME handles.
 Optional argument, PRE-DISSECTED-HANDLES is a list of MIME
--- a/lisp/net/secrets.el	Tue May 18 23:23:58 2010 +0000
+++ b/lisp/net/secrets.el	Wed May 19 22:54:44 2010 +0000
@@ -151,11 +151,11 @@
 
 (require 'dbus)
 
-(declare-function tree-widget-set-theme "tree-widget")
-(declare-function widget-create-child-and-convert "wid-edit")
-(declare-function widget-default-value-set "wid-edit")
-(declare-function widget-field-end "wid-edit")
-(declare-function widget-member "wid-edit")
+(autoload 'tree-widget-set-theme "tree-widget")
+(autoload 'widget-create-child-and-convert "wid-edit")
+(autoload 'widget-default-value-set "wid-edit")
+(autoload 'widget-field-end "wid-edit")
+(autoload 'widget-member "wid-edit")
 (defvar tree-widget-after-toggle-functions)
 
 (defvar secrets-enabled nil
@@ -563,7 +563,7 @@
 	(setq props (add-to-list
 		     'props
 		     (list :dict-entry
-			   (symbol-name (car attributes))
+			   (substring (symbol-name (car attributes)) 1)
 			   (cadr attributes))
 		     'append)
 	      attributes (cddr attributes)))
@@ -601,7 +601,7 @@
 	  (setq props (add-to-list
 		       'props
 		       (list :dict-entry
-			     (symbol-name (car attributes))
+			     (substring (symbol-name (car attributes)) 1)
 			     (cadr attributes))
 		       'append)
 		attributes (cddr attributes)))
@@ -656,7 +656,8 @@
   (let ((item-path (secrets-item-path collection item)))
     (unless (secrets-empty-path item-path)
       (mapcar
-       (lambda (attribute) (cons (intern (car attribute)) (cadr attribute)))
+       (lambda (attribute)
+	 (cons (intern (concat ":" (car attribute))) (cadr attribute)))
        (dbus-get-property
 	:session secrets-service item-path
 	secrets-interface-item "Attributes")))))
@@ -678,13 +679,10 @@
 ;;; Visualization.
 
 (define-derived-mode secrets-mode nil "Secrets"
-  "Major mode for presenting search results of a Xesam search.
+  "Major mode for presenting password entries retrieved by Security Service.
 In this mode, widgets represent the search results.
 
-\\{secrets-mode-map}
-Turning on Xesam mode runs the normal hook `xesam-mode-hook'.  It
-can be used to set `xesam-notify-function', which must a search
-engine specific, widget :notify function to visualize xesam:url."
+\\{secrets-mode-map}"
   ;; Keymap.
   (setq secrets-mode-map (copy-keymap special-mode-map))
   (set-keymap-parent secrets-mode-map widget-keymap)
@@ -707,19 +705,27 @@
 ;; keymap etc.  So we create a dummy buffer.  Stupid.
 (with-temp-buffer (secrets-mode))
 
-;;;###autoload
+;; We autoload `secrets-show-secrets' only on systems with D-Bus support.
+;;;###autoload(when (featurep 'dbusbind)
+;;;###autoload  (autoload 'secrets-show-secrets "secrets" nil t))
+
 (defun secrets-show-secrets ()
   "Display a list of collections from the Secret Service API.
 The collections are in tree view, that means they can be expanded
 to the corresponding secret items, which could also be expanded
 to their attributes."
   (interactive)
-  ;; Create the search buffer.
-  (with-current-buffer (get-buffer-create "*Secrets*")
-    (switch-to-buffer-other-window (current-buffer))
-    ;; Inialize buffer with `secrets-mode'.
-    (secrets-mode)
-    (secrets-show-collections)))
+
+  ;; Check, whether the Secret Service API is enabled.
+  (if (null secrets-enabled)
+      (message "Secret Service not available")
+
+    ;; Create the search buffer.
+    (with-current-buffer (get-buffer-create "*Secrets*")
+      (switch-to-buffer-other-window (current-buffer))
+      ;; Inialize buffer with `secrets-mode'.
+      (secrets-mode)
+      (secrets-show-collections))))
 
 (defun secrets-show-collections ()
   "Show all available collections."
@@ -757,14 +763,14 @@
 	 (attributes (secrets-get-attributes coll item))
 	 ;; padding is needed to format attribute names.
 	 (padding
-	  (1+
-	   (apply
-	    'max
-	    (cons
-	     (length "password")
-	     (mapcar
-	      (lambda (attribute) (length (symbol-name (car attribute))))
-	      attributes))))))
+	  (apply
+	   'max
+	   (cons
+	    (1+ (length "password"))
+	    (mapcar
+	     ;; Atribute names have a leading ":", which will be suppressed.
+	     (lambda (attribute) (length (symbol-name (car attribute))))
+	     attributes)))))
     (cons
      ;; The password widget.
      `(editable-field :tag "password"
@@ -779,7 +785,7 @@
 				"%v\n"))
      (mapcar
       (lambda (attribute)
-	(let ((name (symbol-name (car attribute)))
+	(let ((name (substring (symbol-name (car attribute)) 1))
 	      (value (cdr attribute)))
 	  ;; The attribute widget.
 	  `(editable-field :tag ,name
--- a/lisp/net/tramp.el	Tue May 18 23:23:58 2010 +0000
+++ b/lisp/net/tramp.el	Wed May 19 22:54:44 2010 +0000
@@ -334,6 +334,7 @@
     ("scp"   (tramp-login-program        "ssh")
              (tramp-login-args           (("%h") ("-l" "%u") ("-p" "%p")
 					  ("-e" "none")))
+	     (tramp-async-args           (("-q")))
 	     (tramp-remote-sh            "/bin/sh")
 	     (tramp-copy-program         "scp")
 	     (tramp-copy-args            (("-P" "%p") ("-p" "%k")
@@ -349,6 +350,7 @@
     ("scp1"  (tramp-login-program        "ssh")
              (tramp-login-args           (("%h") ("-l" "%u") ("-p" "%p")
 					  ("-1" "-e" "none")))
+	     (tramp-async-args           (("-q")))
 	     (tramp-remote-sh            "/bin/sh")
 	     (tramp-copy-program         "scp")
 	     (tramp-copy-args            (("-1") ("-P" "%p") ("-p" "%k")
@@ -364,6 +366,7 @@
     ("scp2"  (tramp-login-program        "ssh")
              (tramp-login-args           (("%h") ("-l" "%u") ("-p" "%p")
 					  ("-2" "-e" "none")))
+	     (tramp-async-args           (("-q")))
 	     (tramp-remote-sh            "/bin/sh")
 	     (tramp-copy-program         "scp")
 	     (tramp-copy-args            (("-2") ("-P" "%p") ("-p" "%k")
@@ -399,6 +402,7 @@
     ("sftp"  (tramp-login-program        "ssh")
              (tramp-login-args           (("%h") ("-l" "%u") ("-p" "%p")
 					  ("-e" "none")))
+	     (tramp-async-args           (("-q")))
 	     (tramp-remote-sh            "/bin/sh")
 	     (tramp-copy-program         "sftp")
 	     (tramp-copy-args            nil)
@@ -407,6 +411,7 @@
     ("rsync" (tramp-login-program        "ssh")
              (tramp-login-args           (("%h") ("-l" "%u") ("-p" "%p")
 					  ("-e" "none")))
+	     (tramp-async-args           (("-q")))
 	     (tramp-remote-sh            "/bin/sh")
 	     (tramp-copy-program         "rsync")
 	     (tramp-copy-args            (("-e" "ssh") ("-t" "%k") ("-r")))
@@ -420,6 +425,7 @@
 					  ("-o" "ControlPath=%t.%%r@%%h:%%p")
 					  ("-o" "ControlMaster=yes")
 					  ("-e" "none")))
+	     (tramp-async-args           (("-q")))
 	     (tramp-remote-sh            "/bin/sh")
 	     (tramp-copy-program         "rsync")
 	     (tramp-copy-args            (("-t" "%k") ("-r")))
@@ -449,6 +455,7 @@
     ("ssh"   (tramp-login-program        "ssh")
              (tramp-login-args           (("%h") ("-l" "%u") ("-p" "%p")
 					  ("-e" "none")))
+	     (tramp-async-args           (("-q")))
 	     (tramp-remote-sh            "/bin/sh")
 	     (tramp-copy-program         nil)
 	     (tramp-copy-args            nil)
@@ -462,6 +469,7 @@
     ("ssh1"  (tramp-login-program        "ssh")
              (tramp-login-args           (("%h") ("-l" "%u") ("-p" "%p")
 					  ("-1" "-e" "none")))
+	     (tramp-async-args           (("-q")))
 	     (tramp-remote-sh            "/bin/sh")
 	     (tramp-copy-program         nil)
 	     (tramp-copy-args            nil)
@@ -475,6 +483,7 @@
     ("ssh2"  (tramp-login-program        "ssh")
              (tramp-login-args           (("%h") ("-l" "%u") ("-p" "%p")
 					  ("-2" "-e" "none")))
+	     (tramp-async-args           (("-q")))
 	     (tramp-remote-sh            "/bin/sh")
 	     (tramp-copy-program         nil)
 	     (tramp-copy-args            nil)
@@ -489,6 +498,7 @@
              (tramp-login-program        "ssh1")
 	     (tramp-login-args           (("%h") ("-l" "%u") ("-p" "%p")
 					  ("-e" "none")))
+	     (tramp-async-args           (("-q")))
 	     (tramp-remote-sh            "/bin/sh")
 	     (tramp-copy-program         nil)
 	     (tramp-copy-args            nil)
@@ -539,6 +549,7 @@
 					  ("-o" "ControlPath=%t.%%r@%%h:%%p")
 					  ("-o" "ControlMaster=yes")
 					  ("-e" "none")))
+	     (tramp-async-args           (("-q")))
 	     (tramp-remote-sh            "/bin/sh")
 	     (tramp-copy-program         "scp")
 	     (tramp-copy-args            (("-P" "%p") ("-p" "%k") ("-q")
@@ -554,6 +565,7 @@
     ("scpx"  (tramp-login-program        "ssh")
              (tramp-login-args           (("%h") ("-l" "%u") ("-p" "%p")
 					  ("-e" "none" "-t" "-t" "/bin/sh")))
+	     (tramp-async-args           (("-q")))
 	     (tramp-remote-sh            "/bin/sh")
 	     (tramp-copy-program         "scp")
 	     (tramp-copy-args            (("-p" "%k")))
@@ -567,6 +579,7 @@
     ("sshx"  (tramp-login-program        "ssh")
              (tramp-login-args           (("%h") ("-l" "%u") ("-p" "%p")
 					  ("-e" "none" "-t" "-t" "/bin/sh")))
+	     (tramp-async-args           (("-q")))
 	     (tramp-remote-sh            "/bin/sh")
 	     (tramp-copy-program         nil)
 	     (tramp-copy-args            nil)
@@ -672,6 +685,11 @@
     \"%t\" is replaced by the temporary file name produced with
     `tramp-make-tramp-temp-file'.  \"%k\" indicates the keep-date
     parameter of a program, if exists.
+  * `tramp-async-args'
+    When an asynchronous process is started, we know already that
+    the connection works.  Therefore, we can pass additional
+    parameters to suppress diagnostic messages, in order not to
+    tamper the process output.
   * `tramp-copy-program'
     This specifies the name of the program to use for remotely copying
     the file; this might be the absolute filename of rcp or the name of
@@ -7380,6 +7398,7 @@
 connection if a previous connection has died for some reason."
   (catch 'uname-changed
     (let ((p (tramp-get-connection-process vec))
+	  (process-name (tramp-get-connection-property vec "process-name" nil))
 	  (process-environment (copy-sequence process-environment)))
 
       ;; If too much time has passed since last command was sent, look
@@ -7439,8 +7458,7 @@
 	       (p (let ((default-directory
 			  (tramp-compat-temporary-file-directory)))
 		    (start-process
-		     (or (tramp-get-connection-property vec "process-name" nil)
-			 (tramp-buffer-name vec))
+		     (or process-name (tramp-buffer-name vec))
 		     (tramp-get-connection-buffer vec)
 		     tramp-encoding-shell))))
 
@@ -7464,6 +7482,8 @@
 		    (tramp-get-method-parameter l-method 'tramp-login-program))
 		   (login-args
 		    (tramp-get-method-parameter l-method 'tramp-login-args))
+		   (async-args
+		    (tramp-get-method-parameter l-method 'tramp-async-args))
 		   (gw-args
 		    (tramp-get-method-parameter l-method 'tramp-gw-args))
 		   (gw (tramp-get-file-property hop "" "gateway" nil))
@@ -7485,6 +7505,10 @@
 		       (tramp-compat-temporary-file-directory)))))
 		   spec)
 
+	      ;; Add arguments for asynchrononous processes.
+	      (when (and process-name async-args)
+		(setq login-args (append login-args async-args)))
+
 	      ;; Add gateway arguments if necessary.
 	      (when (and gw gw-args)
 		(setq login-args (append login-args gw-args)))
--- a/lisp/password-cache.el	Tue May 18 23:23:58 2010 +0000
+++ b/lisp/password-cache.el	Wed May 19 22:54:44 2010 +0000
@@ -105,7 +105,7 @@
 
 (defun password-cache-remove (key)
   "Remove password indexed by KEY from password cache.
-This is typically run be a timer setup from `password-cache-add',
+This is typically run by a timer setup from `password-cache-add',
 but can be invoked at any time to forcefully remove passwords
 from the cache.  This may be useful when it has been detected
 that a password is invalid, so that `password-read' query the
--- a/lisp/simple.el	Tue May 18 23:23:58 2010 +0000
+++ b/lisp/simple.el	Wed May 19 22:54:44 2010 +0000
@@ -4539,6 +4539,9 @@
 	       (let ((goal-column 0)
 		     (line-move-visual nil))
 		 (and (line-move arg t)
+		      ;; With bidi reordering, we may not be at bol,
+		      ;; so make sure we are.
+		      (skip-chars-backward "^\n")
 		      (not (bobp))
 		      (progn
 			(while (and (not (bobp)) (invisible-p (1- (point))))
--- a/lisp/vc-dir.el	Tue May 18 23:23:58 2010 +0000
+++ b/lisp/vc-dir.el	Wed May 19 22:54:44 2010 +0000
@@ -1169,7 +1169,8 @@
 	  nil t nil nil)))))
   (unless backend
     (setq backend (vc-responsible-backend dir)))
-  (pop-to-buffer (vc-dir-prepare-status-buffer "*vc-dir*" dir backend))
+  (let (pop-up-windows)		      ; based on cvs-examine; bug#6204
+    (pop-to-buffer (vc-dir-prepare-status-buffer "*vc-dir*" dir backend)))
   (if (derived-mode-p 'vc-dir-mode)
       (vc-dir-refresh)
     ;; FIXME: find a better way to pass the backend to `vc-dir-mode'.
--- a/msdos/ChangeLog	Tue May 18 23:23:58 2010 +0000
+++ b/msdos/ChangeLog	Wed May 19 22:54:44 2010 +0000
@@ -1,3 +1,10 @@
+2010-05-19  Glenn Morris  <rgm@gnu.org>
+
+	* sed2v2.inp (ORDINARY_LINK): Set here rather than in s/msdos.h.
+
+	* sed1v2.inp (LD): Edit to $(CC).
+	(YMF_PASS_LDFLAGS): Edit to `flags'.
+
 2010-05-18  Eli Zaretskii  <eliz@gnu.org>
 
 	* sed1x.inp: Add copyright notice.
--- a/msdos/sed1v2.inp	Tue May 18 23:23:58 2010 +0000
+++ b/msdos/sed1v2.inp	Wed May 19 22:54:44 2010 +0000
@@ -55,6 +55,7 @@
 /^TEMACS_LDFLAGS2 *=/s/@TEMACS_LDFLAGS2@/$(LDFLAGS)/
 /^LIBS_SYSTEM *=/s/@LIBS_SYSTEM@//
 /^LIB_GCC *=/s/@LIB_GCC@/-Lgcc/
+/^LD *=/s/@LINKER@/$(CC)/
 /^LIB_STANDARD *=/s/@LIB_STANDARD@//
 /^LIB_MATH *=/s/@LIB_MATH@/-lm/
 /^LIBTIFF *=/s/@LIBTIFF@//
@@ -143,6 +144,7 @@
 /^	@: /d
 /^	-\{0,1\}ln -/s/ln -f/cp -pf/
 /^[ 	]touch /s/touch/djecho $@ >/
+s/@YMF_PASS_LDFLAGS@/flags/
 s/bootstrap-emacs/b-emacs/
 s/bootstrap-temacs/b-temacs/
 s/bootstrap-doc/b-doc/
--- a/msdos/sed2v2.inp	Tue May 18 23:23:58 2010 +0000
+++ b/msdos/sed2v2.inp	Wed May 19 22:54:44 2010 +0000
@@ -52,6 +52,7 @@
 /^#undef HAVE_MKSTEMP *$/s/^.*$/#define HAVE_MKSTEMP 1/
 /^#undef HAVE_STRUCT_TM_TM_ZONE *$/s/^.*$/#define HAVE_STRUCT_TM_TM_ZONE 1/
 /^#undef HAVE_SYNC *$/s/^.*$/#define HAVE_SYNC 1/
+/^#undef ORDINARY_LINK/s/^.*$/#define ORDINARY_LINK 1/
 /^#undef PACKAGE_BUGREPORT/s/^.*$/#define PACKAGE_BUGREPORT ""/
 /^#undef PACKAGE_NAME/s/^.*$/#define PACKAGE_NAME ""/
 /^#undef PACKAGE_STRING/s/^.*$/#define PACKAGE_STRING ""/
--- a/src/ChangeLog	Tue May 18 23:23:58 2010 +0000
+++ b/src/ChangeLog	Wed May 19 22:54:44 2010 +0000
@@ -1,3 +1,28 @@
+2010-05-19  Eli Zaretskii  <eliz@gnu.org>
+
+	* bidi.c (bidi_cache_shrink, bidi_cache_iterator_state): Fix
+	reallocation of the cache.  (Bug#6210)
+
+2010-05-19  Glenn Morris  <rgm@gnu.org>
+
+	* s/msdos.h (ORDINARY_LINK): Move to sed2v2.inp.
+
+	* Makefile.in (LD, YMF_PASS_LDFLAGS): Set with configure, not cpp.
+	(GNULIB_VAR): Remove.
+	(LIBES): Use LIB_GCC instead of GNULIB_VAR.
+
+	* m/ibms390x.h (LINKER):
+	* m/macppc.h (LINKER) [GNU_LINUX]:
+	* s/aix4-2.h (ORDINARY_LINK):
+	* s/cygwin.h (LINKER):
+	* s/darwin.h (ORDINARY_LINK):
+	* s/gnu.h (ORDINARY_LINK):
+	* s/netbsd.h (LINKER):
+	* s/usg5-4.h (ORDINARY_LINK):
+	Move to configure.
+
+	* s/aix4-2.h (LINKER): Remove; this file sets ORDINARY_LINK.
+
 2010-05-18  Chong Yidong  <cyd@stupidchicken.com>
 
 	* character.c (Fstring, Funibyte_string): Use SAFE_ALLOCA to
--- a/src/Makefile.in	Tue May 18 23:23:58 2010 +0000
+++ b/src/Makefile.in	Wed May 19 22:54:44 2010 +0000
@@ -124,6 +124,8 @@
 ## Where to find libgcc.a, if using gcc and necessary.
 LIB_GCC=@LIB_GCC@
 
+LD=@LINKER@
+
 ## May use $CRT_DIR.
 LIB_STANDARD=@LIB_STANDARD@
 
@@ -329,52 +331,6 @@
 	$(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $<
 
 
-/* A macro which other sections of Makefile can redefine to munge the
-   flags before they are passed to LD.  This is helpful if you have
-   redefined LD to something odd, like "gcc".
-   (The YMF prefix is a holdover from the old name "ymakefile".)  */
-#define YMF_PASS_LDFLAGS(flags) flags
-
-
-#ifdef ORDINARY_LINK
-LD = $(CC)
-
-#else /* not ORDINARY_LINK */
-GNULIB_VAR = $(LIB_GCC)
-
-/* Fix linking if compiled with GCC.  */
-#if defined (__GNUC__) && ! defined (LINKER)
-/* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
-   places that are difficult to figure out at make time.  Fortunately,
-   these same versions allow you to pass arbitrary flags on to the
-   linker, so there is no reason not to use it as a linker.
-
-   Well, it is not quite perfect.  The "-nostdlib" keeps GCC from
-   searching for libraries in its internal directories, so we have to
-   ask GCC explicitly where to find libgcc.a.  */
-#define LINKER $(CC) -nostdlib
-/* GCC passes any argument prefixed with -Xlinker directly to the linker.
-   See prefix-args.c for an explanation of why we do not do this with the
-   shell''s ``for'' construct.  Note that sane people do not have '.' in
-   their paths, so we must use ./prefix-args.  */
-#undef YMF_PASS_LDFLAGS
-#define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags`
-#endif /* defined (__GNUC__) && ! defined (LINKER) */
-
-#ifdef LINKER
-LD=LINKER
-#else /* not LINKER */
-LD=ld
-#endif /* not LINKER */
-
-#endif /* not ORDINARY_LINK */
-
-
-#ifdef NS_IMPL_GNUSTEP
-LD=$(CC) -rdynamic
-#endif
-
-
 /* lastfile must follow all files whose initialized data areas should
    be dumped as pure by dump-emacs.  */
 obj=    dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \
@@ -634,13 +590,13 @@
 /* Construct full set of libraries to be linked.
    Note that SunOS needs -lm to come before -lc; otherwise, you get
    duplicated symbols.  If the standard libraries were compiled
-   with GCC, we might need gnulib again after them.  */
+   with GCC, we might need LIB_GCC again after them.  */
 
 LIBES = $(LOADLIBES) $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \
    $(RSVG_LIBS) $(DBUS_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \
    $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) ${GCONF_LIBS} ${LIBSELINUX_LIBS} \
    $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \
-   $(GNULIB_VAR) $(LIB_MATH) $(LIB_STANDARD) $(GNULIB_VAR)
+   $(LIB_GCC) $(LIB_MATH) $(LIB_STANDARD) $(LIB_GCC)
 
 all: emacs${EXEEXT} $(OTHER_FILES)
 
@@ -682,6 +638,8 @@
 buildobj.h: Makefile
 	echo "#define BUILDOBJ \"${obj} ${otherobj} " "\"" > buildobj.h
 
+#define YMF_PASS_LDFLAGS(flags) @YMF_PASS_LDFLAGS@
+
 temacs${EXEEXT}: $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} prefix-args${EXEEXT}
 	$(LD) YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \
 	  ${NS_IMPL_GNUSTEP_TEMACS_LDFLAGS} ) \
--- a/src/bidi.c	Tue May 18 23:23:58 2010 +0000
+++ b/src/bidi.c	Wed May 19 22:54:44 2010 +0000
@@ -543,6 +543,7 @@
 #define BIDI_CACHE_CHUNK 200
 static struct bidi_it *bidi_cache;
 static size_t bidi_cache_size = 0;
+static size_t elsz = sizeof (struct bidi_it);
 static int bidi_cache_idx;	/* next unused cache slot */
 static int bidi_cache_last_idx;	/* slot of last cache hit */
 
@@ -558,8 +559,9 @@
 {
   if (bidi_cache_size > BIDI_CACHE_CHUNK)
     {
-      bidi_cache_size = BIDI_CACHE_CHUNK * sizeof (struct bidi_it);
-      bidi_cache = (struct bidi_it *) xrealloc (bidi_cache, bidi_cache_size);
+      bidi_cache_size = BIDI_CACHE_CHUNK;
+      bidi_cache =
+	(struct bidi_it *) xrealloc (bidi_cache, bidi_cache_size * elsz);
     }
   bidi_cache_reset ();
 }
@@ -688,9 +690,9 @@
       /* Enlarge the cache as needed.  */
       if (idx >= bidi_cache_size)
 	{
-	  bidi_cache_size += BIDI_CACHE_CHUNK * sizeof (struct bidi_it);
+	  bidi_cache_size += BIDI_CACHE_CHUNK;
 	  bidi_cache =
-	    (struct bidi_it *) xrealloc (bidi_cache, bidi_cache_size);
+	    (struct bidi_it *) xrealloc (bidi_cache, bidi_cache_size * elsz);
 	}
       /* Character positions should correspond to cache positions 1:1.
 	 If we are outside the range of cached positions, the cache is
--- a/src/config.in	Tue May 18 23:23:58 2010 +0000
+++ b/src/config.in	Wed May 19 22:54:44 2010 +0000
@@ -841,6 +841,9 @@
 /* Define to 1 if you are using NS windowing under GNUstep. */
 #undef NS_IMPL_GNUSTEP
 
+/* Define if the C compiler is the linker. */
+#undef ORDINARY_LINK
+
 /* Define to the address where bug reports for this package should be sent. */
 #undef PACKAGE_BUGREPORT
 
--- a/src/m/ibms390x.h	Tue May 18 23:23:58 2010 +0000
+++ b/src/m/ibms390x.h	Wed May 19 22:54:44 2010 +0000
@@ -62,8 +62,6 @@
 /* On the 64 bit architecture, we can use 60 bits for addresses */
 #define VALBITS         60
 
-#define LINKER $(CC) -nostdlib
-
 /* Define XPNTR to avoid or'ing with DATA_SEG_BITS */
 #define XPNTR(a) XUINT (a)
 
--- a/src/m/macppc.h	Tue May 18 23:23:58 2010 +0000
+++ b/src/m/macppc.h	Wed May 19 22:54:44 2010 +0000
@@ -32,12 +32,6 @@
 #define HAVE_TEXT_START
 #endif
 
-/* NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says this is needed
-   For MkLinux/LinuxPPC.  */
-#ifdef GNU_LINUX
-#define LINKER $(CC) -nostdlib
-#endif
-
 #ifdef _ARCH_PPC64
 #ifndef _LP64
 #define _LP64
--- a/src/s/aix4-2.h	Tue May 18 23:23:58 2010 +0000
+++ b/src/s/aix4-2.h	Wed May 19 22:54:44 2010 +0000
@@ -61,11 +61,7 @@
 /* The kernel symbol where the load average is found is named avenrun.  */
 #define LDAV_SYMBOL "avenrun"
 
-/* Special itemss needed to make Emacs run on this system.  */
-
-#ifndef __GNUC__
-#define LINKER cc
-#endif
+/* Special items needed to make Emacs run on this system.  */
 
 /* The following definition seems to be needed in AIX version 3.1.6.8.
    It may not have been needed in certain earlier versions.  */
@@ -110,7 +106,5 @@
 
 #define UNEXEC unexaix.o
 
-#define ORDINARY_LINK
-
 /* arch-tag: 38fe75ea-6aef-42bd-8449-bc34d921a562
    (do not change this comment) */
--- a/src/s/cygwin.h	Tue May 18 23:23:58 2010 +0000
+++ b/src/s/cygwin.h	Wed May 19 22:54:44 2010 +0000
@@ -1,7 +1,7 @@
 /* System description header file for Cygwin.
 
 Copyright (C) 1985, 1986, 1992, 1999, 2002, 2003, 2004, 2005, 2006,
-  2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+  2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -19,7 +19,7 @@
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* SYSTEM_TYPE should indicate the kind of system you are using.
- It sets the Lisp variable system-type.  */
+   It sets the Lisp variable system-type.  */
 #define SYSTEM_TYPE "cygwin"
 
 /* Emacs can read input using SIGIO and buffering characters itself,
@@ -94,7 +94,6 @@
 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
 #define SYSV_SYSTEM_DIR 1
 #define UNEXEC unexcw.o
-#define LINKER $(CC)
 
 #define HAVE_SOCKETS
 
--- a/src/s/darwin.h	Tue May 18 23:23:58 2010 +0000
+++ b/src/s/darwin.h	Wed May 19 22:54:44 2010 +0000
@@ -147,9 +147,6 @@
 #undef HAVE_POSIX_MEMALIGN
 #endif
 
-/* Link this program just by running cc.  */
-#define ORDINARY_LINK
-
 /* Define the following so emacs symbols will not conflict with those
    in the System framework.  Otherwise -prebind will not work.  */
 
--- a/src/s/gnu.h	Tue May 18 23:23:58 2010 +0000
+++ b/src/s/gnu.h	Wed May 19 22:54:44 2010 +0000
@@ -29,8 +29,7 @@
 
 #define SIGNALS_VIA_CHARACTERS
 
-/* GNU needs its own crt0, and libc defines data_start.  */
-#define ORDINARY_LINK
+/* libc defines data_start.  */
 #define DATA_START ({ extern int data_start; (char *) &data_start; })
 
 /* Some losing code fails to include this and then assumes
--- a/src/s/msdos.h	Tue May 18 23:23:58 2010 +0000
+++ b/src/s/msdos.h	Wed May 19 22:54:44 2010 +0000
@@ -82,8 +82,6 @@
 
 #define _NAIVE_DOS_REGS
 
-#define ORDINARY_LINK
-
 /* command.com does not understand `...` so we define this.  */
 #define SEPCHAR ';'
 
--- a/src/s/netbsd.h	Tue May 18 23:23:58 2010 +0000
+++ b/src/s/netbsd.h	Wed May 19 22:54:44 2010 +0000
@@ -26,12 +26,6 @@
 
 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
 
-/* On post 1.3 releases of NetBSD, gcc -nostdlib also clears
-   the library search parth, i.e. it won't search /usr/lib
-   for libc and friends.  Using -nostartfiles instead avoids
-   this problem, and will also work on earlier NetBSD releases.  */
-#define LINKER $(CC) -nostartfiles
-
 #define DEFAULT_SOUND_DEVICE "/dev/audio"
 
 /* Greg A. Woods <woods@weird.com> says we must include signal.h
--- a/src/s/usg5-4.h	Tue May 18 23:23:58 2010 +0000
+++ b/src/s/usg5-4.h	Wed May 19 22:54:44 2010 +0000
@@ -69,8 +69,6 @@
 /* On USG systems signal handlers return void.  */
 #define SIGTYPE void
 
-#define ORDINARY_LINK
-
 /* Undump with ELF.  */
 #undef COFF