changeset 90296:d57ee9eab157

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-15 Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 66-84) - Update from CVS - rcirc: Add flexible response formatting; Add nick abbrevs - Merge from gnus--rel--5.10 - Update from CVS: man/dired.texi (Tumme): More tumme documentation. - Merge from erc--emacs--0 - Make ERC comply with the new copyright year guidelines. - (rcirc-format-response-string): Fix small bugs - Fix compiler error in erc-dcc.el. * gnus--rel--5.10 (patch 29) - Add sendmail.el and smptmail.el from Emacs tree to contrib/
author Miles Bader <miles@gnu.org>
date Tue, 14 Feb 2006 05:54:12 +0000
parents 4b3d39451150 (current diff) 443a9b04eefe (diff)
children 6dde40edf186
files lisp/ChangeLog lisp/calc/calc-arith.el lisp/dired.el lisp/ffap.el lisp/files.el lisp/find-lisp.el lisp/help.el lisp/icomplete.el lisp/ido.el lisp/info.el lisp/menu-bar.el lisp/mouse.el lisp/mwheel.el lisp/net/rcirc.el lisp/net/tramp.el lisp/play/landmark.el lisp/progmodes/ebrowse.el lisp/progmodes/gdb-ui.el lisp/progmodes/glasses.el lisp/simple.el lisp/subr.el lisp/tumme.el lispref/ChangeLog lispref/variables.texi man/ChangeLog man/building.texi man/custom.texi man/dired.texi man/display.texi man/faq.texi man/files.texi man/frames.texi man/glossary.texi man/maintaining.texi man/programs.texi man/text.texi man/xresources.texi src/.gdbinit src/ChangeLog src/cmds.c src/doc.c src/keyboard.c src/xterm.c
diffstat 75 files changed, 1646 insertions(+), 1152 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/ChangeLog	Tue Feb 14 05:54:12 2006 +0000
@@ -1,3 +1,216 @@
+2006-02-13  Chong Yidong  <cyd@stupidchicken.com>
+
+	* files.el (safe-local-variable-values): New option.
+	(hack-local-variables-prop-line): Return a list of variable-value
+	pairs if MODE-ONLY is non-nil.
+	(hack-local-variables): Construct list of variable-value pairs,
+	and apply or reject them in one go.  Ask for confirmation if
+	variables are not known safe.
+	(hack-local-variables-confirm): Complete rewrite.  Support
+	`safe-local-variable-values'.
+	(enable-local-variables): Update docstring to reflect new
+	behavior.
+	(ignored-local-variables): Ignore ignored-local-variables and
+	safe-local-variable-values.
+	(safe-local-variable-p): New function.
+	(risky-local-variable-p): `safe-local-variable' property check
+	moved to safe-local-variable-p.
+	(hack-one-local-variable): Checks moved to hack-local-variables.
+
+	(byte-compile-dynamic, c-basic-offset, c-file-style,
+	c-indent-level, comment-column, fill-column, fill-prefix,
+	indent-tabs-mode, kept-new-versions, no-byte-compile,
+	no-update-autoloads, outline-regexp, page-delimiter,
+	paragraph-start, paragraph-separate, sentence-end,
+	sentence-end-double-space tab-width, version-control): Add
+	`safe-local-variable' property.
+
+	* find-lisp.el: Delete nonexistent `autocompile' file variable.
+
+	* icomplete.el, play/landmark.el: Change nonexistent
+	`outline-layout' file variable to `allout-layout'.
+
+2006-02-14  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gdb-ui.el (gud-watch, gdb-invalidate-registers-1)
+	(gdb-get-changed-registers): Test value of gud-minor-mode relative
+	to gud-comint-buffer.
+	(gdb-speedbar-expand-node, gdb-locals-mode): Use functions in
+	gdb-ui.el for gdb-mi.el.
+	(gdb-post-prompt, gdb-get-changed-registers): Move test for
+	registers buffer to gdb-get-changed-registers.
+	(gdb-breakpoint-regexp): New regexp.  Allow toggling and
+	deletion of catchpoints (throw and catch).
+	(gdb-toggle-breakpoint, gdb-delete-breakpoint)
+	(gdb-goto-breakpoint): Use it for both gdb-ui and gdb-mi.
+	(gdb-find-file-hook, gdb-set-gud-minor-mode-existing-buffers-1)
+	(gdb-var-list-children-1, gdb-info-breakpoints-custom)
+	(gdb-var-update-1, gdb-invalidate-locals-1): Use also for gdb-mi.
+
+2006-02-13  Jay Belanger  <belanger@truman.edu>
+
+	* calc/calc-arith.el:  (math-check-known-matrixp): Make sure
+	expression is a symbol before checking that it is bound.
+
+2006-02-13  Richard M. Stallman  <rms@gnu.org>
+
+	* mouse.el (mouse-drag-mode-line-1): Use mouse-drag-move-window-bottom
+	for the minibuffer too, but not if resize-mini-windows will interfere.
+
+	* help.el (describe-key-briefly, describe-key): Do all arg-reading
+	inside `interactive' spec.
+	(describe-key-briefly-internal, describe-key-internal):
+	Functions merged back into their callers.
+	
+2006-02-13  Martin Rudalics  <rudalics@gmx.at>  (tiny change)
+
+	* info.el (info-xref-visited): Inherit from info-xref too.
+	(Info-set-mode-line): Replace occurrences of `%' by `%%'
+	when propertizing Info-current-file and Info-current-node.
+
+2006-02-13  Juri Linkov  <juri@jurta.org>
+
+	* tumme.el (tumme-thumbnail-storage): Fix docstring.
+	(tumme-thumb-name): Fix per-directory format.
+
+2006-02-13  Juanma Barranquero  <lekktu@gmail.com>
+
+	* subr.el (substitute-key-definition): Doc fix (hide internal arg).
+
+2006-02-12  Miles Bader  <miles@gnu.org>
+
+	* net/rcirc.el (rcirc-format-response-string): Fix small bugs.
+
+2006-02-13  Mathias Dahl  <mathias.dahl@gmail.com>
+
+	* tumme.el: Remove history section.  If someone needs the it, it
+	can always be found in CVS.
+
+2006-02-12  Mathias Dahl  <mathias.dahl@gmail.com>
+
+	* tumme.el (tumme-thumbnail-storage): Update docstring.  Add info
+	about the Thumbnail Managing Standard option.
+
+2006-02-12  Richard M. Stallman  <rms@gnu.org>
+
+	* subr.el (substitute-key-definition): Doc fix.
+
+	* simple.el (blink-matching-paren-dont-ignore-comments): Doc fix.
+
+	* files.el (magic-mode-alist): Don't use `\\s ' in regexps.
+
+	* info.el (Info-mode): Doc fix.
+
+	* progmodes/ebrowse.el (ebrowse-global-prefix-key): Change to C-c C-m.
+
+2006-02-12  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/tramp.el (tramp-remote-path): Add "/usr/xpg4/bin" on top,
+	because on Solaris a POSIX compatible "id" is needed.  Reported by
+	Magnus Henoch <mange@freemail.hu>.
+
+2006-02-12  Juri Linkov  <juri@jurta.org>
+
+	* tumme.el: Remove todo item about Thumbnail Managing Standard.
+	(tumme) <defgroup>: Change :group to `multimedia'.
+	(tumme-thumbnail-storage): Add choice `standard' for Thumbnail
+	Managing Standard.
+	(tumme-cmd-create-thumbnail-options): Use %w and %h instead of %s.
+	Fix dostring.
+	(tumme-cmd-create-temp-image-options): Use %w and %h instead of %x
+	and %y.  Fix docstring.
+	(tumme-cmd-pngnq-program, tumme-cmd-pngcrush-program)
+	(tumme-cmd-create-standard-thumbnail-command): New user options.
+	(tumme-thumb-size): Set default to 128 if tumme-thumbnail-storage
+	is `standard'.  Fix docstring.
+	(tumme-thumb-width, tumme-thumb-height): New user options.
+	(tumme-external-viewer): Try to find various viewers.
+	(tumme-get-thumbnail-image): Use `create-image' instead of
+	constructing the `image' structure.
+	(tumme-insert-thumbnail): Use `png' if tumme-thumbnail-storage is
+	`standard'.
+	(tumme-thumb-name): Add file name generation for standard storage.
+	Simplify code for other storages.
+	(tumme-thumb-name): Use width %w and height %h instead of size %s.
+	Add modification time %m and thumbnail-nq8 %q.
+	Use `tumme-cmd-create-standard-thumbnail-command' if
+	tumme-thumbnail-storage is `standard'.
+	(tumme-dired-insert-marked-thumbs): New autoload command.
+	(tumme-dired-after-readin-hook): New function.
+	(tumme-line-up-dynamic): Use `tumme-thumb-width' instead of
+	`tumme-thumb-size'.
+	(tumme-display-image): Replace size-x %x and size-y %y with
+	width %w and height %h.
+
+	* dired.el (dired-mode-map): Bind `\C-t\C-t' to
+	`tumme-dired-insert-marked-thumbs'.
+
+2006-02-12  Mathias Dahl  <mathias.dahl@gmail.com>
+
+	* tumme.el (tumme-write-tag): Fix small bug (file name did not
+	include path).
+	(tumme-mark-tagged-files): Fix bug in regexp used to find rows
+	matching tag.
+
+2006-02-12  Miles Bader  <miles@gnu.org>
+
+	* net/rcirc.el (rcirc-nick-abbrevs, rcirc-response-formats):
+	New variables.
+	(rcirc-abbrev-nick): New function.
+	(rcirc-format-response-string): Rewrite to use the formats in
+	`rcirc-response-formats' and expand escape sequences therein.
+	A text-property `rcirc-text' is added over the actual response
+	text to make easy to find inside the returned string.
+	(rcirc-print): When filling, just look for the `rcirc-text'
+	text-property to find the appropriate fill prefix, instead of
+	using hardwired patterns.
+
+2006-02-11  Mathias Dahl  <brakjoller@hotmail.com>
+
+	* tumme.el: Enhance some docstrings.  Add todo item about Thumbnail
+	Managing Standard.
+
+2006-02-11  Kim F. Storm  <storm@cua.dk>
+
+	* ido.el (ido-buffer-internal): Set mark for ido-insert-buffer.
+	Don't use insert-buffer; do insert-buffer-substring directly.
+	(ido-file-internal): Set mark for ido-insert-file.  Use insert-file-1.
+
+2006-02-11  Martin Rudalics  <rudalics@gmx.at>
+
+	* files.el (revert-buffer, recover-file): Replace buffer-read-only
+	with inhibit-read-only.	Suggested by Stefan Monnier.
+	(revert-buffer): Let insert-file-contents discard
+	buffer-undo-list.  Simplify code.
+	(find-file, find-file-existing, revert-buffer): Doc-string fixes.
+
+2006-02-11  Eli Zaretskii  <eliz@gnu.org>
+
+	* menu-bar.el (menu-bar-select-yank): Add a doc string.
+
+	* help.el (describe-key-briefly): Now a wrapper for
+	describe-key-briefly-internal.  Bind enable-disabled-menus-and-buttons
+	to t.  Populate yank-menu if empty.
+	(describe-key-briefly-internal): Renamed from describe-key-briefly.
+	(describe-key): Now a wrapper for describe-key-internal.  Bind
+	enable-disabled-menus-and-buttons to t.  Populate yank-menu if empty.
+	(describe-key-internal): Renamed from describe-key.
+
+2006-02-11  Milan Zamazal  <pdm@zamazal.org>
+
+	* progmodes/glasses.el (glasses-separator): Doc fix.
+	(glasses-original-separator): New defcustom.
+	(glasses-make-readable, glasses-convert-to-unreadable): Use it.
+
+2006-02-11  Martin Rudalics  <rudalics@gmx.at>
+
+	* mwheel.el (mouse-wheel-up-event): Doc fix.
+
+2006-02-11  Mathias Dahl  <brakjoller@hotmail.com>
+
+	* tumme.el (tumme-dir): Change default value to "~/.emacs.d/tumme/".
+	(tumme-dir): New function.  Copied from thumbs.el.
+
 2006-02-10  Juanma Barranquero  <lekktu@gmail.com>
 
 	* desktop.el (desktop-outvar): Fix typo.
@@ -19,12 +232,12 @@
 
 2006-02-10  Mathias Dahl  <mathias.dahl@gmail.com>
 
-	* tumme.el (tumme-copy-with-exif-file-name): Tried to make
-	docstring less `colloquial'...
+	* tumme.el (tumme-copy-with-exif-file-name): Try to make docstring
+	less `colloquial'...
 
 2006-02-09  Mathias Dahl  <mathias.dahl@gmail.com>
 
-	* tumme.el: Added a couple of todo items.
+	* tumme.el: Add a couple of todo items.
 
 2006-02-09  Lars Hansen  <larsh@soem.dk>
 
