changeset 109203:bd4b41db940e

Merge from mainline.
author Katsumi Yamaoka <katsumi@flagship2>
date Tue, 25 May 2010 11:10:15 +0000
parents 1a5381cbfe12 (current diff) 481bba2e11df (diff)
children d1f39bab57ad
files etc/NEWS.23 lisp/obsolete/complete.el
diffstat 72 files changed, 772 insertions(+), 517 deletions(-) [+]
line wrap: on
line diff
--- a/.bzrignore	Mon May 24 12:00:00 2010 +0000
+++ b/.bzrignore	Tue May 25 11:10:15 2010 +0000
@@ -68,3 +68,4 @@
 conftest*
 confdefs.h
 core
+lib-src/stamp-*
--- a/ChangeLog	Mon May 24 12:00:00 2010 +0000
+++ b/ChangeLog	Tue May 25 11:10:15 2010 +0000
@@ -1,3 +1,12 @@
+2010-05-25  Glenn Morris  <rgm@gnu.org>
+
+	* configure.in (LD_SWITCH_SYSTEM): Move some gnu-linux stuff...
+	(LD_SWITCH_SYSTEM_TEMACS): ... to here.
+
+	* configure.in (LD_SWITCH_SYSTEM_EXTRA): Remove.
+	(LD_SWITCH_SYSTEM_TEMACS): Put darwin stuff from LD_SWITCH_SYSTEM_EXTRA
+	here instead.
+
 2010-05-24  Romain Francoise  <romain@orebokech.com>
 
 	* make-dist: Look for version in src/emacs.c.
--- a/configure	Mon May 24 12:00:00 2010 +0000
+++ b/configure	Tue May 25 11:10:15 2010 +0000
@@ -820,7 +820,6 @@
 PRE_ALLOC_OBJ
 POST_ALLOC_OBJ
 LD_SWITCH_SYSTEM_TEMACS
-LD_SWITCH_SYSTEM_EXTRA
 YMF_PASS_LDFLAGS
 LINKER
 LIB_GCC
@@ -5930,16 +5929,17 @@
 
 ac_link="$ac_link $LD_SWITCH_SYSTEM"
 
-## This is fun.  Some settings of LD_SWITCH_SYSTEM reference
-## LD_SWITCH_X_SITE_AUX, which has not been defined yet.  When using
-## cpp, it was expanded to null.  Thus LD_SWITCH_SYSTEM had different
-## values in configure and the Makefiles.  How helpful.
-## FIXME why not use LD_SWITCH_SYSTEM_TEMACS (or somesuch) instead?
+## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX,
+## which has not been defined yet.  When this was handled with cpp,
+## it was expanded to null when configure sourced the s/*.h file.
+## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
+## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
+## (or somesuch), but because it is supposed to go at the _front_
+## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
+## Compare with the gnu-linux case below, which added to the end
+## of LD_SWITCH_SYSTEM, and so can instead go at the front of
+## LD_SWITCH_SYSTEM_TEMACS.
 case "$opsys" in
-  gnu-linux)
-   ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time.
-   LD_SWITCH_SYSTEM="$LD_SWITCH_SYSTEM \$(LD_SWITCH_X_SITE_AUX)" ;;
-
   netbsd|openbsd)
    ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R.
    LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;;
@@ -26595,42 +26595,47 @@
   aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
 
   darwin)
-  ## The -headerpad option tells ld (see man page) to leave room at the
-  ## end of the header for adding load commands.  Needed for dumping.
-  ## 0x690 is the total size of 30 segment load commands (at 56
-  ## each); under Cocoa 31 commands are required.
-  if test "$HAVE_NS" = "yes"; then
-    libs_nsgui="-framework AppKit"
-    headerpad_extra=6C8
-  else
-    libs_nsgui=
-    headerpad_extra=690
-  fi
-  LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
-  ;;
+   ## The -headerpad option tells ld (see man page) to leave room at the
+   ## end of the header for adding load commands.  Needed for dumping.
+   ## 0x690 is the total size of 30 segment load commands (at 56
+   ## each); under Cocoa 31 commands are required.
+   if test "$HAVE_NS" = "yes"; then
+     libs_nsgui="-framework AppKit"
+     headerpad_extra=6C8
+   else
+     libs_nsgui=
+     headerpad_extra=690
+   fi
+   LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
+
+   ## This is here because src/Makefile.in did some extra fiddling around
+   ## with LD_SWITCH_SYSTEM.  The cpp logic was:
+   ##   #ifndef LD_SWITCH_SYSTEM
+   ##   #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
+   ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
+   ## not using gcc, darwin system not on an alpha (ie darwin, since
+   ## darwin + alpha does not occur).
+   ## Because this was done in src/Makefile.in, the resulting part of
+   ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
+   ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
+   ## rather than LD_SWITCH_SYSTEM.
+   test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
+     LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
+   ;;
+
+  ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time.
+  ## When handled by cpp, this was in LD_SWITCH_SYSTEM.  However, at
+  ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX
+  ## had not yet been defined and was expanded to null.  Hence LD_SWITCH_SYSTEM
+  ## had different values in configure (in ac_link) and src/Makefile.in.
+  ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
+  gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;;
 
   *) LD_SWITCH_SYSTEM_TEMACS= ;;
 esac
 
 
 
-## This exists because src/Makefile.in did some extra fiddling around
-## with LD_SWITCH_SYSTEM.  The cpp logic was:
-##   #ifndef LD_SWITCH_SYSTEM
-##   #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
-## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
-## not using gcc, darwin system not on an alpha (ie darwin, since
-## darwin + alpha does not occur).
-## Note that unlike L_S_S, this is not used in ac_link.
-if test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
-   test "$opsys" = "darwin"; then
-  LD_SWITCH_SYSTEM_EXTRA="-X"
-else
-  LD_SWITCH_SYSTEM_EXTRA=
-fi
-
-
-
 LINKER=
 ORDINARY_LINK=
 case "$opsys" in
@@ -28154,7 +28159,6 @@
 done
 
 # Build src/Makefile from ${srcdir}/src/Makefile.c
-# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
 # This must be done after src/config.h is built, since we rely on that file.
 
 echo creating src/epaths.h
--- a/configure.in	Mon May 24 12:00:00 2010 +0000
+++ b/configure.in	Tue May 25 11:10:15 2010 +0000
@@ -955,16 +955,17 @@
 
 ac_link="$ac_link $LD_SWITCH_SYSTEM"
 
-## This is fun.  Some settings of LD_SWITCH_SYSTEM reference
-## LD_SWITCH_X_SITE_AUX, which has not been defined yet.  When using
-## cpp, it was expanded to null.  Thus LD_SWITCH_SYSTEM had different
-## values in configure and the Makefiles.  How helpful.
-## FIXME why not use LD_SWITCH_SYSTEM_TEMACS (or somesuch) instead?
+## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX,
+## which has not been defined yet.  When this was handled with cpp,
+## it was expanded to null when configure sourced the s/*.h file.
+## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
+## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
+## (or somesuch), but because it is supposed to go at the _front_
+## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
+## Compare with the gnu-linux case below, which added to the end
+## of LD_SWITCH_SYSTEM, and so can instead go at the front of
+## LD_SWITCH_SYSTEM_TEMACS.
 case "$opsys" in
-  gnu-linux)
-   ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time.
-   LD_SWITCH_SYSTEM="$LD_SWITCH_SYSTEM \$(LD_SWITCH_X_SITE_AUX)" ;;
-
   netbsd|openbsd)
    ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R.
    LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;;
@@ -3272,42 +3273,47 @@
   aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
 
   darwin)
-  ## The -headerpad option tells ld (see man page) to leave room at the
-  ## end of the header for adding load commands.  Needed for dumping.
-  ## 0x690 is the total size of 30 segment load commands (at 56
-  ## each); under Cocoa 31 commands are required.
-  if test "$HAVE_NS" = "yes"; then
-    libs_nsgui="-framework AppKit"
-    headerpad_extra=6C8
-  else
-    libs_nsgui=
-    headerpad_extra=690
-  fi
-  LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
-  ;;
+   ## The -headerpad option tells ld (see man page) to leave room at the
+   ## end of the header for adding load commands.  Needed for dumping.
+   ## 0x690 is the total size of 30 segment load commands (at 56
+   ## each); under Cocoa 31 commands are required.
+   if test "$HAVE_NS" = "yes"; then
+     libs_nsgui="-framework AppKit"
+     headerpad_extra=6C8
+   else
+     libs_nsgui=
+     headerpad_extra=690
+   fi
+   LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
+ 
+   ## This is here because src/Makefile.in did some extra fiddling around
+   ## with LD_SWITCH_SYSTEM.  The cpp logic was:
+   ##   #ifndef LD_SWITCH_SYSTEM
+   ##   #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
+   ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
+   ## not using gcc, darwin system not on an alpha (ie darwin, since
+   ## darwin + alpha does not occur).
+   ## Because this was done in src/Makefile.in, the resulting part of
+   ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
+   ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
+   ## rather than LD_SWITCH_SYSTEM.
+   test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
+     LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
+   ;;
+
+  ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time.
+  ## When handled by cpp, this was in LD_SWITCH_SYSTEM.  However, at
+  ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX
+  ## had not yet been defined and was expanded to null.  Hence LD_SWITCH_SYSTEM
+  ## had different values in configure (in ac_link) and src/Makefile.in.
+  ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
+  gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;;
 
   *) LD_SWITCH_SYSTEM_TEMACS= ;;
 esac
 AC_SUBST(LD_SWITCH_SYSTEM_TEMACS)
 
 
-## This exists because src/Makefile.in did some extra fiddling around
-## with LD_SWITCH_SYSTEM.  The cpp logic was:
-##   #ifndef LD_SWITCH_SYSTEM
-##   #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
-## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
-## not using gcc, darwin system not on an alpha (ie darwin, since
-## darwin + alpha does not occur).
-## Note that unlike L_S_S, this is not used in ac_link.
-if test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
-   test "$opsys" = "darwin"; then
-  LD_SWITCH_SYSTEM_EXTRA="-X"
-else
-  LD_SWITCH_SYSTEM_EXTRA=
-fi
-AC_SUBST(LD_SWITCH_SYSTEM_EXTRA)
-
-
 LINKER=
 ORDINARY_LINK=
 case "$opsys" in
@@ -3786,7 +3792,6 @@
 done
 
 # Build src/Makefile from ${srcdir}/src/Makefile.c
-# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
 # This must be done after src/config.h is built, since we rely on that file.
 
 echo creating src/epaths.h
