changeset 112061:2b8e51d977c3

merge emacs-23
author Kenichi Handa <handa@m17n.org>
date Fri, 24 Dec 2010 11:30:43 +0900
parents aa074c12a65c (current diff) d75c0dfd5c92 (diff)
children 34341d09c440
files
diffstat 81 files changed, 2054 insertions(+), 782 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Dec 02 09:44:25 2010 +0900
+++ b/ChangeLog	Fri Dec 24 11:30:43 2010 +0900
@@ -1,3 +1,7 @@
+2010-12-11  Glenn Morris  <rgm@gnu.org>
+
+	* make-dist: Exclude etc/*.pyc.  [Backport from trunk]
+
 2010-11-13  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	Fix alloca definition when using gcc on non-gnu systems.
--- a/README	Thu Dec 02 09:44:25 2010 +0900
+++ b/README	Fri Dec 24 11:30:43 2010 +0900
@@ -3,7 +3,7 @@
 See the end of the file for license conditions.
 
 
-This directory tree holds version 23.2.90 of GNU Emacs, the extensible,
+This directory tree holds version 23.2.91 of GNU Emacs, the extensible,
 customizable, self-documenting real-time display editor.
 
 The file INSTALL in this directory says how to build and install GNU
--- a/configure	Thu Dec 02 09:44:25 2010 +0900
+++ b/configure	Fri Dec 24 11:30:43 2010 +0900
@@ -1,11 +1,11 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for emacs 23.2.90.
+# Generated by GNU Autoconf 2.67 for emacs 23.2.91.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -316,7 +316,7 @@
       test -d "$as_dir" && break
     done
     test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
@@ -356,19 +356,19 @@
 fi # as_fn_arith
 
 
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
 as_fn_error ()
 {
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
-  fi
-  $as_echo "$as_me: error: $1" >&2
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -530,7 +530,7 @@
 exec 6>&1
 
 # Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 # so uname gets run too.
 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
@@ -549,8 +549,8 @@
 # Identity of this package.
 PACKAGE_NAME='emacs'
 PACKAGE_TARNAME='emacs'
-PACKAGE_VERSION='23.2.90'
-PACKAGE_STRING='emacs 23.2.90'
+PACKAGE_VERSION='23.2.91'
+PACKAGE_STRING='emacs 23.2.91'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -840,8 +840,9 @@
   fi
 
   case $ac_option in
-  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)	ac_optarg=yes ;;
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
   esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
@@ -886,7 +887,7 @@
     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid feature name: $ac_useropt"
+      as_fn_error $? "invalid feature name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -912,7 +913,7 @@
     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid feature name: $ac_useropt"
+      as_fn_error $? "invalid feature name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1116,7 +1117,7 @@
     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid package name: $ac_useropt"
+      as_fn_error $? "invalid package name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1132,7 +1133,7 @@
     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid package name: $ac_useropt"
+      as_fn_error $? "invalid package name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1162,8 +1163,8 @@
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
     ;;
 
   *=*)
@@ -1171,7 +1172,7 @@
     # Reject names that are not valid shell variable names.
     case $ac_envvar in #(
       '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
     esac
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
@@ -1189,13 +1190,13 @@
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error "missing argument to $ac_option"
+  as_fn_error $? "missing argument to $ac_option"
 fi
 
 if test -n "$ac_unrecognized_opts"; then
   case $enable_option_checking in
     no) ;;
-    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
   esac
 fi
@@ -1218,7 +1219,7 @@
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
 done
 
 # There might be people who depend on the old broken behavior: `$host'
@@ -1232,8 +1233,8 @@
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
+    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used" >&2
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
   fi
@@ -1248,9 +1249,9 @@
 ac_pwd=`pwd` && test -n "$ac_pwd" &&
 ac_ls_di=`ls -di .` &&
 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  as_fn_error "working directory cannot be determined"
+  as_fn_error $? "working directory cannot be determined"
 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  as_fn_error "pwd does not report name of working directory"
+  as_fn_error $? "pwd does not report name of working directory"
 
 
 # Find the source files, if location was not specified.
@@ -1289,11 +1290,11 @@
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
 fi
 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
 ac_abs_confdir=`(
-	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
 	pwd)`
 # When building in place, set srcdir=.
 if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1319,7 +1320,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures emacs 23.2.90 to adapt to many kinds of systems.
+\`configure' configures emacs 23.2.91 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1333,7 +1334,7 @@
       --help=short        display options specific to this package
       --help=recursive    display the short help of all the included packages
   -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking...' messages
+  -q, --quiet, --silent   do not print \`checking ...' messages
       --cache-file=FILE   cache test results in FILE [disabled]
   -C, --config-cache      alias for \`--cache-file=config.cache'
   -n, --no-create         do not create output files
@@ -1393,7 +1394,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of emacs 23.2.90:";;
+     short | recursive ) echo "Configuration of emacs 23.2.91:";;
    esac
   cat <<\_ACEOF
 
@@ -1539,10 +1540,10 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-emacs configure 23.2.90
-generated by GNU Autoconf 2.65
-
-Copyright (C) 2009 Free Software Foundation, Inc.
+emacs configure 23.2.91
+generated by GNU Autoconf 2.67
+
+Copyright (C) 2010 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -1658,7 +1659,7 @@
     mv -f conftest.er1 conftest.err
   fi
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } >/dev/null && {
+  test $ac_status = 0; } > conftest.i && {
 	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        }; then :
@@ -1682,10 +1683,10 @@
 ac_fn_c_check_header_mongrel ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  if eval "test \"\${$3+set}\"" = set; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
   $as_echo_n "(cached) " >&6
 fi
 eval ac_res=\$$3
@@ -1721,7 +1722,7 @@
 else
   ac_header_preproc=no
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
 $as_echo "$ac_header_preproc" >&6; }
 
@@ -1748,7 +1749,7 @@
 esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
   $as_echo_n "(cached) " >&6
 else
   eval "$3=\$ac_header_compiler"
@@ -1812,7 +1813,7 @@
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1842,7 +1843,7 @@
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1854,7 +1855,7 @@
 else
   eval "$3=no"
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 fi
 eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -1863,15 +1864,18 @@
 
 } # ac_fn_c_check_header_preproc
 
-# ac_fn_c_check_decl LINENO SYMBOL VAR
-# ------------------------------------
-# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
 ac_fn_c_check_decl ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
-$as_echo_n "checking whether $2 is declared... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1880,8 +1884,12 @@
 int
 main ()
 {
-#ifndef $2
-  (void) $2;
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
 #endif
 
   ;
@@ -1911,7 +1919,7 @@
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
 $as_echo_n "checking for $2.$3... " >&6; }
-if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$4+set}\"" = set; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1967,7 +1975,7 @@
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2035,7 +2043,7 @@
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
   $as_echo_n "(cached) " >&6
 else
   eval "$3=no"
@@ -2083,8 +2091,8 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by emacs $as_me 23.2.90, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+It was created by emacs $as_me 23.2.91, which was
+generated by GNU Autoconf 2.67.  Invocation command line was
 
   $ $0 $@
 
@@ -2194,11 +2202,9 @@
   {
     echo
 
-    cat <<\_ASBOX
-## ---------------- ##
+    $as_echo "## ---------------- ##
 ## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
     echo
     # The following way of writing the cache mishandles newlines in values,
 (
@@ -2232,11 +2238,9 @@
 )
     echo
 
-    cat <<\_ASBOX
-## ----------------- ##
+    $as_echo "## ----------------- ##
 ## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
     echo
     for ac_var in $ac_subst_vars
     do
@@ -2249,11 +2253,9 @@
     echo
 
     if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
+      $as_echo "## ------------------- ##
 ## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
       echo
       for ac_var in $ac_subst_files
       do
@@ -2267,11 +2269,9 @@
     fi
 
     if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
+      $as_echo "## ----------- ##
 ## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
       echo
       cat confdefs.h
       echo
@@ -2326,7 +2326,12 @@
 ac_site_file1=NONE
 ac_site_file2=NONE
 if test -n "$CONFIG_SITE"; then
-  ac_site_file1=$CONFIG_SITE
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
 elif test "x$prefix" != xNONE; then
   ac_site_file1=$prefix/share/config.site
   ac_site_file2=$prefix/etc/config.site
@@ -2341,7 +2346,11 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
     sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
   fi
 done
 
@@ -2422,7 +2431,7 @@
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
 fi
 ## -------------------- ##
 ## Main body of script. ##
@@ -2556,7 +2565,7 @@
 	    m | mo | mot | moti | motif )	val=motif ;;
 	    g | gt | gtk  )	val=gtk ;;
 	    * )
-as_fn_error "\`--with-x-toolkit=$withval' is invalid;
+as_fn_error $? "\`--with-x-toolkit=$withval' is invalid;
 this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
 \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5
 	    ;;
@@ -2712,7 +2721,7 @@
 
 # Check whether --with-gtk was given.
 if test "${with_gtk+set}" = set; then :
-  withval=$with_gtk; as_fn_error "--with-gtk has been removed.  Use --with-x-toolkit to
+  withval=$with_gtk; as_fn_error $? "--with-gtk has been removed.  Use --with-x-toolkit to
 specify a toolkit." "$LINENO" 5
 fi
 
@@ -2720,7 +2729,7 @@
 
 # Check whether --with-gcc was given.
 if test "${with_gcc+set}" = set; then :
-  withval=$with_gcc; as_fn_error "--with-gcc has been removed.  Set the \`CC' environment
+  withval=$with_gcc; as_fn_error $? "--with-gcc has been removed.  Set the \`CC' environment
 variable to specify a compiler." "$LINENO" 5
 fi
 
@@ -2826,7 +2835,7 @@
 	stringfreelist) ac_gc_check_string_free_list=1 ;;
 	xmallocoverrun)	ac_xmalloc_overrun=1 ;;
 	conslist)	ac_gc_check_cons_list=1 ;;
-	*)	as_fn_error "unknown check category $check" "$LINENO" 5 ;;
+	*)	as_fn_error $? "unknown check category $check" "$LINENO" 5 ;;
 	esac
 done
 IFS="$ac_save_IFS"
@@ -2931,16 +2940,22 @@
 
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
-  for ac_t in install-sh install.sh shtool; do
-    if test -f "$ac_dir/$ac_t"; then
-      ac_aux_dir=$ac_dir
-      ac_install_sh="$ac_aux_dir/$ac_t -c"
-      break 2
-    fi
-  done
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
 done
 if test -z "$ac_aux_dir"; then
-  as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
 fi
 
 # These three variables are undocumented and unsupported,
@@ -2954,7 +2969,7 @@
 
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
 $as_echo_n "checking build system type... " >&6; }
@@ -2965,16 +2980,16 @@
 test "x$ac_build_alias" = x &&
   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
 test "x$ac_build_alias" = x &&
-  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
 $as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -2999,7 +3014,7 @@
   ac_cv_host=$ac_cv_build
 else
   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
 fi
 
 fi
@@ -3007,7 +3022,7 @@
 $as_echo "$ac_cv_host" >&6; }
 case $ac_cv_host in
 *-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
 esac
 host=$ac_cv_host
 ac_save_IFS=$IFS; IFS='-'
@@ -3353,7 +3368,7 @@
 
 
 if test $unported = yes; then
-  as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
+  as_fn_error $? "Emacs hasn't been ported to \`${canonical}' systems.
 Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
 fi
 
@@ -3667,8 +3682,8 @@
 
 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
 
 # Provide some information about the compiler.
 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -3782,9 +3797,8 @@
 
 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "C compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -3826,8 +3840,8 @@
 else
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest conftest$ac_cv_exeext
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -3884,9 +3898,9 @@
     else
 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
+as_fn_error $? "cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5; }
     fi
   fi
 fi
@@ -3937,8 +3951,8 @@
 
 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
@@ -4274,7 +4288,7 @@
   # Broken: fails on valid input.
 continue
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -4290,11 +4304,11 @@
 ac_preproc_ok=:
 break
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then :
   break
 fi
@@ -4333,7 +4347,7 @@
   # Broken: fails on valid input.
 continue
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -4349,18 +4363,18 @@
 ac_preproc_ok=:
 break
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then :
 
 else
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -4421,7 +4435,7 @@
   done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_GREP"; then
-    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
   fi
 else
   ac_cv_path_GREP=$GREP
@@ -4487,7 +4501,7 @@
   done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_EGREP"; then
-    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
   fi
 else
   ac_cv_path_EGREP=$EGREP
@@ -4619,8 +4633,7 @@
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
 "
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
@@ -4809,7 +4822,7 @@
   # Broken: fails on valid input.
 continue
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -4825,11 +4838,11 @@
 ac_preproc_ok=:
 break
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then :
   break
 fi
@@ -4868,7 +4881,7 @@
   # Broken: fails on valid input.
 continue
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -4884,18 +4897,18 @@
 ac_preproc_ok=:
 break
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then :
 
 else
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -5314,7 +5327,7 @@
   if test "x${with_makeinfo}" = "xno"; then
     MAKEINFO=off
   elif ! test -e $srcdir/info/emacs; then
-    as_fn_error "You do not seem to have makeinfo >= 4.6, and your
+    as_fn_error $? "You do not seem to have makeinfo >= 4.6, and your
 source tree does not seem to have pre-built manuals in the \`info' directory.
 Either install a suitable version of makeinfo, or re-run configure
 with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
@@ -5722,7 +5735,7 @@
    fi
 
    test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \
-     as_fn_error "crt*.o not found.  Use --with-crt-dir to specify the location." "$LINENO" 5
+     as_fn_error $? "crt*.o not found.  Use --with-crt-dir to specify the location." "$LINENO" 5
    ;;
 esac
 test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib
@@ -5737,8 +5750,7 @@
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
@@ -5929,7 +5941,7 @@
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
       if test "$emacs_alsa_subdir" != yes; then
-        as_fn_error "pkg-config found alsa, but it does not compile.  See config.log for error messages." "$LINENO" 5
+        as_fn_error $? "pkg-config found alsa, but it does not compile.  See config.log for error messages." "$LINENO" 5
       fi
       ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
     fi
@@ -5953,8 +5965,7 @@
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
@@ -6796,7 +6807,7 @@
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -6804,7 +6815,7 @@
 all:
 	@echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
 case `${MAKE-make} -f conftest.make 2>/dev/null` in
   *@@@%%%=?*=@@@%%%*)
     eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -6929,7 +6940,7 @@
   have_x=disabled
 else
   case $x_includes,$x_libraries in #(
-    *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
+    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
     *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
@@ -6947,7 +6958,7 @@
 	@echo libdir='${LIBDIR}'
 _ACEOF
   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
     for ac_var in incroot usrlibdir libdir; do
       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
     done
@@ -7033,7 +7044,7 @@
   fi
 done
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 fi # $ac_x_includes = no
 
 if test "$ac_x_libraries" = no; then
@@ -7203,7 +7214,7 @@
 if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
   HAVE_NS=yes
 else
-  as_fn_error "\`--with-ns' was specified, but the include
+  as_fn_error $? "\`--with-ns' was specified, but the include
   files are missing or cannot be compiled." "$LINENO" 5
 fi
 
@@ -7305,7 +7316,7 @@
    if test "$HAVE_XSERVER" = true ||
       test -n "$DISPLAY" ||
       test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
-        as_fn_error "You seem to be running X, but no X development libraries
+        as_fn_error $? "You seem to be running X, but no X development libraries
 were found.  You should install the relevant development files for X
 and for the toolkit you want, such as Gtk+, Lesstif or Motif.  Also make
 sure you have development files for image handling, i.e.
@@ -7397,8 +7408,7 @@
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
 "
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
@@ -7504,6 +7514,7 @@
 main ()
 {
   char *data, *data2, *data3;
+  const char *cdata2;
   int i, pagesize;
   int fd, fd2;
 
@@ -7528,10 +7539,10 @@
   fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
   if (fd2 < 0)
     return 4;
-  data2 = "";
-  if (write (fd2, data2, 1) != 1)
+  cdata2 = "";
+  if (write (fd2, cdata2, 1) != 1)
     return 5;
-  data2 = mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
+  data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
   if (data2 == MAP_FAILED)
     return 6;
   for (i = 0; i < pagesize; ++i)
@@ -7888,8 +7899,7 @@
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
@@ -8158,7 +8168,7 @@
   fi
 
   if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
-     as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
+     as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5
   fi
 fi
 
@@ -8184,7 +8194,7 @@
 
   if test "${GTK_COMPILES}" != "yes"; then
     if test "$USE_X_TOOLKIT" != "maybe"; then
-      as_fn_error "Gtk+ wanted, but it does not compile, see config.log.  Maybe some x11-devel files missing?" "$LINENO" 5;
+      as_fn_error $? "Gtk+ wanted, but it does not compile, see config.log.  Maybe some x11-devel files missing?" "$LINENO" 5;
     fi
   else
     HAVE_GTK=yes
@@ -8666,7 +8676,7 @@
 $as_echo "yes; using Lucid toolkit" >&6; }
       USE_X_TOOLKIT=LUCID
     elif test x"${USE_X_TOOLKIT}" = xLUCID; then
-      as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
+      as_fn_error $? "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
     else
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5
 $as_echo "no; do not use toolkit by default" >&6; }
@@ -9826,8 +9836,7 @@
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
@@ -10078,7 +10087,7 @@
     MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
 
   if test "X${MISSING}" != X; then
-    as_fn_error "The following required libraries were not found:
+    as_fn_error $? "The following required libraries were not found:
     $MISSING
 Maybe some development libraries/packages are missing?
 If you don't want to link with them give
@@ -10400,8 +10409,7 @@
   for ac_func in _getb67 GETB67 getb67; do
     as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
 
 cat >>confdefs.h <<_ACEOF
 #define CRAY_STACKSEG_END $ac_func
@@ -10465,7 +10473,7 @@
 
 
 if test x"$ac_cv_func_alloca_works" != xyes; then
-   as_fn_error "a system implementation of alloca is required " "$LINENO" 5
+   as_fn_error $? "a system implementation of alloca is required " "$LINENO" 5
 fi
 
 # fmod, logb, and frexp are found in -lm on most systems.
@@ -10652,7 +10660,7 @@
 
 
   if test $ac_cv_prog_liblockfile = yes; then
-    as_fn_error "Shared liblockfile found but can't link against it.
+    as_fn_error $? "Shared liblockfile found but can't link against it.
 This probably means that movemail could lose mail.
 There may be a \`development' package to install containing liblockfile." "$LINENO" 5
   else :
@@ -10695,8 +10703,7 @@
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
@@ -10727,8 +10734,7 @@
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
@@ -10780,8 +10786,8 @@
 static time_t time_t_min;
 
 /* Values we'll use to set the TZ environment variable.  */
-static char *tz_strings[] = {
-  (char *) 0, "TZ=GMT0", "TZ=JST-9",
+static const char *tz_strings[] = {
+  (const char *) 0, "TZ=GMT0", "TZ=JST-9",
   "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
 };
 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
@@ -10798,7 +10804,7 @@
      instead of "TZ=America/Vancouver" in order to detect the bug even
      on systems that don't support the Olson extension, or don't have the
      full zoneinfo tables installed.  */
-  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
+  putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
 
   tm.tm_year = 98;
   tm.tm_mon = 3;
@@ -10811,16 +10817,14 @@
 }
 
 static int
-mktime_test1 (now)
-     time_t now;
+mktime_test1 (time_t now)
 {
   struct tm *lt;
   return ! (lt = localtime (&now)) || mktime (lt) == now;
 }
 
 static int
