Commits

Anonymous committed a6e244c Merge

merge trunk

Comments (0)

Files changed (88)

  ;; You must set bugtracker_debbugs_url in your bazaar.conf for this to work.
  ;; See admin/notes/bugtracker.
  (log-edit-mode . ((log-edit-rewrite-fixes
-                    " (bug#\\([0-9]+\\))" . "debbugs:\\1")))
+                    "[ \n](bug#\\([0-9]+\\))" . "debbugs:\\1")))
  (change-log-mode . ((add-log-time-zone-rule . t)
 		     (fill-column . 74)
 		     (bug-reference-url-format . "http://debbugs.gnu.org/%s")
+2011-09-19  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+	* .dir-locals.el: Change the debbugs regexp to allow having the
+	bug number as the first thing on a line.
+
+2011-09-15  Glenn Morris  <rgm@gnu.org>
+
+	* configure.in: Make configure work with recent GNUsteps.
+	(_NATIVE_OBJC_EXCEPTIONS): New AC_DEFINE.
+	(GNU_OBJC_CFLAGS): Add -fobjc-exceptions when needed.
+	(C_SWITCH_X_SYSTEM): Enable GNUstep to find its headers.
+
 2011-09-11  Paul Eggert  <eggert@cs.ucla.edu>
 
 	Merge from gnulib, porting to Tru64.

autogen/config.in

 /* Define to 1 if on MINIX. */
 #undef _MINIX
 
+/* Define if GNUstep uses ObjC exceptions. */
+#undef _NATIVE_OBJC_EXCEPTIONS
+
 /* The _Noreturn keyword of draft C1X.  */
 #ifndef _Noreturn
 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \

autogen/configure

 CPPFLAGS="$CPPFLAGS -x objective-c"
 CFLAGS="$CFLAGS -x objective-c"
 TEMACS_LDFLAGS2="\${LDFLAGS}"
+GNU_OBJC_CFLAGS=
 if test "${with_ns}" != no; then
   if test "${opsys}" = darwin; then
      NS_IMPL_COCOA=yes
      LIB_STANDARD=
      START_FILES=
      TEMACS_LDFLAGS2=
-  fi
+                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
+$as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
+if test "${emacs_cv_objc_exceptions+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <GNUstepBase/GSConfig.h>
+int
+main ()
+{
+#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
+1;
+#else
+fail;
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  emacs_cv_objc_exceptions=yes
+else
+  emacs_cv_objc_exceptions=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
+$as_echo "$emacs_cv_objc_exceptions" >&6; }
+     if test $emacs_cv_objc_exceptions = yes; then
+
+$as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
+
+       GNU_OBJC_CFLAGS="-fobjc-exceptions"
+     fi
+  fi
+
+    CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
+
   ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
 if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
   HAVE_NS=yes
 
 $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
 
-    GNU_OBJC_CFLAGS=
   fi
   if test "${NS_IMPL_GNUSTEP}" = "yes"; then
 
 
     # See also .m.o rule in Makefile.in */
     # FIXME: are all these flags really needed?  Document here why.  */
-    C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing"
-    GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
+    C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
+    ## Extra CFLAGS applied to src/*.m files.
+    GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
   fi
   if test "${NS_HAVE_NSINTEGER}" = "yes"; then
 
 CPPFLAGS="$CPPFLAGS -x objective-c"
 CFLAGS="$CFLAGS -x objective-c"
 TEMACS_LDFLAGS2="\${LDFLAGS}"
+GNU_OBJC_CFLAGS=
 dnl I don't think it's especially important, but src/Makefile.in
 dnl (now the only user of ns_appdir) used to go to the trouble of adding a
 dnl trailing "/" to it, so now we do it here.
      LIB_STANDARD=
      START_FILES=
      TEMACS_LDFLAGS2=
+     dnl GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS to 0 or 1.
+     dnl If they had chosen to either define it or not, we could have
+     dnl just used AC_CHECK_DECL here.
+     AC_CACHE_CHECK(if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS,
+       emacs_cv_objc_exceptions,
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <GNUstepBase/GSConfig.h>]],
+[[#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
+1;
+#else
+fail;
+#endif]])], emacs_cv_objc_exceptions=yes, emacs_cv_objc_exceptions=no ) )
+     if test $emacs_cv_objc_exceptions = yes; then
+       dnl _NATIVE_OBJC_EXCEPTIONS is used by the GNUstep headers.
+       AC_DEFINE(_NATIVE_OBJC_EXCEPTIONS, 1,
+         [Define if GNUstep uses ObjC exceptions.])
+       GNU_OBJC_CFLAGS="-fobjc-exceptions"
+     fi
   fi
+
+  dnl This is only used while we test the NS headers, it gets reset below.
+  CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
+
   AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes],
   		  [AC_MSG_ERROR([`--with-ns' was specified, but the include
   files are missing or cannot be compiled.])])
   AC_DEFINE(HAVE_NS, 1, [Define to 1 if you are using the NeXTstep API, either GNUstep or Cocoa on Mac OS X.])
   if test "${NS_IMPL_COCOA}" = "yes"; then
     AC_DEFINE(NS_IMPL_COCOA, 1, [Define to 1 if you are using NS windowing under MacOS X.])
-    GNU_OBJC_CFLAGS=
   fi
   if test "${NS_IMPL_GNUSTEP}" = "yes"; then
     AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS windowing under GNUstep.])
     # See also .m.o rule in Makefile.in */
     # FIXME: are all these flags really needed?  Document here why.  */
-    C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing"
-    GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
+    C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
+    ## Extra CFLAGS applied to src/*.m files.
+    GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
   fi
   if test "${NS_HAVE_NSINTEGER}" = "yes"; then
     AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.])

doc/emacs/ChangeLog

+2011-09-18  Chong Yidong  <cyd@stupidchicken.com>
+
+	* cmdargs.texi (Icons X): Fix description of Emacs icon.
+
+	* xresources.texi (Table of Resources): Fix documentation of
+	bitmapIcon.
+
+2011-09-15  Chong Yidong  <cyd@stupidchicken.com>
+
+	* package.texi (Package Menu): Add package-menu-mark-upgrades.
+
 2011-09-12  Eric Hanchrow  <eric.hanchrow@gmail.com>
 
 	* frames.texi (Frame Commands): Note that delete-other-frames only

doc/emacs/cmdargs.texi

 @itemx --no-bitmap-icon
 @opindex --no-bitmap-icon
 @cindex Emacs icon, a gnu
-Do not use a picture of a gnu as the Emacs icon.
+Do not display the Emacs icon.
 @end table
 
   Most window managers allow you to ``iconify'' (or ``minimize'') an

doc/emacs/package.texi

 Remove any installation or deletion mark previously added to the
 current line by an @kbd{i} or @kbd{d} command.
 
+@item U
+Mark all package with a newer available version for ``upgrading''
+(@code{package-menu-mark-upgrades}).  This places an installation mark
+on the new available versions, and a deletion mark on the old
+installed versions.
+
 @item x
 Download and install all packages marked with @kbd{i}, and their
 dependencies; also, delete all packages marked with @kbd{d}

doc/emacs/xresources.texi

 @item @code{background} (class @code{Background})
 Background color name.
 
-@ifnottex
 @item @code{bitmapIcon} (class @code{BitmapIcon})
-Use a bitmap icon (a picture of a gnu) if @samp{on}, let the window
-manager choose an icon if @samp{off}.
-@end ifnottex
+Tell the window manager to display the Emacs icon if @samp{on}; don't
+do so if @samp{off}.  (The icon is usually shown in the ``taskbar'' on
+a graphical desktop.)
 
 @item @code{borderColor} (class @code{BorderColor})
 Color name for the external border.

doc/lispref/ChangeLog

+2011-09-19  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+	* errors.texi (Standard Errors): Remove apparent placeholder text
+	(bug#9491).
+
+2011-09-18  Chong Yidong  <cyd@stupidchicken.com>
+
+	* frames.texi (Management Parameters): Fix description of
+	icon-type parameter.
+
+2011-09-17  Chong Yidong  <cyd@stupidchicken.com>
+
+	* tips.texi (Key Binding Conventions): Don't bind a key sequence
+	ending in C-g.  Suggested by Edward O'Connor.
+
+2011-09-17  Eli Zaretskii  <eliz@gnu.org>
+
+	* numbers.texi (Integer Basics): Add indexing for
+	most-positive-fixnum and most-negative-fixnum.  (Bug#9525)
+
+2011-09-14  Dani Moncayo  <dmoncayo@gmail.com>  (tiny change)
+
+	* lists.texi (Sets And Lists): Fix typo.  (Bug#9393)
+
 2011-09-11  Juanma Barranquero  <lekktu@gmail.com>
 
 	* processes.texi (Network Servers): Clarify what the process

doc/lispref/errors.texi

 handled.
 
 @table @code
-@item @var{symbol}
-@var{string}; @var{reference}.
-
 @item error
 @code{"error"}@*
 @xref{Errors}.

doc/lispref/frames.texi

 
 @vindex icon-type, a frame parameter
 @item icon-type
-The type of icon to use for this frame when it is iconified.  If the
-value is a string, that specifies a file containing a bitmap to use.
-Any other non-@code{nil} value specifies the default bitmap icon (a
-picture of a gnu); @code{nil} specifies a text icon.
+The type of icon to use for this frame.  If the value is a string,
+that specifies a file containing a bitmap to use; @code{nil} specifies
+no icon (in which case the window manager decides what to show); any
+other non-@code{nil} value specifies the default Emacs icon.
 
 @vindex icon-name, a frame parameter
 @item icon-name

doc/lispref/lists.texi

 l
      @result{} ((2) (1))
 ;; @r{If you want to change @code{l} reliably,}
-;; @r{write @code{(setq l (delete elt l))}.}
+;; @r{write @code{(setq l (delete '(2) l))}.}
 @end group
 @group
 (setq l '((2) (1) (2)))

doc/lispref/numbers.texi

 give these arguments the name @var{number-or-marker}.  When the argument
 value is a marker, its position value is used and its buffer is ignored.
 
+@cindex largest Lisp integer number
+@cindex maximum Lisp integer number
 @defvar most-positive-fixnum
 The value of this variable is the largest integer that Emacs Lisp
 can handle.
 @end defvar
 
+@cindex smallest Lisp integer number
+@cindex minimum Lisp integer number
 @defvar most-negative-fixnum
 The value of this variable is the smallest integer that Emacs Lisp can
 handle.  It is negative.

doc/lispref/tips.texi

 that context.
 
 @item
+Similarly, don't bind a key sequence ending in @key{C-g}, since that
+is commonly used to cancel a key sequence.
+
+@item
 Anything which acts like a temporary mode or state which the user can
 enter and leave should define @kbd{@key{ESC} @key{ESC}} or
 @kbd{@key{ESC} @key{ESC} @key{ESC}} as a way to escape.

doc/man/ChangeLog

+2011-09-17  Sven Joachim  <svenjoac@gmx.de>
+
+	* emacs.1: Escape a dash.
+
 2011-07-12  Chong Yidong  <cyd@stupidchicken.com>
 
 	* emacsclient.1: Document exit status.
 .IR fullwidth ,
 or
 .IR fullheight ,
-which correspond to the command-line options `\-fs', `-mm', `\-fw',
+which correspond to the command-line options `\-fs', `\-mm', `\-fw',
 and `\-fh', respectively.
 Note that this applies to the initial frame only.
 .TP
 * New Modes and Packages in Emacs 24.1
 
 ** Occur Edit mode applies edits made in *Occur* buffers to the
-original buffers.  It is bound to C-x C-q in Occur mode.
+original buffers.  It is bound to "e" in Occur mode.
 
 ** New global minor modes electric-pair-mode, electric-indent-mode,
 and electric-layout-mode.
+2011-09-19  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* emacs-lisp/debug.el (debugger-args): Give it a docstring.
+	(debugger-return-value): Signal an error if the debugging context does
+	not await any return value.
+
+	* ps-mule.el (ps-mule-plot-string): Don't inf-loop (bug#5108).
+	* image-mode.el (image-toggle-display-text)
+	(image-toggle-display-image): Stay away from evil `intangible'.
+
+2011-09-19  Leo Liu  <sdl.web@gmail.com>
+
+	* replace.el (occur-revert-arguments): Make it permanent-local.
+	(occur-mode): Don't call font-lock-defontify.
+
+2011-09-19  Chong Yidong  <cyd@stupidchicken.com>
+
+	* net/ldap.el (ldap-search-internal): Don't push empty search
+	result (Bug#9508).
+
+2011-09-19  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* whitespace.el (whitespace-newline-mode): Disable it right (bug#9550).
+
+2011-09-19  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/tramp-sh.el (tramp-inline-compress-commands): Add "xz".
+	Suggested by Liam Stitt <stittl@cuug.ab.ca>.
+
+2011-09-18  Juri Linkov  <juri@jurta.org>
+
+	* buff-menu.el (Buffer-menu-mode-map):
+	* dired.el (dired-mode-map):
+	* emacs-lisp/lisp-mode.el (emacs-lisp-mode-map)
+	(lisp-interaction-mode-map):
+	* emacs-lisp/package.el (package-menu-mode-map):
+	* epa.el (epa-key-list-mode-map):
+	* menu-bar.el (menu-bar-showhide-tool-bar-menu)
+	(menu-bar-options-menu):
+	* outline.el (outline-mode-menu-bar-map):
+	* vc/vc-bzr.el (vc-bzr-shelve-menu-map, vc-bzr-extra-menu-map):
+	* vc/vc-dir.el (vc-dir-menu-map):
+	* vc/vc-git.el (vc-git-stash-menu-map, vc-git-extra-menu-map):
+	Capitalize non-function content words in menu item strings.
+
+	* dired.el (dired-mode-map): Add menu item for
+	`image-dired-dired-toggle-marked-thumbs'.
+
+2011-09-18  Juri Linkov  <juri@jurta.org>
+
+	* isearch.el (isearch-edit-string): Bind `isearch-new-case-fold'
+	to `isearch-case-fold-search' and restore its original value
+	after the `isearch-mode' call.
+
+2011-09-18  Juri Linkov  <juri@jurta.org>
+
+	* progmodes/grep.el (grep-process-setup): Don't check code for 1
+	because `zgrep' returns 1 for successful matches (bug#9226).
+
+2011-09-18  Juri Linkov  <juri@jurta.org>
+
+	* info.el (Info-extract-menu-node-name): Check the second match
+	for empty string (second test-case of bug#9528).
+	(Info-last-preorder): Let-bind `Info-history' to nil to not add
+	intermediate nodes to the history (first test-case of bug#9528).
+
+2011-09-18  Juri Linkov  <juri@jurta.org>
+
+	* info.el (Info-mode-syntax-table): New variable.
+	(Info-mode): Set `:syntax-table' to `Info-mode-syntax-table'.  (Bug#3312)
+
+2011-09-18  Juri Linkov  <juri@jurta.org>
+
+	* info.el (Info-file-supports-index-cookies): Increment
+	line-beginning-position's arg from 3 to 4 because makeinfo outputs
+	one more line for long file names (bug#4142).
+
+2011-09-18  Chong Yidong  <cyd@stupidchicken.com>
+
+	* newcomment.el (comment-normalize-vars): If prompting for
+	comment-start, set comment-start-skip too (Bug#8424).
+
+2011-09-18  Johan Bockgård  <bojohan@gnu.org>
+
+	* icomplete.el: Fix previous fix of Bug#5849.
+	(icomplete-mode): Don't set completion-show-inline-help.
+	(icomplete-minibuffer-setup): Set completion-show-inline-help
+	locally during icompletion.
+
+2011-09-18  Chong Yidong  <cyd@stupidchicken.com>
+
+	* woman.el (woman2-process-escapes): Don't delete unrecognized
+	escapes (Bug#7843).
+
+	* files.el (inhibit-first-line-modes-regexps): Add image files.
+	(hack-local-variables-prop-line): Return nil for malformed
+	prop-lines (Bug#9044).
+
+2011-09-18  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/tramp.el (top): Don't require 'shell.
+	(tramp-methods): Fix docstring.
+	(tramp-get-remote-tmpdir): New defun, moved from tramp-sh.el.
+	Return complete remote file name.  Handle "smb" case.  Use
+	`tramp-tmpdir', if defined for the respective method.
+	(tramp-make-tramp-temp-file): Adapt call of `tramp-get-remote-tmpdir'.
+
+	* net/tramp-compat.el (top): Require 'shell.
+
+	* net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
+	(tramp-maybe-open-connection): Use `tramp-file-name-real-host' for
+	`tramp-current-host'.
+	(tramp-get-remote-tmpdir): Remove.
+
+	* net/tramp-smb.el (tramp-methods): Add `tramp-remote-shell' and
+	`tramp-tmpdir' entries.
+	(tramp-smb-errors): Add "NT_STATUS_IMAGE_ALREADY_LOADED".
+	(tramp-smb-handle-file-attributes): Ignore errors.
+	(tramp-smb-wait-for-output): Check also for process end.
+
+2011-09-18  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+	* mail/smtpmail.el (smtpmail-via-smtp): Ignore errors that arise
+	when sending QUIT (bug#9312).
+
+2011-09-17  Chong Yidong  <cyd@stupidchicken.com>
+
+	* replace.el (occur-mode-map): Rebind occur-edit-mode to "e" (Bug#8463).
+	(occur-edit-mode-map): Bind C-c C-c to occur-cease-edit and C-o to
+	occur-mode-display-occurrence.
+	(occur-edit-mode): Add usage message.
+	(occur-cease-edit): New command.
+	(occur-after-change-function): Use text properties to find the
+	position of the prefix text.
+	(occur-engine): Set stickiness of prefix text properties.
+
+2011-09-17  Glenn Morris  <rgm@gnu.org>
+
+	* progmodes/etags.el (complete-tag):
+	Fix call to completion-in-region.  (Bug#9526)
+
+2011-09-17  Juri Linkov  <juri@jurta.org>
+
+	* textmodes/ispell.el (ispell-word): Add to the error message
+	the word, ispell program name and current dictionary (bug#9121).
+	(ispell-tex-arg-end): Capitalize "error" in the error message.
+
+2011-09-17  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* emacs-lisp/bytecomp.el (byte-compile-lapcode): Fix overflow
+	check.  (Bug#4251)
+
+2011-09-17  Juri Linkov  <juri@jurta.org>
+
+	* window.el (window-safe-min-height, window-safe-min-width):
+	Fix typos (followup to bug#9522).
+
+2011-09-17  Sven Joachim  <svenjoac@gmx.de>
+
+	* window.el (window-min-width, window-state-put): Fix typos (bug#9522).
+
+2011-09-16  Eli Zaretskii  <eliz@gnu.org>
+
+	* simple.el (line-move): If goal-column is set, move by logical
+	lines, not by display lines.  (Bug#971)
+	(next-line, previous-line, goal-column, line-move-visual): Doc fix
+	to reflect the above change.
+
+2011-09-16  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* image.el (imagemagick-register-types): Use regexp-opt.
+
+2011-09-15  Chong Yidong  <cyd@stupidchicken.com>
+
+	* window.el (display-buffer-base-action): Rename from
+	display-buffer-default-action.  Make default value empty.
+	(display-buffer-overriding-action): Convert to defvar.
+	(display-buffer-fallback-action): New var.
+
+2011-09-15  Chong Yidong  <cyd@stupidchicken.com>
+
+	* emacs-lisp/package.el (package-alist): Fix risky-local-variable
+	declaration.
+	(package--add-to-archive-contents): If there is a duplicate entry
+	with an older version, remove it.
+	(package-menu-mark-delete, package-menu-mark-install)
+	(package-menu-mark-unmark): Make unused args optional.
+	(package-menu-mark-obsolete-for-deletion):
+	Use package-menu-get-status instead of a regexp search.
+	(package-menu-get-status): Use tabulated-list-entry.
+	(package-menu-mark-upgrades): New command.
+	(package-menu-mode-map): Bind it to U.  Add it to menu bar.
+	(package-menu-execute): Do installation before deletion.
+	(package-menu-refresh, package-menu-execute): Use derived-mode-p
+	instead of checking major-mode.
+	(package-menu--find-upgrades): New function.
+
+2011-09-14  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+	* mail/smtpmail.el (smtpmail-send-command): Don't include AUTH
+	passwords in the log buffer.
+	(smtpmail-process-filter): Update the process marker so that the
+	"broken by peer" status message is inserted in the right place.
+
+2011-09-14  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* textmodes/bibtex.el (bibtex-complete-string-cleanup)
+	(bibtex-complete-crossref-cleanup): Adjust to accommodate needs of
+	bibtex-completion-at-point-function.
+	(bibtex-completion-at-point-function): Use them.
+
+	* newcomment.el (comment-add, comment-valid-prefix-p): Docfix.
+
+	* mpc.el (mpc-constraints-tag-lookup): New function.
+	(mpc-constraints-restore): Use it to make jumping to "album=Foo" apply
+	also to browser "album|playlist".
+
+2011-09-14  Juri Linkov  <juri@jurta.org>
+
+	* isearch.el (isearch-fail-pos): Add new arg `msg'.  Doc fix.
+	(isearch-edit-string): Use length of `isearch-string' when
+	`isearch-fail-pos' returns nil.
+	(isearch-message): Remove duplicate code and call
+	`isearch-fail-pos' with arg `t'.
+
+2011-09-14  Chong Yidong  <cyd@stupidchicken.com>
+
+	* replace.el (occur-mode-goto-occurrence): Don't force using other
+	window (Bug#9499).
+
+	* dired-aux.el (dired-do-chmod): Don't provide initial input.
+
+2011-09-14  Martin Rudalics  <rudalics@gmx.at>
+
+	* window.el (display-buffer-window): Remove.
+	(display-buffer-record-window): Use help-setup window parameter
+	instead of variable display-buffer-window.
+	(display-buffer-function, special-display-buffer-names)
+	(special-display-function): Mention help-setup parameter instead
+	of display-buffer-window in doc-string.
+	* help.el (help-window-setup): New argument help-window.
+	Use help-window-setup parameter instead of display-buffer-window.
+	Reword some messages.
+	(with-help-window): Pass window used for displaying the buffer
+	to help-window-setup.  Don't set display-buffer-window.
+
 2011-09-13  Glenn Morris  <rgm@gnu.org>
 
 	* emacs-lisp/debug.el (debugger-make-xrefs):
 
 2011-09-10  Reuben Thomas  <rrt@sc3d.org>
 
-	* simple.el (count-words-region): Use buffer if there's no region.
+	* simple.el (count-words-region): Use buffer if there's no region
+	(bug#9429).
 
 2011-09-09  Juri Linkov  <juri@jurta.org>
 

lisp/buff-menu.el

 		 :help ,(purecopy "Refresh the *Buffer List* buffer contents")))
     (define-key menu-map [s0] menu-bar-separator)
     (define-key menu-map [tf]
-      `(menu-item ,(purecopy "Show only file buffers") Buffer-menu-toggle-files-only
+      `(menu-item ,(purecopy "Show Only File Buffers") Buffer-menu-toggle-files-only
 		  :button (:toggle . Buffer-menu-files-only)
 		  :help ,(purecopy "Toggle whether the current buffer-menu displays only file buffers")))
     (define-key menu-map [s1] menu-bar-separator)
     ;; FIXME: The "Select" entries could use better names...
     (define-key menu-map [sel]
-      `(menu-item ,(purecopy "Select marked") Buffer-menu-select
+      `(menu-item ,(purecopy "Select Marked") Buffer-menu-select
 		 :help ,(purecopy "Select this line's buffer; also display buffers marked with `>'")))
     (define-key menu-map [bm2]
-      `(menu-item ,(purecopy "Select two") Buffer-menu-2-window
+      `(menu-item ,(purecopy "Select Two") Buffer-menu-2-window
 		 :help ,(purecopy "Select this line's buffer, with previous buffer in second window")))
     (define-key menu-map [bm1]
-      `(menu-item ,(purecopy "Select current") Buffer-menu-1-window
+      `(menu-item ,(purecopy "Select Current") Buffer-menu-1-window
 		 :help ,(purecopy "Select this line's buffer, alone, in full frame")))
     (define-key menu-map [ow]
-      `(menu-item ,(purecopy "Select in other window") Buffer-menu-other-window
+      `(menu-item ,(purecopy "Select in Other Window") Buffer-menu-other-window
 		 :help ,(purecopy "Select this line's buffer in other window, leaving buffer menu visible")))
     (define-key menu-map [tw]
-      `(menu-item ,(purecopy "Select in current window") Buffer-menu-this-window
+      `(menu-item ,(purecopy "Select in Current Window") Buffer-menu-this-window
 		 :help ,(purecopy "Select this line's buffer in this window")))
     (define-key menu-map [s2] menu-bar-separator)
     (define-key menu-map [is]
-      `(menu-item ,(purecopy "Regexp Isearch marked buffers") Buffer-menu-isearch-buffers-regexp
+      `(menu-item ,(purecopy "Regexp Isearch Marked Buffers...") Buffer-menu-isearch-buffers-regexp
 		 :help ,(purecopy "Search for a regexp through all marked buffers using Isearch")))
     (define-key menu-map [ir]
-      `(menu-item ,(purecopy "Isearch marked buffers") Buffer-menu-isearch-buffers
+      `(menu-item ,(purecopy "Isearch Marked Buffers...") Buffer-menu-isearch-buffers
 		 :help ,(purecopy "Search for a string through all marked buffers using Isearch")))
     (define-key menu-map [s3] menu-bar-separator)
     (define-key menu-map [by]
       `(menu-item ,(purecopy "Bury") Buffer-menu-bury
 		 :help ,(purecopy "Bury the buffer listed on this line")))
     (define-key menu-map [vt]
-      `(menu-item ,(purecopy "Set unmodified") Buffer-menu-not-modified
+      `(menu-item ,(purecopy "Set Unmodified") Buffer-menu-not-modified
 		 :help ,(purecopy "Mark buffer on this line as unmodified (no changes to save)")))
     (define-key menu-map [ex]
       `(menu-item ,(purecopy "Execute") Buffer-menu-execute
 		 :help ,(purecopy "Save and/or delete buffers marked with s or k commands")))
     (define-key menu-map [s4] menu-bar-separator)
     (define-key menu-map [delb]
-      `(menu-item ,(purecopy "Mark for delete and move backwards") Buffer-menu-delete-backwards
+      `(menu-item ,(purecopy "Mark for Delete and Move Backwards") Buffer-menu-delete-backwards
 		 :help ,(purecopy "Mark buffer on this line to be deleted by x command and move up one line")))
     (define-key menu-map [del]
-      `(menu-item ,(purecopy "Mark for delete") Buffer-menu-delete
+      `(menu-item ,(purecopy "Mark for Delete") Buffer-menu-delete
 		 :help ,(purecopy "Mark buffer on this line to be deleted by x command")))
 
     (define-key menu-map [sv]
-      `(menu-item ,(purecopy "Mark for save") Buffer-menu-save
+      `(menu-item ,(purecopy "Mark for Save") Buffer-menu-save
 		 :help ,(purecopy "Mark buffer on this line to be saved by x command")))
     (define-key menu-map [umk]
       `(menu-item ,(purecopy "Unmark") Buffer-menu-unmark

lisp/dired-aux.el

 			 (match-string 3 modestr)))))
 	 (modes (dired-mark-read-string
 		 "Change mode of %s to: "
-		 ;; Insert initial input if there's only one file.
-		 (unless (cadr files) default)
-		 'chmod arg files default))
+		 nil 'chmod arg files default))
 	 num-modes)
-
     (cond ((equal modes "")
 	   ;; We used to treat empty input as DEFAULT, but that is not
 	   ;; such a good idea (Bug#9361).
     (dired-run-shell-command (dired-shell-stuff-it command file-list nil))))
 
 (defun dired-mark-read-string (prompt initial op-symbol arg files
-			       &optional standard-value)
+			       &optional default-value)
   "Read args for a Dired marked-files command, prompting with PROMPT.
 Return the user input (a string).
 
 ARG is normally the prefix argument for the calling command.
 FILES should be a list of file names.
 
-STANDARD-VALUE, if non-nil, should be a \"standard\" value or
-list of such values, available via history commands.  Note that
-if the user enters empty input, this function returns the empty
-string, not STANDARD-VALUE."
+DEFAULT-VALUE, if non-nil, should be a \"standard\" value or list
+of such values, available via history commands.  Note that if the
+user enters empty input, this function returns the empty string,
+not DEFAULT-VALUE."
   (dired-mark-pop-up nil op-symbol files
 		     'read-from-minibuffer
 		     (format prompt (dired-mark-prompt arg files))
-		     initial nil nil nil standard-value))
+		     initial nil nil nil default-value))
 
 ;;; Cleaning a directory: flagging some backups for deletion.
 
       [menu-bar immediate image-dired-dired-display-image]
       '(menu-item "Display Image" image-dired-dired-display-image
                   :help "Display sized image in a separate window"))
+    (define-key map
+      [menu-bar immediate image-dired-dired-toggle-marked-thumbs]
+      '(menu-item "Toggle Image Thumbnails in This Buffer" image-dired-dired-toggle-marked-thumbs
+                  :help "Add or remove image thumbnails in front of marked file names"))
 
     (define-key map [menu-bar immediate revert-buffer]
       '(menu-item "Refresh" revert-buffer
                   :help "Add image comment to current or marked files"))
     (define-key map
       [menu-bar operate image-dired-display-thumbs]
-      '(menu-item "Display image thumbnails" image-dired-display-thumbs
+      '(menu-item "Display Image Thumbnails" image-dired-display-thumbs
                   :help "Display image thumbnails for current or marked image files"))
 
     (define-key map [menu-bar operate dashes-4]
 ;;;;;;  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" "bbc9babe193843cad535d73492326c48")
+;;;;;;  dired-diff) "dired-aux" "dired-aux.el" "0ffe89ae728efb341dfacff6c85e2ba4")
 ;;; Generated autoloads from dired-aux.el
 
 (autoload 'dired-diff "dired-aux" "\

lisp/emacs-lisp/bytecomp.el

       (setcar (cdr bytes-tail) (logand pc 255))
       (setcar bytes-tail (lsh pc -8))
       ;; FIXME: Replace this by some workaround.
-      (if (> (car bytes) 255) (error "Bytecode overflow")))
+      (if (> (car bytes-tail) 255) (error "Bytecode overflow")))
 
     (apply 'unibyte-string (nreverse bytes))))
 

lisp/emacs-lisp/debug.el

 
 (defvar inhibit-trace)                  ;Not yet implemented.
 
+(defvar debugger-args nil
+  "Arguments with which the debugger was called.
+It is a list expected to take the form (CAUSE . REST)
+where CAUSE can be:
+- debug: called for entry to a flagged function.
+- t: called because of debug-on-next-call.
+- lambda: same thing but via `funcall'.
+- exit: called because of exit of a flagged function.
+- error: called because of `debug-on-error'.")
+
 ;;;###autoload
 (setq debugger 'debug)
 ;;;###autoload
   (insert "Debugger entered")
   ;; lambda is for debug-on-call when a function call is next.
   ;; debug is for debug-on-entry function called.
-  (cond ((memq (car debugger-args) '(lambda debug))
-	 (insert "--entering a function:\n"))
-	;; Exiting a function.
-	((eq (car debugger-args) 'exit)
-	 (insert "--returning value: ")
-	 (setq debugger-value (nth 1 debugger-args))
-	 (prin1 debugger-value (current-buffer))
-	 (insert ?\n)
-	 (delete-char 1)
-	 (insert ? )
-	 (beginning-of-line))
-	;; Debugger entered for an error.
-	((eq (car debugger-args) 'error)
-	 (insert "--Lisp error: ")
-	 (prin1 (nth 1 debugger-args) (current-buffer))
-	 (insert ?\n))
-	;; debug-on-call, when the next thing is an eval.
-	((eq (car debugger-args) t)
-	 (insert "--beginning evaluation of function call form:\n"))
-	;; User calls debug directly.
-	(t
-	 (insert ": ")
-	 (prin1 (if (eq (car debugger-args) 'nil)
-		    (cdr debugger-args) debugger-args)
-		(current-buffer))
-	 (insert ?\n)))
+  (pcase (car debugger-args)
+    ((or `lambda `debug)
+     (insert "--entering a function:\n"))
+    ;; Exiting a function.
+    (`exit
+     (insert "--returning value: ")
+     (setq debugger-value (nth 1 debugger-args))
+     (prin1 debugger-value (current-buffer))
+     (insert ?\n)
+     (delete-char 1)
+     (insert ? )
+     (beginning-of-line))
+    ;; Debugger entered for an error.
+    (`error
+     (insert "--Lisp error: ")
+     (prin1 (nth 1 debugger-args) (current-buffer))
+     (insert ?\n))
+    ;; debug-on-call, when the next thing is an eval.
+    (`t
+     (insert "--beginning evaluation of function call form:\n"))
+    ;; User calls debug directly.
+    (_
+     (insert ": ")
+     (prin1 (if (eq (car debugger-args) 'nil)
+                (cdr debugger-args) debugger-args)
+            (current-buffer))
+     (insert ?\n)))
   ;; After any frame that uses eval-buffer,
   ;; insert a line that states the buffer position it's reading at.
   (save-excursion
 This is only useful when the value returned from the debugger
 will be used, such as in a debug on exit from a frame."
   (interactive "XReturn value (evaluated): ")
+  (when (memq (car debugger-args) '(t lambda error debug))
+    (error "Cannot return a value %s"
+           (if (eq (car debugger-args) 'error)
+               "from an error" "at function entrance")))
   (setq debugger-value val)
   (princ "Returning " t)
   (prin1 debugger-value)

lisp/emacs-lisp/lisp-mode.el

       `(menu-item ,(purecopy "Untrace All") untrace-all
 		  :help ,(purecopy "Untrace all currently traced functions")))
     (define-key tracing-map [tr-uf]
-      `(menu-item ,(purecopy "Untrace function...") untrace-function
+      `(menu-item ,(purecopy "Untrace Function...") untrace-function
 		  :help ,(purecopy "Untrace function, and possibly activate all remaining advice")))
     (define-key tracing-map [tr-sep] menu-bar-separator)
     (define-key tracing-map [tr-q]
       `(menu-item ,(purecopy "Byte-compile and Load") emacs-lisp-byte-compile-and-load
 		  :help ,(purecopy "Byte-compile the current file (if it has changed), then load compiled code")))
     (define-key menu-map [byte-compile]
-      `(menu-item ,(purecopy "Byte-compile this File") emacs-lisp-byte-compile
+      `(menu-item ,(purecopy "Byte-compile This File") emacs-lisp-byte-compile
 		  :help ,(purecopy "Byte compile the file containing the current buffer")))
     (define-key menu-map [separator-eval] menu-bar-separator)
     (define-key menu-map [ielm]
       `(menu-item ,(purecopy "Evaluate Defun") eval-defun
 		  :help ,(purecopy "Evaluate the top-level form containing point, or after point")))
     (define-key menu-map [eval-print-last-sexp]
-      `(menu-item ,(purecopy "Evaluate and print") eval-print-last-sexp
+      `(menu-item ,(purecopy "Evaluate and Print") eval-print-last-sexp
 		  :help ,(purecopy "Evaluate sexp before point; print value into current buffer")))
     (define-key menu-map [edebug-defun-lisp-interaction]
       `(menu-item ,(purecopy "Instrument Function for Debugging") edebug-defun

lisp/emacs-lisp/package.el

 This variable is set automatically by `package-load-descriptor',
 called via `package-initialize'.  To change which packages are
 loaded and/or activated, customize `package-load-list'.")
-(put 'package-archive-contents 'risky-local-variable t)
+(put 'package-alist 'risky-local-variable t)
 
 (defvar package-activated-list nil
   "List of the names of currently activated packages.")
   "Add the PACKAGE from the given ARCHIVE if necessary.
 Also, add the originating archive to the end of the package vector."
   (let* ((name    (car package))
-         (version (aref (cdr package) 0))
-         (entry   (cons (car package)
+         (version (package-desc-vers (cdr package)))
+         (entry   (cons name
 			(vconcat (cdr package) (vector archive))))
-         (existing-package (cdr (assq name package-archive-contents))))
-    (when (or (not existing-package)
-              (version-list-< (aref existing-package 0) version))
-      (add-to-list 'package-archive-contents entry))))
+         (existing-package (assq name package-archive-contents)))
+    (cond ((not existing-package)
+	   (add-to-list 'package-archive-contents entry))
+	  ((version-list-< (package-desc-vers (cdr existing-package))
+			   version)
+	   ;; Replace the entry with this one.
+	   (setq package-archive-contents
+		 (cons entry
+		       (delq existing-package
+			     package-archive-contents)))))))
 
 (defun package-download-transaction (package-list)
   "Download and install all the packages in PACKAGE-LIST.
     (define-key map "\177" 'package-menu-backup-unmark)
     (define-key map "d" 'package-menu-mark-delete)
     (define-key map "i" 'package-menu-mark-install)
+    (define-key map "U" 'package-menu-mark-upgrades)
     (define-key map "r" 'package-menu-refresh)
     (define-key map "~" 'package-menu-mark-obsolete-for-deletion)
     (define-key map "x" 'package-menu-execute)
       '(menu-item "Unmark" package-menu-mark-unmark
 		  :help "Clear any marks on a package and move to the next line"))
     (define-key menu-map [munm]
-      '(menu-item "Unmark backwards" package-menu-backup-unmark
+      '(menu-item "Unmark Backwards" package-menu-backup-unmark
 		  :help "Back up one line and clear any marks on that package"))
     (define-key menu-map [md]
-      '(menu-item "Mark for deletion" package-menu-mark-delete
+      '(menu-item "Mark for Deletion" package-menu-mark-delete
 		  :help "Mark a package for deletion and move to the next line"))
     (define-key menu-map [mi]
-      '(menu-item "Mark for install" package-menu-mark-install
+      '(menu-item "Mark for Install" package-menu-mark-install
 		  :help "Mark a package for installation and move to the next line"))
+    (define-key menu-map [mupgrades]
+      '(menu-item "Mark Upgradable Packages" package-menu-mark-upgrades
+		  :help "Mark packages that have a newer version for upgrading"))
     (define-key menu-map [s3] '("--"))
     (define-key menu-map [mg]
-      '(menu-item "Update package list" revert-buffer
+      '(menu-item "Update Package List" revert-buffer
 		  :help "Update the list of packages"))
     (define-key menu-map [mr]
-      '(menu-item "Refresh package list" package-menu-refresh
+      '(menu-item "Refresh Package List" package-menu-refresh
 		  :help "Download the ELPA archive"))
     (define-key menu-map [s4] '("--"))
     (define-key menu-map [mt]
-      '(menu-item "Mark obsolete packages" package-menu-mark-obsolete-for-deletion
+      '(menu-item "Mark Obsolete Packages" package-menu-mark-obsolete-for-deletion
 		  :help "Mark all obsolete packages for deletion"))
     (define-key menu-map [mx]
-      '(menu-item "Execute actions" package-menu-execute
+      '(menu-item "Execute Actions" package-menu-execute
 		  :help "Perform all the marked actions"))
     (define-key menu-map [s5] '("--"))
     (define-key menu-map [mh]
 This fetches the contents of each archive specified in
 `package-archives', and then refreshes the package menu."
   (interactive)
-  (unless (eq major-mode 'package-menu-mode)
+  (unless (derived-mode-p 'package-menu-mode)
     (error "The current buffer is not a Package Menu"))
   (package-refresh-contents)
   (package-menu--generate t t))
 	(describe-package package))))
 
 ;; fixme numeric argument
-(defun package-menu-mark-delete (num)
+(defun package-menu-mark-delete (&optional num)
   "Mark a package for deletion and move to the next line."
   (interactive "p")
   (if (member (package-menu-get-status) '("installed" "obsolete"))
       (tabulated-list-put-tag "D" t)
     (forward-line)))
 
-(defun package-menu-mark-install (num)
+(defun package-menu-mark-install (&optional num)
   "Mark a package for installation and move to the next line."
   (interactive "p")
   (if (string-equal (package-menu-get-status) "available")
       (tabulated-list-put-tag "I" t)
     (forward-line)))
 
-(defun package-menu-mark-unmark (num)
+(defun package-menu-mark-unmark (&optional num)
   "Clear any marks on a package and move to the next line."
   (interactive "p")
   (tabulated-list-put-tag " " t))
   (interactive)
   (save-excursion
     (goto-char (point-min))
-    (forward-line 2)
     (while (not (eobp))
-      (if (looking-at ".*\\s obsolete\\s ")
+      (if (equal (package-menu-get-status) "obsolete")
 	  (tabulated-list-put-tag "D" t)
 	(forward-line 1)))))
 
   'package-menu-view-commentary 'package-menu-describe-package "24.1")
 
 (defun package-menu-get-status ()
-  (save-excursion
-    (if (looking-at ". [^ \t]*[ \t]*[^ \t]*[ \t]*\\([^ \t]*\\)")
-	(match-string 1)
+  (let* ((pkg (tabulated-list-get-id))
+	 (entry (and pkg (assq pkg tabulated-list-entries))))
+    (if entry
+	(aref (cadr entry) 2)
       "")))
 
+(defun package-menu--find-upgrades ()
+  (let (installed available upgrades)
+    ;; Build list of installed/available packages in this buffer.
+    (dolist (entry tabulated-list-entries)
+      ;; ENTRY is ((NAME . VERSION) [NAME VERSION STATUS DOC])
+      (let ((pkg (car entry))
+	    (status (aref (cadr entry) 2))
+	    old)
+	(cond ((equal status "installed")
+	       (push pkg installed))
+	      ((equal status "available")
+	       (push pkg available)))))
+    ;; Loop through list of installed packages, finding upgrades
+    (dolist (pkg installed)
+      (let ((avail-pkg (assq (car pkg) available)))
+	(and avail-pkg
+	     (version-list-< (cdr pkg) (cdr avail-pkg))
+	     (push avail-pkg upgrades))))
+    upgrades))
+
+(defun package-menu-mark-upgrades ()
+  "Mark all upgradable packages in the Package Menu.
+For each installed package with a newer version available, place
+an (I)nstall flag on the available version and a (D)elete flag on
+the installed version.  A subsequent \\[package-menu-execute]
+call will upgrade the package."
+  (interactive)
+  (unless (derived-mode-p 'package-menu-mode)
+    (error "The current buffer is not a Package Menu"))
+  (let ((upgrades (package-menu--find-upgrades)))
+    (if (null upgrades)
+	(message "No packages to upgrade.")
+      (widen)
+      (save-excursion
+	(goto-char (point-min))
+	(while (not (eobp))
+	  (let* ((pkg (tabulated-list-get-id))
+		 (upgrade (assq (car pkg) upgrades)))
+	    (cond ((null upgrade)
+		   (forward-line 1))
+		  ((equal pkg upgrade)
+		   (package-menu-mark-install))
+		  (t
+		   (package-menu-mark-delete))))))
+      (message "%d package%s marked for upgrading."
+	       (length upgrades)
+	       (if (= (length upgrades) 1) "" "s")))))
+
 (defun package-menu-execute ()
   "Perform marked Package Menu actions.
 Packages marked for installation are downloaded and installed;
 packages marked for deletion are removed."
   (interactive)
-  (unless (eq major-mode 'package-menu-mode)
+  (unless (derived-mode-p 'package-menu-mode)
     (error "The current buffer is not in Package Menu mode"))
   (let (install-list delete-list cmd id)
     (save-excursion
 		((eq cmd ?I)
 		 (push (car id) install-list))))
 	(forward-line)))
+    (when install-list
+      (if (yes-or-no-p
+	   (if (= (length install-list) 1)
+	       (format "Install package `%s'? " (car install-list))
+	     (format "Install these %d packages (%s)? "
+		     (length install-list)
+		     (mapconcat 'symbol-name install-list ", "))))
+	  (mapc 'package-install install-list)))
     ;; Delete packages, prompting if necessary.
     (when delete-list
       (if (yes-or-no-p
 		(package-delete (car elt) (cdr elt))
 	      (error (message (cadr err)))))
 	(error "Aborted")))
-    (when install-list
-      (if (yes-or-no-p
-	   (if (= (length install-list) 1)
-	       (format "Install package `%s'? " (car install-list))
-	     (format "Install these %d packages (%s)? "
-		     (length install-list)
-		     (mapconcat 'symbol-name install-list ", "))))
-	  (mapc 'package-install install-list)))
     ;; If we deleted anything, regenerate `package-alist'.  This is done
     ;; automatically if we installed a package.
     (and delete-list (null install-list)
       (package-menu--generate nil t))
     ;; The package menu buffer has keybindings.  If the user types
     ;; `M-x list-packages', that suggests it should become current.
-    (switch-to-buffer buf)))
+    (switch-to-buffer buf))
+  (let ((upgrades (package-menu--find-upgrades)))
+    (if upgrades
+	(message "%d package%s can be upgraded; type `%s' to mark them for upgrading."
+		 (length upgrades)
+		 (if (= (length upgrades) 1) "" "s")
+		 (substitute-command-keys "\\[package-menu-mark-upgrades]")))))
 
 ;;;###autoload
 (defalias 'package-list-packages 'list-packages)
 		  :help "Encrypt FILE for RECIPIENTS"))
     (define-key menu-map [separator-epa-key-list] '(menu-item "--"))
     (define-key menu-map [epa-key-list-delete-keys]
-      '(menu-item "Delete keys" epa-delete-keys
+      '(menu-item "Delete Keys" epa-delete-keys
 		  :help "Delete Marked Keys"))
     (define-key menu-map [epa-key-list-import-keys]
       '(menu-item "Import Keys" epa-import-keys
 
 See also `auto-mode-alist'.")
 
-(defvar inhibit-first-line-modes-regexps (mapcar 'purecopy '("\\.tar\\'" "\\.tgz\\'"))
+(defvar inhibit-first-line-modes-regexps
+  (mapcar 'purecopy '("\\.tar\\'" "\\.tgz\\'" "\\.tiff?\\'"
+		      "\\.gif\\'" "\\.png\\'" "\\.jpe?g\\'"))
   "List of regexps; if one matches a file name, don't look for `-*-'.")
 
 (defvar inhibit-first-line-modes-suffixes nil
 and VAL is the specified value.  Ignores any specification for
 `mode:' and `coding:' (which should have already been handled
 by `set-auto-mode' and `set-auto-coding', respectively).
-Throws an error if the -*- line is malformed.
+Return nil if the -*- line is malformed.
 
 If MODE-ONLY is non-nil, just returns the symbol specifying the
 mode, if there is one, otherwise nil."
-  (save-excursion
-    (goto-char (point-min))
-    (let ((end (set-auto-mode-1))
-	  result)
-      (cond ((not end)
-	     nil)
-	    ((looking-at "[ \t]*\\([^ \t\n\r:;]+\\)\\([ \t]*-\\*-\\)")
-	     ;; Simple form: "-*- MODENAME -*-".
-	     (if mode-only
-		 (intern (concat (match-string 1) "-mode"))))
-	    (t
-	     ;; Hairy form: '-*-' [ <variable> ':' <value> ';' ]* '-*-'
-	     ;; (last ";" is optional).
-	     ;; If MODE-ONLY, just check for `mode'.
-	     ;; Otherwise, parse the -*- line into the RESULT alist.
-	     (while (and (or (not mode-only)
-			     (not result))
-			 (< (point) end))
-	       (or (looking-at "[ \t]*\\([^ \t\n:]+\\)[ \t]*:[ \t]*")
-		   (error "Malformed -*- line"))
-	       (goto-char (match-end 0))
-	       ;; There used to be a downcase here,
-	       ;; but the manual didn't say so,
-	       ;; and people want to set var names that aren't all lc.
-	       (let* ((key (intern (match-string 1)))
-		      (val (save-restriction
-			     (narrow-to-region (point) end)
-			     (let ((read-circle nil))
-			       (read (current-buffer)))))
-		      ;; It is traditional to ignore
-		      ;; case when checking for `mode' in set-auto-mode,
-		      ;; so we must do that here as well.
-		      ;; That is inconsistent, but we're stuck with it.
-		      ;; The same can be said for `coding' in set-auto-coding.
-		      (keyname (downcase (symbol-name key))))
-		 (if mode-only
-		     (and (equal keyname "mode")
-			  (setq result
-				(intern (concat (downcase (symbol-name val))
-						"-mode"))))
-		   (or (equal keyname "coding")
-		       (condition-case nil
-			   (push (cons (cond ((eq key 'eval) 'eval)
-					     ;; Downcase "Mode:".
-					     ((equal keyname "mode") 'mode)
-					     (t (indirect-variable key)))
-				       val) result)
-			 (error nil))))
-		 (skip-chars-forward " \t;")))
-	     result)))))
+  (catch 'malformed-line
+    (save-excursion
+      (goto-char (point-min))
+      (let ((end (set-auto-mode-1))
+	    result)
+	(cond ((not end)
+	       nil)
+	      ((looking-at "[ \t]*\\([^ \t\n\r:;]+\\)\\([ \t]*-\\*-\\)")
+	       ;; Simple form: "-*- MODENAME -*-".
+	       (if mode-only
+		   (intern (concat (match-string 1) "-mode"))))
+	      (t
+	       ;; Hairy form: '-*-' [ <variable> ':' <value> ';' ]* '-*-'
+	       ;; (last ";" is optional).
+	       ;; If MODE-ONLY, just check for `mode'.
+	       ;; Otherwise, parse the -*- line into the RESULT alist.
+	       (while (and (or (not mode-only)
+			       (not result))
+			   (< (point) end))
+		 (unless (looking-at "[ \t]*\\([^ \t\n:]+\\)[ \t]*:[ \t]*")
+		   (message "Malformed mode-line")
+		   (throw 'malformed-line nil))
+		 (goto-char (match-end 0))
+		 ;; There used to be a downcase here,
+		 ;; but the manual didn't say so,
+		 ;; and people want to set var names that aren't all lc.
+		 (let* ((key (intern (match-string 1)))
+			(val (save-restriction
+			       (narrow-to-region (point) end)
+			       (let ((read-circle nil))
+				 (read (current-buffer)))))
+			;; It is traditional to ignore
+			;; case when checking for `mode' in set-auto-mode,
+			;; so we must do that here as well.
+			;; That is inconsistent, but we're stuck with it.
+			;; The same can be said for `coding' in set-auto-coding.
+			(keyname (downcase (symbol-name key))))
+		   (if mode-only
+		       (and (equal keyname "mode")
+			    (setq result
+				  (intern (concat (downcase (symbol-name val))
+						  "-mode"))))
+		     (or (equal keyname "coding")
+			 (condition-case nil
+			     (push (cons (cond ((eq key 'eval) 'eval)
+					       ;; Downcase "Mode:".
+					       ((equal keyname "mode") 'mode)
+					       (t (indirect-variable key)))
+					 val) result)
+			   (error nil))))
+		   (skip-chars-forward " \t;")))
+	       result))))))
 
 (defun hack-local-variables-filter (variables dir-name)
   "Filter local variable settings, querying the user if necessary.

lisp/gnus/ChangeLog

+2011-09-20  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* gnus-fun.el (gnus-convert-image-to-x-face-command): Doc fix.
+
+2011-09-18  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+	* mm-decode.el (mm-inline-media-tests): Fix typo in regexp.
+
+2011-09-19  Julien Danjou  <julien@danjou.info>
+
+	* auth-source.el (auth-source-netrc-parse): Use an obfuscation method
+	which work with things that are not ASCII.
+
+2011-09-17  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+	* mm-decode.el (mm-inline-media-tests): Support imagemagick images.
+
+2011-09-15  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+	* gnus-sum.el (gnus-summary-read-group-1): Bump the "Retrieving"
+	message level.
+
+2011-09-15  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* message.el (message-read-from-minibuffer): Make abbrev expansion work.
+
 2011-09-12  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 	* gnus.el (gnus-interactive-exit): Update defcustom spec.

lisp/gnus/auth-source.el

             ;; (note for the irony-impaired: they are just obfuscated)
             (aput 'auth-source-netrc-cache file
                   (list :mtime (nth 5 (file-attributes file))
-                        :secret (lexical-let ((v (rot13-string
-                                                  (base64-encode-string
-                                                   (buffer-string)))))
-                                  (lambda () (base64-decode-string
-                                              (rot13-string v)))))))
+                        :secret (lexical-let ((v (mapcar '1+ (buffer-string))))
+                                  (lambda () (apply 'string (mapcar '1- v)))))))
           (goto-char (point-min))
           ;; Go through the file, line by line.
           (while (and (not (eobp))

lisp/gnus/gnus-fun.el

   "convert -scale 48x48! %s xbm:- | xbm2xface.pl"
   "Command for converting an image to an X-Face.
 The command must take a image filename (use \"%s\") as input.
-The output must be the X-Face header data on stdout in PNG format."
+The output must be the X-Face header data on stdout."
   :version "22.1"
   :group 'gnus-fun
   :type '(choice (const :tag "giftopnm, netpbm (GIF input only)"

lisp/gnus/gnus-sum.el

   ;;  (when (and (not (gnus-group-native-p group))
   ;;	     (not (gnus-gethash group gnus-newsrc-hashtb)))
   ;;    (error "Dead non-native groups can't be entered"))
-  (gnus-message 5 "Retrieving newsgroup: %s..."
+  (gnus-message 7 "Retrieving newsgroup: %s..."
 		(gnus-group-decoded-name group))
   (let* ((new-group (gnus-summary-setup-buffer group))
 	 (quit-config (gnus-group-quit-config group))

lisp/gnus/message.el

 (defun message-read-from-minibuffer (prompt &optional initial-contents)
   "Read from the minibuffer while providing abbrev expansion."
   (if (fboundp 'mail-abbrevs-setup)
-      (let ((mail-abbrev-mode-regexp "")
-	    (minibuffer-setup-hook 'mail-abbrevs-setup)
+      (let ((minibuffer-setup-hook 'mail-abbrevs-setup)
 	    (minibuffer-local-map message-minibuffer-local-map))
-	(read-from-minibuffer prompt initial-contents))
+	(flet ((mail-abbrev-in-expansion-header-p nil t))
+	  (read-from-minibuffer prompt initial-contents)))
     (let ((minibuffer-setup-hook 'mail-abbrev-minibuffer-setup-hook)
 	  (minibuffer-local-map message-minibuffer-local-map))
       (read-string prompt initial-contents))))

lisp/gnus/mm-decode.el

     ("image/tiff"
      mm-inline-image
      (lambda (handle)
-       (mm-valid-and-fit-image-p 'tiff handle)) )
+       (mm-valid-and-fit-image-p 'tiff handle)))
     ("image/xbm"
      mm-inline-image
      (lambda (handle)
     ("multipart/alternative" ignore identity)
     ("multipart/mixed" ignore identity)
     ("multipart/related" ignore identity)
+    ("image/.*"
+     mm-inline-image
+     (lambda (handle)
+       (and (mm-valid-image-format-p 'imagemagick)
+	    (mm-with-unibyte-buffer
+	      (mm-insert-part handle)
+	      (let ((image
+		     (ignore-errors
+		       (if (fboundp 'create-image)
+			   (create-image (buffer-string) 'imagemagick 'data-p)
+			 (mm-create-image-xemacs type)))))
+		(when image
+		  (setcar (cdr handle) (list "image/imagemagick"))
+		  (mm-image-fit-p handle)))))))
     ;; Disable audio and image
     ("audio/.*" ignore ignore)
     ("image/.*" ignore ignore)

lisp/gnus/mm-view.el

     (put-image
      (let ((image (mm-get-image handle)))
        (if (eq mm-inline-large-images 'resize)
-           (gnus-rescale-image image
-                               (let ((edges (gnus-window-inside-pixel-edges
-                                             (get-buffer-window (current-buffer)))))
-                                 (cons (truncate (* mm-inline-large-images-proportion
-                                                    (- (nth 2 edges) (nth 0 edges))))
-                                       (truncate (* mm-inline-large-images-proportion
-                                                    (- (nth 3 edges) (nth 1 edges)))))))
+           (gnus-rescale-image
+	    image
+	    (let ((edges (gnus-window-inside-pixel-edges
+			  (get-buffer-window (current-buffer)))))
+	      (cons (truncate (* mm-inline-large-images-proportion
+				 (- (nth 2 edges) (nth 0 edges))))
+		    (truncate (* mm-inline-large-images-proportion
+				 (- (nth 3 edges) (nth 1 edges)))))))
          image))
      b)
     (insert "\n\n")
     (message "%s"
      (substitute-command-keys (concat quit-part scroll-part)))))
 
-(defun help-window-setup ()
+(defun help-window-setup (help-window)
   "Set up help window for `with-help-window'.
-This relies on `display-buffer-window' being correctly set up by
-`display-buffer'."
-  (let* ((help-window (car-safe display-buffer-window))
-	 (help-buffer (when (window-live-p help-window)
+HELP-WINDOW is the window used for displaying the help buffer."
+  (let* ((help-buffer (when (window-live-p help-window)
 			(window-buffer help-window)))
-	 (help-value (cdr-safe display-buffer-window)))
+	 (help-setup (when (window-live-p help-window)
+		       (window-parameter help-window 'help-setup))))
     (when help-buffer
       ;; Handle `help-window-point-marker'.
       (when (eq (marker-buffer help-window-point-marker) help-buffer)
       (cond
        ((or (eq help-window (selected-window))
 	    (and (or (eq help-window-select t)
+		     (eq help-setup 'new-frame)
 		     (and (eq help-window-select 'other)
 			  (eq (window-frame help-window) (selected-frame))
 			  (> (length (window-list nil 'no-mini)) 2)))
 	;; The help window is or gets selected ...
 	(help-window-display-message
 	 (cond
-	  ((eq help-value 'new-window)
+	  ((eq help-setup 'new-window)
 	   ;; ... and is new, ...
-	   "Type \"q\" to delete this window")
-	  ((eq help-value 'new-frame)
-	   ;; ... is on a new frame ...
-	   "Type \"q\" to delete this frame")
-	  ((eq help-value 'reuse-other-window)
+	   "Type \"q\" to delete help window")
+	  ((eq help-setup 'new-frame)
+	   "Type \"q\" to delete help frame")
+	  ((eq help-setup 'reuse-other)
 	   ;; ... or displayed some other buffer before.
 	   "Type \"q\" to restore previous buffer"))
 	 help-window t))
 	;; other one is the selected one.
 	(help-window-display-message
 	 (cond
-	  ((eq help-value 'new-window)
+	  ((eq help-setup 'new-window)
 	   "Type \\[delete-other-windows] to delete the help window")
-	  ((eq help-value 'reuse-other-window)
-	   "Type \"q\" in other window to quit"))
+	  ((eq help-setup 'reuse-other)
+	   "Type \"q\" in help window to restore its previous buffer"))
 	 help-window 'other))
        (t
-	;; Not much to say here.
+	;; The help window is not selected ...
 	(help-window-display-message
-	 "Type \"q\" in help window to quit" help-window))))))
+	 (cond
+	  ((eq help-setup 'new-window)
+	   ;; ... and is new, ...
+	   "Type \"q\" in help window to delete it")
+	  ((eq help-setup 'reuse-other)
+	   ;; ... or displayed some other buffer before.
+	   "Type \"q\" in help window to restore previous buffer"))
+	 help-window))))))
 
 ;; `with-help-window' is a wrapper for `with-output-to-temp-buffer'
 ;; providing the following additional twists:
 variable `temp-buffer-show-specifiers' to an appropriate value."
   (declare (indent 1) (debug t))
   `(progn
-     ;; Reset `display-buffer-window': `display-buffer' is
-     ;; supposed to set this to the window displaying the buffer plus
-     ;; some additional information.
-     (setq display-buffer-window nil)
      ;; Make `help-window-point-marker' point nowhere.  The only place
      ;; where this should be set to a buffer position is within BODY.
      (set-marker help-window-point-marker nil)
-     (prog1
-	 ;; Return value returned by `with-output-to-temp-buffer'.
-	 (with-output-to-temp-buffer ,buffer-name
-	   (progn ,@body))
-       (when display-buffer-window (help-window-setup)))))
+     (let* (help-window
+            (temp-buffer-show-hook
+             (cons (lambda () (setq help-window (selected-window)))
+                   temp-buffer-show-hook)))
+       ;; Return value returned by `with-output-to-temp-buffer'.
+       (prog1
+	   (with-output-to-temp-buffer ,buffer-name
+	     (progn ,@body))
+	 (help-window-setup help-window)))))
 
 ;; Called from C, on encountering `help-char' when reading a char.
 ;; Don't print to *Help*; that would clobber Help history.

lisp/icomplete.el

   (if icomplete-mode
       ;; The following is not really necessary after first time -
       ;; no great loss.
-      (progn
-	(setq completion-show-inline-help nil)
-	(add-hook 'minibuffer-setup-hook 'icomplete-minibuffer-setup))
-    (remove-hook 'minibuffer-setup-hook 'icomplete-minibuffer-setup)
-    (setq completion-show-inline-help t)))
+      (add-hook 'minibuffer-setup-hook 'icomplete-minibuffer-setup)
+    (remove-hook 'minibuffer-setup-hook 'icomplete-minibuffer-setup)))
 
 ;;;_ > icomplete-simple-completing-p ()
 (defun icomplete-simple-completing-p ()
   "Run in minibuffer on activation to establish incremental completion.
 Usually run by inclusion in `minibuffer-setup-hook'."
   (when (and icomplete-mode (icomplete-simple-completing-p))
+    (set (make-local-variable 'completion-show-inline-help) nil)
     (add-hook 'pre-command-hook
 	      (lambda () (run-hooks 'icomplete-pre-command-hook))
 	      nil t)

lisp/image-mode.el

 	(buffer-undo-list t)
 	(modified (buffer-modified-p)))
     (remove-list-of-text-properties (point-min) (point-max)
-				    '(display intangible read-nonsticky
+				    '(display read-nonsticky ;; intangible
 					      read-only front-sticky))
     (set-buffer-modified-p modified)
     (if (called-interactively-p 'any)
     (setq image (append image (image-transform-properties image)))
     (setq props
 	  `(display ,image
-		    intangible ,image
-		    rear-nonsticky (display intangible)
+		    ;; intangible ,image
+		    rear-nonsticky (display) ;; intangible
 		    read-only t front-sticky (read-only)))
 
     (let ((buffer-file-truename nil)) ; avoid changing dir mtime by lock_file
 
 If Emacs is compiled without ImageMagick support, do nothing."
   (when (fboundp 'imagemagick-types)
-    (let ((im-types (imagemagick-types)))
-      (dolist (im-inhibit imagemagick-types-inhibit)
-	(setq im-types (delq im-inhibit im-types)))
-      (dolist (im-type im-types)
-	(let ((extension
-	       (concat "\\." (downcase (symbol-name im-type))
-		       "\\'")))
-	  (push (cons extension 'image-mode) auto-mode-alist)
-	  (push (cons extension 'imagemagick)
-		image-type-file-name-regexps))))))
+    (let ((im-types '()))
+      (dolist (im-type (imagemagick-types))
+        (unless (memq im-type imagemagick-types-inhibit)
+          (push (downcase (symbol-name im-type)) im-types)))
+      (let ((extension (concat "\\." (regexp-opt im-types) "\\'")))
+        (push (cons extension 'image-mode) auto-mode-alist)
+        (push (cons extension 'imagemagick)
+              image-type-file-name-regexps)))))
 
 (provide 'image)
 
 	  (condition-case ()
 	      (if (and (re-search-forward
 			"makeinfo[ \n]version[ \n]\\([0-9]+.[0-9]+\\)"
-			(line-beginning-position 3) t)
+			(line-beginning-position 4) t)
 		       (not (version< (match-string 1) "4.7")))
 		  (setq found t))
 	    (error nil))
       )
     (replace-regexp-in-string
      "[ \n]+" " "
-     (or (match-string-no-properties 2)
+     (or (and (not (equal (match-string-no-properties 2) ""))
+	      (match-string-no-properties 2))
 	 ;; If the node name is the menu entry name (using `entry::').
 	 (buffer-substring-no-properties
 	  (match-beginning 0) (1- (match-beginning 1)))))))
 	  ;; so we can scroll back through it.
 	  (goto-char (point-max)))
 	 ;; Keep going down, as long as there are nested menu nodes.
-	 (while (Info-no-error
-		 (Info-last-menu-item)
-		 ;; If we go down a menu item, go to the end of the node
-		 ;; so we can scroll back through it.
-		 (goto-char (point-max))))
+	 (let (Info-history) ; Don't add intermediate nodes to the history.
+	   (while (Info-no-error
+		   (Info-last-menu-item)
+		   ;; If we go down a menu item, go to the end of the node
+		   ;; so we can scroll back through it.
+		   (goto-char (point-max)))))
 	 (recenter -1))
 	((and (Info-no-error (Info-extract-pointer "prev"))
 	      (not (equal (Info-extract-pointer "up")
 			  (Info-extract-pointer "prev"))))
 	 (Info-no-error (Info-prev))
 	 (goto-char (point-max))
-	 (while (Info-no-error
-		 (Info-last-menu-item)
-		 ;; If we go down a menu item, go to the end of the node
-		 ;; so we can scroll back through it.
-		 (goto-char (point-max))))
+	 (let (Info-history) ; Don't add intermediate nodes to the history.
+	   (while (Info-no-error
+		   (Info-last-menu-item)
+		   ;; If we go down a menu item, go to the end of the node
+		   ;; so we can scroll back through it.
+		   (goto-char (point-max)))))
 	 (recenter -1))
 	((Info-no-error (Info-up t))
 	 (goto-char (point-min))
 (defvar tool-bar-map)
 (defvar bookmark-make-record-function)
 
+(defvar Info-mode-syntax-table
+  (let ((st (copy-syntax-table text-mode-syntax-table)))
+    ;; Use punctuation syntax for apostrophe because of
+    ;; extensive use of quotes like `this' in Info manuals.
+    (modify-syntax-entry ?' "." st)
+    st)
+  "Syntax table used in `Info-mode'.")
+
 ;; Autoload cookie needed by desktop.el
 ;;;###autoload
 (define-derived-mode Info-mode nil "Info"
 \\[clone-buffer]	Select a new cloned Info buffer in another window.
 \\[universal-argument] \\[info]	Move to new Info file with completion.
 \\[universal-argument] N \\[info]	Select Info buffer with prefix number in the name *info*<N>."
-  :syntax-table text-mode-syntax-table
+  :syntax-table Info-mode-syntax-table
   :abbrev-table text-mode-abbrev-table
   (setq tab-width 8)
   (add-hook 'activate-menubar-hook 'Info-menu-update nil t)
 
 (defvar minibuffer-history-symbol) ;; from external package gmhist.el
 
-(defun isearch-fail-pos ()
-  "Position of first mismatch in search string, or its length if none."
-  (let ((cmds isearch-cmds))
-    (if (and isearch-success (not isearch-error))
-        (length isearch-message)
+(defun isearch-fail-pos (&optional msg)
+  "Return position of first mismatch in search string, or nil if none.
+If MSG is non-nil, use `isearch-message', otherwise `isearch-string'."
+  (let ((cmds isearch-cmds)
+	(curr-msg (if msg isearch-message isearch-string))
+	succ-msg)
+    (when (or (not isearch-success) isearch-error)
       (while (or (not (isearch-success-state (car cmds)))
                  (isearch-error-state (car cmds)))
         (pop cmds))
-      (let ((succ-msg (and cmds (isearch-message-state (car cmds)))))
-        (if (and (stringp succ-msg)
-                 (< (length succ-msg) (length isearch-message))
-                 (equal succ-msg
-                        (substring isearch-message 0 (length succ-msg))))
-            (length succ-msg)
-          0)))))
+      (setq succ-msg (and cmds (if msg (isearch-message-state (car cmds))
+				 (isearch-string-state (car cmds)))))
+      (if (and (stringp succ-msg)
+	       (< (length succ-msg) (length curr-msg))
+	       (equal succ-msg
+		      (substring curr-msg 0 (length succ-msg))))
+	  (length succ-msg)
+	0))))
 
 (defun isearch-edit-string ()
   "Edit the search string in the minibuffer.
 	      (isearch-new-message isearch-message)
 	      (isearch-new-forward isearch-forward)
 	      (isearch-new-word isearch-word)
+	      (isearch-new-case-fold isearch-case-fold-search)
 
 	      (isearch-regexp isearch-regexp)
 	      (isearch-op-fun isearch-op-fun)
 		(setq isearch-new-string
                       (read-from-minibuffer
                        (isearch-message-prefix nil nil isearch-nonincremental)
-		       (cons isearch-string (1+ (isearch-fail-pos)))
+		       (cons isearch-string (1+ (or (isearch-fail-pos)
+						    (length isearch-string))))
                        minibuffer-local-isearch-map nil
                        (if isearch-regexp
 			   (cons 'regexp-search-ring
 	    (setq isearch-string isearch-new-string
 		  isearch-message isearch-new-message
 		  isearch-forward isearch-new-forward
-		  isearch-word isearch-new-word))
+		  isearch-word isearch-new-word
+		  isearch-case-fold-search isearch-new-case-fold))
 
 	  ;; Empty isearch-string means use default.
 	  (when (= 0 (length isearch-string))
   ;; Generate and print the message string.
   (let ((cursor-in-echo-area ellipsis)
 	(m isearch-message)
-	(cmds isearch-cmds)
-	succ-msg)
-    (when (or (not isearch-success) isearch-error)
-      ;; Highlight failed part
-      (while (or (not (isearch-success-state (car cmds)))
-		 (isearch-error-state (car cmds)))
-	(pop cmds))
-      (setq succ-msg (and cmds (isearch-message-state (car cmds)))
-	    m (copy-sequence m))
-      (add-text-properties
-       (if (and (stringp succ-msg)
-		(< (length succ-msg) (length m))
-		(equal succ-msg (substring m 0 (length succ-msg))))
-	   (length succ-msg)
-	 0)
-       (length m) '(face isearch-fail) m)
+	(fail-pos (isearch-fail-pos t)))
+    ;; Highlight failed part
+    (when fail-pos
+      (setq m (copy-sequence m))
+      (add-text-properties fail-pos (length m) '(face isearch-fail) m)
       ;; Highlight failed trailing whitespace
       (when (string-match " +$" m)
 	(add-text-properties (match-beginning 0) (match-end 0)

lisp/mail/smtpmail.el

 		     (eq (car result) 530))
 		;; We got a "530 auth required", so we close and try
 		;; again, this time asking the user for a password.
-		(smtpmail-send-command process "QUIT")
-		(smtpmail-read-response process)
+		;; We ignore any errors here, because some MTAs just
+		;; close the connection immediately after giving the
+		;; error message.
+		(ignore-errors
+		  (smtpmail-send-command process "QUIT")
+		  (smtpmail-read-response process))
 		(delete-process process)
 		(setq process nil)
 		(throw 'done
 (defun smtpmail-process-filter (process output)
   (with-current-buffer (process-buffer process)
     (goto-char (point-max))
-    (insert output)))
+    (insert output)
+    (set-marker (process-mark process) (point))))
 
 (defun smtpmail-read-response (process)
   (let ((case-fold-search nil)
 
 (defun smtpmail-send-command (process command)
   (goto-char (point-max))
-  (if (= (aref command 0) ?P)
-      (insert "PASS <omitted>\r\n")
+  (if (string-match "\\`AUTH [A-Z]+ " command)
+      (insert (match-string 0 command) "<omitted>\r\n")
     (insert command "\r\n"))
   (setq smtpmail-read-point (point))
   (process-send-string process command)
     (let ((menu (make-sparse-keymap "Tool-bar")))
 
       (define-key menu [showhide-tool-bar-left]
-        `(menu-item ,(purecopy "On the left")
+        `(menu-item ,(purecopy "On the Left")
                     menu-bar-showhide-tool-bar-menu-customize-enable-left
                     :help ,(purecopy "Tool-bar at the left side")
                     :visible (display-graphic-p)
                                        'left)))))
 
       (define-key menu [showhide-tool-bar-right]
-        `(menu-item ,(purecopy "On the right")
+        `(menu-item ,(purecopy "On the Right")
                     menu-bar-showhide-tool-bar-menu-customize-enable-right
                     :help ,(purecopy "Tool-bar at the right side")
                     :visible (display-graphic-p)
                                        'right)))))
 
       (define-key menu [showhide-tool-bar-bottom]
-        `(menu-item ,(purecopy "On the bottom")
+        `(menu-item ,(purecopy "On the Bottom")
                     menu-bar-showhide-tool-bar-menu-customize-enable-bottom
                     :help ,(purecopy "Tool-bar at the bottom")
                     :visible (display-graphic-p)
                                        'bottom)))))
 
       (define-key menu [showhide-tool-bar-top]
-        `(menu-item ,(purecopy "On the top")
+        `(menu-item ,(purecopy "On the Top")
                     menu-bar-showhide-tool-bar-menu-customize-enable-top
                     :help ,(purecopy "Tool-bar at the top")
                     :visible (display-graphic-p)
         (define-key menu [menu-system-font]
           (menu-bar-make-toggle
            toggle-use-system-font font-use-system-font
-           "Use system font"
+           "Use System Font"
            "Use system font: %s"
            "Use the monospaced font defined by the system")))
 
 			     (eq 'turn-on-auto-fill text-mode-hook)))))
 
     (define-key menu [line-wrapping]
-      `(menu-item ,(purecopy "Line Wrapping in this Buffer")
+      `(menu-item ,(purecopy "Line Wrapping in This Buffer")
 		  ,menu-bar-line-wrapping-menu))
 
 
         (push (cons tag select) constraints)))
     constraints))
 
+(defun mpc-constraints-tag-lookup (buffer-tag constraints)
+  (let (res)
+    (dolist (constraint constraints)
+      (when (or (eq (car constraint) buffer-tag)
+                (and (string-match "|" (symbol-name buffer-tag))
+                     (member (symbol-name (car constraint))
+                             (split-string (symbol-name buffer-tag) "|"))))
+        (setq res (cdr constraint))))
+    res))
+
 (defun mpc-constraints-restore (constraints)
   (let ((search (assq 'Search constraints)))
     (setq mpc--song-search (cadr search))
     (setq buf (cdr buf))
     (when (buffer-live-p buf)
       (let* ((tag (buffer-local-value 'mpc-tag buf))
-             (constraint (assq tag constraints)))
+             (constraint (mpc-constraints-tag-lookup tag constraints)))
         (when tag
           (with-current-buffer buf
-            (mpc-select-restore (cdr constraint)))))))
+            (mpc-select-restore constraint))))))
   (mpc-selection-refresh))
 
 ;; I don't get the ring.el code.  I think it doesn't do what I need, but
 	    (setq record (cons (list name value)
 			       record))
 	    (forward-line 1))
-	  (push (if withdn
-		    (cons dn (nreverse record))
-		  (nreverse record)) result)
+	  (cond (withdn
+		 (push (cons dn (nreverse record)) result))
+		(record
+		 (push (nreverse record) result)))
 	  (setq record nil)
 	  (skip-chars-forward " \t\n")
 	  (message "Parsing results... %d" numres)

lisp/net/tramp-compat.el

   (require 'advice)
   (require 'custom)
   (require 'format-spec)
+  (require 'shell)
 
   ;; As long as password.el is not part of (X)Emacs, it shouldn't be
   ;; mandatory.

lisp/net/tramp-sh.el

 	;; password.
 	(setq tramp-current-method (tramp-file-name-method v)
 	      tramp-current-user   (tramp-file-name-user v)
-	      tramp-current-host   (tramp-file-name-host v))
+	      tramp-current-host   (tramp-file-name-real-host v))
 
 	;; Expand hops.  Might be necessary for gateway methods.
 	(setq v (car (tramp-compute-multi-hops v)))
 (defconst tramp-inline-compress-commands
   '(("gzip" "gzip -d")
     ("bzip2" "bzip2 -d")
+    ("xz" "xz -d")
     ("compress" "compress -d"))
   "List of compress and decompress commands for inline transfer.
 Each item is a list that looks like this:
 		     (gw (tramp-get-file-property hop "" "gateway" nil))
 		     (g-method (and gw (tramp-file-name-method gw)))
 		     (g-user (and gw (tramp-file-name-user gw)))
-		     (g-host (and gw (tramp-file-name-host gw)))
+		     (g-host (and gw (tramp-file-name-real-host gw)))
 		     (command login-program)
 		     ;; We don't create the temporary file.  In fact,
 		     ;; it is just a prefix for the ControlPath option
 	   x))
 	remote-path)))))
 
-(defun tramp-get-remote-tmpdir (vec)
-  (with-connection-property vec "tmp-directory"
-    (let ((dir (tramp-shell-quote-argument "/tmp")))
-      (if (and (tramp-send-command-and-check
-		vec (format "%s -d %s" (tramp-get-test-command vec) dir))
-	       (tramp-send-command-and-check
-		vec (format "%s -w %s" (tramp-get-test-command vec) dir)))
-	  dir
-	(tramp-error vec 'file-error "Directory %s not accessible" dir)))))
-
 (defun tramp-get-ls-command (vec)
   (with-connection-property vec "ls"
     (tramp-message vec 5 "Finding a suitable `ls' command")

lisp/net/tramp-smb.el

 ;; ... and add it to the method list.
 ;;;###tramp-autoload
 (unless (memq system-type '(cygwin windows-nt))
-  (add-to-list 'tramp-methods (cons tramp-smb-method nil)))
+  (add-to-list 'tramp-methods
+    `(,tramp-smb-method
+      ;; We define an empty command, because `tramp-smb-call-winexe'
+      ;; opens already the powershell.  Used in `tramp-handle-shell-command'.
+      (tramp-remote-shell "")
+      ;; This is just a guess.  We don't know whether the share "$C"
+      ;; is available for public use, and whether the user has write
+      ;; access.
+      (tramp-tmpdir "/C$/Temp"))))