--- a/etc/ChangeLog	Mon May 24 12:00:00 2010 +0000
+++ b/etc/ChangeLog	Tue May 25 11:10:15 2010 +0000
@@ -1,3 +1,7 @@
+2010-05-24  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* NEWS: Add sections for Emacs-23.3.
+
 2010-05-08  Chong Yidong  <cyd@stupidchicken.com>
 
 	* PROBLEMS: Document gcc-4.5 bug (Bug#6031).
@@ -43,8 +47,7 @@
 
 2010-03-24  Francesc Rocher  <rocher@member.fsf.org>
 
-	* MORE.STUFF: Remove CEDET entry, now distributed as part of
-	Emacs.
+	* MORE.STUFF: Remove CEDET entry, now distributed as part of Emacs.
 
 2010-03-22  Teodor Zlatanov  <tzz@lifelogs.com>
 
--- a/etc/NEWS.23	Mon May 24 12:00:00 2010 +0000
+++ b/etc/NEWS.23	Tue May 25 11:10:15 2010 +0000
@@ -15,6 +15,33 @@
 with a prefix argument or by typing C-u C-h C-n.
 
 
+* Installation Changes in Emacs 23.3
+
+* Startup Changes in Emacs 23.3
+
+* Changes in Emacs 23.3
+
+
+* Editing Changes in Emacs 23.3
+
+
+* Changes in Specialized Modes and Packages in Emacs 23.3
+
+
+* New Modes and Packages in Emacs 23.3
+
+
+* Incompatible Lisp Changes in Emacs 23.3
+
+
+* Lisp changes in Emacs 23.3
+
+** New function byte-to-string, like char-to-string but for bytes.
+
+
+* Changes in Emacs 23.3 on non-free operating systems
+
+
 * Installation Changes in Emacs 23.2
 
 ** New configure options for Emacs developers.
--- a/etc/TODO	Mon May 24 12:00:00 2010 +0000
+++ b/etc/TODO	Tue May 25 11:10:15 2010 +0000
@@ -181,7 +181,14 @@
 http://lists.gnu.org/archive/html/emacs-devel/2008-08/msg00456.html
 
 * Important features:
-
+** Extended text-properties (to make overlays "obsolete")
+*** Several text-property planes
+This would get us rid of font-lock-face property (and I'd be happy to
+get rid of char-property-alias-alist as well) since font-lock would
+simply use the `face' property in the `font-lock' plane.
+Each property would come with an Elisp merge-function.  The merge
+would be performed in add-text-properties.
+*** zero-width text-properties.
 ** Having tabs above a window to switch buffers in it.
 
 ** "Perspectives" are named persistent window configurations.  We have
--- a/lisp/ChangeLog	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/ChangeLog	Tue May 25 11:10:15 2010 +0000
@@ -1,3 +1,67 @@
+2010-05-25  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/tramp.el (tramp-progress-reporter-update): New defun.
+	(with-progress-reporter): Use it.
+	(tramp-process-actions):
+	* net/tramp-gvfs.el (tramp-gvfs-handler-askquestion): Preserve
+	current message, in order to let progress reporter continue
+	afterwards.  (Bug#6257)
+
+2010-05-25  Glenn Morris  <rgm@gnu.org>
+
+	* net/rcirc.el (rcirc-default-user-name, rcirc-default-full-name):
+	Add :version.
+
+2010-05-25  Ryan Yeske  <rcyeske@gmail.com>
+
+	* net/rcirc.el (rcirc-server-alist): Add :pass.
+	(rcirc-default-user-name): Change to "user".
+	(rcirc-default-full-name): Change to "unknown".
+	(rcirc-user-name-history): Add variable.
+	(rcirc): When prompting for connection paramaters, also prompt for
+	username and password.
+	(rcirc-connect): Take a PASS argument.	If PASS is non-nil, send
+	value to server when connecting.
+
+2010-05-25  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* emacs-lisp/smie.el (smie-set-prec2tab): Check override before use.
+	(smie-merge-prec2s): Pass the tables as separate args.
+	(smie-bnf-precedence-table): Adjust call accordingly.
+	(smie-prec2-levels): Set levels at the end.
+
+	Replace Lisp calls to delete-backward-char by delete-char.
+	* bs.el, expand.el, ido.el, image-dired.el, lpr.el, pcomplete.el,
+	skeleton.el, term.el, time.el, wid-edit.el, woman.el,
+	calc/calc-graph.el, calc/calc-help.el, calc/calc-incom.el,
+	calc/calc.el, emacs-cl-extra.el, emacs-cl-loaddefs.el,
+	emulation/cua-rect.el, emulation/viper-ex.el, eshell/esh-test.el,
+	eshell/eshell.el, gnus/gnus-uu.el, gnus/nndoc.el, gnus/nnrss.el,
+	gnus/rfc2047.el, gnus/utf7.el, international/utf-7.el,
+	language/ethio-util.el, mh-e/mh-alias.el, mh-e/mh-search.el,
+	net/imap.el, net/rcirc.el, obsolete/complete.el, play/decipher.el,
+	progmodes/ada-mode.el, progmodes/cc-awk.el, progmodes/dcl-mode.el,
+	progmodes/ps-mode.el, progmodes/verilog-mode.el,
+	progmodes/vhdl-mode.el, textmodes/bibtex.el, textmodes/fill.el,
+	textmodes/reftex-auc.el, textmodes/rst.el, textmodes/sgml-mode.el,
+	textmodes/table.el, textmodes/texinfmt.el: Replace Lisp calls to
+	delete-backward-char by calls to delete-char.
+
+2010-05-25  Kenichi Handa  <handa@m17n.org>
+
+	* language/hebrew.el (hebrew-shape-gstring): New function.
+	Register it in composition-function-table for all Hebrew combining
+	characters.
+
+2010-05-24  Uday S Reddy  <u.s.reddy@cs.bham.ac.uk>  (tiny change)
+
+	* textmodes/fill.el (fill-region): Don't fill past the end (bug#6201).
+
+2010-05-24  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* subr.el (read-quoted-char): Resolve modifiers after key
+	remapping (bug#6212).
+
 2010-05-22  Chong Yidong  <cyd@stupidchicken.com>
 
 	* image.el (image-refresh): Define as an alias for image-flush.
@@ -13,9 +77,9 @@
 
 2010-05-21  Alan Mackenzie  <acm@muc.de>
 
-	* progmodes/cc-engine.el (c-parse-state-get-strategy): Replace
-	parameter `here' with `here-' and `here-plus', which sandwich any
-	pertinent CPP construct.
+	* progmodes/cc-engine.el (c-parse-state-get-strategy):
+	Replace parameter `here' with `here-' and `here-plus', which sandwich
+	any pertinent CPP construct.
 	(c-remove-stale-state-cache-backwards): Fix a bug which happens
 	when doing (c-parse-state) in a CPP construct: Exclude any "new"
 	CPP construct from taking part in the scanning.
@@ -23,8 +87,8 @@
 2010-05-21  Michael Albinus  <michael.albinus@gmx.de>
 
 	* net/tramp.el (tramp-do-copy-or-rename-file)
-	(tramp-handle-file-local-copy, tramp-maybe-open-connection): Tune
-	`with-progress-reporter' messages.
+	(tramp-handle-file-local-copy, tramp-maybe-open-connection):
+	Tune `with-progress-reporter' messages.
 	(tramp-handle-vc-registered):
 	* net/tramp-fish.el (tramp-fish-handle-file-local-copy)
 	(tramp-fish-handle-insert-file-contents)
--- a/lisp/bs.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/bs.el	Tue May 25 11:10:15 2010 +0000
@@ -1152,7 +1152,7 @@
     (dolist (buffer list)
       (bs--insert-one-entry buffer)
       (insert "\n"))
-    (delete-backward-char 1)
+    (delete-char -1)
     (bs--set-window-height)
     (bs--goto-current-buffer)
     (font-lock-fontify-buffer)
--- a/lisp/calc/calc-graph.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/calc/calc-graph.el	Tue May 25 11:10:15 2010 +0000
@@ -433,7 +433,7 @@
 	   (while (memq (preceding-char) '(?\s ?\t))
 	     (forward-char -1))
 	   (if (eq (preceding-char) ?\,)
-	       (delete-backward-char 1))))
+	       (delete-char -1))))
        (with-current-buffer calcbuf
 	 (setq cache-env (list calc-angle-mode
 			       calc-complex-mode
--- a/lisp/calc/calc-help.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/calc/calc-help.el	Tue May 25 11:10:15 2010 +0000
@@ -128,7 +128,7 @@
               (dig2 (char-after (match-beginning 3))))
           (delete-region (match-end 1) (match-end 0))
           (goto-char (match-beginning 1))
-          (delete-backward-char 1)
+          (delete-char -1)
           (delete-char 5)
           (insert (format "%c .. %c" (min dig1 dig2) (max dig1 dig2)))))
       (goto-char (point-min)))))
--- a/lisp/calc/calc-incom.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/calc/calc-incom.el	Tue May 25 11:10:15 2010 +0000
@@ -176,9 +176,9 @@
 (defun calc-digit-dots ()
   (if (eq calc-prev-char ?.)
       (progn
-	(delete-backward-char 1)
+	(delete-char -1)
 	(if (calc-minibuffer-contains ".*\\.\\'")
-	    (delete-backward-char 1))
+	    (delete-char -1))
 	(setq calc-prev-char 'dots
 	      last-command-event 32)
 	(if calc-prev-prev-char
@@ -188,7 +188,7 @@
             (erase-buffer))
 	  (exit-minibuffer)))
     ;; just ignore extra decimal point, anticipating ".."
-    (delete-backward-char 1)))
+    (delete-char -1)))
 
 (defun calc-dots ()
   (interactive)
--- a/lisp/calc/calc.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/calc/calc.el	Tue May 25 11:10:15 2010 +0000
@@ -2386,7 +2386,7 @@
 	    (progn
 	      (require 'calc-ext)
 	      (calc-digit-dots))
-	  (delete-backward-char 1)
+	  (delete-char -1)
 	  (beep)
 	  (calc-temp-minibuffer-message " [Bad format]"))))))
   (setq calc-prev-prev-char calc-prev-char
--- a/lisp/emacs-lisp/bytecomp.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/emacs-lisp/bytecomp.el	Tue May 25 11:10:15 2010 +0000
@@ -353,7 +353,7 @@
 (defvar byte-compile-interactive-only-functions
   '(beginning-of-buffer end-of-buffer replace-string replace-regexp
     insert-file insert-buffer insert-file-literally previous-line next-line
-    goto-line comint-run)
+    goto-line comint-run delete-backward-char)
   "List of commands that are not meant to be called from Lisp.")
 
 (defvar byte-compile-not-obsolete-vars nil
--- a/lisp/emacs-lisp/cl-extra.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/emacs-lisp/cl-extra.el	Tue May 25 11:10:15 2010 +0000
@@ -685,7 +685,7 @@
     (setq last (point))
     (goto-char (1+ pt))
     (while (search-forward "(quote " last t)
-      (delete-backward-char 7)
+      (delete-char -7)
       (insert "'")
       (forward-sexp)
       (delete-char 1))
--- a/lisp/emacs-lisp/cl-loaddefs.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/emacs-lisp/cl-loaddefs.el	Tue May 25 11:10:15 2010 +0000
@@ -10,7 +10,7 @@
 ;;;;;;  ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p
 ;;;;;;  cl-map-overlays cl-map-intervals cl-map-keymap-recursively
 ;;;;;;  notevery notany every some mapcon mapcan mapl maplist map
-;;;;;;  cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "d93072a26c59f663a92b10df8bc28187")
+;;;;;;  cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "deb3495d75c36a222e5238eadb8e347c")
 ;;; Generated autoloads from cl-extra.el
 
 (autoload 'coerce "cl-extra" "\
--- a/lisp/emacs-lisp/smie.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/emacs-lisp/smie.el	Tue May 25 11:10:15 2010 +0000
@@ -72,7 +72,7 @@
   (let* ((key (cons x y))
          (old (gethash key table)))
     (if (and old (not (eq old val)))
-        (if (gethash key override)
+        (if (and override (gethash key override))
             ;; FIXME: The override is meant to resolve ambiguities,
             ;; but it also hides real conflicts.  It would be great to
             ;; be able to distinguish the two cases so that overrides
@@ -104,7 +104,7 @@
                 (smie-set-prec2tab prec2-table other-op op op1)))))))
     prec2-table))
 
-(defun smie-merge-prec2s (tables)
+(defun smie-merge-prec2s (&rest tables)
   (if (null (cdr tables))
       (car tables)
     (let ((prec2 (make-hash-table :test 'equal)))
@@ -121,8 +121,8 @@
         (first-nts-table ())
         (last-nts-table ())
         (prec2 (make-hash-table :test 'equal))
-        (override (smie-merge-prec2s
-                   (mapcar 'smie-precs-precedence-table precs)))
+        (override (apply 'smie-merge-prec2s
+                         (mapcar 'smie-precs-precedence-table precs)))
         again)
     (dolist (rules bnf)
       (let ((nt (car rules))
@@ -234,7 +234,7 @@
               (to (cdar eqs)))
           (setq eqs (cdr eqs))
           (if (eq to from)
-              (debug)                   ;Can it happen?
+              nil                   ;Nothing to do.
             (dolist (other-eq eqs)
               (if (eq from (cdr other-eq)) (setcdr other-eq to))
               (when (eq from (car other-eq))
@@ -271,16 +271,20 @@
         (incf i 10))
       ;; Propagate equalities back to their source.
       (dolist (eq (nreverse eqs))
-        (assert (null (caar eq)))
+        (assert (or (null (caar eq)) (eq (car eq) (cdr eq))))
         (setcar (car eq) (cadr eq)))
       ;; Finally, fill in the remaining vars (which only appeared on the
       ;; right side of the < constraints).
-      ;; Tho leaving them at nil is not a bad choice, since it makes
-      ;; it clear that these don't bind at all.
-      ;; (dolist (x table)
-      ;;   (unless (nth 1 x) (setf (nth 1 x) i))
-      ;;   (unless (nth 2 x) (setf (nth 2 x) i)))
-      )
+      (dolist (x table)
+        ;; When both sides are nil, it means this operator binds very
+        ;; very tight, but it's still just an operator, so we give it
+        ;; the highest precedence.
+        ;; OTOH if only one side is nil, it usually means it's like an
+        ;; open-paren, which is very important for indentation purposes,
+        ;; so we keep it nil, to make it easier to recognize.
+        (unless (or (nth 1 x) (nth 2 x))
+          (setf (nth 1 x) i)
+          (setf (nth 2 x) i))))
     table))
 
 ;;; Parsing using a precedence level table.
--- a/lisp/emulation/cua-rect.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/emulation/cua-rect.el	Tue May 25 11:10:15 2010 +0000
@@ -1344,7 +1344,7 @@
          pad)
         (if (bolp)
             nil
-          (delete-backward-char 1)
+          (delete-char -1)
           (if (cua--rectangle-right-side t)
               (cua--rectangle-insert-col (current-column))
             (setq indent (- l (current-column))))))
--- a/lisp/emulation/viper-ex.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/emulation/viper-ex.el	Tue May 25 11:10:15 2010 +0000
@@ -750,7 +750,7 @@
 			  (format "[^\\\\]\\(\\\\\\\\\\)*\\\\%c" c)))
 		    (setq cont nil)
 		  ;; we are at an escaped delimiter: unescape it and continue
-		  (delete-backward-char 2)
+		  (delete-char -2)
 		  (insert c)
 		  (if (eolp)
 		      ;; if at eol, exit loop and go to next line
--- a/lisp/eshell/esh-test.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/eshell/esh-test.el	Tue May 25 11:10:15 2010 +0000
@@ -101,7 +101,7 @@
       (eshell-redisplay))
     (let ((truth (eval command)))
       (with-current-buffer test-buffer
-	(delete-backward-char 6)
+	(delete-char -6)
 	(insert-before-markers
 	 "[" (let (str)
 	       (if truth
--- a/lisp/eshell/eshell.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/eshell/eshell.el	Tue May 25 11:10:15 2010 +0000
@@ -404,7 +404,7 @@
 	  (assert (not (eshell-interactive-process)))
 	  (goto-char (point-max))
 	  (while (and (bolp) (not (bobp)))
-	    (delete-backward-char 1)))
+	    (delete-char -1)))
 	(assert (and buf (buffer-live-p buf)))
 	(unless arg
 	  (let ((len (if (not intr) 2
--- a/lisp/expand.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/expand.el	Tue May 25 11:10:15 2010 +0000
@@ -368,7 +368,7 @@
     nil))
 
 (defun expand-do-expansion ()
-  (delete-backward-char (length last-abbrev-text))
+  (delete-char (- (length last-abbrev-text)))
   (let* ((vect (symbol-value last-abbrev))
 	 (text (aref vect 0))
 	 (position (aref vect 1))
--- a/lisp/gnus/gnus-uu.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/gnus/gnus-uu.el	Tue May 25 11:10:15 2010 +0000
@@ -1488,7 +1488,7 @@
       (when gnus-uu-kill-carriage-return
 	(save-excursion
 	  (while (search-forward "\r" nil t)
-	    (delete-backward-char 1))))
+	    (delete-char -1))))
 
       (while (or (re-search-forward gnus-uu-begin-string nil t)
 		 (re-search-forward gnus-uu-body-line nil t))
--- a/lisp/gnus/nndoc.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/gnus/nndoc.el	Tue May 25 11:10:15 2010 +0000
@@ -741,7 +741,7 @@
 	(setq p (1+ (nth 3 blk)))))
     (goto-char begin)
     (while (re-search-forward "\r$" nil t)
-      (delete-backward-char 1))
+      (delete-char -1))
     (when head
       (goto-char begin)
       (when (search-forward "\n\n" nil t)
--- a/lisp/gnus/nnrss.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/gnus/nnrss.el	Tue May 25 11:10:15 2010 +0000
@@ -682,7 +682,7 @@
       (rfc2047-encode-region (point-min) (point-max)))
     (goto-char (point-min))
     (while (search-forward "\n" nil t)
-      (delete-backward-char 1))
+      (delete-char -1))
     (buffer-string)))
 
 ;;; Snarf functions
--- a/lisp/gnus/rfc2047.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/gnus/rfc2047.el	Tue May 25 11:10:15 2010 +0000
@@ -427,7 +427,7 @@
 		      ;; since encoded words can't occur in quotes.
 		      (progn
 			(goto-char end)
-			(delete-backward-char 1)
+			(delete-char -1)
 			(goto-char start)
 			(delete-char 1)
 			(when last-encoded
@@ -897,7 +897,7 @@
 		  (goto-char beg)
 		  (while (search-forward "\\" nil 'move)
 		    (unless (memq (char-after) '(?\"))
-		      (delete-backward-char 1))
+		      (delete-char -1))
 		    (forward-char)))
 		(forward-char))
 	    (error
--- a/lisp/gnus/utf7.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/gnus/utf7.el	Tue May 25 11:10:15 2010 +0000
@@ -112,7 +112,7 @@
 		 (skip-chars-forward not-direct-encoding-chars)))
 	    (if (and (= fc esc-char)
 		     (= run-length 1))	; Lone esc-char?
-		(delete-backward-char 1) ; Now there's one too many
+		(delete-char -1)        ; Now there's one too many
 	      (utf7-fragment-encode p (point) for-imap))
 	    (insert "-")))))))
 
@@ -153,7 +153,7 @@
 	      (save-excursion
 		(utf7-fragment-decode p (point) for-imap)
 		(goto-char p)
-		(delete-backward-char 1)))))))))
+		(delete-char -1)))))))))
 
 (defun utf7-fragment-decode (start end &optional for-imap)
   "Decode base64 encoded fragment from START to END of UTF-7 text in buffer.
--- a/lisp/ido.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/ido.el	Tue May 25 11:10:15 2010 +0000
@@ -2815,7 +2815,7 @@
    ((eq this-original-command 'viper-del-backward-char-in-insert)
     (funcall this-original-command))
    (t
-    (delete-backward-char (prefix-numeric-value count)))))
+    (delete-char (- (prefix-numeric-value count))))))
 
 (defun ido-delete-backward-word-updir (count)
   "Delete all chars backwards, or at beginning of buffer, go up one level."
--- a/lisp/image-dired.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/image-dired.el	Tue May 25 11:10:15 2010 +0000
@@ -937,7 +937,7 @@
                ;; If on empty line at end of buffer
                (when (and (eobp)
                           (looking-at "^$"))
-                 (delete-backward-char 1))))))
+                 (delete-char -1))))))
        files)
       (save-buffer)
       (kill-buffer buf))))