-mktime_test (now)
-     time_t now;
+mktime_test (time_t now)
 {
   return (mktime_test1 (now)
 	  && mktime_test1 ((time_t) (time_t_max - now))
@@ -10844,8 +10848,7 @@
 }
 
 static int
-bigtime_test (j)
-     int j;
+bigtime_test (int j)
 {
   struct tm tm;
   time_t now;
@@ -10889,7 +10892,7 @@
      instead of "TZ=America/Vancouver" in order to detect the bug even
      on systems that don't support the Olson extension, or don't have the
      full zoneinfo tables installed.  */
-  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
+  putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
 
   t = mktime (&tm);
 
@@ -10924,7 +10927,7 @@
   for (i = 0; i < N_STRINGS; i++)
     {
       if (tz_strings[i])
-	putenv (tz_strings[i]);
+	putenv ((char*) tz_strings[i]);
 
       for (t = 0; t <= time_t_max - delta; t += delta)
 	if (! mktime_test (t))
@@ -10976,7 +10979,7 @@
 
 # Make sure getloadavg.c is where it belongs, at configure-time.
 test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
-  as_fn_error "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5
+  as_fn_error $? "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5
 
 ac_save_LIBS=$LIBS
 
@@ -12807,8 +12810,7 @@
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
@@ -13182,14 +13184,14 @@
    && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
    && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
    && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
-   as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
+   as_fn_error $? "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
 fi
 
 #### Find out which version of Emacs this is.
 version=`grep 'defconst[	 ]*emacs-version' ${srcdir}/lisp/version.el \
 	 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
 if test x"${version}" = x; then
-  as_fn_error "can't find current emacs version in \`${srcdir}/lisp/version.el'." "$LINENO" 5
+  as_fn_error $? "can't find current emacs version in \`${srcdir}/lisp/version.el'." "$LINENO" 5
 fi
 if test x"${version}" != x"$PACKAGE_VERSION"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/lisp/version.el'." >&5
@@ -13520,6 +13522,7 @@
 
 ac_libobjs=
 ac_ltlibobjs=
+U=
 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
   # 1. Remove the extension, and $U if already installed.
   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@@ -13681,19 +13684,19 @@
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
 as_fn_error ()
 {
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
-  fi
-  $as_echo "$as_me: error: $1" >&2
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -13889,7 +13892,7 @@
       test -d "$as_dir" && break
     done
     test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
@@ -13942,8 +13945,8 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by emacs $as_me 23.2.90, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+This file was extended by emacs $as_me 23.2.91, which was
+generated by GNU Autoconf 2.67.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -14008,11 +14011,11 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-emacs config.status 23.2.90
-configured by $0, generated by GNU Autoconf 2.65,
+emacs config.status 23.2.91
+configured by $0, generated by GNU Autoconf 2.67,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -14028,11 +14031,16 @@
 while test $# != 0
 do
   case $1 in
-  --*=*)
+  --*=?*)
     ac_option=`expr "X$1" : 'X\([^=]*\)='`
     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
     ac_shift=:
     ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
   *)
     ac_option=$1
     ac_optarg=$2
@@ -14054,6 +14062,7 @@
     $ac_shift
     case $ac_optarg in
     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
     esac
     as_fn_append CONFIG_FILES " '$ac_optarg'"
     ac_need_defaults=false;;
@@ -14066,7 +14075,7 @@
     ac_need_defaults=false;;
   --he | --h)
     # Conflict between --help and --header
-    as_fn_error "ambiguous option: \`$1'
+    as_fn_error $? "ambiguous option: \`$1'
 Try \`$0 --help' for more information.";;
   --help | --hel | -h )
     $as_echo "$ac_cs_usage"; exit ;;
@@ -14075,7 +14084,7 @@
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) as_fn_error "unrecognized option: \`$1'
+  -*) as_fn_error $? "unrecognized option: \`$1'
 Try \`$0 --help' for more information." ;;
 
   *) as_fn_append ac_config_targets " $1"
@@ -14143,7 +14152,7 @@
     "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
 
-  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
@@ -14181,7 +14190,7 @@
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -14198,7 +14207,7 @@
 fi
 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\r'
+  ac_cs_awk_cr='\\r'
 else
   ac_cs_awk_cr=$ac_cr
 fi
@@ -14212,18 +14221,18 @@
   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
   echo "_ACEOF"
 } >conf$$subs.sh ||
-  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   . ./conf$$subs.sh ||
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
 
   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
   if test $ac_delim_n = $ac_delim_num; then
     break
   elif $ac_last_try; then
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -14312,20 +14321,28 @@
 else
   cat
 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || as_fn_error "could not setup config files machinery" "$LINENO" 5
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
 # trailing colons and then remove the whole line if VPATH becomes empty
 # (actually we leave an empty line to preserve line numbers).
 if test "x$srcdir" = x.; then
-  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[	 ]*\):*/\1/
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
+h
+s///
+s/^/:/
+s/[	 ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
 s/:*$//
+x
+s/\(=[	 ]*\).*/\1/
+G
+s/\n//
 s/^[^=]*=[	 ]*$//
 }'
 fi
@@ -14353,7 +14370,7 @@
   if test -z "$ac_t"; then
     break
   elif $ac_last_try; then
-    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -14438,7 +14455,7 @@
 _ACAWK
 _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  as_fn_error "could not setup config headers machinery" "$LINENO" 5
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
 fi # test -n "$CONFIG_HEADERS"
 
 
@@ -14451,7 +14468,7 @@
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -14479,7 +14496,7 @@
 	   [\\/$]*) false;;
 	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
 	   esac ||
-	   as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
       as_fn_append ac_file_inputs " '$ac_f'"
@@ -14506,7 +14523,7 @@
 
     case $ac_tag in
     *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -14637,22 +14654,22 @@
 $ac_datarootdir_hack
 "
 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
   { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&5
+which seems to be undefined.  Please make sure it is defined" >&5
 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&2;}
+which seems to be undefined.  Please make sure it is defined" >&2;}
 
   rm -f "$tmp/stdin"
   case $ac_file in
   -) cat "$tmp/out" && rm -f "$tmp/out";;
   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
   esac \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
   :H)
   #
@@ -14663,19 +14680,19 @@
       $as_echo "/* $configure_input  */" \
       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
     } >"$tmp/config.h" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
 $as_echo "$as_me: $ac_file is unchanged" >&6;}
     else
       rm -f "$ac_file"
       mv "$tmp/config.h" "$ac_file" \
-	|| as_fn_error "could not create $ac_file" "$LINENO" 5
+	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
-      || as_fn_error "could not create -" "$LINENO" 5
+      || as_fn_error $? "could not create -" "$LINENO" 5
   fi
  ;;
 
@@ -14755,7 +14772,7 @@
 ac_clean_files=$ac_clean_files_save
 
 test $ac_write_fail = 0 ||
-  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
 
 
 # configure is writing to config.log, and then calls config.status.
@@ -14776,7 +14793,7 @@
   exec 5>>config.log
   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
   # would make configure fail if this is the last instruction.
-  $ac_cs_success || as_fn_exit $?
+  $ac_cs_success || as_fn_exit 1
 fi
 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
--- a/configure.in	Thu Dec 02 09:44:25 2010 +0900
+++ b/configure.in	Fri Dec 24 11:30:43 2010 +0900
@@ -22,7 +22,7 @@
 dnl  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 AC_PREREQ(2.62)
-AC_INIT(emacs, 23.2.90)
+AC_INIT(emacs, 23.2.91)
 AC_CONFIG_HEADER(src/config.h:src/config.in)
 AC_CONFIG_SRCDIR(src/lisp.h)
 
--- a/doc/emacs/ChangeLog	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/emacs/ChangeLog	Fri Dec 24 11:30:43 2010 +0900
@@ -1,3 +1,40 @@
+2010-12-18  Glenn Morris  <rgm@gnu.org>
+
+	* maintaining.texi: Move inclusion of emerge after EDE, so that it
+	matches its position in the menu.  (Bug#7674)
+
+2010-12-14  Glenn Morris  <rgm@gnu.org>
+
+	* trouble.texi (Checklist): Mention not replying via news either.
+
+2010-12-11  Eli Zaretskii  <eliz@gnu.org>
+
+	* custom.texi (Init Syntax): Add index entries for "character syntax".
+	(Bug#7576)
+
+2010-12-11  Karel Klíč  <kklic@redhat.com>
+
+	* text.texi (HTML Mode): Small fixes.  (Bug#7607)
+
+2010-12-10  Glenn Morris  <rgm@gnu.org>
+
+	* trouble.texi (Checklist): Fix typo in newsgroup name.
+
+2010-12-05  Chong Yidong  <cyd@stupidchicken.com>
+
+	* search.texi (Word Search): Note that the lazy highlight always
+	matches to whole words (Bug#7470).
+
+2010-12-04  Eli Zaretskii  <eliz@gnu.org>
+
+	* display.texi (Optional Mode Line): Make the description of
+	load-average more accurate.
+
+	* msdog.texi (Windows HOME): Mention that HOME can also be set in the
+	registry, with a cross-reference.
+	(Windows Startup): New node.  Move the stuff about the current
+	directory from "Windows HOME".
+
 2010-11-23  Bob Rogers  <rogers-emacs@rgrjr.dyndns.org>
 
 	* maintaining.texi (VC With A Locking VCS, VC Directory Commands):
@@ -7274,11 +7311,11 @@
 ;; Local Variables:
 ;; coding: utf-8
 ;; fill-column: 79
-;; add-log-time-zone-rule: t
 ;; End:
 
-    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002,
-      2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+  Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002,
+    2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+    Free Software Foundation, Inc.
 
   This file is part of GNU Emacs.
 
@@ -7295,4 +7332,3 @@
   You should have received a copy of the GNU General Public License
   along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
-;;; arch-tag: f1d62776-3ed5-4811-9d96-267252577dbd
--- a/doc/emacs/custom.texi	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/emacs/custom.texi	Fri Dec 24 11:30:43 2010 +0900
@@ -2234,6 +2234,8 @@
 non-@acronym{ASCII} in your init file.
 
 @item Characters:
+@cindex Lisp character syntax
+@cindex character syntax
 Lisp character constant syntax consists of a @samp{?} followed by
 either a character or an escape sequence starting with @samp{\}.
 Examples: @code{?x}, @code{?\n}, @code{?\"}, @code{?\)}.  Note that
@@ -2250,6 +2252,7 @@
 @code{nil} stands for `false'.
 
 @item Other Lisp objects:
+@cindex Lisp object syntax
 Write a single-quote (@code{'}) followed by the Lisp object you want.
 @end table
 
--- a/doc/emacs/display.texi	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/emacs/display.texi	Fri Dec 24 11:30:43 2010 +0900
@@ -1007,11 +1007,12 @@
 @noindent
 @vindex display-time-24hr-format
 Here @var{hh} and @var{mm} are the hour and minute, followed always by
-@samp{am} or @samp{pm}.  @var{l.ll} is the average number of running
-processes in the whole system recently.  (Some fields may be missing if
-your operating system cannot support them.)  If you prefer time display
-in 24-hour format, set the variable @code{display-time-24hr-format}
-to @code{t}.
+@samp{am} or @samp{pm}.  @var{l.ll} is the average number, collected
+for the last few minutes, of processes in the whole system that were
+either running or ready to run (i.e.@: were waiting for an available
+processor).  (Some fields may be missing if your operating system
+cannot support them.)  If you prefer time display in 24-hour format,
+set the variable @code{display-time-24hr-format} to @code{t}.
 
 @cindex mail (on mode line)
 @vindex display-time-use-mail-icon
--- a/doc/emacs/emacs.texi	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/emacs/emacs.texi	Fri Dec 24 11:30:43 2010 +0900
@@ -5,7 +5,7 @@
 
 @c The edition number appears in several places in this file
 @set EDITION   Sixteenth
-@set EMACSVER  23.2.90
+@set EMACSVER  23.2.91
 
 @copying
 This is the @value{EDITION} edition of the @cite{GNU Emacs Manual},@*
@@ -1191,6 +1191,7 @@
 
 Emacs and Microsoft Windows/MS-DOS
 
+* Windows Startup::     How to start Emacs on Windows.
 * Text and Binary::     Text files use CRLF to terminate lines.
 * Windows Files::       File-name conventions on Windows.
 * ls in Lisp::          Emulation of @code{ls} for Dired.
--- a/doc/emacs/maintaining.texi	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/emacs/maintaining.texi	Fri Dec 24 11:30:43 2010 +0900
@@ -2280,10 +2280,6 @@
   You can also use the collection of tag names to complete a symbol
 name in the buffer.  @xref{Symbol Completion}.
 
-@ifnottex
-@include emerge-xtra.texi
-@end ifnottex
-
 @node EDE
 @section Emacs Development Environment
 @cindex EDE (Emacs Development Environment)
@@ -2347,6 +2343,7 @@
 (@code{ede-compile-project}).  EDE uses the file types to guess how
 the target should be built.
 
-@ignore
-   arch-tag: b9d83dfb-82ea-4ff6-bab5-05a3617091fb
-@end ignore
+@ifnottex
+@include emerge-xtra.texi
+@end ifnottex
+
--- a/doc/emacs/msdog.texi	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/emacs/msdog.texi	Fri Dec 24 11:30:43 2010 +0900
@@ -28,6 +28,7 @@
 here.
 
 @menu
+* Windows Startup::     How to start Emacs on Windows.
 * Text and Binary::     Text files use CRLF to terminate lines.
 * Windows Files::       File-name conventions on Windows.
 * ls in Lisp::          Emulation of @code{ls} for Dired.
@@ -44,6 +45,68 @@
 @end ifnottex
 @end menu
 
+@node Windows Startup
+@section How to Start Emacs on MS-Windows
+@cindex starting Emacs on MS-Windows
+
+  There are several ways of starting Emacs on MS-Windows:
+
+@enumerate
+@item
+@pindex runemacs.exe
+@cindex desktop shortcut, MS-Windows
+@cindex start directory, MS-Windows
+@cindex directory where Emacs starts on MS-Windows
+From the desktop shortcut icon: either double-click the left mouse
+button on the icon, or click once, then press @key{RET}.  The desktop
+shortcut should specify as its ``Target'' (in the ``Properties'' of
+the shortcut) the full absolute file name of @file{runemacs.exe},
+@emph{not} of @file{emacs.exe}.  This is because @file{runemacs.exe}
+hides the console window that would have been created if the target of
+the shortcut were @file{emacs.exe} (which is a console program, as far
+as Windows is concerned).  If you use this method, Emacs starts in the
+directory specified by the shortcut.  To control where that is,
+right-click on the shortcut, select ``Properties'', and in the
+``Shortcut'' tab modify the ``Start in'' field to your liking.
+
+@item
+From the Command Prompt window, by typing @kbd{emacs @key{RET}} at the
+prompt.  The Command Prompt window where you did that will not be
+available for invoking other commands until Emacs exits.  In this
+case, Emacs will start in the current directory of the Windows shell.
+
+@item
+From the Command Prompt window, by typing @kbd{runemacs @key{RET}} at
+the prompt.  The Command Prompt window where you did that will be
+immediately available for invoking other commands.  In this case,
+Emacs will start in the current directory of the Windows shell.
+
+@item
+@cindex invoking Emacs from Windows Explorer
+@pindex emacsclient.exe
+@pindex emacsclientw.exe
+Via the Emacs client program, @file{emacsclient.exe} or
+@file{emacsclientw.exe}.  This allows to invoke Emacs from other
+programs, and to reuse a running Emacs process for serving editing
+jobs required by other programs.  @xref{Emacs Server}.  The difference
+between @file{emacsclient.exe} and @file{emacsclientw.exe} is that the
+former waits for Emacs to signal that the editing job is finished,
+while the latter does not wait.  Which one of them to use in each case
+depends on the expectations of the program that needs editing
+services.  If the program will use the edited files, it needs to wait
+for Emacs, so you should use @file{emacsclient.exe}.  By contrast, if
+the results of editing are not needed by the invoking program, you
+will be better off using @file{emacsclientw.exe}.  A notable situation
+where you would want @file{emacsclientw.exe} is when you right-click
+on a file in the Windows Explorer and select ``Open With'' from the
+pop-up menu.  Use the @samp{--alternate-editor=} or @samp{-a} options
+if Emacs might not be running (or not running as a server) when
+@command{emacsclient} is invoked---that will always give you an
+editor.  When invoked via @command{emacsclient}, Emacs will start in
+the current directory of the program that invoked
+@command{emacsclient}.
+@end enumerate
+
 @node Text and Binary
 @section Text Files and Binary Files
 @cindex text and binary files on MS-DOS/MS-Windows
@@ -341,6 +404,9 @@
 or @file{C:\WINDOWS\Profiles\@var{username}\Application Data} on the
 older Windows 9X/ME systems.
 
+  @code{HOME} can also be set in the system registry, for details see
+@ref{MS-Windows Registry}.
+
 @cindex init file @file{.emacs} on MS-Windows
   The home directory is where your init file @file{.emacs} is stored.
 When Emacs starts, it first checks whether the environment variable
@@ -372,13 +438,6 @@
 @file{_emacs} as a fallback, if such a file exists in the home
 directory, whereas @file{.emacs} does not.
 
-@cindex start directory, MS-Windows
-@cindex directory where Emacs starts on MS-Windows
-  If you use a Windows desktop shortcut to start Emacs, it starts in
-the directory specified by the shortcut.  To control where that is,
-right-click on the shortcut, select ``Properties'', and in the
-``Shortcut'' tab modify the ``Start in'' field to your liking.
-
 @node Windows Keyboard
 @section Keyboard Usage on MS-Windows
 @cindex keyboard, MS-Windows
--- a/doc/emacs/search.texi	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/emacs/search.texi	Fri Dec 24 11:30:43 2010 +0900
@@ -459,11 +459,13 @@
 These run the commands @code{word-search-forward} and
 @code{word-search-backward} respectively.
 
-  A nonincremental word search differs slightly from the incremental
-version in the way it finds a match: the last word in the search
-string must be an exact match for a whole word.  In an incremental
-word search, the last word in the search string can match part of a
-word; this allows the matching to proceed incrementally as you type.
+  Incremental and nonincremental word searches differ slightly in the
+way they find a match.  In a nonincremental word search, the last word
+in the search string must exactly match a whole word.  In an
+incremental word search, the matching is more lax: the last word in
+the search string can match part of a word, so that the matching
+proceeds incrementally as you type.  This additional laxity does not
+apply to the lazy highlight, which always matches whole words.
 
 @node Regexp Search
 @section Regular Expression Search
--- a/doc/emacs/text.texi	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/emacs/text.texi	Fri Dec 24 11:30:43 2010 +0900
@@ -1765,7 +1765,7 @@
 @kindex C-c C-n @r{(SGML mode)}
 @findex sgml-name-char
 Interactively specify a special character and insert the SGML
-@samp{&}-command for that character.
+@samp{&}-command for that character (@code{sgml-name-char}).
 
 @item C-c C-t
 @kindex C-c C-t @r{(SGML mode)}
@@ -1799,7 +1799,7 @@
 @findex sgml-skip-tag-backward
 Skip backward across a balanced tag group (which extends from an
 opening tag through its corresponding closing tag)
-(@code{sgml-skip-tag-forward}).  A numeric argument acts as a repeat
+(@code{sgml-skip-tag-backward}).  A numeric argument acts as a repeat
 count.
 
 @item C-c C-d
@@ -1841,7 +1841,7 @@
 @kindex C-c TAB @r{(SGML mode)}
 @findex sgml-tags-invisible
 Toggle the visibility of existing tags in the buffer.  This can be
-used as a cheap preview.
+used as a cheap preview (@code{sgml-tags-invisible}).
 @end table
 
 @cindex nXML mode
--- a/doc/emacs/trouble.texi	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/emacs/trouble.texi	Fri Dec 24 11:30:43 2010 +0900
@@ -629,10 +629,11 @@
 you can use.
 
 All mail sent to the @samp{bug-gnu-emacs} mailing list is also
-gatewayed to the @samp{bug.gnu.emacs} newsgroup.  The reverse is also
-true, but we ask you not to post bug reports via the newsgroup.  It
-can make it much harder to contact you if we need to ask for more
-information, and it does not integrate well with the bug tracker.
+gatewayed to the @samp{gnu.emacs.bug} newsgroup.  The reverse is also
+true, but we ask you not to post bug reports (or replies) via the
+newsgroup.  It can make it much harder to contact you if we need to ask
+for more information, and it does not integrate well with the bug
+tracker.
 
 If your data is more than 500,000 bytes, please don't include it
 directly in the bug report; instead, offer to send it on request, or
@@ -1127,6 +1128,3 @@
 @lowersections
 @end ifnottex
 
-@ignore
-   arch-tag: c9cba76d-b2cb-4e0c-ae3f-19d5ef35817c
-@end ignore
--- a/doc/lispref/ChangeLog	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/lispref/ChangeLog	Fri Dec 24 11:30:43 2010 +0900
@@ -1,3 +1,30 @@
+2010-12-18  Eli Zaretskii  <eliz@gnu.org>
+
+	* modes.texi (Emulating Mode Line): Update documentation of
+	format-mode-line according to changes that fixed bug #7587.
+
+2010-12-11  Eli Zaretskii  <eliz@gnu.org>
+
+	* processes.texi (Shell Arguments):
+	* strings.texi (Creating Strings): Don't mention "shell commands";
+	make it explicit that `split-string-and-unquote' and
+	`combine-and-quote-strings' are mainly for working with arguments
+	to call-process and start-process.
+
+	* processes.texi (Shell Arguments): Fix documentation of
+	`split-string-and-unquote'.  Add indexing.  (Bug#7563)
+
+2010-12-07  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* modes.texi (Auto-Indentation): New section to document SMIE.
+	(Major Mode Conventions):
+	* text.texi (Mode-Specific Indent): Refer to it.
+
+2010-12-04  Eli Zaretskii  <eliz@gnu.org>
+
+	* display.texi (Other Display Specs): Document left-fringe and
+	right-fringe display specs.
+
 2010-12-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* backups.texi (Making Backups):
@@ -7,8 +34,8 @@
 
 2010-11-21  Chong Yidong  <cyd@stupidchicken.com>
 
-	* nonascii.texi (Converting Representations): Document
-	byte-to-string.
+	* nonascii.texi (Converting Representations):
+	Document byte-to-string.
 
 	* strings.texi (Creating Strings): Don't mention semi-obsolete
 	function char-to-string.
@@ -39,8 +66,8 @@
 
 	* customize.texi (Composite Types): Lower-case index entry.
 
-	* loading.texi (How Programs Do Loading): Document
-	load-file-name.  (Bug#7346)
+	* loading.texi (How Programs Do Loading):
+	Document load-file-name.  (Bug#7346)
 
 2010-11-10  Glenn Morris  <rgm@gnu.org>
 
@@ -147,8 +174,8 @@
 
 	* keymaps.texi (Menu Bar): Document :advertised-binding property.
 
-	* functions.texi (Obsolete Functions): Document
-	set-advertised-calling-convention.
+	* functions.texi (Obsolete Functions):
+	Document set-advertised-calling-convention.
 
 	* minibuf.texi (Basic Completion): Document completion-in-region.
 	(Programmed Completion): Document completion-annotate-function.
@@ -273,8 +300,8 @@
 	* minibuf.texi (Basic Completion): 4th arg to all-completions is
 	obsolete.
 
-	* processes.texi (Process Buffers): Document
-	process-kill-buffer-query-function.
+	* processes.texi (Process Buffers):
+	Document process-kill-buffer-query-function.
 
 2009-12-05  Glenn Morris  <rgm@gnu.org>
 
@@ -721,8 +748,8 @@
 	(Suspending Emacs): Mark suspend-emacs as a command.
 	(Processor Run Time): Mark emacs-uptime and emacs-init-time as
 	commands.
-	(Terminal Output): Remove obsolete function baud-rate.  Document
-	TERMINAL arg for send-string-to-terminal.
+	(Terminal Output): Remove obsolete function baud-rate.
+	Document TERMINAL arg for send-string-to-terminal.
 
 	* nonascii.texi (Terminal I/O Encoding): Document TERMINAL arg for
 	terminal-coding-system and set-terminal-coding-system.
@@ -826,8 +853,8 @@
 2009-05-09  Eli Zaretskii  <eliz@gnu.org>
 
 	* nonascii.texi (Default Coding Systems): Document
-	find-auto-coding, set-auto-coding, and auto-coding-alist.  Add
-	indexing.
+	find-auto-coding, set-auto-coding, and auto-coding-alist.
+	Add indexing.
 	(Lisp and Coding Systems): Add index entries.
 
 2009-05-09  Martin Rudalics  <rudalics@gmx.at>
@@ -869,8 +896,8 @@
 
 2009-04-22  Chong Yidong  <cyd@stupidchicken.com>
 
-	* os.texi (Command-Line Arguments): Document
-	command-line-args-left.
+	* os.texi (Command-Line Arguments):
+	Document command-line-args-left.
 	(Suspending Emacs): Adapt text to multi-tty case.  Document use of
 	terminal objects for tty arguments.
 	(Startup Summary): Add xref to Session Management.
@@ -946,13 +973,13 @@
 2009-04-09  Chong Yidong  <cyd@stupidchicken.com>
 
 	* text.texi (Yank Commands): Note that yank uses push-mark.
-	(Filling): Clarify REGION argument of fill-paragraph.  Document
-	fill-forward-paragraph-function.
+	(Filling): Clarify REGION argument of fill-paragraph.
+	Document fill-forward-paragraph-function.
 	(Special Properties): Remove "new in Emacs 22" declaration.
 	(Clickable Text): Merge with Links and Mouse-1 node.
 
-	* display.texi (Button Properties, Button Buffer Commands): Change
-	xref to Clickable Text.
+	* display.texi (Button Properties, Button Buffer Commands):
+	Change xref to Clickable Text.
 
 	* tips.texi (Key Binding Conventions): Change xref to Clickable
 	Text.
@@ -1014,8 +1041,8 @@
 
 2009-03-29  Chong Yidong  <cyd@stupidchicken.com>
 
-	* help.texi (Accessing Documentation, Help Functions): Remove
-	information about long-obsolete Emacs versions.
+	* help.texi (Accessing Documentation, Help Functions):
+	Remove information about long-obsolete Emacs versions.
 
 	* modes.texi (Mode Line Variables): The default values of the mode
 	line variables are now more complicated.
@@ -1058,8 +1085,8 @@
 2009-03-23  Chong Yidong  <cyd@stupidchicken.com>
 
 	* minibuf.texi (Intro to Minibuffers): Remove long-obsolete info
-	about minibuffers in old Emacs versions.  Copyedits.  Emphasize
-	that enable-recursive-minibuffers defaults to nil.
+	about minibuffers in old Emacs versions.  Copyedits.
+	Emphasize that enable-recursive-minibuffers defaults to nil.
 	(Text from Minibuffer): Simplify introduction.
 
 2009-03-22  Alan Mackenzie  <acm@muc.de>
@@ -1113,8 +1140,8 @@
 	* customize.texi (Common Keywords): It's not necessary to use :tag
 	to remove hyphens, as custom-unlispify-tag-name does it
 	automatically.
-	(Variable Definitions): Link to File Local Variables.  Document
-	customized-value symbol property.
+	(Variable Definitions): Link to File Local Variables.
+	Document customized-value symbol property.
 	(Customization Types): Move menu to end of node.
 
 2009-03-10  Chong Yidong  <cyd@stupidchicken.com>
@@ -1225,8 +1252,8 @@
 	* text.texi (Commands for Insertion):
 	* commands.texi (Event Mod):
 	* keymaps.texi (Searching Keymaps):
-	* nonascii.texi (Translation of Characters): Reinstate
-	documentation of translation-table-for-input.
+	* nonascii.texi (Translation of Characters):
+	Reinstate documentation of translation-table-for-input.
 	(Explicit Encoding): Document the `charset' text property produced
 	by decode-coding-region and decode-coding-string.
 
@@ -1255,8 +1282,8 @@
 2009-01-22  Chong Yidong  <cyd@stupidchicken.com>
 
 	* files.texi (Format Conversion Piecemeal): Clarify behavior of
-	write-region-annotate-functions.  Document
-	write-region-post-annotation-function.
+	write-region-annotate-functions.
+	Document write-region-post-annotation-function.
 
 2009-01-19  Chong Yidong  <cyd@stupidchicken.com>
 
@@ -1323,8 +1350,8 @@
 
 	* processes.texi (Serial Ports): Improve wording, suggested by RMS.
 
-	* nonascii.texi (Lisp and Coding Systems): Document
-	inhibit-null-byte-detection and inhibit-iso-escape-detection.
+	* nonascii.texi (Lisp and Coding Systems):
+	Document inhibit-null-byte-detection and inhibit-iso-escape-detection.
 	(Character Properties): Improve wording.
 
 2009-01-09  Chong Yidong  <cyd@stupidchicken.com>
@@ -1332,8 +1359,8 @@
 	* display.texi (Font Lookup): Remove obsolete function
 	x-font-family-list.  x-list-fonts accepts Fontconfig/GTK syntax.
 	(Low-Level Font): Rename from Fonts, move to end of Faces section.
-	(Font Selection): Reorder order of variable descriptions.  Minor
-	clarifications.
+	(Font Selection): Reorder order of variable descriptions.
+	Minor clarifications.
 
 	* elisp.texi (Top): Update node listing.
 
@@ -1354,8 +1381,8 @@
 	* elisp.texi: Update node listing.
 
 	* display.texi (Faces): Put Font Selection node after Auto Faces.
-	(Face Attributes): Don't link to Font Lookup.  Document
-	font-family-list.
+	(Face Attributes): Don't link to Font Lookup.
+	Document font-family-list.
 	(Fonts): New node.
 
 2009-01-08  Jason Rumney  <jasonr@gnu.org>
@@ -1583,8 +1610,8 @@
 	* windows.texi (Window Hooks): Remove *-end-trigger-functions
 	vars, which are obsolete.  Mention jit-lock-register.
 
-	* modes.texi (Other Font Lock Variables): Document
-	jit-lock-register and jit-lock-unregister.
+	* modes.texi (Other Font Lock Variables):
+	Document jit-lock-register and jit-lock-unregister.
 
 	* frames.texi (Color Parameters): Document alpha parameter.
 
@@ -1656,8 +1683,8 @@
 2008-11-01  Eli Zaretskii  <eliz@gnu.org>
 
 	* nonascii.texi (Text Representations): Rewrite to make consistent
-	with Emacs 23 internal representation of characters.  Document
-	`unibyte-string'.
+	with Emacs 23 internal representation of characters.
+	Document `unibyte-string'.
 
 2008-10-28  Chong Yidong  <cyd@stupidchicken.com>
 
@@ -1770,8 +1797,8 @@
 
 	* processes.texi (Synchronous Processes): Document `process-lines'.
 
-	* customize.texi (Variable Definitions): Document
-	`custom-reevaluate-setting'.
+	* customize.texi (Variable Definitions):
+	Document `custom-reevaluate-setting'.
 
 2008-10-18  Martin Rudalics  <rudalics@gmx.at>
 
@@ -1787,13 +1814,13 @@
 	* maps.texi (Standard Keymaps): Document `multi-query-replace-map'
 	and `search-map'.
 
-	* searching.texi (Search and Replace): Document
-	`replace-search-function' and `replace-re-search-function'.
+	* searching.texi (Search and Replace):
+	Document `replace-search-function' and `replace-re-search-function'.
 	Document `multi-query-replace-map'.
 
 	* minibuf.texi (Text from Minibuffer): Document `read-regexp'.
-	(Completion Commands, Reading File Names): Rename
-	`minibuffer-local-must-match-filename-map' to
+	(Completion Commands, Reading File Names):
+	Rename `minibuffer-local-must-match-filename-map' to
 	`minibuffer-local-filename-must-match-map'.
 	(Minibuffer Completion): The `require-match' argument to
 	`completing-read' can now have the value `confirm-only'.
@@ -2138,7 +2165,7 @@
 
 2007-12-30  Richard Stallman  <rms@gnu.org>
 
-	* commands.texi (Accessing Mouse): Renamed from Accessing Events.
+	* commands.texi (Accessing Mouse): Rename from Accessing Events.
 	(Accessing Scroll): New node broken out of Accessing Mouse.
 
 2007-12-28  Richard Stallman  <rms@gnu.org>
@@ -2182,8 +2209,8 @@
 
 2007-11-29  Glenn Morris  <rgm@gnu.org>
 
-	* functions.texi (Declaring Functions): Add findex.  Mention
-	`external' files.
+	* functions.texi (Declaring Functions): Add findex.
+	Mention `external' files.
 
 2007-11-26  Juanma Barranquero  <lekktu@gmail.com>
 
@@ -2310,8 +2337,8 @@
 	* display.texi (Display Property): Explain some display specs
 	don't let you move point in.
 
-	* frames.texi (Cursor Parameters): Describe
-	cursor-in-non-selected-windows here.  Explain more values.
+	* frames.texi (Cursor Parameters):
+	Describe cursor-in-non-selected-windows here.  Explain more values.
 
 	* windows.texi (Basic Windows): Don't describe
 	cursor-in-non-selected-windows here.
@@ -2390,8 +2417,8 @@
 
 2007-08-16  Richard Stallman  <rms@gnu.org>
 
-	* processes.texi (Asynchronous Processes): Clarify
-	doc of start-file-process.
+	* processes.texi (Asynchronous Processes):
+	Clarify doc of start-file-process.
 
 2007-08-08  Martin Rudalics  <rudalics@gmx.at>
 
@@ -2458,8 +2485,8 @@
 
 2007-06-27  Richard Stallman  <rms@gnu.org>
 
-	* files.texi (Format Conversion Piecemeal): Clarify
-	`after-insert-file-functions' calling convention.
+	* files.texi (Format Conversion Piecemeal):
+	Clarify `after-insert-file-functions' calling convention.
 
 2007-06-27  Michael Albinus  <michael.albinus@gmx.de>
 
@@ -2514,8 +2541,8 @@
 
 2007-05-30  Nick Roberts  <nickrob@snap.net.nz>
 
-	* commands.texi (Click Events): Layout more logically.  Describe
-	width and height.
+	* commands.texi (Click Events): Layout more logically.
+	Describe width and height.
 	(Drag Events, Motion Events): Update to new format for position.
 
 2007-06-02  Richard Stallman  <rms@gnu.org>
@@ -2921,8 +2948,8 @@
 
 2007-03-05  Richard Stallman  <rms@gnu.org>
 
-	* variables.texi (File Local Variables): Update
-	enable-local-variables values.
+	* variables.texi (File Local Variables):
+	Update enable-local-variables values.
 
 2007-03-04  Richard Stallman  <rms@gnu.org>
 
@@ -2993,8 +3020,8 @@
 2007-02-03  Eli Zaretskii  <eliz@gnu.org>
 
 	* elisp.texi (Top): Make the detailed menu headers compliant with
-	Texinfo guidelines and with what texnfo-upd.el expects.  Add
-	comments to prevent people from inadvertently modifying the key
+	Texinfo guidelines and with what texnfo-upd.el expects.
+	Add comments to prevent people from inadvertently modifying the key
 	parts needed by `texinfo-multiple-files-update'.
 
 2007-02-02  Eli Zaretskii  <eliz@gnu.org>
@@ -3081,8 +3108,8 @@
 
 2006-12-24  Richard Stallman  <rms@gnu.org>
 
-	* customize.texi (Variable Definitions): Document
-	new name custom-add-frequent-value.
+	* customize.texi (Variable Definitions):
+	Document new name custom-add-frequent-value.
 
 2006-12-19  Kim F. Storm  <storm@cua.dk>
 
@@ -3381,8 +3408,8 @@
 
 2006-09-01  Chong Yidong  <cyd@stupidchicken.com>
 
-	* buffers.texi (Buffer Modification): Document
-	buffer-chars-modified-tick.
+	* buffers.texi (Buffer Modification):
+	Document buffer-chars-modified-tick.
 
 2006-08-31  Richard Stallman  <rms@gnu.org>
 
@@ -3444,7 +3471,7 @@
 2006-08-12  Chong Yidong  <cyd@stupidchicken.com>
 
 	* text.texi (Near Point): Say "cursor" not "terminal cursor".
-	(Commands for Insertion): Removed split-line since it's not
+	(Commands for Insertion): Remove split-line since it's not
 	relevant for Lisp programming.
 	(Yank Commands): Rewrite introduction.
 	(Undo): Clarify.
@@ -3475,7 +3502,7 @@
 	(Major Mode Basics): Mention define-derived-mode explicitly.
 	(Major Mode Conventions): Rebinding RET is OK for some modes.
 	Mention change-major-mode-hook and after-change-major-mode-hook.
-	(Example Major Modes): Moved to end of Modes section.
+	(Example Major Modes): Move to end of Modes section.
 	(Mode Line Basics): Clarify.
 	(Mode Line Data): Mention help-echo and local-map in strings.
 	Explain reason for treatment of non-risky variables.
@@ -3974,7 +4001,7 @@
 
 2006-05-25  Chong Yidong  <cyd@stupidchicken.com>
 
-	* keymaps.texi (Key Sequences): Renamed from Keymap Terminology.
+	* keymaps.texi (Key Sequences): Rename from Keymap Terminology.
 	Explain string and vector representations of key sequences.
 
 	* keymaps.texi (Changing Key Bindings):
@@ -4023,8 +4050,8 @@
 
 2006-05-15  Oliver Scholz  <epameinondas@gmx.de>  (tiny change)
 
-	* nonascii.texi (Explicit Encoding): Fix
-	typo (encoding<->decoding).
+	* nonascii.texi (Explicit Encoding):
+	Fix typo (encoding<->decoding).
 
 2006-05-14  Richard Stallman  <rms@gnu.org>
 
@@ -4074,8 +4101,8 @@
 
 2006-05-09  Richard Stallman  <rms@gnu.org>
 
-	* variables.texi (File Local Variables): Document
-	safe-local-eval-forms and safe-local-eval-function.
+	* variables.texi (File Local Variables):
+	Document safe-local-eval-forms and safe-local-eval-function.
 
 2006-05-07  Kim F. Storm  <storm@cua.dk>
 
@@ -4559,8 +4586,8 @@
 
 2005-12-03  Eli Zaretskii  <eliz@gnu.org>
 
-	* hooks.texi (Standard Hooks): Add index entries.  Mention
-	`compilation-finish-functions'.
+	* hooks.texi (Standard Hooks): Add index entries.
+	Mention `compilation-finish-functions'.
 
 2005-11-27  Richard M. Stallman  <rms@gnu.org>
 
@@ -4783,8 +4810,8 @@
 	buffer-local.
 	(Undo): Note that buffer-undo-list is buffer-local.
 
-	* windows.texi (Buffers and Windows): Document
-	buffer-display-count.
+	* windows.texi (Buffers and Windows):
+	Document buffer-display-count.
 
 2005-09-06  Richard M. Stallman  <rms@gnu.org>
 
@@ -5025,7 +5052,7 @@
 
 	* display.texi (Displaying Messages): New node, with most
 	of what was in The Echo Area.
-	(Progress): Moved under The Echo Area.
+	(Progress): Move under The Echo Area.
 	(Logging Messages): New node with new text.
 	(Echo Area Customization): New node, the rest of what was
 	in The Echo Area.  Document message-truncate-lines with @defvar.
@@ -6340,8 +6367,8 @@
 	(Scroll Bars): Add scroll-bar-mode and scroll-bar-width.
 	(Usual Display): Move tab-width up.
 
-	* customize.texi (Variable Definitions): Replace
-	show-paren-mode example with tooltip-mode.
+	* customize.texi (Variable Definitions):
+	Replace show-paren-mode example with tooltip-mode.
 	(Simple Types, Composite Types, Defining New Types):
 	Minor cleanups.
 
@@ -6577,8 +6604,8 @@
 	(Display Fringe Bitmaps): New node.
 	(Images): Add 'Image Slices' to menu.
 	(Image Descriptors): Add `:pointer' and `:map' properties.
-	(Showing Images): Add slice arg to `insert-image'.  Add
-	'insert-sliced-image'.
+	(Showing Images): Add slice arg to `insert-image'.
+	Add 'insert-sliced-image'.
 
 2004-09-20  Richard M. Stallman  <rms@gnu.org>
 
@@ -6591,8 +6618,8 @@
 
 2004-09-07  Luc Teirlinck  <teirllm@auburn.edu>
 
-	* locals.texi (Standard Buffer-Local Variables): Add
-	`buffer-auto-save-file-format'.
+	* locals.texi (Standard Buffer-Local Variables):
+	Add `buffer-auto-save-file-format'.
 	* internals.texi (Buffer Internals): Describe new
 	auto_save_file_format field of the buffer structure.
 	* files.texi (Format Conversion): `auto-save-file-format' has been
@@ -6980,8 +7007,8 @@
 
 2004-04-05  Jesper Harder  <harder@ifa.au.dk>
 
-	* variables.texi (Variable Aliases): Mention
-	cyclic-variable-indirection.
+	* variables.texi (Variable Aliases):
+	Mention cyclic-variable-indirection.
 
 	* errors.texi (Standard Errors): Ditto.
 
@@ -7160,7 +7187,7 @@
 
 2004-02-07  Jan Djärv  <jan.h.d@swipnet.se>
 
-	* positions.texi (Text Lines): Added missing end defun.
+	* positions.texi (Text Lines): Add missing end defun.
 
 2004-02-07  Kim F. Storm  <storm@cua.dk>
 
@@ -7183,12 +7210,12 @@
 	read-minibuffer.
 	(Minibuffer History): Clarify description of cons values for
 	HISTORY arguments.
-	(Basic Completion): Various corrections and clarifications.  Add
-	completion-regexp-list.
+	(Basic Completion): Various corrections and clarifications.
+	Add completion-regexp-list.
 	(Minibuffer Completion): Correct and clarify description of
 	completing-read.
-	(Completion Commands): Mention Partial Completion mode.  Various
-	other minor changes.
+	(Completion Commands): Mention Partial Completion mode.
+	Various other minor changes.
 	(High-Level Completion): Various corrections and clarifications.
 	(Reading File Names): Ditto.
 	(Minibuffer Misc): Ditto.
@@ -7263,8 +7290,8 @@
 
 	* functions.texi: Various small changes in addition to the
 	following.
-	(What Is a Function): `functionp' returns nil for macros.  Clarify
-	behavior of this and following functions for symbol arguments.
+	(What Is a Function): `functionp' returns nil for macros.
+	Clarify behavior of this and following functions for symbol arguments.
 	(Function Documentation): Add `\' in front of (fn @var{arglist})
 	and explain why.
 	(Defining Functions): Mention DOCSTRING argument to `defalias'.
@@ -8060,7 +8087,7 @@
 
 2003-01-31  Joe Buehler  <jhpb@draco.hekimian.com>
 
-	* os.texi (System Environment): Added cygwin system-type.
+	* os.texi (System Environment): Add cygwin system-type.
 
 2003-01-25  Richard M. Stallman  <rms@gnu.org>
 
@@ -8093,7 +8120,7 @@
 
 	* README: Target for Info file is `make info'.
 
-	* files.texi (File Name Components): Fixed typos in
+	* files.texi (File Name Components): Fix typos in
 	`file-name-sans-extension'.
 	(Magic File Names): Complete list of operations for magic file
 	name handlers.
@@ -8109,7 +8136,7 @@
 
 2002-08-05  Per Abrahamsen  <abraham@dina.kvl.dk>
 
-	* customize.texi (Splicing into Lists): Fixed example.
+	* customize.texi (Splicing into Lists): Fix example.
 	Reported by Fabrice Bauzac <fabrice.bauzac@wanadoo.fr>.
 
 2002-06-17  Juanma Barranquero  <lektu@terra.es>
@@ -8149,8 +8176,8 @@
 
 2001-11-17  Eli Zaretskii  <eliz@is.elta.co.il>
 
-	* permute-index: Don't depend on csh-specific features.  Replace
-	the interpreter name with /bin/sh.
+	* permute-index: Don't depend on csh-specific features.
+	Replace the interpreter name with /bin/sh.
 
 	* two-volume-cross-refs.txt: New file.
 	* two.el: New file.
@@ -8288,8 +8315,8 @@
 	* numbers.texi (Integer Basics): Document CL style read syntax for
 	integers in bases other than 10.
 
-	* positions.texi (List Motion): Document
-	open-paren-in-column-0-is-defun-start.
+	* positions.texi (List Motion):
+	Document open-paren-in-column-0-is-defun-start.
 
 	* lists.texi (Sets And Lists): Document member-ignore-case.
 
@@ -8484,7 +8511,7 @@
 1995-06-19  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
 
 	* Makefile (VERSION): Update version number.
-	(maintainer-clean): Renamed from realclean.
+	(maintainer-clean): Rename from realclean.
 
 1995-06-07  Karl Heuer  <kwzh@nutrimat.gnu.ai.mit.edu>
 
@@ -8556,11 +8583,11 @@
 
 1991-11-26  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
-	* Makefile (srcs): Added index.perm.
+	* Makefile (srcs): Add index.perm.
 	(elisp.dvi): Remove erroneous shell comment.
 	Expect output of permute-index in permuted.fns.
 	Save old elisp.aux in elisp.oaux.
-	(clean): Added index.texi to be deleted.
+	(clean): Add index.texi to be deleted.
 
 1990-08-11  Richard Stallman  (rms@sugar-bombs.ai.mit.edu)
 
--- a/doc/lispref/book-spine.texinfo	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/lispref/book-spine.texinfo	Fri Dec 24 11:30:43 2010 +0900
@@ -11,7 +11,7 @@
 @center @titlefont{GNU Emacs Lisp Reference Manual}
 @sp 5
 @center GNU
-@center Emacs Version 23.2.90
+@center Emacs Version 23.2.91
 @center for Unix Users
 @sp 5
 
--- a/doc/lispref/display.texi	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/lispref/display.texi	Fri Dec 24 11:30:43 2010 +0900
@@ -3890,6 +3890,13 @@
 but it is done as a special case of marginal display (@pxref{Display
 Margins}).
 
+@item (left-fringe @var{bitmap} @r{[}@var{face}@r{]})
+@itemx (right-fringe @var{bitmap} @r{[}@var{face}@r{]})
+This display specification on any character of a line of text causes
+the specified @var{bitmap} be displayed in the left or right fringes
+for that line.  The optional @var{face} specifies the colors to be
+used for the bitmap.  @xref{Fringe Bitmaps}, for the details.
+
 @item (space-width @var{factor})
 This display specification affects all the space characters within the
 text that has the specification.  It displays all of these spaces
--- a/doc/lispref/elisp.texi	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/lispref/elisp.texi	Fri Dec 24 11:30:43 2010 +0900
@@ -8,7 +8,7 @@
 @c Please remember to update the edition number in README as well.
 @c And also the copies in vol1.texi and vol2.texi.
 @set VERSION  3.0
-@set EMACSVER 23.2.90
+@set EMACSVER 23.2.91
 @set DATE July 2009
 
 @c in general, keep the following line commented out, unless doing a
--- a/doc/lispref/modes.texi	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/lispref/modes.texi	Fri Dec 24 11:30:43 2010 +0900
@@ -24,10 +24,11 @@
 * Major Modes::                 Defining major modes.
 * Minor Modes::                 Defining minor modes.
 * Mode Line Format::            Customizing the text that appears in the mode line.
-* Imenu::              How a mode can provide a menu
+* Imenu::                       How a mode can provide a menu
                          of definitions in the buffer.
-* Font Lock Mode::     How modes can highlight text according to syntax.
-* Desktop Save Mode::  How modes can have buffer state saved between
+* Font Lock Mode::              How modes can highlight text according to syntax.
+* Auto-Indentation::            How to teach Emacs to indent for a major mode.
+* Desktop Save Mode::           How modes can have buffer state saved between
                          Emacs sessions.
 @end menu
 
@@ -332,7 +333,7 @@
 programming language, indentation of text according to structure is
 probably useful.  So the mode should set @code{indent-line-function}
 to a suitable function, and probably customize other variables
-for indentation.
+for indentation.  @xref{Auto-Indentation}.
 
 @item
 @cindex keymaps in modes
@@ -2110,29 +2111,43 @@
 based on a certain mode-line specification.
 
 @defun format-mode-line format &optional face window buffer
-This function formats a line of text according to @var{format} as if
-it were generating the mode line for @var{window}, but instead of
-displaying the text in the mode line or the header line, it returns
-the text as a string.  The argument @var{window} defaults to the
-selected window.  If @var{buffer} is non-@code{nil}, all the
-information used is taken from @var{buffer}; by default, it comes from
-@var{window}'s buffer.
+This function formats a line of text according to @var{format} as if it
+were generating the mode line for @var{window}, but it also returns the
+text as a string.  The argument @var{window} defaults to the selected
+window.  If @var{buffer} is non-@code{nil}, all the information used is
+taken from @var{buffer}; by default, it comes from @var{window}'s
+buffer.
 
 The value string normally has text properties that correspond to the
 faces, keymaps, etc., that the mode line would have.  And any character
-for which no @code{face} property is specified gets a default
-value which is usually @var{face}.  (If @var{face} is @code{t},
-that stands for either @code{mode-line} if @var{window} is selected,
-otherwise @code{mode-line-inactive}.  If @var{face} is @code{nil} or
-omitted, that stands for no face property.)
+for which no @code{face} property is specified gets a default value
+determined by @var{face}.  If @var{face} is @code{t}, that stands for
+either @code{mode-line} if @var{window} is selected, otherwise
+@code{mode-line-inactive}.  If @var{face} is @code{nil} or omitted, that
+stands for no face property.
 
 However, if @var{face} is an integer, the value has no text properties.
 
+You can also specify other valid faces as the value of @var{face}.
+If the value is a @dfn{basic face}, one of @code{default}, @code{mode-line},
+@code{mode-line-inactive}, @code{header-line}, or @code{tool-bar}, that
+face provides the @code{face} property for characters whose face is not
+specified by @var{format}.  Any other face is treated as @code{default},
+but you can remap one of the basic faces (@pxref{Face Remapping}) to get
+the same effect as with non-basic faces.
+
+Note that using @code{mode-line}, @code{mode-line-inactive}, or
+@code{header-line} as @var{face} will actually redisplay the mode line
+or the header line, respectively, using the current definitions of the
+corresponding face, in addition to returning the formatted string.
+(Other faces do not cause redisplay.)
+
 For example, @code{(format-mode-line header-line-format)} returns the
 text that would appear in the selected window's header line (@code{""}
 if it has no header line).  @code{(format-mode-line header-line-format
 'header-line)} returns the same text, with each character
-carrying the face that it will have in the header line itself.
+carrying the face that it will have in the header line itself, and also
+redraws the header line.
 @end defun
 
 @node Imenu
@@ -3214,6 +3229,665 @@
 reasonably fast.
 @end defvar
 
+@node Auto-Indentation
+@section Auto-indention of code
+
+For programming languages, an important feature of a major mode is to
+provide automatic indentation.  This is controlled in Emacs by
+@code{indent-line-function} (@pxref{Mode-Specific Indent}).
+Writing a good indentation function can be difficult and to a large
+extent it is still a black art.
+
+Many major mode authors will start by writing a simple indentation
+function that works for simple cases, for example by comparing with the
+indentation of the previous text line.  For most programming languages
+that are not really line-based, this tends to scale very poorly:
+improving such a function to let it handle more diverse situations tends
+to become more and more difficult, resulting in the end with a large,
+complex, unmaintainable indentation function which nobody dares to touch.
+
+A good indentation function will usually need to actually parse the
+text, according to the syntax of the language.  Luckily, it is not
+necessary to parse the text in as much detail as would be needed
+for a compiler, but on the other hand, the parser embedded in the
+indentation code will want to be somewhat friendly to syntactically
+incorrect code.
+
+Good maintainable indentation functions usually fall into 2 categories:
+either parsing forward from some ``safe'' starting point until the
+position of interest, or parsing backward from the position of interest.
+Neither of the two is a clearly better choice than the other: parsing
+backward is often more difficult than parsing forward because
+programming languages are designed to be parsed forward, but for the
+purpose of indentation it has the advantage of not needing to
+guess a ``safe'' starting point, and it generally enjoys the property
+that only a minimum of text will be analyzed to decide the indentation
+of a line, so indentation will tend to be unaffected by syntax errors in
+some earlier unrelated piece of code.  Parsing forward on the other hand
+is usually easier and has the advantage of making it possible to
+reindent efficiently a whole region at a time, with a single parse.
+
+Rather than write your own indentation function from scratch, it is
+often preferable to try and reuse some existing ones or to rely
+on a generic indentation engine.  There are sadly few such
+engines.  The CC-mode indentation code (used with C, C++, Java, Awk
+and a few other such modes) has been made more generic over the years,
+so if your language seems somewhat similar to one of those languages,
+you might try to use that engine.  @c FIXME: documentation?
+Another one is SMIE which takes an approach in the spirit
+of Lisp sexps and adapts it to non-Lisp languages.
+
+@menu
+* SMIE::                        A simple minded indentation engine
+@end menu
+
+@node SMIE
+@subsection Simple Minded Indentation Engine
+
+SMIE is a package that provides a generic navigation and indentation
+engine.  Based on a very simple parser using an ``operator precedence
+grammar'', it lets major modes extend the sexp-based navigation of Lisp
+to non-Lisp languages as well as provide a simple to use but reliable
+auto-indentation.
+
+Operator precedence grammar is a very primitive technology for parsing
+compared to some of the more common techniques used in compilers.
+It has the following characteristics: its parsing power is very limited,
+and it is largely unable to detect syntax errors, but it has the
+advantage of being algorithmically efficient and able to parse forward
+just as well as backward.  In practice that means that SMIE can use it
+for indentation based on backward parsing, that it can provide both
+@code{forward-sexp} and @code{backward-sexp} functionality, and that it
+will naturally work on syntactically incorrect code without any extra
+effort.  The downside is that it also means that most programming
+languages cannot be parsed correctly using SMIE, at least not without
+resorting to some special tricks (@pxref{SMIE Tricks}).
+
+@menu
+* SMIE setup::                  SMIE setup and features
+* Operator Precedence Grammars::  A very simple parsing technique
+* SMIE Grammar::                Defining the grammar of a language
+* SMIE Lexer::                  Defining tokens
+* SMIE Tricks::                 Working around the parser's limitations
+* SMIE Indentation::            Specifying indentation rules
+* SMIE Indentation Helpers::    Helper functions for indentation rules
+* SMIE Indentation Example::    Sample indentation rules
+@end menu
+
+@node SMIE setup
+@subsubsection SMIE Setup and Features
+
+SMIE is meant to be a one-stop shop for structural navigation and
+various other features which rely on the syntactic structure of code, in
+particular automatic indentation.  The main entry point is
+@code{smie-setup} which is a function typically called while setting
+up a major mode.
+
+@defun smie-setup grammar rules-function &rest keywords
+Setup SMIE navigation and indentation.
+@var{grammar} is a grammar table generated by @code{smie-prec2->grammar}.
+@var{rules-function} is a set of indentation rules for use on
+@code{smie-rules-function}.
+@var{keywords} are additional arguments, which can include the following
+keywords:
+@itemize
+@item
+@code{:forward-token} @var{fun}: Specify the forward lexer to use.
+@item
+@code{:backward-token} @var{fun}: Specify the backward lexer to use.
+@end itemize
+@end defun
+
+Calling this function is sufficient to make commands such as
+@code{forward-sexp}, @code{backward-sexp}, and @code{transpose-sexps} be
+able to properly handle structural elements other than just the paired
+parentheses already handled by syntax tables.  For example, if the
+provided grammar is precise enough, @code{transpose-sexps} can correctly
+transpose the two arguments of a @code{+} operator, taking into account
+the precedence rules of the language.
+
+Calling `smie-setup' is also sufficient to make TAB indentation work in
+the expected way, and provides some commands that you can bind in the
+major mode keymap.
+
+@deffn Command smie-close-block
+This command closes the most recently opened (and not yet closed) block.
+@end deffn
+
+@deffn Command smie-down-list &optional arg
+This command is like @code{down-list} but it also pays attention to
+nesting of tokens other than parentheses, such as @code{begin...end}.
+@end deffn
+
+@node Operator Precedence Grammars
+@subsubsection Operator Precedence Grammars
+
+SMIE's precedence grammars simply give to each token a pair of
+precedences: the left-precedence and the right-precedence.  We say
+@code{T1 < T2} if the right-precedence of token @code{T1} is less than
+the left-precedence of token @code{T2}.  A good way to read this
+@code{<} is as a kind of parenthesis: if we find @code{... T1 something
+T2 ...}  then that should be parsed as @code{... T1 (something T2 ...}
+rather than as @code{... T1 something) T2 ...}.  The latter
+interpretation would be the case if we had @code{T1 > T2}.  If we have
+@code{T1 = T2}, it means that token T2 follows token T1 in the same
+syntactic construction, so typically we have @code{"begin" = "end"}.
+Such pairs of precedences are sufficient to express left-associativity
+or right-associativity of infix operators, nesting of tokens like
+parentheses and many other cases.
+
+@c ¡Let's leave this undocumented to leave it more open for change!
+@c @defvar smie-grammar
+@c The value of this variable is an alist specifying the left and right
+@c precedence of each token.  It is meant to be initialized by using one of
+@c the functions below.
+@c @end defvar
+
+@defun smie-prec2->grammar table
+This function takes a @emph{prec2} grammar @var{table} and returns an
+alist suitable for use in @code{smie-setup}.  The @emph{prec2}
+@var{table} is itself meant to be built by one of the functions below.
+@end defun
+
+@defun smie-merge-prec2s &rest tables
+This function takes several @emph{prec2} @var{tables} and merges them
+into a new @emph{prec2} table.
+@end defun
+
+@defun smie-precs->prec2 precs
+This function builds a @emph{prec2} table from a table of precedences
+@var{precs}.  @var{precs} should be a list, sorted by precedence (for
+example @code{"+"} will come before @code{"*"}), of elements of the form
+@code{(@var{assoc} @var{op} ...)}, where each @var{op} is a token that
+acts as an operator; @var{assoc} is their associativity, which can be
+either @code{left}, @code{right}, @code{assoc}, or @code{nonassoc}.
+All operators in a given element share the same precedence level
+and associativity.
+@end defun
+
+@defun smie-bnf->prec2 bnf &rest resolvers
+This function lets you specify the grammar using a BNF notation.
+It accepts a @var{bnf} description of the grammar along with a set of
+conflict resolution rules @var{resolvers}, and
+returns a @emph{prec2} table.
+
+@var{bnf} is a list of nonterminal definitions of the form
+@code{(@var{nonterm} @var{rhs1} @var{rhs2} ...)} where each @var{rhs}
+is a (non-empty) list of terminals (aka tokens) or non-terminals.
+
+Not all grammars are accepted:
+@itemize
+@item
+An @var{rhs} cannot be an empty list (an empty list is never needed,
+since SMIE allows all non-terminals to match the empty string anyway).
+@item
+An @var{rhs} cannot have 2 consecutive non-terminals: each pair of
+non-terminals needs to be separated by a terminal (aka token).
+This is a fundamental limitation of operator precedence grammars.
+@end itemize
+
+Additionally, conflicts can occur:
+@itemize
+@item
+The returned @emph{prec2} table holds constraints between pairs of tokens, and
+for any given pair only one constraint can be present: T1 < T2,
+T1 = T2, or T1 > T2.
+@item
+A token can be an @code{opener} (something similar to an open-paren),
+a @code{closer} (like a close-paren), or @code{neither} of the two
+(e.g. an infix operator, or an inner token like @code{"else"}).
+@end itemize
+
+Precedence conflicts can be resolved via @var{resolvers}, which
+is a list of @emph{precs} tables (see @code{smie-precs->prec2}): for
+each precedence conflict, if those @code{precs} tables
+specify a particular constraint, then the conflict is resolved by using
+this constraint instead, else a conflict is reported and one of the
+conflicting constraints is picked arbitrarily and the others are
+simply ignored.
+@end defun
+
+@node SMIE Grammar
+@subsubsection Defining the Grammar of a Language
+
+The usual way to define the SMIE grammar of a language is by
+defining a new global variable that holds the precedence table by
+giving a set of BNF rules.
+For example, the grammar definition for a small Pascal-like language
+could look like:
+@example
+@group
+(require 'smie)
+(defvar sample-smie-grammar
+  (smie-prec2->grammar
+   (smie-bnf->prec2
+@end group
+@group
+    '((id)
+      (inst ("begin" insts "end")
+            ("if" exp "then" inst "else" inst)
+            (id ":=" exp)
+            (exp))
+      (insts (insts ";" insts) (inst))
+      (exp (exp "+" exp)
+           (exp "*" exp)
+           ("(" exps ")"))
+      (exps (exps "," exps) (exp)))
+@end group
+@group
+    '((assoc ";"))
+    '((assoc ","))
+    '((assoc "+") (assoc "*")))))
+@end group
+@end example
+
+@noindent
+A few things to note:
+
+@itemize
+@item
+The above grammar does not explicitly mention the syntax of function
+calls: SMIE will automatically allow any sequence of sexps, such as
+identifiers, balanced parentheses, or @code{begin ... end} blocks
+to appear anywhere anyway.
+@item
+The grammar category @code{id} has no right hand side: this does not
+mean that it can match only the empty string, since as mentioned any
+sequence of sexps can appear anywhere anyway.
+@item
+Because non terminals cannot appear consecutively in the BNF grammar, it
+is difficult to correctly handle tokens that act as terminators, so the
+above grammar treats @code{";"} as a statement @emph{separator} instead,
+which SMIE can handle very well.
+@item
+Separators used in sequences (such as @code{","} and @code{";"} above)
+are best defined with BNF rules such as @code{(foo (foo "separator" foo) ...)}
+which generate precedence conflicts which are then resolved by giving
+them an explicit @code{(assoc "separator")}.
+@item
+The @code{("(" exps ")")} rule was not needed to pair up parens, since
+SMIE will pair up any characters that are marked as having paren syntax
+in the syntax table.  What this rule does instead (together with the
+definition of @code{exps}) is to make it clear that @code{","} should
+not appear outside of parentheses.
+@item
+Rather than have a single @emph{precs} table to resolve conflicts, it is
+preferable to have several tables, so as to let the BNF part of the
+grammar specify relative precedences where possible.
+@item
+Unless there is a very good reason to prefer @code{left} or
+@code{right}, it is usually preferable to mark operators as associative,
+using @code{assoc}.  For that reason @code{"+"} and @code{"*"} are
+defined above as @code{assoc}, although the language defines them
+formally as left associative.
+@end itemize
+
+@node SMIE Lexer
+@subsubsection Defining Tokens
+
+SMIE comes with a predefined lexical analyzer which uses syntax tables
+in the following way: any sequence of characters that have word or
+symbol syntax is considered a token, and so is any sequence of
+characters that have punctuation syntax.  This default lexer is
+often a good starting point but is rarely actually correct for any given
+language.  For example, it will consider @code{"2,+3"} to be composed
+of 3 tokens: @code{"2"}, @code{",+"}, and @code{"3"}.
+
+To describe the lexing rules of your language to SMIE, you need
+2 functions, one to fetch the next token, and another to fetch the
+previous token.  Those functions will usually first skip whitespace and
+comments and then look at the next chunk of text to see if it
+is a special token.  If so it should skip the token and
+return a description of this token.  Usually this is simply the string
+extracted from the buffer, but it can be anything you want.
+For example:
+@example
+@group
+(defvar sample-keywords-regexp
+  (regexp-opt '("+" "*" "," ";" ">" ">=" "<" "<=" ":=" "=")))
+@end group
+@group
+(defun sample-smie-forward-token ()
+  (forward-comment (point-max))
+  (cond
+   ((looking-at sample-keywords-regexp)
+    (goto-char (match-end 0))
+    (match-string-no-properties 0))
+   (t (buffer-substring-no-properties
+       (point)
+       (progn (skip-syntax-forward "w_")
+              (point))))))
+@end group
+@group
+(defun sample-smie-backward-token ()
+  (forward-comment (- (point)))
+  (cond
+   ((looking-back sample-keywords-regexp (- (point) 2) t)
+    (goto-char (match-beginning 0))
+    (match-string-no-properties 0))
+   (t (buffer-substring-no-properties
+       (point)
+       (progn (skip-syntax-backward "w_")
+              (point))))))
+@end group
+@end example
+
+Notice how those lexers return the empty string when in front of
+parentheses.  This is because SMIE automatically takes care of the
+parentheses defined in the syntax table.  More specifically if the lexer
+returns nil or an empty string, SMIE tries to handle the corresponding
+text as a sexp according to syntax tables.
+
+@node SMIE Tricks
+@subsubsection Living With a Weak Parser
+
+The parsing technique used by SMIE does not allow tokens to behave
+differently in different contexts.  For most programming languages, this
+manifests itself by precedence conflicts when converting the
+BNF grammar.
+
+Sometimes, those conflicts can be worked around by expressing the
+grammar slightly differently.  For example, for Modula-2 it might seem
+natural to have a BNF grammar that looks like this:
+
+@example
+  ...
+  (inst ("IF" exp "THEN" insts "ELSE" insts "END")
+        ("CASE" exp "OF" cases "END")
+        ...)
+  (cases (cases "|" cases) (caselabel ":" insts) ("ELSE" insts))
+  ...
+@end example
+
+But this will create conflicts for @code{"ELSE"}: on the one hand, the
+IF rule implies (among many other things) that @code{"ELSE" = "END"};
+but on the other hand, since @code{"ELSE"} appears within @code{cases},
+which appears left of @code{"END"}, we also have @code{"ELSE" > "END"}.
+We can solve the conflict either by using:
+@example
+  ...
+  (inst ("IF" exp "THEN" insts "ELSE" insts "END")
+        ("CASE" exp "OF" cases "END")
+        ("CASE" exp "OF" cases "ELSE" insts "END")
+        ...)
+  (cases (cases "|" cases) (caselabel ":" insts))
+  ...
+@end example
+or
+@example
+  ...
+  (inst ("IF" exp "THEN" else "END")
+        ("CASE" exp "OF" cases "END")
+        ...)
+  (else (insts "ELSE" insts))
+  (cases (cases "|" cases) (caselabel ":" insts) (else))
+  ...
+@end example
+
+Reworking the grammar to try and solve conflicts has its downsides, tho,
+because SMIE assumes that the grammar reflects the logical structure of
+the code, so it is preferable to keep the BNF closer to the intended
+abstract syntax tree.
+
+Other times, after careful consideration you may conclude that those
+conflicts are not serious and simply resolve them via the
+@var{resolvers} argument of @code{smie-bnf->prec2}.  Usually this is
+because the grammar is simply ambiguous: the conflict does not affect
+the set of programs described by the grammar, but only the way those
+programs are parsed.  This is typically the case for separators and
+associative infix operators, where you want to add a resolver like
+@code{'((assoc "|"))}.  Another case where this can happen is for the
+classic @emph{dangling else} problem, where you will use @code{'((assoc
+"else" "then"))}.  It can also happen for cases where the conflict is
+real and cannot really be resolved, but it is unlikely to pose a problem
+in practice.
+
+Finally, in many cases some conflicts will remain despite all efforts to
+restructure the grammar.  Do not despair: while the parser cannot be
+made more clever, you can make the lexer as smart as you want.  So, the
+solution is then to look at the tokens involved in the conflict and to
+split one of those tokens into 2 (or more) different tokens.  E.g. if
+the grammar needs to distinguish between two incompatible uses of the
+token @code{"begin"}, make the lexer return different tokens (say
+@code{"begin-fun"} and @code{"begin-plain"}) depending on which kind of
+@code{"begin"} it finds.  This pushes the work of distinguishing the
+different cases to the lexer, which will thus have to look at the
+surrounding text to find ad-hoc clues.
+
+@node SMIE Indentation
+@subsubsection Specifying Indentation Rules
+
+Based on the provided grammar, SMIE will be able to provide automatic
+indentation without any extra effort.  But in practice, this default
+indentation style will probably not be good enough.  You will want to
+tweak it in many different cases.
+
+SMIE indentation is based on the idea that indentation rules should be
+as local as possible.  To this end, it relies on the idea of
+@emph{virtual} indentation, which is the indentation that a particular
+program point would have if it were at the beginning of a line.
+Of course, if that program point is indeed at the beginning of a line,
+its virtual indentation is its current indentation.  But if not, then
+SMIE uses the indentation algorithm to compute the virtual indentation
+of that point.  Now in practice, the virtual indentation of a program
+point does not have to be identical to the indentation it would have if
+we inserted a newline before it.  To see how this works, the SMIE rule
+for indentation after a @code{@{} in C does not care whether the
+@code{@{} is standing on a line of its own or is at the end of the
+preceding line.  Instead, these different cases are handled in the
+indentation rule that decides how to indent before a @code{@{}.
+
+Another important concept is the notion of @emph{parent}: The
+@emph{parent} of a token, is the head token of the nearest enclosing
+syntactic construct.  For example, the parent of an @code{else} is the
+@code{if} to which it belongs, and the parent of an @code{if}, in turn,
+is the lead token of the surrounding construct.  The command
+@code{backward-sexp} jumps from a token to its parent, but there are
+some caveats: for @emph{openers} (tokens which start a construct, like
+@code{if}), you need to start with point before the token, while for
+others you need to start with point after the token.
+@code{backward-sexp} stops with point before the parent token if that is
+the @emph{opener} of the token of interest, and otherwise it stops with
+point after the parent token.
+
+SMIE indentation rules are specified using a function that takes two
+arguments @var{method} and @var{arg} where the meaning of @var{arg} and the
+expected return value depend on @var{method}.
+
+@var{method} can be:
+@itemize
+@item
+@code{:after}, in which case @var{arg} is a token and the function
+should return the @var{offset} to use for indentation after @var{arg}.
+@item
+@code{:before}, in which case @var{arg} is a token and the function
+should return the @var{offset} to use to indent @var{arg} itself.
+@item
+@code{:elem}, in which case the function should return either the offset
+to use to indent function arguments (if @var{arg} is the symbol
+@code{arg}) or the basic indentation step (if @var{arg} is the symbol
+@code{basic}).
+@item
+@code{:list-intro}, in which case @var{arg} is a token and the function
+should return non-@code{nil} if the token is followed by a list of
+expressions (not separated by any token) rather than an expression.
+@end itemize
+
+When @var{arg} is a token, the function is called with point just before
+that token.  A return value of nil always means to fallback on the
+default behavior, so the function should return nil for arguments it
+does not expect.
+
+@var{offset} can be:
+@itemize
+@item
+@code{nil}: use the default indentation rule.
+@item
+@code{(column . @var{column})}: indent to column @var{column}.
+@item
+@var{number}: offset by @var{number}, relative to a base token which is
+the current token for @code{:after} and its parent for @code{:before}.
+@end itemize
+
+@node SMIE Indentation Helpers
+@subsubsection Helper Functions for Indentation Rules
+
+SMIE provides various functions designed specifically for use in the
+indentation rules function (several of those functions break if used in
+another context).  These functions all start with the prefix
+@code{smie-rule-}.
+
+@defun smie-rule-bolp
+Return non-@code{nil} if the current token is the first on the line.
+@end defun
+
+@defun smie-rule-hanging-p
+Return non-@code{nil} if the current token is @emph{hanging}.
+A token is @emph{hanging} if it is the last token on the line
+and if it is preceded by other tokens: a lone token on a line is not
+hanging.
+@end defun
+
+@defun smie-rule-next-p &rest tokens
+Return non-@code{nil} if the next token is among @var{tokens}.
+@end defun
+
+@defun smie-rule-prev-p &rest tokens
+Return non-@code{nil} if the previous token is among @var{tokens}.
+@end defun
+
+@defun smie-rule-parent-p &rest parents
+Return non-@code{nil} if the current token's parent is among @var{parents}.
+@end defun
+
+@defun smie-rule-sibling-p
+Return non-nil if the current token's parent is actually a sibling.
+This is the case for example when the parent of a @code{","} is just the
+previous @code{","}.
+@end defun
+
+@defun smie-rule-parent &optional offset
+Return the proper offset to align the current token with the parent.
+If non-@code{nil}, @var{offset} should be an integer giving an
+additional offset to apply.
+@end defun
+
+@defun smie-rule-separator method
+Indent current token as a @emph{separator}.
+
+By @emph{separator}, we mean here a token whose sole purpose is to
+separate various elements within some enclosing syntactic construct, and
+which does not have any semantic significance in itself (i.e. it would
+typically not exist as a node in an abstract syntax tree).
+
+Such a token is expected to have an associative syntax and be closely
+tied to its syntactic parent.  Typical examples are @code{","} in lists
+of arguments (enclosed inside parentheses), or @code{";"} in sequences
+of instructions (enclosed in a @code{@{...@}} or @code{begin...end}
+block).
+
+@var{method} should be the method name that was passed to
+`smie-rules-function'.
+@end defun
+
+@node SMIE Indentation Example
+@subsubsection Sample Indentation Rules
+
+Here is an example of an indentation function:
+
+@example
+(eval-when-compile (require 'cl))       ;For the `case' macro.
+(defun sample-smie-rules (kind token)
+  (case kind
+    (:elem (case token
+             (basic sample-indent-basic)))
+    (:after
+     (cond
+      ((equal token ",") (smie-rule-separator kind))
+      ((equal token ":=") sample-indent-basic)))
+    (:before
+     (cond
+      ((equal token ",") (smie-rule-separator kind))
+      ((member token '("begin" "(" "@{"))
+       (if (smie-rule-hanging-p) (smie-rule-parent)))
+      ((equal token "if")
+       (and (not (smie-rule-bolp)) (smie-rule-prev-p "else")
+            (smie-rule-parent)))))))
+@end example
+
+@noindent
+A few things to note:
+
+@itemize
+@item
+The first case indicates the basic indentation increment to use.
+If @code{sample-indent-basic} is nil, then SMIE uses the global
+setting @code{smie-indent-basic}.  The major mode could have set
+@code{smie-indent-basic} buffer-locally instead, but that
+is discouraged.
+
+@item
+The two (identical) rules for the token @code{","} make SMIE try to be
+more clever when the comma separator is placed at the beginning of
+lines.  It tries to outdent the separator so as to align the code after
+the comma; for example:
+
+@example
+x = longfunctionname (
+        arg1
+      , arg2
+    );
+@end example
+
+@item
+The rule for indentation after @code{":="} exists because otherwise
+SMIE would treat @code{":="} as an infix operator and would align the
+right argument with the left one.
+
+@item
+The rule for indentation before @code{"begin"} is an example of the use
+of virtual indentation:  This rule is used only when @code{"begin"} is
+hanging, which can happen only when @code{"begin"} is not at the
+beginning of a line.  So this is not used when indenting
+@code{"begin"} itself but only when indenting something relative to this
+@code{"begin"}.  Concretely, this rule changes the indentation from:
+
+@example
+    if x > 0 then begin
+            dosomething(x);
+        end
+@end example
+to
+@example
+    if x > 0 then begin
+        dosomething(x);
+    end
+@end example
+
+@item
+The rule for indentation before @code{"if"} is similar to the one for
+@code{"begin"}, but where the purpose is to treat @code{"else if"}
+as a single unit, so as to align a sequence of tests rather than indent
+each test further to the right.  This function does this only in the
+case where the @code{"if"} is not placed on a separate line, hence the
+@code{smie-rule-bolp} test.
+
+If we know that the @code{"else"} is always aligned with its @code{"if"}
+and is always at the beginning of a line, we can use a more efficient
+rule:
+@example
+((equal token "if")
+ (and (not (smie-rule-bolp)) (smie-rule-prev-p "else")
+      (save-excursion
+        (sample-smie-backward-token)  ;Jump before the "else".
+        (cons 'column (current-column)))))
+@end example
+
+The advantage of this formulation is that it reuses the indentation of
+the previous @code{"else"}, rather than going all the way back to the
+first @code{"if"} of the sequence.
+@end itemize
+
 @node Desktop Save Mode
 @section Desktop Save Mode
 @cindex desktop save mode
--- a/doc/lispref/processes.texi	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/lispref/processes.texi	Fri Dec 24 11:30:43 2010 +0900
@@ -195,10 +195,18 @@
 @end example
 @end defun
 
-@cindex quoting and unquoting shell command line
-  The following two functions are useful for creating shell commands
-from individual argument strings, and taking shell command lines apart
-into individual arguments.
+@cindex quoting and unquoting command-line arguments
+@cindex minibuffer input, and command-line arguments
+@cindex @code{call-process}, command-line arguments from minibuffer
+@cindex @code{start-process}, command-line arguments from minibuffer
+  The following two functions are useful for combining a list of
+individual command-line argument strings into a single string, and
+taking a string apart into a list of individual command-line
+arguments.  These functions are mainly intended to be used for
+converting user input in the minibuffer, a Lisp string, into a list of
+string arguments to be passed to @code{call-process} or
+@code{start-process}, or for the converting such lists of arguments in
+a single Lisp string to be presented in the minibuffer or echo area.
 
 @defun split-string-and-unquote string &optional separators
 This function splits @var{string} into substrings at matches for the
@@ -210,7 +218,7 @@
 @code{"\\s-+"}, which is a regular expression that matches one or more
 characters with whitespace syntax (@pxref{Syntax Class Table}).
 
-This function performs two types of quoting: enclosing a whole string
+This function supports two types of quoting: enclosing a whole string
 in double quotes @code{"@dots{}"}, and quoting individual characters
 with a backslash escape @samp{\}.  The latter is also used in Lisp
 strings, so this function can handle those as well.
@@ -226,9 +234,8 @@
 The strings in @var{list-of-strings} that need quoting are those that
 include @var{separator} as their substring.  Quoting a string encloses
 it in double quotes @code{"@dots{}"}.  In the simplest case, if you
-are consing a shell command from the individual command-line
-arguments, every argument that includes embedded blanks will be
-quoted.
+are consing a command from the individual command-line arguments,
+every argument that includes embedded blanks will be quoted.
 @end defun
 
 @node Synchronous Processes
--- a/doc/lispref/strings.texi	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/lispref/strings.texi	Fri Dec 24 11:30:43 2010 +0900
@@ -348,9 +348,9 @@
      @result{} ("o" "o" "o")
 @end example
 
-If you need to split a string that is a shell command, where
-individual arguments could be quoted, see @ref{Shell Arguments,
-split-string-and-unquote}.
+If you need to split a string into a list of individual command-line
+arguments suitable for @code{call-process} or @code{start-process},
+see @ref{Shell Arguments, split-string-and-unquote}.
 @end defun
 
 @defvar split-string-default-separators
--- a/doc/lispref/text.texi	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/lispref/text.texi	Fri Dec 24 11:30:43 2010 +0900
@@ -2209,7 +2209,7 @@
 
 In Lisp mode, the value is the symbol @code{lisp-indent-line}; in C
 mode, @code{c-indent-line}; in Fortran mode, @code{fortran-indent-line}.
-The default value is @code{indent-relative}.
+The default value is @code{indent-relative}.  @xref{Auto-Indentation}.
 @end defvar
 
 @deffn Command indent-according-to-mode
--- a/doc/lispref/vol1.texi	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/lispref/vol1.texi	Fri Dec 24 11:30:43 2010 +0900
@@ -27,7 +27,7 @@
 @c Version of the manual and of Emacs.
 @c Please remember to update the edition number in README as well.
 @set VERSION  3.0
-@set EMACSVER 23.2.90
+@set EMACSVER 23.2.91
 @set DATE July 2009
 
 @dircategory Emacs
--- a/doc/lispref/vol2.texi	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/lispref/vol2.texi	Fri Dec 24 11:30:43 2010 +0900
@@ -27,7 +27,7 @@
 @c Version of the manual and of Emacs.
 @c Please remember to update the edition number in README as well.
 @set VERSION  3.0
-@set EMACSVER 23.2.90
+@set EMACSVER 23.2.91
 @set DATE July 2009
 
 @dircategory Emacs
--- a/doc/man/emacs.1	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/man/emacs.1	Fri Dec 24 11:30:43 2010 +0900
@@ -1,5 +1,5 @@
 .\" See section COPYING for copyright and redistribution information.
-.TH EMACS 1 "2007 April 13" "GNU Emacs 23.2.90"
+.TH EMACS 1 "2007 April 13" "GNU Emacs 23.2.91"
 .
 .
 .SH NAME
--- a/doc/misc/ChangeLog	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/misc/ChangeLog	Fri Dec 24 11:30:43 2010 +0900
@@ -1,3 +1,7 @@
+2010-12-02  Glenn Morris  <rgm@gnu.org>
+
+	* cl.texi (For Clauses): Small fixes for frames and windows.
+
 2010-11-23  Glenn Morris  <rgm@gnu.org>
 	    James Clark  <none@example.com>
 
--- a/doc/misc/cl.texi	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/misc/cl.texi	Fri Dec 24 11:30:43 2010 +0900
@@ -2494,15 +2494,18 @@
 @code{of} term may specify either a buffer or a string.
 
 @item for @var{var} being the frames
-This clause iterates over all frames, i.e., X window system windows
-open on Emacs files.  The
-clause @code{screens} is a synonym for @code{frames}.  The frames
-are visited in @code{next-frame} order starting from
-@code{selected-frame}.
+This clause iterates over all Emacs frames. The clause @code{screens} is
+a synonym for @code{frames}.  The frames are visited in
+@code{next-frame} order starting from @code{selected-frame}.
 
 @item for @var{var} being the windows [of @var{frame}]
 This clause iterates over the windows (in the Emacs sense) of
-the current frame, or of the specified @var{frame}.
+the current frame, or of the specified @var{frame}.  It visits windows
+in @code{next-window} order starting from @code{selected-window}
+(or @code{frame-selected-window} if you specify @var{frame}).
+This clause treats the minibuffer window in the same way as
+@code{next-window} does.  For greater flexibility, consider using
+@code{walk-windows} instead.
 
 @item for @var{var} being the buffers
 This clause iterates over all buffers in Emacs.  It is equivalent
@@ -5322,6 +5325,3 @@
 
 @bye
 
-@ignore
-   arch-tag: b61e7200-3bfa-4a70-a9d3-095e152696f8
-@end ignore
--- a/doc/misc/faq.texi	Thu Dec 02 09:44:25 2010 +0900
+++ b/doc/misc/faq.texi	Fri Dec 24 11:30:43 2010 +0900
@@ -5,7 +5,7 @@
 @c %**end of header
 
 @c This is used in many places
-@set VER 23.2.90
+@set VER 23.2.91
 
 @c This file is maintained by Romain Francoise <rfrancoise@gnu.org>.
 @c Feel free to install changes without prior permission (but I'd
--- a/etc/AUTHORS	Thu Dec 02 09:44:25 2010 +0900
+++ b/etc/AUTHORS	Fri Dec 24 11:30:43 2010 +0900
@@ -334,7 +334,8 @@
 
 Bob Olson: co-wrote cperl-mode.el
 
-Bob Rogers: changed vc-svn.el cperl-mode.el ffap.el thingatpt.el
+Bob Rogers: changed vc-svn.el cperl-mode.el ffap.el maintaining.texi
+  thingatpt.el vc-dir.el vc1-xtra.texi
 
 Bob Weiner: changed info.el quail.el
 
@@ -437,7 +438,7 @@
 and changed xdisp.c simple.el files.el display.texi frames.texi
   files.texi emacs.texi xterm.c keyboard.c cus-edit.el faces.el
   Makefile.in xfaces.c misc.texi xfns.c font.c image.c startup.el
-  compile.el custom.texi text.texi and 650 other files
+  text.texi compile.el custom.texi and 653 other files
 
 Chris Chase: co-wrote idlw-shell.el idlwave.el
 
@@ -838,8 +839,9 @@
 
 Ed Swarthout: changed hexl.el table.el
 
-Eduard Wiebe: changed browse-url.el flymake.texi footnote.el
-  javascript.el korean.el mule-conf.el objects.texi ps-print.el vc-rcs.el
+Eduard Wiebe: changed browse-url.el dired.el flymake.texi footnote.el
+  javascript.el korean.el locate.el mule-conf.el objects.texi ps-print.el
+  vc-rcs.el
 
 Eduardo Muñoz: changed dired.el ls-lisp.el
 
@@ -876,7 +878,7 @@
 Eli Zaretskii: wrote rxvt.el tty-colors.el
 and changed msdos.c makefile.w32-in Makefile.in files.el info.el rmail.el
   fileio.c mainmake.v2 pc-win.el startup.el config.bat simple.el msdos.h
-  dired.c w32.c frame.c internal.el menu-bar.el process.c INSTALL
+  w32.c dired.c frame.c menu-bar.el process.c internal.el INSTALL
   xfaces.c and 604 other files
 
 Elias Oltmanns: changed tls.el gnus-agent.el gnus-int.el gnus-srvr.el
@@ -1145,7 +1147,7 @@
   cal-menu.el cal-hebrew.el fortran.el holidays.el configure.in
   calendar.texi cal-islam.el bytecomp.el cal-bahai.el appt.el emacs.texi
   files.el cal-china.el rmailsum.el cal-tex.el simple.el
-  and 1010 other files
+  and 1011 other files
 
 Glynn Clements: wrote gamegrid.el snake.el tetris.el
 
@@ -1333,7 +1335,7 @@
   rng-match.el rng-nxml.el rng-parse.el rng-pttrn.el rng-uri.el
   rng-util.el rng-valid.el rng-xsd.el sgml-mode.el xmltok.el
   xsd-regexp.el
-and changed fns.c window.c xselect.c
+and changed  fns.c nxml-mode.texi window.c xselect.c
 
 James Cloos: wrote arabic.el
 and changed url-history.el
@@ -1360,10 +1362,10 @@
 and changed gtkutil.c xterm.c xfns.c xterm.h configure.in xmenu.c
   x-win.el Makefile.in gtkutil.h keyboard.c frame.c frames.texi config.in
   emacs.c xselect.c xresources.texi cus-start.el startup.el alloc.c
-  process.c xlwmenu.c and 205 other files
+  process.c xlwmenu.c and 207 other files
 
 Jan Moringen: co-wrote cpp.el
-and changed eieio.el zeroconf.el
+and changed eieio.el log-edit.el zeroconf.el
 
 Jan Nieuwenhuizen: changed info.el TUTORIAL.nl add-log.el emacs.c
   emacsclient.c gnus-start.el gud.el nnmh.el server.el startup.el
@@ -1517,6 +1519,8 @@
 
 Joe Hildebrand: co-wrote nndb.el
 
+Joe Matarazzo: changed ebrowse.c
+
 Joe Ramey: changed filelock.c rmailsum.el
 
 Joe Reiss: changed gnus-art.el
@@ -1796,8 +1800,8 @@
 and co-wrote ps-def.el ps-mule.el ps-print.el ps-samp.el quail.el
 and changed coding.c mule-cmds.el mule.el fontset.c charset.c fontset.el
   xdisp.c xterm.c font.c fileio.c Makefile.in mule-conf.el characters.el
-  fns.c mule-diag.el ftfont.c ccl.c charset.h coding.h xfaces.c
-  japanese.el and 378 other files
+  fns.c mule-diag.el charset.h ftfont.c ccl.c coding.h xfaces.c
+  japanese.el and 379 other files
 
 Kenichi Okada: co-wrote sasl-cram.el sasl-digest.el
 
@@ -1942,8 +1946,8 @@
 and changed erc.el erc-match.el erc-nets.el erc-nickserv.el erc-button.el
   erc-compat.el erc-dcc.el erc-fill.el erc-list.el erc-track.el ielm.el
   erc-autoaway.el erc-autojoin.el erc-bbdb.el erc-ezbounce.el erc-menu.el
-  erc-netsplit.el erc-nicklist.el erc-notify.el erc-sound.el lread.c
-  and 4 other files
+  erc-netsplit.el erc-nicklist.el erc-notify.el erc-sound.el format.el
+  and 5 other files
 
 Lawrence R. Dodd: co-wrote dired-x.el
 and changed fortran.el ispell.el sendmail.el cmuscheme.el comint.el
@@ -2042,9 +2046,9 @@
   and 23 other files
 
 Mark A. Hershberger: changed xml.el nnrss.el mm-url.el cperl-mode.el
-  vc-bzr.el Makefile.in NXML-NEWS cc-mode.texi compilation.txt compile.el
-  ede.texi eieio.texi esh-mode.el flymake.el gnus-group.el isearch.el
-  makefile.w32-in nxml nxml-mode.texi programs.texi python.el
+  vc-bzr.el  Makefile.in NXML-NEWS cc-mode.texi compilation.txt
+  compile.el ede.texi eieio.texi esh-mode.el flymake.el gnus-group.el
+  isearch.el makefile.w32-in nxml-mode.texi programs.texi python.el
   and 5 other files
 
 Mark D. Baushke: changed mh-e.el mh-utils.el mh-mime.el mh-comp.el
@@ -2123,8 +2127,8 @@
 Martin Pohlack: changed pc-select.el
 
 Martin Rudalics: changed window.el window.c windows.texi cus-edit.el
-  frame.c frame.el cus-start.el files.el subr.el add-log.el buffer.c
-  buffers.texi dired.el font-lock.el help-fns.el wid-edit.el xdisp.c
+  frame.c frame.el cus-start.el dired.el files.el subr.el add-log.el
+  buffer.c buffers.texi font-lock.el help-fns.el wid-edit.el xdisp.c
   display.texi find-func.el help.el help.texi and 129 other files
 
 Martin Stjernholm: wrote cc-bytecomp.el
@@ -2982,7 +2986,7 @@
 and changed vc.el subr.el lisp.h keyboard.c simple.el files.el pcvs.el
   keymap.c xdisp.c Makefile.in vc-hooks.el alloc.c newcomment.el
   tex-mode.el bytecomp.el compile.el buffer.c info.el fill.el fileio.c
-  window.c and 908 other files
+  window.c and 909 other files
 
 Stefan Reichör: changed gnus-agent.el
 
@@ -3006,7 +3010,7 @@
 
 Stephen A. Wood: changed fortran.el
 
-Stephen Berman: changed todo-mode.el allout.el diary-lib.el dired.el
+Stephen Berman: changed diary-lib.el todo-mode.el allout.el dired.el
   files.el find-dired.el gtkutil.c info.el newcomment.el recentf.el
   rfc822.el
 
@@ -3205,7 +3209,7 @@
 
 Tokuya Kameshima: wrote org-mew.el org-wl.el
 
-Tom Breton: changed autoinsert.el gnus-agent.el lread.c
+Tom Breton: changed autoinsert.el cus-edit.el gnus-agent.el lread.c
 
 Tom Hageman: changed etags.c
 
@@ -3285,10 +3289,9 @@
 Ulrich Leodolter: changed w32proc.c
 
 Ulrich Mueller: changed configure.in Makefile.in files.el gud.el
-  ChgPane.c ChgSel.c INSTALL XMakeAssoc.c authors.el bytecomp.el
-  calc-units.el case-table.el configure doctor.el emacs.1 emacs.c
-  emacs.desktop emacsclient.c fortran.el gnu-linux.h iso-acc.el
-  and 13 other files
+  server.el ChgPane.c ChgSel.c HELLO INSTALL XMakeAssoc.c authors.el
+  bytecomp.el calc-units.el case-table.el configure doctor.el emacs.1
+  emacs.c emacs.desktop emacsclient.c fortran.el and 14 other files
 
 Ulrich Neumerkel: changed xterm.c
 
@@ -3330,6 +3333,8 @@
 
 Vladimir Volovich: changed smime.el
 
+W. Martin Borgert: changed files.el schemas.xml
+
 Walter C. Pelissero: changed browse-url.el url-methods.el
 
 Werner Benger: changed keyboard.c
@@ -3397,8 +3402,8 @@
 
 Yamamoto Mitsuharu: changed macterm.c macfns.c mac-win.el mac.c macterm.h
   macmenu.c macgui.h image.c xdisp.c macselect.c keyboard.c xterm.c
-  Makefile.in emacs.c darwin.h w32term.c dispextern.h macos.texi
-  process.c unexmacosx.c alloc.c and 83 other files
+  Makefile.in emacs.c darwin.h w32term.c alloc.c dispextern.h macos.texi
+  process.c unexmacosx.c and 84 other files
 
 Yann Dirson: changed imenu.el
 
@@ -3426,6 +3431,8 @@
 
 Yukihiro Matsumoto: co-wrote ruby-mode.el
 
+Yuri Karaban: changed pop3.el
+
 Yuri Shtil: changed etags.c
 
 Yutaka Niibe: changed indent.c xdisp.c configure.in Makefile.in dispnew.c
--- a/etc/ChangeLog	Thu Dec 02 09:44:25 2010 +0900
+++ b/etc/ChangeLog	Fri Dec 24 11:30:43 2010 +0900
@@ -1,3 +1,7 @@
+2010-12-04  W. Martin Borgert <debacle@debian.org>  (tiny change)
+
+	* schema/schemas.xml: Add DocBook (Bug#7491).
+
 2010-11-21  Ulrich Mueller  <ulm@gentoo.org>
 
 	* HELLO: Add ancient Greek (Bug#7418).
--- a/etc/NEWS	Thu Dec 02 09:44:25 2010 +0900
+++ b/etc/NEWS	Fri Dec 24 11:30:43 2010 +0900
@@ -1845,6 +1845,11 @@
 ** `mode-name' is no longer guaranteed to be a string.
 Use `(format-mode-line mode-name)' to ensure a string value.
 
+** `format-mode-line' now supports only a few basic faces as its FACE argument.
+The FACE argument to `format-mode-line' should be one of `default',
+`mode-line', `mode-line-inactive', `header-line', or `tool-bar'.  Any
+other face is treated as `default'.
+
 ** The function x-font-family-list has been removed.
 Use the new function font-family-list (see Lisp Changes, below).
 
--- a/etc/schema/schemas.xml	Thu Dec 02 09:44:25 2010 +0900
+++ b/etc/schema/schemas.xml	Fri Dec 24 11:30:43 2010 +0900
@@ -22,7 +22,8 @@
   <uri pattern="*.html" typeId="XHTML"/>
   <uri pattern="*.rng" typeId="RELAX NG"/>
   <uri pattern="*.rdf" typeId="RDF"/>
-  
+  <uri pattern="*.dbk" typeId="DocBook"/>
+
   <namespace ns="http://www.w3.org/1999/XSL/Transform" typeId="XSLT"/>
   <namespace ns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" typeId="RDF"/>
   <namespace ns="http://www.w3.org/1999/xhtml" typeId="XHTML"/>
--- a/lib-src/makefile.w32-in	Thu Dec 02 09:44:25 2010 +0900
+++ b/lib-src/makefile.w32-in	Fri Dec 24 11:30:43 2010 +0900
@@ -22,7 +22,7 @@
 
 .PHONY: $(ALL)
 
-VERSION		= 23.2.90
+VERSION		= 23.2.91
 
 LOCAL_FLAGS	= -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \
 		  -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../nt/inc \
--- a/lisp/ChangeLog	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/ChangeLog	Fri Dec 24 11:30:43 2010 +0900
@@ -1,3 +1,169 @@
+2010-12-20  Leo  <sdl.web@gmail.com>
+
+	* help-fns.el (describe-variable): Fix 2010-12-17 change.
+
+2010-12-20  Juri Linkov  <juri@jurta.org>
+
+	* isearch.el (isearch-lazy-highlight-error): New variable.
+	(isearch-lazy-highlight-new-loop): Compare `isearch-error' and
+	`isearch-lazy-highlight-error'.  Set `isearch-lazy-highlight-error'
+	to the current value of `isearch-error' (Bug#7468).
+
+2010-12-17  Chong Yidong  <cyd@stupidchicken.com>
+
+	* help-fns.el (describe-variable): Don't emit trailing whitespace
+	(Bug#7511).
+
+2010-12-17  Leo  <sdl.web@gmail.com>
+
+	* eshell/em-hist.el (eshell-previous-matching-input): Signal error
+	if point is not behind eshell-last-output-end (Bug#7585).
+
+2010-12-16  Chong Yidong  <cyd@stupidchicken.com>
+
+	* textmodes/rst.el (rst-compile-pdf-preview)
+	(rst-compile-slides-preview): Use make-temp-file (Bug#7646).
+
+2010-12-15  Kevin Gallagher  <Kevin.Gallagher@boeing.com>
+
+	* emulation/edt-mapper.el: Override mapping of function keys so
+	that the later call to read-key-sequence works.
+
+2010-12-13  Eli Zaretskii  <eliz@gnu.org>
+
+	* mail/smtpmail.el (smtpmail-send-it): Write queued mail body with
+	Unix EOLs.  (Bug#7589)
+
+2010-12-12  Eli Zaretskii  <eliz@gnu.org>
+
+	* subr.el (posn-col-row): Evaluate header-line-format in the
+	context of the POSITION window's buffer.
+
+2010-12-11  Glenn Morris  <rgm@gnu.org>
+
+	* subr.el (member-ignore-case, run-mode-hooks, insert-for-yank-1)
+	(with-silent-modifications): Doc fixes.
+
+2010-12-10  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/tramp.el (tramp-action-password, tramp-process-actions):
+	Revert patch from 2010-12-08.  Use `save-restriction'.
+
+2010-12-09  Eli Zaretskii  <eliz@gnu.org>
+
+	* menu-bar.el (menu-bar-frame-for-menubar, menu-bar-positive-p):
+	New functions.
+	(menu-bar-showhide-menu) <menu-bar-mode, showhide-tool-bar>: Use
+	them instead of `nil' and `>', respectively.  (Bug#1077)
+
+2010-12-09  Stephen Berman  <stephen.berman@gmx.net>
+
+	* calendar/diary-lib.el (diary-list-sexp-entries):
+	Handle case of no newline at end of file.  (Bug#7536)
+
+2010-12-09  Glenn Morris  <rgm@gnu.org>
+
+	* mail/smtpmail.el (smtpmail-send-it): Revert previous change.
+
+2010-12-08  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/tramp.el (tramp-handle-start-file-process): Protect
+	buffer-modified value.  (Bug#7557)
+	(tramp-action-password): Delete region, do not narrow.
+	(tramp-process-actions): Do not widen.
+
+2010-12-08   Jan Moringen  <jmoringe@techfak.uni-bielefeld.de>
+
+	* log-edit.el (log-edit-changelog-entries):
+	Regexp quote filename.  (Bug#7505)
+
+2010-12-08  Tom Breton  <tehom@panix.com>
+
+	* cus-edit.el (custom-save-all):
+	Bind print-length and print-level to nil.  (Bug#7581)
+
+2010-12-08  Glenn Morris  <rgm@gnu.org>
+
+	* mouse.el (mouse-menu-major-mode-map, mouse-menu-bar-map):
+	Run hooks to update menu contents.  (Bug#7586)
+
+	* mail/smtpmail.el (smtpmail-send-it): Avoid colons in the queued
+	file names, for the sake of MS Windows.  (Bug#7588)
+
+2010-12-07  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* diff-mode.el (diff-refine-hunk): Make it work when the hunk contains
+	empty lines without a leading space.
+
+2010-12-06  Leo  <sdl.web@gmail.com>
+
+	* dired-aux.el (dired-do-redisplay): Postpone dired-after-readin-hook
+	while mapping over marks (Bug#6810).
+
+2010-12-06  Chong Yidong  <cyd@stupidchicken.com>
+
+	* image-dired.el (image-dired-db-file)
+	(image-dired-temp-image-file, image-dired-gallery-dir)
+	(image-dired-temp-rotate-image-file): Set default values relative
+	to image-dired-dir (Bug#7518).
+
+2010-12-06  Lawrence Mitchell  <wence@gmx.li>
+
+	* format.el (format-decode-run-method): Pass args FROM and TO, not
+	point-min and point-max, to shell-command-on-region (Bug#7488).
+
+2010-12-06  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* frame.el (blink-cursor-mode): Make default t for ns.
+
+2010-12-05  Bob Rogers  <rogers-emacs@rgrjr.dyndns.org>
+
+	* vc-dir.el (vc-dir-query-replace-regexp): Doc fix (Bug#7501).
+
+2010-12-05  Chong Yidong  <cyd@stupidchicken.com>
+
+	* comint.el (comint-dynamic-list-input-ring)
+	(comint-dynamic-complete-filename)
+	(comint-replace-by-expanded-filename)
+	(comint-dynamic-simple-complete)
+	(comint-dynamic-list-filename-completions)
+	(comint-dynamic-list-completions): Doc fix (Bug#7499).
+
+	* subr.el (posn-x-y, posn-object-x-y, posn-object-width-height):
+	Doc fix (Bug#7471).
+
+2010-12-04  Martin Rudalics  <rudalics@gmx.at>
+
+	* dired.el (dired-pop-to-buffer): Bind pop-up-frames to nil
+	(Bug#7533).
+
+2010-12-04  W. Martin Borgert <debacle@debian.org>  (tiny change)
+
+	* files.el (auto-mode-alist): Handle .dbk (DocBook) with xml-mode.
+	(Bug#7491).
+
+2010-12-04  Chong Yidong  <cyd@stupidchicken.com>
+
+	* simple.el (transient-mark-mode): Doc fix (Bug#7465).
+
+2010-12-04  Eli Zaretskii  <eliz@gnu.org>
+
+	* files.el (file-relative-name): Handle UNC file names on
+	DOS/Windows.  (Bug#4674)
+
+2010-12-03  Daiki Ueno  <ueno@unixuser.org>
+
+	* epg.el (epg-digest-algorithm-alist): Replace "RMD160" with
+	"RIPEMD160" (Bug#7490).  Reported by Daniel Kahn Gillmor.
+	(epg-context-set-passphrase-callback): Mention that the callback
+	is not called when used with GnuPG 2.x.
+
+2010-12-02  Glenn Morris  <rgm@gnu.org>
+
+	* ps-print.el (ps-line-lengths-internal, ps-nb-pages):
+	Ensure ps-footer-font-size-internal is initialized.
+	Call ps-get-page-dimensions before trying to use ps-font-for-text.
+
 2010-12-01  Kenichi Handa  <handa@m17n.org>
 
 	* mail/rmailmm.el (rmail-mime-parse): Call rmail-mime-process
@@ -9,7 +175,7 @@
 
 2010-12-01  Leo  <sdl.web@gmail.com>
 
-	* ido.el (ido-common-initilization): New function.  (bug#3274)
+	* ido.el (ido-common-initialization): New function.  (bug#3274)
 	(ido-mode): Use it.
 	(ido-completing-read): Call it.
 
@@ -35,7 +201,6 @@
 	(smie-next-sexp): Make it accept a "start token" as argument.
 	(smie-indent-keyword): Be careful not to misidentify tokens that span
 	more than one line, as empty lines.  Add argument `token'.
->>>>>>> MERGE-SOURCE
 
 2010-11-26  Kenichi Handa  <handa@m17n.org>
 
@@ -53,17 +218,15 @@
 	(rmail-mime-save): Handle the case that the button's `data' is a
 	MIME entity.
 	(rmail-mime-insert-text): New function.
-	(rmail-mime-insert-image): Handle the case that DATA is a MIME
-	entity.
+	(rmail-mime-insert-image): Handle the case that DATA is a MIME entity.
 	(rmail-mime-bulk-handler): Just call rmail-mime-insert-bulk.
 	(rmail-mime-insert-bulk): New function mostly copied from the old
 	rmail-mime-bulk-handler.
-	(rmail-mime-multipart-handler): Just call
-	rmail-mime-process-multipart.
-	(rmail-mime-process-multipart): New funciton mostly copied from
+	(rmail-mime-multipart-handler): Just call rmail-mime-process-multipart.
+	(rmail-mime-process-multipart): New function mostly copied from
 	the old rmail-mime-multipart-handler.
 	(rmail-mime-show): Just call rmail-mime-process.
-	(rmail-mime-process): New funciton mostly copied from the old
+	(rmail-mime-process): New function mostly copied from the old
 	rmail-mime-show.
 	(rmail-mime-insert-multipart, rmail-mime-parse)
 	(rmail-mime-insert, rmail-show-mime)
@@ -12110,4 +12273,3 @@
   You should have received a copy of the GNU General Public License
   along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
-;; arch-tag: d3e45e38-19e2-49b6-8dc2-7cb26adcc5a1
--- a/lisp/calendar/diary-lib.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/calendar/diary-lib.el	Fri Dec 24 11:30:43 2010 +0900
@@ -1744,7 +1744,7 @@
         (forward-line 1)
         (while (looking-at "[ \t]")
           (forward-line 1))
-        (backward-char 1)
+        (if (bolp) (backward-char 1))
         (setq entry (buffer-substring-no-properties entry-start (point))))
       (setq diary-entry (diary-sexp-entry sexp entry date)
             literal entry               ; before evaluation
--- a/lisp/comint.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/comint.el	Fri Dec 24 11:30:43 2010 +0900
@@ -1000,7 +1000,7 @@
     (choose-completion-string completion buffer)))
 
 (defun comint-dynamic-list-input-ring ()
-  "List in help buffer the buffer's input history."
+  "Display a list of recent inputs entered into the current buffer."
   (interactive)
   (if (or (not (ring-p comint-input-ring))
 	  (ring-empty-p comint-input-ring))
@@ -2996,7 +2996,7 @@
 This function is similar to `comint-replace-by-expanded-filename', except that
 it won't change parts of the filename already entered in the buffer; it just
 adds completion characters to the end of the filename.  A completions listing
-may be shown in a help buffer if completion is ambiguous.
+may be shown in a separate buffer if completion is ambiguous.
 
 Completion is dependent on the value of `comint-completion-addsuffix',
 `comint-completion-recexact' and `comint-completion-fignore', and the timing of
@@ -3083,11 +3083,11 @@
 
 (defun comint-replace-by-expanded-filename ()
   "Dynamically expand and complete the filename at point.
-Replace the filename with an expanded, canonicalized and completed replacement.
-\"Expanded\" means environment variables (e.g., $HOME) and `~'s are replaced
-with the corresponding directories.  \"Canonicalized\" means `..'  and `.' are
-removed, and the filename is made absolute instead of relative.  For expansion
-see `expand-file-name' and `substitute-in-file-name'.  For completion see
+Replace the filename with an expanded, canonicalized and
+completed replacement, i.e. substituting environment
+variables (e.g. $HOME), `~'s, `..', and `.', and making the
+filename absolute.  For expansion see `expand-file-name' and
+`substitute-in-file-name'.  For completion see
 `comint-dynamic-complete-filename'."
   (interactive)
   (let ((filename (comint-match-partial-filename)))
@@ -3098,15 +3098,16 @@
 
 (defun comint-dynamic-simple-complete (stub candidates)
   "Dynamically complete STUB from CANDIDATES list.
-This function inserts completion characters at point by completing STUB from
-the strings in CANDIDATES.  A completions listing may be shown in a help buffer
-if completion is ambiguous.
-
-Returns nil if no completion was inserted.
-Returns `sole' if completed with the only completion match.
-Returns `shortest' if completed with the shortest of the completion matches.
-Returns `partial' if completed as far as possible with the completion matches.
-Returns `listed' if a completion listing was shown.
+This function inserts completion characters at point by
+completing STUB from the strings in CANDIDATES.  If completion is
+ambiguous, possibly show a completions listing in a separate
+buffer.
+
+Return nil if no completion was inserted.
+Return `sole' if completed with the only completion match.
+Return `shortest' if completed with the shortest match.
+Return `partial' if completed as far as possible.
+Return `listed' if a completion listing was shown.
 
 See also `comint-dynamic-complete-filename'."
   (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin)))
@@ -3154,7 +3155,7 @@
 
 
 (defun comint-dynamic-list-filename-completions ()
-  "List in help buffer possible completions of the filename at point."
+  "Display a list of possible completions for the filename at point."
   (interactive)
   (let* ((completion-ignore-case read-file-name-completion-ignore-case)
 	 ;; If we bind this, it breaks remote directory tracking in rlogin.el.
@@ -3183,9 +3184,9 @@
 (defvar comint-dynamic-list-completions-config nil)
 
 (defun comint-dynamic-list-completions (completions &optional common-substring)
-  "List in help buffer sorted COMPLETIONS.
+  "Display a list of sorted COMPLETIONS.
 The meaning of COMMON-SUBSTRING is the same as in `display-completion-list'.
-Typing SPC flushes the help buffer."
+Typing SPC flushes the completions buffer."
   (let ((window (get-buffer-window "*Completions*" 0)))
     (setq completions (sort completions 'string-lessp))
     (if (and (eq last-command this-command)
--- a/lisp/cus-edit.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/cus-edit.el	Fri Dec 24 11:30:43 2010 +0900
@@ -4279,7 +4279,9 @@
 
       (unless (eq major-mode 'emacs-lisp-mode)
 	(emacs-lisp-mode))
-      (let ((inhibit-read-only t))
+      (let ((inhibit-read-only t)
+	    (print-length nil)
+	    (print-level nil))
 	(custom-save-variables)
 	(custom-save-faces))
       (let ((file-precious-flag t))
--- a/lisp/diff-mode.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/diff-mode.el	Fri Dec 24 11:30:43 2010 +0900
@@ -1827,10 +1827,13 @@
   (eval-and-compile (require 'smerge-mode))
   (save-excursion
     (diff-beginning-of-hunk 'try-harder)
-    (let* ((style (diff-hunk-style))    ;Skips the hunk header as well.
+    (let* ((start (point))
+           (style (diff-hunk-style))    ;Skips the hunk header as well.
            (beg (point))
            (props '((diff-mode . fine) (face diff-refine-change)))
-           (end (progn (diff-end-of-hunk) (point))))
+           ;; Be careful to go back to `start' so diff-end-of-hunk gets
+           ;; to read the hunk header's line info.
+           (end (progn (goto-char start) (diff-end-of-hunk) (point))))
 
       (remove-overlays beg end 'diff-mode 'fine)
 
--- a/lisp/dired-aux.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/dired-aux.el	Fri Dec 24 11:30:43 2010 +0900
@@ -1017,10 +1017,14 @@
     ;; message much faster than making dired-map-over-marks show progress
     (dired-uncache
      (if (consp dired-directory) (car dired-directory) dired-directory))
-    (dired-map-over-marks (let ((fname (dired-get-filename)))
+    (dired-map-over-marks (let ((fname (dired-get-filename))
+				;; Postphone readin hook till we map
+				;; over all marked files (Bug#6810).
+				(dired-after-readin-hook nil))
 			    (message "Redisplaying... %s" fname)
 			    (dired-update-file-line fname))
 			  arg)
+    (run-hooks 'dired-after-readin-hook)
     (dired-move-to-filename)
     (message "Redisplaying...done")))
 
--- a/lisp/dired.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/dired.el	Fri Dec 24 11:30:43 2010 +0900
@@ -2755,7 +2755,8 @@
 		    ;; that's possible.  (Bug#1806)
 		    (split-window-vertically))
 	       ;; Otherwise, try to split WINDOW sensibly.
-	       (split-window-sensibly window)))))
+	       (split-window-sensibly window))))
+	pop-up-frames)
     (pop-to-buffer (get-buffer-create buf)))
   ;; If dired-shrink-to-fit is t, make its window fit its contents.
   (when dired-shrink-to-fit
@@ -3531,7 +3532,7 @@
 ;;;;;;  dired-run-shell-command dired-do-shell-command dired-do-async-shell-command
 ;;;;;;  dired-clean-directory dired-do-print dired-do-touch dired-do-chown
 ;;;;;;  dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff
-;;;;;;  dired-diff) "dired-aux" "dired-aux.el" "07676ea25af17f5d50cc5db4f53bddc0")
+;;;;;;  dired-diff) "dired-aux" "dired-aux.el" "03cf081d2aac54764123d2407c3196a2")
 ;;; Generated autoloads from dired-aux.el
 
 (autoload 'dired-diff "dired-aux" "\
--- a/lisp/emulation/edt-mapper.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/emulation/edt-mapper.el	Fri Dec 24 11:30:43 2010 +0900
@@ -141,6 +141,48 @@
   (setq edt-term (getenv "TERM")))
 
 ;;;
+;;; Implements a workaround for a feature that was added to simple.el.
+;;;
+;;; Many function keys have no Emacs functions assigned to them by
+;;; default. A subset of these are typically assigned functions in the
+;;; EDT emulation. This includes all the keypad keys and a some others
+;;; like Delete.
+;;;
+;;; Logic in simple.el maps some of these unassigned function keys to
+;;; ordinary typing keys.  Where this is the case, a call to
+;;; read-key-sequence, below, does not return the name of the function
+;;; key pressd by the user but, instead, it returns the name of the
+;;; key to which it has been mapped.  It needs to know the name of the
+;;; key pressed by the user. As a workaround, we assign a function to
+;;; each of the unassigned function keys of interest, here.  These
+;;; assignments override the mapping to other keys and are only
+;;; temporary since, when edt-mapper is finished executing, it causes
+;;; Emacs to exit.
+;;;
+
+(mapc
+ (lambda (function-key)
+   (if (not (lookup-key (current-global-map) function-key))
+       (define-key (current-global-map) function-key 'forward-char)))
+ '([kp-0] [kp-1] [kp-2] [kp-3] [kp-4]
+   [kp-5] [kp-6] [kp-7] [kp-8] [kp-9]
+   [kp-space]
+   [kp-tab]
+   [kp-enter]
+   [kp-multiply]
+   [kp-add]
+   [kp-separator]
+   [kp-subtract]
+   [kp-decimal]
+   [kp-divide]
+   [kp-equal]
+   [backspace]
+   [delete]
+   [tab]
+   [linefeed]
+   [clear]))
+
+;;;
 ;;;  Make sure the window is big enough to display the instructions,
 ;;;  except where window cannot be re-sized.
 ;;;
--- a/lisp/epg.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/epg.el	Fri Dec 24 11:30:43 2010 +0900
@@ -66,7 +66,7 @@
 (defconst epg-digest-algorithm-alist
   '((1 . "MD5")
     (2 . "SHA1")
-    (3 . "RMD160")
+    (3 . "RIPEMD160")
     (8 . "SHA256")
     (9 . "SHA384")
     (10 . "SHA512")
@@ -335,7 +335,13 @@
 car is a function and cdr is a callback data.
 
 The function gets three arguments: the context, the key-id in
-question, and the callback data (if any)."
+question, and the callback data (if any).
+
+The callback may not be called if you use GnuPG 2.x, which relies
+on the external program called `gpg-agent' for passphrase query.
+If you really want to intercept passphrase query, consider
+installing GnuPG 1.x _along with_ GnuPG 2.x, which does passphrase
+query by itself and Emacs can intercept them."
   (unless (eq (car-safe context) 'epg-context)
     (signal 'wrong-type-argument (list 'epg-context-p context)))
   (aset (cdr context) 7 (if (consp passphrase-callback)
--- a/lisp/eshell/em-hist.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/eshell/em-hist.el	Fri Dec 24 11:30:43 2010 +0900
@@ -837,6 +837,8 @@
 If N is negative, find the next or Nth next match."
   (interactive (eshell-regexp-arg "Previous input matching (regexp): "))
   (setq arg (eshell-search-arg arg))
+  (if (> eshell-last-output-end (point))
+      (error "Point not located after prompt"))
   (let ((pos (eshell-previous-matching-input-string-position regexp arg)))
     ;; Has a match been found?
     (if (null pos)
@@ -844,7 +846,7 @@
       (setq eshell-history-index pos)
       (unless (minibuffer-window-active-p (selected-window))
 	(message "History item: %d" (- (ring-length eshell-history-ring) pos)))
-       ;; Can't use kill-region as it sets this-command
+      ;; Can't use kill-region as it sets this-command
       (delete-region eshell-last-output-end (point))
       (insert-and-inherit (eshell-get-history pos)))))
 
--- a/lisp/files.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/files.el	Fri Dec 24 11:30:43 2010 +0900
@@ -2267,6 +2267,7 @@
      ("\\.oak\\'" . scheme-mode)
      ("\\.sgml?\\'" . sgml-mode)
      ("\\.x[ms]l\\'" . xml-mode)
+     ("\\.dbk\\'" . xml-mode)
      ("\\.dtd\\'" . sgml-mode)
      ("\\.ds\\(ss\\)?l\\'" . dsssl-mode)
      ("\\.js\\'" . js-mode)		; javascript-mode would be better
@@ -4054,11 +4055,29 @@
           (dremote (file-remote-p directory)))
       (if ;; Conditions for separate trees
 	  (or
-	   ;; Test for different drives on DOS/Windows
+	   ;; Test for different filesystems on DOS/Windows
 	   (and
 	    ;; Should `cygwin' really be included here?  --stef
 	    (memq system-type '(ms-dos cygwin windows-nt))
-	    (not (eq t (compare-strings filename 0 2 directory 0 2))))
+	    (or
+	     ;; Test for different drive letters
+	     (not (eq t (compare-strings filename 0 2 directory 0 2)))
+	     ;; Test for UNCs on different servers
+	     (not (eq t (compare-strings
+			 (progn
+			   (if (string-match "\\`//\\([^:/]+\\)/" filename)
+			       (match-string 1 filename)
+			     ;; Windows file names cannot have ? in
+			     ;; them, so use that to detect when
+			     ;; neither FILENAME nor DIRECTORY is a
+			     ;; UNC.
+			     "?"))
+			 0 nil
+			 (progn
+			   (if (string-match "\\`//\\([^:/]+\\)/" directory)
+			       (match-string 1 directory)
+			     "?"))
+			 0 nil t)))))
 	   ;; Test for different remote file system identification
 	   (not (equal fremote dremote)))
 	  filename
--- a/lisp/format.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/format.el	Fri Dec 24 11:30:43 2010 +0900
@@ -180,8 +180,7 @@
 	;; We should perhaps go via a temporary buffer and copy it
 	;; back, in case of errors.
 	(if (and (zerop (save-window-excursion
-			  (shell-command-on-region (point-min) (point-max)
-						   method t t
+			  (shell-command-on-region from to method t t
 						   error-buff)))
 		 ;; gzip gives zero exit status with bad args, for instance.
 		 (zerop (with-current-buffer error-buff
--- a/lisp/frame.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/frame.el	Fri Dec 24 11:30:43 2010 +0900
@@ -1614,7 +1614,7 @@
   :init-value (not (or noninteractive
 		       no-blinking-cursor
 		       (eq system-type 'ms-dos)
-		       (not (memq window-system '(x w32)))))
+		       (not (memq window-system '(x w32 ns)))))
   :initialize 'custom-initialize-delay
   :group 'cursor
   :global t
--- a/lisp/help-fns.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/help-fns.el	Fri Dec 24 11:30:43 2010 +0900
@@ -632,21 +632,17 @@
 		(if valvoid
 		    (princ " is void as a variable.")
 		  (princ "'s "))))
-	    (if valvoid
-		nil
+	    (unless valvoid
 	      (with-current-buffer standard-output
 		(setq val-start-pos (point))
 		(princ "value is ")
-		(terpri)
 		(let ((from (point)))
+		  (terpri)
 		  (pp val)
-		  ;; Hyperlinks in variable's value are quite frequently
-		  ;; inappropriate e.g C-h v <RET> features <RET>
-		  ;; (help-xref-on-pp from (point))
-		  (if (< (point) (+ from 20))
-		      (delete-region (1- from) from)))))
+		  (if (< (point) (+ 68 (line-beginning-position 0)))
+		      (delete-region from (1+ from))
+		    (delete-region (1- from) from)))))
 	    (terpri)
-
 	    (when locus
 	      (if (bufferp locus)
 		  (princ (format "%socal in buffer %s; "
--- a/lisp/ido.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/ido.el	Fri Dec 24 11:30:43 2010 +0900
@@ -1439,7 +1439,7 @@
   ;; ido kill emacs hook
   (ido-save-history))
 
-(defun ido-common-initilization ()
+(defun ido-common-initialization ()
   (ido-init-completion-maps)
   (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup)
   (add-hook 'choose-completion-string-functions 'ido-choose-completion-string))
@@ -1489,7 +1489,7 @@
   (ido-everywhere (if ido-everywhere 1 -1))
 
   (when ido-mode
-    (ido-common-initilization)
+    (ido-common-initialization)
     (ido-load-history)
 
     (add-hook 'kill-emacs-hook 'ido-kill-emacs-hook)
@@ -4682,7 +4682,7 @@
 	(ido-context-switch-command 'ignore)
 	(ido-choice-list choices))
     ;; Initialize ido before invoking ido-read-internal
-    (ido-common-initilization)
+    (ido-common-initialization)
     (ido-read-internal 'list prompt hist def require-match initial-input)))
 
 (defun ido-unload-function ()
--- a/lisp/image-dired.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/image-dired.el	Fri Dec 24 11:30:43 2010 +0900
@@ -186,19 +186,19 @@
   :group 'image-dired)
 
 (defcustom image-dired-db-file
-  (locate-user-emacs-file "image-dired/.image-dired_db")
+  (expand-file-name ".image-dired_db" image-dired-dir)
   "Database file where file names and their associated tags are stored."
   :type 'string
   :group 'image-dired)
 
 (defcustom image-dired-temp-image-file
-  (locate-user-emacs-file "image-dired/.image-dired_temp")
+  (expand-file-name ".image-dired_temp" image-dired-dir)
   "Name of temporary image file used by various commands."
   :type 'string
   :group 'image-dired)
 
 (defcustom image-dired-gallery-dir
-  (locate-user-emacs-file "image-dired/.image-dired_gallery")
+  (expand-file-name ".image-dired_gallery" image-dired-dir)
   "Directory to store generated gallery html pages.
 This path needs to be \"shared\" to the public so that it can access
 the index.html page that image-dired creates."
@@ -343,7 +343,7 @@
   :group 'image-dired)
 
 (defcustom image-dired-temp-rotate-image-file
-  (locate-user-emacs-file "image-dired/.image-dired_rotate_temp")
+  (expand-file-name ".image-dired_rotate_temp" image-dired-dir)
   "Temporary file for rotate operations."
   :type 'string
   :group 'image-dired)
--- a/lisp/isearch.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/isearch.el	Fri Dec 24 11:30:43 2010 +0900
@@ -2579,6 +2579,7 @@
 (defvar isearch-lazy-highlight-regexp nil)
 (defvar isearch-lazy-highlight-space-regexp nil)
 (defvar isearch-lazy-highlight-forward nil)
+(defvar isearch-lazy-highlight-error nil)
 
 (defun lazy-highlight-cleanup (&optional force)
   "Stop lazy highlighting and remove extra highlighting from current buffer.
@@ -2620,9 +2621,13 @@
                  (not (= (window-end)   ; Window may have been split/joined.
 			 isearch-lazy-highlight-window-end))
 		 (not (eq isearch-forward
-			  isearch-lazy-highlight-forward))))
+			  isearch-lazy-highlight-forward))
+		 ;; In case we are recovering from an error.
+		 (not (equal isearch-error
+			     isearch-lazy-highlight-error))))
     ;; something important did indeed change
     (lazy-highlight-cleanup t) ;kill old loop & remove overlays
+    (setq isearch-lazy-highlight-error isearch-error)
     (when (not isearch-error)
       (setq isearch-lazy-highlight-start-limit beg
 	    isearch-lazy-highlight-end-limit end)
--- a/lisp/ldefs-boot.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/ldefs-boot.el	Fri Dec 24 11:30:43 2010 +0900
@@ -1492,7 +1492,7 @@
 
 ;;;### (autoloads (batch-update-autoloads update-directory-autoloads
 ;;;;;;  update-file-autoloads) "autoload" "emacs-lisp/autoload.el"
-;;;;;;  (19636 58496))
+;;;;;;  (19683 64086))
 ;;; Generated autoloads from emacs-lisp/autoload.el
 
 (put 'generated-autoload-file 'safe-local-variable 'stringp)
@@ -2601,19 +2601,14 @@
 ;;;### (autoloads (batch-byte-recompile-directory batch-byte-compile
 ;;;;;;  batch-byte-compile-if-not-done display-call-tree byte-compile
 ;;;;;;  compile-defun byte-compile-file byte-recompile-directory
-;;;;;;  byte-force-recompile byte-compile-enable-warning byte-compile-disable-warning
-;;;;;;  byte-compile-warnings-safe-p) "bytecomp" "emacs-lisp/bytecomp.el"
-;;;;;;  (19636 58496))
+;;;;;;  byte-force-recompile byte-compile-enable-warning byte-compile-disable-warning)
+;;;;;;  "bytecomp" "emacs-lisp/bytecomp.el" (19678 47007))
 ;;; Generated autoloads from emacs-lisp/bytecomp.el
 (put 'byte-compile-dynamic 'safe-local-variable 'booleanp)
 (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp)
 (put 'byte-compile-dynamic-docstrings 'safe-local-variable 'booleanp)
-(put 'byte-compile-warnings 'safe-local-variable 'byte-compile-warnings-safe-p)
-
-(autoload 'byte-compile-warnings-safe-p "bytecomp" "\
-Return non-nil if X is valid as a value of `byte-compile-warnings'.
-
-\(fn X)" nil nil)
+
+(put 'byte-compile-warnings 'safe-local-variable (lambda (v) (or (symbolp v) (null (delq nil (mapcar (lambda (x) (not (symbolp x))) v))))))
 
 (autoload 'byte-compile-disable-warning "bytecomp" "\
 Change `byte-compile-warnings' to disable WARNING.
@@ -2860,8 +2855,8 @@
 
 ;;;***
 
-;;;### (autoloads (calendar) "calendar" "calendar/calendar.el" (19636
-;;;;;;  58496))
+;;;### (autoloads (calendar) "calendar" "calendar/calendar.el" (19678
+;;;;;;  47007))
 ;;; Generated autoloads from calendar/calendar.el
 
 (autoload 'calendar "calendar" "\
@@ -3910,7 +3905,7 @@
 ;;;### (autoloads (comint-redirect-results-list-from-process comint-redirect-results-list
 ;;;;;;  comint-redirect-send-command-to-process comint-redirect-send-command
 ;;;;;;  comint-run make-comint make-comint-in-buffer) "comint" "comint.el"
-;;;;;;  (19652 24589))
+;;;;;;  (19706 58029))
 ;;; Generated autoloads from comint.el
 
 (defvar comint-output-filter-functions '(comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) "\
@@ -4858,7 +4853,7 @@
 ;;;;;;  customize-mode customize customize-save-variable customize-set-variable
 ;;;;;;  customize-set-value custom-menu-sort-alphabetically custom-buffer-sort-alphabetically
 ;;;;;;  custom-browse-sort-alphabetically) "cus-edit" "cus-edit.el"
-;;;;;;  (19636 58496))
+;;;;;;  (19711 45554))
 ;;; Generated autoloads from cus-edit.el
 
 (defvar custom-browse-sort-alphabetically nil "\
@@ -5943,7 +5938,7 @@
 ;;;***
 
 ;;;### (autoloads (diary-mode diary-mail-entries diary) "diary-lib"
-;;;;;;  "calendar/diary-lib.el" (19636 58496))
+;;;;;;  "calendar/diary-lib.el" (19714 24709))
 ;;; Generated autoloads from calendar/diary-lib.el
 
 (autoload 'diary "diary-lib" "\
@@ -6024,7 +6019,7 @@
 ;;;***
 
 ;;;### (autoloads (diff-minor-mode diff-mode) "diff-mode" "diff-mode.el"
-;;;;;;  (19661 51722))
+;;;;;;  (19711 45554))
 ;;; Generated autoloads from diff-mode.el
 
 (autoload 'diff-mode "diff-mode" "\
@@ -6065,7 +6060,7 @@
 
 ;;;### (autoloads (dired-mode dired-auto-revert-buffer dired-noselect
 ;;;;;;  dired-other-frame dired-other-window dired dired-trivial-filenames
-;;;;;;  dired-listing-switches) "dired" "dired.el" (19636 58496))
+;;;;;;  dired-listing-switches) "dired" "dired.el" (19714 24826))
 ;;; Generated autoloads from dired.el
 
 (defvar dired-listing-switches (purecopy "-al") "\
@@ -8268,7 +8263,7 @@
 
 ;;;***
 
-;;;### (autoloads (epg-make-context) "epg" "epg.el" (19636 58496))
+;;;### (autoloads (epg-make-context) "epg" "epg.el" (19708 34240))
 ;;; Generated autoloads from epg.el
 
 (autoload 'epg-make-context "epg" "\
@@ -13688,8 +13683,8 @@
 ;;;;;;  ido-find-alternate-file ido-find-file-other-window ido-find-file
 ;;;;;;  ido-find-file-in-dir ido-switch-buffer-other-frame ido-insert-buffer
 ;;;;;;  ido-kill-buffer ido-display-buffer ido-switch-buffer-other-window
-;;;;;;  ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (19636
-;;;;;;  58496))
+;;;;;;  ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (19705
+;;;;;;  10058))
 ;;; Generated autoloads from ido.el
 
 (defvar ido-mode nil "\
@@ -14165,7 +14160,7 @@
 ;;;;;;  image-dired-jump-thumbnail-buffer image-dired-delete-tag
 ;;;;;;  image-dired-tag-files image-dired-show-all-from-dir image-dired-display-thumbs
 ;;;;;;  image-dired-dired-with-window-configuration image-dired-dired-insert-marked-thumbs)
-;;;;;;  "image-dired" "image-dired.el" (19636 58496))
+;;;;;;  "image-dired" "image-dired.el" (19709 15556))
 ;;; Generated autoloads from image-dired.el
 
 (autoload 'image-dired-dired-insert-marked-thumbs "image-dired" "\
@@ -15945,7 +15940,7 @@
 ;;;***
 
 ;;;### (autoloads (locate-with-filter locate locate-ls-subdir-switches)
-;;;;;;  "locate" "locate.el" (19662 53673))
+;;;;;;  "locate" "locate.el" (19697 24269))
 ;;; Generated autoloads from locate.el
 
 (defvar locate-ls-subdir-switches (purecopy "-al") "\
@@ -15997,7 +15992,7 @@
 
 ;;;***
 
-;;;### (autoloads (log-edit) "log-edit" "log-edit.el" (19661 52402))
+;;;### (autoloads (log-edit) "log-edit" "log-edit.el" (19714 24709))
 ;;; Generated autoloads from log-edit.el
 
 (autoload 'log-edit "log-edit" "\
@@ -16057,8 +16052,8 @@
 ;;;***
 
 ;;;### (autoloads (print-region lpr-region print-buffer lpr-buffer
-;;;;;;  lpr-command lpr-switches printer-name) "lpr" "lpr.el" (19636
-;;;;;;  58496))
+;;;;;;  lpr-command lpr-switches printer-name) "lpr" "lpr.el" (19688
+;;;;;;  11756))
 ;;; Generated autoloads from lpr.el
 
 (defvar lpr-windows-system (memq system-type '(ms-dos windows-nt)))
@@ -16152,7 +16147,7 @@
 ;;;***
 
 ;;;### (autoloads (ls-lisp-support-shell-wildcards) "ls-lisp" "ls-lisp.el"
-;;;;;;  (19672 43471))
+;;;;;;  (19678 47007))
 ;;; Generated autoloads from ls-lisp.el
 
 (defvar ls-lisp-support-shell-wildcards t "\
@@ -17575,8 +17570,8 @@
 
 ;;;***
 
-;;;### (autoloads (mouse-sel-mode) "mouse-sel" "mouse-sel.el" (19636
-;;;;;;  58496))
+;;;### (autoloads (mouse-sel-mode) "mouse-sel" "mouse-sel.el" (19678
+;;;;;;  47007))
 ;;; Generated autoloads from mouse-sel.el
 
 (defvar mouse-sel-mode nil "\
@@ -18410,7 +18405,7 @@
 ;;;***
 
 ;;;### (autoloads (disable-command enable-command disabled-command-function)
-;;;;;;  "novice" "novice.el" (19636 58496))
+;;;;;;  "novice" "novice.el" (19678 47007))
 ;;; Generated autoloads from novice.el
 
 (defvar disabled-command-function 'disabled-command-function "\
@@ -20721,7 +20716,7 @@
 ;;;***
 
 ;;;### (autoloads (picture-mode) "picture" "textmodes/picture.el"
-;;;;;;  (19636 58496))
+;;;;;;  (19678 64521))
 ;;; Generated autoloads from textmodes/picture.el
 
 (autoload 'picture-mode "picture" "\
@@ -20899,7 +20894,7 @@
 ;;;;;;  pr-ps-buffer-print pr-ps-buffer-using-ghostscript pr-ps-buffer-preview
 ;;;;;;  pr-ps-directory-ps-print pr-ps-directory-print pr-ps-directory-using-ghostscript
 ;;;;;;  pr-ps-directory-preview pr-interface) "printing" "printing.el"
-;;;;;;  (19636 58496))
+;;;;;;  (19678 47007))
 ;;; Generated autoloads from printing.el
 
 (autoload 'pr-interface "printing" "\
@@ -21589,8 +21584,8 @@
 ;;;;;;  ps-spool-region ps-spool-buffer-with-faces ps-spool-buffer
 ;;;;;;  ps-print-region-with-faces ps-print-region ps-print-buffer-with-faces
 ;;;;;;  ps-print-buffer ps-print-customize ps-print-color-p ps-paper-type
-;;;;;;  ps-page-dimensions-database) "ps-print" "ps-print.el" (19641
-;;;;;;  1314))
+;;;;;;  ps-page-dimensions-database) "ps-print" "ps-print.el" (19705
+;;;;;;  10058))
 ;;; Generated autoloads from ps-print.el
 
 (defvar ps-page-dimensions-database (purecopy (list (list 'a4 (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54) "A4") (list 'a3 (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54) "A3") (list 'letter (* 72 8.5) (* 72 11.0) "Letter") (list 'legal (* 72 8.5) (* 72 14.0) "Legal") (list 'letter-small (* 72 7.68) (* 72 10.16) "LetterSmall") (list 'tabloid (* 72 11.0) (* 72 17.0) "Tabloid") (list 'ledger (* 72 17.0) (* 72 11.0) "Ledger") (list 'statement (* 72 5.5) (* 72 8.5) "Statement") (list 'executive (* 72 7.5) (* 72 10.0) "Executive") (list 'a4small (* 72 7.47) (* 72 10.85) "A4Small") (list 'b4 (* 72 10.125) (* 72 14.33) "B4") (list 'b5 (* 72 7.16) (* 72 10.125) "B5") '(addresslarge 236.0 99.0 "AddressLarge") '(addresssmall 236.0 68.0 "AddressSmall") '(cuthanging13 90.0 222.0 "CutHanging13") '(cuthanging15 90.0 114.0 "CutHanging15") '(diskette 181.0 136.0 "Diskette") '(eurofilefolder 139.0 112.0 "EuropeanFilefolder") '(eurofoldernarrow 526.0 107.0 "EuroFolderNarrow") '(eurofolderwide 526.0 136.0 "EuroFolderWide") '(euronamebadge 189.0 108.0 "EuroNameBadge") '(euronamebadgelarge 223.0 136.0 "EuroNameBadgeLarge") '(filefolder 230.0 37.0 "FileFolder") '(jewelry 76.0 136.0 "Jewelry") '(mediabadge 180.0 136.0 "MediaBadge") '(multipurpose 126.0 68.0 "MultiPurpose") '(retaillabel 90.0 104.0 "RetailLabel") '(shipping 271.0 136.0 "Shipping") '(slide35mm 26.0 104.0 "Slide35mm") '(spine8mm 187.0 26.0 "Spine8mm") '(topcoated 425.19685 136.0 "TopCoatedPaper") '(topcoatedpaper 396.0 136.0 "TopcoatedPaper150") '(vhsface 205.0 127.0 "VHSFace") '(vhsspine 400.0 50.0 "VHSSpine") '(zipdisk 156.0 136.0 "ZipDisk"))) "\
@@ -21787,7 +21782,7 @@
 ;;;***
 
 ;;;### (autoloads (python-shell jython-mode python-mode run-python)
-;;;;;;  "python" "progmodes/python.el" (19672 43471))
+;;;;;;  "python" "progmodes/python.el" (19689 20360))
 ;;; Generated autoloads from progmodes/python.el
 
 (add-to-list 'interpreter-mode-alist (cons (purecopy "jython") 'jython-mode))
@@ -21798,20 +21793,24 @@
 
 (autoload 'run-python "python" "\
 Run an inferior Python process, input and output via buffer *Python*.
-CMD is the Python command to run.  NOSHOW non-nil means don't show the
-buffer automatically.
-
-Normally, if there is a process already running in `python-buffer',
-switch to that buffer.  Interactively, a prefix arg allows you to edit
-the initial command line (default is `python-command'); `-i' etc. args
-will be added to this as appropriate.  A new process is started if:
-one isn't running attached to `python-buffer', or interactively the
-default `python-command', or argument NEW is non-nil.  See also the
-documentation for `python-buffer'.
-
-Runs the hook `inferior-python-mode-hook' (after the
-`comint-mode-hook' is run).  (Type \\[describe-mode] in the process
-buffer for a list of commands.)
+CMD is the Python command to run.  NOSHOW non-nil means don't
+show the buffer automatically.
+
+Interactively, a prefix arg means to prompt for the initial
+Python command line (default is `python-command').
+
+A new process is started if one isn't running attached to
+`python-buffer', or if called from Lisp with non-nil arg NEW.
+Otherwise, if a process is already running in `python-buffer',
+switch to that buffer.
+
+This command runs the hook `inferior-python-mode-hook' after
+running `comint-mode-hook'.  Type \\[describe-mode] in the
+process buffer for a list of commands.
+
+By default, Emacs inhibits the loading of Python modules from the
+current working directory, for security reasons.  To disable this
+behavior, change `python-remove-cwd-from-path' to nil.
 
 \(fn &optional CMD NOSHOW NEW)" t nil)
 
@@ -21873,7 +21872,7 @@
 process is started.  If you use this, you will probably want to ensure
 that the current arguments are retained (they will be included in the
 prompt).  This argument is ignored when this function is called
-programmatically, or when running in Emacs 19.34 or older.
+programmatically.
 
 Note: You can toggle between using the CPython interpreter and the
 JPython interpreter by hitting \\[python-toggle-shells].  This toggles
@@ -22864,8 +22863,8 @@
 ;;;;;;  rmail-secondary-file-directory rmail-primary-inbox-list rmail-highlighted-headers
 ;;;;;;  rmail-retry-ignored-headers rmail-displayed-headers rmail-ignored-headers
 ;;;;;;  rmail-dont-reply-to-names rmail-user-mail-address-regexp
-;;;;;;  rmail-movemail-variant-p) "rmail" "mail/rmail.el" (19641
-;;;;;;  1152))
+;;;;;;  rmail-movemail-variant-p) "rmail" "mail/rmail.el" (19705
+;;;;;;  10467))
 ;;; Generated autoloads from mail/rmail.el
 
 (autoload 'rmail-movemail-variant-p "rmail" "\
@@ -24128,8 +24127,8 @@
 ;;;***
 
 ;;;### (autoloads (server-save-buffers-kill-terminal server-mode
-;;;;;;  server-force-delete server-start) "server" "server.el" (19662
-;;;;;;  13261))
+;;;;;;  server-force-delete server-start) "server" "server.el" (19682
+;;;;;;  58511))
 ;;; Generated autoloads from server.el
 
 (autoload 'server-start "server" "\
@@ -24729,7 +24728,7 @@
 ;;;***
 
 ;;;### (autoloads (smtpmail-send-queued-mail smtpmail-send-it) "smtpmail"
-;;;;;;  "mail/smtpmail.el" (19636 58496))
+;;;;;;  "mail/smtpmail.el" (19714 24709))
 ;;; Generated autoloads from mail/smtpmail.el
 
 (autoload 'smtpmail-send-it "smtpmail" "\
@@ -25095,7 +25094,7 @@
 ;;;***
 
 ;;;### (autoloads (speedbar-get-focus speedbar-frame-mode) "speedbar"
-;;;;;;  "speedbar.el" (19658 61388))
+;;;;;;  "speedbar.el" (19678 47007))
 ;;; Generated autoloads from speedbar.el
 
 (defalias 'speedbar 'speedbar-frame-mode)
@@ -26529,7 +26528,7 @@
 ;;;***
 
 ;;;### (autoloads (tcl-help-on-word inferior-tcl tcl-mode) "tcl"
-;;;;;;  "progmodes/tcl.el" (19636 58496))
+;;;;;;  "progmodes/tcl.el" (19673 50265))
 ;;; Generated autoloads from progmodes/tcl.el
 
 (autoload 'tcl-mode "tcl" "\
@@ -28011,7 +28010,7 @@
 ;;;### (autoloads (tramp-unload-tramp tramp-completion-handle-file-name-completion
 ;;;;;;  tramp-completion-handle-file-name-all-completions tramp-unload-file-name-handlers
 ;;;;;;  tramp-file-name-handler tramp-syntax tramp-mode) "tramp"
-;;;;;;  "net/tramp.el" (19672 43471))
+;;;;;;  "net/tramp.el" (19714 24709))
 ;;; Generated autoloads from net/tramp.el
 
 (defvar tramp-mode t "\
@@ -29566,7 +29565,7 @@
 
 ;;;***
 
-;;;### (autoloads (vc-dir) "vc-dir" "vc-dir.el" (19661 53223))
+;;;### (autoloads (vc-dir) "vc-dir" "vc-dir.el" (19706 58306))
 ;;; Generated autoloads from vc-dir.el
 
 (autoload 'vc-dir "vc-dir" "\
@@ -29625,7 +29624,7 @@
 
 ;;;***
 
-;;;### (autoloads nil "vc-hg" "vc-hg.el" (19661 52523))
+;;;### (autoloads nil "vc-hg" "vc-hg.el" (19683 64086))
 ;;; Generated autoloads from vc-hg.el
  (defun vc-hg-registered (file)
   "Return non-nil if FILE is registered with hg."
@@ -30940,7 +30939,7 @@
 ;;;***
 
 ;;;### (autoloads (which-function-mode) "which-func" "progmodes/which-func.el"
-;;;;;;  (19636 58496))
+;;;;;;  (19694 49287))
 ;;; Generated autoloads from progmodes/which-func.el
  (put 'which-func-format 'risky-local-variable t)
  (put 'which-func-current 'risky-local-variable t)
@@ -31401,8 +31400,8 @@
 ;;;***
 
 ;;;### (autoloads (widget-setup widget-insert widget-delete widget-create
-;;;;;;  widget-prompt-value widgetp) "wid-edit" "wid-edit.el" (19636
-;;;;;;  58496))
+;;;;;;  widget-prompt-value widgetp) "wid-edit" "wid-edit.el" (19678
+;;;;;;  47007))
 ;;; Generated autoloads from wid-edit.el
 
 (autoload 'widgetp "wid-edit" "\
@@ -32012,8 +32011,8 @@
 ;;;;;;  "url/url-expand.el" "url/url-ftp.el" "url/url-history.el"
 ;;;;;;  "url/url-imap.el" "url/url-methods.el" "url/url-nfs.el" "url/url-proxy.el"
 ;;;;;;  "url/url-vars.el" "vc-dav.el" "vcursor.el" "vt-control.el"
-;;;;;;  "vt100-led.el" "w32-fns.el" "w32-vars.el" "x-dnd.el") (19672
-;;;;;;  46342 903499))
+;;;;;;  "vt100-led.el" "w32-fns.el" "w32-vars.el" "x-dnd.el") (19714
+;;;;;;  25843 484853))
 
 ;;;***
 