--- a/lisp/calc/calc-arith.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/calc/calc-arith.el	Tue Feb 14 05:54:12 2006 +0000
@@ -362,6 +362,7 @@
             ((memq 'matrix (nth 1 decl))
              t)
             ((and (eq (car a) 'var)
+                  (symbolp (nth 2 a))
                   (boundp (nth 2 a))
                   (setq val (symbol-value (nth 2 a))))
              (math-check-known-matrixp val))
--- a/lisp/dired.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/dired.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1258,6 +1258,7 @@
     (define-key map "\C-t." 'tumme-display-thumb)
     (define-key map "\C-tc" 'tumme-dired-comment-files)
     (define-key map "\C-tf" 'tumme-mark-tagged-files)
+    (define-key map "\C-t\C-t" 'tumme-dired-insert-marked-thumbs)
 
     ;; Make menu bar items.
 
--- a/lisp/erc/ChangeLog	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/ChangeLog	Tue Feb 14 05:54:12 2006 +0000
@@ -1,3 +1,75 @@
+2006-02-13  Michael Olson  <mwolson@gnu.org>
+
+	* erc-dcc.el: Use (eval-when-compile (require 'cl)).
+
+2006-02-12  Michael Olson  <mwolson@gnu.org>
+
+	* erc-autoaway.el, erc-dcc.el, erc-ezbounce.el, erc-fill.el,
+	erc-goodies.el, erc-hecomplete.el, erc-ibuffer.el, erc-identd.el,
+	erc-imenu.el, erc-join.el, erc-lang.el, erc-list.el, erc-log.el,
+	erc-match.el, erc-menu.el, erc-netsplit.el, erc-networks.el,
+	erc-notify.el, erc-page.el, erc-pcomplete.el, erc-replace.el,
+	erc-ring.el, erc-services.el, erc-sound.el, erc-speedbar.el,
+	erc-spelling.el, erc-track.el, erc-truncate.el, erc-xdcc.el: Add
+	2006 to copyright years, to comply with the changed guidelines.
+
+2006-02-11  Michael Olson  <mwolson@gnu.org>
+
+	* erc.el (erc-update-modules): Make some requirements shorter, so
+	that it's easier to see why they are needed.
+
+	* erc-stamp.el (erc-timestamp-use-align-to): Renamed from
+	`erc-timestamp-right-align-by-pixel'.  Set the default based on
+	whether we are in Emacs 22, and using X.  Improve documentation.
+	(erc-insert-aligned): Remove calculation of offset, since
+	:align-to pos works after all.  Unlike the previous solution, this
+	one works when erc-stamp.el is compiled.
+	(erc-insert-timestamp-right): Don't add length of string, and then
+	later remove its displayed width.  This puts timestamps after
+	erc-fill-column when erc-timestamp-right-column is nil, rather
+	than before it.  It also fixes a subtle bug.  Remove use of
+	`current-window', since there is no variable by that name in
+	Emacs21, Emacs22, or XEmacs21 beta.  Check to see whether
+	`erc-fill-column' is non-nil before using it.
+
+2006-02-11  Diane Murray  <disumu@x3y2z1.net>
+
+	* erc-list.el: Define `list' module which sets the alias
+	`erc-cmd-LIST' to `erc-list-channels' when enabled and
+	`erc-list-channels-simple' when disabled.
+	(erc-list-channels): Was `erc-cmd-LIST', renamed.
+	(erc-list-channels-simple): New function.
+
+	* erc.el (erc-modules): Added `list' to enabled modules.  Moved
+	customization options left in source code.
+
+	* erc-menu.el (erc-menu-definition): Use `erc-list-channels'.
+
+	* erc-spelling.el (define-erc-module): Make sure there's a buffer
+	before calling `with-current-buffer'.
+
+2006-02-10  Michael Olson  <mwolson@gnu.org>
+
+	* Makefile (debbuild): Split from debrelease.
+	(debrevision-mwolson): New rule that causes a Debian revision to
+	be built.
+
+	* erc.el (erc-migrate-modules): Use a better algorithm.  Thanks to
+	Johan Bockgård.
+	(erc-modules): Change use of 'pcomplete to 'completion.
+
+2006-02-09  Diane Murray  <disumu@x3y2z1.net>
+
+	* erc.el (erc-get-parsed-vector, erc-get-parsed-vector-nick)
+	(erc-get-parsed-vector-type): Moved here from erc-match.el.
+
+	* erc-match.el (erc-get-parsed-vector, erc-get-parsed-vector-nick)
+	(erc-get-parsed-vector-type): Moved these functions to erc.el
+	since they can be useful outside of the text matching module.
+
+	* erc-dcc.el, erc-stamp.el, erc-xdcc.el: Changed "Emacs IRC Client"
+	to "ERC".
+
 2006-02-07  Michael Olson  <mwolson@gnu.org>
 
 	* ChangeLog.01, ChangeLog.02, ChangeLog.03, ChangeLog.04,
--- a/lisp/erc/erc-autoaway.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-autoaway.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-autoaway.el --- Provides autoaway for ERC
 
-;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
 
 ;; Author: Jorgen Schaefer <forcer@forcix.cx>
 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcAutoAway
--- a/lisp/erc/erc-dcc.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-dcc.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-dcc.el --- CTCP DCC module for ERC
 
-;; Copyright (C) 1993, 1994, 1995, 1998, 2002, 2003, 2004
+;; Copyright (C) 1993, 1994, 1995, 1998, 2002, 2003, 2004, 2006
 ;;   Free Software Foundation, Inc.
 
 ;; Author: Ben A. Mesander <ben@gnu.ai.mit.edu>
@@ -29,7 +29,7 @@
 
 ;;; Commentary:
 
-;; This file provides Direct Client-to-Client support for the Emacs IRC Client.
+;; This file provides Direct Client-to-Client support for ERC.
 ;;
 ;; The original code was taken from zenirc-dcc.el, heavily mangled and
 ;; rewritten to support the way how ERC operates.  Server socket support
@@ -55,7 +55,8 @@
 
 (require 'erc)
 (eval-when-compile
- (require 'pcomplete))
+  (require 'cl)
+  (require 'pcomplete))
 
 (defgroup erc-dcc nil
   "DCC stands for Direct Client Communication, where you and your
--- a/lisp/erc/erc-ezbounce.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-ezbounce.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-ezbounce.el ---  Handle EZBounce bouncer commands
 
-;; Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc.
 
 ;; Author: Andreas Fuchs <asf@void.at>
 ;; Keywords: comm
--- a/lisp/erc/erc-fill.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-fill.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-fill.el --- Filling IRC messages in various ways
 
-;; Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
 
 ;; Author: Andreas Fuchs <asf@void.at>
 ;;         Mario Lang <mlang@delysid.org>
--- a/lisp/erc/erc-goodies.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-goodies.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,7 @@
 ;; erc-goodies.el --- Collection of ERC modules
 
-;; Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation
+;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
+;;   Free Software Foundation, Inc.
 
 ;; Author: Jorgen Schaefer <forcer@forcix.cx>
 
--- a/lisp/erc/erc-hecomplete.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-hecomplete.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-hecomplete.el --- Provides Nick name completion for ERC
 
-;; Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
 
 ;; Author: Alex Schroeder <alex@gnu.org>
 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcCompletion
--- a/lisp/erc/erc-ibuffer.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-ibuffer.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-ibuffer.el --- ibuffer integration with ERC
 
-;; Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <mlang@delysid.org>
 ;; Keywords: comm
--- a/lisp/erc/erc-identd.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-identd.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-identd.el --- RFC1413 (identd authentication protocol) server
 
-;; Copyright (C) 2003 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2006 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 ;; Keywords: comm, processes
--- a/lisp/erc/erc-imenu.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-imenu.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-imenu.el -- Imenu support for ERC
 
-;; Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <mlang@delysid.org>
 ;; Keywords: comm
--- a/lisp/erc/erc-join.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-join.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-join.el --- autojoin channels on connect and reconnects
 
-;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
 
 ;; Author: Alex Schroeder <alex@gnu.org>
 ;; Keywords: irc
--- a/lisp/erc/erc-lang.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-lang.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-lang.el --- provide the LANG command to ERC
 
-;; Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc.
 
 ;; Author: Alex Schroeder <alex@gnu.org>
 ;; Maintainer: Alex Schroeder <alex@gnu.org>
--- a/lisp/erc/erc-list.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-list.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-list.el --- Provide a faster channel listing mechanism
 
-;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 ;; Copyright (C) 2004 Brian Palmer
 
 ;; Author: Mario Lang <mlang@lexx.delysid.org>
@@ -140,12 +140,19 @@
   (setq truncate-lines t)
   (add-hook 'post-command-hook 'erc-chanlist-post-command-hook 'append 'local))
 
+;; Define module:
+;;;###autoload (autoload 'erc-list-mode "erc-list")
+(define-erc-module list nil
+  "List channels nicely in a separate buffer."
+  ((defalias 'erc-cmd-LIST 'erc-list-channels))
+  ((defalias 'erc-cmd-LIST 'erc-list-channels-simple)))
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Functions.
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 ;;;###autoload
-(defun erc-cmd-LIST (&rest channel)
+(defun erc-list-channels (&rest channel)
   "Display a buffer containing a list of channels on the current server.
 Optional argument CHANNEL specifies a single channel to list (instead of every
 available channel)."
@@ -163,6 +170,18 @@
     (erc-chanlist channel))
   t)
 
+(defun erc-list-channels-simple (&optional line)
+  "Send the LIST command to the current server with optional channels LINE."
+  (when (string-match "^\\s-*\\(.*\\)$" line)
+    (let ((channels (match-string 1 line)))
+      (erc-log (format "cmd: LIST: %s" channels))
+      (erc-server-send
+       (if (string= channels "")
+	   "LIST"
+	 (concat "LIST :" channels))))
+    t))
+(put 'erc-list-channels-simple 'do-not-parse-args t)
+
 ;;;###autoload
 (defun erc-chanlist (&optional channels)
   "Show a channel listing of the current server in a special mode.
--- a/lisp/erc/erc-log.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-log.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-log.el --- Logging facilities for ERC.
 
-;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lawrence Mitchell <wence@gmx.li>
 ;; Keywords: IRC, chat, client, Internet, logging
--- a/lisp/erc/erc-match.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-match.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-match.el --- Highlight messages matching certain regexps
 
-;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Andreas Fuchs <asf@void.at>
 ;; Keywords: comm, faces
@@ -428,24 +428,6 @@
     (or (erc-list-match fools-beg msg)
 	(erc-list-match fools-end msg))))
 
-(defun erc-get-parsed-vector (point)
-  "Return the whole parsed vector on POINT."
-  (get-text-property point 'erc-parsed))
-
-(defun erc-get-parsed-vector-nick (vect)
-  "Return nickname in the parsed vector VECT."
-  (let* ((untreated-nick (and vect (erc-response.sender vect)))
-	 (maybe-nick (when untreated-nick
-		       (car (split-string untreated-nick "!")))))
-    (when (and (not (null maybe-nick))
-	       (erc-is-valid-nick-p maybe-nick))
-      untreated-nick)))
-
-(defun erc-get-parsed-vector-type (vect)
-  "Return message type in the parsed vector VECT."
-  (and vect
-       (erc-response.command vect)))
-
 (defun erc-match-message ()
   "Mark certain keywords in a region.
 Use this defun with `erc-insert-modify-hook'."
--- a/lisp/erc/erc-menu.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-menu.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;; erc-menu.el -- Menu-bar definitions for ERC
 
-;; Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <mlang@delysid.org>
 ;; Keywords: comm, processes, menu
@@ -36,8 +36,8 @@
 	["Connect to server..." erc-select t]
 	["Disconnect from server..." erc-quit-server erc-server-connected]
 	"-"
-	["List channels..." erc-cmd-LIST
-	 (and erc-server-connected (fboundp 'erc-cmd-LIST))]
+	["List channels..." erc-list-channels
+	 (and erc-server-connected (fboundp 'erc-list-channels))]
 	["Join channel..." erc-join-channel erc-server-connected]
 	["Start a query..." erc-cmd-QUERY erc-server-connected]
 	"-"
--- a/lisp/erc/erc-netsplit.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-netsplit.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-netsplit.el --- Reduce JOIN/QUIT messages on netsplits
 
-;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <mlang@delysid.org>
 ;; Keywords: comm
--- a/lisp/erc/erc-networks.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-networks.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-networks.el --- IRC networks
 
-;; Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <mlang@lexx.delysid.org>
 ;; Keywords: comm
--- a/lisp/erc/erc-notify.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-notify.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-notify.el --- Online status change notification
 
-;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <mlang@lexx.delysid.org>
 ;; Keywords: comm
--- a/lisp/erc/erc-page.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-page.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;; erc-page.el - CTCP PAGE support for ERC
 
-;; Copyright (C) 2002, 2004 Free Software Foundation
+;; Copyright (C) 2002, 2004, 2006 Free Software Foundation
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/erc/erc-pcomplete.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-pcomplete.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-pcomplete.el --- Provides programmable completion for ERC
 
-;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
 
 ;; Author: Sacha Chua <sacha@free.net.ph>
 ;; Keywords: comm, convenience
--- a/lisp/erc/erc-replace.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-replace.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;; erc-replace.el -- wash and massage messages inserted into the buffer
 
-;; Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
 
 ;; Author: Andreas Fuchs <asf@void.at>
 ;; Maintainer: Mario Lang (mlang@delysid.org)
--- a/lisp/erc/erc-ring.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-ring.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;; erc-ring.el -- Command history handling for erc using ring.el
 
-;; Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
 
 ;; Author: Alex Schroeder <alex@gnu.org>
 ;; Keywords: comm
--- a/lisp/erc/erc-services.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-services.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-services.el --- Identify to NickServ
 
-;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/erc/erc-sound.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-sound.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-sound.el --- CTCP SOUND support for ERC
 
-;; Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/erc/erc-speedbar.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-speedbar.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-speedbar.el --- Speedbar support for ERC
 
-;; Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <mlang@delysid.org>
 ;; Contributor: Eric M. Ludlam <eric@siege-engine.com>
--- a/lisp/erc/erc-spelling.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-spelling.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-spelling.el --- use flyspell in ERC
 
-;; Copyright (C) 2005, 2006  Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Jorgen Schaefer <forcer@forcix.cx>
 ;; Keywords: irc
@@ -41,11 +41,13 @@
   ;; called AFTER the server buffer is initialized.
   ((add-hook 'erc-connect-pre-hook 'erc-spelling-init)
    (mapc (lambda (buffer)
-           (with-current-buffer buffer (erc-spelling-init)))
+           (when buffer
+             (with-current-buffer buffer (erc-spelling-init))))
          (erc-buffer-list)))
   ((remove-hook 'erc-connect-pre-hook 'erc-spelling-init)
    (mapc (lambda (buffer)
-           (with-current-buffer buffer (flyspell-mode 0)))
+           (when buffer
+             (with-current-buffer buffer (flyspell-mode 0))))
          (erc-buffer-list))))
 
 (defcustom erc-spelling-dictionaries nil
--- a/lisp/erc/erc-stamp.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-stamp.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,4 +1,4 @@
-;;; erc-stamp.el --- Timestamping for Emacs IRC CLient
+;;; erc-stamp.el --- Timestamping for ERC messages
 
 ;; Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
 
@@ -180,11 +180,17 @@
 	  (integer :tag "Column number")
 	  (const :tag "Unspecified" nil)))
 
-(defcustom erc-timestamp-right-align-by-pixel nil
-  "*If non-nil, insert the right timestamp based on a pixel value.
-This is needed when variable-width text precedes a timestamp.
+(defcustom erc-timestamp-use-align-to (and (not (featurep 'xemacs))
+					   (>= emacs-major-version 22)
+					   (eq window-system 'x))
+  "*If non-nil, use the :align-to display property to align the stamp.
+This gives better results when variable-width characters (like
+Asian language characters and math symbols) precede a timestamp.
 Unfortunately, it only works in Emacs 22 and when using the X
-Window System."
+Window System.
+
+A side effect of enabling this is that there will only be one
+space before a right timestamp in any saved logs."
   :group 'erc-stamp
   :type 'boolean)
 
@@ -200,18 +206,15 @@
     (insert s)))
 
 (defun erc-insert-aligned (string pos)
-  "Insert STRING based on a fraction of the width of the buffer.
-Fraction is roughly (/ POS (window-width)).
+  "Insert STRING at the POSth column.
 
-If `erc-timestamp-right-align-by-pixel' is nil, insert STRING at the
-POSth column, without using pixel coordinates."
-  (if (not erc-timestamp-right-align-by-pixel)
+If `erc-timestamp-use-align-to' is t, use the :align-to display
+property to get to the POSth column."
+  (if (not erc-timestamp-use-align-to)
       (indent-to pos)
     (insert " ")
-    (let ((offset (floor (* (/ (1- pos) (window-width) 1.0)
-			    (nth 2 (window-inside-pixel-edges))))))
-      (put-text-property (1- (point)) (point) 'display
-			 `(space :align-to (,offset)))))
+    (put-text-property (1- (point)) (point) 'display
+		       (list 'space ':align-to pos)))
   (insert string))
 
 (defun erc-insert-timestamp-right (string)
@@ -238,30 +241,26 @@
     (forward-char -1);; before the last newline
     (let* ((current-window (get-buffer-window (current-buffer)))
 	   (pos (cond
-		 (erc-timestamp-right-column
-		  (+ erc-timestamp-right-column (length string)))
+		 (erc-timestamp-right-column erc-timestamp-right-column)
 		 ((and (boundp 'erc-fill-mode)
 		       erc-fill-mode
-		       (boundp 'erc-fill-column))
+		       (boundp 'erc-fill-column)
+		       erc-fill-column)
 		  (1+ erc-fill-column))
-		 (current-window
-		  (- (window-width current-window)
-		     1))
 		 (fill-column
 		  (1+ fill-column))
 		 (t
 		  (- (window-width)
+		     (string-width string)
 		     1))))
 	   (from (point))
 	   (col (current-column))
 	   indent)
-      ;; deal with variable-width characters
-      (setq pos (- pos (string-width string))
-	    ;; The following is a kludge that works with most
-	    ;; international input.  It is now only used to calculate
-	    ;; whether to move to the next line before inserting a
-	    ;; stamp.
-	    col (+ col (ceiling (/ (- col (- (point) (point-at-bol))) 1.6))))
+      ;; The following is a kludge used to calculate whether to move
+      ;; to the next line before inserting a stamp.  It allows for
+      ;; some margin of error if what is displayed on the line differs
+      ;; from the number of characters on the line.
+      (setq col (+ col (ceiling (/ (- col (- (point) (point-at-bol))) 1.6))))
       (if (< col pos)
 	  (erc-insert-aligned string pos)
 	(newline)
--- a/lisp/erc/erc-track.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-track.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-track.el --- Track modified channel buffers
 
-;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <mlang@delysid.org>
 ;; Keywords: comm, faces
--- a/lisp/erc/erc-truncate.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-truncate.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-truncate.el --- Functions for truncating ERC buffers
 
-;; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
 
 ;; Author: Andreas Fuchs <asf@void.at>
 ;; Keywords: IRC, chat, client, Internet, logging
--- a/lisp/erc/erc-xdcc.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc-xdcc.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1,6 +1,6 @@
 ;;; erc-xdcc.el --- XDCC file-server support for ERC
 
-;; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <mlang@delysid.org>
 ;; Keywords: comm, processes
@@ -24,7 +24,7 @@
 
 ;;; Commentary:
 
-;; This file provides a very simple XDCC file server for the Emacs IRC Client.
+;; This file provides a very simple XDCC file server for ERC.
 
 ;;; Code:
 
--- a/lisp/erc/erc.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/erc/erc.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1719,22 +1719,15 @@
 (defun erc-migrate-modules (mods)
   "Migrate old names of ERC modules to new ones."
   ;; modify `transforms' to specify what needs to be changed
-  ;; each item is in the format '(new .old)
-  (let ((transforms '((pcomplete . completion)))
-	(modules (copy-alist mods)))
-    (dolist (transform transforms)
-      (let ((addp nil))
-	(setq modules (erc-delete-if `(lambda (val)
-					(and (eq val ',(car transform))
-					     (setq addition t)))
-				     modules))
-	(when addp
-	  (add-to-list 'modules (cdr transform)))))
-    (erc-delete-dups modules)))
-
-(defcustom erc-modules '(netsplit fill button match track pcomplete readonly
+  ;; each item is in the format '(old . new)
+  (let ((transforms '((pcomplete . completion))))
+    (erc-delete-dups
+     (mapcar (lambda (m) (or (cdr (assoc m transforms)) m))
+	     mods))))
+
+(defcustom erc-modules '(netsplit fill button match track completion readonly
 				  ring autojoin noncommands irccontrols
-				  stamp)
+				  stamp list)
   "A list of modules which erc should enable.
 If you set the value of this without using `customize' remember to call
 \(erc-update-modules) after you change it.  When using `customize', modules
@@ -1755,40 +1748,42 @@
 	 ;; this test is for the case where erc hasn't been loaded yet
 	 (when (fboundp 'erc-update-modules)
 	   (erc-update-modules)))
-  :type '(set :greedy t
-	      (const :tag "Set away status automatically" autoaway)
-	      (const :tag "Join channels automatically" autojoin)
-	      (const :tag "Integrate with Big Brother Database" bbdb)
-	      (const :tag "Buttonize URLs, nicknames, and other text" button)
-	      (const :tag "Wrap long lines" fill)
-	      (const :tag "Highlight or remove IRC control characters"
-		     irccontrols)
-	      (const :tag "Save buffers in logs" log)
-	      (const :tag "Highlight pals, fools, and other keywords" match)
-	      (const :tag "Detect netsplits" netsplit)
-	      (const :tag "Don't display non-IRC commands after evaluation"
-		     noncommands)
-	      (const :tag
-		     "Notify when the online status of certain users changes"
-		     notify)
-	      (const :tag "Complete nicknames and commands (programmable)"
-		     completion)
-	      (const :tag "Complete nicknames and commands (old)" hecomplete)
-	      (const :tag "Make displayed lines read-only" readonly)
-	      (const :tag "Replace text in messages" replace)
-	      (const :tag "Enable an input history" ring)
-	      (const :tag "Scroll to the bottom of the buffer" scrolltobottom)
-	      (const :tag "Identify to Nickserv (IRC Services) automatically"
-		     services)
-	      (const :tag "Convert smileys to pretty icons" smiley)
-	      (const :tag "Play sounds when you receive CTCP SOUND requests"
-		     sound)
-	      (const :tag "Add timestamps to messages" stamp)
-	      (const :tag "Check spelling" spelling)
-	      (const :tag "Track channel activity in the mode-line" track)
-	      (const :tag "Truncate buffers to a certain size" truncate)
-	      (const :tag "Translate morse code in messages" unmorse)
-	      (repeat :tag "Others" :inline t symbol))
+  :type
+  '(set
+    :greedy t
+    (const :tag "Set away status automatically" autoaway)
+    (const :tag "Join channels automatically" autojoin)
+    (const :tag "Integrate with Big Brother Database" bbdb)
+    (const :tag "Buttonize URLs, nicknames, and other text" button)
+    (const :tag "Wrap long lines" fill)
+    (const :tag "Highlight or remove IRC control characters"
+	   irccontrols)
+    (const :tag "Save buffers in logs" log)
+    (const :tag "Highlight pals, fools, and other keywords" match)
+    (const :tag "Detect netsplits" netsplit)
+    (const :tag "Don't display non-IRC commands after evaluation"
+	   noncommands)
+    (const :tag
+	   "Notify when the online status of certain users changes"
+	   notify)
+    (const :tag "Complete nicknames and commands (programmable)"
+	   completion)
+    (const :tag "Complete nicknames and commands (old)" hecomplete)
+    (const :tag "Make displayed lines read-only" readonly)
+    (const :tag "Replace text in messages" replace)
+    (const :tag "Enable an input history" ring)
+    (const :tag "Scroll to the bottom of the buffer" scrolltobottom)
+    (const :tag "Identify to Nickserv (IRC Services) automatically"
+	   services)
+    (const :tag "Convert smileys to pretty icons" smiley)
+    (const :tag "Play sounds when you receive CTCP SOUND requests"
+	   sound)
+    (const :tag "Add timestamps to messages" stamp)
+    (const :tag "Check spelling" spelling)
+    (const :tag "Track channel activity in the mode-line" track)
+    (const :tag "Truncate buffers to a certain size" truncate)
+    (const :tag "Translate morse code in messages" unmorse)
+    (repeat :tag "Others" :inline t symbol))
   :group 'erc)
 
 (defun erc-update-modules ()
@@ -1799,14 +1794,11 @@
       (cond
        ;; yuck. perhaps we should bring the filenames into sync?
        ((string= req "erc-completion")
-	(setq req "erc-pcomplete")
-	(setq mod 'completion))
+	(setq req "erc-pcomplete"))
        ((string= req "erc-pcomplete")
-	(setq req "erc-pcomplete")
 	(setq mod 'completion))
        ((string= req "erc-autojoin")
-	(setq req "erc-join")
-	(setq mod 'autojoin)))
+	(setq req "erc-join")))
       (condition-case nil
 	  (require (intern req))
 	(error nil))
@@ -6143,6 +6135,26 @@
 			       (funcall erc-part-reason nil))
 		       nil tgt))))
 
+;;; Dealing with `erc-parsed'
+
+(defun erc-get-parsed-vector (point)
+  "Return the whole parsed vector on POINT."
+  (get-text-property point 'erc-parsed))
+
+(defun erc-get-parsed-vector-nick (vect)
+  "Return nickname in the parsed vector VECT."
+  (let* ((untreated-nick (and vect (erc-response.sender vect)))
+	 (maybe-nick (when untreated-nick
+		       (car (split-string untreated-nick "!")))))
+    (when (and (not (null maybe-nick))
+	       (erc-is-valid-nick-p maybe-nick))
+      untreated-nick)))
+
+(defun erc-get-parsed-vector-type (vect)
+  "Return message type in the parsed vector VECT."
+  (and vect
+       (erc-response.command vect)))
+
 (provide 'erc)
 
 ;;; Deprecated. We might eventually stop requiring the goodies automatically.
--- a/lisp/ffap.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/ffap.el	Tue Feb 14 05:54:12 2006 +0000
@@ -287,9 +287,9 @@
 
 ;;; Compatibility:
 ;;
-;; This version of ffap supports Emacs 20 only, see the ftp site
-;; for a more general version.  The following functions are necessary
-;; "leftovers" from the more general version.
+;; This version of ffap supports only the Emacs it is distributed in.
+;; See the ftp site for a more general version.  The following
+;; functions are necessary "leftovers" from the more general version.
 
 (defun ffap-mouse-event nil		; current mouse event, or nil
   (and (listp last-nonmenu-event) last-nonmenu-event))
@@ -730,7 +730,7 @@
 	  path)))
 
 (defun ffap-locate-file (file &optional nosuffix path dir-ok)
-  ;; The Emacs 20 version of locate-library could almost replace this,
+  ;; The current version of locate-library could almost replace this,
   ;; except it does not let us override the suffix list.  The
   ;; compression-suffixes search moved to ffap-file-exists-string.
   "A generic path-searching function, mimics `load' by default.
--- a/lisp/files.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/files.el	Tue Feb 14 05:54:12 2006 +0000
@@ -445,8 +445,13 @@
 (defcustom enable-local-variables t
   "*Control use of local variables in files you visit.
 The value can be t, nil or something else.
-A value of t means file local variables specifications are obeyed;
-nil means they are ignored; anything else means query.
+
+A value of t means file local variables specifications are obeyed
+if all the specified variables are safe.  If any variables are
+not safe, you will be queries before setting them.
+A value of nil means file local variables are ignored.
+Any other value means to always query.
+
 This variable also controls use of major modes specified in
 a -*- line.
 
@@ -1025,7 +1030,7 @@
 
 Interactively, or if WILDCARDS is non-nil in a call from Lisp,
 expand wildcards (if any) and visit multiple files.  You can
-suppress wildcard expansion by setting `find-file-wildcards'.
+suppress wildcard expansion by setting `find-file-wildcards' to nil.
 
 To visit a file without any kind of conversion and without
 automatically choosing a major mode, use \\[find-file-literally]."
@@ -1077,7 +1082,7 @@
 
 (defun find-file-existing (filename &optional wildcards)
   "Edit the existing file FILENAME.
-Like \\[find-file] but only allow files that exists."
+Like \\[find-file] but only allow a file that exists."
   (interactive (find-file-read-args "Find existing file: " t))
   (unless (file-exists-p filename) (error "%s does not exist" filename))
   (find-file filename wildcards)
@@ -2024,18 +2029,19 @@
 (defvar magic-mode-alist
   `(;; The < comes before the groups (but the first) to reduce backtracking.
     ;; TODO: UTF-16 <?xml may be preceded by a BOM 0xff 0xfe or 0xfe 0xff.
+    ;; We use [ \t\n] instead of `\\s ' to make regex overflow less likely.
     (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)")
-	     (comment-re (concat "\\(?:!--" incomment-re "*-->\\s *<\\)")))
-	(concat "\\(?:<\\?xml\\s +[^>]*>\\)?\\s *<"
+	     (comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\n]*<\\)")))
+	(concat "\\(?:<\\?xml[ \t\n]+[^>]*>\\)?[ \t\n]*<"
 		comment-re "*"
-		"\\(?:!DOCTYPE\\s +[^>]*>\\s *<\\s *" comment-re "*\\)?"
+		"\\(?:!DOCTYPE[ \t\n]+[^>]*>[ \t\n]*<[ \t\n]*" comment-re "*\\)?"
 		"[Hh][Tt][Mm][Ll]"))
      . html-mode)
     ;; These two must come after html, because they are more general:
     ("<\\?xml " . xml-mode)
     (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)")
-	     (comment-re (concat "\\(?:!--" incomment-re "*-->\\s *<\\)")))
-	(concat "\\s *<" comment-re "*!DOCTYPE "))
+	     (comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\n]*<\\)")))
+	(concat "[ \t\n]*<" comment-re "*!DOCTYPE "))
      . sgml-mode)
     ("%![^V]" . ps-mode)
     ("# xmcd " . conf-unix-mode))
@@ -2213,42 +2219,79 @@
        (goto-char beg)
        end))))
 
-(defun hack-local-variables-confirm (string flag-to-check)
-  (or (eq flag-to-check t)
-      (and flag-to-check
-	   (save-window-excursion
-	     (condition-case nil
-		 (switch-to-buffer (current-buffer))
-	       (error
-		;; If we fail to switch in the selected window,
-		;; it is probably a minibuffer or dedicated window.
-		;; So try another window.
-		(let ((pop-up-frames nil))
-		  ;; Refrain from popping up frames since it can't
-		  ;; be undone by save-window-excursion.
-		  (pop-to-buffer (current-buffer)))))
-	     (save-excursion
-	       (beginning-of-line)
-	       (set-window-start (selected-window) (point)))
-	     (y-or-n-p (format string
-			       (if buffer-file-name
-				   (file-name-nondirectory buffer-file-name)
-				 (concat "buffer " (buffer-name)))))))))
+(defun hack-local-variables-confirm (vars unsafe-vars risky-vars)
+  (if noninteractive
+      nil
+    (let ((name (if buffer-file-name
+		    (file-name-nondirectory buffer-file-name)
+		  (concat "buffer " (buffer-name))))
+	  char)
+      (save-window-excursion
+	(with-output-to-temp-buffer "*Local Variables*"
+	  (if unsafe-vars
+	      (progn (princ "The local variables list in ")
+		     (princ name)
+		     (princ "\ncontains values that may not be safe (*)")
+		     (if risky-vars
+			 (princ ", and variables that are risky (**).")
+		       (princ ".")))
+	    (if risky-vars
+		(progn (princ "The local variables list in ")
+		       (princ name)
+		       (princ "\ncontains variables that are risky (**)."))
+	      (princ "A local variables list is specified in ")
+	      (princ name)
+	      (princ ".")))
+	  (princ "\n\nDo you want to apply it?  You can type
+y  -- to apply the local variables list.
+n  -- to ignore the local variables list.
+!  -- to apply the local variables list, and mark these values (*) as
+      safe (in the future, they can be set automatically.)\n\n")
+	  (dolist (elt vars)
+	    (cond ((member elt unsafe-vars)
+		   (princ "  * "))
+		  ((member elt risky-vars)
+		   (princ " ** "))
+		  (t
+		   (princ "    ")))
+	    (princ (car elt))
+	    (princ " : ")
+	    (princ (cdr elt))
+	    (princ "\n")))
+	(message "Please type y, n, or !: ")
+	(let ((inhibit-quit t)
+	      (cursor-in-echo-area t))
+	  (while (or (not (numberp (setq char (read-event))))
+		     (not (memq (downcase char)
+				'(?! ?y ?n ?\s ?\C-g))))
+	    (message "Please type y, n, or !: "))
+	  (if (= char ?\C-g)
+	      (setq quit-flag nil)))
+	(setq char (downcase char))
+	(when (and (= char ?!) unsafe-vars)
+	  (dolist (elt unsafe-vars)
+	    (push elt safe-local-variable-values))
+	  (customize-save-variable
+	   'safe-local-variable-values
+	   safe-local-variable-values))
+	(or (= char ?!)
+	    (= char ?\s)
+	    (= char ?y))))))
 
 (defun hack-local-variables-prop-line (&optional mode-only)
-  "Set local variables specified in the -*- line.
+  "Return local variables specified in the -*- line.
 Ignore any specification for `mode:' and `coding:';
 `set-auto-mode' should already have handled `mode:',
 `set-auto-coding' should already have handled `coding:'.
-If MODE-ONLY is non-nil, all we do is check whether the major mode
-is specified, returning t if it is specified."
+
+If MODE-ONLY is non-nil, all we do is check whether the major
+mode is specified, returning t if it is specified.  Otherwise,
+return an alist of elements (VAR . VAL), where VAR is a variable
+and VAL is the specified value."
   (save-excursion
     (goto-char (point-min))
-    (let ((result nil)
-	  (end (set-auto-mode-1))
-	  mode-specified
-	  (enable-local-variables
-	   (and local-enable-local-variables enable-local-variables)))
+    (let ((end (set-auto-mode-1))
+	  result mode-specified)
       ;; Parse the -*- line into the RESULT alist.
       ;; Also set MODE-SPECIFIED if we see a spec or `mode'.
       (cond ((not end)
@@ -2278,128 +2321,163 @@
 		 ;; 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.
-		 (or (equal (downcase (symbol-name key)) "mode")
+		 (or (and (equal (downcase (symbol-name key)) "mode")
+			  (setq mode-specified t))
 		     (equal (downcase (symbol-name key)) "coding")
-		     (setq result (cons (cons key val) result)))
-		 (if (equal (downcase (symbol-name key)) "mode")
-		     (setq mode-specified t))
-		 (skip-chars-forward " \t;")))
-	     (setq result (nreverse result))))
-
-      (if mode-only mode-specified
-	(if (and result
-		 (or mode-only
-		     (hack-local-variables-confirm
-		      "Set local variables as specified in -*- line of %s? "
-		      enable-local-variables)))
-	    (let ((enable-local-eval enable-local-eval))
-	      (while result
-		(hack-one-local-variable (car (car result)) (cdr (car result)))
-		(setq result (cdr result)))))
-	nil))))
+		     (condition-case nil
+			 (push (cons (if (eq key 'eval)
+					 'eval
+				       (indirect-variable key))
+				     val) result)
+		       (error nil)))
+		 (skip-chars-forward " \t;")))))
+
+      (if mode-only
+	  mode-specified
+	result))))
 
 (defvar hack-local-variables-hook nil
   "Normal hook run after processing a file's local variables specs.
 Major modes can use this to examine user-specified local variables
 in order to initialize other data structure based on them.")
 
+(defcustom safe-local-variable-values nil
+  "List variable-value pairs that are considered safe.
+Each element is a cons cell (VAR . VAL), where VAR is a variable
+symbol and VAL is a value that is considered safe."
+  :group 'find-file
+  :type  'alist)
+
 (defun hack-local-variables (&optional mode-only)
   "Parse and put into effect this buffer's local variables spec.
 If MODE-ONLY is non-nil, all we do is check whether the major mode
 is specified, returning t if it is specified."
-  (let ((mode-specified
-	 ;; If MODE-ONLY is t, we check here for specifying the mode
-	 ;; in the -*- line.  If MODE-ONLY is nil, we process
-	 ;; the -*- line here.
-	 (hack-local-variables-prop-line mode-only))
-	(enable-local-variables
-	 (and local-enable-local-variables enable-local-variables)))
-    ;; Look for "Local variables:" line in last page.
-    (save-excursion
-      (goto-char (point-max))
-      (search-backward "\n\^L" (max (- (point-max) 3000) (point-min)) 'move)
-      (when (let ((case-fold-search t))
-	      (and (search-forward "Local Variables:" nil t)
-		   (or mode-only
-		       (hack-local-variables-confirm
-			"Set local variables as specified at end of %s? "
-			enable-local-variables))))
-	(skip-chars-forward " \t")
-	(let ((enable-local-eval enable-local-eval)
-	      ;; suffix is what comes after "local variables:" in its line.
-	      (suffix
-	       (concat
-		(regexp-quote (buffer-substring (point) (line-end-position)))
-		"$"))
-	      ;; prefix is what comes before "local variables:" in its line.
-	      (prefix
-	       (concat "^" (regexp-quote
-			    (buffer-substring (line-beginning-position)
-					      (match-beginning 0)))))
-	      beg)
-
-	  (forward-line 1)
-	  (let ((startpos (point))
-		endpos
-		(thisbuf (current-buffer)))
-	    (save-excursion
-	      (unless (let ((case-fold-search t))
-			(re-search-forward
-			 (concat prefix "[ \t]*End:[ \t]*" suffix)
-			 nil t))
-		(error "Local variables list is not properly terminated"))
-	      (beginning-of-line)
-	      (setq endpos (point)))
-
-	    (with-temp-buffer
-	      (insert-buffer-substring thisbuf startpos endpos)
-	      (goto-char (point-min))
-	      (subst-char-in-region (point) (point-max) ?\^m ?\n)
-	      (while (not (eobp))
-		;; Discard the prefix.
-		(if (looking-at prefix)
-		    (delete-region (point) (match-end 0))
-		  (error "Local variables entry is missing the prefix"))
-		(end-of-line)
-		;; Discard the suffix.
-		(if (looking-back suffix)
-		    (delete-region (match-beginning 0) (point))
-		  (error "Local variables entry is missing the suffix"))
-		(forward-line 1))
-	      (goto-char (point-min))
-
-	      (while (not (eobp))
-		;; Find the variable name; strip whitespace.
-		(skip-chars-forward " \t")
-		(setq beg (point))
-		(skip-chars-forward "^:\n")
-		(if (eolp) (error "Missing colon in local variables entry"))
-		(skip-chars-backward " \t")
-		(let* ((str (buffer-substring beg (point)))
-		       (var (read str))
-		       val)
-		  ;; Read the variable value.
-		  (skip-chars-forward "^:")
-		  (forward-char 1)
-		  (setq val (read (current-buffer)))
-		  (if mode-only
-		      (if (eq var 'mode)
-			  (setq mode-specified t))
-		    ;; Set the variable.  "Variables" mode and eval are funny.
-		    (with-current-buffer thisbuf
-		      (hack-one-local-variable var val))))
-		(forward-line 1)))))))
-    (unless mode-only
-      (run-hooks 'hack-local-variables-hook))
-    mode-specified))
-
-(defvar ignored-local-variables ()
+  (let ((enable-local-variables
+	 (and local-enable-local-variables enable-local-variables))
+	result)
+    (when (or mode-only enable-local-variables)
+      (setq result (hack-local-variables-prop-line mode-only))
+      ;; Look for "Local variables:" line in last page.
+      (save-excursion
+	(goto-char (point-max))
+	(search-backward "\n\^L" (max (- (point-max) 3000) (point-min))
+			 'move)
+	(when (let ((case-fold-search t))
+		(search-forward "Local Variables:" nil t))
+	  (skip-chars-forward " \t")
+	  ;; suffix is what comes after "local variables:" in its line.
+	  ;; prefix is what comes before "local variables:" in its line.
+	  (let ((suffix
+		 (concat
+		  (regexp-quote (buffer-substring (point)
+						  (line-end-position)))
+		  "$"))
+		(prefix
+		 (concat "^" (regexp-quote
+			      (buffer-substring (line-beginning-position)
+						(match-beginning 0)))))
+		beg)
+
+	    (forward-line 1)
+	    (let ((startpos (point))
+		  endpos
+		  (thisbuf (current-buffer)))
+	      (save-excursion
+		(unless (let ((case-fold-search t))
+			  (re-search-forward
+			   (concat prefix "[ \t]*End:[ \t]*" suffix)
+			   nil t))
+		  (error "Local variables list is not properly terminated"))
+		(beginning-of-line)
+		(setq endpos (point)))
+
+	      (with-temp-buffer
+		(insert-buffer-substring thisbuf startpos endpos)
+		(goto-char (point-min))
+		(subst-char-in-region (point) (point-max) ?\^m ?\n)
+		(while (not (eobp))
+		  ;; Discard the prefix.
+		  (if (looking-at prefix)
+		      (delete-region (point) (match-end 0))
+		    (error "Local variables entry is missing the prefix"))
+		  (end-of-line)
+		  ;; Discard the suffix.
+		  (if (looking-back suffix)
+		      (delete-region (match-beginning 0) (point))
+		    (error "Local variables entry is missing the suffix"))
+		  (forward-line 1))
+		(goto-char (point-min))
+
+		(while (not (eobp))
+		  ;; Find the variable name; strip whitespace.
+		  (skip-chars-forward " \t")
+		  (setq beg (point))
+		  (skip-chars-forward "^:\n")
+		  (if (eolp) (error "Missing colon in local variables entry"))
+		  (skip-chars-backward " \t")
+		  (let* ((str (buffer-substring beg (point)))
+			 (var (read str))
+			 val)
+		    ;; Read the variable value.
+		    (skip-chars-forward "^:")
+		    (forward-char 1)
+		    (setq val (read (current-buffer)))
+		    (if mode-only
+			(if (eq var 'mode)
+			    (setq result t))
+		      (unless (eq var 'coding)
+			(condition-case nil
+			    (push (cons (if (eq var 'eval)
+					    'eval
+					  (indirect-variable var))
+					val) result)
+			  (error nil)))))
+		  (forward-line 1)))))))
+
+      ;; We've read all the local variables.  Now, return whether the
+      ;; mode is specified (if MODE-ONLY is non-nil), or set the
+      ;; variables (if MODE-ONLY is nil.)
+      (if mode-only
+	  result
+	(when result
+	  (setq result (nreverse result))
+	  (dolist (ignored ignored-local-variables)
+	    (setq result (assq-delete-all ignored result)))
+	  (if (null enable-local-eval)
+	      (setq result (assq-delete-all 'eval result)))
+	  ;; Find those variables that we may want to save to
+	  ;; `safe-local-variable-values'.
+	  (let (risky-vars unsafe-vars)
+	    (dolist (elt result)
+	      (let ((var (car elt))
+		    (val (cdr elt)))
+		(or (eq var 'mode)
+		    (and (eq var 'eval)
+			 (or (eq enable-local-eval t)
+			     (hack-one-local-variable-eval-safep
+			      (eval (quote val)))))
+		    (safe-local-variable-p var val)
+		    (and (risky-local-variable-p var val)
+			 (push elt risky-vars))
+		    (push elt unsafe-vars))))
+	    (if (or (and (eq enable-local-variables t)
+			 (null unsafe-vars)
+			 (null risky-vars))
+		    (hack-local-variables-confirm
+		     result unsafe-vars risky-vars))
+		(dolist (elt result)
+		  (hack-one-local-variable (car elt) (cdr elt)))))
+	  (run-hooks 'hack-local-variables-hook))))))
+
+(defvar ignored-local-variables
+  '(ignored-local-variables safe-local-variable-values)
   "Variables to be ignored in a file's local variable spec.")
 
 ;; Get confirmation before setting these variables as locals in a file.
 (put 'debugger 'risky-local-variable t)
 (put 'enable-local-eval 'risky-local-variable t)
 (put 'ignored-local-variables 'risky-local-variable t)
+(put 'ignored-local-variables 'safe-local-variable-values t)
 (put 'eval 'risky-local-variable t)
 (put 'file-name-handler-alist 'risky-local-variable t)
 (put 'inhibit-quit 'risky-local-variable t)
@@ -2451,27 +2529,68 @@
 (put 'display-time-string 'risky-local-variable t)
 (put 'parse-time-rules 'risky-local-variable t)
 
-;; This case is safe because the user gets to check it before it is used.
-(put 'compile-command 'safe-local-variable 'stringp)
-
-(defun risky-local-variable-p (sym &optional val)
-  "Non-nil if SYM could be dangerous as a file-local variable with value VAL.
-If VAL is nil or omitted, the question is whether any value might be
-dangerous."
+;; Commonly-encountered local variables that are safe:
+(let ((string-or-null (lambda (a) (or (stringp a) (null a)))))
+  (eval
+   `(mapc (lambda (pair)
+	    (put (car pair) 'safe-local-variable (cdr pair)))
+	  '((byte-compile-dynamic . t)
+	    (c-basic-offset     .  integerp)
+	    (c-file-style       .  stringp)
+	    (c-indent-level     .  integerp)
+	    (comment-column     .  integerp)
+	    (compile-command    . ,string-or-null)
+	    (fill-column        .  integerp)
+	    (fill-prefix        . ,string-or-null)
+	    (indent-tabs-mode   .  t)
+	    (kept-new-versions  .  integerp)
+	    (no-byte-compile    .  t)
+	    (no-update-autoloads . t)
+	    (outline-regexp     . ,string-or-null)
+	    (page-delimiter     . ,string-or-null)
+	    (paragraph-start    . ,string-or-null)
+	    (paragraph-separate . ,string-or-null)
+	    (sentence-end       . ,string-or-null)
+	    (sentence-end-double-space . t)
+	    (tab-width          .  integerp)
+	    (version-control    .  t)))))
+
+(defun safe-local-variable-p (sym val)
+  "Non-nil if SYM is safe as a file-local variable with value VAL.
+It is safe if any of these conditions are met:
+
+ * There is a matching entry (SYM . VAL) in the
+   `safe-local-variable-values' user option.
+
+ * The `safe-local-variable' property of SYM is t.
+
+ * The `safe-local-variable' property of SYM is a function that
+   evaluates to a non-nil value with VAL as an argument."
+  (or (member (cons sym val) safe-local-variable-values)
+      (let ((safep (get sym 'safe-local-variable)))
+	(or (eq safep t)
+	    (and (functionp safep)
+		 (funcall safep val))))))
+
+(defun risky-local-variable-p (sym &optional ignored)
+  "Non-nil if SYM could be dangerous as a file-local variable.
+It is dangerous if either of these conditions are met:
+
+ * Its `risky-local-variable' property is non-nil.
+
+ * Its name ends with \"hook(s)\", \"function(s)\", \"form(s)\", \"map\",
+   \"program\", \"command(s)\", \"predicate(s)\", \"frame-alist\",
+   \"mode-alist\", \"font-lock-(syntactic-)keyword*\", or
+   \"map-alist\"."
   ;; If this is an alias, check the base name.
   (condition-case nil
       (setq sym (indirect-variable sym))
     (error nil))
-  (let ((safep (get sym 'safe-local-variable)))
-    (or (get sym 'risky-local-variable)
-	(and (string-match "-hooks?$\\|-functions?$\\|-forms?$\\|-program$\\|-commands?$\\|-predicates?$\\|font-lock-keywords$\\|font-lock-keywords-[0-9]+$\\|font-lock-syntactic-keywords$\\|-frame-alist$\\|-mode-alist$\\|-map$\\|-map-alist$"
-			   (symbol-name sym))
-	     (not safep))
-	;; If the safe-local-variable property isn't t or nil,
-	;; then it must return non-nil on the proposed value to be safe.
-	(and (not (memq safep '(t nil)))
-	     (or (null val)
-		 (not (funcall safep val)))))))
+  (or (get sym 'risky-local-variable)
+      (string-match "-hooks?$\\|-functions?$\\|-forms?$\\|-program$\\|\
+-commands?$\\|-predicates?$\\|font-lock-keywords$\\|font-lock-keywords\
+-[0-9]+$\\|font-lock-syntactic-keywords$\\|-frame-alist$\\|-mode-alist$\\|\
+-map$\\|-map-alist$" (symbol-name sym))))
 
 (defcustom safe-local-eval-forms nil
   "*Expressions that are considered \"safe\" in an `eval:' local variable.
@@ -2528,35 +2647,12 @@
 		      ok)))))))
 
 (defun hack-one-local-variable (var val)
-  "\"Set\" one variable in a local variables spec.
-A few patterns are specified so that any name which matches one
-is considered risky."
+  "Set local variable VAR with value VAL."
   (cond ((eq var 'mode)
 	 (funcall (intern (concat (downcase (symbol-name val))
 				  "-mode"))))
-	((eq var 'coding)
-	 ;; We have already handled coding: tag in set-auto-coding.
-	 nil)
-	((memq var ignored-local-variables)
-	 nil)
-	;; "Setting" eval means either eval it or do nothing.
-	;; Likewise for setting hook variables.
-	((risky-local-variable-p var val)
-	 ;; Permit evalling a put of a harmless property.
-	 ;; if the args do nothing tricky.
-	 (if (or (and (eq var 'eval)
-		      (hack-one-local-variable-eval-safep val))
-		 ;; Permit eval if not root and user says ok.
-		 (and (not (zerop (user-uid)))
-		      (hack-local-variables-confirm
-		       "Process `eval' or hook local variables in %s? "
-		       enable-local-eval)))
-	     (if (eq var 'eval)
-		 (save-excursion (eval val))
-	       (make-local-variable var)
-	       (set var val))
-	   (message "Ignoring risky spec in the local variables list")))
-	;; Ordinary variable, really set it.
+	((eq var 'eval)
+	 (save-excursion (eval val)))
 	(t (make-local-variable var)
 	   ;; Make sure the string has no text properties.
 	   ;; Some text properties can get evaluated in various ways,
@@ -3795,8 +3891,8 @@
 to nil.
 
 Optional second argument NOCONFIRM means don't ask for confirmation at
-all.  (The local variable `revert-without-query', if non-nil, prevents
-confirmation.)
+all.  \(The variable `revert-without-query' offers another way to
+revert buffers without querying for confirmation.)
 
 Optional third argument PRESERVE-MODES non-nil means don't alter
 the files modes.  Normally we reinitialize them using `normal-mode'.
@@ -3831,13 +3927,10 @@
 	       (error "Buffer does not seem to be associated with any file"))
 	      ((or noconfirm
 		   (and (not (buffer-modified-p))
-			(let ((tail revert-without-query)
-			      (found nil))
-			  (while tail
-			    (if (string-match (car tail) file-name)
-				(setq found t))
-			    (setq tail (cdr tail)))
-			  found))
+			(catch 'found
+			  (dolist (regexp revert-without-query)
+			    (when (string-match regexp file-name)
+			      (throw 'found t)))))
 		   (yes-or-no-p (format "Revert buffer from file %s? "
 					file-name)))
 	       (run-hooks 'before-revert-hook)
@@ -3846,50 +3939,51 @@
 	       (and (not auto-save-p)
 		    (not (verify-visited-file-modtime (current-buffer)))
 		    (setq buffer-backed-up nil))
-	       ;; Get rid of all undo records for this buffer.
-	       (or (eq buffer-undo-list t)
-		   (setq buffer-undo-list nil))
 	       ;; Effectively copy the after-revert-hook status,
 	       ;; since after-find-file will clobber it.
 	       (let ((global-hook (default-value 'after-revert-hook))
-		     (local-hook-p (local-variable-p 'after-revert-hook))
-		     (local-hook (and (local-variable-p 'after-revert-hook)
-				      after-revert-hook)))
-		 (let (buffer-read-only
-		       ;; Don't make undo records for the reversion.
-		       (buffer-undo-list t))
-		   (if revert-buffer-insert-file-contents-function
-		       (funcall revert-buffer-insert-file-contents-function
-				file-name auto-save-p)
-		     (if (not (file-exists-p file-name))
-			 (error (if buffer-file-number
-				    "File %s no longer exists!"
-				  "Cannot revert nonexistent file %s")
-				file-name))
-		     ;; Bind buffer-file-name to nil
-		     ;; so that we don't try to lock the file.
-		     (let ((buffer-file-name nil))
-		       (or auto-save-p
-			   (unlock-buffer)))
-		     (widen)
-		     (let ((coding-system-for-read
-			    ;; Auto-saved file shoule be read by Emacs'
-			    ;; internal coding.
-			    (if auto-save-p 'auto-save-coding
-			      (or coding-system-for-read
-				  buffer-file-coding-system-explicit))))
-		       ;; This force after-insert-file-set-coding
-		       ;; (called from insert-file-contents) to set
-		       ;; buffer-file-coding-system to a proper value.
-		       (kill-local-variable 'buffer-file-coding-system)
-
-		       ;; Note that this preserves point in an intelligent way.
-		       (if preserve-modes
-			   (let ((buffer-file-format buffer-file-format))
-			     (insert-file-contents file-name (not auto-save-p)
-						   nil nil t))
-			 (insert-file-contents file-name (not auto-save-p)
-					       nil nil t)))))
+		     (local-hook (when (local-variable-p 'after-revert-hook)
+				   after-revert-hook))
+		     (inhibit-read-only t))
+		 (cond
+		  (revert-buffer-insert-file-contents-function
+		   (unless (eq buffer-undo-list t)
+		     ;; Get rid of all undo records for this buffer.
+		     (setq buffer-undo-list nil))
+		   ;; Don't make undo records for the reversion.
+		   (let ((buffer-undo-list t))
+		     (funcall revert-buffer-insert-file-contents-function
+			      file-name auto-save-p)))
+		  ((not (file-exists-p file-name))
+		   (error (if buffer-file-number
+			      "File %s no longer exists!"
+			    "Cannot revert nonexistent file %s")
+			  file-name))
+		  (t
+		   ;; Bind buffer-file-name to nil
+		   ;; so that we don't try to lock the file.
+		   (let ((buffer-file-name nil))
+		     (or auto-save-p
+			 (unlock-buffer)))
+		   (widen)
+		   (let ((coding-system-for-read
+			  ;; Auto-saved file should be read by Emacs'
+			  ;; internal coding.
+			  (if auto-save-p 'auto-save-coding
+			    (or coding-system-for-read
+				buffer-file-coding-system-explicit))))
+		     ;; This force after-insert-file-set-coding
+		     ;; (called from insert-file-contents) to set
+		     ;; buffer-file-coding-system to a proper value.
+		     (kill-local-variable 'buffer-file-coding-system)
+
+		     ;; Note that this preserves point in an intelligent way.
+		     (if preserve-modes
+			 (let ((buffer-file-format buffer-file-format))
+			   (insert-file-contents file-name (not auto-save-p)
+						 nil nil t))
+		       (insert-file-contents file-name (not auto-save-p)
+					     nil nil t)))))
 		 ;; Recompute the truename in case changes in symlinks
 		 ;; have changed the truename.
 		 (setq buffer-file-truename
@@ -3897,7 +3991,7 @@
 		 (after-find-file nil nil t t preserve-modes)
 		 ;; Run after-revert-hook as it was before we reverted.
 		 (setq-default revert-buffer-internal-hook global-hook)
-		 (if local-hook-p
+		 (if local-hook
 		     (set (make-local-variable 'revert-buffer-internal-hook)
 			  local-hook)
 		   (kill-local-variable 'revert-buffer-internal-hook))
@@ -3943,7 +4037,7 @@
 		   (insert-directory-safely file-name switches))))
 	     (yes-or-no-p (format "Recover auto save file %s? " file-name)))
 	   (switch-to-buffer (find-file-noselect file t))
-	   (let ((buffer-read-only nil)
+	   (let ((inhibit-read-only t)
 		 ;; Keep the current buffer-file-coding-system.
 		 (coding-system buffer-file-coding-system)
 		 ;; Auto-saved file shoule be read with special coding.
--- a/lisp/find-lisp.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/find-lisp.el	Tue Feb 14 05:54:12 2006 +0000
@@ -359,9 +359,5 @@
 
 (provide 'find-lisp)
 
-;; Local Variables:
-;; autocompile: t
-;; End:
-
 ;;; arch-tag: a711374c-f12a-46f6-aa18-ba7d77b9602a
 ;;; find-lisp.el ends here
--- a/lisp/help.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/help.el	Tue Feb 14 05:54:12 2006 +0000
@@ -556,13 +556,39 @@
 	    string
 	  (format "%s (translated from %s)" string otherstring))))))
 
-(defun describe-key-briefly (key &optional insert untranslated)
+(defun describe-key-briefly (&optional key insert untranslated)
   "Print the name of the function KEY invokes.  KEY is a string.
 If INSERT (the prefix arg) is non-nil, insert the message in the buffer.
-If non-nil UNTRANSLATED is a vector of the untranslated events.
+If non-nil, UNTRANSLATED is a vector of the untranslated events.
 It can also be a number in which case the untranslated events from
-the last key hit are used."
-  (interactive "kDescribe key briefly: \nP\np")
+the last key hit are used.
+
+If KEY is a menu item or a tool-bar button that is disabled, this command
+temporarily enables it to allow getting help on disabled items and buttons."
+  (interactive
+   (let ((enable-disabled-menus-and-buttons t)
+	 (cursor-in-echo-area t)
+	 saved-yank-menu)
+     (unwind-protect
+	 (let (key)
+	   ;; If yank-menu is empty, populate it temporarily, so that
+	   ;; "Select and Paste" menu can generate a complete event.
+	   (when (null (cdr yank-menu))
+	     (setq saved-yank-menu (copy-sequence yank-menu))
+	     (menu-bar-update-yank-menu "(any string)" nil))
+	   (setq key (read-key-sequence "Describe key (or click or menu item): "))
+	   (list
+	    key
+	    (prefix-numeric-value current-prefix-arg)
+	    ;; If KEY is a down-event, read the corresponding up-event
+	    ;; and use it as the third argument.
+	    (if (and (consp key) (symbolp (car key))
+		     (memq 'down (cdr (get (car key) 'event-symbol-elements))))
+		(read-event))))
+       ;; Put yank-menu back as it was, if we changed it.
+       (when saved-yank-menu
+	 (setq yank-menu (copy-sequence saved-yank-menu))
+	 (fset 'yank-menu (cons 'keymap yank-menu))))))
   (if (numberp untranslated)
       (setq untranslated (this-single-command-raw-keys)))
   (save-excursion
@@ -584,6 +610,11 @@
       (let ((defn (or (string-key-binding key)
 		      (key-binding key t)))
 	    key-desc)
+	;; Handle the case where we faked an entry in "Select and Paste" menu.
+	(if (and (eq defn nil)
+		 (stringp (aref key (1- (length key))))
+		 (eq (key-binding (substring key 0 -1)) 'yank-menu))
+	    (setq defn 'menu-bar-select-yank))
 	;; Don't bother user with strings from (e.g.) the select-paste menu.
 	(if (stringp (aref key (1- (length key))))
 	    (aset key (1- (length key)) "(any string)"))
@@ -601,7 +632,7 @@
 			 key-desc
 			 (if (symbolp defn) defn (prin1-to-string defn)))))))))
 
-(defun describe-key (key &optional untranslated up-event)
+(defun describe-key (&optional key untranslated up-event)
   "Display documentation of the function invoked by KEY.
 KEY can be any kind of a key sequence; it can include keyboard events,
 mouse events, and/or menu events.  When calling from a program,
@@ -609,9 +640,35 @@
 
 If non-nil, UNTRANSLATED is a vector of the corresponding untranslated events.
 It can also be a number, in which case the untranslated events from
-the last key sequence entered are used."
-  ;; UP-EVENT is the up-event that was discarded by reading KEY, or nil.
-  (interactive "kDescribe key (or click or menu item): \np\nU")
+the last key sequence entered are used.
+UP-EVENT is the up-event that was discarded by reading KEY, or nil.
+
+If KEY is a menu item or a tool-bar button that is disabled, this command
+temporarily enables it to allow getting help on disabled items and buttons."
+  (interactive
+   (let ((enable-disabled-menus-and-buttons t)
+	 (cursor-in-echo-area t)
+	 saved-yank-menu)
+     (unwind-protect
+	 (let (key)
+	   ;; If yank-menu is empty, populate it temporarily, so that
+	   ;; "Select and Paste" menu can generate a complete event.
+	   (when (null (cdr yank-menu))
+	     (setq saved-yank-menu (copy-sequence yank-menu))
+	     (menu-bar-update-yank-menu "(any string)" nil))
+	   (setq key (read-key-sequence "Describe key (or click or menu item): "))
+	   (list
+	    key
+	    (prefix-numeric-value current-prefix-arg)
+	    ;; If KEY is a down-event, read the corresponding up-event
+	    ;; and use it as the third argument.
+	    (if (and (consp key) (symbolp (car key))
+		     (memq 'down (cdr (get (car key) 'event-symbol-elements))))
+		(read-event))))
+       ;; Put yank-menu back as it was, if we changed it.
+       (when saved-yank-menu
+	 (setq yank-menu (copy-sequence saved-yank-menu))
+	 (fset 'yank-menu (cons 'keymap yank-menu))))))
   (if (numberp untranslated)
       (setq untranslated (this-single-command-raw-keys)))
   (save-excursion
@@ -628,6 +685,11 @@
 	    (set-buffer (window-buffer window))
 	(goto-char position))
       (let ((defn (or (string-key-binding key) (key-binding key t))))
+	;; Handle the case where we faked an entry in "Select and Paste" menu.
+	(if (and (eq defn nil)
+		 (stringp (aref key (1- (length key))))
+		 (eq (key-binding (substring key 0 -1)) 'yank-menu))
+	    (setq defn 'menu-bar-select-yank))
 	(if (or (null defn) (integerp defn) (equal defn 'undefined))
 	    (message "%s is undefined" (help-key-description key untranslated))
 	  (help-setup-xref (list #'describe-function defn) (interactive-p))
--- a/lisp/icomplete.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/icomplete.el	Tue Feb 14 05:54:12 2006 +0000
@@ -325,7 +325,7 @@
 
 ;;;_* Local emacs vars.
 ;;;Local variables:
-;;;outline-layout: (-2 :)
+;;;allout-layout: (-2 :)
 ;;;End:
 
 ;; arch-tag: 339ec25a-0741-4eb6-be63-997532e89b0f
--- a/lisp/ido.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/ido.el	Tue Feb 14 05:54:12 2006 +0000
@@ -2022,9 +2022,10 @@
 	(if (eq method 'insert)
 	    (progn
 	      (ido-record-command 'insert-buffer buf)
-	      (with-no-warnings
-		;; we really want to run insert-buffer here
-		(insert-buffer buf)))
+	      (push-mark
+	       (save-excursion
+		 (insert-buffer-substring (get-buffer buf))
+		 (point))))
 	  (ido-visit-buffer buf method t)))
 
        ;; buffer doesn't exist
@@ -2225,9 +2226,10 @@
 	 (if ido-find-literal 'insert-file-literally 'insert-file)
 	 filename)
 	(ido-record-work-directory)
-	(if ido-find-literal
-	    (insert-file-contents-literally filename)
-	  (insert-file-contents filename)))
+	(insert-file-1 filename
+		       (if ido-find-literal
+			   #'insert-file-contents-literally
+			 #'insert-file-contents)))
 
        (filename
 	(ido-record-work-file filename)
--- a/lisp/info.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/info.el	Tue Feb 14 05:54:12 2006 +0000
@@ -134,7 +134,7 @@
   :group 'info)
 
 (defface info-xref-visited
-  '((t :inherit link-visited))
+  '((t :inherit (link-visited info-xref)))
   "Face for visited Info cross-references."
   :version "22.1"
   :group 'info)
@@ -1407,11 +1407,13 @@
 		(concat
 		 " ("
 		 (if (stringp Info-current-file)
-		     (file-name-nondirectory Info-current-file)
+		     (replace-regexp-in-string
+		      "%" "%%" (file-name-nondirectory Info-current-file))
 		   "")
 		 ") "
 		 (if Info-current-node
-		     (propertize Info-current-node
+		     (propertize (replace-regexp-in-string
+				  "%" "%%" Info-current-node)
 				 'face 'mode-line-buffer-id
 				 'help-echo
 				 "mouse-1: scroll forward, mouse-3: scroll back"
@@ -3352,7 +3354,7 @@
 \\[Info-search-case-sensitively]	Search through this Info file for specified regexp case-sensitively.
 \\[Info-search-next]	Search for another occurrence of regexp
 	  from a previous \\<Info-mode-map>\\[Info-search] command.
-\\[Info-index]	Look up a topic in this manual's Index and move to that index entry.
+\\[Info-index]	Search for a topic in this manual's Index and go to index entry.
 \\[Info-index-next]	(comma) Move to the next match from a previous \\<Info-mode-map>\\[Info-index] command.
 \\[info-apropos]	Look for a string in the indices of all manuals.
 \\[Info-goto-node]	Move to node specified by name.
--- a/lisp/menu-bar.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/menu-bar.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1502,6 +1502,8 @@
 
 (put 'menu-bar-select-yank 'apropos-inhibit t)
 (defun menu-bar-select-yank ()
+  "Insert the stretch of previously-killed text selected from menu.
+The menu shows all the killed text sequences stored in `kill-ring'."
   (interactive "*")
   (push-mark (point))
   (insert last-command-event))
--- a/lisp/mouse.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/mouse.el	Tue Feb 14 05:54:12 2006 +0000
@@ -481,21 +481,8 @@
 
 		 ;; grow/shrink minibuffer?
 		 (if should-enlarge-minibuffer
-		     (progn
-		       ;; yes.  briefly select minibuffer so
-		       ;; enlarge-window will affect the
-		       ;; correct window.
-		       (select-window minibuffer)
-		       ;; scale back shrinkage if it would
-		       ;; make the minibuffer less than 1
-		       ;; line tall.
-		       (if (and (> growth 0)
-				(< (- (window-height minibuffer)
-				      growth)
-				   1))
-			   (setq growth (1- (window-height minibuffer))))
-		       (enlarge-window (- growth))
-		       (select-window start-event-window))
+		     (unless resize-mini-windows
+		       (mouse-drag-move-window-bottom start-event-window growth))
 		   ;; no.  grow/shrink the selected window
 		   ;(message "growth = %d" growth)
 		   (if mode-line-p
--- a/lisp/mwheel.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/mwheel.el	Tue Feb 14 05:54:12 2006 +0000
@@ -77,7 +77,7 @@
       'wheel-down
     (intern (format (if (featurep 'xemacs) "button%s" "mouse-%s")
 		    mouse-wheel-up-button)))
-  "Event used for scrolling down."
+  "Event used for scrolling up."
   :group 'mouse
   :type 'symbol
   :set 'mouse-wheel-change-button)
--- a/lisp/net/rcirc.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/net/rcirc.el	Tue Feb 14 05:54:12 2006 +0000
@@ -195,6 +195,12 @@
   :type '(repeat string)
   :group 'rcirc)
 
+(defcustom rcirc-nick-abbrevs nil
+  "List of short replacements for printing nicks."
+  :type '(alist :key-type (string :tag "Nick")
+		:value-type (string :tag "Abbrev"))
+  :group 'rcirc)
+
 (defvar rcirc-ignore-list-automatic ()
   "List of ignored nicks added to `rcirc-ignore-list' because of renaming.
 When an ignored person renames, their nick is added to both lists.
@@ -480,6 +486,11 @@
   (with-rcirc-process-buffer process
     rcirc-nick))
 
+(defun rcirc-abbrev-nick (nick)
+  "If NICK has an entry in `rcirc-nick-abbrevs', return its abbreviation,
+otherwise return NICK."
+  (or (cdr (assoc nick rcirc-nick-abbrevs)) nick))
+
 (defvar rcirc-max-message-length 450
   "Messages longer than this value will be split.")
 
@@ -895,48 +906,109 @@
 	buffer
       (process-buffer process))))
 
+(defcustom rcirc-response-formats
+  '(("PRIVMSG" . "%T<%n> %m")
+    ("NOTICE"  . "%T-%n- %m")
+    ("ACTION"  . "%T[%n] %m")
+    ("COMMAND" . "%T%m")
+    ("ERROR"   . "%T%fw!!! %m")
+    (t         . "%T%fp*** %fs%n %r %m"))
+  "An alist of formats used for printing responses.
+The format is looked up using the response-type as a key;
+if no match is found, the default entry (with a key of `t') is used.
+
+The entry's value part should be a string, which is inserted with
+the of the following escape sequences replaced by the described values:
+
+  %m        The message text
+  %n        The sender's nick (with face `rcirc-my-nick' or `rcirc-other-nick')
+  %r        The response-type
+  %T        The timestamp (with face `rcirc-timestamp')
+  %t        The target
+  %fw       Following text uses the face `font-lock-warning-face'
+  %fp       Following text uses the face `rcirc-server-prefix'
+  %fs       Following text uses the face `rcirc-server'
+  %f[FACE]  Following text uses the face FACE
+  %f-       Following text uses the default face
+  %%        A literal `%' character
+"
+  :type '(alist :key-type (choice (string :tag "Type")
+				  (const :tag "Default" t))
+		:value-type string)
+  :group 'rcirc)
+
 (defun rcirc-format-response-string (process sender response target text)
-  (concat (rcirc-facify (format-time-string rcirc-time-format (current-time))
-			'rcirc-timestamp)
-          (cond ((or (string= response "PRIVMSG")
-                     (string= response "NOTICE")
-                     (string= response "ACTION"))
-                 (let (first middle end)
-                   (cond ((string= response "PRIVMSG")
-                          (setq first "<" middle "> "))
-                         ((string= response "NOTICE")
-			  (when sender
-			    (setq first "-" middle "- ")))
-                         (t
-                          (setq first "[" middle " " end "]")))
-                   (concat first
-                           (rcirc-facify (concat
-					  sender
-					  (when target (concat "," target)))
-                                         (if (string= sender
-                                                      (rcirc-nick process))
-                                             'rcirc-my-nick
-                                           'rcirc-other-nick))
-			   middle
-			   (rcirc-mangle-text process text)
-                           end)))
-                ((string= response "COMMAND")
-                 text)
-                ((string= response "ERROR")
-                 (propertize (concat "!!! " text)
-			     'face 'font-lock-warning-face))
-                (t
-                 (rcirc-mangle-text
-                  process
-		  (concat (rcirc-facify "*** " 'rcirc-server-prefix)
-			  (rcirc-facify
-			   (concat
-			    (when (not (string= sender (rcirc-server process)))
-			      (concat sender " "))
-			    (when (zerop (string-to-number response))
-			      (concat response " "))
-			    text)
-			   'rcirc-server)))))))
+  "Return a nicely-formatted response string, incorporating TEXT
+\(and perhaps other arguments).  The specific formatting used
+is found by looking up RESPONSE in `rcirc-response-formats'."
+  (let ((chunks
+	 (split-string (or (cdr (assoc response rcirc-response-formats))
+			   (cdr (assq t rcirc-response-formats)))
+		       "%"))
+	(result "")
+	(face nil)
+	key face-key repl)
+    (when (equal (car chunks) "")
+      (pop chunks))
+    (dolist (chunk chunks)
+      (if (equal chunk "")
+	  (setq key ?%)
+	(setq key (aref chunk 0))
+	(setq chunk (substring chunk 1)))
+      (setq repl
+	    (cond ((eq key ?%)
+		   ;; %% -- literal % character
+		   "%")
+		  ((eq key ?n)
+		   ;; %n -- nick
+		   (rcirc-facify (concat (rcirc-abbrev-nick sender)
+					 (and target (concat "," target)))
+				 (if (string= sender (rcirc-nick process))
+				     'rcirc-my-nick
+				   'rcirc-other-nick)))
+		  ((eq key ?T)
+		   ;; %T -- timestamp
+		   (rcirc-facify
+		    (format-time-string rcirc-time-format (current-time))
+		    'rcirc-timestamp))
+		  ((eq key ?m)
+		   ;; %m -- message text
+		   ;; We add the text property `rcirc-text' to identify this
+		   ;; as the body text.
+		   (propertize
+		    (rcirc-mangle-text process (rcirc-facify text face))
+		    'rcirc-text text))
+		  ((eq key ?t)
+		   ;; %t -- target
+		   (rcirc-facify (or rcirc-target "") face))
+		  ((eq key ?r)
+		   ;; %r -- response
+		   (rcirc-facify response face))
+		  ((eq key ?f)
+		   ;; %f -- change face
+		   (setq face-key (aref chunk 0))
+		   (setq chunk (substring chunk 1))
+		   (cond ((eq face-key ?w)
+			  ;; %fw -- warning face
+			  (setq face 'font-lock-warning-face))
+			 ((eq face-key ?p)
+			  ;; %fp -- server-prefix face
+			  (setq face 'rcirc-server-prefix))
+			 ((eq face-key ?s)
+			  ;; %fs -- warning face
+			  (setq face 'rcirc-server))
+			 ((eq face-key ?-)
+			  ;; %fs -- warning face
+			  (setq face nil))
+			 ((and (eq face-key ?\[)
+			       (string-match "^\\([^]]*\\)[]]" chunk)
+			       (facep (match-string 1 chunk)))
+			  ;; %f[...] -- named face
+			  (setq face (intern (match-string 1 chunk)))
+			  (setq chunk (substring chunk (match-end 0)))))
+		   "")))
+      (setq result (concat result repl (rcirc-facify chunk face))))
+    result))
 
 (defun rcirc-target-buffer (process sender response target text)
   "Return a buffer to print the server response."
@@ -988,38 +1060,31 @@
 	  (goto-char rcirc-prompt-start-marker)
 	  (set-marker-insertion-type rcirc-prompt-start-marker t)
 	  (set-marker-insertion-type rcirc-prompt-end-marker t)
-	  (insert
-	   (rcirc-format-response-string process sender response nil text)
-	   (propertize "\n" 'hard t))
-	  (set-marker-insertion-type rcirc-prompt-start-marker nil)
-	  (set-marker-insertion-type rcirc-prompt-end-marker nil)
+
+	  (let ((fmted-text
+		 (rcirc-format-response-string process sender response nil
+					       text)))
+
+	    (insert fmted-text (propertize "\n" 'hard t))
+	    (set-marker-insertion-type rcirc-prompt-start-marker nil)
+	    (set-marker-insertion-type rcirc-prompt-end-marker nil)
 
-	  ;; fill the text we just inserted, maybe
-	  (when (and rcirc-fill-flag
-		     (not (string= response "372"))) ;/motd
-	    (let ((fill-prefix
-		   (or rcirc-fill-prefix
-		       (make-string
-			(+ (if rcirc-time-format
-			       (length (format-time-string
-					rcirc-time-format))
-			     0)
-			   (cond ((or (string= response "PRIVMSG")
-				      (string= response "NOTICE"))
-				  (+ (length sender)
-				     2)) ; <>
-				 ((string= response "ACTION")
-				  (+ (length sender)
-				     1))	; [
-				 (t 3))		; ***
-			   1)
-			?\s)))
-		  (fill-column (cond ((eq rcirc-fill-column 'frame-width)
-				      (1- (frame-width)))
-				     (rcirc-fill-column
-				      rcirc-fill-column)
-				     (t fill-column))))
-	      (fill-region fill-start rcirc-prompt-start-marker 'left t)))
+	    ;; fill the text we just inserted, maybe
+	    (when (and rcirc-fill-flag
+		       (not (string= response "372"))) ;/motd
+	      (let ((fill-prefix
+		     (or rcirc-fill-prefix
+			 (make-string
+			  (or (next-single-property-change 0 'rcirc-text
+							   fmted-text)
+			      8)
+			  ?\s)))
+		    (fill-column (cond ((eq rcirc-fill-column 'frame-width)
+					(1- (frame-width)))
+				       (rcirc-fill-column
+					rcirc-fill-column)
+				       (t fill-column))))
+		(fill-region fill-start rcirc-prompt-start-marker 'left t))))
 
 	  ;; set inserted text to be read-only
 	  (when rcirc-read-only-flag
--- a/lisp/net/tramp.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/net/tramp.el	Tue Feb 14 05:54:12 2006 +0000
@@ -836,8 +836,10 @@
   :type 'string)
 
 (defcustom tramp-remote-path
-  '("/bin" "/usr/bin" "/usr/sbin" "/usr/local/bin" "/usr/ccs/bin"
-    "/local/bin" "/local/freeware/bin" "/local/gnu/bin"
+  ;; "/usr/xpg4/bin" has been placed first, because on Solaris a POSIX
+  ;; compatible "id" is needed.
+  '("/usr/xpg4/bin" "/bin" "/usr/bin" "/usr/sbin" "/usr/local/bin"
+    "/usr/ccs/bin" "/local/bin" "/local/freeware/bin" "/local/gnu/bin"
     "/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin")
   "*List of directories to search for executables on remote host.
 Please notify me about other semi-standard directories to include here.
@@ -1735,7 +1737,7 @@
 (defvar tramp-perl-encode
   "%s -e '
 # This script contributed by Juanma Barranquero <lektu@terra.es>.
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006 Free Software Foundation, Inc.
 use strict;
 
 my %%trans = do {
@@ -1777,7 +1779,7 @@
 (defvar tramp-perl-decode
   "%s -e '
 # This script contributed by Juanma Barranquero <lektu@terra.es>.
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006 Free Software Foundation, Inc.
 use strict;
 
 my %%trans = do {
--- a/lisp/play/landmark.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/play/landmark.el	Tue Feb 14 05:54:12 2006 +0000
@@ -1694,13 +1694,13 @@
 
 ;;;_ + Local variables
 
-;;; The following `outline-layout' local variable setting:
+;;; The following `allout-layout' local variable setting:
 ;;;  - closes all topics from the first topic to just before the third-to-last,
 ;;;  - shows the children of the third to last (config vars)
 ;;;  - and the second to last (code section),
 ;;;  - and closes the last topic (this local-variables section).
 ;;;Local variables:
-;;;outline-layout: (0 : -1 -1 0)
+;;;allout-layout: (0 : -1 -1 0)
 ;;;End:
 
 (provide 'landmark)
--- a/lisp/progmodes/ebrowse.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/progmodes/ebrowse.el	Tue Feb 14 05:54:12 2006 +0000
@@ -4236,7 +4236,7 @@
   "*Keymap for Ebrowse commands.")
 
 
-(defvar ebrowse-global-prefix-key "\C-cb"
+(defvar ebrowse-global-prefix-key "\C-cC-m"
   "Prefix key for Ebrowse commands.")
 
 
--- a/lisp/progmodes/gdb-ui.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/progmodes/gdb-ui.el	Tue Feb 14 05:54:12 2006 +0000
@@ -571,7 +571,7 @@
 	(set-text-properties 0 (length expr) nil expr)
 	(gdb-enqueue-input
 	 (list
-	  (if (eq gud-minor-mode 'gdba)
+	  (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
 	      (concat "server interpreter mi \"-var-create - * "  expr "\"\n")
 	    (concat"-var-create - * "  expr "\n"))
 	  `(lambda () (gdb-var-create-handler ,expr))))))))
@@ -594,8 +594,7 @@
 	  (speedbar-change-initial-expansion-list "GUD"))
 	(gdb-enqueue-input
 	 (list
-	  (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
-		  'gdba)
+	  (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
 	      (concat "server interpreter mi \"-var-evaluate-expression "
 		      (nth 1 var) "\"\n")
 	    (concat "-var-evaluate-expression " (nth 1 var) "\n"))
@@ -743,13 +742,11 @@
 TOKEN is data related to this node.
 INDENT is the current indentation depth."
   (cond ((string-match "+" text)        ;expand this node
-	 (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
-	     (if (string-equal gdb-version "pre-6.4")
-		 (gdb-var-list-children token)
-	       (gdb-var-list-children-1 token))
-	   (progn
-	     (gdbmi-var-update)
-	     (gdbmi-var-list-children token))))
+	 (if (and
+	      (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
+	      (string-equal gdb-version "pre-6.4"))
+	     (gdb-var-list-children token)
+	   (gdb-var-list-children-1 token)))
 	((string-match "-" text)	;contract this node
 	 (dolist (var gdb-var-list)
 	   (if (string-match (concat token "\\.") (nth 1 var))
@@ -1195,7 +1192,7 @@
 
     (if (string-equal gdb-version "pre-6.4")
 	(gdb-invalidate-registers)
-      (if (gdb-get-buffer 'gdb-registers-buffer) (gdb-get-changed-registers))
+      (gdb-get-changed-registers)
       (gdb-invalidate-registers-1))
 
     (gdb-invalidate-memory)
@@ -1498,7 +1495,7 @@
     ;; Remove all breakpoint-icons in source buffers but not assembler buffer.
     (dolist (buffer (buffer-list))
       (with-current-buffer buffer
-	(if (and (eq gud-minor-mode 'gdba)
+	(if (and (memq gud-minor-mode '(gdba gdbmi))
 		 (not (string-match "\\`\\*.+\\*\\'" (buffer-name))))
 	    (gdb-remove-breakpoint-icons (point-min) (point-max)))))
     (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer)
@@ -1633,7 +1630,7 @@
 (defvar gdb-breakpoints-mode-map
   (let ((map (make-sparse-keymap))
 	(menu (make-sparse-keymap "Breakpoints")))
-    (define-key menu [quit] '("Quit"   . kill-this-buffer))
+    (define-key menu [quit] '("Quit"   . gdb-delete-frame-or-window))
     (define-key menu [goto] '("Goto"   . gdb-goto-breakpoint))
     (define-key menu [delete] '("Delete" . gdb-delete-breakpoint))
     (define-key menu [toggle] '("Toggle" . gdb-toggle-breakpoint))
@@ -1668,15 +1665,15 @@
       'gdb-invalidate-breakpoints
     'gdbmi-invalidate-breakpoints))
 
+(defconst gdb-breakpoint-regexp
+  "\\([0-9]+\\).*?\\(?:point\\|catch\\s-+\\S-+\\)\\s-+\\S-+\\s-+\\(.\\)\\s-+")
+
 (defun gdb-toggle-breakpoint ()
   "Enable/disable breakpoint at current line."
   (interactive)
   (save-excursion
     (beginning-of-line 1)
-    (if (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
-	    (looking-at "\\([0-9]+\\).*?point\\s-+\\S-+\\s-+\\(.\\)\\s-+")
-	  (looking-at
-     "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+\\S-+\\s-+\\S-+:[0-9]+"))
+    (if (looking-at gdb-breakpoint-regexp)
 	(gdb-enqueue-input
 	 (list
 	  (concat gdb-server-prefix
@@ -1690,10 +1687,7 @@
   "Delete the breakpoint at current line."
   (interactive)
   (beginning-of-line 1)
-  (if (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
-	  (looking-at "\\([0-9]+\\).*?point\\s-+\\S-+\\s-+\\(.\\)")
-	(looking-at
-	 "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\s-+\\S-+\\s-+\\S-+:[0-9]+"))
+  (if (looking-at gdb-breakpoint-regexp)
       (gdb-enqueue-input
        (list
 	(concat gdb-server-prefix "delete " (match-string 1) "\n") 'ignore))
@@ -1708,11 +1702,7 @@
     (if window (save-selected-window  (select-window window))))
   (save-excursion
     (beginning-of-line 1)
-    (if (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
-	    (looking-at "\\([0-9]+\\) .+ in .+ at\\s-+\\(\\S-+\\):\\([0-9]+\\)")
-	  (looking-at
-	   "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+.\\s-+\\S-+\\s-+\
-\\(\\S-+\\):\\([0-9]+\\)"))
+    (if (looking-at "\\([0-9]+\\) .+ in .+ at\\s-+\\(\\S-+\\):\\([0-9]+\\)")
 	(let ((bptno (match-string 1))
 	      (file  (match-string 2))
 	      (line  (match-string 3)))
@@ -1724,7 +1714,7 @@
 	      (with-current-buffer buf
 		(goto-line (string-to-number line))
 		(set-window-point window (point))))))
-      (error "Not recognized as break/watchpoint line"))))
+      (error "No location specified."))))
 
 
 ;; Frames buffer.  This displays a perpetually correct bactracktrace
@@ -2416,11 +2406,10 @@
   (set (make-local-variable 'font-lock-defaults)
        '(gdb-locals-font-lock-keywords))
   (run-mode-hooks 'gdb-locals-mode-hook)
-  (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
-      (if (string-equal gdb-version "pre-6.4")
-	  'gdb-invalidate-locals
-	'gdb-invalidate-locals-1)
-    'gdbmi-invalidate-locals))
+  (if (and (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
+	   (string-equal gdb-version "pre-6.4"))
+      'gdb-invalidate-locals
+    'gdb-invalidate-locals-1))
 
 (defun gdb-locals-buffer-name ()
   (with-current-buffer gud-comint-buffer
@@ -2684,11 +2673,12 @@
   (if (and (buffer-name gud-comint-buffer)
 	   ;; in case gud or gdb-ui is just loaded
 	   gud-comint-buffer
-	   (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
-	       'gdba))
+	   (memq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
+	       '(gdba gdbmi)))
       (if (member buffer-file-name gdb-source-file-list)
 	  (with-current-buffer (find-buffer-visiting buffer-file-name)
-	    (set (make-local-variable 'gud-minor-mode) 'gdba)
+	    (set (make-local-variable 'gud-minor-mode)
+		 (buffer-local-value 'gud-minor-mode gud-comint-buffer))
 	    (set (make-local-variable 'tool-bar-map) gud-tool-bar-map)))))
 
 ;;from put-image
@@ -2973,30 +2963,25 @@
 (defun gdb-xbacktrace ()
   "Generate a full lisp level backtrace with arguments."
   (interactive)
-  (setq my-frames nil)
-  (with-current-buffer (get-buffer-create "xbacktrace")
-    (erase-buffer))
-  (let (frame-number gdb-frame-number)
+  (let ((frames nil)
+	(frame-number gdb-frame-number))
     (with-current-buffer (gdb-get-buffer 'gdb-stack-buffer)
       (save-excursion
 	(goto-char (point-min))
 	(while (search-forward "in Ffuncall " nil t)
 	  (goto-char (line-beginning-position))
 	  (looking-at "^#\\([0-9]+\\)")
-	  (push (match-string-no-properties 1) my-frames)
+	  (push (match-string-no-properties 1) frames)
 	  (forward-line 1))))
-    (dolist (frame my-frames)
+    (dolist (frame frames)
       (gdb-enqueue-input (list (concat "server frame " frame "\n")
 			       'ignore))
+;     can't use separate buffer because Emacs gets confused by starting
+;     annotation from debug1_print (with output-sink eq 'emacs)
 ;    (gdb-enqueue-input (list "server ppargs\n" 'gdb-get-arguments))
-      (gud-basic-call "server ppargs")
-)
+      (gud-basic-call "server ppargs"))
     (gdb-enqueue-input (list (concat "server frame " frame-number "\n")
 			     'ignore))))
-    
-(defun gdb-get-arguments ()
-  (with-current-buffer "xbacktrace"
-    (insert-buffer-substring (gdb-get-buffer 'gdb-partial-output-buffer))))
 
 ;; Code specific to GDB 6.4
 (defconst gdb-source-file-regexp-1 "fullname=\"\\(.*?\\)\"")
@@ -3009,7 +2994,8 @@
   (dolist (buffer (buffer-list))
     (with-current-buffer buffer
       (when (member buffer-file-name gdb-source-file-list)
-	(set (make-local-variable 'gud-minor-mode) 'gdba)
+	(set (make-local-variable 'gud-minor-mode)
+	     (buffer-local-value 'gud-minor-mode gud-comint-buffer))
 	(set (make-local-variable 'tool-bar-map) gud-tool-bar-map)
 	(when gud-tooltip-mode
 	  (make-local-variable 'gdb-define-alist)
@@ -3019,12 +3005,12 @@
 ; Uses "-var-list-children --all-values".  Needs GDB 6.1 onwards.
 (defun gdb-var-list-children-1 (varnum)
   (gdb-enqueue-input
-   (list (concat "server interpreter mi \"-var-update " varnum "\"\n")
-	 'ignore))
-  (gdb-enqueue-input
-   (list (concat "server interpreter mi \"-var-list-children --all-values "  
-		 varnum "\"\n")
-	     `(lambda () (gdb-var-list-children-handler-1 ,varnum)))))
+   (list
+    (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
+	(concat "server interpreter mi \"-var-list-children --all-values "  
+		varnum "\"\n")
+      (concat "-var-list-children --all-values " varnum "\n"))
+    `(lambda () (gdb-var-list-children-handler-1 ,varnum)))))
 
 (defconst gdb-var-list-children-regexp-1
   "name=\"\\(.+?\\)\",exp=\"\\(.+?\\)\",numchild=\"\\(.+?\\)\",\
@@ -3059,10 +3045,10 @@
       (progn
 	(gdb-enqueue-input
 	 (list
-	  (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
+	  (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
 	      "server interpreter mi \"-var-update --all-values *\"\n"
 	    "-var-update --all-values *\n")
-				 'gdb-var-update-handler-1))
+	  'gdb-var-update-handler-1))
 	(push 'gdb-var-update gdb-pending-triggers))))
 
 (defconst gdb-var-update-regexp-1 "name=\"\\(.*?\\)\",value=\\(\".*?\"\\),")
@@ -3098,7 +3084,7 @@
 
 (def-gdb-auto-update-trigger gdb-invalidate-registers-1
   (gdb-get-buffer 'gdb-registers-buffer)
-  (if (eq gud-minor-mode 'gdba)
+  (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
       "server interpreter mi \"-data-list-register-values x\"\n"
     "-data-list-register-values x\n")
     gdb-data-list-register-values-handler)
@@ -3157,14 +3143,15 @@
 
 ;; Needs GDB 6.4 onwards (used to fail with no stack).
 (defun gdb-get-changed-registers ()
-  (if (not (member 'gdb-get-changed-registers gdb-pending-triggers))
+  (if (and (gdb-get-buffer 'gdb-registers-buffer)
+	   (not (member 'gdb-get-changed-registers gdb-pending-triggers)))
       (progn
 	(gdb-enqueue-input
 	 (list
-	  (if (eq gud-minor-mode 'gdba)
+	  (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
 	      "server interpreter mi -data-list-changed-registers\n"
 	    "-data-list-changed-registers\n")
-	       'gdb-get-changed-registers-handler))
+	  'gdb-get-changed-registers-handler))
 	(push 'gdb-get-changed-registers gdb-pending-triggers))))
 
 (defconst gdb-data-list-register-names-regexp "\"\\(.*?\\)\"")
@@ -3187,7 +3174,9 @@
 
 (def-gdb-auto-update-trigger gdb-invalidate-locals-1
   (gdb-get-buffer 'gdb-locals-buffer)
-  "server interpreter mi -\"stack-list-locals --simple-values\"\n"
+  (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
+      "server interpreter mi -\"stack-list-locals --simple-values\"\n"
+    "-stack-list-locals --simple-values\n")
   gdb-stack-list-locals-handler)
 
 (defconst gdb-stack-list-locals-regexp
--- a/lisp/progmodes/glasses.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/progmodes/glasses.el	Tue Feb 14 05:54:12 2006 +0000
@@ -67,13 +67,31 @@
 
 
 (defcustom glasses-separator "_"
-  "*String to be displayed as a visual separator in unreadable identifiers."
+  "*String to be displayed as a visual separator in identifiers.
+It is used both for adding missing separators and for replacing separators
+defined by `glasses-original-separator'.  If you don't want to add missing
+separators, set `glasses-separator' to an empty string.  If you don't want to
+replace existent separators, set `glasses-original-separator' to an empty
+string."
   :group 'glasses
   :type 'string
   :set 'glasses-custom-set
   :initialize 'custom-initialize-default)
 
 
+(defcustom glasses-original-separator "_"
+  "*String to be displayed as `glasses-separator' in separator positions.
+For instance, if you set it to \"_\" and set `glasses-separator' to \"-\",
+underscore separators are displayed as hyphens.
+If `glasses-original-separator' is an empty string, no such display change is
+performed."
+  :group 'glasses
+  :type 'string
+  :set 'glasses-custom-set
+  :initialize 'custom-initialize-default
+  :version "22.1")
+
+
 (defcustom glasses-face nil
   "*Face to be put on capitals of an identifier looked through glasses.
 If it is nil, no face is placed at the capitalized letter.
@@ -196,15 +214,20 @@
 	      (overlay-put o 'invisible t)
 	      (overlay-put o 'after-string (downcase (match-string n))))))
         ;; Separator change
-        (unless (string= glasses-separator "_")
+	(when (and (not (string= glasses-original-separator glasses-separator))
+		   (not (string= glasses-original-separator "")))
           (goto-char beg)
-          (while (re-search-forward "[a-zA-Z0-9]\\(_+\\)[a-zA-Z0-9]" end t)
-            (goto-char (match-beginning 1))
-            (while (eql (char-after) ?\_)
-              (let ((o (glasses-make-overlay (point) (1+ (point)))))
-                ;; `concat' ensures the character properties won't merge
-                (overlay-put o 'display (concat glasses-separator)))
-              (forward-char))))
+	  (let ((original-regexp (regexp-quote glasses-original-separator)))
+	    (while (re-search-forward
+		    (format "[a-zA-Z0-9]\\(\\(%s\\)+\\)[a-zA-Z0-9]"
+			    original-regexp)
+		    end t)
+	      (goto-char (match-beginning 1))
+	      (while (looking-at original-regexp)
+		(let ((o (glasses-make-overlay (point) (1+ (point)))))
+		  ;; `concat' ensures the character properties won't merge
+		  (overlay-put o 'display (concat glasses-separator)))
+		(goto-char (match-end 0))))))
 	;; Parentheses
 	(when glasses-separate-parentheses-p
 	  (goto-char beg)
@@ -237,13 +260,13 @@
 	  (let ((n (if (match-string 1) 1 2)))
 	    (replace-match "" t nil nil n)
 	    (goto-char (match-end n))))
-        (unless (string= glasses-separator "_")
-          (goto-char (point-min))
-          (while (re-search-forward (format "[a-zA-Z0-9]\\(%s+\\)[a-zA-Z0-9]"
-                                            separator)
-                                    nil t)
-            (replace-match "_" nil nil nil 1)
-            (goto-char (match-beginning 1))))
+	(unless (string= glasses-separator glasses-original-separator)
+	  (goto-char (point-min))
+	  (while (re-search-forward (format "[a-zA-Z0-9]\\(%s+\\)[a-zA-Z0-9]"
+					    separator)
+				    nil t)
+	    (replace-match glasses-original-separator nil nil nil 1)
+	    (goto-char (match-beginning 1))))
 	(when glasses-separate-parentheses-p
 	  (goto-char (point-min))
 	  (while (re-search-forward "[a-zA-Z]_*\\( \\)\(" nil t)
--- a/lisp/simple.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/simple.el	Tue Feb 14 05:54:12 2006 +0000
@@ -4336,7 +4336,9 @@
   :group 'paren-blinking)
 
 (defcustom blink-matching-paren-dont-ignore-comments nil
-  "*Non-nil means `blink-matching-paren' will not ignore comments."
+  "*nil means `blink-matching-paren' ignores comments.
+More precisely, when looking for the matching parenthesis,
+it skips the contents of comments that end before point."
   :type 'boolean
   :group 'paren-blinking)
 
--- a/lisp/subr.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/subr.el	Tue Feb 14 05:54:12 2006 +0000
@@ -561,8 +561,10 @@
 Alternatively, if optional fourth argument OLDMAP is specified, we redefine
 in KEYMAP as NEWDEF those keys which are defined as OLDDEF in OLDMAP.
 
-For most uses, it is simpler and safer to use command remapping like this:
-  \(define-key KEYMAP [remap OLDDEF] NEWDEF)"
+If you don't specify OLDMAP, you can usually get the same results
+in a cleaner way with command remapping, like this:
+  \(define-key KEYMAP [remap OLDDEF] NEWDEF)
+\n(fn OLDDEF NEWDEF KEYMAP &optional OLDMAP)"
   ;; Don't document PREFIX in the doc string because we don't want to
   ;; advertise it.  It's meant for recursive calls only.  Here's its
   ;; meaning
--- a/lisp/tumme.el	Sat Feb 11 00:11:19 2006 +0000
+++ b/lisp/tumme.el	Tue Feb 14 05:54:12 2006 +0000
@@ -57,8 +57,8 @@
 ;;
 ;;  `tumme' stores the thumbnail files in `tumme-dir' using the file
 ;; name format ORIGNAME.thumb.ORIGEXT.  For example
-;; ~/.tumme/myimage01.thumb.jpg.  The "database" is for now just a
-;; plain text file with the following format:
+;; ~/.emacs.d/tumme/myimage01.thumb.jpg.  The "database" is for now
+;; just a plain text file with the following format:
 ;;
 ;; file-name-non-directory;comment:comment-text;tag1;tag2;tag3;...;tagN
 ;;
@@ -135,379 +135,6 @@
 ;; backup of `tumme-db-file' when testing new versions.
 ;;
 ;;
-;;; History:
-;; ========
-;;
-;; Version 0.1, 2005-04-16
-;;
-;; * First release, only browsing support for now.
-;;
-;; Version 0.2, 2005-04-21
-;;
-;; * Changed calls to dired-filename-at-point to dired-get-filename
-;;
-;; Version 0.3, 2005-04-25
-;;
-;;   Quite a lot of changes:
-;;
-;; * Added basic image tagging support.  No commands that make use of
-;;   it yet.
-;;
-;; * Added text properties for the thumbnail images to be able to
-;;   track where they came from originally.  Used in `tumme-mode'.
-;;
-;; * Added `tumme-mode' to be used when navigating the thumbnail
-;;   buffer.  Currently, there are commands to mark, unmark, flag and
-;;   jump to the original file in associated dired buffer.
-;;
-;; * When moving around in the thumbnail buffer (in `tumme-mode'), the
-;;   user can turn on tracking of the movements and let them be
-;;   mirrored in the associated dired buffer.
-;;
-;; * In this version I have been looking at some ideas in thumbs.el,
-;;   for example the image margin and relief and the `thumbs-mode'
-;;   which I copied and made the `tumme-mode' from.
-;;
-;; Version 0.4, 2005-05-02
-;;
-;; * Renamed the functions that are to be used in `tumme-mode' in the
-;;   thumbnail buffer.
-;;
-;; * The mark, unmark and flag commands in `tumme-mode' now also moves
-;;   to next thumbnail, like how dired normally works.
-;;
-;; * Added `tumme-mode-line-up', `tumme-display-thumbs-append' and
-;;   `tumme-mode-delete-char'.
-;;
-;; * Each thumbnail's tags is now displayed when navigating among the
-;;   thumbnails in the thumbnail buffer.
-;;
-;; * Added simple slideshow functionality.
-;;
-;; Version 0.4.1, 2005-05-05
-;;
-;; * Fixed bug in `tumme-flag-thumb-original-file'
-;;
-;; * Added commands to display original image in external viewer
-;;   (`tumme-display-external') and in a Emacs buffer
-;;   (`tumme-display-image').
-;;
-;; * Minor code clean-up
-;;
-;; * Renamed some functions back again...
-;;
-;; * Added rotation of thumbnail images (90 degrees left and right)
-;;
-;; Version 0.4.2, 2005-05-06
-;;
-;; * Removed need for `tumme-display-image-size' in
-;;   `tumme-display-image'.  Now, the maximum image size that fits in
-;;   `tumme-display-buffer' is calculated automatically.  Introduced
-;;   two correction variables, `tumme-display-window-width-correction'
-;;   and `tumme-display-window-height-correction' to be used to
-;;   correct width and height depending on width and height of window
-;;   decorations, fringes etc.  This works really well!
-;;
-;; Version 0.4.3, 2005-05-07
-;;
-;; * Added menus to `dired-mode' and `tumme-mode'
-;;
-;; * Added `tumme-mark-and-display-next'
-;;
-;; * Added `tumme-jump-thumbnail-buffer'
-;;
-;; * Bound TAB in `dired-mode-map' and `tumme-mode-map' to
-;;   `tumme-jump-thumbnail-buffer' and
-;;   `tumme-jump-original-dired-buffer', respectively.
-;;
-;; * Changed `tumme-display-image' to be more general.  Now, it can be
-;;   used from both thumbnail buffer and dired buffer by calling
-;;   `tumme-display-thumbnail-original-image' and
-;;   `tumme-display-dired-image', respectively.
-;;
-;; Version 0.4.4, 2005-05-10
-;;
-;; * Added `tumme-get-exif-file-name' and
-;; `tumme-copy-with-exif-file-name'.  These commands might not be
-;; useful for all people because they are very specific.  See the
-;; documentation for each function for more information.
-;;
-;; * Added `tumme-display-next-thumbnail-original' and
-;; `tumme-display-previous-thumbnail-original' to be used for easy
-;; image browsing in thumbnail buffer.
-;;
-;; * Added support for comments.  New function
-;; `tumme-comment-thumbnail' added, to be used in thumbnail buffer.
-;;
-;; * Added `tumme-mark-tagged-files'.  Use it in dired buffer to mark
-;; tagged files.
-;;
-;; * Added `mouse-face' property `highlight' for mouse highlighting
-;; and had to add a space between each thumbnail to avoid whole rows
-;; to be highlighted.  Doing this meant that I had to update
-;; `tumme-line-up' too...
-;;
-;; * Added `tumme-mouse-display-image'.  Use mouse-2 to display image
-;; thumbnail when is highlighted.
-;;
-;; * As suggested by Ehud Karni on gnu.emacs.help, changed
-;; `tumme-window-DIMENSION-pixels' to use `frame-char-DIMENSION'
-;; instead of `frame-pixel-DIMENSION'.  Feels better
-;;
-;; * Corrected a bug in `tumme-window-height-pixels'.  I did not know
-;; that the mode-line consumed one line.  Also, after experimenting, it
-;; seems that the only correction needed for the image display width
-;; is one single pixel.  I left the corection variables in there, just
-;; in case someone has a system that differs.
-;;
-;; Version 0.4.5, 2005-05-19
-;;
-;; * Added `tumme-line-up-dynamic' that calculates the number of
-;; thumbnails that will fit in the thumbnail buffer's window and
-;; `tumme-line-up-interactive' that asks the user.
-;;
-;; * Changed `tumme-display-thumbs' to call one of the `tumme-line-up'
-;; functions instead of doing the line-up itself.
-;;
-;; * Finally! Added experimental gallery creation.  See customizable
-;; variables `tumme-gallery-dir', `tumme-gallery-image-root-url' and
-;; `tumme-gallery-thumb-image-root-url' and new command
-;; `tumme-gallery-generate'.  Not beatiful, but it works quite
-;; well.  Probably needs some CSS-stuff in it eventually.  Also, I'm not
-;; sure this is the way I want to generate my image galleries in the
-;; future.  After all, static pages cannot do what dynamic pages using
-;; PHP et al can do.  Serves like a proof-of-concept of the tagging
-;; though.
-;;
-;; * Added option to hide images with certain tags.  See
-;; `tumme-gallery-hidden-tags'.
-;;
-;; * Added `tumme-tag-thumbnail' for tagging files from thumbnail
-;; buffer.
-;;
-;; * Added `tumme-tag-remove' and `tumme-tag-thumbnail-remove' so that
-;; you can remove tags.  Sorry if I have kept you waiting for
-;; this... :)
-;;
-;; * Added option `tumme-append-when-browsing' and new command
-;; `tumme-toggle-append-browsing'.
-;;
-;; Version 0.4.6, 2005-05-21
-;;
-;; * Changed `tumme-thumb-name' to always use ".jpg" as file extension
-;; for thumbnail files, instead of using the extension from the
-;; original file's name.  This was a very easy way to open up for
-;; allowing browsing of all image file types that Emacs support,
-;; assuming ImageMagick supports it too.
-;;
-;; * Fixed bug in `tumme-create-thumb' `tumme-rotate-thumbnail' and
-;; `tumme-display-image' by adding quotes around the file names.  The
-;; conversion failed if the file name, or path, contained a
-;; space.  Also expanded the file name, as convert (or is it bash?)
-;; does not work as expected for paths like "~/.tumme...".
-;;
-;; * Fixed another "space bug" :) in `tumme-display-external'.
-;;
-;; * In call to convert, added "jpeg:" in front of the output file
-;; name, so that all generated files becomes JPEG files.  For now, only
-;; useful if `tumme-temp-image-file' does not end in .jpg.
-;;
-;; Version 0.4.7, 2005-05-26
-;;
-;; * Change header line of tumme.el so that it does not wrap and cause
-;; evaluation problems for people getting the source from Usenet.
-;;
-;; * Changed `tumme-write-tag' slightly to get better performance when
-;; tagging many files.
-;;
-;; * Fixed bug in `tumme-create-gallery-lists' that made it puke if
-;; there was empty lines in the database.  Changed the code so that it
-;; does not car about that.  Also, fixed `tumme-remove-tag' so that it
-;; tries not to add empty lines at the end of the database.
-;;
-;; * Changed all commands that execute shell commands to be
-;; configurable using the `tumme-cmd-x' custom variables.  This makes
-;; it easier to switch among different image conversion tools which
-;; might use different syntax and options.
-;;
-;; * Added `tumme-toggle-dired-display-properties'.
-;;
-;; * Added `tumme-thumb-file-name-format' and changed
-;; `tumme-thumb-name' to make it possible to configure the format of
-;; thumbnail files.  Did not make it customizable yet though.  It might
-;; be a bad idea to be able to switch between formats...
-;;
-;; * Changed `tumme-display-window' so that it looks for tumme's
-;; display window in all frames.  Useful if you want to create an own
-;; frame for displaying the temporary image.
-;;
-;; * After changing the call to `get-window-with-predicate' to scan
-;; all frames for tumme's special buffers in visible windows, and also
-;; changing the way tumme tracks thumbnail movement in the dired
-;; buffer (now using `set-buffer' together with `set-window-point'),
-;; tumme now works quite happily with all three buffers in different
-;; frames.  This empowers the user to setup the special buffers the way
-;; that best fits his need at the time.  Jumping between dired and
-;; `tumme-thumbnail-buffer' work independent on in which frames they
-;; are.
-;;
-;; * Renamed `tumme-track-movement-in-dired' to
-;; `tumme-toggle-movement-tracking'.
-;;
-;; * Added `tumme-track-thumbnail' for movement tracking from dired
-;; buffer, analoguous to the tracking done in thumbnail buffer.  Both
-;; uses the same custom variable `tumme-track-movement' which can be
-;; toggled on and off with `tumme-toggle-movement-tracking'.  This is
-;; neat.  :) Changed `tumme-setup-dired-keybindings' to make use of
-;; this in the best way.  Read more about this there.
-;;
-;; Version 0.4.8, 2005-06-05
-;;
-;; * Changed `tumme-display-dired-image' and
-;; `tumme-display-thumbnail-original-image' so that when called with a
-;; prefix argument, the image is not resized in the display
-;; buffer.  This will be useful for later additions of image
-;; manipulation commands.
-;;
-;; * Added `tumme-kill-buffer-and-window' to make it easy to kill the
-;; tumme buffers.
-;;
-;; * Renamed `tumme-mode' to `tumme-thumbnail-mode'.
-;;
-;; * `tumme-tag-thumbnail' and `tumme-tag-thumbnail-remove' now
-;; updates the tags property for the thumbnail.
-;;
-;; * Added `tumme-dired-display-external' to display images in
-;; external viewer from dired buffer.
-;;
-;; * Added support for multiple files in `tumme-remove-tag' to
-;; increase performance.
-;;
-;; * Added `tumme-display-image-mode' so that we can add image
-;; manipulation commands there.
-;;
-;; * Added call to `tumme-display-thumb-properties' in
-;; `tumme-track-thumbnail'.
-;;
-;; * Added command `tumme-display-current-image-in-full-size' to be
-;; used in `tumme-display-image-mode'.
-;;
-;; * Changed `tumme-display-image' to call
-;; `tumme-create-display-image-buffer' so that we are sure that
-;; `tumme-display-image-buffer' is always available.
-;;
-;; * Added optional prefix argument to `tumme-dired-folder' that tells
-;; it to skip the window splitting and just creates the needed
-;; buffers.
-;;
-;; * Fixed bug somewhere that relied on `tumme-dired-folder' having
-;; created the `tumme-display-image-buffer'.  Now `tumme-dired-folder'
-;; *should* not be necessary to call at all, just convenient.
-;;
-;; * Added tracking to `tumme-mouse-display-image'.
-;;
-;; * Added `tumme-mouse-select-thumbnail' and bound mouse-1 to it, so
-;; that selecting a thumbnail will track the original file.
-;;
-;; * Added three new custom variables, `tumme-cmd-ACTION-program' to
-;; make the command options cleaner and easier to read.
-;;
-;; * Added `tumme-display-properties-format' and
-;; `tumme-format-properties-string' to make it possible to configure
-;; the display format of the image file's properties.
-;;
-;; * Added missing (require 'format-spec)
-;;
-;; Version 0.4.9, 2005-09-25
-;;
-;; * Fixed bug in `tumme-display-thumbs'.  If a thumbnail file could
-;; not be created for some reason (bad file for example), even if
-;; several other thumbnails was created sucessfully, the code
-;; generated an error and never continued doing the line-up.
-;;
-;; * Made tumme.el pass the M-x checkdoc test, phew!
-;;
-;; * Added `tumme-rotate-original', `tumme-rotate-original-left' and
-;; `tumme-rotate-original-right' to rotate the original image from
-;; thumbnail view. By default it uses JpegTRAN to rotate the images
-;; non-lossy. Only works on JPEG images. The two new commands were
-;; added to thumbnail mode. Thanks to Colin Marquardt who told me
-;; about the "-copy all" option to jpegtran.
-;;
-;; * Added the functions `tumme-get-exif-data' and
-;; `tumme-set-exif-data' for reading and writing EXIF data to image files.
-;;
-;; * Rewrote `tumme-get-exif-file-name': now uses
-;; `tumme-get-exif-data'. Slight change to replace spaces with
-;; underscores (tt seems not all cameras use the exact same format for
-;; DateTimeOriginal). Added code for handling files that has no
-;; EXIF-data (use file's timestamp instead).
-;;
-;; * Changed from using the exif program to exiftool because exiftool
-;; also handles writing of EXIF data, which is very useful.
-;;
-;; * Added the command `tumme-thumbnail-set-image-description' that
-;; can be used to set the EXIF tag ImageDescription. Thanks to Colin
-;; Marquardt for the suggestion.
-;;
-;; * Added `tumme-toggle-mark-thumb-original-file' and
-;; `tumme-mouse-toggle-mark' and changed
-;; `tumme-modify-mark-on-thumb-original-file' to support toggling of
-;; mark of original image file in dired, from
-;; `tumme-thumbnail-mode'. Bound C-down-mouse-1
-;; `tumme-mouse-toggle-mark' to in `tumme-thumbnail-mode'.
-;;
-;; * Changed `tumme-mouse-select-thumbnail' to also display properties
-;; after the file is selected.
-;;
-;; Version 0.4.10, 2005-11-07
-;;
-;; * Renamed `tumme-dired-folder' to `tumme-dired'.
-;;
-;; * Changed format of the database file slightly, now the full path
-;; and file name is used. Had to change most of the tag functions
-;; (writing, reading, searching) slightly to cope with the change. If
-;; you are an old tumme user, you have to update your database
-;; manually, probably you only need to prefix all rows with a
-;; directory name to get the full path and file name.
-;;
-;; * Removed `tumme-thumb-file-name-format'. Added
-;; `tumme-thumbnail-storage' and changed `tumme-thumb-name' to provide
-;; two different thumbnail storage schemes. It is no longer necessary
-;; to have unique image file names to use tumme fully.
-;;
-;; * As a consequence of the above, gallery generation is currently
-;; not supported if per-directory thumbnail file storage is used.
-;;
-;; * Changed parameters to `tumme-create-thumb'.
-;;
-;; * To be included in Emacs 22.
-;;
-;;
-;; Version 0.4.11, 2006-MM-DD
-;;
-;; * Changed `tumme-display-thumbs' so that it calls `display-buffer'
-;; after generating the thumbnails and changed
-;; `tumme-display-thumbnail-original-image' to display the image
-;; buffer. These small changes should make it easier for a user to
-;; start using tumme.
-;;
-;; * Added `tumme-show-all-from-dir' to mimic thumbs.el's easy-to-use
-;; `thumbs' command. A new customize option,
-;; `tumme-show-all-from-dir-max-files' was added too.
-;;
-;; * Renamed `tumme-dired' to `tumme-dired-with-window-configuration'
-;; and added code to save the window configuration before messing it
-;; up. The saved window configuration can be restored using the new
-;; command `tumme-restore-window-configuration'.
-;;
-;; * Added `tumme-get-thumbnail-image', created by Chong Yidong. His
-;; own comments: ..., that just takes the original filename and
-;; returns a thumbnail image descriptor.  Then third-party libraries
-;; won't have to muck around with tumme.el's internal functions like
-;; `thumme-thumb-name', `tumme-create-thumb', etc. His code to get
-;; speedbar display tumme thumbnails, might be integrated soon.
-;;
 ;; TODO
 ;; ====
 ;;
@@ -548,7 +175,8 @@
 ;; `dired-next-line' and `dired-previous-line' figure out if tumme is
 ;; enabled in the current buffer and, if it is, call
 ;; `tumme-dired-next-line' and `tumme-dired-previous-line',
-;; respectively.
+;; respectively. Update: This is partly done; some bindings have now
+;; been added to dired.
 ;;
 ;; * Enhanced gallery creation with basic CSS-support and pagination
 ;; of tag pages with many pictures.
@@ -570,10 +198,10 @@
 (defgroup tumme nil
   "Use dired to browse your images as thumbnails, and more."
   :prefix "tumme-"
-  :group 'files)
+  :group 'multimedia)
 
-(defcustom tumme-dir "~/.tumme/"
-  "*Directory where thumbnail images for are stored."
+(defcustom tumme-dir "~/.emacs.d/tumme/"
+  "*Directory where thumbnail images are stored."
   :type 'string
   :group 'tumme)
 
@@ -583,23 +211,27 @@
 controlled by this variable.  \"Use tumme dir\" means that the
 thumbnails are stored in a central directory.  \"Per directory\"
 means that each thumbnail is stored in a subdirectory called
-\".tumme\" in the same directory where the image file is."
+\".tumme\" in the same directory where the image file is.
+\"Thumbnail Managing Standard\" means that the thumbnails are
+stored and generated according to the Thumbnail Managing Standard
+that allows sharing of thumbnails across different programs."
   :type '(choice :tag "How to store thumbnail files"
+                 (const :tag "Thumbnail Managing Standard" standard)
                  (const :tag "Use tumme-dir" use-tumme-dir)
                  (const :tag "Per-directory" per-directory))
   :group 'tumme)
 
-(defcustom tumme-db-file "~/.tumme/.tumme_db"
+(defcustom tumme-db-file "~/.emacs.d/tumme/.tumme_db"
   "*Database file where file names and their associated tags are stored."
   :type 'string
   :group 'tumme)
 
-(defcustom tumme-temp-image-file "~/.tumme/.tumme_temp"
+(defcustom tumme-temp-image-file "~/.emacs.d/tumme/.tumme_temp"
   "*Name of temporary image file used by various commands."
   :type 'string
   :group 'tumme)
 
-(defcustom tumme-gallery-dir "~/.tumme/.tumme_gallery"
+(defcustom tumme-gallery-dir "~/.emacs.d/tumme/.tumme_gallery"
   "*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 tumme creates."
@@ -630,13 +262,13 @@
   :group 'tumme)
 
 (defcustom tumme-cmd-create-thumbnail-options
-  "%p -size %sx%s \"%f\" -resize %sx%s +profile \"*\" jpeg:\"%t\""
+  "%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\""
   "*Format of command used to create thumbnail image.
 Available options are %p which is replaced by
-`tumme-cmd-create-thumbnail-program', %s which is replaced by
-`tumme-thumb-size', %f which is replaced by the file name of the
-original image and %t which is replaced by the file name of the
-thumbnail file."
+`tumme-cmd-create-thumbnail-program', %w which is replaced by
+`tumme-thumb-width', %h which is replaced by `tumme-thumb-height',
+%f which is replaced by the file name of the original image and %t
+which is replaced by the file name of the thumbnail file."
   :type 'string
   :group 'tumme)
 
@@ -648,16 +280,64 @@
   :group 'tumme)
 
 (defcustom tumme-cmd-create-temp-image-options
-  "%p -size %xx%y \"%f\" -resize %xx%y +profile \"*\" jpeg:\"%t\""
+  "%p -size %wx%h \"%f\" -resize %wx%h +profile \"*\" jpeg:\"%t\""
   "*Format of command used to create temporary image for display window.
 Available options are %p which is replaced by
-`tumme-cmd-create-temp-image-program', %x and %y which is replaced by
-the calculated max size for x and y in the image display window, %f
-which is replaced by the file name of the original image and %t which
+`tumme-cmd-create-temp-image-program', %w and %h which is replaced by
+the calculated max size for width and height in the image display window,
+%f which is replaced by the file name of the original image and %t which
 is replaced by the file name of the temporary file."
   :type 'string
   :group 'tumme)
 
+(defcustom tumme-cmd-pngnq-program (executable-find "pngnq")
+  "*The file name of the `pngnq' program.
+It quantizes colors of PNG images down to 256 colors."
+  :type '(choice (const :tag "Not Set" nil) string)
+  :group 'tumme)
+
+(defcustom tumme-cmd-pngcrush-program (executable-find "pngcrush")
+  "*The file name of the `pngcrush' program.
+It optimizes the compression of PNG images.  Also it adds PNG textual chunks
+with the information required by the Thumbnail Managing Standard."
+  :type '(choice (const :tag "Not Set" nil) string)
+  :group 'tumme)
+
+(defcustom tumme-cmd-create-standard-thumbnail-command
+  (concat
+   tumme-cmd-create-thumbnail-program " "
+   "-size %wx%h \"%f\" "
+   (unless (or tumme-cmd-pngcrush-program tumme-cmd-pngnq-program)
+     (concat
+      "-set \"Thumb::MTime\" \"%m\" "
+      "-set \"Thumb::URI\" \"file://%f\" "
+      "-set \"Description\" \"Thumbnail of file://%f\" "
+      "-set \"Software\" \"" (emacs-version) "\" "))
+   "-thumbnail %wx%h png:\"%t\""
+   (if tumme-cmd-pngnq-program
+       (concat
+        " ; " tumme-cmd-pngnq-program " -f \"%t\""
+        (unless tumme-cmd-pngcrush-program
+          " ; mv %q %t")))
+   (if tumme-cmd-pngcrush-program
+       (concat
+        (unless tumme-cmd-pngcrush-program
+          " ; cp %t %q")
+        " ; " tumme-cmd-pngcrush-program " -q "
+        "-text b \"Description\" \"Thumbnail of file://%f\" "
+        "-text b \"Software\" \"" (emacs-version) "\" "
+        ;; "-text b \"Thumb::Image::Height\" \"%oh\" "
+        ;; "-text b \"Thumb::Image::Mimetype\" \"%mime\" "
+        ;; "-text b \"Thumb::Image::Width\" \"%ow\" "
+        "-text b \"Thumb::MTime\" \"%m\" "
+        ;; "-text b \"Thumb::Size\" \"%b\" "
+        "-text b \"Thumb::URI\" \"file://%f\" "
+        "%q %t"
+        " ; rm %q")))
+  "*Command to create thumbnails according to the Thumbnail Managing Standard."
+  :type 'string
+  :group 'tumme)
+
 (defcustom tumme-cmd-rotate-thumbnail-program
   "mogrify"
   "*Executable used to rotate thumbnail.
@@ -696,7 +376,7 @@
   :group 'tumme)
 
 (defcustom tumme-temp-rotate-image-file
-  "~/.tumme/.tumme_rotate_temp"
+  "~/.emacs.d/tumme/.tumme_rotate_temp"
   "*Temporary file for rotate operations."
   :type 'string
   :group 'tumme)
@@ -748,8 +428,19 @@
   :type '(repeat string)
   :group 'tumme)
 
-(defcustom tumme-thumb-size 100
-  "Size of thumbnails, in pixels."
+(defcustom tumme-thumb-size (if (eq 'standard tumme-thumbnail-storage) 128 100)
+  "Size of thumbnails, in pixels.
+This is the default size for both `tumme-thumb-width' and `tumme-thumb-height'."
+  :type 'integer
+  :group 'tumme)
+
+(defcustom tumme-thumb-width tumme-thumb-size
+  "Width of thumbnails, in pixels."
+  :type 'integer
+  :group 'tumme)
+
+(defcustom tumme-thumb-height tumme-thumb-size
+  "Height of thumbnails, in pixels."
   :type 'integer
   :group 'tumme)
 
@@ -832,7 +523,11 @@
   :type 'string
   :group 'tumme)
 
-(defcustom tumme-external-viewer "qiv -t"
+(defcustom tumme-external-viewer
+  ;; TODO: use mailcap, dired-guess-shell-alist-default, dired-view-command-alist
+  (cond ((executable-find "display"))
+        ((executable-find "xli"))
+        ((executable-find "qiv") "qiv -t"))
   "*Name of external viewer.
 Including parameters.  Used when displaying original image from
 `tumme-thumbnail-mode'."
@@ -851,6 +546,16 @@
   :type 'integer
   :group 'tumme)
 
+(defun tumme-dir ()
+  "Return the current thumbnails directory (from `tumme-dir').
+Create the thumbnails directory if it does not exist."
+  (let ((tumme-dir (file-name-as-directory
+                    (expand-file-name tumme-dir))))
+    (unless (file-directory-p tumme-dir)
+      (make-directory tumme-dir t)
+      (message "Creating thumbnails directory"))
+    tumme-dir))
+
 (defun tumme-insert-image (file type relief margin)
   "Insert image FILE of image TYPE, using RELIEF and MARGIN, at point."
 
@@ -869,8 +574,11 @@
 		 (<= (float-time (nth 5 (file-attributes file)))
 		     (float-time (nth 5 (file-attributes thumb-file)))))
       (tumme-create-thumb file thumb-file))
-    (list 'image :type 'jpeg :file thumb-file
-	  :relief tumme-thumb-relief :margin tumme-thumb-margin)))
+    (create-image thumb-file)
+;;     (list 'image :type 'jpeg
+;;           :file thumb-file
+;; 	  :relief tumme-thumb-relief :margin tumme-thumb-margin)
+    ))
 
 (defun tumme-insert-thumbnail (file original-file-name
                                     associated-dired-buffer)
@@ -879,7 +587,9 @@
   (let (beg end)
     (setq beg (point))
     (tumme-insert-image file
-                        'jpeg
+                        ;; TODO: this should depend on the real file type
+                        (if (eq 'standard tumme-thumbnail-storage)
+                            'png 'jpeg)
                         tumme-thumb-relief
                         tumme-thumb-margin)
     (setq end (point))
@@ -898,38 +608,52 @@
 name will vary.  For central thumbnail file storage, make a
 MD5-hash of the image file's directory name and add that to make
 the thumbnail file name unique.  For per-directory storage, just
-add a subdirectory."
-  (let ((f (expand-file-name file))
-        md5-hash)
-    (format "%s%s%s.thumb.%s"
-            (cond ((eq 'use-tumme-dir tumme-thumbnail-storage)
-                   ;; Is MD5 hashes fast enough? The checksum of a
-                   ;; thumbnail file name need not be that
-                   ;; "cryptographically" good so a faster one could
-                   ;; be used here.
-                   (setq md5-hash (md5 (file-name-as-directory
-                                        (file-name-directory file))))
-                   (file-name-as-directory (expand-file-name tumme-dir)))
-                  ((eq 'per-directory tumme-thumbnail-storage)
-                   (format "%s.tumme/"
-                           (file-name-directory f))))
-            (file-name-sans-extension
-             (file-name-nondirectory f))
-            (if md5-hash
-                (concat "_" md5-hash)
-              "")
-            (file-name-extension f))))
+add a subdirectory.  For standard storage, produce the file name
+according to the Thumbnail Managing Standard."
+  (cond ((eq 'standard tumme-thumbnail-storage)
+         (expand-file-name
+          (concat "~/.thumbnails/normal/"
+                  (md5 (concat "file://" (expand-file-name file))) ".png")))
+        ((eq 'use-tumme-dir tumme-thumbnail-storage)
+         (let* ((f (expand-file-name file))
+                (md5-hash
+                 ;; Is MD5 hashes fast enough? The checksum of a
+                 ;; thumbnail file name need not be that
+                 ;; "cryptographically" good so a faster one could
+                 ;; be used here.
+                 (md5 (file-name-as-directory (file-name-directory f)))))
+           (format "%s%s%s.thumb.%s"
+                   (file-name-as-directory (expand-file-name (tumme-dir)))
+                   (file-name-sans-extension (file-name-nondirectory f))
+                   (if md5-hash (concat "_" md5-hash) "")
+                   (file-name-extension f))))
+        ((eq 'per-directory tumme-thumbnail-storage)
+         (let ((f (expand-file-name file)))
+           (format "%s.tumme/%s.thumb.%s"
+                   (file-name-directory f)
+                   (file-name-sans-extension (file-name-nondirectory f))
+                   (file-name-extension f))))))
 
 (defun tumme-create-thumb (original-file thumbnail-file)
   "For ORIGINAL-FILE, create thumbnail image named THUMBNAIL-FILE."
-  (let* ((size (int-to-string tumme-thumb-size))
+  (let* ((width (int-to-string tumme-thumb-width))
+         (height (int-to-string tumme-thumb-height))
+         (modif-time (format "%.0f" (float-time (nth 5 (file-attributes
+                                                        original-file)))))
+         (thumbnail-nq8-file (replace-regexp-in-string ".png\\'" "-nq8.png"
+                                                       thumbnail-file))
          (command
           (format-spec
-           tumme-cmd-create-thumbnail-options
+           (if (eq 'standard tumme-thumbnail-storage)
+               tumme-cmd-create-standard-thumbnail-command
+             tumme-cmd-create-thumbnail-options)
            (list
             (cons ?p tumme-cmd-create-thumbnail-program)
-            (cons ?s size)
+            (cons ?w width)
+            (cons ?h height)
+            (cons ?m modif-time)
             (cons ?f original-file)
+            (cons ?q thumbnail-nq8-file)
             (cons ?t thumbnail-file))))
          thumbnail-dir)
     (when (not (file-exists-p
@@ -938,6 +662,40 @@
       (make-directory thumbnail-dir))
     (shell-command command nil)))
 
+;;;###autoload
+(defun tumme-dired-insert-marked-thumbs ()
+  "Insert thumbnails before file names of marked files in the dired buffer."
+  (interactive)
+  (dired-map-over-marks
+   (let* ((image-pos (dired-move-to-filename))
+          (image-file (dired-get-filename))
+          (thumb-file (tumme-get-thumbnail-image image-file))
+          overlay)
+     ;; If image is not already added, then add it.
+     (unless (delq nil (mapcar (lambda (o) (overlay-get o 'put-image))
+                               ;; Can't use (overlays-at (point)), BUG?
+                               (overlays-in (point) (1+ (point)))))
+       (put-image thumb-file image-pos)
+       (setq overlay (car (delq nil (mapcar (lambda (o) (and (overlay-get o 'put-image) o))
+                                            (overlays-in (point) (1+ (point)))))))
+       (overlay-put overlay 'image-file image-file)
+       (overlay-put overlay 'thumb-file thumb-file)))
+   nil)
+  (add-hook 'dired-after-readin-hook 'tumme-dired-after-readin-hook nil t))
+
+(defun tumme-dired-after-readin-hook ()
+  "Relocate existing thumbnail overlays in dired buffer after reverting.
+Move them to their corresponding files if they are still exist.
+Otherwise, delete overlays."
+  (mapc (lambda (overlay)
+          (when (overlay-get overlay 'put-image)
+            (let* ((image-file (overlay-get overlay 'image-file))
+                   (image-pos (dired-goto-file image-file)))
+              (if image-pos
+                  (move-overlay overlay image-pos image-pos)
+                (delete-overlay overlay)))))
+        (overlays-in (point-min) (point-max))))
+
 (defun tumme-next-line-and-display ()
   "Move to next dired line and display thumbnail image."
   (interactive)
@@ -1947,7 +1705,7 @@
          (/ width
             (+ (* 2 tumme-thumb-relief)
                (* 2 tumme-thumb-margin)
-               tumme-thumb-size char-width))))
+               tumme-thumb-width char-width))))
     (tumme-line-up)))
 
 (defun tumme-line-up-interactive ()
@@ -2039,19 +1797,19 @@
 If optional argument ORIGINAL-SIZE is non-nil, display image in its
 original size."
   (let ((new-file (expand-file-name tumme-temp-image-file))
-        size-x size-y command ret)
+        width height command ret)
     (setq file (expand-file-name file))
     (if (not original-size)
         (progn
-          (setq size-x (tumme-display-window-width))
-          (setq size-y (tumme-display-window-height))
+          (setq width (tumme-display-window-width))
+          (setq height (tumme-display-window-height))
           (setq command
                 (format-spec
                  tumme-cmd-create-temp-image-options
                  (list
                   (cons ?p tumme-cmd-create-temp-image-program)
-                  (cons ?x size-x)
-                  (cons ?y size-y)
+                  (cons ?w width)
+                  (cons ?h height)
                   (cons ?f file)
                   (cons ?t new-file))))
           (setq ret (shell-command command nil))
@@ -2289,12 +2047,11 @@
 (defun tumme-write-comment (file comment)
   "For FILE, write comment COMMENT in database."
   (save-excursion
-    (let (end buf comment-beg
-              (base-name (file-name-nondirectory file)))
+    (let (end buf comment-beg)
       (setq buf (find-file tumme-db-file))
       (goto-char (point-min))
       (if (search-forward-regexp
-           (format "^%s" base-name) nil t)
+           (format "^%s" file) nil t)
           (progn
             (end-of-line)
             (setq end (point))
@@ -2317,7 +2074,7 @@
             (insert (format "comment:%s;" comment)))
         ;; File does not exist in databse - add it.
         (goto-char (point-max))
-        (insert (format "\n%s;comment:%s" base-name comment)))
+        (insert (format "\n%s;comment:%s" file comment)))
       (save-buffer)
       (kill-buffer buf))))
 
@@ -2350,8 +2107,9 @@
   (tumme-display-thumb-properties))
 
 (defun tumme-read-comment (&optional file)
-  "Read comment, optionally using old comment from FILE as initial value."
-
+  "Read comment for an image.
+Read comment for an image, optionally using old comment from FILE
+as initial value."
   (let ((comment
          (read-string
           "Comment: "
@@ -2382,7 +2140,12 @@
 
 ;;;###autoload
 (defun tumme-mark-tagged-files ()
-  "Use regexp to mark files with matching tag."
+  "Use regexp to mark files with matching tag.
+A `tag' is a keyword, a piece of meta data, associated with an
+image file and stored in tumme's database file.  This command
+lets you input a regexp and this will be matched against all tags
+on all image files in the database file.  The files that have a
+matching tags will be marked in the dired buffer."
   (interactive)
   (let ((tag (read-string "Mark tagged files (regexp): "))
         (hits 0)
@@ -2392,7 +2155,7 @@
       (goto-char (point-min))
       ;; Collect matches
       (while (search-forward-regexp
-              (concat "\\(^[^;]+\\);.*" tag ".*$") nil t)
+              (concat "\\(^[^;\n]+\\);.*" tag ".*$") nil t)
         (setq files (append (list (match-string 1)) files)))
       (kill-buffer buf)
       ;; Mark files
@@ -2710,7 +2473,7 @@
 ;;               (let ((fattribs (file-attributes f)))
 ;;                 ;; Get last access time and file size
 ;;                 `(,(nth 4 fattribs) ,(nth 7 fattribs) ,f)))
-;;             (directory-files tumme-dir t ".+\.thumb\..+$"))
+;;             (directory-files (tumme-dir) t ".+\.thumb\..+$"))
 ;;            ;; Sort function. Compare time between two files.
 ;;            '(lambda (l1 l2)
 ;;               (time-less-p (car l1) (car l2)))))
--- a/lispref/ChangeLog	Sat Feb 11 00:11:19 2006 +0000
+++ b/lispref/ChangeLog	Tue Feb 14 05:54:12 2006 +0000
@@ -1,3 +1,8 @@
+2006-02-13  Chong Yidong  <cyd@stupidchicken.com>
+
+	* variables.texi (File Local Variables): Document new file local
+	variable behavior.
+
 2006-02-10  Kim F. Storm  <storm@cua.dk>
 
 	* eval.texi (Function Indirection): Add NOERROR to indirect-function.
--- a/lispref/variables.texi	Sat Feb 11 00:11:19 2006 +0000
+++ b/lispref/variables.texi	Tue Feb 14 05:54:12 2006 +0000
@@ -1752,9 +1752,9 @@
 
 @defopt enable-local-variables
 This variable controls whether to process file local variables.  A
-value of @code{t} means process them unconditionally; @code{nil} means
-ignore them; anything else means ask the user what to do for each
-file.  The default value is @code{t}.
+value of @code{t} means to process them, querying the user if unsafe
+variables are encountered; @code{nil} means ignore them; anything else
+means to query the user for each file.  The default value is @code{t}.
 @end defopt
 
 @defun hack-local-variables &optional mode-only
@@ -1773,46 +1773,70 @@
 
   If a file local variable could specify a function that would
 be called later, or an expression that would be executed later, simply
-visiting a file could take over your Emacs.  To prevent this, Emacs
-takes care not to allow to set such file local variables.
+visiting a file could take over your Emacs.  Emacs takes several
+measures to prevent this.
+
+@cindex safe local variable
+  When Emacs encounters a file local variable whose safety is not
+guaranteed, it asks the user whether or not to obey the file variable
+specifications.  If the user says no, Emacs ignores @emph{all} the
+file variables specified in that file.  A variable can be marked as
+@dfn{safe} by setting its @code{safe-local-variable} property.  If the
+property is @code{t}, that variable is always considered safe,
+regardless of the value assigned to it.  The
+@code{safe-local-variable} property can also be a a function taking
+exactly one argument.  In that case, Emacs considers it safe to give
+the variable a certain value if the function returns non-@code{nil}
+when called with that value as argument.  Many commonly-encountered
+file variables possess @code{safe-local-variable} by default,
+including @code{fill-column}, @code{fill-prefix}, and
+@code{indent-tabs-mode}.
 
-  For one thing, any variable whose name ends in any of
-@samp{-command}, @samp{-frame-alist}, @samp{-function},
+@defopt safe-local-variable-values
+This variable provides another way to mark variables as safe.  It is a
+list of cons cells @var{(var . val)}, where @var{var} is a variable
+name and @var{val} is a value of that variable that is safe.
+
+When Emacs asks the user whether or not to obey a set of file variable
+specifications, the user can choose to mark them as safe.  This adds
+those variable-value pairs to @code{safe-local-variable-values}, and
+saves it to the user's custom file.
+@end defopt
+
+@defun safe-local-variable-p sym val
+This function returns non-@code{nil} if it is safe to give @var{sym}
+the value @var{val}, based on the above criteria.
+@end defun
+
+@cindex risky local variable
+Some variables are considered @dfn{risky}.  A variable whose name ends
+in any of @samp{-command}, @samp{-frame-alist}, @samp{-function},
 @samp{-functions}, @samp{-hook}, @samp{-hooks}, @samp{-form},
 @samp{-forms}, @samp{-map}, @samp{-map-alist}, @samp{-mode-alist},
-@samp{-program}, or @samp{-predicate} cannot be given a file local
-value.  In general, you should use such a name whenever it is
-appropriate for the variable's meaning.  The variables
-@samp{font-lock-keywords}, @samp{font-lock-keywords} followed by a
-digit, and @samp{font-lock-syntactic-keywords} cannot be given file
-local values either.  These rules can be overridden by giving the
-variable's name a non-@code{nil} @code{safe-local-variable} property.
-If one gives it a @code{safe-local-variable} property of @code{t},
-then one can give the variable any file local value.  One can also
-give any symbol, including the above, a @code{safe-local-variable}
-property that is a function taking exactly one argument.  In that
-case, giving a variable with that name a file local value is only
-allowed if the function returns non-@code{nil} when called with that
-value as argument.
+@samp{-program}, or @samp{-predicate} is considered risky.  The
+variables @samp{font-lock-keywords}, @samp{font-lock-keywords}
+followed by a digit, and @samp{font-lock-syntactic-keywords} are also
+considered risky.  Finally, any variable whose name has a
+non-@code{nil} @code{risky-local-variable} property is considered
+risky.
 
-  In addition, any variable whose name has a non-@code{nil}
-@code{risky-local-variable} property is also ignored.  So are all
-variables listed in @code{ignored-local-variables}:
+@defun risky-local-variable-p sym
+This function returns non-@code{nil} if @var{sym} is a risky variable,
+based on the above criteria.
+@end defun
+
+If a variable is risky, it will not be entered automatically into
+@code{safe-local-variable-values} as described above.  Therefore,
+Emacs will always query before setting a risky variable, unless the
+user explicitly allows it by editing @code{safe-local-variable-values}
+via Customize.
 
 @defvar ignored-local-variables
 This variable holds a list of variables that should not be given local
 values by files.  Any value specified for one of these variables is
-ignored.
+completely ignored.
 @end defvar
 
-@defun risky-local-variable-p sym &optional val
-If @var{val} is non-@code{nil}, returns non-@code{nil} if giving
-@var{sym} a file local value of @var{val} would be risky, for any of
-the reasons stated above.  If @var{val} is @code{nil} or omitted, only
-returns @code{nil} if @var{sym} can be safely assigned any file local
-value whatsoever.
-@end defun
-
   The @samp{Eval:} ``variable'' is also a potential loophole, so Emacs
 normally asks for confirmation before handling it.
 
--- a/man/ChangeLog	Sat Feb 11 00:11:19 2006 +0000
+++ b/man/ChangeLog	Tue Feb 14 05:54:12 2006 +0000
@@ -1,3 +1,51 @@
+2006-02-13  Chong Yidong  <cyd@stupidchicken.com>
+
+	* custom.texi (Specifying File Variables, Unsafe File Variables):
+	New nodes, split from File Variables.  Document new file local
+	variable behavior.
+
+2006-02-13  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* display.texi (Standard Faces):
+	* faq.texi (Colors on a TTY):
+	* files.texi (Visiting):
+	* frames.texi (Clipboard):
+	* glossary.texi (Glossary) <Clipboard>:
+	* xresources.texi (X Resources): Mention Mac OS port.
+
+2006-02-12  Karl Berry  <karl@gnu.org>
+
+	* faq.texi (Emacs for Atari ST): use Sch@"auble instead of the
+	8-bit accented a.
+
+2006-02-12  Richard M. Stallman  <rms@gnu.org>
+
+	* building.texi (Building): Clarify topic in intro.
+
+	* maintaining.texi (Maintaining): Change title; clarify topic.
+	Delete duplicate index entries.
+
+	* building.texi (Other GDB User Interface Buffers): Clarifications.
+
+	* text.texi (Cell Commands): Clarifications.
+
+	* programs.texi (Defuns): Delete duplicate explanation of
+	left-margin paren convention.
+	(Hungry Delete): Minor cleanup.
+
+2006-02-11  Mathias Dahl  <mathias.dahl@gmail.com>
+
+	* dired.texi (Tumme): More tumme documentation.
+
+2006-02-11  Alan Mackenzie  <acm@muc.de>
+
+	* programs.texi ("Hungry Delete"): Correct the appellation of the
+	backspace and delete keys to @kbd{DEL} and @kbd{DELETE}.
+
+2006-02-11  Mathias Dahl  <mathias.dahl@gmail.com>
+
+	* dired.texi (Tumme): Fixed small bug.
+
 2006-02-10  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
 	* macos.texi (Mac International): Rename "fontset-mac" to
--- a/man/building.texi	Sat Feb 11 00:11:19 2006 +0000
+++ b/man/building.texi	Tue Feb 14 05:54:12 2006 +0000
@@ -10,7 +10,7 @@
 
   The previous chapter discusses the Emacs commands that are useful for
 making changes in programs.  This chapter deals with commands that assist
-in the larger process of developing and maintaining programs.
+in the larger process of compiling and testing programs.
 
 @menu
 * Compilation::         Compiling programs in languages other
@@ -976,11 +976,13 @@
 If the variable @code{gdb-use-inferior-io-buffer} is non-@code{nil},
 the executable program that is being debugged takes its input and
 displays its output here.  Otherwise it uses the GUD buffer for that.
-To toggle the use of this buffer, do @kbd{M-x
-gdb-use-inferior-io-buffer}.
+To toggle whether GUD mode uses this buffer, do @kbd{M-x
+gdb-use-inferior-io-buffer}.  That takes effect when you next
+restart the program you are debugging.
 
-Some of the commands from shell mode are available here.  @xref{Shell
-Mode}.
+The history and replay commands from Shell mode are available here,
+as are the commands to send signals to the program you are debugging.
+@xref{Shell Mode}.
 
 @item Locals Buffer
 The locals buffer displays the values of local variables of the
@@ -990,8 +992,8 @@
 Arrays and structures display their type only.  With GDB 6.4 or later,
 move point to their name and press @key{RET}, or alternatively click
 @kbd{Mouse-2} there, to examine their values.  With earlier versions
-of GDB, move point to their type description ([struct/union] or
-[array]).  @xref{Watch Expressions}.
+of GDB, use @kbd{Mouse-2} or @key{RET} on the type description
+(@samp{[struct/union]} or @samp{[array]}).  @xref{Watch Expressions}.
 
 @item Registers Buffer
 @findex toggle-gdb-all-registers
--- a/man/custom.texi	Sat Feb 11 00:11:19 2006 +0000
+++ b/man/custom.texi	Tue Feb 14 05:54:12 2006 +0000
@@ -1043,6 +1043,15 @@
 specifications; it automatically makes these variables local to the
 buffer, and sets them to the values specified in the file.
 
+@menu
+* Specifying File Variables:: Specifying file local variables.
+* Unsafe File Variables::     Handling local variables that may not
+                              be safe.
+@end menu
+
+@node Specifying File Variables
+@subsubsection Specifying File Variables
+
   There are two ways to specify local variable values: in the first
 line, or with a local variables list.  Here's how to specify them in the
 first line:
@@ -1170,33 +1179,60 @@
 major mode of a buffer according to the file name and contents,
 including the local variables list if any.  @xref{Choosing Modes}.
 
+@node Unsafe File Variables
+@subsubsection Unsafe File Variables
+
+  File variables create a certain amount of risk; when you visit
+someone else's file, its variables could affect your Emacs in
+arbitrary ways.  A special risk is posed by the @code{eval}
+``variable,'' which can potentially execute arbitrary code, and
+certain actual variables such as @code{load-path}.
+
+  Therefore, whenever Emacs encounters file variables that are not
+known to be safe, it displays the entire list of variables defined in
+that file, and asks you for confirmation before setting them.  You can
+type @samp{y} or @samp{SPC} to apply the local variables list, or
+@samp{n} to ignore it.
+
+  There is a set of file variables and values that are known to be
+safe.  For instance, it is safe to give @code{comment-column} or
+@code{fill-column} any integer value.  If a file specifies only safe
+variable-value pairs, Emacs will not ask for confirmation before
+setting them.  You can also tell Emacs that a set of variable-value
+pairs is safe, by entering @samp{!} at the file variables confirmation
+prompt.  In that case, Emacs will not ask for confirmation if it
+encounters these variable-value pairs in the future.  You can directly
+edit the list of safe variable-value pairs by customizing
+@samp{safe-local-variable-values} (@pxref{Easy Customization}).
+
+  Some variables, such as @code{load-path}, are considered
+@dfn{risky}: there is seldom any reason to specify them as file
+variables, and changing them can be dangerous.  Even if you enter
+@samp{!} at the confirmation prompt, Emacs will not save these values
+for the future.  Therefore, you will be prompted each time the
+variable is encountered.  If you really want to allow such a variable,
+you can avoid the prompt by editing @samp{safe-local-variable-values}.
+
 @findex enable-local-variables
-  The variable @code{enable-local-variables} controls whether to process
-local variables in files, and thus gives you a chance to override them.
-Its default value is @code{t}, which means do process local variables in
-files.  If you set the value to @code{nil}, Emacs simply ignores local
-variables in files.  Any other value says to query you about each file
-that has local variables, showing you the local variable specifications
-so you can judge.
+  The variable @code{enable-local-variables} allows you to change the
+way Emacs processes local variables.  Its default value is @code{t},
+which means the behavior described above.  If you set the value to
+@code{nil}, Emacs simply ignores local variables in files.  Any other
+value says to query you about each file that has local variables, even
+if the variables are known to be safe.
 
 @findex enable-local-eval
-  The @code{eval} ``variable,'' and certain actual variables, create a
-special risk; when you visit someone else's file, local variable
-specifications for these could affect your Emacs in arbitrary ways.
-Therefore, the variable @code{enable-local-eval} controls whether Emacs
-processes @code{eval} variables, as well variables with names that end
-in @samp{-hook}, @samp{-hooks}, @samp{-function} or @samp{-functions},
-and certain other variables.  The three possibilities for the variable's
-value are @code{t}, @code{nil}, and anything else, just as for
-@code{enable-local-variables}.  The default is @code{maybe}, which is
-neither @code{t} nor @code{nil}, so normally Emacs does ask for
-confirmation about file settings for these variables.
+  The variable @code{enable-local-eval} controls whether Emacs
+processes @code{eval} variables.  The three possibilities for the
+variable's value are @code{t}, @code{nil}, and anything else, just as
+for @code{enable-local-variables}.  The default is @code{maybe}, which
+is neither @code{t} nor @code{nil}, so normally Emacs does ask for
+confirmation about processes @code{eval} variables.
 
 @findex safe-local-eval-forms
   The @code{safe-local-eval-forms} is a customizable list of eval
 forms which are safe to eval, so Emacs should not ask for
-confirmation to evaluate these forms, even if
-@code{enable-local-variables} says to ask for confirmation in general.
+confirmation to evaluate these forms.
 
 @node Key Bindings
 @section Customizing Key Bindings
--- a/man/dired.texi	Sat Feb 11 00:11:19 2006 +0000
+++ b/man/dired.texi	Tue Feb 14 05:54:12 2006 +0000
@@ -1146,47 +1146,85 @@
 @section Thumbnail and image file viewing and manipulation
 
 @cindex tumme mode
-  Tumme provides for simple viewing of thumbnails if image files.  It
-also provides viewing of the original file, sized or in full size,
-inside Emacs or in an external viewer.  
+
+  Tumme provides for simple viewing of thumbnails of image files.  It
+provides viewing of the original file, sized or in full size, inside
+Emacs or in an external viewer.
 
   Tumme aims to be both easy to use for a beginner but also powerful
-and useful for an experienced user.
+and useful to an experienced user.
+
+  The quickest way to try out Tumme is to use the command
+@code{tumme}.  It will prompt for a directory where there are images
+files.  All images in that directory will get thumbnail files created
+for them, and the thumbnails will be displayed in the ``thumbnail
+buffer''.
 
-  To try out Tumme, mark some image files in Dired and type @kbd{C-t
-d} (@code{tumme-display-thumbs}).  With point in the thumbnail buffer,
-type @kbd{RET} (@code{tumme-display-thumbnail-original-image}) to
-display a sized version of it.  Use the keys to move around in the
-buffer.  For easy browing, type @kbd{SPC}
-(@code{tumme-display-next-thumbnail-original}) to advance and display
-the next image.  Typing @kbd{SPC}
+  If the directory contains many image files and becayse thumbnails
+are created on the fly before they can be displayed, the above command
+might take a long time, especially the first time (consecutive
+viewings will use the cached thumbnail files).  Also, if the number of
+image files is higher than @code{tumme-show-all-from-dir-max-files},
+the command will be aborted.  To work around this you can instead mark
+the files you want to look at, using @kbd{m} as usual in Dired, and
+then type @kbd{C-t d} (@code{tumme-display-thumbs}).
+
+  Regardless of which command you chose to display the thumbnails, a
+new buffer will open up, displaying thumbnail images of the files that
+were marked in dired.  The new buffer will be the active one.
+
+  With point in the thumbnail buffer, type @kbd{RET}
+(@code{tumme-display-thumbnail-original-image}) to display a sized
+version of it in another window.  The image will be sized to fit the
+window.  Use the arrow keys to move around in the buffer.  For easy
+browing, type @kbd{SPC} (@code{tumme-display-next-thumbnail-original})
+to advance and display the next image.  Typing @kbd{DEL}
 (@code{tumme-display-previous-thumbnail-original}) backs up to the
-previous thumbnail and displays the image.
+previous thumbnail and displays that instead.
 
   If you want to see the image in its original size, either provide a
 prefix argument (@kbd{C-u}) before pressing @kbd{RET}, or type
 @kbd{C-return} (@code{tumme-thumbnail-display-external}) to display
-the image in an external viewer.
+the image in an external viewer.  To use the latter,
+@code{tumme-external-viewer} must be configured.
 
   If you find in image that you want to delete, type @kbd{d}
 (@code{tumme-flag-thumb-original-file}) and the file will be flagged
-for deletion in the dired buffer.  If you just want to delete the
-thumbnail image from the thumbnail buffer, type @kbd{C-d}
+for deletion in the dired buffer.  If you just want visually to delete
+the thumbnail image from the thumbnail buffer, type @kbd{C-d}
 (@code{tumme-delete-char}).
 
-  More advanced features include commands for using ``tags'' (labels,
-or categories) to tag image files and to search for image files with a
-certain tag.
+  More advanced features include commands for using ``tags''.  ``Tag''
+is just another word for ``keyword'', ``label'' or ``category''.  In
+short, it is meta data used to categorize an image file.  Commands
+exist to add tags for one or many image files from dired, to mark
+files having a certain tag in Dired and to remove tags from files.
+The tags put on image files are stored in a database file (currently a
+plain text file).
 
-  The tags put on image files are stored in a database file and can be
-used for marking image files.  For example, you can let Tumme mark all
-files in the current directory tagged with the tag `flowers'.  To tag
-image files, mark them in the dired buffer and type @kbd{C-t t}
-(@code{tumme-tag-files}).  To mark files having a certain tag, type
-@kbd{C-t f} (@code{tumme-mark-tagged-files}).
+  To tag image files, mark them in the dired buffer and type @kbd{C-t
+t} (@code{tumme-tag-files}).  You will be prompted for a tag. To mark
+files having a certain tag, type @kbd{C-t f}
+(@code{tumme-mark-tagged-files}). After marking image files with a
+certain tag, they can be viewed as explained earlier, by typing
+@key{C-t d}.
+
+  You can also tag a file from the thumbnail buffer by typing @kbd{t
+t} and remove it by typing @kbd{t r}.  There is also a special ``tag''
+called ``comment'' for each file (it is not a tag in the exact same
+sense as the other tags, it is handled slightly different).  That is
+used to enter a comment or description about the image.  You comment a
+file from the thumbnail buffer by typing @kbd{c}.  You will be
+prompted for a comment.  Comments can also be added from Dired, and
+then also to multiple files at once, by typing @kbd{C-t c}
+(@code{tumme-dired-comment-files}).
 
   Tumme also provide simple image manipulation commands, like rotating
-thumbnails and original image files.
+thumbnails and original image files.  In the thumbnail buffer, type
+@kbd{L} to rotate the original image 90 degrees anti clockwise, and
+@kbd{R} to rotate it 90 degrees clockwise.  This rotation will be done
+lossless (the image quality will not be reduced) and needs an external
+utility called JpegTRAN to work.
 
 @node Misc Dired Features
 @section Other Dired Features
--- a/man/display.texi	Sat Feb 11 00:11:19 2006 +0000
+++ b/man/display.texi	Tue Feb 14 05:54:12 2006 +0000
@@ -472,7 +472,7 @@
 Bars}.  Setting the font of LessTif/Motif menus is currently not
 supported; attempts to set the font are ignored in this case.
 Likewise, attempts to customize this face in Emacs built with GTK and
-in the MS-Windows port are ignored by the respective GUI toolkits;
+in the MS-Windows/Mac ports are ignored by the respective GUI toolkits;
 you need to use system-wide styles and options to change the
 appearance of the menus.
 @end table
--- a/man/faq.texi	Sat Feb 11 00:11:19 2006 +0000
+++ b/man/faq.texi	Tue Feb 14 05:54:12 2006 +0000
@@ -1272,7 +1272,7 @@
 
 In Emacs 21.1 and later, colors and faces are supported in non-windowed mode,
 i.e.@: on Unix and GNU/Linux text-only terminals and consoles, and when
-invoked as @samp{emacs -nw} on X and MS-Windows.  (Colors and faces were
+invoked as @samp{emacs -nw} on X, MS-Windows, and Mac.  (Colors and faces were
 supported in the MS-DOS port since Emacs 19.29.)  Emacs automatically
 detects color support at startup and uses it if available.  If you think
 that your terminal supports colors, but Emacs won't use them, check the
@@ -3670,7 +3670,7 @@
 @cindex Atari ST, Emacs for
 @cindex TOS, Emacs for
 
-Roland Schäuble reports that Emacs 18.58 running on plain TOS and MiNT
+Roland Sch@"auble reports that Emacs 18.58 running on plain TOS and MiNT
 is available at
 @uref{ftp://atari.archive.umich.edu/Editors/Emacs-18-58/1858b-d3.zoo}.
 
--- a/man/files.texi	Sat Feb 11 00:11:19 2006 +0000
+++ b/man/files.texi	Tue Feb 14 05:54:12 2006 +0000
@@ -239,7 +239,7 @@
 or tool bar) use the toolkit's standard File Selection dialog instead
 of prompting for the file name in the minibuffer.  On Unix and
 GNU/Linux platforms, Emacs does that when built with GTK, LessTif, and
-Motif toolkits; on MS-Windows, the GUI version does that by default.
+Motif toolkits; on MS-Windows and Mac, the GUI version does that by default.
 For information on how to customize this, see @ref{Dialog Boxes}.
 
   Secondly, Emacs supports ``drag and drop''; dropping a file into an
--- a/man/frames.texi	Sat Feb 11 00:11:19 2006 +0000
+++ b/man/frames.texi	Tue Feb 14 05:54:12 2006 +0000
@@ -293,7 +293,7 @@
 the Emacs yank functions consult the clipboard before the primary
 selection, and to make the kill functions to store in the clipboard as
 well as the primary selection.  Otherwise they do not access the
-clipboard at all.  Using the clipboard is the default on MS-Windows,
+clipboard at all.  Using the clipboard is the default on MS-Windows and Mac,
 but not on other systems.
 
 @node Mouse References
--- a/man/glossary.texi	Sat Feb 11 00:11:19 2006 +0000
+++ b/man/glossary.texi	Tue Feb 14 05:54:12 2006 +0000
@@ -175,7 +175,7 @@
 @item Clipboard
 A clipboard is a buffer provided by the window system for transferring
 text between applications.  On the X Window system, the clipboard is
-provided in addition to the primary selection (q.v.@:); on MS-Windows,
+provided in addition to the primary selection (q.v.@:); on MS-Windows and Mac,
 the clipboard is used @emph{instead} of the primary selection.
 @xref{Clipboard}.
 
--- a/man/maintaining.texi	Sat Feb 11 00:11:19 2006 +0000
+++ b/man/maintaining.texi	Tue Feb 14 05:54:12 2006 +0000
@@ -3,14 +3,11 @@
 @c   2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
 @node Maintaining, Abbrevs, Building, Top
-@chapter Maintaining Programs
-@cindex Lisp editing
-@cindex C editing
-@cindex program editing
+@chapter Maintaining Large Programs
 
-  This chapter describes Emacs features for maintaining programs.  The
-version control features (@pxref{Version Control}) are also particularly
-useful for this purpose.
+  This chapter describes Emacs features for maintaining large
+programs.  The version control features (@pxref{Version Control}) are
+also particularly useful for this purpose.
 
 @menu
 * Change Log::	        Maintaining a change history for your program.
--- a/man/programs.texi	Sat Feb 11 00:11:19 2006 +0000
+++ b/man/programs.texi	Tue Feb 14 05:54:12 2006 +0000
@@ -132,19 +132,6 @@
 something like a function, is called a @dfn{defun}.  The name comes
 from Lisp, but in Emacs we use it for all languages.
 
-  In many programming language modes, Emacs assumes that a defun is
-any pair of parentheses (or braces, if the language uses braces this
-way) that starts at the left margin.  For example, in C, the body of a
-function definition is a defun, usually recognized as an open-brace
-that begins at the left margin@footnote{Alternatively, you can set up
-C Mode to recognize a defun at an opening brace at the outermost
-level.  @xref{Movement Commands,,, ccmode, the CC Mode Manual}.}.  A
-variable's initializer can also count as a defun, if the open-brace
-that begins the initializer is at the left margin.
-
-  However, some language modes provide their own code for recognizing
-defuns in a way that suits the language syntax and conventions better.
-
 @menu
 * Left Margin Paren::   An open-paren or similar opening delimiter
                           starts a defun if it is at the left margin.
@@ -1552,30 +1539,30 @@
 preprocessor commands.
 
 @table @kbd
-@item C-c C-@key{BS}
-@itemx C-c @key{BS}
+@item C-c C-@key{DEL}
+@itemx C-c @key{DEL}
 @findex c-hungry-backspace
-@kindex C-c C-@key{BS} (C Mode)
-@kindex C-c @key{BS} (C Mode)
+@kindex C-c C-@key{DEL} (C Mode)
+@kindex C-c @key{DEL} (C Mode)
 @code{c-hungry-backspace}---Delete the entire block of whitespace
 preceding point.
 
 @item C-c C-d
-@itemx C-c C-@key{DEL}
-@itemx C-c @key{DEL}
+@itemx C-c C-@key{DELETE}
+@itemx C-c @key{DELETE}
 @findex c-hungry-delete-forward
 @kindex C-c C-d (C Mode)
-@kindex C-c C-@key{DEL} (C Mode)
-@kindex C-c @key{DEL} (C Mode)
+@kindex C-c C-@key{DELETE} (C Mode)
+@kindex C-c @key{DELETE} (C Mode)
 @code{c-hungry-delete-forward}---Delete the entire block of whitespace
 following point.
 @end table
 
   As an alternative to the above commands, you can enable @dfn{hungry
 delete mode}.  When this feature is enabled (indicated by @samp{/h} in
-the mode line after the mode name), a single @key{BS} command deletes
-all preceding whitespace, not just one space, and a single @kbd{C-c
-C-d} (but @emph{not} @key{DELETE}) deletes all following whitespace.
+the mode line after the mode name), a single @key{DEL} deletes all
+preceding whitespace, not just one space, and a single @kbd{C-c C-d}
+(but @emph{not} plain @key{DELETE}) deletes all following whitespace.
 
 @table @kbd
 @item M-x c-toggle-hungry-state
--- a/man/text.texi	Sat Feb 11 00:11:19 2006 +0000
+++ b/man/text.texi	Tue Feb 14 05:54:12 2006 +0000
@@ -2575,10 +2575,10 @@
 moves to the last cell.
 
 @findex table-span-cell
-  The command @code{table-span-cell} spans the current cell into one
-of the four directions---right, left, above or below---and merges the
-current cell with the adjacent cell.  It does not allow directions to
-which spanning does not produce a legitimate cell.
+  The command @code{table-span-cell} merges the current cell with the
+adjacent cell in a specified direction---right, left, above or below.
+You specify the direction with the minibuffer.  It does not allow
+merges which don't result in a legitimate cell layout.
 
 @findex table-split-cell
 @cindex text-based tables, split a cell
@@ -2586,7 +2586,8 @@
   The command @code{table-split-cell} splits the current cell
 vertically or horizontally.  This command is a wrapper to the
 direction specific commands @code{table-split-cell-vertically} and
-@code{table-split-cell-horizontally}.
+@code{table-split-cell-horizontally}.  You specify the direction with
+a minibuffer argument.
 
 @findex table-split-cell-vertically
   The command @code{table-split-cell-vertically} splits the current
--- a/man/xresources.texi	Sat Feb 11 00:11:19 2006 +0000
+++ b/man/xresources.texi	Tue Feb 14 05:54:12 2006 +0000
@@ -8,7 +8,8 @@
   You can customize some X-related aspects of Emacs behavior using X
 resources, as is usual for programs that use X.  On MS-Windows, you
 can customize some of the same aspects using the system registry.
-@xref{MS-Windows Registry}.
+@xref{MS-Windows Registry}.  Likewise, the Mac Carbon port emulates X
+resources using the Preferences system.  @xref{Mac Environment Variables}.
 
   When Emacs is built using an `X toolkit', such as Lucid or LessTif,
 you need to use X resources to customize the appearance of the
--- a/src/.gdbinit	Sat Feb 11 00:11:19 2006 +0000
+++ b/src/.gdbinit	Tue Feb 14 05:54:12 2006 +0000
@@ -548,7 +548,16 @@
 define xwindow
   xgetptr $
   print (struct window *) $ptr
-  printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top
+  set $window = (struct window *) $ptr
+  xgetint $window->total_cols
+  set $width=$int
+  xgetint $window->total_lines
+  set $height=$int
+  xgetint $window->left_col
+  set $left=$int
+  xgetint $window->top_line
+  set $top=$int
+  printf "%dx%d+%d+%d\n", $width, $height, $left, $top
 end
 document xwindow
 Print $ as a window pointer, assuming it is an Emacs Lisp window value.
--- a/src/ChangeLog	Sat Feb 11 00:11:19 2006 +0000
+++ b/src/ChangeLog	Tue Feb 14 05:54:12 2006 +0000
@@ -1,3 +1,26 @@
+2006-02-13  Richard M. Stallman  <rms@gnu.org>
+
+	* .gdbinit (xwindow): Update the code to show the window box.
+
+2006-02-13  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
+
+	* xterm.c (note_mouse_movement): Check for NULL FRAME_X_OUTPUT (frame).
+
+2006-02-12  Richard M. Stallman  <rms@gnu.org>
+
+	* cmds.c (internal_self_insert): Handle weird auto-fill-function.
+
+2006-02-11  Eli Zaretskii  <eliz@gnu.org>
+
+	* keyboard.c (Venable_disabled_menus_and_buttons): New variable.
+	(syms_of_keyboard): DEVFAR_LISP and initialize it.
+	(parse_tool_bar_item, parse_menu_item): If that variable is
+	non-nil, don't disable menu items and tool-bar buttons.
+
+2006-02-11  Juanma Barranquero  <lekktu@gmail.com>
+
+	* doc.c (Fsubstitute_command_keys): Doc fix.
+
 2006-02-10  Thien-Thi Nguyen  <ttn@gnu.org>
 
 	* data.c (Findirect_function): Rewrite docstring.
--- a/src/cmds.c	Sat Feb 11 00:11:19 2006 +0000
+++ b/src/cmds.c	Tue Feb 14 05:54:12 2006 +0000
@@ -536,7 +536,8 @@
 	   justification, if any, know where the end is going to be.  */
 	SET_PT_BOTH (PT - 1, PT_BYTE - 1);
       tem = call0 (current_buffer->auto_fill_function);
-      if (c == '\n')
+      /* Test PT < ZV in case the auto-fill-function is strange.  */
+      if (c == '\n' && PT < ZV)
 	SET_PT_BOTH (PT + 1, PT_BYTE + 1);
       if (!NILP (tem))
 	hairy = 2;
--- a/src/doc.c	Sat Feb 11 00:11:19 2006 +0000
+++ b/src/doc.c	Tue Feb 14 05:54:12 2006 +0000
@@ -739,7 +739,7 @@
 sequence that will invoke COMMAND, or "M-x COMMAND" if COMMAND is not
 on any keys.
 Substrings of the form \\=\\{MAPVAR} are replaced by summaries
-\(made by describe-bindings) of the value of MAPVAR, taken as a keymap.
+\(made by `describe-bindings') of the value of MAPVAR, taken as a keymap.
 Substrings of the form \\=\\<MAPVAR> specify to use the value of MAPVAR
 as the keymap for future \\=\\[COMMAND] substrings.
 \\=\\= quotes the following character and is discarded;
--- a/src/keyboard.c	Sat Feb 11 00:11:19 2006 +0000
+++ b/src/keyboard.c	Tue Feb 14 05:54:12 2006 +0000
@@ -649,6 +649,11 @@
 
 static EMACS_TIME timer_last_idleness_start_time;
 
+/* If non-nil, events produced by disabled menu items and tool-bar
+   buttons are not ignored.  Help functions bind this to allow help on
+   those items and buttons.  */
+Lisp_Object Venable_disabled_menus_and_buttons;
+
 
 /* Global variable declarations.  */
 
@@ -7270,7 +7275,9 @@
       if (SYMBOLP (item))
 	{
 	  tem = Fget (item, Qmenu_enable);
-	  if (!NILP (tem))
+	  if (!NILP (Venable_disabled_menus_and_buttons))
+	    AREF (item_properties, ITEM_PROPERTY_ENABLE) = Qt;
+	  else if (!NILP (tem))
 	    AREF (item_properties, ITEM_PROPERTY_ENABLE) = tem;
 	}
     }
@@ -7299,7 +7306,12 @@
 	      item = XCDR (item);
 
 	      if (EQ (tem, QCenable))
-		AREF (item_properties, ITEM_PROPERTY_ENABLE) = XCAR (item);
+		{
+		  if (!NILP (Venable_disabled_menus_and_buttons))
+		    AREF (item_properties, ITEM_PROPERTY_ENABLE) = Qt;
+		  else
+		    AREF (item_properties, ITEM_PROPERTY_ENABLE) = XCAR (item);
+		}
 	      else if (EQ (tem, QCvisible) && !notreal)
 		{
 		  /* If got a visible property and that evaluates to nil
@@ -7819,8 +7831,13 @@
       value = XCAR (XCDR (item));
 
       if (EQ (key, QCenable))
-	/* `:enable FORM'.  */
-	PROP (TOOL_BAR_ITEM_ENABLED_P) = value;
+	{
+	  /* `:enable FORM'.  */
+	  if (!NILP (Venable_disabled_menus_and_buttons))
+	    PROP (TOOL_BAR_ITEM_ENABLED_P) = Qt;
+	  else
+	    PROP (TOOL_BAR_ITEM_ENABLED_P) = value;
+	}
       else if (EQ (key, QCvisible))
 	{
 	  /* `:visible FORM'.  If got a visible property and that
@@ -11469,6 +11486,14 @@
 The value of that variable is passed to `quit-flag' and later causes a
 peculiar kind of quitting.  */);
   Vthrow_on_input = Qnil;
+
+  DEFVAR_LISP ("enable-disabled-menus-and-buttons",
+	       &Venable_disabled_menus_and_buttons,
+	       doc: /* If non-nil, don't ignore events produced by disabled menu items and tool-bar.
+
+Help functions bind this to allow help on disabled menu items
+and tool-bar buttons.  */);
+  Venable_disabled_menus_and_buttons = Qnil;
 }
 
 void
--- a/src/xterm.c	Sat Feb 11 00:11:19 2006 +0000
+++ b/src/xterm.c	Tue Feb 14 05:54:12 2006 +0000
@@ -3598,6 +3598,9 @@
   last_mouse_motion_event = *event;
   XSETFRAME (last_mouse_motion_frame, frame);
 
+  if (!FRAME_X_OUTPUT (frame))
+    return 0;
+
   if (event->window != FRAME_X_WINDOW (frame))
     {
       frame->mouse_moved = 1;