--- a/lisp/international/utf-7.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/international/utf-7.el	Tue May 25 11:10:15 2010 +0000
@@ -62,7 +62,7 @@
 		(decode-coding-region p (point) 'utf-16be)
 		(save-excursion
 		  (goto-char p)
-		  (delete-backward-char 1)))))))
+		  (delete-char -1)))))))
       (- (point-max) (point-min)))))
 
 ;;;###autoload
--- a/lisp/language/ethio-util.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/language/ethio-util.el	Tue May 25 11:10:15 2010 +0000
@@ -869,7 +869,7 @@
     (goto-char (point-min))
     (while (re-search-forward "[ሀ-፼]" nil t)
       (setq ucode (preceding-char))
-      (delete-backward-char 1)
+      (delete-char -1)
       (insert
        (format (if ethio-java-save-lowercase "\\u%4x" "\\u%4X")
 	       ucode)))))
--- a/lisp/language/hebrew.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/language/hebrew.el	Tue May 25 11:10:15 2010 +0000
@@ -85,6 +85,35 @@
   :mime-charset 'cp862)
 (define-coding-system-alias 'ibm862 'cp862)
 
+;; Composition function for hebrew.
+(defun hebrew-shape-gstring (gstring)
+  (setq gstring (font-shape-gstring gstring))
+  (let ((header (lgstring-header gstring))
+	(nchars (lgstring-char-len gstring))
+	(nglyphs (lgstring-glyph-len gstring))
+	(base-width (lglyph-width (lgstring-glyph gstring 0))))
+    (while (> nglyphs 1)
+      (setq nglyphs (1- nglyphs))
+      (let* ((glyph (lgstring-glyph gstring nglyphs))
+	     (adjust (and glyph (lglyph-adjustment glyph))))
+	(if adjust
+	    (setq nglyphs 0)
+	  (if (>= (lglyph-lbearing glyph) 0)
+	      (lglyph-set-adjustment glyph (- base-width) 0 0))))))
+  gstring)
+
+(let ((pattern1 "[\u05D0-\u05F2][\u0591-\u05BF\u05C1-\u05C5\u05C7]+")
+      (pattern2 "[\u05D0-\u05F2]\u200D[\u0591-\u05BF\u05C1-\u05C5\u05C7]+"))
+  (set-char-table-range
+   composition-function-table '(#x591 . #x5C7)
+   (list (vector pattern2 2 'hebrew-shape-gstring)
+	 (vector pattern1 1 'hebrew-shape-gstring)
+	 ["[\u0591-\u05C7]" 0 font-shape-gstring]))
+  (set-char-table-range
+   composition-function-table #x5C0 nil)
+  (set-char-table-range
+   composition-function-table #x5C6 nil))
+
 (provide 'hebrew)
 
 ;; arch-tag: 3ca04f32-3f1e-498e-af46-8267498ba5d9
--- a/lisp/lpr.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/lpr.el	Tue May 25 11:10:15 2010 +0000
@@ -291,7 +291,7 @@
       (let (c)
 	(while (re-search-forward "[\^@-\^h\^k\^n-\^_\177-\377]" nil t)
 	  (setq c (preceding-char))
-	  (delete-backward-char 1)
+	  (delete-char -1)
 	  (insert (if (< c ?\s)
 		      (format "\\^%c" (+ c ?@))
 		    (format "\\%02x" c))))))))
--- a/lisp/mh-e/mh-alias.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/mh-e/mh-alias.el	Tue May 25 11:10:15 2010 +0000
@@ -234,7 +234,7 @@
         (let ((user-arg (if user "-user" "-nouser")))
           (mh-exec-cmd-quiet t "ali" user-arg "-nolist" alias))
         (goto-char (point-max))
-        (if (looking-at "^$") (delete-backward-char 1))
+        (if (looking-at "^$") (delete-char -1))
         (buffer-substring (point-min)(point-max)))
     (error (progn
              (message "%s" (error-message-string err))
--- a/lisp/mh-e/mh-search.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/mh-e/mh-search.el	Tue May 25 11:10:15 2010 +0000
@@ -1511,7 +1511,7 @@
       (delete-char 1))
     (goto-char (point-max))
     (while (and (not (bobp)) (memq (char-before) '(?  ?\t ?\n ?\r ?_)))
-      (delete-backward-char 1))
+      (delete-char -1))
     (subst-char-in-region (point-min) (point-max) ?  ?_ t)
     (subst-char-in-region (point-min) (point-max) ?\t ?_ t)
     (subst-char-in-region (point-min) (point-max) ?\n ?_ t)
--- a/lisp/net/imap.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/net/imap.el	Tue May 25 11:10:15 2010 +0000
@@ -2095,7 +2095,7 @@
 	(while (setq end (imap-find-next-line))
 	  (save-restriction
 	    (narrow-to-region (point-min) end)
-	    (delete-backward-char (length imap-server-eol))
+	    (delete-char (- (length imap-server-eol)))
 	    (goto-char (point-min))
 	    (unwind-protect
 		(cond ((eq imap-state 'initial)
--- a/lisp/net/rcirc.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/net/rcirc.el	Tue May 25 11:10:15 2010 +0000
@@ -1,6 +1,7 @@
 ;;; rcirc.el --- default, simple IRC client.
 
-;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
+;;   Free Software Foundation, Inc.
 
 ;; Author: Ryan Yeske
 ;; URL: http://www.nongnu.org/rcirc
@@ -85,6 +86,10 @@
 VALUE must be a string.  If absent, `rcirc-default-full-name' is
 used.
 
+`:pass'
+
+VALUE must be a string.
+
 `:channels'
 
 VALUE must be a list of strings describing which channels to join
@@ -95,6 +100,7 @@
 					     (:port integer)
 					     (:user-name string)
 					     (:full-name string)
+					     (:pass string)
 					     (:channels (repeat string)))))
   :group 'rcirc)
 
@@ -108,15 +114,15 @@
   :type 'string
   :group 'rcirc)
 
-(defcustom rcirc-default-user-name (user-login-name)
+(defcustom rcirc-default-user-name "user"
   "Your user name sent to the server when connecting."
+  :version "24.1"                       ; changed default
   :type 'string
   :group 'rcirc)
 
-(defcustom rcirc-default-full-name (if (string= (user-full-name) "")
-				       rcirc-default-user-name
-				     (user-full-name))
+(defcustom rcirc-default-full-name "unknown"
   "The full name sent to the server when connecting."
+  :version "24.1"                       ; changed default
   :type 'string
   :group 'rcirc)
 
@@ -369,6 +375,9 @@
 (defvar rcirc-nick-name-history nil
   "History variable for \\[rcirc] call.")
 
+(defvar rcirc-user-name-history nil
+  "History variable for \\[rcirc] call.")
+
 ;;;###autoload
 (defun rcirc (arg)
   "Connect to all servers in `rcirc-server-alist'.
@@ -393,6 +402,12 @@
 				(or (plist-get server-plist :nick)
 				    rcirc-default-nick)
 				'rcirc-nick-name-history))
+	     (user-name (read-string "IRC Username: "
+                                     (or (plist-get server-plist :user-name)
+                                         rcirc-default-user-name)
+                                     'rcirc-user-name-history))
+	     (pass (read-passwd "IRC Password: " nil
+				(plist-get server-plist :pass)))
 	     (channels (split-string
 			(read-string "IRC Channels: "
 				     (mapconcat 'identity
@@ -400,7 +415,7 @@
 							   :channels)
 						" "))
 			"[, ]+" t)))
-	(rcirc-connect server port nick rcirc-default-user-name
+	(rcirc-connect server port nick user-name pass
 		       rcirc-default-full-name
 		       channels))
     ;; connect to servers in `rcirc-server-alist'
@@ -411,6 +426,7 @@
 	      (port (or (plist-get (cdr c) :port) rcirc-default-port))
 	      (user-name (or (plist-get (cdr c) :user-name)
 			     rcirc-default-user-name))
+              (pass (plist-get (cdr c) :pass))
 	      (full-name (or (plist-get (cdr c) :full-name)
 			     rcirc-default-full-name))
 	      (channels (plist-get (cdr c) :channels)))
@@ -421,7 +437,7 @@
 		  (setq connected p)))
 	      (if (not connected)
 		  (condition-case e
-		      (rcirc-connect server port nick user-name
+		      (rcirc-connect server port nick user-name pass
 				     full-name channels)
 		    (quit (message "Quit connecting to %s" server)))
 		(with-current-buffer (process-buffer connected)
@@ -453,8 +469,8 @@
 (defvar rcirc-process nil)
 
 ;;;###autoload
-(defun rcirc-connect (server &optional port nick user-name full-name
-			     startup-channels)
+(defun rcirc-connect (server &optional port nick user-name pass
+                             full-name startup-channels)
   (save-excursion
     (message "Connecting to %s..." server)
     (let* ((inhibit-eol-conversion)
@@ -503,10 +519,11 @@
       (add-hook 'auto-save-hook 'rcirc-log-write)
 
       ;; identify
+      (when pass
+        (rcirc-send-string process (concat "PASS " pass)))
       (rcirc-send-string process (concat "NICK " nick))
       (rcirc-send-string process (concat "USER " user-name
-                                      " hostname servername :"
-                                      full-name))
+                                         " 0 * :" full-name))
 
       ;; setup ping timer if necessary
       (unless rcirc-keepalive-timer
@@ -1067,8 +1084,8 @@
     (goto-char (point-max))
     (when (not (equal 0 (- (point) rcirc-prompt-end-marker)))
       ;; delete a trailing newline
-      (when (eq (point) (point-at-bol))
-	(delete-backward-char 1))
+      (when (bolp)
+	(delete-char -1))
       (let ((input (buffer-substring-no-properties
 		    rcirc-prompt-end-marker (point))))
 	(dolist (line (split-string input "\n"))
--- a/lisp/net/tramp-gvfs.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/net/tramp-gvfs.el	Tue May 25 11:10:15 2010 +0000
@@ -874,10 +874,12 @@
 	    ;; there is only the question whether to accept an unknown
 	    ;; host signature.
 	    (with-temp-buffer
-	      (insert message)
-	      (pop-to-buffer (current-buffer))
-	      (setq choice (if (yes-or-no-p (concat (car choices) " ")) 0 1))
-	      (tramp-message v 6 "%d" choice))
+	      ;; Preserve message for `progress-reporter'.
+	      (with-temp-message ""
+		(insert message)
+		(pop-to-buffer (current-buffer))
+		(setq choice (if (yes-or-no-p (concat (car choices) " ")) 0 1))
+		(tramp-message v 6 "%d" choice)))
 
 	    ;; When the choice is "no", we set an empty
 	    ;; fuse-mountpoint in order to leave the timeout.
@@ -889,8 +891,8 @@
 	     nil ;; no abort of D-Bus.
 	     choice))
 
-	  ;; When QUIT is raised, we shall return this information to D-Bus.
-	  (quit (list nil t 0))))))
+	;; When QUIT is raised, we shall return this information to D-Bus.
+	(quit (list nil t 0))))))
 
 (defun tramp-gvfs-handler-mounted-unmounted (mount-info)
   "Signal handler for the \"org.gtk.vfs.MountTracker.mounted\" and
--- a/lisp/net/tramp.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/net/tramp.el	Tue May 25 11:10:15 2010 +0000
@@ -2283,6 +2283,12 @@
 (put 'with-connection-property 'edebug-form-spec t)
 (font-lock-add-keywords 'emacs-lisp-mode '("\\<with-connection-property\\>"))
 
+(defun tramp-progress-reporter-update (reporter &optional value)
+  (let* ((parameters (cdr reporter))
+	 (message (aref parameters 3)))
+    (when (string-match message (or (current-message) ""))
+      (funcall 'progress-reporter-update reporter value))))
+
 (defmacro with-progress-reporter (vec level message &rest body)
   "Executes BODY, spinning a progress reporter with MESSAGE."
   `(let (pr tm)
@@ -2294,7 +2300,8 @@
 		(<= ,level (min tramp-verbose 3)))
        (condition-case nil
 	   (setq pr (tramp-compat-funcall 'make-progress-reporter ,message)
-		 tm (if pr (run-at-time 3 0.1 'progress-reporter-update pr)))
+		 tm (when pr
+		      (run-at-time 3 0.1 'tramp-progress-reporter-update pr)))
 	 (error nil)))
      (unwind-protect
 	 ;; Execute the body.
@@ -6734,27 +6741,29 @@
 
 (defun tramp-process-actions (proc vec actions &optional timeout)
   "Perform actions until success or TIMEOUT."
-  ;; Enable auth-source and password-cache.
-  (tramp-set-connection-property vec "first-password-request" t)
-  (let (exit)
-    (while (not exit)
-      (tramp-message proc 3 "Waiting for prompts from remote shell")
-      (setq exit
-	    (catch 'tramp-action
-	      (if timeout
-		  (with-timeout (timeout)
-		    (tramp-process-one-action proc vec actions))
-		(tramp-process-one-action proc vec actions)))))
-    (with-current-buffer (tramp-get-connection-buffer vec)
-      (tramp-message vec 6 "\n%s" (buffer-string)))
-    (unless (eq exit 'ok)
-      (tramp-clear-passwd vec)
-      (tramp-error-with-buffer
-       nil vec 'file-error
-       (cond
-	((eq exit 'permission-denied) "Permission denied")
-	((eq exit 'process-died) "Process died")
-	(t "Login failed"))))))
+  ;; Preserve message for `progress-reporter'.
+  (with-temp-message ""
+    ;; Enable auth-source and password-cache.
+    (tramp-set-connection-property vec "first-password-request" t)
+    (let (exit)
+      (while (not exit)
+	(tramp-message proc 3 "Waiting for prompts from remote shell")
+	(setq exit
+	      (catch 'tramp-action
+		(if timeout
+		    (with-timeout (timeout)
+		      (tramp-process-one-action proc vec actions))
+		  (tramp-process-one-action proc vec actions)))))
+      (with-current-buffer (tramp-get-connection-buffer vec)
+	(tramp-message vec 6 "\n%s" (buffer-string)))
+      (unless (eq exit 'ok)
+	(tramp-clear-passwd vec)
+	(tramp-error-with-buffer
+	 nil vec 'file-error
+	 (cond
+	  ((eq exit 'permission-denied) "Permission denied")
+	  ((eq exit 'process-died) "Process died")
+	  (t "Login failed")))))))
 
 ;; Utility functions.
 
--- a/lisp/obsolete/complete.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/obsolete/complete.el	Tue May 25 11:10:15 2010 +0000
@@ -699,7 +699,7 @@
 	(if (and (eq mode 'word)
 		 (not PC-word-failed-flag))
 	    (let ((PC-word-failed-flag t))
-	      (delete-backward-char 1)
+	      (delete-char -1)
 	      (PC-do-completion 'word))
                (when abbreviated
                  (delete-region beg end)
--- a/lisp/pcomplete.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/pcomplete.el	Tue May 25 11:10:15 2010 +0000
@@ -553,7 +553,7 @@
 				pcomplete-expand-and-complete
 				pcomplete-reverse)))
       (progn
-	(delete-backward-char pcomplete-last-completion-length)
+	(delete-char (- pcomplete-last-completion-length))
 	(if (eq this-command 'pcomplete-reverse)
 	    (progn
               (push (car (last pcomplete-current-completions))
@@ -616,7 +616,7 @@
     (pcomplete)
     (when (and pcomplete-current-completions
 	       (> (length pcomplete-current-completions) 0)) ;??
-      (delete-backward-char pcomplete-last-completion-length)
+      (delete-char (- pcomplete-last-completion-length))
       (while pcomplete-current-completions
 	(unless (pcomplete-insert-entry
 		 "" (car pcomplete-current-completions) t
@@ -639,7 +639,7 @@
   (when (and pcomplete-cycle-completions
 	     pcomplete-current-completions
 	     (eq last-command 'pcomplete-argument))
-    (delete-backward-char pcomplete-last-completion-length)
+    (delete-char (- pcomplete-last-completion-length))
     (setq pcomplete-current-completions nil
 	  pcomplete-last-completion-raw nil))
   (let ((pcomplete-show-list t))
@@ -1207,7 +1207,7 @@
       ;; FIXME: Here we presume that quoting `stub' gives us the exact
       ;; text in the buffer before point, which is not guaranteed;
       ;; e.g. it is not the case in eshell when completing ${FOO}tm[TAB].
-      (delete-backward-char (length (pcomplete-quote-argument stub)))
+      (delete-char (- (length (pcomplete-quote-argument stub))))
       ;; if there is already a backslash present to handle the first
       ;; character, don't bother quoting it
       (when (eq (char-before) ?\\)
--- a/lisp/play/decipher.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/play/decipher.el	Tue May 25 11:10:15 2010 +0000
@@ -1060,7 +1060,7 @@
 ;;          (insert ?\()
 ;;          (while (setq undo-map (pop undo-rec))
 ;;            (insert (cdr undo-map) (car undo-map) ?\ ))
-;;          (delete-backward-char 1)
+;;          (delete-char -1)
 ;;          (insert ")\n"))))))
 
 ;; arch-tag: 8f094d88-ffe1-4f99-afe3-a5e81dd939d9
--- a/lisp/progmodes/ada-mode.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/progmodes/ada-mode.el	Tue May 25 11:10:15 2010 +0000
@@ -1645,7 +1645,7 @@
 		     (insert " ")
 		     (ada-adjust-case)
 		     ;; horrible dekludge
-		     (delete-backward-char 1)
+		     (delete-char -1)
 		     ;; some special keys and their bindings
 		     (cond
 		      ((eq lastk ?\n)
--- a/lisp/progmodes/cc-awk.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/progmodes/cc-awk.el	Tue May 25 11:10:15 2010 +0000
@@ -244,7 +244,7 @@
 
 ;; REGEXPS USED FOR FINDING THE POSITION OF A "virtual semicolon"
 (defconst c-awk-_-harmless-nonws-char-re "[^#/\"\\\\\n\r \t]")
-;;;; NEW VERSION!  (which will be restricted to the current line)
+;; NEW VERSION!  (which will be restricted to the current line)
 (defconst c-awk-one-line-non-syn-ws*-re
   (concat "\\([ \t]*"
               "\\(" c-awk-_-harmless-nonws-char-re "\\|"
@@ -503,7 +503,7 @@
         (insert-char ?\n 1) ; ...artificial eol is needed for comment detection.
         (setq extra-nl t))
       (prog1 (c-awk-get-NL-prop-prev-line do-lim)
-        (if extra-nl (delete-backward-char 1))))))
+        (if extra-nl (delete-char -1))))))
 
 (defsubst c-awk-prev-line-incomplete-p (&optional do-lim)
   ;; Is there an incomplete statement at the end of the previous line?
@@ -519,14 +519,14 @@
   ;; This function might do hidden buffer changes.
   (memq (c-awk-get-NL-prop-cur-line do-lim) '(?\\ ?\{)))
 
-;;;; NOTES ON "VIRTUAL SEMICOLONS"
-;;;;
-;;;; A "virtual semicolon" is what terminates a statement when there is no ;
-;;;; or } to do the job.  Like point, it is considered to lie _between_ two
-;;;; characters.  As from mid-March 2004, it is considered to lie just after
-;;;; the last non-syntactic-whitespace character on the line; (previously, it
-;;;; was considered an attribute of the EOL on the line).  A real semicolon
-;;;; never counts as a virtual one.
+;; NOTES ON "VIRTUAL SEMICOLONS"
+;;
+;; A "virtual semicolon" is what terminates a statement when there is no ;
+;; or } to do the job.  Like point, it is considered to lie _between_ two
+;; characters.  As from mid-March 2004, it is considered to lie just after
+;; the last non-syntactic-whitespace character on the line; (previously, it
+;; was considered an attribute of the EOL on the line).  A real semicolon
+;; never counts as a virtual one.
 
 (defun c-awk-at-vsemi-p (&optional pos)
   ;; Is there a virtual semicolon at POS (or POINT)?
--- a/lisp/progmodes/dcl-mode.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/progmodes/dcl-mode.el	Tue May 25 11:10:15 2010 +0000
@@ -1549,13 +1549,11 @@
   (interactive "*P")
   (delete-indentation arg)
   (let ((type (dcl-get-line-type)))
-    (if (and (or (equal type '$)
-		 (equal type '-)
-		 (equal type 'empty-$))
+    (if (and (member type '($ - empty-$))
 	     (not (bobp))
-	     (= (char-after (1- (point))) ?-))
+	     (= (char-before) ?-))
 	(progn
-	  (delete-backward-char 1)
+	  (delete-char -1)
 	  (fixup-whitespace)))))
 
 
--- a/lisp/progmodes/ps-mode.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/progmodes/ps-mode.el	Tue May 25 11:10:15 2010 +0000
@@ -681,7 +681,7 @@
     (if (or (not ps-mode-auto-indent)
 	    (< ps-mode-tab 1)
 	    (not (re-search-backward "^[ \t]+\\=" nil t)))
-	(delete-backward-char 1)
+	(call-interactively 'delete-backward-char)
       (setq target (ps-mode-target-column))
       (while (> column target)
 	(setq target (+ target ps-mode-tab)))
--- a/lisp/progmodes/verilog-mode.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/progmodes/verilog-mode.el	Tue May 25 11:10:15 2010 +0000
@@ -9305,11 +9305,11 @@
 		 (delete-char 1)
 		 (insert ");")
 		 (search-forward "\n")	;; Added by inst-port
-		 (delete-backward-char 1)
+		 (delete-char -1)
 		 (if (search-forward ")" nil t) ;; From user, moved up a line
-		     (delete-backward-char 1))
+		     (delete-char -1))
 		 (if (search-forward ";" nil t) ;; Don't error if user had syntax error and forgot it
-		     (delete-backward-char 1)))))))))
+		     (delete-char -1)))))))))
 
 (defun verilog-auto-inst-param ()
   "Expand AUTOINSTPARAM statements, as part of \\[verilog-auto].
@@ -9412,9 +9412,9 @@
 		 (delete-char 1)
 		 (insert ")")
 		 (search-forward "\n")	;; Added by inst-port
-		 (delete-backward-char 1)
+		 (delete-char -1)
 		 (if (search-forward ")" nil t) ;; From user, moved up a line
-		     (delete-backward-char 1)))))))))
+		     (delete-char -1)))))))))
 
 (defun verilog-auto-reg ()
   "Expand AUTOREG statements, as part of \\[verilog-auto].
--- a/lisp/progmodes/vhdl-mode.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/progmodes/vhdl-mode.el	Tue May 25 11:10:15 2010 +0000
@@ -7994,7 +7994,7 @@
 		       (condition-case () (forward-sexp)
 			 (error (goto-char (point-max))))
 		       (< (point) end))
-	   (delete-backward-char 1))
+	   (delete-char -1))
 	 ;; add closing parenthesis
 	 (when (> (point) end)
 	   (goto-char end)
@@ -8105,7 +8105,7 @@
   (interactive "p")
   (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
       (if (= (preceding-char) last-input-event)
-	  (progn (delete-backward-char 1) (insert-char ?\" 1))
+	  (progn (delete-char -1) (insert-char ?\" 1))
 	(insert-char ?\' 1))
     (self-insert-command count)))
 
@@ -8172,7 +8172,7 @@
       (unless (vhdl-template-field
 	       (concat "[type" (and (vhdl-standard-p 'ams) " or nature") "]")
 	       nil t)
-	(delete-backward-char 3))
+	(delete-char -3))
       (vhdl-insert-keyword " IS ")
       (vhdl-template-field "name" ";")
       (vhdl-comment-insert-inline))))
@@ -8536,7 +8536,7 @@
 	       (vhdl-template-field "library name" "." nil nil nil nil
 				    (vhdl-work-library))
 	       (vhdl-template-field "configuration name" ";"))
-	      (t (delete-backward-char 1) (insert ";") t))))))
+	      (t (delete-char -1) (insert ";") t))))))
 
 
 (defun vhdl-template-configuration-decl ()
@@ -8703,7 +8703,7 @@
 	(vhdl-insert-keyword " OPEN ")
 	(unless (vhdl-template-field "[READ_MODE | WRITE_MODE | APPEND_MODE]"
 				     nil t)
-	  (delete-backward-char 6)))
+	  (delete-char -6)))
       (vhdl-insert-keyword " IS ")
       (when (vhdl-standard-p '87)
 	(vhdl-template-field "[IN | OUT]" " " t))
@@ -9031,7 +9031,7 @@
 	      (insert "\n")
 	      (indent-to margin))
 	    (delete-region end-pos (point))
-	    (delete-backward-char 1)
+	    (delete-char -1)
 	    (insert ")")
 	    (when vhdl-auto-align (vhdl-align-region-groups start (point) 1))
 	    t)
@@ -9405,7 +9405,7 @@
     (vhdl-insert-keyword "REPORT ")
     (if (equal "\"\"" (vhdl-template-field
 		       "string expression" nil t start (point) t))
-	(delete-backward-char 2)
+	(delete-char -2)
       (setq start (point))
       (vhdl-insert-keyword " SEVERITY ")
       (unless (vhdl-template-field "[NOTE | WARNING | ERROR | FAILURE]" nil t)
@@ -9553,7 +9553,7 @@
 		    "[scalar type | ARRAY | RECORD | ACCESS | FILE]" nil t)
 		   ""))))
 	(cond ((equal definition "")
-	       (delete-backward-char 4)
+	       (delete-char -4)
 	       (insert ";"))
 	      ((equal definition "ARRAY")
 	       (delete-region (point) (progn (forward-word -1) (point)))
@@ -10053,13 +10053,13 @@
       (if (not (or (and string (progn (insert string) t))
 		   (vhdl-template-field "[comment]" nil t)))
 	  (delete-region position (point))
-	(while (= (preceding-char) ? ) (delete-backward-char 1))
-; 	(when (> (current-column) end-comment-column)
-; 	  (setq position (point-marker))
-; 	  (re-search-backward "-- ")
-; 	  (insert "\n")
-; 	  (indent-to comment-column)
-; 	  (goto-char position))
+	(while (= (preceding-char) ?\ ) (delete-char -1))
+	;; (when (> (current-column) end-comment-column)
+	;;   (setq position (point-marker))
+	;;   (re-search-backward "-- ")
+	;;   (insert "\n")
+	;;   (indent-to comment-column)
+	;;   (goto-char position))
 	))))
 
 (defun vhdl-comment-block ()
@@ -10192,7 +10192,7 @@
     (when semicolon-pos (goto-char semicolon-pos))
     (if not-empty
 	(progn (delete-char 1) (insert ")"))
-      (delete-backward-char 2))))
+      (delete-char -2))))
 
 (defun vhdl-template-generic-list (optional &optional no-value)
   "Read from user a generic spec argument list."
--- a/lisp/skeleton.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/skeleton.el	Tue May 25 11:10:15 2010 +0000
@@ -358,7 +358,7 @@
 	     (< element 0))
 	(if skeleton-untabify
 	    (backward-delete-char-untabify (- element))
-	  (delete-backward-char (- element)))
+	  (delete-char element))
       (insert (if (not literal)
 		  (funcall skeleton-transformation-function element)
 		element))))
--- a/lisp/term.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/term.el	Tue May 25 11:10:15 2010 +0000
@@ -1170,7 +1170,7 @@
 	    (let* ((str (car cur)) (len (length str)) (start (- (point) len)))
 	      (if (and (>= start (point-min))
 		       (string= str (buffer-substring start (point))))
-		  (progn (delete-backward-char len)
+		  (progn (delete-char (- len))
 			 (setq term-kill-echo-list (cdr cur))
 			 (setq term-current-column nil)
 			 (setq term-current-row nil)
--- a/lisp/textmodes/bibtex.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/textmodes/bibtex.el	Tue May 25 11:10:15 2010 +0000
@@ -2094,7 +2094,7 @@
                                 ;; if match not at left subfield boundary...
                                 (if (< (1+ (nth 1 bounds)) (match-beginning 0))
                                     (insert (bibtex-field-right-delimiter) " # ")
-                                  (delete-backward-char 1))))))))
+                                  (delete-char -1))))))))
 
                     ;; use book title of crossref'd entry
                     (if (and (memq 'inherit-booktitle format)
--- a/lisp/textmodes/fill.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/textmodes/fill.el	Tue May 25 11:10:15 2010 +0000
@@ -657,7 +657,7 @@
       (if (and oneleft
 	       (not (and use-hard-newlines
 			 (get-text-property (1- (point)) 'hard))))
-	  (delete-backward-char 1)
+	  (delete-char -1)
 	(backward-char 1)
 	(setq oneleft t)))
     (setq to (copy-marker (point) t))
@@ -1036,7 +1036,7 @@
 	  (fill-forward-paragraph -1))
 	(if (< (point) beg)
 	    (goto-char beg))
-	(if (>= (point) initial)
+	(if (and (>= (point) initial) (< (point) end))
 	    (setq fill-pfx
 		  (fill-region-as-paragraph (point) end justify nosqueeze))
 	  (goto-char end))))
--- a/lisp/textmodes/reftex-auc.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/textmodes/reftex-auc.el	Tue May 25 11:10:15 2010 +0000
@@ -58,7 +58,7 @@
       ;; Create a new label, with a temporary brace for `reftex-what-macro'
       (unwind-protect
           (progn (insert "{") (setq label (or (reftex-label nil t) "")))
-        (delete-backward-char 1)))
+        (delete-char -1)))
      ((and (not definition) (reftex-plug-flag 2))
       ;; Reference a label with RefTeX
       (setq label (reftex-reference nil t)))
--- a/lisp/textmodes/rst.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/textmodes/rst.el	Tue May 25 11:10:15 2010 +0000
@@ -1787,7 +1787,7 @@
       (delete-region init-point (+ init-point (length initial-indent)))
 
       ;; Delete the last newline added.
-      (delete-backward-char 1)
+      (delete-char -1)
     )))
 
 (defun rst-toc-insert-node (node level indent pfx)
--- a/lisp/textmodes/sgml-mode.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/textmodes/sgml-mode.el	Tue May 25 11:10:15 2010 +0000
@@ -526,7 +526,7 @@
     (insert-char ?/ 1)
     (indent-according-to-mode))
    ((eq sgml-quick-keys 'close)
-    (delete-backward-char 1)
+    (delete-char -1)
     (sgml-close-tag))
    (t
     (sgml-slash-matching arg))))
@@ -583,7 +583,7 @@
   (insert ?&)
   (or char
       (setq char (read-quoted-char "Enter char or octal number")))
-  (delete-backward-char 1)
+  (delete-char -1)
   (insert char)
   (undo-boundary)
   (sgml-namify-char))
@@ -601,7 +601,7 @@
 	   ((encode-char char 'ucs)))))
     (if (not name)
 	(error "Don't know the name of `%c'" char)
-      (delete-backward-char 1)
+      (delete-char -1)
       (insert (format (if (numberp name) "&#%d;" "&%s;") name)))))
 
 (defun sgml-name-self ()
@@ -707,7 +707,7 @@
 	      (sgml-value (assoc (downcase attribute) alist))
 	      (setq i (1- i))))
 	  (if (eq (preceding-char) ?\s)
-	      (delete-backward-char 1)))
+	      (delete-char -1)))
 	car)))
 
 (defun sgml-auto-attributes (arg)
@@ -1117,7 +1117,7 @@
 	  (setq alist (skeleton-read '(completing-read "Value: " (cdr alist))))
 	  (if (string< "" alist)
 	      (insert alist ?\")
-	    (delete-backward-char 2)))
+	    (delete-char -2)))
       (insert "=\"")
       (if (cdr alist)
           (insert (skeleton-read '(completing-read "Value: " alist)))
--- a/lisp/textmodes/table.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/textmodes/table.el	Tue May 25 11:10:15 2010 +0000
@@ -919,12 +919,12 @@
 (defvar table-source-info-plist nil
   "General storage for temporary information used while generating source.")
 
-;;; The following history containers not only keep the history of user
-;;; entries but also serve as the default value providers.  When an
-;;; interactive command is invoked it offers a user the latest entry
-;;; of the history as a default selection.  Therefore the values below
-;;; are the first default value when a command is invoked for the very
-;;; first time when there is no real history existing yet.
+;; The following history containers not only keep the history of user
+;; entries but also serve as the default value providers.  When an
+;; interactive command is invoked it offers a user the latest entry
+;; of the history as a default selection.  Therefore the values below
+;; are the first default value when a command is invoked for the very
+;; first time when there is no real history existing yet.
 (defvar table-cell-span-direction-history '("right"))
 (defvar table-cell-split-orientation-history '("horizontally"))
 (defvar table-cell-split-contents-to-history '("split"))
@@ -948,19 +948,19 @@
 (defvar table-capture-columns-history '(""))
 (defvar table-target-history '("cell"))
 
-;;; Some entries in `table-cell-bindings' are duplicated in
-;;; `table-command-remap-alist'.  There is a good reason for
-;;; this.  Common key like return key may be taken by some other
-;;; function than normal `newline' function.  Thus binding return key
-;;; directly for `*table--cell-newline' ensures that the correct enter
-;;; operation in a table cell.  However
-;;; `table-command-remap-alist' has an additional role than
-;;; replacing commands.  It is also used to construct a table command
-;;; list.  This list is very important because it is used to check if
-;;; the previous command was one of them in this list or not.  If the
-;;; previous command is found in the list the current command will not
-;;; refill the table cache.  If the command were not listed fast
-;;; typing can cause unwanted cache refill.
+;; Some entries in `table-cell-bindings' are duplicated in
+;; `table-command-remap-alist'.  There is a good reason for
+;; this.  Common key like return key may be taken by some other
+;; function than normal `newline' function.  Thus binding return key
+;; directly for `*table--cell-newline' ensures that the correct enter
+;; operation in a table cell.  However
+;; `table-command-remap-alist' has an additional role than
+;; replacing commands.  It is also used to construct a table command
+;; list.  This list is very important because it is used to check if
+;; the previous command was one of them in this list or not.  If the
+;; previous command is found in the list the current command will not
+;; refill the table cache.  If the command were not listed fast
+;; typing can cause unwanted cache refill.
 (defconst table-cell-bindings
   '(([(control i)]	. table-forward-cell)
     ([(control I)]	. table-backward-cell)
--- a/lisp/textmodes/texinfmt.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/textmodes/texinfmt.el	Tue May 25 11:10:15 2010 +0000
@@ -2507,7 +2507,7 @@
       (error "Not found: @verb start brace"))
     (delete-region texinfo-command-start (+ 2 texinfo-command-end))
     (search-forward  delimiter))
-  (delete-backward-char 1)
+  (delete-char -1)
   (unless (looking-at "}")
     (error "Not found: @verb end brace"))
   (delete-char 1))
--- a/lisp/time.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/time.el	Tue May 25 11:10:15 2010 +0000
@@ -524,7 +524,7 @@
 	(insert (pop result)
 		(make-string (1+ (- max-width (pop result))) ?\s)
 		(pop result) "\n")))
-    (delete-backward-char 1)))
+    (delete-char -1)))
 
 ;;;###autoload
 (defun display-time-world ()
--- a/lisp/url/ChangeLog	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/url/ChangeLog	Tue May 25 11:10:15 2010 +0000
@@ -1,3 +1,7 @@
+2010-05-19  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* url-util.el (url-unhex-string): Don't accidentally decode as latin-1.
+
 2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
 
 	* Version 23.2 released.
--- a/lisp/url/url-util.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/url/url-util.el	Tue May 25 11:10:15 2010 +0000
@@ -322,10 +322,10 @@
 		   tmp (substring str 0 start)
 		   (cond
 		    (allow-newlines
-		     (char-to-string code))
+		     (byte-to-string code))
 		    ((or (= code ?\n) (= code ?\r))
 		     " ")
-		    (t (char-to-string code))))
+		    (t (byte-to-string code))))
 	      str (substring str (match-end 0)))))
     (setq tmp (concat tmp str))
     tmp))
--- a/lisp/wid-edit.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/wid-edit.el	Tue May 25 11:10:15 2010 +0000
@@ -1334,7 +1334,7 @@
 		     (goto-char end)
 		     (while (and (eq (preceding-char) ?\s)
 				 (> (point) begin))
-		       (delete-backward-char 1)))))))
+		       (delete-char -1)))))))
 	(widget-specify-secret field))
       (widget-apply field :notify field))))
 