--- a/lisp/log-edit.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/log-edit.el	Fri Dec 24 11:30:43 2010 +0900
@@ -773,7 +773,7 @@
 		(setq pattern (file-name-nondirectory file)))
 
             (setq pattern (concat "\\(^\\|[^[:alnum:]]\\)"
-                                  pattern
+                                  (regexp-quote pattern)
                                   "\\($\\|[^[:alnum:]]\\)"))
 
 	    (let (texts
--- a/lisp/mail/binhex.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/mail/binhex.el	Fri Dec 24 11:30:43 2010 +0900
@@ -1,4 +1,4 @@
-;;; binhex.el --- elisp native binhex decode
+;;; binhex.el --- decode BinHex-encoded text
 
 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
@@ -23,6 +23,11 @@
 
 ;;; Commentary:
 
+;; BinHex is a binary-to-text encoding scheme similar to uuencode.
+;; The command `binhex-decode-region' decodes BinHex-encoded text, via
+;; the external program "hexbin" if that is available, or an Emacs
+;; Lisp implementation if not.
+
 ;;; Code:
 
 (eval-when-compile (require 'cl))
--- a/lisp/mail/rmail.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/mail/rmail.el	Fri Dec 24 11:30:43 2010 +0900
@@ -4290,7 +4290,7 @@
 
 ;;;***
 
-;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "4a7502b4aeb3bd5f2111b48cc6512924")
+;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "222ca7c1e672a08e5799e5a72fb25049")
 ;;; Generated autoloads from rmailmm.el
 
 (autoload 'rmail-mime "rmailmm" "\
@@ -4381,7 +4381,7 @@
 
 ;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic
 ;;;;;;  rmail-summary-by-regexp rmail-summary-by-recipients rmail-summary-by-labels
-;;;;;;  rmail-summary) "rmailsum" "rmailsum.el" "26b95919c7e1f8c5609ce7323aee77ae")
+;;;;;;  rmail-summary) "rmailsum" "rmailsum.el" "d855683972baef7111d4508dffbb54b6")
 ;;; Generated autoloads from rmailsum.el
 
 (autoload 'rmail-summary "rmailsum" "\
--- a/lisp/mail/smtpmail.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/mail/smtpmail.el	Fri Dec 24 11:30:43 2010 +0900
@@ -392,7 +392,14 @@
 		(make-directory smtpmail-queue-dir t))
 	      (with-current-buffer buffer-data
 		(erase-buffer)
-		(set-buffer-file-coding-system smtpmail-code-conv-from nil t)
+		(set-buffer-file-coding-system
+		 ;; We will be reading the file with no-conversion in
+		 ;; smtpmail-send-queued-mail below, so write it out
+		 ;; with Unix EOLs.
+		 (coding-system-change-eol-conversion
+		  (or smtpmail-code-conv-from 'undecided)
+		  'unix)
+		 nil t)
 		(insert-buffer-substring tembuf)
 		(write-file file-data)
 		(set-buffer buffer-elisp)
@@ -1007,5 +1014,4 @@
 
 (provide 'smtpmail)
 
-;; arch-tag: a76992df-6d71-43b7-9e72-4bacc6c05466
 ;;; smtpmail.el ends here
--- a/lisp/menu-bar.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/menu-bar.el	Fri Dec 24 11:30:43 2010 +0900
@@ -980,16 +980,33 @@
 	      :visible (and (display-graphic-p) (fboundp 'x-show-tip))
 	      :button (:toggle . tooltip-mode)))
 
+(defun menu-bar-frame-for-menubar ()
+  "Return the frame suitable for updating the menu bar."
+  (or (and (framep menu-updating-frame)
+	   menu-updating-frame)
+      (selected-frame)))
+
+(defun menu-bar-positive-p (val)
+  "Return non-nil iff VAL is a positive number."
+  (and (numberp val)
+       (> val 0)))
+
 (define-key menu-bar-showhide-menu [menu-bar-mode]
   `(menu-item ,(purecopy "Menu-bar") toggle-menu-bar-mode-from-frame
 	      :help ,(purecopy "Turn menu-bar on/off")
-	      :button (:toggle . (> (frame-parameter nil 'menu-bar-lines) 0))))
+	      :button
+	      (:toggle . (menu-bar-positive-p
+			  (frame-parameter (menu-bar-frame-for-menubar)
+					   'menu-bar-lines)))))
 
 (define-key menu-bar-showhide-menu [showhide-tool-bar]
   `(menu-item ,(purecopy "Tool-bar") toggle-tool-bar-mode-from-frame
 	      :help ,(purecopy "Turn tool-bar on/off")
 	      :visible (display-graphic-p)
-	      :button (:toggle . (> (frame-parameter nil 'tool-bar-lines) 0))))
+	      :button
+	      (:toggle . (menu-bar-positive-p
+			  (frame-parameter (menu-bar-frame-for-menubar)
+					   'tool-bar-lines)))))
 
 (define-key menu-bar-options-menu [showhide]
   `(menu-item ,(purecopy "Show/Hide") ,menu-bar-showhide-menu))
--- a/lisp/mouse.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/mouse.el	Fri Dec 24 11:30:43 2010 +0900
@@ -181,6 +181,7 @@
     (minor-mode-menu-from-indicator indicator)))
 
 (defun mouse-menu-major-mode-map ()
+  (run-hooks 'activate-menubar-hook 'menu-bar-update-hook)
   (let* (;; Keymap from which to inherit; may be null.
 	 (ancestor (mouse-menu-non-singleton
 		    (and (current-local-map)
@@ -213,6 +214,7 @@
   "Return a keymap equivalent to the menu bar.
 The contents are the items that would be in the menu bar whether or
 not it is actually displayed."
+  (run-hooks 'activate-menubar-hook 'menu-bar-update-hook)
   (let* ((local-menu (and (current-local-map)
 			  (lookup-key (current-local-map) [menu-bar])))
 	 (global-menu (lookup-key global-map [menu-bar]))
@@ -2607,5 +2609,4 @@
 (make-obsolete 'mldrag-drag-vertical-line 'mouse-drag-vertical-line "21.1")
 (provide 'mldrag)
 
-;; arch-tag: 9a710ce1-914a-4923-9b81-697f7bf82ab3
 ;;; mouse.el ends here
--- a/lisp/net/tramp.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/net/tramp.el	Fri Dec 24 11:30:43 2010 +0900
@@ -4522,60 +4522,65 @@
 (defun tramp-handle-start-file-process (name buffer program &rest args)
   "Like `start-file-process' for Tramp files."
   (with-parsed-tramp-file-name default-directory nil
-    (unwind-protect
-	;; When PROGRAM is nil, we just provide a tty.
-	(let ((command
-	       (when (stringp program)
-		 (format "cd %s; exec %s"
-			 (tramp-shell-quote-argument localname)
-			 (mapconcat 'tramp-shell-quote-argument
-				    (cons program args) " "))))
-	      (tramp-process-connection-type
-	       (or (null program) tramp-process-connection-type))
-	      (name1 name)
-	      (i 0))
-	  (unless buffer
-	    ;; BUFFER can be nil.  We use a temporary buffer.
-	    (setq buffer (generate-new-buffer tramp-temp-buffer-name)))
-	  (while (get-process name1)
-	    ;; NAME must be unique as process name.
-	    (setq i (1+ i)
-		  name1 (format "%s<%d>" name i)))
-	  (setq name name1)
-	  ;; Set the new process properties.
-	  (tramp-set-connection-property v "process-name" name)
-	  (tramp-set-connection-property v "process-buffer" buffer)
-	  ;; Activate narrowing in order to save BUFFER contents.
-	  ;; Clear also the modification time; otherwise we might be
-	  ;; interrupted by `verify-visited-file-modtime'.
-	  (with-current-buffer (tramp-get-connection-buffer v)
-	    (clear-visited-file-modtime)
-	    (narrow-to-region (point-max) (point-max)))
-	  (if command
-	      ;; Send the command.
-	      (tramp-send-command v command nil t) ; nooutput
-	    ;; Check, whether a pty is associated.
-	    (tramp-maybe-open-connection v)
-	    (unless (process-get (tramp-get-connection-process v) 'remote-tty)
-	      (tramp-error
-	       v 'file-error "pty association is not supported for `%s'" name)))
-	  (let ((p (tramp-get-connection-process v)))
-	    ;; Set sentinel and query flag for this process.
-	    (tramp-set-connection-property p "vector" v)
-	    (set-process-sentinel p 'tramp-process-sentinel)
-	    (tramp-set-process-query-on-exit-flag p t)
-	    ;; Return process.
-	    p))
-      ;; Save exit.
-      (with-current-buffer (tramp-get-connection-buffer v)
-	(if (string-match tramp-temp-buffer-name (buffer-name))
-	    (progn
-	      (set-process-buffer (tramp-get-connection-process v) nil)
-	      (kill-buffer (current-buffer)))
-	  (widen)
-	  (goto-char (point-max))))
-      (tramp-set-connection-property v "process-name" nil)
-      (tramp-set-connection-property v "process-buffer" nil))))
+    ;; When PROGRAM is nil, we just provide a tty.
+    (let ((command
+	   (when (stringp program)
+	     (format "cd %s; exec %s"
+		     (tramp-shell-quote-argument localname)
+		     (mapconcat 'tramp-shell-quote-argument
+				(cons program args) " "))))
+	  (tramp-process-connection-type
+	   (or (null program) tramp-process-connection-type))
+	  (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer)))
+	  (name1 name)
+	  (i 0))
+      (unwind-protect
+	  (save-excursion
+	    (save-restriction
+	      (unless buffer
+		;; BUFFER can be nil.  We use a temporary buffer.
+		(setq buffer (generate-new-buffer tramp-temp-buffer-name)))
+	      (while (get-process name1)
+		;; NAME must be unique as process name.
+		(setq i (1+ i)
+		      name1 (format "%s<%d>" name i)))
+	      (setq name name1)
+	      ;; Set the new process properties.
+	      (tramp-set-connection-property v "process-name" name)
+	      (tramp-set-connection-property v "process-buffer" buffer)
+	      ;; Activate narrowing in order to save BUFFER contents.
+	      ;; Clear also the modification time; otherwise we might
+	      ;; be interrupted by `verify-visited-file-modtime'.
+	      (with-current-buffer (tramp-get-connection-buffer v)
+		(let ((buffer-undo-list t))
+		  (clear-visited-file-modtime)
+		  (narrow-to-region (point-max) (point-max))
+		  (if command
+		      ;; Send the command.
+		      (tramp-send-command v command nil t) ; nooutput
+		    ;; Check, whether a pty is associated.
+		    (tramp-maybe-open-connection v)
+		    (unless (process-get
+			     (tramp-get-connection-process v) 'remote-tty)
+		      (tramp-error
+		       v 'file-error
+		       "pty association is not supported for `%s'" name)))))
+	      (let ((p (tramp-get-connection-process v)))
+		;; Set sentinel and query flag for this process.
+		(tramp-set-connection-property p "vector" v)
+		(set-process-sentinel p 'tramp-process-sentinel)
+		(tramp-set-process-query-on-exit-flag p t)
+		;; Return process.
+		p)))
+	;; Save exit.
+	(with-current-buffer (tramp-get-connection-buffer v)
+	  (if (string-match tramp-temp-buffer-name (buffer-name))
+	      (progn
+		(set-process-buffer (tramp-get-connection-process v) nil)
+		(kill-buffer (current-buffer)))
+	    (set-buffer-modified-p bmp)))
+	(tramp-set-connection-property v "process-name" nil)
+	(tramp-set-connection-property v "process-buffer" nil)))))
 
 (defun tramp-handle-process-file
   (program &optional infile destination display &rest args)
@@ -6810,26 +6815,27 @@
   (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)
-	(widen)
-	(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")))))))
+    (save-restriction
+      (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)
+	  (widen)
+	  (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/ps-print.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/ps-print.el	Fri Dec 24 11:30:43 2010 +0900
@@ -4331,14 +4331,17 @@
 	 (ps-header-font-size-internal
 	  (or ps-header-font-size-internal
 	      (ps-get-font-size 'ps-header-font-size)))
+	 (ps-footer-font-size-internal
+	  (or ps-footer-font-size-internal
+	      (ps-get-font-size 'ps-footer-font-size)))
 	 (ps-header-title-font-size-internal
 	  (or ps-header-title-font-size-internal
 	      (ps-get-font-size 'ps-header-title-font-size)))
 	 (buf (get-buffer-create "*Line-lengths*"))
 	 (ifs ps-font-size-internal)	; initial font size
-	 (icw (ps-avg-char-width 'ps-font-for-text)) ; initial character width
 	 (print-width (progn (ps-get-page-dimensions)
 			     ps-print-width))
+	 (icw (ps-avg-char-width 'ps-font-for-text)) ; initial character width
 	 (ps-setup (ps-setup))		; setup for the current buffer
 	 (fs-min 5)			; minimum font size
 	 cw-min				; minimum character width
@@ -4378,6 +4381,9 @@
 	 (ps-header-font-size-internal
 	  (or ps-header-font-size-internal
 	      (ps-get-font-size 'ps-header-font-size)))
+	 (ps-footer-font-size-internal
+	  (or ps-footer-font-size-internal
+	      (ps-get-font-size 'ps-footer-font-size)))
 	 (ps-header-title-font-size-internal
 	  (or ps-header-title-font-size-internal
 	      (ps-get-font-size 'ps-header-title-font-size)))
@@ -4387,9 +4393,9 @@
 	 (buf (get-buffer-create "*Nb-Pages*"))
 	 (ils ps-line-spacing-internal) ; initial line spacing
 	 (ifs ps-font-size-internal)	; initial font size
-	 (ilh (ps-line-height 'ps-font-for-text)) ; initial line height
 	 (page-height (progn (ps-get-page-dimensions)
 			     ps-print-height))
+	 (ilh (ps-line-height 'ps-font-for-text)) ; initial line height
 	 (ps-setup (ps-setup))		; setup for the current buffer
 	 (fs-min 4)			; minimum font size
 	 lh-min				; minimum line height
@@ -6726,5 +6732,4 @@
 
 (provide 'ps-print)
 
-;; arch-tag: fb06a585-1112-4206-885d-a57d95d50579
 ;;; ps-print.el ends here
--- a/lisp/simple.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/simple.el	Fri Dec 24 11:30:43 2010 +0900
@@ -3916,15 +3916,17 @@
 The variable `highlight-nonselected-windows' controls whether to highlight
 all windows or just the selected window.
 
-If the value is `lambda', that enables Transient Mark mode temporarily.
-After any subsequent action that would normally deactivate the mark
-\(such as buffer modification), Transient Mark mode is turned off.
-
-If the value is (only . OLDVAL), that enables Transient Mark mode
-temporarily.  After any subsequent point motion command that is not
-shift-translated, or any other action that would normally deactivate
-the mark (such as buffer modification), the value of
-`transient-mark-mode' is set to OLDVAL.")
+Lisp programs may give this variable certain special values:
+
+- A value of `lambda' enables Transient Mark mode temporarily.
+  It is disabled again after any subsequent action that would
+  normally deactivate the mark (e.g. buffer modification).
+
+- A value of (only . OLDVAL) enables Transient Mark mode
+  temporarily.  After any subsequent point motion command that is
+  not shift-translated, or any other action that would normally
+  deactivate the mark (e.g. buffer modification), the value of
+  `transient-mark-mode' is set to OLDVAL.")
 
 (defvar widen-automatically t
   "Non-nil means it is ok for commands to call `widen' when they want to.
@@ -4113,6 +4115,11 @@
 	 ;; When already vscrolled, we vscroll some more if we can,
 	 ;; or clear vscroll and move forward at end of tall image.
 	 ((> (setq vs (window-vscroll nil t)) 0)
+
+	  ;; If we are vscrolling an image at the top of the screen,
+	  ;; we could actually advance point if this yields space
+	  ;; below....
+
 	  (when (> rbot 0)
 	    (set-window-vscroll nil (+ vs (min rbot (frame-char-height))) t)))
 	 ;; If cursor just entered the bottom scroll margin, move forward,
--- a/lisp/subr.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/subr.el	Fri Dec 24 11:30:43 2010 +0900
@@ -1,7 +1,8 @@
 ;;; subr.el --- basic lisp subroutines for Emacs
 
 ;; Copyright (C) 1985, 1986, 1992, 1994, 1995, 1999, 2000, 2001, 2002, 2003,
-;;   2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;;   2004, 2005, 2006, 2007, 2008, 2009, 2010
+;;   Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: internal
@@ -418,7 +419,7 @@
   (assoc-string key alist nil))
 
 (defun member-ignore-case (elt list)
-  "Like `member', but ignores differences in case and text representation.
+  "Like `member', but ignore differences in case and text representation.
 ELT must be a string.  Upper-case and lower-case letters are treated as equal.
 Unibyte strings are converted to multibyte for comparison.
 Non-strings in LIST are ignored."
@@ -916,8 +917,9 @@
 
 (defsubst posn-x-y (position)
   "Return the x and y coordinates in POSITION.
-POSITION should be a list of the form returned by the `event-start'
-and `event-end' functions."
+The return value has the form (X . Y), where X and Y are given in
+pixels.  POSITION should be a list of the form returned by
+`event-start' and `event-end'."
   (nth 2 position))
 
 (declare-function scroll-bar-scale "scroll-bar" (num-denom whole))
@@ -956,7 +958,9 @@
 	       (setq spacing 0)))
 	(cons (/ (car pair) (frame-char-width frame))
 	      (- (/ (cdr pair) (+ (frame-char-height frame) spacing))
-		 (if (null header-line-format) 0 1))))))))
+		 (if (null (with-current-buffer (window-buffer window)
+			     header-line-format))
+		     0 1))))))))
 
 (defun posn-actual-col-row (position)
   "Return the actual column and row in POSITION, measured in characters.
@@ -997,14 +1001,15 @@
 
 (defsubst posn-object-x-y (position)
   "Return the x and y coordinates relative to the object of POSITION.
-POSITION should be a list of the form returned by the `event-start'
-and `event-end' functions."
+The return value has the form (DX . DY), where DX and DY are
+given in pixels.  POSITION should be a list of the form returned
+by `event-start' and `event-end'."
   (nth 8 position))
 
 (defsubst posn-object-width-height (position)
   "Return the pixel width and height of the object of POSITION.
-POSITION should be a list of the form returned by the `event-start'
-and `event-end' functions."
+The return value has the form (WIDTH . HEIGHT).  POSITION should
+be a list of the form returned by `event-start' and `event-end'."
   (nth 9 position))
 
 
@@ -1390,9 +1395,8 @@
 
 (defun run-mode-hooks (&rest hooks)
   "Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS.
-Execution is delayed if `delay-mode-hooks' is non-nil.
-If `delay-mode-hooks' is nil, run `after-change-major-mode-hook'
-after running the mode hooks.
+Execution is delayed if the variable `delay-mode-hooks' is non-nil.
+Otherwise, runs the mode hooks and then `after-change-major-mode-hook'.
 Major mode functions should use this instead of `run-hooks' when running their
 FOO-mode-hook."
   (if delay-mode-hooks
@@ -2493,7 +2497,7 @@
  `yank-rectangle', PARAM may be a list of strings to insert as a
  rectangle.
 If NOEXCLUDE is present and non-nil, the normal removal of the
- yank-excluded-properties is not performed; instead FUNCTION is
+ `yank-excluded-properties' is not performed; instead FUNCTION is
  responsible for removing those properties.  This may be necessary
  if FUNCTION adjusts point before or after inserting the object.
 If UNDO is present and non-nil, it is a function that will be called
@@ -2765,7 +2769,7 @@
                 (kill-buffer ,temp-buffer)))))))
 
 (defmacro with-silent-modifications (&rest body)
-  "Execute BODY, pretending it does not modifies the buffer.
+  "Execute BODY, pretending it does not modify the buffer.
 If BODY performs real modifications to the buffer's text, other
 than cosmetic ones, undo data may become corrupted.
 Typically used around modifications of text-properties which do not really
@@ -3776,9 +3780,9 @@
 
 ;; The following statement ought to be in print.c, but `provide' can't
 ;; be used there.
+;; http://lists.gnu.org/archive/html/emacs-devel/2009-08/msg00236.html
 (when (hash-table-p (car (read-from-string
 			  (prin1-to-string (make-hash-table)))))
   (provide 'hashtable-print-readable))
 
-;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc
 ;;; subr.el ends here
--- a/lisp/textmodes/rst.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/textmodes/rst.el	Fri Dec 24 11:30:43 2010 +0900
@@ -3307,7 +3307,7 @@
 (defun rst-compile-pdf-preview ()
   "Convert the document to a PDF file and launch a preview program."
   (interactive)
-  (let* ((tmp-filename "/tmp/out.pdf")
+  (let* ((tmp-filename (make-temp-file "rst-out" nil ".pdf"))
 	 (command (format "rst2pdf.py %s %s && %s %s"
 			  buffer-file-name tmp-filename
 			  rst-pdf-program tmp-filename)))
@@ -3322,7 +3322,7 @@
 (defun rst-compile-slides-preview ()
   "Convert the document to an S5 slide presentation and launch a preview program."
   (interactive)
-  (let* ((tmp-filename "/tmp/slides.html")
+  (let* ((tmp-filename (make-temp-file "rst-slides" nil ".html"))
 	 (command (format "rst2s5.py %s %s && %s %s"
 			  buffer-file-name tmp-filename
 			  rst-slides-program tmp-filename)))
--- a/lisp/url/ChangeLog	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/url/ChangeLog	Fri Dec 24 11:30:43 2010 +0900
@@ -1,3 +1,8 @@
+2010-12-04  Chong Yidong  <cyd@stupidchicken.com>
+
+	* url-cookie.el (url-cookie-retrieve): Handle null LOCALPART.
+	Suggested by Lennart Borgman (Bug#7543).
+
 2010-09-18  Glenn Morris  <rgm@gnu.org>
 
 	* url-cache.el (url-is-cached): Doc fix.
--- a/lisp/url/url-cookie.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/url/url-cookie.el	Fri Dec 24 11:30:43 2010 +0900
@@ -198,7 +198,7 @@
     (and exp (> (float-time) (float-time (date-to-time exp))))))
 
 (defun url-cookie-retrieve (host &optional localpart secure)
-  "Retrieve all the netscape-style cookies for a specified HOST and LOCALPART."
+  "Retrieve all cookies for a specified HOST and LOCALPART."
   (let ((storage (if secure
 		     (append url-cookie-secure-storage url-cookie-storage)
 		   url-cookie-storage))
@@ -226,7 +226,8 @@
 	    (setq cur (car cookies)
 		  cookies (cdr cookies)
 		  localpart-match (url-cookie-localpart cur))
-	    (if (and (if (stringp localpart-match)
+	    (if (and (if (and (stringp localpart-match)
+			      (stringp localpart))
 			 (string-match (concat "^" (regexp-quote
 						    localpart-match))
 				       localpart)
--- a/lisp/vc-dir.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/vc-dir.el	Fri Dec 24 11:30:43 2010 +0900
@@ -748,12 +748,11 @@
 
 (defun vc-dir-query-replace-regexp (from to &optional delimited)
   "Do `query-replace-regexp' of FROM with TO, on all marked files.
-For marked directories, use the files displayed from those directories.
 If a directory is marked, then use the files displayed for that directory.
 Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
 If you exit (\\[keyboard-quit], RET or q), you can resume the query replace
 with the command \\[tags-loop-continue]."
-  ;; FIXME: this is almost a copy of `dired-do-replace-regexp'.  This
+  ;; FIXME: this is almost a copy of `dired-do-query-replace-regexp'.  This
   ;; should probably be made generic and used in both places instead of
   ;; duplicating it here.
   (interactive
--- a/lisp/version.el	Thu Dec 02 09:44:25 2010 +0900
+++ b/lisp/version.el	Fri Dec 24 11:30:43 2010 +0900
@@ -32,7 +32,7 @@
 (defconst emacs-copyright "Copyright (C) 2010 Free Software Foundation, Inc." "\
 Short copyright string for this version of Emacs.")
 
-(defconst emacs-version "23.2.90" "\
+(defconst emacs-version "23.2.91" "\
 Version numbers of this version of Emacs.")
 
 (defconst emacs-major-version (progn (string-match "^[0-9]+" emacs-version) (string-to-number (match-string 0 emacs-version))) "\
--- a/make-dist	Thu Dec 02 09:44:25 2010 +0900
+++ b/make-dist	Fri Dec 24 11:30:43 2010 +0900
@@ -602,7 +602,7 @@
    fi
  done
  cd ../${tempdir}/etc
- rm -f fns*.el
+ rm -f fns*.el *.pyc
  rm -f DOC* *~ \#*\# *.dvi *.log *.orig *.rej *,v =* core
  rm -f TAGS)
 
--- a/nextstep/Cocoa/Emacs.base/Contents/Info.plist	Thu Dec 02 09:44:25 2010 +0900
+++ b/nextstep/Cocoa/Emacs.base/Contents/Info.plist	Fri Dec 24 11:30:43 2010 +0900
@@ -553,7 +553,7 @@
 	<key>CFBundleExecutable</key>
 	<string>Emacs</string>
 	<key>CFBundleGetInfoString</key>
-	<string>Emacs 23.2.90 Copyright (C) 2010 Free Software Foundation, Inc.</string>
+	<string>Emacs 23.2.91 Copyright (C) 2010 Free Software Foundation, Inc.</string>
 	<key>CFBundleIconFile</key>
 	<string>Emacs.icns</string>
 	<key>CFBundleIdentifier</key>
@@ -566,7 +566,7 @@
 	<string>APPL</string>
 	<!-- This should be the emacs version number. -->
 	<key>CFBundleShortVersionString</key>
-	<string>23.2.90</string>
+	<string>23.2.91</string>
 	<key>CFBundleSignature</key>
 	<string>EMAx</string>
 	<!-- This SHOULD be a build number. -->
--- a/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings	Thu Dec 02 09:44:25 2010 +0900
+++ b/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings	Fri Dec 24 11:30:43 2010 +0900
@@ -1,6 +1,6 @@
 /* Localized versions of Info.plist keys */
 
 CFBundleName = "Emacs";
-CFBundleShortVersionString = "Version 23.2.90";
-CFBundleGetInfoString = "Emacs version 23.2.90, NS Windowing";
+CFBundleShortVersionString = "Version 23.2.91";
+CFBundleGetInfoString = "Emacs version 23.2.91, NS Windowing";
 NSHumanReadableCopyright = "Copyright (C) 2010 Free Software Foundation, Inc.";
--- a/nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop	Thu Dec 02 09:44:25 2010 +0900
+++ b/nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop	Fri Dec 24 11:30:43 2010 +0900
@@ -1,7 +1,7 @@
 [Desktop Entry]
 Encoding=UTF-8
 Type=Application
-Version=23.2.90
+Version=23.2.91
 Categories=GNUstep
 Name=Emacs
 Comment=GNU Emacs for NeXT/Open/GNUstep and OS X
--- a/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist	Thu Dec 02 09:44:25 2010 +0900
+++ b/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist	Fri Dec 24 11:30:43 2010 +0900
@@ -2,7 +2,7 @@
     ApplicationDescription = "GNU Emacs for GNUstep / OS X";
     ApplicationIcon = emacs.tiff;
     ApplicationName = Emacs;
-    ApplicationRelease = "23.2.90";
+    ApplicationRelease = "23.2.91";
     Authors = (
 	"Adrian Robert (GNUstep)",
 	"Christophe de Dinechin (MacOS X)",
@@ -13,7 +13,7 @@
     );
     Copyright = "Copyright (C) 2010 Free Software Foundation, Inc.";
     CopyrightDescription = "Released under the GNU General Public License Version 3 or later";
-    FullVersionID = "Emacs 23.2.90, NS Windowing";
+    FullVersionID = "Emacs 23.2.91, NS Windowing";
     NSExecutable = Emacs;
     NSIcon = emacs.tiff;
     NSPrincipalClass = NSApplication;
--- a/nt/emacs.rc	Thu Dec 02 09:44:25 2010 +0900
+++ b/nt/emacs.rc	Fri Dec 24 11:30:43 2010 +0900
@@ -7,8 +7,8 @@
 #endif
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 23,2,90,0
- PRODUCTVERSION 23,2,90,0
+ FILEVERSION 23,2,91,0
+ PRODUCTVERSION 23,2,91,0
  FILEFLAGSMASK 0x3FL
 #ifdef EMACSDEBUG
  FILEFLAGS 0x1L
@@ -25,12 +25,12 @@
 	BEGIN
 	    VALUE "CompanyName", "Free Software Foundation\0"
 	    VALUE "FileDescription", "GNU Emacs: The extensible self-documenting text editor\0"
-	    VALUE "FileVersion", "23, 2, 90, 0\0"
+	    VALUE "FileVersion", "23, 2, 91, 0\0"
 	    VALUE "InternalName", "Emacs\0"
 	    VALUE "LegalCopyright", "Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010\0"
 	    VALUE "OriginalFilename", "emacs.exe"
 	    VALUE "ProductName", "Emacs\0"
-	    VALUE "ProductVersion", "23, 2, 90, 0\0"
+	    VALUE "ProductVersion", "23, 2, 91, 0\0"
 	    VALUE "OLESelfRegister", "\0"
 	 END
      END
--- a/nt/emacsclient.rc	Thu Dec 02 09:44:25 2010 +0900
+++ b/nt/emacsclient.rc	Fri Dec 24 11:30:43 2010 +0900
@@ -5,8 +5,8 @@
 #endif
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 23,2,90,0
- PRODUCTVERSION 23,2,90,0
+ FILEVERSION 23,2,91,0
+ PRODUCTVERSION 23,2,91,0
  FILEFLAGSMASK 0x3FL
 #ifdef EMACSDEBUG
  FILEFLAGS 0x1L
@@ -23,12 +23,12 @@
 	BEGIN
 	    VALUE "CompanyName", "Free Software Foundation\0"
 	    VALUE "FileDescription", "GNU EmacsClient: Client for the extensible self-documenting text editor\0"
-	    VALUE "FileVersion", "23, 2, 90, 0\0"
+	    VALUE "FileVersion", "23, 2, 91, 0\0"
 	    VALUE "InternalName", "EmacsClient\0"
 	    VALUE "LegalCopyright", "Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010\0"
 	    VALUE "OriginalFilename", "emacsclientw.exe"
 	    VALUE "ProductName", "EmacsClient\0"
-	    VALUE "ProductVersion", "23, 2, 90, 0\0"
+	    VALUE "ProductVersion", "23, 2, 91, 0\0"
 	    VALUE "OLESelfRegister", "\0"
 	 END
      END
--- a/src/ChangeLog	Thu Dec 02 09:44:25 2010 +0900
+++ b/src/ChangeLog	Fri Dec 24 11:30:43 2010 +0900
@@ -1,3 +1,78 @@
+2010-12-17  Eli Zaretskii  <eliz@gnu.org>
+
+	* xdisp.c (Fformat_mode_line): Fix last change.
+
+2010-12-16  Chong Yidong  <cyd@stupidchicken.com>
+
+	* xdisp.c (Fformat_mode_line): Restrict the FACE argument to basic
+	faces (Bug#7587).
+
+2010-12-13  Eli Zaretskii  <eliz@gnu.org>
+
+	* fileio.c (Fexpand_file_name): One more doc fix.
+
+2010-12-12  Eli Zaretskii  <eliz@gnu.org>
+
+	* fileio.c (Fexpand_file_name): Doc fix.  (Bug#7617)
+
+2010-12-11  Eli Zaretskii  <eliz@gnu.org>
+
+	* w32fns.c (Fx_show_tip): Call try_window with last argument
+	TRY_WINDOW_IGNORE_FONTS_CHANGE.  Delete the TODO ifdef: problem
+	solved.  Round up the tip height to an integral multiple of the
+	frame's line height.  Add FRAME_COLUMN_WIDTH to the tip width.
+	(Bug#7398)
+
+	* xdisp.c (string_pos_nchars_ahead, c_string_pos)
+	(face_before_or_after_it_pos, next_element_from_string)
+	(next_element_from_c_string, produce_stretch_glyph): Remove unused
+	calculations of maximum string length before calling
+	string_char_and_length and STRING_CHAR_AND_LENGTH.
+	(string_char_and_length): Update commentary: MAXLEN is no longer
+	needed.
+
+2010-12-10  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* keyboard.c (kbd_buffer_get_event): Construct SAVE_SESSION_EVENT
+	as (Qsave_session arg).
+
+	* xsmfns.c (smc_interact_CB): Set arg to Qnil.
+	(smc_die_CB): Make an event with arg Qt.
+	(Fhandle_save_session): If event has Qt as argument,
+	call Fkill_emacs (Bug#7552).
+
+2010-12-07  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* xsmfns.c (smc_die_CB): Call Fkill_emacs (Bug#7552).
+
+2010-12-06  Chong Yidong  <cyd@stupidchicken.com>
+
+	* dispextern.h (struct it): New member overlay_strings_charpos.
+
+	* xdisp.c (next_overlay_string, load_overlay_strings): Record the
+	charpos where we computed n_overlay_strings.
+	(next_overlay_string): Load overlay strings at recorded position,
+	which may not be the same as the iterator's charpos (Bug#7016).
+
+2010-12-05  Jan Djärv  <jan.h.d@swipnet.se>
+
+	* nsterm.m (ns_dumpglyphs_image): If drawing cursor, fill background
+	with cursor color and draw a rectangle around the image (Bug#7412).
+
+2010-12-05  Chong Yidong  <cyd@stupidchicken.com>
+
+	* xdisp.c (try_scrolling): Avoid infloop if the first line is
+	obscured due to a vscroll (Bug#7537).
+
+2010-12-02  Jan Djärv  <jhd@zeplinf.localdomain>
+
+	* nsterm.h (FRAME_NS_TOOLBAR_HEIGHT): Rename to FRAME_TOOLBAR_HEIGHT.
+
+	* nsterm.m (x_set_window_size, windowWillResize, initFrameFromEmacs):
+	Use FRAME_TOOLBAR_HEIGHT.
+	(x_set_offset): Handle XNegative and YNegative in
+	f->size_hint_flags (Bug#7510).
+
 2010-11-25  Kenichi Handa  <handa@m17n.org>
 
 	* charset.c (emacs_mule_charset): Make it an array of charset ID;
--- a/src/dispextern.h	Thu Dec 02 09:44:25 2010 +0900
+++ b/src/dispextern.h	Fri Dec 24 11:30:43 2010 +0900
@@ -1989,6 +1989,12 @@
      OVERLAY_STRING_CHUNK_SIZE.  */
   int n_overlay_strings;
 
+  /* The charpos where n_overlay_strings was calculated.  This should
+     be set at the same time as n_overlay_strings.  It is needed
+     because we show before-strings at the start of invisible text;
+     see handle_invisible_prop in xdisp.c.  */
+  int overlay_strings_charpos;
+
   /* Vector of overlays to process.  Overlay strings are processed
      OVERLAY_STRING_CHUNK_SIZE at a time.  */
 #define OVERLAY_STRING_CHUNK_SIZE 16
--- a/src/fileio.c	Thu Dec 02 09:44:25 2010 +0900
+++ b/src/fileio.c	Fri Dec 24 11:30:43 2010 +0900
@@ -828,10 +828,15 @@
 Second arg DEFAULT-DIRECTORY is directory to start with if NAME is relative
 \(does not start with slash or tilde); if DEFAULT-DIRECTORY is nil or missing,
 the current buffer's value of `default-directory' is used.
+NAME should be a string that is a valid file name for the underlying
+filesystem.
 File name components that are `.' are removed, and
 so are file name components followed by `..', along with the `..' itself;
 note that these simplifications are done without checking the resulting
 file names in the file system.
+Multiple consecutive slashes are collapsed into a single slash,
+except at the beginning of the file name when they are significant (e.g.,
+UNC file names on MS-Windows.)
 An initial `~/' expands to your home directory.
 An initial `~USER/' expands to USER's home directory.
 See also the function `substitute-in-file-name'.
@@ -839,7 +844,7 @@
 For technical reasons, this function can return correct but
 non-intuitive results for the root directory; for instance,
 \(expand-file-name ".." "/") returns "/..".  For this reason, use
-(directory-file-name (file-name-directory dirname)) to traverse a
+\(directory-file-name (file-name-directory dirname)) to traverse a
 filesystem tree, not (expand-file-name ".."  dirname).  */)
      (name, default_directory)
      Lisp_Object name, default_directory;
--- a/src/keyboard.c	Thu Dec 02 09:44:25 2010 +0900
+++ b/src/keyboard.c	Fri Dec 24 11:30:43 2010 +0900
@@ -4305,7 +4305,7 @@
 #endif
       else if (event->kind == SAVE_SESSION_EVENT)
         {
-          obj = Fcons (Qsave_session, Qnil);
+          obj = Fcons (Qsave_session, Fcons (event->arg, Qnil));
 	  kbd_fetch_ptr = event + 1;
         }
       /* Just discard these, by returning nil.
--- a/src/nsterm.h	Thu Dec 02 09:44:25 2010 +0900
+++ b/src/nsterm.h	Fri Dec 24 11:30:43 2010 +0900
@@ -606,7 +606,7 @@
 #define NS_FACE_FOREGROUND(f) ((f)->foreground)
 #define NS_FACE_BACKGROUND(f) ((f)->background)
 #define FRAME_NS_TITLEBAR_HEIGHT(f) ((f)->output_data.ns->titlebar_height)
-#define FRAME_NS_TOOLBAR_HEIGHT(f) ((f)->output_data.ns->toolbar_height)
+#define FRAME_TOOLBAR_HEIGHT(f) ((f)->output_data.ns->toolbar_height)
 
 #define FONT_WIDTH(f)	((f)->max_width)
 #define FONT_HEIGHT(f)	((f)->height)
--- a/src/nsterm.m	Thu Dec 02 09:44:25 2010 +0900
+++ b/src/nsterm.m	Fri Dec 24 11:30:43 2010 +0900
@@ -1082,16 +1082,31 @@
 
   f->left_pos = xoff;
   f->top_pos = yoff;
-#ifdef NS_IMPL_GNUSTEP
-  if (xoff < 100)
-    f->left_pos = 100;  /* don't overlap menu */
-#endif
 
   if (view != nil && (screen = [[view window] screen]))
-    [[view window] setFrameTopLeftPoint:
-        NSMakePoint (SCREENMAXBOUND (f->left_pos),
-                     SCREENMAXBOUND ([screen frame].size.height
-                                     - NS_TOP_POS (f)))];
+    {
+      f->left_pos = f->size_hint_flags & XNegative
+        ? [screen visibleFrame].size.width + f->left_pos - FRAME_PIXEL_WIDTH (f)
+        : f->left_pos;
+      /* We use visibleFrame here to take menu bar into account.
+	 Ideally we should also adjust left/top with visibleFrame.offset.  */
+	 
+      f->top_pos = f->size_hint_flags & YNegative
+        ? ([screen visibleFrame].size.height + f->top_pos
+           - FRAME_PIXEL_HEIGHT (f) - FRAME_NS_TITLEBAR_HEIGHT (f)
+           - FRAME_TOOLBAR_HEIGHT (f))
+        : f->top_pos;
+#ifdef NS_IMPL_GNUSTEP
+      if (f->left_pos < 100)
+        f->left_pos = 100;  /* don't overlap menu */
+#endif
+      [[view window] setFrameTopLeftPoint:
+                       NSMakePoint (SCREENMAXBOUND (f->left_pos),
+                                    SCREENMAXBOUND ([screen frame].size.height
+                                                    - NS_TOP_POS (f)))];
+      f->size_hint_flags &= ~(XNegative|YNegative);
+    }
+
   UNBLOCK_INPUT;
 }
 
@@ -1148,15 +1163,15 @@
     /* NOTE: previously this would generate wrong result if toolbar not
              yet displayed and fixing toolbar_height=32 helped, but
              now (200903) seems no longer needed */
-    FRAME_NS_TOOLBAR_HEIGHT (f) =
+    FRAME_TOOLBAR_HEIGHT (f) =
       NSHeight ([window frameRectForContentRect: NSMakeRect (0, 0, 0, 0)])
         - FRAME_NS_TITLEBAR_HEIGHT (f);
   else
-    FRAME_NS_TOOLBAR_HEIGHT (f) = 0;
+    FRAME_TOOLBAR_HEIGHT (f) = 0;
 
   wr.size.width = pixelwidth + f->border_width;
   wr.size.height = pixelheight + FRAME_NS_TITLEBAR_HEIGHT (f) 
-                  + FRAME_NS_TOOLBAR_HEIGHT (f);
+                  + FRAME_TOOLBAR_HEIGHT (f);
 
   /* constrain to screen if we can */
   if (screen)
@@ -2738,7 +2753,10 @@
   else
     face = FACE_FROM_ID (s->f, s->first_glyph->face_id);
 
-  [ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), s->f) set];
+  if (s->hl == DRAW_CURSOR)
+      [FRAME_CURSOR_COLOR (s->f) set];
+  else
+    [ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), s->f) set];
 
   if (bg_height > s->slice.height || s->img->hmargin || s->img->vmargin
       || s->img->mask || s->img->pixmap == 0 || s->width != s->background_width)
@@ -2801,6 +2819,16 @@
                       s->slice.x == 0,
                       s->slice.x + s->slice.width == s->img->width, s);
     }
+
+  /* If there is no mask, the background won't be seen,
+     so draw a rectangle on the image for the cursor.
+     Do this for all images, getting trancparency right is not reliable.  */
+  if (s->hl == DRAW_CURSOR)
+    {
+      int thickness = abs (s->img->relief);
+      if (thickness == 0) thickness = 1;
+      ns_draw_box (br, thickness, FRAME_CURSOR_COLOR (s->f), 1, 1);
+    }
 }
 
 
@@ -4897,16 +4925,16 @@
   rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (emacsframe, frameSize.height
 #ifdef NS_IMPL_GNUSTEP
       - FRAME_NS_TITLEBAR_HEIGHT (emacsframe) + 3
-        - FRAME_NS_TOOLBAR_HEIGHT (emacsframe));
+        - FRAME_TOOLBAR_HEIGHT (emacsframe));
 #else
       - FRAME_NS_TITLEBAR_HEIGHT (emacsframe)
-        - FRAME_NS_TOOLBAR_HEIGHT (emacsframe));
+        - FRAME_TOOLBAR_HEIGHT (emacsframe));
 #endif
   if (rows < MINHEIGHT)
     rows = MINHEIGHT;
   frameSize.height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (emacsframe, rows)
                        + FRAME_NS_TITLEBAR_HEIGHT (emacsframe)
-                       + FRAME_NS_TOOLBAR_HEIGHT (emacsframe);
+                       + FRAME_TOOLBAR_HEIGHT (emacsframe);
 #ifdef NS_IMPL_COCOA
   {
     /* this sets window title to have size in it; the wm does this under GS */
@@ -5117,7 +5145,7 @@
   [toggleButton setTarget: self];
   [toggleButton setAction: @selector (toggleToolbar: )];
 #endif
-  FRAME_NS_TOOLBAR_HEIGHT (f) = 0;
+  FRAME_TOOLBAR_HEIGHT (f) = 0;
 
   tem = f->icon_name;
   if (!NILP (tem))
--- a/src/w32fns.c	Thu Dec 02 09:44:25 2010 +0900
+++ b/src/w32fns.c	Fri Dec 24 11:30:43 2010 +0900
@@ -5892,7 +5892,7 @@
   clear_glyph_matrix (w->desired_matrix);
   clear_glyph_matrix (w->current_matrix);
   SET_TEXT_POS (pos, BEGV, BEGV_BYTE);
-  try_window (FRAME_ROOT_WINDOW (f), pos, 0);
+  try_window (FRAME_ROOT_WINDOW (f), pos, TRY_WINDOW_IGNORE_FONTS_CHANGE);
 
   /* Compute width and height of the tooltip.  */
   width = height = 0;
@@ -5909,9 +5909,7 @@
       /* Let the row go over the full width of the frame.  */
       row->full_width_p = 1;
 
-#ifdef TODO /* Investigate why some fonts need more width than is
-	       calculated for some tooltips.  */
-      /* There's a glyph at the end of rows that is use to place
+      /* There's a glyph at the end of rows that is used to place
 	 the cursor there.  Don't include the width of this glyph.  */
       if (row->used[TEXT_AREA])
 	{
@@ -5919,15 +5917,16 @@
 	  row_width = row->pixel_width - last->pixel_width;
 	}
       else
-#endif
 	row_width = row->pixel_width;
 
-      /* TODO: find why tips do not draw along baseline as instructed.  */
       height += row->height;
       width = max (width, row_width);
     }
 
-  /* Add the frame's internal border to the width and height the X
+  /* Round up the height to an integral multiple of FRAME_LINE_HEIGHT.  */
+  if (height % FRAME_LINE_HEIGHT (f) != 0)
+    height += FRAME_LINE_HEIGHT (f) - height % FRAME_LINE_HEIGHT (f);
+  /* Add the frame's internal border to the width and height the w32
      window should have.  */
   height += 2 * FRAME_INTERNAL_BORDER_WIDTH (f);
   width += 2 * FRAME_INTERNAL_BORDER_WIDTH (f);
@@ -5946,11 +5945,13 @@
 		      FRAME_EXTERNAL_MENU_BAR (f));
 
     /* Position and size tooltip, and put it in the topmost group.
-       The add-on of 3 to the 5th argument is a kludge: without it,
-       some fonts cause the last character of the tip to be truncated,
-       for some obscure reason.  */
+       The add-on of FRAME_COLUMN_WIDTH to the 5th argument is a
+       peculiarity of w32 display: without it, some fonts cause the
+       last character of the tip to be truncated or wrapped around to
+       the next line.  */
     SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOPMOST,
-		  root_x, root_y, rect.right - rect.left + 3,
+		  root_x, root_y,
+		  rect.right - rect.left + FRAME_COLUMN_WIDTH (f),
 		  rect.bottom - rect.top, SWP_NOACTIVATE);
 
     /* Ensure tooltip is on top of other topmost windows (eg menus).  */
--- a/src/xdisp.c	Thu Dec 02 09:44:25 2010 +0900
+++ b/src/xdisp.c	Fri Dec 24 11:30:43 2010 +0900
@@ -229,7 +229,7 @@
 extern int minibuffer_auto_raise;
 extern Lisp_Object Vminibuffer_list;
 
-extern Lisp_Object Qface;
+extern Lisp_Object Qface, Qdefault;
 extern Lisp_Object Qmode_line, Qmode_line_inactive, Qheader_line;
 
 extern Lisp_Object Voverriding_local_map;
@@ -1454,11 +1454,10 @@
 }
 
 
-/* Return the next character from STR which is MAXLEN bytes long.
-   Return in *LEN the length of the character.  This is like
-   STRING_CHAR_AND_LENGTH but never returns an invalid character.  If
-   we find one, we return a `?', but with the length of the invalid
-   character.  */
+/* Return the next character from STR.  Return in *LEN the length of
+   the character.  This is like STRING_CHAR_AND_LENGTH but never
+   returns an invalid character.  If we find one, we return a `?', but
+   with the length of the invalid character.  */
 
 static INLINE int
 string_char_and_length (str, len)
@@ -1492,15 +1491,13 @@
 
   if (STRING_MULTIBYTE (string))
     {
-      int rest = SBYTES (string) - BYTEPOS (pos);
       const unsigned char *p = SDATA (string) + BYTEPOS (pos);
       int len;
 
       while (nchars--)
 	{
 	  string_char_and_length (p, &len);
-	  p += len, rest -= len;
-	  xassert (rest >= 0);
+	  p += len;
 	  CHARPOS (pos) += 1;
 	  BYTEPOS (pos) += len;
 	}
@@ -1545,14 +1542,13 @@
 
   if (multibyte_p)
     {
-      int rest = strlen (s), len;
+      int len;
 
       SET_TEXT_POS (pos, 0, 0);
       while (charpos--)
 	{
 	  string_char_and_length (s, &len);
-	  s += len, rest -= len;
-	  xassert (rest >= 0);
+	  s += len;
 	  CHARPOS (pos) += 1;
 	  BYTEPOS (pos) += len;
 	}
@@ -3614,7 +3610,6 @@
       if (STRING_MULTIBYTE (it->string))
 	{
 	  const unsigned char *p = SDATA (it->string) + BYTEPOS (pos);
-	  int rest = SBYTES (it->string) - BYTEPOS (pos);
 	  int c, len;
 	  struct face *face = FACE_FROM_ID (it->f, face_id);
 
@@ -4717,6 +4712,7 @@
 		   && it->stop_charpos <= it->end_charpos));
       it->current.overlay_string_index = -1;
       it->n_overlay_strings = 0;
+      it->overlay_strings_charpos = -1;
 
       /* If we're at the end of the buffer, record that we have
 	 processed the overlay strings there already, so that
@@ -4729,11 +4725,13 @@
       /* There are more overlay strings to process.  If
 	 IT->current.overlay_string_index has advanced to a position
 	 where we must load IT->overlay_strings with more strings, do
-	 it.  */
+	 it.  We must load at the IT->overlay_strings_charpos where
+	 IT->n_overlay_strings was originally computed; when invisible
+	 text is present, this might not be IT_CHARPOS (Bug#7016).  */
       int i = it->current.overlay_string_index % OVERLAY_STRING_CHUNK_SIZE;
 
       if (it->current.overlay_string_index && i == 0)
-	load_overlay_strings (it, 0);
+	load_overlay_strings (it, it->overlay_strings_charpos);
 
       /* Initialize IT to deliver display elements from the overlay
          string.  */
@@ -4949,8 +4947,9 @@
   if (n > 1)
     qsort (entries, n, sizeof *entries, compare_overlay_entries);
 
-  /* Record the total number of strings to process.  */
+  /* Record number of overlay strings, and where we computed it.  */
   it->n_overlay_strings = n;
+  it->overlay_strings_charpos = charpos;
 
   /* IT->current.overlay_string_index is the number of overlay strings
      that have already been consumed by IT.  Copy some of the
@@ -6260,7 +6259,6 @@
 	}
       else if (STRING_MULTIBYTE (it->string))
 	{
-	  int remaining = SBYTES (it->string) - IT_STRING_BYTEPOS (*it);
 	  const unsigned char *s = (SDATA (it->string)
 				    + IT_STRING_BYTEPOS (*it));
 	  it->c = string_char_and_length (s, &it->len);
@@ -6296,7 +6294,6 @@
 	}
       else if (STRING_MULTIBYTE (it->string))
 	{
-	  int maxlen = SBYTES (it->string) - IT_STRING_BYTEPOS (*it);
 	  const unsigned char *s = (SDATA (it->string)
 				    + IT_STRING_BYTEPOS (*it));
 	  it->c = string_char_and_length (s, &it->len);
@@ -6350,13 +6347,7 @@
       BYTEPOS (it->position) = CHARPOS (it->position) = -1;
     }
   else if (it->multibyte_p)
-    {
-      /* Implementation note: The calls to strlen apparently aren't a
-	 performance problem because there is no noticeable performance
-	 difference between Emacs running in unibyte or multibyte mode.  */
-      int maxlen = strlen (it->s) - IT_BYTEPOS (*it);
-      it->c = string_char_and_length (it->s + IT_BYTEPOS (*it), &it->len);
-    }
+    it->c = string_char_and_length (it->s + IT_BYTEPOS (*it), &it->len);
   else
     it->c = it->s[IT_BYTEPOS (*it)], it->len = 1;
 
@@ -12759,7 +12750,11 @@
 
       /* If cursor ends up on a partially visible line,
 	 treat that as being off the bottom of the screen.  */
-      if (! cursor_row_fully_visible_p (w, extra_scroll_margin_lines <= 1, 0))
+      if (! cursor_row_fully_visible_p (w, extra_scroll_margin_lines <= 1, 0)
+	  /* It's possible that the cursor is on the first line of the
+	     buffer, which is partially obscured due to a vscroll
+	     (Bug#7537).  In that case, avoid looping forever . */
+	  && extra_scroll_margin_lines < w->desired_matrix->nrows - 1)
 	{
 	  clear_glyph_matrix (w->desired_matrix);
 	  ++extra_scroll_margin_lines;
@@ -17888,12 +17883,13 @@
 First arg FORMAT specifies the mode line format (see `mode-line-format'
 for details) to use.
 
-Optional second arg FACE specifies the face property to put
-on all characters for which no face is specified.
-The value t means whatever face the window's mode line currently uses
-\(either `mode-line' or `mode-line-inactive', depending).
-A value of nil means the default is no face property.
-If FACE is an integer, the value string has no text properties.
+Optional second arg FACE specifies the face property to put on all
+characters for which no face is specified.  The value nil means the
+default face.  The value t means whatever face the window's mode line
+currently uses \(either `mode-line' or `mode-line-inactive',
+depending).  An integer value means the value string has no text
+properties.  Otherwise, the value should be one of `default',
+`mode-line', `mode-line-inactive', `header-line', or `tool-bar'.
 
 Optional third and fourth args WINDOW and BUFFER specify the window
 and buffer to use as the context for the formatting (defaults
@@ -17905,7 +17901,7 @@
   int len;
   struct window *w;
   struct buffer *old_buffer = NULL;
-  int face_id = -1;
+  int face_id;
   int no_props = INTEGERP (face);
   int count = SPECPDL_INDEX ();
   Lisp_Object str;
@@ -17928,15 +17924,14 @@
   if (no_props)
     face = Qnil;
 
-  if (!NILP (face))
-    {
-      if (EQ (face, Qt))
-	face = (EQ (window, selected_window) ? Qmode_line : Qmode_line_inactive);
-      face_id = lookup_named_face (XFRAME (WINDOW_FRAME (w)), face, 0);
-    }
-
-  if (face_id < 0)
-    face_id = DEFAULT_FACE_ID;
+  face_id = (NILP (face) || EQ (face, Qdefault)) ? DEFAULT_FACE_ID
+    : EQ (face, Qt) ? (EQ (window, selected_window)
+		       ? MODE_LINE_FACE_ID : MODE_LINE_INACTIVE_FACE_ID)
+    : EQ (face, Qmode_line) ? MODE_LINE_FACE_ID
+    : EQ (face, Qmode_line_inactive) ? MODE_LINE_INACTIVE_FACE_ID
+    : EQ (face, Qheader_line) ? HEADER_LINE_FACE_ID
+    : EQ (face, Qtool_bar) ? TOOL_BAR_FACE_ID
+    : DEFAULT_FACE_ID;
 
   if (XBUFFER (buffer) != current_buffer)
     old_buffer = current_buffer;
@@ -20909,11 +20904,7 @@
 
       it2 = *it;
       if (it->multibyte_p)
-	{
-	  int maxlen = ((IT_BYTEPOS (*it) >= GPT ? ZV : GPT)
-			- IT_BYTEPOS (*it));
-	  it2.c = it2.char_to_display = STRING_CHAR_AND_LENGTH (p, it2.len);
-	}
+	it2.c = it2.char_to_display = STRING_CHAR_AND_LENGTH (p, it2.len);
       else
 	{
 	  it2.c = it2.char_to_display = *p, it2.len = 1;
--- a/src/xsmfns.c	Thu Dec 02 09:44:25 2010 +0900
+++ b/src/xsmfns.c	Fri Dec 24 11:30:43 2010 +0900
@@ -172,6 +172,7 @@
 {
   doing_interact = True;
   emacs_event.kind = SAVE_SESSION_EVENT;
+  emacs_event.arg = Qnil;
 }
 
 /* This is called when the session manager tells us to save ourselves.
@@ -298,8 +299,8 @@
      SmcConn smcConn;
      SmPointer clientData;
 {
-  SmcCloseConnection (smcConn, 0, 0);
-  ice_connection_closed ();
+  emacs_event.kind = SAVE_SESSION_EVENT;
+  emacs_event.arg = Qt;
 }
 
 /* We don't use the next two but they are mandatory, leave them empty.
@@ -536,9 +537,12 @@
      (event)
      Lisp_Object event;
 {
+  int kill_emacs = CONSP (event) && CONSP (XCDR (event))
+    && EQ (Qt, XCAR (XCDR (event)));
+
   /* Check doing_interact so that we don't do anything if someone called
      this at the wrong time. */
-  if (doing_interact)
+  if (doing_interact && ! kill_emacs)
     {
       Bool cancel_shutdown = False;
 
@@ -549,9 +553,20 @@
 
       doing_interact = False;
     }
+  else if (kill_emacs)
+    {
+      /* We should not do user interaction here, but it is not easy to
+         prevent.  Fix this in next version.  */
+      Fkill_emacs (Qnil);
 
+      /* This will not be reached, but we want kill-emacs-hook to be run.  */
+      SmcCloseConnection (smc_conn, 0, 0);
+      ice_connection_closed ();
+    }
+  
   return Qnil;
 }
+  
 
 
 /***********************************************************************