@@ -1477,7 +1477,7 @@
      ;; Parse escapes in format.
      (while (re-search-forward "%\\(.\\)" nil t)
        (let ((escape (char-after (match-beginning 1))))
-	 (delete-backward-char 2)
+	 (delete-char -2)
 	 (cond ((eq escape ?%)
 		(insert ?%))
 	       ((eq escape ?\[)
@@ -1510,7 +1510,7 @@
 		    (setq doc-begin (point))
 		    (insert doc)
 		    (while (eq (preceding-char) ?\n)
-		      (delete-backward-char 1))
+		      (delete-char -1))
 		    (insert ?\n)
 		    (setq doc-end (point)))))
 	       ((eq escape ?h)
@@ -2258,7 +2258,7 @@
      ;; Parse % escapes in format.
      (while (re-search-forward "%\\([bv%]\\)" nil t)
        (let ((escape (char-after (match-beginning 1))))
-	 (delete-backward-char 2)
+	 (delete-char -2)
 	 (cond ((eq escape ?%)
 		(insert ?%))
 	       ((eq escape ?b)
@@ -2441,7 +2441,7 @@
      ;; Parse % escapes in format.
      (while (re-search-forward "%\\([bv%]\\)" nil t)
        (let ((escape (char-after (match-beginning 1))))
-	 (delete-backward-char 2)
+	 (delete-char -2)
 	 (cond ((eq escape ?%)
 		(insert ?%))
 	       ((eq escape ?b)
@@ -2720,7 +2720,7 @@
      ;; Parse % escapes in format.
      (while (re-search-forward "%\\(.\\)" nil t)
        (let ((escape (char-after (match-beginning 1))))
-	 (delete-backward-char 2)
+	 (delete-char -2)
 	 (cond ((eq escape ?%)
 		(insert ?%))
 	       ((eq escape ?i)
--- a/lisp/woman.el	Mon May 24 12:00:00 2010 +0000
+++ b/lisp/woman.el	Tue May 25 11:10:15 2010 +0000
@@ -2443,7 +2443,7 @@
 	    (while (and
 		    (<= (setq N (1+ N)) 0)
 		    (cond ((memq (preceding-char) '(?\  ?\t))
-			   (delete-backward-char 1) t)
+			   (delete-char -1) t)
 			  ((memq (following-char) '(?\  ?\t))
 			   (delete-char 1) t)
 			  (t nil))))
@@ -3121,7 +3121,7 @@
 	  (if unquote (delete-char 1) (forward-char))
 	  (re-search-forward "\"\\|$"))
 	(if (eq (preceding-char) ?\")
-	    (if unquote (delete-backward-char 1))
+	    (if unquote (delete-char -1))
 	  (WoMan-warn "Unpaired \" in .%s arguments." request)))
     ;; (re-search-forward "[^\\\n] \\|$")	; inconsistent
     (skip-syntax-forward "^ "))
@@ -4346,7 +4346,7 @@
 tab stop columns or pairs (COLUMN . TYPE) where TYPE is R or C."
   ;; Based on tab-to-tab-stop in indent.el.
   ;; R & C tabs probably not quite right!
-  (delete-backward-char 1)
+  (delete-char -1)
   (let ((tabs tab-stop-list))
     (while (and tabs (>= (current-column)
 			 (woman-get-tab-stop (car tabs))))
@@ -4400,7 +4400,7 @@
 	  (delete-char 1)
 	  (insert woman-unpadded-space-char)
 	  (goto-char (match-end 0))
-	  (delete-backward-char 1)
+	  (delete-char -1)
 	  (insert-before-markers woman-unpadded-space-char)
 	  (subst-char-in-region
 	   (match-beginning 0) (match-end 0)
--- a/msdos/ChangeLog	Mon May 24 12:00:00 2010 +0000
+++ b/msdos/ChangeLog	Tue May 25 11:10:15 2010 +0000
@@ -1,3 +1,7 @@
+2010-05-25  Glenn Morris  <rgm@gnu.org>
+
+	* sed1v2.inp (LD_SWITCH_SYSTEM_EXTRA): No longer present.
+
 2010-05-21  Glenn Morris  <rgm@gnu.org>
 
 	* sed1v2.inp(@ns_frag@): Edit to nothing.
--- a/msdos/sed1v2.inp	Mon May 24 12:00:00 2010 +0000
+++ b/msdos/sed1v2.inp	Tue May 25 11:10:15 2010 +0000
@@ -51,7 +51,6 @@
 /^LD_SWITCH_X_SITE_AUX *=/s/@LD_SWITCH_X_SITE_AUX@//
 /^LD_SWITCH_X_SITE_AUX_RPATH *=/s/@LD_SWITCH_X_SITE_AUX_RPATH@//
 /^LD_SWITCH_SYSTEM *=/s/@LD_SWITCH_SYSTEM@//
-/^LD_SWITCH_SYSTEM_EXTRA *=/s/@LD_SWITCH_SYSTEM_EXTRA@//
 /^TEMACS_LDFLAGS2 *=/s/@TEMACS_LDFLAGS2@/$(LDFLAGS)/
 /^LIBS_SYSTEM *=/s/@LIBS_SYSTEM@//
 /^LIB_GCC *=/s/@LIB_GCC@/-Lgcc/
--- a/src/ChangeLog	Mon May 24 12:00:00 2010 +0000
+++ b/src/ChangeLog	Tue May 25 11:10:15 2010 +0000
@@ -1,7 +1,54 @@
+2010-05-25  Glenn Morris  <rgm@gnu.org>
+
+	* Makefile.in (@NS_IMPL_GNUSTEP_INC@, NS_IMPL_GNUSTEP_TEMACS_LDFLAGS):
+	Move before TEMACS_LDFLAGS.
+	(TEMACS_LDFLAGS): Use $NS_IMPL_GNUSTEP_TEMACS_LDFLAGS.
+	(temacs${EXEEXT}): Do not use $NS_IMPL_GNUSTEP_TEMACS_LDFLAGS.
+
+	* Makefile.in (NOT_C_CODE): No longer define.
+	(config.h): No longer include.
+
+	* Makefile.in (LD_SWITCH_SYSTEM_TEMACS): Move definition after some
+	variables it may reference.
+
+	* Makefile.in (LD_SWITCH_SYSTEM_EXTRA): Remove.
+	(TEMACS_LDFLAGS): Remove LD_SWITCH_SYSTEM_EXTRA.
+
+2010-05-25  Kenichi Handa  <handa@m17n.org>
+
+	* dispextern.h (struct composition_it): New members rule_idx and
+	charpos.
+
+	* xdisp.c (set_iterator_to_next): While scanning backward, assume
+	that the character positions of IT point the last character of the
+	current grapheme cluster.
+	(next_element_from_composition): Don't change character positions
+	of IT.
+	(append_composite_glyph): Set glyph->charpos to
+	it->cmp_it.charpos.
+
+	* composite.c (autocmp_chars): Change the first argument to RULE,
+	and try composition with RULE only.
+	(composition_compute_stop_pos): Record the index number of the
+	composition rule in CMP_IT->rule_idx.
+	(composition_reseat_it): Call autocmp_chars repeatedly until the
+	correct rule of the composition is found.
+	(composition_update_it): Set CMP_IT->charpos.  Assume the CHARPOS
+	is at the last character of the current grapheme cluster when
+	CMP_IT->reversed_p is nonzero.
+
+2010-05-24  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* editfns.c (Fbyte_to_string): New function.
+
+2010-05-24  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* process.c (Fmake_network_process): Set :host to nil if it's not used.
+	Suggested by Masatake YAMATO <yamato@redhat.com>.
+
 2010-05-23  Eli Zaretskii  <eliz@gnu.org>
 
-	* dispextern.h (init_iterator): Sync prototype with changed
-	definition.
+	* dispextern.h (init_iterator): Sync prototype with changed definition.
 
 2010-05-19  Eli Zaretskii  <eliz@gnu.org>
 
@@ -15,11 +62,11 @@
 	* xdisp.c (display_line): Compare IT_CHARPOS with the position in
 	row->start.pos, rather than with MATRIX_ROW_START_CHARPOS.
 	(cursor_row_p): Use row->end.pos rather than MATRIX_ROW_END_CHARPOS.
-	(try_window_reusing_current_matrix, try_window_id): Use
-	ROW->minpos rather than ROW->start.pos.
+	(try_window_reusing_current_matrix, try_window_id):
+	Use ROW->minpos rather than ROW->start.pos.
 	(init_from_display_pos, init_iterator): Use EMACS_INT for
 	character and byte positions.
-	(find_row_edges): Renamed from find_row_end.  Accept additional
+	(find_row_edges): Rename from find_row_end.  Accept additional
 	arguments for minimum and maximum buffer positions seen by
 	display_line for this row.  Don't use iterator to find the
 	position following the maximum one; instead, increment the
--- a/src/Makefile.in	Mon May 24 12:00:00 2010 +0000
+++ b/src/Makefile.in	Tue May 25 11:10:15 2010 +0000
@@ -96,12 +96,6 @@
 ## substituted in this or any other Makefile. Cf C_SWITCH_X_SITE.
 LD_SWITCH_X_SITE=
 
-## This holds any special options for linking temacs only (ie, not
-## used by configure).  Not used elsewhere because it sometimes
-## contains options that have to do with using Emacs's crt0, 
-## which are only good with temacs.
-LD_SWITCH_SYSTEM_TEMACS=@LD_SWITCH_SYSTEM_TEMACS@
-
 ## Next two must come before LD_SWITCH_SYSTEM.
 ## If needed, a -R option that says where to find X windows at run time.
 LD_SWITCH_X_SITE_AUX=@LD_SWITCH_X_SITE_AUX@
@@ -110,10 +104,21 @@
 
 ## System-specific LDFLAGS.
 LD_SWITCH_SYSTEM=@LD_SWITCH_SYSTEM@
-LD_SWITCH_SYSTEM_EXTRA=@LD_SWITCH_SYSTEM_EXTRA@
+
+## This holds any special options for linking temacs only (ie, not
+## used by configure).  Not used elsewhere because it sometimes
+## contains options that have to do with using Emacs's crt0, 
+## which are only good with temacs.
+LD_SWITCH_SYSTEM_TEMACS=@LD_SWITCH_SYSTEM_TEMACS@
+
+## If NS_IMPL_GNUSTEP, some definitions and includes are expanded here.
+@NS_IMPL_GNUSTEP_INC@
+
+## This uses ${CONFIG_SYSTEM_LIBS} from @NS_IMPL_GNUSTEP_INC@.
+NS_IMPL_GNUSTEP_TEMACS_LDFLAGS=@NS_IMPL_GNUSTEP_TEMACS_LDFLAGS@
 
 ## Flags to pass to ld only for temacs.
-TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_EXTRA) $(LD_SWITCH_SYSTEM_TEMACS)
+TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_TEMACS) $(NS_IMPL_GNUSTEP_TEMACS_LDFLAGS)
 
 ## $LDFLAGS, or empty if NS_IMPL_GNUSTEP (for some reason).
 TEMACS_LDFLAGS2 = @TEMACS_LDFLAGS2@
@@ -302,16 +307,6 @@
 # ========================== start of cpp stuff =======================
 /* From here on, comments must be done in C syntax.  */
 
-#define NOT_C_CODE
-#include "config.h"
-
-/* If NS_IMPL_GNUSTEP, some definitions and includes are expanded here.  */
-@NS_IMPL_GNUSTEP_INC@
-
-/* FIXME move to LD_SWITCH_SYSTEM_TEMACS?
-   This uses ${CONFIG_SYSTEM_LIBS}, presumably set by the above include.  */
-NS_IMPL_GNUSTEP_TEMACS_LDFLAGS=@NS_IMPL_GNUSTEP_TEMACS_LDFLAGS@
-
 /* DO NOT use -R.  There is a special hack described in lastfile.c
    which is used instead.  Some initialized data areas are modified
    at initial startup, then labeled as part of the text area when
@@ -648,8 +643,7 @@
 #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} ) \
+	$(LD) YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} ) \
 	  ${TEMACS_LDFLAGS2} \
 	  -o temacs ${START_FILES} ${obj} ${otherobj} ${LIBES}
 
--- a/src/cmds.c	Mon May 24 12:00:00 2010 +0000
+++ b/src/cmds.c	Tue May 25 11:10:15 2010 +0000
@@ -278,7 +278,9 @@
        doc: /* Delete the previous N characters (following if N is negative).
 Optional second arg KILLFLAG non-nil means kill instead (save in kill ring).
 Interactively, N is the prefix arg, and KILLFLAG is set if
-N was explicitly specified.  */)
+N was explicitly specified.
+This is meant for interactive use only; from Lisp, better use `delete-char'
+with a negated argument.  */)
      (n, killflag)
      Lisp_Object n, killflag;
 {
--- a/src/composite.c	Mon May 24 12:00:00 2010 +0000
+++ b/src/composite.c	Tue May 25 11:10:15 2010 +0000
@@ -915,15 +915,16 @@
 }
 
 
-/* Try to compose the characters at CHARPOS according to CFT_ELEMENT
-   which is an element of composition-function-table (which see).
-   LIMIT limits the characters to compose.  STRING, if not nil, is a
-   target string.  WIN is a window where the characters are being
-   displayed.  */
+/* Try to compose the characters at CHARPOS according to composition
+   rule RULE ([PATTERN PREV-CHARS FUNC]).  LIMIT limits the characters
+   to compose.  STRING, if not nil, is a target string.  WIN is a
+   window where the characters are being displayed.  If characters are
+   successfully composed, return the composition as a glyph-string
+   object.  Otherwise return nil.  */
 
 static Lisp_Object
-autocmp_chars (cft_element, charpos, bytepos, limit, win, face, string)
-     Lisp_Object cft_element;
+autocmp_chars (rule, charpos, bytepos, limit, win, face, string)
+     Lisp_Object rule;
      EMACS_INT charpos, bytepos, limit;
      struct window *win;
      struct face *face;
@@ -932,90 +933,66 @@
   int count = SPECPDL_INDEX ();
   FRAME_PTR f = XFRAME (win->frame);
   Lisp_Object pos = make_number (charpos);
+  EMACS_INT to;
   EMACS_INT pt = PT, pt_byte = PT_BYTE;
-  int lookback;
+  Lisp_Object re, font_object, lgstring;
+  int len;
 
   record_unwind_save_match_data ();
-  for (lookback = -1; CONSP (cft_element); cft_element = XCDR (cft_element))
+  re = AREF (rule, 0);
+  if (NILP (re))
+    len = 1;
+  else if (! STRINGP (re))
+    return unbind_to (count, Qnil);
+  else if ((len = fast_looking_at (re, charpos, bytepos, limit, -1, string))
+	   > 0)
     {
-      Lisp_Object elt = XCAR (cft_element);
-      Lisp_Object re;
-      Lisp_Object font_object = Qnil, gstring;
-      EMACS_INT len, to;
-
-      if (! VECTORP (elt) || ASIZE (elt) != 3)
-	continue;
-      if (lookback < 0)
-	{
-	  lookback = XFASTINT (AREF (elt, 1));
-	  if (limit > charpos + MAX_COMPOSITION_COMPONENTS)
-	    limit = charpos + MAX_COMPOSITION_COMPONENTS;
-	}
-      else if (lookback != XFASTINT (AREF (elt, 1)))
-	break;
-      re = AREF (elt, 0);
-      if (NILP (re))
-	len = 1;
-      else if ((len = fast_looking_at (re, charpos, bytepos, limit, -1, string))
-	       > 0)
-	{
-	  if (NILP (string))
-	    len = BYTE_TO_CHAR (bytepos + len) - charpos;
-	  else
-	    len = string_byte_to_char (string, bytepos + len) - charpos;
-	}
-      if (len > 0)
-	{
-	  limit = to = charpos + len;
+      if (NILP (string))
+	len = BYTE_TO_CHAR (bytepos + len) - charpos;
+      else
+	len = string_byte_to_char (string, bytepos + len) - charpos;
+    }
+  if (len <= 0)
+    return unbind_to (count, Qnil);
+  to = limit = charpos + len;
 #ifdef HAVE_WINDOW_SYSTEM
-	  if (FRAME_WINDOW_P (f))
-	    {
-	      font_object = font_range (charpos, &to, win, face, string);
-	      if (! FONT_OBJECT_P (font_object)
-		  || (! NILP (re)
-		      && to < limit
-		      && (fast_looking_at (re, charpos, bytepos, to, -1, string) <= 0)))
-		{
-		  if (NILP (string))
-		    TEMP_SET_PT_BOTH (pt, pt_byte);
-		  return unbind_to (count, Qnil);
-		}
-	    }
-	  else
+  if (FRAME_WINDOW_P (f))
+    {
+      font_object = font_range (charpos, &to, win, face, string);
+      if (! FONT_OBJECT_P (font_object)
+	  || (! NILP (re)
+	      && to < limit
+	      && (fast_looking_at (re, charpos, bytepos, to, -1, string) <= 0)))
+	return unbind_to (count, Qnil);
+    }
+  else
 #endif	/* not HAVE_WINDOW_SYSTEM */
-	    font_object = win->frame;
-	  gstring = Fcomposition_get_gstring (pos, make_number (to),
-					      font_object, string);
-	  if (NILP (LGSTRING_ID (gstring)))
-	    {
-	      Lisp_Object args[6];
+    font_object = win->frame;
+  lgstring = Fcomposition_get_gstring (pos, make_number (to), font_object,
+				       string);
+  if (NILP (LGSTRING_ID (lgstring)))
+    {
+      Lisp_Object args[6];
 
-	      /* Save point as marker before calling out to lisp.  */
-	      if (NILP (string))
-		{
-		  Lisp_Object m = Fmake_marker ();
-		  set_marker_both (m, Qnil, pt, pt_byte);
-		  record_unwind_protect (restore_point_unwind, m);
-		}
+      /* Save point as marker before calling out to lisp.  */
+      if (NILP (string))
+	{
+	  Lisp_Object m = Fmake_marker ();
+	  set_marker_both (m, Qnil, pt, pt_byte);
+	  record_unwind_protect (restore_point_unwind, m);
+	}
 
-	      args[0] = Vauto_composition_function;
-	      args[1] = AREF (elt, 2);
-	      args[2] = pos;
-	      args[3] = make_number (to);
-	      args[4] = font_object;
-	      args[5] = string;
-	      gstring = safe_call (6, args);
-	    }
-	  else if (NILP (string))
-	    {
-	      TEMP_SET_PT_BOTH (pt, pt_byte);
-	    }
-	  return unbind_to (count, gstring);
-	}
+      args[0] = Vauto_composition_function;
+      args[1] = AREF (rule, 2);
+      args[2] = pos;
+      args[3] = make_number (to);
+      args[4] = font_object;
+      args[5] = string;
+      lgstring = safe_call (6, args);
+      if (NILP (string))
+	TEMP_SET_PT_BOTH (pt, pt_byte);
     }
-  if (NILP (string))
-    TEMP_SET_PT_BOTH (pt, pt_byte);
-  return unbind_to (count, Qnil);
+  return unbind_to (count, lgstring);
 }
 
 static Lisp_Object _work_val;
@@ -1126,8 +1103,9 @@
 	  if (! NILP (val))
 	    {
 	      Lisp_Object elt;
+	      int ridx;
 
-	      for (; CONSP (val); val = XCDR (val))
+	      for (ridx = 0; CONSP (val); val = XCDR (val), ridx++)
 		{
 		  elt = XCAR (val);
 		  if (VECTORP (elt) && ASIZE (elt) == 3
@@ -1137,6 +1115,7 @@
 		}
 	      if (CONSP (val))
 		{
+		  cmp_it->rule_idx = ridx;
 		  cmp_it->lookback = XFASTINT (AREF (elt, 1));
 		  cmp_it->stop_pos = charpos - 1 - cmp_it->lookback;
 		  cmp_it->ch = c;
@@ -1167,45 +1146,54 @@
       limit = bytepos + len;
       while (CHAR_COMPOSABLE_P (c))
 	{
-	  for (val = CHAR_TABLE_REF (Vcomposition_function_table, c);
-	       CONSP (val); val = XCDR (val))
+	  val = CHAR_TABLE_REF (Vcomposition_function_table, c);
+	  if (! NILP (val))
 	    {
-	      Lisp_Object elt = XCAR (val);
-	      int back, len;
+	      Lisp_Object elt;
+	      int ridx, back, len;
 
-	      if (VECTORP (elt) && ASIZE (elt) == 3
-		  && NATNUMP (AREF (elt, 1))
-		  && charpos - (back = XFASTINT (AREF (elt, 1))) > endpos)
+	      for (ridx = 0; CONSP (val); val = XCDR (val), ridx++)
 		{
-		  EMACS_INT cpos = charpos - back, bpos;
+		  elt = XCAR (val);
+		  if (VECTORP (elt) && ASIZE (elt) == 3
+		      && NATNUMP (AREF (elt, 1))
+		      && charpos - (back = XFASTINT (AREF (elt, 1))) > endpos)
+		    {
+		      EMACS_INT cpos = charpos - back, bpos;
 
-		  if (back == 0)
-		    bpos = bytepos;
-		  else
-		    bpos = (NILP (string) ? CHAR_TO_BYTE (cpos)
-			    : string_char_to_byte (string, cpos));
-		  if (STRINGP (AREF (elt, 0)))
-		    len = fast_looking_at (AREF (elt, 0), cpos, bpos,
-					   start + 1, limit, string);
-		  else
-		    len = 1;
-		  if (len > 0)
-		    {
-		      /* Make CPOS point to the last character of match.
-			 Note that LEN is byte-length.  */
-		      bpos += len;
-		      if (NILP (string))
-			cpos = BYTE_TO_CHAR (bpos) - 1;
+		      if (back == 0)
+			bpos = bytepos;
+		      else
+			bpos = (NILP (string) ? CHAR_TO_BYTE (cpos)
+				: string_char_to_byte (string, cpos));
+		      if (STRINGP (AREF (elt, 0)))
+			len = fast_looking_at (AREF (elt, 0), cpos, bpos,
+					       start + 1, limit, string);
 		      else
-			cpos = string_byte_to_char (string, bpos) - 1;
-		      back = cpos - (charpos - back);
-		      if (cmp_it->stop_pos < cpos
-			  || (cmp_it->stop_pos == cpos
-			      && cmp_it->lookback < back))
+			len = 1;
+		      if (len > 0)
 			{
-			  cmp_it->stop_pos = cpos;
-			  cmp_it->ch = c;
-			  cmp_it->lookback = back;
+			  /* Make CPOS point to the last character of
+			     match.  Note that LEN is byte-length.  */
+			  if (len > 1)
+			    {
+			      bpos += len;
+			      if (NILP (string))
+				cpos = BYTE_TO_CHAR (bpos) - 1;
+			      else
+				cpos = string_byte_to_char (string, bpos) - 1;
+			    }
+			  back = cpos - (charpos - back);
+			  if (cmp_it->stop_pos < cpos
+			      || (cmp_it->stop_pos == cpos
+				  && cmp_it->lookback < back))
+			    {
+			      cmp_it->rule_idx = ridx;
+			      cmp_it->stop_pos = cpos;
+			      cmp_it->ch = c;
+			      cmp_it->lookback = back;
+			      cmp_it->nchars = back + 1;
+			    }
 			}
 		    }
 		}
@@ -1293,7 +1281,7 @@
   if (cmp_it->ch == -2)
     {
       composition_compute_stop_pos (cmp_it, charpos, bytepos, endpos, string);
-      if (cmp_it->stop_pos != charpos)
+      if (cmp_it->ch == -2 || cmp_it->stop_pos != charpos)
 	/* The current position is not composed.  */
 	return 0;
     }
@@ -1314,55 +1302,75 @@
     }
   else if (w)
     {
-      Lisp_Object val, elt;
-      int i;
+      Lisp_Object lgstring = Qnil;
+      Lisp_Object val, elt, re;
+      int len, i;
 
       val = CHAR_TABLE_REF (Vcomposition_function_table, cmp_it->ch);
+      for (i = 0; i < cmp_it->rule_idx; i++, val = XCDR (val));
       if (charpos < endpos)
 	{
 	  for (; CONSP (val); val = XCDR (val))
 	    {
 	      elt = XCAR (val);
-	      if (cmp_it->lookback == XFASTINT (AREF (elt, 1)))
+	      if (! VECTORP (elt) || ASIZE (elt) != 3
+		  || ! INTEGERP (AREF (elt, 1)))
+		continue;
+	      if (XFASTINT (AREF (elt, 1)) != cmp_it->lookback)
+		goto no_composition;		  
+	      lgstring = autocmp_chars (elt, charpos, bytepos, endpos,
+					w, face, string);
+	      if (composition_gstring_p (lgstring))
 		break;
+	      lgstring = Qnil;
+	      /* Composition failed perhaps because the font doesn't
+		 support sufficient range of characters.  Try the
+		 other composition rules if any.  */
 	    }
-	  if (NILP (val))
-	    goto no_composition;
-
-	  val = autocmp_chars (val, charpos, bytepos, endpos, w, face, string);
-	  if (! composition_gstring_p (val))
-	    goto no_composition;
 	  cmp_it->reversed_p = 0;
 	}
       else
 	{
-	  EMACS_INT saved_charpos = charpos, saved_bytepos = bytepos;
+	  EMACS_INT cpos = charpos, bpos = bytepos;
 
-	  if (cmp_it->lookback > 0)
+	  while (1)
 	    {
-	      charpos -= cmp_it->lookback;
-	      if (charpos < endpos)
+	      elt = XCAR (val);
+	      if (cmp_it->lookback > 0)
+		{
+		  cpos -= cmp_it->lookback;
+		  if (STRINGP (string))
+		    bpos = string_char_to_byte (string, cpos);
+		  else
+		    bpos = CHAR_TO_BYTE (cpos);
+		}
+	      lgstring = autocmp_chars (elt, cpos, bpos, charpos + 1, w, face,
+					string);
+	      if (composition_gstring_p (lgstring)
+		  && cpos + LGSTRING_CHAR_LEN (lgstring) - 1 == charpos)
+		break;
+	      /* Composition failed or didn't cover the current
+		 character.  */
+	      if (cmp_it->lookback == 0)
 		goto no_composition;
-	      if (STRINGP (string))
-		bytepos = string_char_to_byte (string, charpos);
-	      else
-		bytepos = CHAR_TO_BYTE (charpos);
-	    }
-	  val = autocmp_chars (val, charpos, bytepos, saved_charpos + 1,
-			       w, face, string);
-	  if (! composition_gstring_p (val)
-	      || charpos + LGSTRING_CHAR_LEN (val) <= saved_charpos)
-	    {
-	      charpos = saved_charpos, bytepos = saved_bytepos;
-	      goto no_composition;
+	      lgstring = Qnil;
+	      /* Try to find a shorter compostion that starts after CPOS.  */
+	      composition_compute_stop_pos (cmp_it, charpos, bytepos, cpos,
+					    string);
+	      if (cmp_it->ch == -2 || cmp_it->stop_pos < charpos)
+		goto no_composition;
+	      val = CHAR_TABLE_REF (Vcomposition_function_table, cmp_it->ch);
+	      for (i = 0; i < cmp_it->rule_idx; i++, val = XCDR (val));
 	    }
 	  cmp_it->reversed_p = 1;
 	}
-      if (NILP (LGSTRING_ID (val)))
-	val = composition_gstring_put_cache (val, -1);
-      cmp_it->id = XINT (LGSTRING_ID (val));
-      for (i = 0; i < LGSTRING_GLYPH_LEN (val); i++)
-	if (NILP (LGSTRING_GLYPH (val, i)))
+      if (NILP (lgstring))
+	goto no_composition;
+      if (NILP (LGSTRING_ID (lgstring)))
+	lgstring = composition_gstring_put_cache (lgstring, -1);
+      cmp_it->id = XINT (LGSTRING_ID (lgstring));
+      for (i = 0; i < LGSTRING_GLYPH_LEN (lgstring); i++)
+	if (NILP (LGSTRING_GLYPH (lgstring, i)))
 	  break;
       cmp_it->nglyphs = i;
       cmp_it->from = 0;
@@ -1378,10 +1386,10 @@
   if (charpos < endpos)
     {
       charpos++;
-      if (STRINGP (string))
-	bytepos += MULTIBYTE_LENGTH_NO_CHECK (SDATA (string) + bytepos);
+      if (NILP (string))
+	INC_POS (bytepos);
       else
-	INC_POS (bytepos);
+	bytepos += MULTIBYTE_FORM_LENGTH (SDATA (string) + bytepos, 0);
     }
   else
     {
@@ -1393,11 +1401,20 @@
   return 0;
 }
 
-/* Update nchars, nbytes, and width of the current grapheme cluster
-   which is identified by CMP_IT->from (if the composition is static
-   or automatic in l2r context) or CMPT_IT->to (if the composition is
-   automatic in r2l context).  In addition, in the former case, update
-   CMP_IT->to, and in the latter case, update CMP_IT->from.  */
+/* Update charpos, nchars, nbytes, and width of the current grapheme
+   cluster.
+
+   If the composition is static or automatic in L2R context, the
+   cluster is identified by CMP_IT->from, and CHARPOS is the position
+   of the first character of the cluster.  In this case, update
+   CMP_IT->to too.
+
+   If the composition is automatic in R2L context, the cluster is
+   identified by CMP_IT->to, and CHARPOS is the position of the last
+   character of the cluster.  In this case, update CMP_IT->from too.
+
+   The return value is the character code of the first character of
+   the cluster, or -1 if the composition is somehow broken.  */
 
 int
 composition_update_it (cmp_it, charpos, bytepos, string)
@@ -1409,8 +1426,10 @@
 
   if (cmp_it->ch < 0)
     {
+      /* static composition */
       struct composition *cmp = composition_table[cmp_it->id];
 
+      cmp_it->charpos = charpos;
       cmp_it->to = cmp_it->nglyphs;
       if (cmp_it->nglyphs == 0)
 	c = -1;
@@ -1423,70 +1442,64 @@
 	    c = ' ';
 	}
       cmp_it->width = cmp->width;
+      charpos += cmp_it->nchars;
+      if (STRINGP (string))
+	cmp_it->nbytes = string_char_to_byte (string, charpos) - bytepos;
+      else
+	cmp_it->nbytes = CHAR_TO_BYTE (charpos) - bytepos;
     }
   else
     {
+      /* automatic composition */
       Lisp_Object gstring = composition_gstring_from_id (cmp_it->id);
+      Lisp_Object glyph;
+      int from, to;
 
       if (cmp_it->nglyphs == 0)
 	{
-	  c = -1;
 	  cmp_it->nchars = LGSTRING_CHAR_LEN (gstring);
 	  cmp_it->width = 0;
+	  cmp_it->from = cmp_it->to = 0;
+	  return -1;
 	}
-      else if (! cmp_it->reversed_p)
+      if (! cmp_it->reversed_p)
 	{
-	  Lisp_Object glyph = LGSTRING_GLYPH (gstring, cmp_it->from);
-	  int from = LGLYPH_FROM (glyph);
-
-	  c = XINT (LGSTRING_CHAR (gstring, from));
-	  cmp_it->nchars = LGLYPH_TO (glyph) - from + 1;
-	  cmp_it->width = (LGLYPH_WIDTH (glyph) > 0
-			   ? CHAR_WIDTH (LGLYPH_CHAR (glyph)) : 0);
+	  glyph = LGSTRING_GLYPH (gstring, cmp_it->from);
+	  from = LGLYPH_FROM (glyph);
 	  for (cmp_it->to = cmp_it->from + 1; cmp_it->to < cmp_it->nglyphs;
 	       cmp_it->to++)
 	    {
 	      glyph = LGSTRING_GLYPH (gstring, cmp_it->to);
 	      if (LGLYPH_FROM (glyph) != from)
 		break;
-	      if (LGLYPH_WIDTH (glyph) > 0)
-		cmp_it->width += CHAR_WIDTH (LGLYPH_CHAR (glyph));
 	    }
+	  cmp_it->charpos = charpos;
 	}
       else
 	{
-	  int from_idx = cmp_it->to - 1;
-	  Lisp_Object glyph = LGSTRING_GLYPH (gstring, from_idx);
-	  int from = LGLYPH_FROM (glyph);
-
-	  c = XINT (LGSTRING_CHAR (gstring, from));
-	  cmp_it->nchars = LGLYPH_TO (glyph) - from + 1;
-	  cmp_it->width = (LGLYPH_WIDTH (glyph) > 0
-			   ? CHAR_WIDTH (LGLYPH_CHAR (glyph)) : 0);
-	  for (from_idx--; from_idx >= 0; from_idx--)
+	  glyph = LGSTRING_GLYPH (gstring, cmp_it->to - 1);
+	  from = LGLYPH_FROM (glyph);
+	  cmp_it->charpos = charpos - (LGLYPH_TO (glyph) - from);
+	  for (cmp_it->from = cmp_it->to - 1; cmp_it->from > 0;
+	       cmp_it->from--)
 	    {
-	      glyph = LGSTRING_GLYPH (gstring, from_idx);
+	      glyph = LGSTRING_GLYPH (gstring, cmp_it->from - 1);
 	      if (LGLYPH_FROM (glyph) != from)
 		break;
-	      if (LGLYPH_WIDTH (glyph) > 0)
-		cmp_it->width += CHAR_WIDTH (LGLYPH_CHAR (glyph));
 	    }
-	  cmp_it->from = from_idx + 1;
-	  charpos -= cmp_it->nchars - 1;
-	  bytepos += CHAR_BYTES (c);
-	  if (STRINGP (string))
-	    cmp_it->nbytes = bytepos - string_char_to_byte (string, charpos);
-	  else
-	    cmp_it->nbytes = bytepos - CHAR_TO_BYTE (charpos);
-	  return c;
+	}
+      glyph = LGSTRING_GLYPH (gstring, cmp_it->from);
+      cmp_it->nchars = LGLYPH_TO (glyph) + 1 - from;
+      cmp_it->nbytes = 0;
+      cmp_it->width = 0;
+      for (i = cmp_it->nchars - 1; i >= 0; i--)
+	{
+	  c = XINT (LGSTRING_CHAR (gstring, i));
+	  cmp_it->nbytes += CHAR_BYTES (c);
+	  cmp_it->width = (LGLYPH_WIDTH (glyph) > 0
+			   ? CHAR_WIDTH (LGLYPH_CHAR (glyph)) : 0);
 	}
     }
-
-  charpos += cmp_it->nchars;
-  if (STRINGP (string))
-    cmp_it->nbytes = string_char_to_byte (string, charpos) - bytepos;
-  else
-    cmp_it->nbytes = CHAR_TO_BYTE (charpos) - bytepos;
   return c;
 }
 
@@ -1655,7 +1668,7 @@
 		    check.pos_byte = cur.pos_byte;
 		  else
 		    check.pos_byte = CHAR_TO_BYTE (check.pos);
-		  val = autocmp_chars (check_val, check.pos, check.pos_byte,
+		  val = autocmp_chars (elt, check.pos, check.pos_byte,
 				       tail, w, NULL, string);
 		  need_adjustment = 1;
 		  if (! NILP (val))
@@ -2059,7 +2072,7 @@
 a function to call to compose that character.
 
 The element at index C in the table, if non-nil, is a list of
-this form: ([PATTERN PREV-CHARS FUNC] ...)
+composition rules of this form: ([PATTERN PREV-CHARS FUNC] ...)
 
 PATTERN is a regular expression which C and the surrounding
 characters must match.
--- a/src/dispextern.h	Mon May 24 12:00:00 2010 +0000
+++ b/src/dispextern.h	Tue May 25 11:10:15 2010 +0000
@@ -1976,17 +1976,31 @@
      are not iterating over a composition now.  */
   int id;
   /* If non-negative, character that triggers the automatic
-     composition at `stop_pos', and this is an automatic compositoin.
+     composition at `stop_pos', and this is an automatic composition.
      If negative, this is a static composition.  This is set to -2
      temporarily if searching of composition reach a limit or a
      newline.  */
   int ch;
-  /* If this an automatic composition, how many characters to look back
-     from the position where a character triggering the composition
-     exists.  */
+  /* If this is an automatic composition, index of a rule for making
+     the automatic composition.  Provided that ELT is an element of
+     Vcomposition_function_table for CH, (nth ELT RULE_IDX) is the
+     rule for the composition.  */
+  int rule_idx;
+  /* If this is an automatic composition, how many characters to look
+     back from the position where a character triggering the
+     composition exists.  */
   int lookback;
   /* If non-negative, number of glyphs of the glyph-string.  */
   int nglyphs;
+  /* Nonzero iff the composition is created while buffer is scanned in
+     reverse order, and thus the grapheme clusters must be rendered
+     from the last to the first.  */
+  int reversed_p;
+
+  /** The following members contain information about the current
+      grapheme cluster.  */
+  /* Position of the first character of the current grapheme cluster.  */
+  EMACS_INT charpos;
   /* Number of characters and bytes of the current grapheme cluster.  */
   int nchars, nbytes;
   /* Indices of the glyphs for the current grapheme cluster.  */
@@ -1995,10 +2009,6 @@
      graphic display and in units of canonical characters on a
      terminal display.  */
   int width;
-  /* Nonzero iff the composition is created while buffer is scanned in
-     reverse order, and thus the grapheme clusters must be rendered
-     from the last to the first.  */
-  int reversed_p;
 };
 
 struct it
--- a/src/editfns.c	Mon May 24 12:00:00 2010 +0000
+++ b/src/editfns.c	Tue May 25 11:10:15 2010 +0000
@@ -220,6 +220,16 @@
   return make_string_from_bytes (str, 1, len);
 }
 
+DEFUN ("byte-to-string", Fbyte_to_string, Sbyte_to_string, 1, 1, 0,
+       doc: /* Convert arg BYTE to a string containing that byte.  */)
+     (byte)
+     Lisp_Object byte;
+{
+  CHECK_NUMBER (byte);
+  unsigned char b = XINT (byte);
+  return make_string_from_bytes (&b, 1, 1);
+}
+
 DEFUN ("string-to-char", Fstring_to_char, Sstring_to_char, 1, 1, 0,
        doc: /* Convert arg STRING to a character, the first character of that string.
 A multibyte character is handled correctly.  */)
@@ -4686,6 +4696,7 @@
   defsubr (&Sgoto_char);
   defsubr (&Sstring_to_char);
   defsubr (&Schar_to_string);
+  defsubr (&Sbyte_to_string);
   defsubr (&Sbuffer_substring);
   defsubr (&Sbuffer_substring_no_properties);
   defsubr (&Sbuffer_string);
--- a/src/process.c	Mon May 24 12:00:00 2010 +0000
+++ b/src/process.c	Tue May 25 11:10:15 2010 +0000
@@ -3347,11 +3347,25 @@
   /* :service SERVICE -- string, integer (port number), or t (random port).  */
   service = Fplist_get (contact, QCservice);
 
+  /* :host HOST -- hostname, ip address, or 'local for localhost.  */
+  host = Fplist_get (contact, QChost);
+  if (!NILP (host))
+    {
+      if (EQ (host, Qlocal))
+	host = build_string ("localhost");
+      CHECK_STRING (host);
+    }
+
 #ifdef HAVE_LOCAL_SOCKETS
   if (family == AF_LOCAL)
     {
-      /* Host is not used.  */
-      host = Qnil;
+      if (!NILP (host))
+	{
+	  message (":family local ignores the :host \"%s\" property",
+		   SDATA (host));
+	  contact = Fplist_put (contact, QChost, Qnil);
+	  host = Qnil;
+	}
       CHECK_STRING (service);
       bzero (&address_un, sizeof address_un);
       address_un.sun_family = AF_LOCAL;
@@ -3362,15 +3376,6 @@
     }
 #endif
 
-  /* :host HOST -- hostname, ip address, or 'local for localhost.  */
-  host = Fplist_get (contact, QChost);
-  if (!NILP (host))
-    {
-      if (EQ (host, Qlocal))
-	host = build_string ("localhost");
-      CHECK_STRING (host);
-    }
-
   /* Slow down polling to every ten seconds.
      Some kernels have a bug which causes retrying connect to fail
      after a connect.  Polling can interfere with gethostbyname too.  */
--- a/src/xdisp.c	Mon May 24 12:00:00 2010 +0000
+++ b/src/xdisp.c	Tue May 25 11:10:15 2010 +0000
@@ -6339,10 +6339,10 @@
 	      /* Update IT's char/byte positions to point to the last
 		 character of the previous grapheme cluster, or the
 		 character visually after the current composition.  */
-	      bidi_move_to_visually_next (&it->bidi_it);
+	      for (i = 0; i < it->cmp_it.nchars; i++)
+		bidi_move_to_visually_next (&it->bidi_it);
 	      IT_BYTEPOS (*it) = it->bidi_it.bytepos;
 	      IT_CHARPOS (*it) = it->bidi_it.charpos;
-
 	      if (it->cmp_it.from > 0)
 		{
 		  /* Proceed to the previous grapheme cluster.  */
@@ -7108,19 +7108,6 @@
       it->object = it->w->buffer;
       it->c = composition_update_it (&it->cmp_it, IT_CHARPOS (*it),
 				     IT_BYTEPOS (*it), Qnil);
-      if (it->cmp_it.reversed_p)
-	{
-	  /* Now it->position points the last character of the current
-	     grapheme cluster.  Adjust it to point the first one.  We
-	     have to do it here so that append_composite_glyph sets
-	     correct (struct glyph)->charpos.  */
-	  int i;
-	  for (i = 0; i < it->cmp_it.nchars - 1; i++)
-	    bidi_move_to_visually_next (&it->bidi_it);
-	  IT_CHARPOS (*it) = it->bidi_it.charpos;
-	  IT_BYTEPOS (*it) = it->bidi_it.bytepos;
-	  it->position = it->current.pos;
-	}
     }
   return 1;
 }
@@ -21943,7 +21930,7 @@
 	    g[1] = *g;
 	  glyph = it->glyph_row->glyphs[it->area];
 	}
-      glyph->charpos = CHARPOS (it->position);
+      glyph->charpos = it->cmp_it.charpos;
       glyph->object = it->object;
       glyph->pixel_width = it->pixel_width;
       glyph->ascent = it->ascent;