changeset 83565:41aaac7180d5

Merged from emacs@sv.gnu.org Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-708 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-709 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-710 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-711 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-712 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-713 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-714 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-715 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-716 Merge from emacs--rel--22 * emacs@sv.gnu.org/emacs--devo--0--patch-717 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-718 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-719 Merge from emacs--rel--22 * emacs@sv.gnu.org/emacs--devo--0--patch-720 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-721 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-722 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-723 Merge from emacs--rel--22: lisp/dired-x.el: Revert 2007-04-06 change. * emacs@sv.gnu.org/emacs--devo--0--patch-724 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-725 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-726 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-727 Merge from emacs--rel--22 * emacs@sv.gnu.org/emacs--devo--0--patch-728 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-729 Merge from emacs--rel--22 * emacs@sv.gnu.org/emacs--devo--0--patch-730 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-731 Merge from emacs--rel--22 * emacs@sv.gnu.org/emacs--devo--0--patch-732 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-733 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-734 Merge from emacs--rel--22 * emacs@sv.gnu.org/emacs--devo--0--patch-735 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-736 Merge from emacs--rel--22 * emacs@sv.gnu.org/emacs--devo--0--patch-737 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-738 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-739 Merge from emacs--rel--22 * emacs@sv.gnu.org/emacs--devo--0--patch-740 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-741 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-742 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-743 Merge from emacs--rel--22 * emacs@sv.gnu.org/emacs--rel--22--base-0 tag of emacs@sv.gnu.org/emacs--devo--0--patch-709 * emacs@sv.gnu.org/emacs--rel--22--patch-1 Sync to CVS tag EMACS_22_BRANCHPOINT * emacs@sv.gnu.org/emacs--rel--22--patch-2 Sync to CVS branch EMACS_22_BASE * emacs@sv.gnu.org/emacs--rel--22--patch-3 Update from CVS * emacs@sv.gnu.org/emacs--rel--22--patch-4 Update from CVS * emacs@sv.gnu.org/emacs--rel--22--patch-5 Update from CVS * emacs@sv.gnu.org/emacs--rel--22--patch-6 Update from CVS * emacs@sv.gnu.org/emacs--rel--22--patch-7 Update from CVS * emacs@sv.gnu.org/emacs--rel--22--patch-8 Update from CVS * emacs@sv.gnu.org/emacs--rel--22--patch-9 Update from CVS * emacs@sv.gnu.org/emacs--rel--22--patch-10 Update from CVS * emacs@sv.gnu.org/emacs--rel--22--patch-11 Update from CVS * emacs@sv.gnu.org/emacs--rel--22--patch-12 Update from CVS * emacs@sv.gnu.org/emacs--rel--22--patch-13 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-217 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-218 Merge from emacs--devo--0, emacs--rel--22 * emacs@sv.gnu.org/gnus--rel--5.10--patch-219 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-220 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-605
author Karoly Lorentey <karoly@lorentey.hu>
date Fri, 11 May 2007 18:24:42 +0000
parents 8cb34e1b7bbb (current diff) 776cb0a1bb24 (diff)
children ddc474387d53
files ChangeLog admin/FOR-RELEASE admin/notes/copyright configure etc/TODO lisp/ChangeLog lisp/calendar/todo-mode.el lisp/emacs-lisp/eldoc.el lisp/files.el lisp/font-lock.el lisp/international/mule.el lisp/ldefs-boot.el lisp/net/rcirc.el lisp/progmodes/idlw-shell.el lisp/progmodes/idlwave.el lisp/progmodes/vhdl-mode.el lisp/simple.el lisp/startup.el lisp/subr.el lisp/term/mac-win.el lisp/tumme.el lisp/vc-hooks.el lisp/vc.el lispref/ChangeLog lispref/elisp.texi man/ChangeLog man/emacs.texi src/gtkutil.c src/keymap.c src/lisp.h src/lread.c src/process.c src/sysdep.c src/xdisp.c src/xmenu.c
diffstat 172 files changed, 8189 insertions(+), 7150 deletions(-) [+]
line wrap: on
line diff
--- a/AUTHORS	Sun Apr 22 13:47:56 2007 +0000
+++ b/AUTHORS	Fri May 11 18:24:42 2007 +0000
@@ -333,10 +333,10 @@
   url-file.el url-handlers.el url-http.el url-nfs.el
 
 Chong Yidong: changed cus-edit.el simple.el files.el custom.el
-  display.texi longlines.el xdisp.c keyboard.c compile.el custom.texi
-  files.texi info.el text.texi frames.texi image-mode.el mouse.el
-  startup.el wid-edit.el xterm.c cus-theme.el faces.el
-  and 290 other files
+  display.texi longlines.el xdisp.c files.texi info.el keyboard.c
+  compile.el custom.texi text.texi frames.texi image-mode.el mouse.el
+  misc.texi startup.el wid-edit.el xterm.c cus-theme.el
+  and 295 other files
 
 Chris Hanson: changed xscheme.el scheme.el xterm.c hpux.h x11term.c
   hp9000s300.h keyboard.c process.c texinfmt.el emacsclient.c sort.el
@@ -456,10 +456,10 @@
 
 Dave Love: wrote autoarg.el autoconf.el benchmark.el cfengine.el
   code-pages.el elide-head.el georgian.el hl-line.el latin-8.el
-  latin-9.el latin1-disp.el python.el refill.el rfc1345.el sgml-input.el
-  smiley.el subst-big5.el subst-gb2312.el subst-jis.el subst-ksc.el
-  tool-bar.el ucs-tables.el uni-input.el utf-16.el utf-7.el utf-8-lang.el
-  welsh.el
+  latin-9.el latin1-disp.el python.el refill.el rfc1345.el
+  sgml-input.el smiley.el subst-big5.el subst-gb2312.el subst-jis.el
+  subst-ksc.el tool-bar.el ucs-tables.el uni-input.el utf-16.el
+  utf-7.el utf-8-lang.el welsh.el
 and changed configure.in Makefile.in help.el fortran.el browse-url.el
   mule-cmds.el simple.el xterm.c cus-edit.el files.el info.el mule.el
   wid-edit.el fns.c vc.el rfc2047.el bindings.el cus-start.el buffer.c
@@ -522,8 +522,9 @@
 
 David M. Brown: wrote array.el
 
-David M. Koppelman: wrote hi-lock.el
-and changed display.texi
+David M. Koppelman: changed hi-lock.el display.texi
+
+David M. Koppelman, Koppel@Ece.Lsu.Edu: wrote hi-lock.el
 
 David M. Smith: wrote ielm.el
 and changed imenu.el
@@ -747,7 +748,7 @@
 and changed etags.c man.el delta.h undigest.el etags.1 comint.el
   configure.in uniquify.el latin-post.el rmail.el Makefile.in etags.el
   latin-alt.el maintaining.texi sgml-mode.el data.c european.el
-  filelock.c files.el generic-x.el gud.el and 42 other files
+  filelock.c files.el generic-x.el gud.el and 43 other files
 
 Francis J. Wright: wrote woman.el
 and changed dired.el comint.el files.el
@@ -851,9 +852,9 @@
 
 Glenn Morris: changed f90.el diary-lib.el calendar.el fortran.el
   calendar.texi appt.el sh-script.el Makefile.in timeclock.el cal-menu.el
-  complete.el startup.el MACHINES abbrevs.texi cal-hebrew.el cal-islam.el
-  configure.in emacs.texi files.el fr-refcard.tex holidays.el
-  and 138 other files
+  files.el complete.el configure.in startup.el MACHINES abbrevs.texi
+  cal-hebrew.el cal-islam.el emacs.texi fr-refcard.tex holidays.el
+  and 145 other files
 
 Glynn Clements: wrote gamegrid.el snake.el tetris.el
 
@@ -878,7 +879,8 @@
 
 Gregory Neil Shapiro: changed mailabbrev.el
 
-Guanpeng Xu: changed add-log.el TUTORIAL.cn mouse.el type-break.el
+Guanpeng Xu: changed add-log.el TUTORIAL.cn display.texi mouse.el
+  type-break.el
 
 Guillermo J. Rozas: wrote fakemail.c
 
@@ -920,8 +922,6 @@
 
 Henry Kautz: wrote bib-mode.el refbib.el
 
-Herbert Euler: changed display.texi
-
 Hewlett-Packard: changed emacsclient.c emacsserver.c keyboard.c server.el
 
 Hideki Iwamoto: changed etags.c
@@ -1177,8 +1177,8 @@
 Johan Bockg,Ae(Brd: changed erc.el erc-backend.el cl-macs.el erc-match.el
   erc-nickserv.el erc-ring.el erc-speak.el erc-track.el simple.el
   align.el bytecomp.el calendar.el cl.texi custom.el dired-aux.el
-  display.texi erc-bbdb.el erc-button.el erc-compat.el erc-dcc.el
-  erc-list.el and 15 other files
+  dired-x.el display.texi erc-bbdb.el erc-button.el erc-compat.el
+  erc-dcc.el and 16 other files
 
 Johan Vromans: wrote forms-d2.el forms.el iso-acc.el
 and changed complete.el
@@ -1440,11 +1440,10 @@
   and 5 other files
 
 Kevin Ryde: wrote info-xref.el
-and changed info-look.el info.el cl.texi gnus-art.el gnus-sum.el
-  mailcap.el os.texi text.texi MORE.STUFF arc-mode.el cal-dst.el
+and changed info-look.el info.el arc-mode.el cl.texi gnus-art.el
+  gnus-sum.el mailcap.el mule.el os.texi text.texi MORE.STUFF cal-dst.el
   calendar.texi cc-align.el cmdargs.texi compile.texi display.texi
-  em-alias.el em-dirs.el em-hist.el em-unix.el emacs-lisp-intro.texi
-  and 19 other files
+  em-alias.el em-dirs.el em-hist.el em-unix.el and 19 other files
 
 Kim F. Storm: wrote bindat.el cua-base.el cua-gmrk.el cua-rect.el ido.el
   keypad.el kmacro.el
@@ -1551,6 +1550,8 @@
 Leonard H. Tower Jr.: changed rnews.el rnewspost.el emacsbug.el
   rmailout.el
 
+Levin Du: changed parse-time.el
+
 Liam Healy: changed outline.el
 
 Lloyd Zusman: changed mml.el pgg-gpg.el
@@ -1697,8 +1698,8 @@
 Martin Rudalics: changed cus-edit.el wid-edit.el cus-start.el files.el
   flyspell.el font-lock.el complete.el insdel.c macmenu.c syntax.c
   w32menu.c wdired.el whitespace.el window.el xdisp.c xmenu.c
-  backups.texi buffer.c buffer.h casefiddle.c cperl-mode.el
-  and 34 other files
+  backups.texi buffer.c buffer.h casefiddle.c cc-mode.el
+  and 36 other files
 
 Martin Stjernholm: wrote cc-bytecomp.el
 and changed cc-engine.el cc-cmds.el cc-langs.el cc-defs.el cc-mode.el
@@ -1726,8 +1727,8 @@
 
 Masayuki Fujii: changed dnd.el w32-win.el
 
-Mathias Dahl: wrote tumme.el
-and changed dired.el dired.texi
+Mathias Dahl: wrote image-dired.el
+and changed tumme.el dired.el dired.texi
 
 Mathias Megyei: changed Makefile.in
 
@@ -1930,9 +1931,9 @@
 
 Nick Roberts: wrote gdb-ui.el
 and changed gud.el building.texi tooltip.el speedbar.el bindings.el
-  thumbs.el xt-mouse.el .gdbinit DEBUG cc-mode.el frames.texi subr.el
-  t-mouse.el comint.el display.texi help-mode.el compile.el descr-text.el
-  dired.el gud-display.pbm speedbar.texi and 115 other files
+  thumbs.el xt-mouse.el .gdbinit DEBUG cc-mode.el t-mouse.el frames.texi
+  subr.el comint.el display.texi help-mode.el compile.el descr-text.el
+  dired.el gud-display.pbm speedbar.texi and 116 other files
 
 Nico Francois: changed w32fns.c w32inevt.c w32menu.c
 
@@ -2398,8 +2399,8 @@
 
 Skip Collins: changed w32fns.c w32term.c w32term.h
 
-Slawomir Nowaczyk: changed emacs.py python.el TUTORIAL.pl flyspell.el
-  ls-lisp.el w32proc.c
+Slawomir Nowaczyk: changed python.el TUTORIAL.pl flyspell.el ls-lisp.el
+  w32proc.c
 
 Spencer Thomas: changed dabbrev.el emacsclient.c emacsserver.c gnus.texi
   server.el tcp.c unexec.c
@@ -2459,7 +2460,7 @@
 
 Steven E. Harris: changed nnheader.el
 
-Steven Huwig: changed emacs.py python.el
+Steven Huwig: changed python.el
 
 Steven L. Baur: wrote earcon.el footnote.el gnus-audio.el gnus-setup.el
 and changed gnus-xmas.el gnus-msg.el add-log.el dgnushack.el edebug.el
--- a/ChangeLog	Sun Apr 22 13:47:56 2007 +0000
+++ b/ChangeLog	Fri May 11 18:24:42 2007 +0000
@@ -1,3 +1,20 @@
+2007-05-03  Glenn Morris  <rgm@gnu.org>
+
+	* configure: Tweak message about the absence of shell functions.
+
+2007-04-27  Andreas Schwab  <schwab@suse.de>
+
+	* Makefile.in (config.status): Depend on
+	${srcdir}/lisp/version.el.
+
+2007-04-26  Glenn Morris  <rgm@gnu.org>
+
+	* README: Increase version to 22.1.50.
+
+2007-04-24  Juanma Barranquero  <lekktu@gmail.com>
+
+	* INSTALL (DETAILED BUILDING AND INSTALLATION): Fix typo.
+
 2007-04-19  Glenn Morris  <rgm@gnu.org>
 
 	* configure.in: Signal error if Xaw libs are missing in a Lucid
@@ -25,7 +42,7 @@
 	* configure.in: Restore support for hp800 (removed 2007-01-27)
 	following clarification of legal status.
 
-2007-03-22  Joe Buehler  <jbuehler@spirentcom.com> (tiny change)
+2007-03-22  Joe Buehler  <jbuehler@spirentcom.com>  (tiny change)
 
 	* configure.in: Add support for AIX4.3 on IBM RS6000.
 
--- a/INSTALL	Sun Apr 22 13:47:56 2007 +0000
+++ b/INSTALL	Fri May 11 18:24:42 2007 +0000
@@ -298,13 +298,13 @@
   --without-png        for PNG image support
 
 Use --without-toolkit-scroll-bars to disable LessTif/Motif or Xaw3d
-scroll bars.  
+scroll bars.
 
 Use --without-xim to inhibit the default use of X Input Methods.  In
 this case, the X resource useXIM can be used to turn on use of XIM.
 
 Use --disable-largefile omits support for files larger than 2GB on
-systems which support that.  
+systems which support that.
 
 Use --without-sound to disable sound support.
 
@@ -364,8 +364,8 @@
 directories for some header files, or link against optional
 libraries, or use special compilation options.  You can force
 `configure' and the build process which follows it to do that by
-setting the variables CPPFLGS, CFLAGS, LDFLAGS, LIBS, CPP and CC before
-running `configure'.  CPP is the command which invokes the
+setting the variables CPPFLAGS, CFLAGS, LDFLAGS, LIBS, CPP and CC
+before running `configure'.  CPP is the command which invokes the
 preprocessor, CPPFLAGS lists the options passed to it, CFLAGS are
 compilation options, LDFLAGS are options used when linking, LIBS are
 libraries to link against, and CC is the command which invokes the
@@ -384,10 +384,10 @@
 switch to the compiler, and link against libfoo.a and libbar.a
 libraries in addition to the standard ones.
 
-For some libraries, like Gtk+, fontconfig and ALSA, `configure' use 
-pkg-config to find where those libraries are installed. 
-If you want pkg-config to look in special directories, you have to set 
-the environment variable PKG_CONFIG_PATH to point to the directories 
+For some libraries, like Gtk+, fontconfig and ALSA, `configure' use
+pkg-config to find where those libraries are installed.
+If you want pkg-config to look in special directories, you have to set
+the environment variable PKG_CONFIG_PATH to point to the directories
 where the .pc-files for those libraries are.
 For example:
 
--- a/Makefile.in	Sun Apr 22 13:47:56 2007 +0000
+++ b/Makefile.in	Fri May 11 18:24:42 2007 +0000
@@ -311,7 +311,7 @@
 Makefile: $(srcdir)/Makefile.in config.status
 	./config.status
 
-config.status: ${srcdir}/configure
+config.status: ${srcdir}/configure ${srcdir}/lisp/version.el
 	./config.status --recheck
 
 AUTOCONF_INPUTS = @MAINT@ $(srcdir)/configure.in $(srcdir)/m4/getopt.m4
--- a/admin/ChangeLog	Sun Apr 22 13:47:56 2007 +0000
+++ b/admin/ChangeLog	Fri May 11 18:24:42 2007 +0000
@@ -1,3 +1,7 @@
+2007-04-25  Nick Roberts  <nickrob@snap.net.nz>
+
+	* make-tarball.txt: Add note about cutting the branch.
+
 2007-02-03  Eli Zaretskii  <eliz@gnu.org>
 
 	* nt/makedist.bat: Change EOL format to DOS.  Don't use
--- a/admin/FOR-RELEASE	Sun Apr 22 13:47:56 2007 +0000
+++ b/admin/FOR-RELEASE	Fri May 11 18:24:42 2007 +0000
@@ -5,8 +5,6 @@
 ** Check for widow and orphan lines in manuals;
 make sure all the pages really look ok in the manual as formatted.
 
-** Cleanup temporary +++/--- lines in etc/NEWS.
-
 ** Regenerate the postscript files of the reference cards in etc.
 
 ** Ask maintainers of refcard translations to update them.
@@ -24,15 +22,16 @@
 
 Reminders sent out on 2006-06-08.
 
-** Send an email to the various distributions, including the GNOME
-and KDE projects, to use the new Emacs icons in etc/images/icons.
+** Remove temporary +++/--- lines in NEWS.
+
+** Try to reorder NEWS: most important things first, related items together.
 
 * WINDOWS SUPPORT BUGS.
 
 These don't need to be fixed before a release, but we call the
 attention of Windows users to fixing them.
 
-** Drew Adams 12 Aug bug rpt: overlay  display artifact: trace left behind
+** Drew Adams 12 Aug bug rpt: overlay display artifact: trace left behind
 Windows only bug. Bug appears only when Cleartype enabled, probably related
 to the hack introduced on 2005-07-01 to fix some other Cleartype problem.
 
@@ -41,7 +40,25 @@
 
 * BUGS
 
-** nferrier@tapsellferrier.co.uk, April 18: rcirc multiline nick adding
+See the copy of this file on the EMACS_22_BASE branch.
+
+** rcyeske@gmail.com, April 22: Failure to build on OpenBSD macppc.
+OpenBSD compilation works on i386.
+http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg00932.html
+
+** Spurious redisplay bug not fixed.
+http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg00443.html
+http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg00732.html
+
+** michael.ewe@arcor.de, Apr 24: 22.0.98  not starting on Solaris 10/I386
+http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg01113.html
+
+** Takaaki.Ota@am.sony.com, May 2: table cell menu does not appear at the menubar
+   Bug is intermittent.
+
+** Install python.el `with' patch from trunk.
+
+** Install vc-hooks.el patch from trunk.
 
 * DOCUMENTATION
 
--- a/admin/make-tarball.txt	Sun Apr 22 13:47:56 2007 +0000
+++ b/admin/make-tarball.txt	Fri May 11 18:24:42 2007 +0000
@@ -76,7 +76,22 @@
 14. For a pretest, let Richard Stallman <rms@gnu.org> know about the new pretest and
     tell him to announce it using the announcement you prepared.  Remind
     him to set a Reply-to header to <emacs-pretest-bug@gnu.org>.
-    For a release, Richard should prepare the announcement himself,
+
+15. Shortly before the release, cut the branch with the following commands:
+
+    cvs rtag EMACS_`NUMBER'_BASE
+    cvs rtag -b EMACS_`NUMBER'_RC -r EMACS_`NUMBER'_BASE
+
+where `NUMBER' is the major version number of the release.  This makes it
+easier to  see what changes have been applied to the branch with:
+
+    cvs diff -r EMACS_`NUMBER'_BASE -r EMACS_`NUMBER'_RC
+
+or merge changes back to the trunk with "cvs update -j", if necessary.
+
+After doing this, increase the version number on the trunk as per step 4.
+
+16. For a release, Richard should prepare the announcement himself,
     possibly starting from a previous announcment.
 
 # arch-tag: c23c771f-ca26-4584-8a04-50ecf0989390
--- a/admin/notes/copyright	Sun Apr 22 13:47:56 2007 +0000
+++ b/admin/notes/copyright	Fri May 11 18:24:42 2007 +0000
@@ -228,6 +228,7 @@
   the concept.
   rms: "My understanding is that game rules as such are not copyrightable."
   <http://lists.gnu.org/archive/html/emacs-devel/2007-01/msg00960.html>
+  rms: Legal advice is that we are ok and need not worry about this.
 
 lispref/doclicense.texi
 man/doclicense.texi
@@ -405,6 +406,7 @@
   Accordingly, FSF copyright was added.
 
 src/unexhp9k800.c  (and dependent src/m/sr2k.h)
+  http://lists.gnu.org/archive/html/emacs-devel/2007-02/msg00138.html
   - briefly removed due to legal uncertainly Jan-Mar 2007. The
   relevant assignment is under "hp9k800" in copyright.list. File was
   written by John V. Morris at HP, and disclaimed by the author and
@@ -421,6 +423,9 @@
 http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg00225.html
 http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg00257.html
 
+ But then an assignment arrived before the release of Emacs 22:
+http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg01427.html
+
 
 ** Issues that are "fixed" for the release of Emacs 22, but we may
    wish to revisit later in more detail
@@ -546,9 +551,6 @@
     Emacs 22 is released (though if they can be fixed before, that is
     obviously good):
 
-Maybe some relevant comments here?
-<http://groups.google.com/group/linux.debian.legal/browse_thread/thread/123547ea95437a1f>
-
 
 Is it OK to just `cvs remove' a file for legal reasons, or is
 something more drastic needed? A removed file is still available from
@@ -583,18 +585,10 @@
 Done: TUTORIAL.eo
 
 
-REMOVED src/unexhp9k800.c
-  - we would like to re-add this file if possible. Please let us know
-  if you can clarify its legal status.
-  http://lists.gnu.org/archive/html/emacs-devel/2007-02/msg00138.html
-
-
 *** These are copyright issues still to be addressed:
 
-Need an assignment from Kevin Rodgers (rms), else several changes to
-deal with.
-
-
+python.el potential legal problem
+http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-04/msg00459.html
 
 This file is part of GNU Emacs.
 
--- a/configure	Sun Apr 22 13:47:56 2007 +0000
+++ b/configure	Fri May 11 18:24:42 2007 +0000
@@ -412,10 +412,10 @@
 fi
 
 test \$exitcode = 0") || {
-  echo No shell found that supports shell functions.
-  echo Please tell autoconf@gnu.org about your system,
-  echo including any error possibly output before this
-  echo message
+  echo Please tell bug-autoconf@gnu.org about your system,
+  echo including any error possibly output before this message.
+  echo This can help us improve future autoconf versions.
+  echo Configuration will now proceed without shell functions.
 }
 
 
--- a/etc/ChangeLog	Sun Apr 22 13:47:56 2007 +0000
+++ b/etc/ChangeLog	Fri May 11 18:24:42 2007 +0000
@@ -1,3 +1,31 @@
+2007-05-05  Glenn Morris  <rgm@gnu.org>
+
+	* NEWS: Re-order.
+
+2007-04-28  Glenn Morris  <rgm@gnu.org>
+
+	* emacs.py: Restore file pending consideration of python.el legal
+	status.
+	* NEWS: Restore mention of python.el pending consideration of
+	legal status.
+
+2007-04-28  David R. Linn  <drl@jekyll.vuse.vanderbilt.edu>
+
+	* PROBLEMS: Add section on Solaris out-of-tree install issues with
+	non-GNU make.
+
+2007-04-25  Werner Lemberg  <wl@gnu.org>
+
+	* emacs.1: Replace -- with \(em.
+
+2007-04-25  Yavor Doganov  <yavor@gnu.org>  (tiny change)
+
+	* emacs.1, etags.1: Escape some minus signs.
+
+2007-04-22  Glenn Morris  <rgm@gnu.org>
+
+	* NEWS: Change to EMACS env-var was reverted, so delete this entry.
+
 2007-04-19  Glenn Morris  <rgm@gnu.org>
 
 	* PROBLEMS: Expand a little on Emacs not knowing fqdn.
--- a/etc/MORE.STUFF	Sun Apr 22 13:47:56 2007 +0000
+++ b/etc/MORE.STUFF	Fri May 11 18:24:42 2007 +0000
@@ -86,6 +86,8 @@
 
  * PS-print: <URL:http://www.emacswiki.org/cgi-bin/wiki/PsPrintPackage>
 
+ * Python mode: <URL:http://www.emacswiki.org/cgi-bin/wiki/PythonMode>
+
  * QuickURL: <URL:http://www.davep.org/emacs/>
 
  * RefTeX: <URL:http://www.gnu.org/software/auctex/reftex.html>
--- a/etc/NEWS	Sun Apr 22 13:47:56 2007 +0000
+++ b/etc/NEWS	Fri May 11 18:24:42 2007 +0000
@@ -14,13 +14,6 @@
 
 You can narrow news to a specific version by calling `view-emacs-news'
 with a prefix argument or by typing C-u C-h C-n.
-
-Temporary note:
- +++ indicates that the appropriate manual has already been updated.
- --- means no change in the manuals is called for.
-When you add a new item, please add it without either +++ or ---
-so we will look at it and add it to the manual.
-
 
 * About external Lisp packages
 
@@ -38,55 +31,16 @@
 Some specific packages that are known to cause problems are:
 
 ** Semantic (used by CEDET, ECB, JDEE): upgrade to latest version.
+
 ** cua.el, cua-mode.el: remove old versions.
 
 
 * Installation Changes in Emacs 22.1
 
----
-** Emacs comes with a new set of icons.
-These icons are displayed on the taskbar and/or titlebar when Emacs
-runs in a graphical environment.  Source files for these icons can be
-found in etc/images/icons.  (You can't change the icons displayed by
-Emacs by changing these files directly.  On X, the icon is compiled
-into the Emacs executable; see gnu.h in the source tree.  On MS
-Windows, see nt/icons/emacs.ico.)
-
----
-** Emacs now supports new configure options `--program-prefix',
-`--program-suffix' and `--program-transform-name' that affect the names of
-installed programs.
-
----
-** Emacs can now be built without sound support.
-
----
 ** You can build Emacs with Gtk+ widgets by specifying `--with-x-toolkit=gtk'
 when you run configure.  This requires Gtk+ 2.4 or newer.  This port
 provides a way to display multilingual text in menus (with some caveats).
 
----
-** The `emacsserver' program has been removed, replaced with Lisp code.
-
----
-** The `yow' program has been removed.
-Use the corresponding Emacs feature instead.
-
----
-** By default, Emacs now uses a setgid helper program to update game
-scores.  The directory ${localstatedir}/games/emacs is the normal
-place for game scores to be stored.  You can control this with the
-configure option `--with-game-dir'.  The specific user that Emacs uses
-to own the game scores is controlled by `--with-game-user'.  If access
-to a game user is not available, then scores will be stored separately
-in each user's home directory.
-
----
-** Leim is now part of the Emacs distribution.
-You no longer need to download a separate tarball in order to build
-Emacs with Leim.
-
-+++
 ** The Emacs Lisp Reference Manual is now part of the distribution.
 
 The Emacs Lisp Reference Manual in Info format is built as part of the
@@ -94,7 +48,6 @@
 Manual.  A menu item was added to the menu bar to make it easily
 accessible (Help->More Manuals->Emacs Lisp Reference).
 
----
 ** The Introduction to Programming in Emacs Lisp manual is now part of
 the distribution.
 
@@ -103,101 +56,127 @@
 item was added to the menu bar to make it easily accessible
 (Help->More Manuals->Introduction to Emacs Lisp).
 
----
+** Leim is now part of the Emacs distribution.
+You no longer need to download a separate tarball in order to build
+Emacs with Leim.
+
+** Support for MacOS X was added.
+See the files mac/README and mac/INSTALL for build instructions.
+
+** Mac OS 9 port now uses the Carbon API by default.  You can also
+create a non-Carbon build by specifying `NonCarbon' as a target.  See
+the files mac/README and mac/INSTALL for build instructions.
+
+** Support for a Cygwin build of Emacs was added.
+
+** Support for GNU/Linux systems on X86-64 machines was added.
+
+** Support for GNU/Linux systems on S390 machines was added.
+
+** Support for GNU/Linux systems on Tensilica Xtensa machines was added.
+
+** Support for FreeBSD/Alpha has been added.
+
 ** New translations of the Emacs Tutorial are available in the
 following languages: Brasilian Portuguese, Bulgarian, Chinese (both
 with simplified and traditional characters), French, Russian, and
 Italian.  Type `C-u C-h t' to choose one of them in case your language
 setup doesn't automatically select the right one.
 
----
 ** New translations of the Emacs reference card are available in the
 Brasilian Portuguese and Russian.  The corresponding PostScript files
 are also included.
 
----
 ** A French translation of the `Emacs Survival Guide' is available.
 
----
+** Emacs now supports new configure options `--program-prefix',
+`--program-suffix' and `--program-transform-name' that affect the names of
+installed programs.
+
+** By default, Emacs now uses a setgid helper program to update game
+scores.  The directory ${localstatedir}/games/emacs is the normal
+place for game scores to be stored.  You can control this with the
+configure option `--with-game-dir'.  The specific user that Emacs uses
+to own the game scores is controlled by `--with-game-user'.  If access
+to a game user is not available, then scores will be stored separately
+in each user's home directory.
+
 ** Emacs now includes support for loading image libraries on demand.
 (Currently this feature is only used on MS Windows.)  You can configure
 the supported image types and their associated dynamic libraries by
 setting the variable `image-library-alist'.
 
----
-** Support for a Cygwin build of Emacs was added.
-
----
-** Support for FreeBSD/Alpha has been added.
-
----
-** Support for GNU/Linux systems on S390 machines was added.
-
----
-** Support for GNU/Linux systems on Tensilica Xtensa machines was added.
-
----
-** Support for MacOS X was added.
-See the files mac/README and mac/INSTALL for build instructions.
-
----
-** Support for GNU/Linux systems on X86-64 machines was added.
-
----
-** Mac OS 9 port now uses the Carbon API by default.  You can also
-create a non-Carbon build by specifying `NonCarbon' as a target.  See
-the files mac/README and mac/INSTALL for build instructions.
-
----
-** Building with -DENABLE_CHECKING does not automatically build with union
-types any more.  Add -DUSE_LISP_UNION_TYPE if you want union types.
-
----
-** When pure storage overflows while dumping, Emacs now prints how
-much pure storage it will approximately need.
-
----
+** Emacs can now be built without sound support.
+
+** Emacs Lisp source files are compressed by default if `gzip' is available.
+
+** All images used in Emacs have been consolidated in etc/images and subdirs.
+See also the changes to `find-image', documented below.
+
+** Emacs comes with a new set of icons.
+These icons are displayed on the taskbar and/or titlebar when Emacs
+runs in a graphical environment.  Source files for these icons can be
+found in etc/images/icons.  (You can't change the icons displayed by
+Emacs by changing these files directly.  On X, the icon is compiled
+into the Emacs executable; see gnu.h in the source tree.  On MS
+Windows, see nt/icons/emacs.ico.)
+
+** The `emacsserver' program has been removed, replaced with Lisp code.
+
+** The `yow' program has been removed.
+Use the corresponding Emacs feature instead.
+
+** The Emacs terminal emulation in term.el uses a different terminfo name.
+The Emacs terminal emulation in term.el now uses "eterm-color" as its
+terminfo name, since term.el now supports color.
+
 ** The script etc/emacs-buffer.gdb can be used with gdb to retrieve the
 contents of buffers from a core dump and save them to files easily, should
 Emacs crash.
 
----
-** The Emacs terminal emulation in term.el uses a different terminfo name.
-The Emacs terminal emulation in term.el now uses "eterm-color" as its
-terminfo name, since term.el now supports color.
-
----
-** Emacs Lisp source files are compressed by default if `gzip' is available.
-
----
-** All images used in Emacs have been consolidated in etc/images and subdirs.
-See also the changes to `find-image', documented below.
+** Building with -DENABLE_CHECKING does not automatically build with union
+types any more.  Add -DUSE_LISP_UNION_TYPE if you want union types.
+
+** When pure storage overflows while dumping, Emacs now prints how
+much pure storage it will approximately need.
 
 
 * Startup Changes in Emacs 22.1
 
-+++
-** New command line option -Q or --quick.
-This is like using -q --no-site-file, but in addition it also disables
-the fancy startup screen.
-
-+++
-** New command line option -D or --basic-display.
-Disables the menu-bar, the tool-bar, the scroll-bars, tool tips, and
-the blinking cursor.
-
-+++
+** Init file changes
+If the init file ~/.emacs does not exist, Emacs will try
+~/.emacs.d/init.el or ~/.emacs.d/init.elc.  Likewise, if the shell init file
+~/.emacs_SHELL is not found, Emacs will try ~/.emacs.d/init_SHELL.sh.
+
+** Emacs can now be invoked in full-screen mode on a windowed display.
+When Emacs is invoked on a window system, the new command-line options
+`--fullwidth', `--fullheight', and `--fullscreen' produce a frame
+whose width, height, or both width and height take up the entire
+screen size.  (For now, this does not work with some window managers.)
+
+** Emacs now displays a splash screen by default even if command-line
+arguments were given.  The new command-line option --no-splash
+disables the splash screen; see also the variable
+`inhibit-splash-screen' (which is also aliased as
+`inhibit-startup-message').
+
+** New user option `inhibit-startup-buffer-menu'.
+When loading many files, for instance with `emacs *', Emacs normally
+displays a buffer menu.  This option turns the buffer menu off.
+
 ** New command line option -nbc or --no-blinking-cursor disables
 the blinking cursor on graphical terminals.
 
-+++
 ** The option --script FILE runs Emacs in batch mode and loads FILE.
 It is useful for writing Emacs Lisp shell script files, because they
 can start with this line:
 
    #!/usr/bin/emacs --script
 
-+++
+** The -f option, used from the command line to call a function,
+now reads arguments for the function interactively if it is
+an interactively callable function.
+
 ** The option --directory DIR now modifies `load-path' immediately.
 Directories are added to the front of `load-path' in the order they
 appear on the command line.  For example, with this command line:
@@ -207,69 +186,40 @@
 Emacs looks for library `foo' in the parent directory, then in /tmp, then
 in the other directories in `load-path'.  (-L is short for --directory.)
 
-+++
-** The command line option --no-windows has been changed to
---no-window-system.  The old one still works, but is deprecated.
-
----
-** If the environment variable DISPLAY specifies an unreachable X display,
-Emacs will now startup as if invoked with the --no-window-system option.
-
-+++
-** The -f option, used from the command line to call a function,
-now reads arguments for the function interactively if it is
-an interactively callable function.
-
-+++
 ** When you specify a frame size with --geometry, the size applies to
 all frames you create.  A position specified with --geometry only
 affects the initial frame.
 
----
 ** Emacs built for MS-Windows now behaves like Emacs on X does,
 with respect to its frame position: if you don't specify a position
 (in your .emacs init file, in the Registry, or with the --geometry
 command-line option), Emacs leaves the frame position to the Windows'
 window manager.
 
-+++
-** Emacs can now be invoked in full-screen mode on a windowed display.
-When Emacs is invoked on a window system, the new command-line options
-`--fullwidth', `--fullheight', and `--fullscreen' produce a frame
-whose width, height, or both width and height take up the entire
-screen size.  (For now, this does not work with some window managers.)
-
-+++
-** Emacs now displays a splash screen by default even if command-line
-arguments were given.  The new command-line option --no-splash
-disables the splash screen; see also the variable
-`inhibit-splash-screen' (which is also aliased as
-`inhibit-startup-message').
-
-+++
-** The default is now to use a bitmap as the icon, so the command-line options
---icon-type, -i have been replaced with options --no-bitmap-icon, -nbi to turn
-the bitmap icon off.
-
-+++
-** New user option `inhibit-startup-buffer-menu'.
-When loading many files, for instance with `emacs *', Emacs normally
-displays a buffer menu.  This option turns the buffer menu off.
-
-+++
-** Init file changes
-If the init file ~/.emacs does not exist, Emacs will try
-~/.emacs.d/init.el or ~/.emacs.d/init.elc.  Likewise, if the shell init file
-~/.emacs_SHELL is not found, Emacs will try ~/.emacs.d/init_SHELL.sh.
-
-+++
+** The command line option --no-windows has been changed to
+--no-window-system.  The old one still works, but is deprecated.
+
+** If the environment variable DISPLAY specifies an unreachable X display,
+Emacs will now startup as if invoked with the --no-window-system option.
+
 ** Emacs now reads the standard abbrevs file ~/.abbrev_defs
 automatically at startup, if it exists.  When Emacs offers to save
 modified buffers, it saves the abbrevs too if they have changed.  It
 can do this either silently or asking for confirmation first,
 according to the value of `save-abbrevs'.
 
-+++
+** New command line option -Q or --quick.
+This is like using -q --no-site-file, but in addition it also disables
+the fancy startup screen.
+
+** New command line option -D or --basic-display.
+Disables the menu-bar, the tool-bar, the scroll-bars, tool tips, and
+the blinking cursor.
+
+** The default is now to use a bitmap as the icon.
+The command-line options --icon-type, -i have been replaced with
+options --no-bitmap-icon, -nbi to turn the bitmap icon off.
+
 ** If the environment variable EMAIL is defined, Emacs now uses its value
 to compute the default value of `user-mail-address', in preference to
 concatenation of `user-login-name' with the name of your host machine.
@@ -277,52 +227,42 @@
 
 * Incompatible Editing Changes in Emacs 22.1
 
-+++
+** You can now follow links by clicking Mouse-1 on the link.
+
+See below for more details.
+
+** When the undo information of the current command gets really large
+(beyond the value of `undo-outer-limit'), Emacs discards it and warns
+you about it.
+
+** When Emacs prompts for file names, SPC no longer completes the file name.
+This is so filenames with embedded spaces could be input without the
+need to quote the space with a C-q.  The underlying changes in the
+keymaps that are active in the minibuffer are described below under
+"New keymaps for typing file names".
+
+** The completion commands TAB, SPC and ? in the minibuffer apply only
+to the text before point.  If there is text in the buffer after point,
+it remains unchanged.
+
+** In incremental search, C-w is changed.  M-%, C-M-w and C-M-y are special.
+
+See below under "incremental search changes".
+
 ** M-g is now a prefix key.
 M-g g and M-g M-g run goto-line.
 M-g n and M-g M-n run next-error (like C-x `).
 M-g p and M-g M-p run previous-error.
 
-+++
 ** C-u M-g M-g switches to the most recent previous buffer,
 and goes to the specified line in that buffer.
 
 When goto-line starts to execute, if there's a number in the buffer at
 point then it acts as the default argument for the minibuffer.
 
-+++
-** The old bindings C-M-delete and C-M-backspace have been deleted,
-since there are situations where one or the other will shut down
-the operating system or your X server.
-
-+++
-** line-move-ignore-invisible now defaults to t.
-
-+++
-** When the undo information of the current command gets really large
-(beyond the value of `undo-outer-limit'), Emacs discards it and warns
-you about it.
-
-+++
-** `apply-macro-to-region-lines' now operates on all lines that begin
-in the region, rather than on all complete lines in the region.
-
-+++
-** A prefix argument is no longer required to repeat a jump to a
-previous mark if you set `set-mark-command-repeat-pop' to t.  I.e. C-u
-C-SPC C-SPC C-SPC ... cycles through the mark ring.  Use C-u C-u C-SPC
-to set the mark immediately after a jump.
-
-+++
-** The info-search bindings on C-h C-f, C-h C-k and C-h C-i
-have been moved to C-h F, C-h K and C-h S.
-
-+++
-** In incremental search, C-w is changed.  M-%, C-M-w and C-M-y are special.
-
-See below under "incremental search changes".
-
----
+** M-o now is the prefix key for setting text properties;
+M-o M-o requests refontification.
+
 ** C-x C-f RET (find-file), typing nothing in the minibuffer, is no longer
 a special case.
 
@@ -333,28 +273,6 @@
 You can get the old behavior by typing C-x C-f M-n RET, which fetches
 the actual file name into the minibuffer.
 
-+++
-** The completion commands TAB, SPC and ? in the minibuffer apply only
-to the text before point.  If there is text in the buffer after point,
-it remains unchanged.
-
-+++
-** When Emacs prompts for file names, SPC no longer completes the file name.
-This is so filenames with embedded spaces could be input without the
-need to quote the space with a C-q.  The underlying changes in the
-keymaps that are active in the minibuffer are described below under
-"New keymaps for typing file names".
-
-+++
-** M-o now is the prefix key for setting text properties;
-M-o M-o requests refontification.
-
-+++
-** You can now follow links by clicking Mouse-1 on the link.
-
-See below for more details.
-
-+++
 ** In Dired's ! command (dired-do-shell-command), `*' and `?' now
 control substitution of the file names only when they are surrounded
 by whitespace.  This means you can now use them as shell wildcards
@@ -362,11 +280,26 @@
 doublequotes make no difference in the shell, but they prevent
 special treatment in `dired-do-shell-command'.
 
----
+** A prefix argument is no longer required to repeat a jump to a
+previous mark if you set `set-mark-command-repeat-pop' to t.  I.e. C-u
+C-SPC C-SPC C-SPC ... cycles through the mark ring.  Use C-u C-u C-SPC
+to set the mark immediately after a jump.
+
+** The info-search bindings on C-h C-f, C-h C-k and C-h C-i
+have been moved to C-h F, C-h K and C-h S.
+
+** `apply-macro-to-region-lines' now operates on all lines that begin
+in the region, rather than on all complete lines in the region.
+
+** line-move-ignore-invisible now defaults to t.
+
 ** Adaptive filling misfeature removed.
 It no longer treats `NNN.' or `(NNN)' as a prefix.
 
----
+** The old bindings C-M-delete and C-M-backspace have been deleted,
+since there are situations where one or the other will shut down
+the operating system or your X server.
+
 ** The register compatibility key bindings (deprecated since Emacs 19)
 have been removed:
   C-x /   point-to-register (Use: C-x r SPC)
@@ -377,7 +310,9 @@
 
 * Editing Changes in Emacs 22.1
 
-+++
+** The max size of buffers and integers has been doubled.
+On 32bit machines, it is now 256M (i.e. 268435455).
+
 ** !MEM FULL! at the start of the mode line indicates that Emacs
 cannot get any more memory for Lisp data.  This often means it could
 crash soon if you do things that use more memory.  On most systems,
@@ -385,116 +320,50 @@
 not make !MEM FULL! disappear, you should save your work and start
 a new Emacs.
 
-+++
-** The max size of buffers and integers has been doubled.
-On 32bit machines, it is now 256M (i.e. 268435455).
-
-+++
+** `undo-only' does an undo which does not redo any previous undo.
+
+** Yanking text now discards certain text properties that can
+be inconvenient when you did not expect them.  The variable
+`yank-excluded-properties' specifies which ones.  Insertion
+of register contents and rectangles also discards these properties.
+
+** New command `kill-whole-line' kills an entire line at once.
+By default, it is bound to C-S-<backspace>.
+
+** M-SPC (just-one-space) when given a numeric argument N
+converts whitespace around point to N spaces.
+
 ** You can now switch buffers in a cyclic order with C-x C-left
 (previous-buffer) and C-x C-right (next-buffer).  C-x left and
 C-x right can be used as well.  The functions keep a different buffer
 cycle for each frame, using the frame-local buffer list.
 
-+++
-** `undo-only' does an undo which does not redo any previous undo.
-
-+++
-** M-SPC (just-one-space) when given a numeric argument N
-converts whitespace around point to N spaces.
-
----
 ** C-x 5 C-o displays a specified buffer in another frame
 but does not switch to that frame.  It's the multi-frame
 analogue of C-x 4 C-o.
 
----
+** `special-display-buffer-names' and `special-display-regexps' now
+understand two new boolean pseudo-frame-parameters `same-frame' and
+`same-window'.
+
 ** New commands to operate on pairs of open and close characters:
 `insert-pair', `delete-pair', `raise-sexp'.
 
-+++
-** New command `kill-whole-line' kills an entire line at once.
-By default, it is bound to C-S-<backspace>.
-
-+++
-** Yanking text now discards certain text properties that can
-be inconvenient when you did not expect them.  The variable
-`yank-excluded-properties' specifies which ones.  Insertion
-of register contents and rectangles also discards these properties.
-
-+++
-** The default values of paragraph-start and indent-line-function have
-been changed to reflect those used in Text mode rather than those used
-in Indented-Text mode.
-
-+++
 ** M-x setenv now expands environment variable references.
 
 Substrings of the form `$foo' and `${foo}' in the specified new value
 now refer to the value of environment variable foo.  To include a `$'
 in the value, use `$$'.
 
-+++
-** `special-display-buffer-names' and `special-display-regexps' now
-understand two new boolean pseudo-frame-parameters `same-frame' and
-`same-window'.
-
-+++
+** The default values of paragraph-start and indent-line-function have
+been changed to reflect those used in Text mode rather than those used
+in Indented-Text mode.
+
 ** The default for the paper size (variable ps-paper-type) is taken
 from the locale.
 
-** Mark command changes:
-
-+++
-*** A prefix argument is no longer required to repeat a jump to a
-previous mark, i.e. C-u C-SPC C-SPC C-SPC ... cycles through the
-mark ring.  Use C-u C-u C-SPC to set the mark immediately after a jump.
-
-+++
-*** Marking commands extend the region when invoked multiple times.
-
-If you type C-M-SPC (mark-sexp), M-@ (mark-word), M-h
-(mark-paragraph), or C-M-h (mark-defun) repeatedly, the marked region
-extends each time, so you can mark the next two sexps with M-C-SPC
-M-C-SPC, for example.  This feature also works for
-mark-end-of-sentence, if you bind that to a key.  It also extends the
-region when the mark is active in Transient Mark mode, regardless of
-the last command.  To start a new region with one of marking commands
-in Transient Mark mode, you can deactivate the active region with C-g,
-or set the new mark with C-SPC.
-
-+++
-*** M-h (mark-paragraph) now accepts a prefix arg.
-
-With positive arg, M-h marks the current and the following paragraphs;
-if the arg is negative, it marks the current and the preceding
-paragraphs.
-
-+++
-*** Some commands do something special in Transient Mark mode when the
-mark is active--for instance, they limit their operation to the
-region.  Even if you don't normally use Transient Mark mode, you might
-want to get this behavior from a particular command.  There are two
-ways you can enable Transient Mark mode and activate the mark, for one
-command only.
-
-One method is to type C-SPC C-SPC; this enables Transient Mark mode
-and sets the mark at point.  The other method is to type C-u C-x C-x.
-This enables Transient Mark mode temporarily but does not alter the
-mark or the region.
-
-After these commands, Transient Mark mode remains enabled until you
-deactivate the mark.  That typically happens when you type a command
-that alters the buffer, but you can also deactivate the mark by typing
-C-g.
-
-+++
-*** Movement commands `beginning-of-buffer', `end-of-buffer',
-`beginning-of-defun', `end-of-defun' do not set the mark if the mark
-is already active in Transient Mark mode.
-
 ** Help command changes:
 
-+++
 *** Changes in C-h bindings:
 
 C-h e displays the *Messages* buffer.
@@ -528,17 +397,26 @@
 - C-h w and C-h f new-kill-line reports:
   new-kill-line is on C-k
 
----
+*** The apropos commands now accept a list of words to match.
+When more than one word is specified, at least two of those words must
+be present for an item to match.  Regular expression matching is still
+available.
+
+*** The new option `apropos-sort-by-scores' causes the matching items
+to be sorted according to their score.  The score for an item is a
+number calculated to indicate how well the item matches the words or
+regular expression that you entered to the apropos command.  The best
+match is listed first, and the calculated score is shown for each
+matching item.
+
 *** Help commands `describe-function' and `describe-key' now show function
 arguments in lowercase italics on displays that support it.  To change the
 default, customize face `help-argument-name' or redefine the function
 `help-default-arg-highlight'.
 
-+++
 *** C-h v and C-h f commands now include a hyperlink to the C source for
 variables and functions defined in C (if the C source is available).
 
-+++
 *** Help mode now only makes hyperlinks for faces when the face name is
 preceded or followed by the word `face'.  It no longer makes
 hyperlinks for variables without variable documentation, unless
@@ -549,87 +427,102 @@
 addition, it now makes hyperlinks to URLs as well if the URL is
 enclosed in single quotes and preceded by `URL'.
 
-+++
 *** The new command `describe-char' (C-u C-x =) pops up a buffer with
 description various information about a character, including its
 encodings and syntax, its text properties, how to input, overlays, and
 widgets at point.  You can get more information about some of them, by
 clicking on mouse-sensitive areas or moving there and pressing RET.
 
-+++
 *** The command `list-text-properties-at' has been deleted because
 C-u C-x = gives the same information and more.
 
-+++
 *** New command `display-local-help' displays any local help at point
 in the echo area.  It is bound to `C-h .'.  It normally displays the
 same string that would be displayed on mouse-over using the
 `help-echo' property, but, in certain cases, it can display a more
 keyboard oriented alternative.
 
-+++
 *** New user option `help-at-pt-display-when-idle' allows to
 automatically show the help provided by `display-local-help' on
 point-over, after suitable idle time.  The amount of idle time is
 determined by the user option `help-at-pt-timer-delay' and defaults
 to one second.  This feature is turned off by default.
 
-+++
-*** The apropos commands now accept a list of words to match.
-When more than one word is specified, at least two of those words must
-be present for an item to match.  Regular expression matching is still
-available.
-
-+++
-*** The new option `apropos-sort-by-scores' causes the matching items
-to be sorted according to their score.  The score for an item is a
-number calculated to indicate how well the item matches the words or
-regular expression that you entered to the apropos command.  The best
-match is listed first, and the calculated score is shown for each
-matching item.
+** Mark command changes:
+
+*** A prefix argument is no longer required to repeat a jump to a
+previous mark, i.e. C-u C-SPC C-SPC C-SPC ... cycles through the
+mark ring.  Use C-u C-u C-SPC to set the mark immediately after a jump.
+
+*** Marking commands extend the region when invoked multiple times.
+
+If you type C-M-SPC (mark-sexp), M-@ (mark-word), M-h
+(mark-paragraph), or C-M-h (mark-defun) repeatedly, the marked region
+extends each time, so you can mark the next two sexps with M-C-SPC
+M-C-SPC, for example.  This feature also works for
+mark-end-of-sentence, if you bind that to a key.  It also extends the
+region when the mark is active in Transient Mark mode, regardless of
+the last command.  To start a new region with one of marking commands
+in Transient Mark mode, you can deactivate the active region with C-g,
+or set the new mark with C-SPC.
+
+*** Some commands do something special in Transient Mark mode when the
+mark is active--for instance, they limit their operation to the
+region.  Even if you don't normally use Transient Mark mode, you might
+want to get this behavior from a particular command.  There are two
+ways you can enable Transient Mark mode and activate the mark, for one
+command only.
+
+One method is to type C-SPC C-SPC; this enables Transient Mark mode
+and sets the mark at point.  The other method is to type C-u C-x C-x.
+This enables Transient Mark mode temporarily but does not alter the
+mark or the region.
+
+After these commands, Transient Mark mode remains enabled until you
+deactivate the mark.  That typically happens when you type a command
+that alters the buffer, but you can also deactivate the mark by typing
+C-g.
+
+*** Movement commands `beginning-of-buffer', `end-of-buffer',
+`beginning-of-defun', `end-of-defun' do not set the mark if the mark
+is already active in Transient Mark mode.
+
+*** M-h (mark-paragraph) now accepts a prefix arg.
+
+With positive arg, M-h marks the current and the following paragraphs;
+if the arg is negative, it marks the current and the preceding
+paragraphs.
 
 ** Incremental Search changes:
 
-+++
+*** M-% typed in isearch mode invokes `query-replace' or
+`query-replace-regexp' (depending on search mode) with the current
+search string used as the string to replace.
+
+*** C-w in incremental search now grabs either a character or a word,
+making the decision in a heuristic way.  This new job is done by the
+command `isearch-yank-word-or-char'.  To restore the old behavior,
+bind C-w to `isearch-yank-word' in `isearch-mode-map'.
+
+*** C-y in incremental search now grabs the next line if point is already
+at the end of a line.
+
+*** C-M-w deletes and C-M-y grabs a character in isearch mode.
+Another method to grab a character is to enter the minibuffer by `M-e'
+and to type `C-f' at the end of the search string in the minibuffer.
+
 *** Vertical scrolling is now possible within incremental search.
 To enable this feature, customize the new user option
 `isearch-allow-scroll'.  User written commands which satisfy stringent
 constraints can be marked as "scrolling commands".  See the Emacs manual
 for details.
 
-+++
-*** C-w in incremental search now grabs either a character or a word,
-making the decision in a heuristic way.  This new job is done by the
-command `isearch-yank-word-or-char'.  To restore the old behavior,
-bind C-w to `isearch-yank-word' in `isearch-mode-map'.
-
-+++
-*** C-y in incremental search now grabs the next line if point is already
-at the end of a line.
-
-+++
-*** C-M-w deletes and C-M-y grabs a character in isearch mode.
-Another method to grab a character is to enter the minibuffer by `M-e'
-and to type `C-f' at the end of the search string in the minibuffer.
-
-+++
-*** M-% typed in isearch mode invokes `query-replace' or
-`query-replace-regexp' (depending on search mode) with the current
-search string used as the string to replace.
-
-+++
 *** Isearch no longer adds `isearch-resume' commands to the command
 history by default.  To enable this feature, customize the new
 user option `isearch-resume-in-command-history'.
 
 ** Replace command changes:
 
----
-*** New user option `query-replace-skip-read-only': when non-nil,
-`query-replace' and related functions simply ignore
-a match if part of it has a read-only property.
-
-+++
 *** When used interactively, the commands `query-replace-regexp' and
 `replace-regexp' allow \,expr to be used in a replacement string,
 where expr is an arbitrary Lisp expression evaluated at replacement
@@ -640,27 +533,18 @@
 edited for each replacement.  `query-replace-regexp-eval' is now
 deprecated since it offers no additional functionality.
 
-+++
 *** query-replace uses isearch lazy highlighting when the new user option
 `query-replace-lazy-highlight' is non-nil.
 
----
 *** The current match in query-replace is highlighted in new face
 `query-replace' which by default inherits from isearch face.
 
+*** New user option `query-replace-skip-read-only': when non-nil,
+`query-replace' and related functions simply ignore
+a match if part of it has a read-only property.
+
 ** Local variables lists:
 
-+++
-*** In processing a local variables list, Emacs strips the prefix and
-suffix from every line before processing all the lines.
-
-+++
-*** Text properties in local variables.
-
-A file local variables list cannot specify a string with text
-properties--any specified text properties are discarded.
-
-+++
 *** If the local variables list contains any variable-value pairs that
 are not known to be safe, Emacs shows a prompt asking whether to apply
 the local variables list as a whole.  In earlier versions, a prompt
@@ -675,21 +559,18 @@
 However, risky variables will not be added to
 `safe-local-variable-values' in this way.
 
-+++
 *** The variable `enable-local-variables' controls how local variable
 lists are handled.  t, the default, specifies the standard querying
 behavior.  :safe means use only safe values, and ignore the rest.
 :all means set all variables, whether or not they are safe.
 nil means ignore them all.  Anything else means always query.
 
-+++
 *** The variable `safe-local-eval-forms' specifies a list of forms that
 are ok to evaluate when they appear in an `eval' local variables
 specification.  Normally Emacs asks for confirmation before evaluating
 such a form, but if the form appears in this list, no confirmation is
 needed.
 
-+++
 *** If a function has a non-nil `safe-local-eval-function' property,
 that means it is ok to evaluate some calls to that function when it
 appears in an `eval' local variables specification.  If the property
@@ -700,44 +581,35 @@
 If the form is not "ok to call", that means Emacs asks for
 confirmation as before.
 
+*** In processing a local variables list, Emacs strips the prefix and
+suffix from every line before processing all the lines.
+
+*** Text properties in local variables.
+
+A file local variables list cannot specify a string with text
+properties--any specified text properties are discarded.
+
 ** File operation changes:
 
-+++
 *** Unquoted `$' in file names do not signal an error any more when
 the corresponding environment variable does not exist.
 Instead, the `$ENVVAR' text is left as is, so that `$$' quoting
 is only rarely needed.
 
-+++
-*** find-file-read-only visits multiple files in read-only mode,
-when the file name contains wildcard characters.
-
-+++
-*** find-alternate-file replaces the current file with multiple files,
-when the file name contains wildcard characters.  It now asks if you
-wish save your changes and not just offer to kill the buffer.
-
-+++
-*** Auto Compression mode is now enabled by default.
-
----
 *** C-x C-f RET, typing nothing in the minibuffer, is no longer a special case.
 
 Since the default input is the current directory, this has the effect
 of specifying the current directory.  Normally that means to visit the
 directory with Dired.
 
-+++
-*** When you are root, and you visit a file whose modes specify
-read-only, the Emacs buffer is now read-only too.  Type C-x C-q if you
-want to make the buffer writable.  (As root, you can in fact alter the
-file.)
-
-+++
 *** C-x s (save-some-buffers) now offers an option `d' to diff a buffer
 against its file, so you can see what changes you would be saving.
 
-+++
+*** Auto Compression mode is now enabled by default.
+
+*** If the user visits a file larger than `large-file-warning-threshold',
+Emacs asks for confirmation.
+
 *** The commands copy-file, rename-file, make-symbolic-link and
 add-name-to-file, when given a directory as the "new name" argument,
 convert it to a file name by merging in the within-directory part of
@@ -745,27 +617,6 @@
 commands cp, mv, and ln follow.)  Thus, M-x copy-file RET ~/foo RET
 /tmp RET copies ~/foo to /tmp/foo.
 
----
-*** When used interactively, `format-write-file' now asks for confirmation
-before overwriting an existing file, unless a prefix argument is
-supplied.  This behavior is analogous to `write-file'.
-
----
-*** The variable `auto-save-file-name-transforms' now has a third element that
-controls whether or not the function `make-auto-save-file-name' will
-attempt to construct a unique auto-save name (e.g. for remote files).
-
-+++
-*** The new option `write-region-inhibit-fsync' disables calls to fsync
-in `write-region'.  This can be useful on laptops to avoid spinning up
-the hard drive upon each file save.  Enabling this variable may result
-in data loss, use with care.
-
-+++
-*** If the user visits a file larger than `large-file-warning-threshold',
-Emacs asks for confirmation.
-
-+++
 *** require-final-newline now has two new possible values:
 
 `visit' means add a newline (as an undoable change) if it's needed
@@ -775,7 +626,6 @@
 needed when visiting the file, and also add a newline if it's needed
 when saving the file.
 
-+++
 *** The new option mode-require-final-newline controls how certain
 major modes enable require-final-newline.  Any major mode that's
 designed for a kind of file that should normally end in a newline
@@ -783,19 +633,45 @@
 So you can customize mode-require-final-newline to control what these
 modes do.
 
+*** When you are root, and you visit a file whose modes specify
+read-only, the Emacs buffer is now read-only too.  Type C-x C-q if you
+want to make the buffer writable.  (As root, you can in fact alter the
+file.)
+
+*** find-file-read-only visits multiple files in read-only mode,
+when the file name contains wildcard characters.
+
+*** find-alternate-file replaces the current file with multiple files,
+when the file name contains wildcard characters.  It now asks if you
+wish save your changes and not just offer to kill the buffer.
+
+*** When used interactively, `format-write-file' now asks for confirmation
+before overwriting an existing file, unless a prefix argument is
+supplied.  This behavior is analogous to `write-file'.
+
+*** The variable `auto-save-file-name-transforms' now has a third element that
+controls whether or not the function `make-auto-save-file-name' will
+attempt to construct a unique auto-save name (e.g. for remote files).
+
+*** The new option `write-region-inhibit-fsync' disables calls to fsync
+in `write-region'.  This can be useful on laptops to avoid spinning up
+the hard drive upon each file save.  Enabling this variable may result
+in data loss, use with care.
+
 ** Minibuffer changes:
 
-+++
+*** The completion commands TAB, SPC and ? in the minibuffer apply only
+to the text before point.  If there is text in the buffer after point,
+it remains unchanged.
+
 *** The new file-name-shadow-mode is turned ON by default, so that when
 entering a file name, any prefix which Emacs will ignore is dimmed.
 
-+++
 *** There's a new face `minibuffer-prompt'.
 Emacs adds this face to the list of text properties stored in the
 variable `minibuffer-prompt-properties', which is used to display the
 prompt string.
 
----
 *** Enhanced visual feedback in `*Completions*' buffer.
 
 Completions lists use faces to highlight what all completions
@@ -816,7 +692,6 @@
 the common prefix of completions to `display-completion-list' as
 its second argument.
 
-+++
 *** File-name completion can now ignore specified directories.
 If an element of the list in `completion-ignored-extensions' ends in a
 slash `/', it indicates a subdirectory that should be ignored when
@@ -824,70 +699,12 @@
 which do not end in a slash are never considered when a completion
 candidate is a directory.
 
-+++
-*** The completion commands TAB, SPC and ? in the minibuffer apply only
-to the text before point.  If there is text in the buffer after point,
-it remains unchanged.
-
-+++
 *** New user option `history-delete-duplicates'.
 If set to t when adding a new history element, all previous identical
 elements are deleted from the history list.
 
 ** Redisplay changes:
 
-+++
-*** Preemptive redisplay now adapts to current load and bandwidth.
-
-To avoid preempting redisplay on fast computers, networks, and displays,
-the arrival of new input is now performed at regular intervals during
-redisplay.  The new variable `redisplay-preemption-period' specifies
-the period; the default is to check for input every 0.1 seconds.
-
-+++
-*** The mode line position information now comes before the major mode.
-When the file is maintained under version control, that information
-appears between the position information and the major mode.
-
-+++
-*** New face `escape-glyph' highlights control characters and escape glyphs.
-
-+++
-*** Non-breaking space and hyphens are now displayed with a special
-face, either nobreak-space or escape-glyph.  You can turn this off or
-specify a different mode by setting the variable `nobreak-char-display'.
-
-+++
-*** The parameters of automatic hscrolling can now be customized.
-The variable `hscroll-margin' determines how many columns away from
-the window edge point is allowed to get before automatic hscrolling
-will horizontally scroll the window.  The default value is 5.
-
-The variable `hscroll-step' determines how many columns automatic
-hscrolling scrolls the window when point gets too close to the
-window edge.  If its value is zero, the default, Emacs scrolls the
-window so as to center point.  If its value is an integer, it says how
-many columns to scroll.  If the value is a floating-point number, it
-gives the fraction of the window's width to scroll the window.
-
-The variable `automatic-hscrolling' was renamed to
-`auto-hscroll-mode'.  The old name is still available as an alias.
-
----
-*** Moving or scrolling through images (and other lines) taller than
-the window now works sensibly, by automatically adjusting the window's
-vscroll property.
-
-+++
-*** New customize option `overline-margin' controls the space between
-overline and text.
-
-+++
-*** New variable `x-underline-at-descent-line' controls the relative
-position of the underline.  When set, it overrides the
-`x-use-underline-position-properties' variables.
-
-+++
 *** The new face `mode-line-inactive' is used to display the mode line
 of non-selected windows.  The `mode-line' face is now used to display
 the mode line of the currently selected window.
@@ -895,14 +712,16 @@
 The new variable `mode-line-in-non-selected-windows' controls whether
 the `mode-line-inactive' face is used.
 
-+++
+*** The mode line position information now comes before the major mode.
+When the file is maintained under version control, that information
+appears between the position information and the major mode.
+
 *** You can now customize the use of window fringes.  To control this
 for all frames, use M-x fringe-mode or the Show/Hide submenu of the
 top-level Options menu, or customize the `fringe-mode' variable.  To
 control this for a specific frame, use the command M-x
 set-fringe-style.
 
-+++
 *** Angle icons in the fringes can indicate the buffer boundaries.  In
 addition, up and down arrow bitmaps in the fringe indicate which ways
 the window can be scrolled.
@@ -922,7 +741,6 @@
 arrow bitmaps in right fringe.  To show just the angle bitmaps in the
 left fringe, but no arrow bitmaps, use ((top . left) (bottom . left)).
 
-+++
 *** On window systems, lines which are exactly as wide as the window
 (not counting the final newline character) are no longer broken into
 two lines on the display (with just the newline on the second line).
@@ -932,12 +750,6 @@
 The new user option 'overflow-newline-into-fringe' can be set to nil to
 revert to the old behavior of continuing such lines.
 
-+++
-*** When a window has display margin areas, the fringes are now
-displayed between the margins and the buffer's text area, rather than
-outside those margins.
-
-+++
 *** A window can now have individual fringe and scroll-bar settings,
 in addition to the individual display margin settings.
 
@@ -945,57 +757,67 @@
 horizontally or vertically, a saved window configuration is restored,
 or when the frame is resized.
 
-+++
+*** When a window has display margin areas, the fringes are now
+displayed between the margins and the buffer's text area, rather than
+outside those margins.
+
+*** New face `escape-glyph' highlights control characters and escape glyphs.
+
+*** Non-breaking space and hyphens are now displayed with a special
+face, either nobreak-space or escape-glyph.  You can turn this off or
+specify a different mode by setting the variable `nobreak-char-display'.
+
+*** The parameters of automatic hscrolling can now be customized.
+The variable `hscroll-margin' determines how many columns away from
+the window edge point is allowed to get before automatic hscrolling
+will horizontally scroll the window.  The default value is 5.
+
+The variable `hscroll-step' determines how many columns automatic
+hscrolling scrolls the window when point gets too close to the
+window edge.  If its value is zero, the default, Emacs scrolls the
+window so as to center point.  If its value is an integer, it says how
+many columns to scroll.  If the value is a floating-point number, it
+gives the fraction of the window's width to scroll the window.
+
+The variable `automatic-hscrolling' was renamed to
+`auto-hscroll-mode'.  The old name is still available as an alias.
+
+*** Moving or scrolling through images (and other lines) taller than
+the window now works sensibly, by automatically adjusting the window's
+vscroll property.
+
+*** Preemptive redisplay now adapts to current load and bandwidth.
+
+To avoid preempting redisplay on fast computers, networks, and displays,
+the arrival of new input is now performed at regular intervals during
+redisplay.  The new variable `redisplay-preemption-period' specifies
+the period; the default is to check for input every 0.1 seconds.
+
 *** The %c and %l constructs are now ignored in frame-title-format.
 Due to technical limitations in how Emacs interacts with windowing
 systems, these constructs often failed to render properly, and could
 even cause Emacs to crash.
 
-+++
 *** If value of `auto-resize-tool-bars' is `grow-only', the tool bar
 will expand as needed, but not contract automatically.  To contract
 the tool bar, you must type C-l.
 
-** Cursor display changes:
-
-+++
-*** On X, MS Windows, and Mac OS, the blinking cursor's "off" state is
-now controlled by the variable `blink-cursor-alist'.
-
-+++
-*** The X resource cursorBlink can be used to turn off cursor blinking.
-
-+++
-*** Emacs can produce an underscore-like (horizontal bar) cursor.
-The underscore cursor is set by putting `(cursor-type . hbar)' in
-default-frame-alist.  It supports variable heights, like the `bar'
-cursor does.
-
-+++
-*** Display of hollow cursors now obeys the buffer-local value (if any)
-of `cursor-in-non-selected-windows' in the buffer that the cursor
-appears in.
-
-+++
-*** The variable `cursor-in-non-selected-windows' can now be set to any
-of the recognized cursor types.
-
-+++
-*** On text terminals, the variable `visible-cursor' controls whether Emacs
-uses the "very visible" cursor (the default) or the normal cursor.
+*** New customize option `overline-margin' controls the space between
+overline and text.
+
+*** New variable `x-underline-at-descent-line' controls the relative
+position of the underline.  When set, it overrides the
+`x-use-underline-position-properties' variables.
 
 ** New faces:
 
-+++
 *** `mode-line-highlight' is the standard face indicating mouse sensitive
 elements on mode-line (and header-line) like `highlight' face on text
 areas.
 
-+++
 *** `mode-line-buffer-id' is the standard face for buffer identification
 parts of the mode line.
 
-+++
 *** `shadow' face defines the appearance of the "shadowed" text, i.e.
 the text which should be less noticeable than the surrounding text.
 This can be achieved by using shades of grey in contrast with either
@@ -1003,29 +825,10 @@
 allows customization of the appearance of shadowed text in one place,
 so package-specific faces can inherit from it.
 
-+++
 *** `vertical-border' face is used for the vertical divider between windows.
 
-** ebnf2ps changes:
-
-+++
-*** New option `ebnf-arrow-extra-width' which specify extra width for arrow
-shape drawing.
-The extra width is used to avoid that the arrowhead and the terminal border
-overlap.  It depends on `ebnf-arrow-shape' and `ebnf-line-width'.
-
-+++
-*** New option `ebnf-arrow-scale' which specify the arrow scale.
-Values lower than 1.0, shrink the arrow.
-Values greater than 1.0, expand the arrow.
-
-** Font-Lock changes:
-
-+++
-*** M-o now is the prefix key for setting text properties;
-M-o M-o requests refontification.
-
-+++
+** Font-Lock (syntax highlighting) changes:
+
 *** All modes now support using M-x font-lock-mode to toggle
 fontification, even those such as Occur, Info, and comint-derived
 modes that do their own fontification in a special way.
@@ -1034,7 +837,15 @@
 fontification in Info, remove `turn-on-font-lock' from
 `Info-mode-hook'.
 
-+++
+*** New standard font-lock face `font-lock-comment-delimiter-face'.
+
+*** New standard font-lock face `font-lock-preprocessor-face'.
+
+*** Easy to overlook single character negation can now be font-locked.
+You can use the new variable `font-lock-negation-char-face' and the face of
+the same name to customize this.  Currently the cc-modes, sh-script-mode,
+cperl-mode and make-mode support this.
+
 *** Font-Lock mode: in major modes such as Lisp mode, where some Emacs
 features assume that an open-paren in column 0 is always outside of
 any string or comment, Font-Lock now highlights any such open-paren in
@@ -1042,19 +853,9 @@
 can cause trouble.  You should rewrite the string or comment so that
 the open-paren is not in column 0.
 
-+++
-*** New standard font-lock face `font-lock-preprocessor-face'.
-
-+++
-*** New standard font-lock face `font-lock-comment-delimiter-face'.
-
-+++
-*** Easy to overlook single character negation can now be font-locked.
-You can use the new variable `font-lock-negation-char-face' and the face of
-the same name to customize this.  Currently the cc-modes, sh-script-mode,
-cperl-mode and make-mode support this.
-
----
+*** M-o now is the prefix key for setting text properties;
+M-o M-o requests refontification.
+
 *** The default settings for JIT stealth lock parameters are changed.
 The default value for the user option jit-lock-stealth-time is now nil
 instead of 3.  This setting of jit-lock-stealth-time disables stealth
@@ -1067,7 +868,6 @@
 jit-lock-stealth-nice is now 0.5 instead of 0.125 which is supposed to
 cause less load than the old defaults.
 
----
 *** jit-lock can now be delayed with `jit-lock-defer-time'.
 
 If this variable is non-nil, its value should be the amount of Emacs
@@ -1075,31 +875,25 @@
 example, if you set `jit-lock-defer-time' to 0.25, fontification will
 only happen after 0.25s of idle time.
 
----
 *** contextual refontification is now separate from stealth fontification.
 
 jit-lock-defer-contextually is renamed jit-lock-contextually and
 jit-lock-context-time determines the delay after which contextual
 refontification takes place.
 
----
 *** lazy-lock is considered obsolete.
 
 The `lazy-lock' package is superseded by `jit-lock' and is considered
 obsolete.  `jit-lock' is activated by default; if you wish to continue
 using `lazy-lock', activate it in your ~/.emacs like this:
-
   (setq font-lock-support-mode 'lazy-lock-mode)
 
 If you invoke `lazy-lock-mode' directly rather than through
 `font-lock-support-mode', it now issues a warning:
-
   "Use font-lock-support-mode rather than calling lazy-lock-mode"
 
-
 ** Menu support:
 
----
 *** A menu item "Show/Hide" was added to the top-level menu "Options".
 This menu allows you to turn various display features on and off (such
 as the fringes, the tool bar, the speedbar, and the menu bar itself).
@@ -1107,61 +901,64 @@
 it off completely.  There is also a menu-item to toggle displaying of
 current date and time, current line and column number in the mode-line.
 
----
 *** Speedbar has moved from the "Tools" top level menu to "Show/Hide".
 
----
-*** You can exit dialog windows and menus by typing C-g.
-
----
 *** The menu item "Open File..." has been split into two items, "New File..."
 and "Open File...".  "Open File..." now opens only existing files.  This is
 to support existing GUI file selection dialogs better.
 
-+++
 *** The file selection dialog for Gtk+, Mac, W32 and Motif/LessTif can be
 disabled by customizing the variable `use-file-dialog'.
 
----
 *** The pop up menus for Lucid now stay up if you do a fast click and can
 be navigated with the arrow keys (like Gtk+, Mac and W32).
 
-+++
 *** The menu bar for Motif/LessTif/Lucid/Gtk+ can be navigated with keys.
 Pressing F10 shows the first menu in the menu bar.  Navigation is done with
 the arrow keys, select with the return key and cancel with the escape keys.
 
-+++
 *** The Lucid menus can display multilingual text in your locale.  You have
 to explicitly specify a fontSet resource for this to work, for example
 `-xrm "Emacs*fontSet:  -*-helvetica-medium-r-*--*-120-*-*-*-*-*-*,*"'.
 
----
 *** Dialogs for Lucid/Athena and LessTif/Motif now pop down on pressing
 ESC, like they do for Gtk+, Mac and W32.
 
-+++
 *** For the Gtk+ version, you can make Emacs use the old file dialog
 by setting the variable `x-gtk-use-old-file-dialog' to t.  Default is to use
 the new dialog.
 
+*** You can exit dialog windows and menus by typing C-g.
+
+** Buffer Menu changes:
+
+*** The new options `buffers-menu-show-directories' and
+`buffers-menu-show-status' let you control how buffers are displayed
+in the menu dropped down when you click "Buffers" from the menu bar.
+
+`buffers-menu-show-directories' controls whether the menu displays
+leading directories as part of the file name visited by the buffer.
+If its value is `unless-uniquify', the default, directories are
+shown unless uniquify-buffer-name-style' is non-nil.  The value of nil
+and t turn the display of directories off and on, respectively.
+
+`buffers-menu-show-status' controls whether the Buffers menu includes
+the modified and read-only status of the buffers.  By default it is
+t, and the status is shown.
+
+Setting these variables directly does not take effect until next time
+the Buffers menu is regenerated.
+
+*** New command `Buffer-menu-toggle-files-only' toggles display of file
+buffers only in the Buffer Menu.  It is bound to T in Buffer Menu
+mode.
+
+*** `buffer-menu' and `list-buffers' now list buffers whose names begin
+with a space, when those buffers are visiting files.  Normally buffers
+whose names begin with space are omitted.
+
 ** Mouse changes:
 
-+++
-*** If you set the new variable `mouse-autoselect-window' to a non-nil
-value, windows are automatically selected as you move the mouse from
-one Emacs window to another, even within a frame.  A minibuffer window
-can be selected only when it is active.
-
-+++
-*** On X, when the window manager requires that you click on a frame to
-select it (give it focus), the selected window and cursor position
-normally changes according to the mouse click position.  If you set
-the variable x-mouse-click-focus-ignore-position to t, the selected
-window and cursor position do not change when you click on a frame
-to give it focus.
-
-+++
 *** You can now follow links by clicking Mouse-1 on the link.
 
 Traditionally, Emacs uses a Mouse-1 click to set point and a Mouse-2
@@ -1192,23 +989,30 @@
 You can customize the new Mouse-1 behavior via the new user options
 `mouse-1-click-follows-link' and `mouse-1-click-in-non-selected-windows'.
 
-+++
+*** If you set the new variable `mouse-autoselect-window' to a non-nil
+value, windows are automatically selected as you move the mouse from
+one Emacs window to another, even within a frame.  A minibuffer window
+can be selected only when it is active.
+
+*** On X, when the window manager requires that you click on a frame to
+select it (give it focus), the selected window and cursor position
+normally changes according to the mouse click position.  If you set
+the variable x-mouse-click-focus-ignore-position to t, the selected
+window and cursor position do not change when you click on a frame
+to give it focus.
+
 *** Emacs normally highlights mouse sensitive text whenever the mouse
 is over the text.  By setting the new variable `mouse-highlight', you
 can optionally enable mouse highlighting only after you move the
 mouse, so that highlighting disappears when you press a key.  You can
 also disable mouse highlighting.
 
-+++
 *** You can now customize if selecting a region by dragging the mouse
 shall not copy the selected text to the kill-ring by setting the new
 variable mouse-drag-copy-region to nil.
 
----
-*** mouse-wheels can now scroll a specific fraction of the window
-(rather than a fixed number of lines) and the scrolling is `progressive'.
-
----
+*** Under X, mouse-wheel-mode is turned on by default.
+
 *** Emacs ignores mouse-2 clicks while the mouse wheel is being moved.
 
 People tend to push the mouse wheel (which counts as a mouse-2 click)
@@ -1216,12 +1020,11 @@
 ignored.  You can customize this with the mouse-wheel-click-event and
 mouse-wheel-inhibit-click-time variables.
 
-+++
-*** Under X, mouse-wheel-mode is turned on by default.
+*** mouse-wheels can now scroll a specific fraction of the window
+(rather than a fixed number of lines) and the scrolling is `progressive'.
 
 ** Multilingual Environment (Mule) changes:
 
-+++
 *** You can disable character translation for a file using the -*-
 construct.  Include `enable-character-translation: nil' inside the
 -*-...-*- to disable any character translation that may happen by
@@ -1234,14 +1037,12 @@
 without any character translation:
 ;; -*- coding: iso-latin-1!; -*-
 
----
 *** Language environment and various default coding systems are setup
 more correctly according to the current locale name.  If the locale
 name doesn't specify a charset, the default is what glibc defines.
 This change can result in using the different coding systems as
 default in some locale (e.g. vi_VN).
 
-+++
 *** The keyboard-coding-system is now automatically set based on your
 current locale settings if you are not using a window system.  This
 can mean that the META key doesn't work but generates non-ASCII
@@ -1251,33 +1052,26 @@
 or if the locale doesn't describe the character set actually generated
 by the keyboard.  See Info node `Unibyte Mode'.
 
-+++
-*** The new command `revert-buffer-with-coding-system' (C-x RET r)
-revisits the current file using a coding system that you specify.
-
-+++
-*** New command `recode-region' decodes the region again by a specified
-coding system.
-
-+++
-*** The new command `recode-file-name' changes the encoding of the name
-of a file.
-
----
-*** New command `ucs-insert' inserts a character specified by its
-unicode.
-
-+++
 *** The new command `set-file-name-coding-system' (C-x RET F) sets
 coding system for encoding and decoding file names.  A new menu item
 (Options->Mule->Set Coding Systems->For File Name) invokes this
 command.
 
-+++
+*** The new command `revert-buffer-with-coding-system' (C-x RET r)
+revisits the current file using a coding system that you specify.
+
+*** New command `recode-region' decodes the region again by a specified
+coding system.
+
+*** The new command `recode-file-name' changes the encoding of the name
+of a file.
+
+*** New command `ucs-insert' inserts a character specified by its
+unicode.
+
 *** New command quail-show-key shows what key (or key sequence) to type
 in the current input method to input a character at point.
 
-+++
 *** Limited support for character `unification' has been added.
 Emacs now knows how to translate between different representations of
 the same characters in various Emacs charsets according to standard
@@ -1297,32 +1091,24 @@
 mule-unicode-0100-24ff charsets) on decoding.  Note that this mode
 will often effectively clobber data with an iso-2022 encoding.
 
----
+*** New language environments (set up automatically according to the
+locale): Belarusian, Bulgarian, Chinese-EUC-TW, Croatian, Esperanto,
+French, Georgian, Italian, Latin-7, Latvian, Lithuanian, Malayalam,
+Russian, Russian, Slovenian, Swedish, Tajik, Tamil, UTF-8,Ukrainian,
+Welsh,Latin-6, Windows-1255.
+
+*** New input methods: latin-alt-postfix, latin-postfix, latin-prefix,
+belarusian, bulgarian-bds, bulgarian-phonetic, chinese-sisheng (for
+Chinese Pinyin characters), croatian, dutch, georgian, latvian-keyboard,
+lithuanian-numeric, lithuanian-keyboard, malayalam-inscript, rfc1345,
+russian-computer, sgml, slovenian, tamil-inscript, ukrainian-computer,
+ucs, vietnamese-telex, welsh.
+
 *** There is support for decoding Greek and Cyrillic characters into
 either Unicode (the mule-unicode charsets) or the iso-8859 charsets,
-when possible.  The latter are more space-efficient.  This is
-controlled by user option utf-fragment-on-decoding.
-
----
-*** New language environments: French, Ukrainian, Tajik,
-Bulgarian, Belarusian, Ukrainian, UTF-8, Windows-1255, Welsh, Latin-6,
-Latin-7, Lithuanian, Latvian, Swedish, Slovenian, Croatian, Georgian,
-Italian, Russian, Malayalam, Tamil, Russian, Chinese-EUC-TW,
-Esperanto.  (Set up automatically according to the locale.)
-
----
-*** New input methods: latin-alt-postfix, latin-postfix, latin-prefix,
-ukrainian-computer, belarusian, bulgarian-bds, russian-computer,
-vietnamese-telex, lithuanian-numeric, lithuanian-keyboard,
-latvian-keyboard, welsh, georgian, rfc1345, ucs, sgml,
-bulgarian-phonetic, dutch, slovenian, croatian, malayalam-inscript,
-tamil-inscript.
-
----
-*** New input method chinese-sisheng for inputting Chinese Pinyin
-characters.
-
----
+when possible.  The latter are more space-efficient.
+  This is controlled by user option utf-fragment-on-decoding.
+
 *** Improved Thai support.  A new minor mode `thai-word-mode' (which is
 automatically activated if you select Thai as a language
 environment) changes key bindings of most word-oriented commands to
@@ -1334,17 +1120,11 @@
     M-t     (transpose-words)
     M-q     (fill-paragraph)
 
----
 *** Indian support has been updated.
 The in-is13194 coding system is now Unicode-based.  CDAC fonts are
-assumed.  There is a framework for supporting various
-Indian scripts, but currently only Devanagari, Malayalam and Tamil are
-supported.
-
----
-*** A UTF-7 coding system is available in the library `utf-7'.
-
----
+assumed.  There is a framework for supporting various Indian scripts,
+but currently only Devanagari, Malayalam and Tamil are supported.
+
 *** The utf-8/16 coding systems have been enhanced.
 By default, untranslatable utf-8 sequences are simply composed into
 single quasi-characters.  User option `utf-translate-cjk-mode' (it is
@@ -1358,42 +1138,37 @@
 one-dimensional internal charsets, specifically the ISO-8859 ones.
 The utf-16 coding system is affected similarly.
 
----
+*** A UTF-7 coding system is available in the library `utf-7'.
+
 *** A new coding system `euc-tw' has been added for traditional Chinese
 in CNS encoding; it accepts both Big 5 and CNS as input; on saving,
 Big 5 is then converted to CNS.
 
----
 *** Many new coding systems are available in the `code-pages' library.
 These include complete versions of most of those in codepage.el, based
 on Unicode mappings.  `codepage-setup' is now obsolete and is used
 only in the MS-DOS port of Emacs.  All coding systems defined in
 `code-pages' are auto-loaded.
 
----
 *** New variable `utf-translate-cjk-unicode-range' controls which
 Unicode characters to translate in `utf-translate-cjk-mode'.
 
----
 *** iso-10646-1 (`Unicode') fonts can be used to display any range of
 characters encodable by the utf-8 coding system.  Just specify the
 fontset appropriately.
 
 ** Customize changes:
 
-+++
 *** Custom themes are collections of customize options.  Create a
 custom theme with M-x customize-create-theme.  Use M-x load-theme to
 load and enable a theme, and M-x disable-theme to disable it.  Use M-x
 enable-theme to enable a disabled theme.
 
-+++
 *** The commands M-x customize-face and M-x customize-face-other-window
 now look at the character after point.  If a face or faces are
 specified for that character, the commands by default customize those
 faces.
 
----
 *** The face-customization widget has been reworked to be less confusing.
 In particular, when you enable a face attribute using the corresponding
 check-box, there's no longer a redundant `*' option in value selection
@@ -1402,62 +1177,13 @@
 its check-box, then the (now ignored, but still present temporarily in
 case you re-select the attribute) value is hidden.
 
-+++
 *** When you set or reset a variable's value in a Customize buffer,
 the previous value becomes the "backup value" of the variable.
 You can go back to that backup value by selecting "Use Backup Value"
 under the "[State]" button.
 
-** Buffer Menu changes:
-
-+++
-*** New command `Buffer-menu-toggle-files-only' toggles display of file
-buffers only in the Buffer Menu.  It is bound to T in Buffer Menu
-mode.
-
-+++
-*** `buffer-menu' and `list-buffers' now list buffers whose names begin
-with a space, when those buffers are visiting files.  Normally buffers
-whose names begin with space are omitted.
-
----
-*** The new options `buffers-menu-show-directories' and
-`buffers-menu-show-status' let you control how buffers are displayed
-in the menu dropped down when you click "Buffers" from the menu bar.
-
-`buffers-menu-show-directories' controls whether the menu displays
-leading directories as part of the file name visited by the buffer.
-If its value is `unless-uniquify', the default, directories are
-shown unless uniquify-buffer-name-style' is non-nil.  The value of nil
-and t turn the display of directories off and on, respectively.
-
-`buffers-menu-show-status' controls whether the Buffers menu includes
-the modified and read-only status of the buffers.  By default it is
-t, and the status is shown.
-
-Setting these variables directly does not take effect until next time
-the Buffers menu is regenerated.
-
 ** Dired mode:
 
----
-*** New faces dired-header, dired-mark, dired-marked, dired-flagged,
-dired-ignored, dired-directory, dired-symlink, dired-warning
-introduced for Dired mode instead of font-lock faces.
-
-+++
-*** New Dired command `dired-compare-directories' marks files
-with different file attributes in two dired buffers.
-
-+++
-*** New Dired command `dired-do-touch' (bound to T) changes timestamps
-of marked files with the value entered in the minibuffer.
-
-+++
-*** The Dired command `dired-goto-file' is now bound to j, not M-g.
-This is to avoid hiding the global key binding of M-g.
-
-+++
 *** In Dired's ! command (dired-do-shell-command), `*' and `?' now
 control substitution of the file names only when they are surrounded
 by whitespace.  This means you can now use them as shell wildcards
@@ -1465,11 +1191,22 @@
 double quotes make no difference in the shell, but they prevent
 special treatment in `dired-do-shell-command'.
 
-+++
+*** The Dired command `dired-goto-file' is now bound to j, not M-g.
+This is to avoid hiding the global key binding of M-g.
+
+*** New faces dired-header, dired-mark, dired-marked, dired-flagged,
+dired-ignored, dired-directory, dired-symlink, dired-warning
+introduced for Dired mode instead of font-lock faces.
+
+*** New Dired command `dired-compare-directories' marks files
+with different file attributes in two dired buffers.
+
+*** New Dired command `dired-do-touch' (bound to T) changes timestamps
+of marked files with the value entered in the minibuffer.
+
 *** In Dired, the w command now stores the current line's file name
 into the kill ring.  With a zero prefix arg, it stores the absolute file name.
 
-+++
 *** In Dired-x, Omitting files is now a minor mode, dired-omit-mode.
 
 The mode toggling command is bound to M-o.  A new command
@@ -1477,7 +1214,6 @@
 dired-omit-files-p is obsoleted, use the mode toggling function
 instead.
 
-+++
 *** The variables dired-free-space-program and dired-free-space-args
 have been renamed to directory-free-space-program and
 directory-free-space-args, and they now apply whenever Emacs puts a
@@ -1485,7 +1221,12 @@
 
 ** Comint changes:
 
----
+*** The new INSIDE_EMACS environment variable is set to "t" in subshells
+running inside Emacs.  This supersedes the EMACS environment variable,
+which will be removed in a future Emacs release.  Programs that need
+to know whether they are started inside Emacs should check INSIDE_EMACS
+instead of EMACS.
+
 *** The comint prompt can now be made read-only, using the new user
 option `comint-prompt-read-only'.  This is not enabled by default,
 except in IELM buffers.  The read-only status of IELM prompts can be
@@ -1507,27 +1248,17 @@
 `kill-region' if read-only properties are involved: it copies the text
 to the kill-ring, but does not delete it.
 
-+++
 *** The new command `comint-insert-previous-argument' in comint-derived
 modes (shell-mode, etc.) inserts arguments from previous command lines,
 like bash's `ESC .' binding.  It is bound by default to `C-c .', but
 otherwise behaves quite similarly to the bash version.
 
-+++
 *** `comint-use-prompt-regexp-instead-of-fields' has been renamed
 `comint-use-prompt-regexp'.  The old name has been kept as an alias,
 but declared obsolete.
 
-+++
-*** The new INSIDE_EMACS environment variable is set to "t" in
-subshells running inside Emacs.  This supersedes the EMACS environment
-variable, which will be removed in a future Emacs release.  Programs
-that need to know whether they are started inside Emacs should check
-INSIDE_EMACS instead of EMACS.
-
 ** M-x Compile changes:
 
----
 *** M-x compile has become more robust and reliable
 
 Quite a few more kinds of messages are recognized.  Messages that are
@@ -1547,22 +1278,18 @@
 
 The new file etc/compilation.txt gives examples of each type of message.
 
-+++
 *** New user option `compilation-environment'.
 This option allows you to specify environment variables for inferior
 compilation processes without affecting the environment that all
 subprocesses inherit.
 
-+++
 *** New user option `compilation-disable-input'.
 If this is non-nil, send end-of-file as compilation process input.
 
-+++
 *** New options `next-error-highlight' and `next-error-highlight-no-select'
 specify the method of highlighting of the corresponding source line
 in new face `next-error'.
 
-+++
 *** A new minor mode `next-error-follow-minor-mode' can be used in
 compilation-mode, grep-mode, occur-mode, and diff-mode (i.e. all the
 modes that can use `next-error').  In this mode, cursor motion in the
@@ -1570,33 +1297,17 @@
 matches, compilation errors, etc.  This minor mode can be toggled with
 C-c C-f.
 
-+++
 *** When the left fringe is displayed, an arrow points to current message in
 the compilation buffer.
 
-+++
 *** The new variable `compilation-context-lines' controls lines of leading
 context before the current message.  If nil and the left fringe is displayed,
 it doesn't scroll the compilation output window.  If there is no left fringe,
 no arrow is displayed and a value of nil means display the message at the top
 of the window.
 
-+++
-*** The EMACS environment variable now defaults to Emacs's absolute
-file name, instead of to "t".
-
 ** Occur mode changes:
 
-+++
-*** In the *Occur* buffer, `o' switches to it in another window, and
-C-o displays the current line's occurrence in another window without
-switching to it.
-
-+++
-*** You can now use next-error (C-x `) and previous-error to advance to
-the next/previous matching line found by M-x occur.
-
-+++
 *** The new command `multi-occur' is just like `occur', except it can
 search multiple buffers.  There is also a new command
 `multi-occur-in-matching-buffers' which allows you to specify the
@@ -1604,19 +1315,23 @@
 Occur mode has been rewritten, and now uses font-lock, among other
 changes.
 
+*** You can now use next-error (C-x `) and previous-error to advance to
+the next/previous matching line found by M-x occur.
+
+*** In the *Occur* buffer, `o' switches to it in another window, and
+C-o displays the current line's occurrence in another window without
+switching to it.
+
 ** Grep changes:
 
-+++
 *** Grep has been decoupled from compilation mode setup.
 
 There's a new separate package grep.el, with its own submenu and
 customization group.
 
-+++
 *** `grep-find' is now also available under the name `find-grep' where
 people knowing `find-grep-dired' would probably expect it.
 
-+++
 *** New commands `lgrep' (local grep) and `rgrep' (recursive grep) are
 more user-friendly versions of `grep' and `grep-find', which prompt
 separately for the regular expression to match, the files to search,
@@ -1632,17 +1347,11 @@
 typically used by various version control systems, like CVS and arch,
 are automatically skipped by `rgrep'.
 
----
 *** The grep commands provide highlighting support.
 
 Hits are fontified in green, and hits in binary files in orange.  Grep buffers
 can be saved and automatically revisited.
 
----
-*** The new variables `grep-window-height' and `grep-scroll-output' override
-the corresponding compilation mode settings, for grep commands only.
-
-+++
 *** New option `grep-highlight-matches' highlights matches in *grep*
 buffer.  It uses a special feature of some grep programs which accept
 --color option to output markers around matches.  When going to the next
@@ -1650,7 +1359,6 @@
 buffer.  Otherwise, if `grep-highlight-matches' is nil, the whole
 source line is highlighted.
 
-+++
 *** New key bindings in grep output window:
 SPC and DEL scrolls window up and down.  C-n and C-p moves to next and
 previous match in the grep window.  RET jumps to the source line of
@@ -1659,7 +1367,6 @@
 previous or next file in the grep output.  TAB also jumps to the next
 file.
 
-+++
 *** M-x grep now tries to avoid appending `/dev/null' to the command line
 by using GNU grep `-H' option instead.  M-x grep automatically
 detects whether this is possible or not the first time it is invoked.
@@ -1667,14 +1374,37 @@
 unchanged to the system to execute, which allows more complicated
 command lines to be used than was possible before.
 
+*** The new variables `grep-window-height' and `grep-scroll-output' override
+the corresponding compilation mode settings, for grep commands only.
+
+** Cursor display changes:
+
+*** Emacs can produce an underscore-like (horizontal bar) cursor.
+The underscore cursor is set by putting `(cursor-type . hbar)' in
+default-frame-alist.  It supports variable heights, like the `bar'
+cursor does.
+
+*** The variable `cursor-in-non-selected-windows' can now be set to any
+of the recognized cursor types.
+
+*** Display of hollow cursors now obeys the buffer-local value (if any)
+of `cursor-in-non-selected-windows' in the buffer that the cursor
+appears in.
+
+*** On text terminals, the variable `visible-cursor' controls whether Emacs
+uses the "very visible" cursor (the default) or the normal cursor.
+
+*** The X resource cursorBlink can be used to turn off cursor blinking.
+
+*** On X, MS Windows, and Mac OS, the blinking cursor's "off" state is
+now controlled by the variable `blink-cursor-alist'.
+
 ** X Windows Support:
 
-+++
 *** Emacs now supports drag and drop for X.  Dropping a file on a window
-   opens it, dropping text inserts the text.  Dropping a file on a dired
-   buffer copies or moves the file to that directory.
-
-+++
+opens it, dropping text inserts the text.  Dropping a file on a dired
+buffer copies or moves the file to that directory.
+
 *** Under X11, it is possible to swap Alt and Meta (and Super and Hyper).
 The new variables `x-alt-keysym', `x-hyper-keysym', `x-meta-keysym',
 and `x-super-keysym' can be used to choose which keysyms Emacs should
@@ -1683,31 +1413,26 @@
     (setq x-alt-keysym 'meta)
     (setq x-meta-keysym 'alt)
 
-+++
 *** The X resource useXIM can be used to turn off use of XIM, which can
 speed up Emacs with slow networking to the X server.
 
 If the configure option `--without-xim' was used to turn off use of
 XIM by default, the X resource useXIM can be used to turn it on.
 
----
 *** The new variable `x-select-request-type' controls how Emacs
 requests X selection.  The default value is nil, which means that
 Emacs requests X selection with types COMPOUND_TEXT and UTF8_STRING,
 and use the more appropriately result.
 
----
 *** The scrollbar under LessTif or Motif has a smoother drag-scrolling.
 On the other hand, the size of the thumb does not represent the actual
 amount of text shown any more (only a crude approximation of it).
 
 ** Xterm support:
 
----
 *** If you enable Xterm Mouse mode, Emacs will respond to mouse clicks
 on the mode line, header line and display margin, when run in an xterm.
 
----
 *** Improved key bindings support when running in an xterm.
 When Emacs is running in an xterm more key bindings are available.
 The following should work:
@@ -1720,7 +1445,6 @@
 
 ** Character terminal color support changes:
 
-+++
 *** The new command-line option --color=MODE lets you specify a standard
 mode for a tty color support.  It is meant to be used on character
 terminals whose capabilities are not set correctly in the terminal
@@ -1731,98 +1455,33 @@
 in "ls --color", it will support "emacs --color" as well.  See the
 user manual for the possible values of the MODE parameter.
 
----
 *** Emacs now supports several character terminals which provide more
 than 8 colors.  For example, for `xterm', 16-color, 88-color, and
 256-color modes are supported.  Emacs automatically notes at startup
 the extended number of colors, and defines the appropriate entries for
 all of these colors.
 
-+++
 *** Emacs now uses the full range of available colors for the default
 faces when running on a color terminal, including 16-, 88-, and
 256-color xterms.  This means that when you run "emacs -nw" on an
 88-color or 256-color xterm, you will see essentially the same face
 colors as on X.
 
----
 *** There's a new support for colors on `rxvt' terminal emulator.
+
+** ebnf2ps changes:
+
+*** New option `ebnf-arrow-extra-width' which specify extra width for arrow
+shape drawing.
+The extra width is used to avoid that the arrowhead and the terminal border
+overlap.  It depends on `ebnf-arrow-shape' and `ebnf-line-width'.
+
+*** New option `ebnf-arrow-scale' which specify the arrow scale.
+Values lower than 1.0, shrink the arrow.
+Values greater than 1.0, expand the arrow.
 
 * New Modes and Packages in Emacs 22.1
 
----
-** ERC is now part of the Emacs distribution.
-
-ERC is a powerful, modular, and extensible IRC client for Emacs.
-
-To see what modules are available, type
-M-x customize-option erc-modules RET.
-
-To start an IRC session with ERC, type M-x erc, and follow the prompts
-for server, port, and nick.
-
----
-** Rcirc is now part of the Emacs distribution.
-
-Rcirc is an Internet relay chat (IRC) client.  It supports
-simultaneous connections to multiple IRC servers.  Each discussion
-takes place in its own buffer.  For each connection you can join
-several channels (many-to-many) and participate in private
-(one-to-one) chats.  Both channel and private chats are contained in
-separate buffers.
-
-To start an IRC session using the default parameters, type M-x irc.
-If you type C-u M-x irc, it prompts you for the server, nick, port and
-startup channel parameters before connecting.
-
----
-** Newsticker is now part of the Emacs distribution.
-
-Newsticker asynchronously retrieves headlines (RSS) from a list of news
-sites, prepares these headlines for reading, and allows for loading the
-corresponding articles in a web browser.  Its documentation is in a
-separate manual.
-
-+++
-** savehist saves minibuffer histories between sessions.
-To use this feature, turn on savehist-mode in your `.emacs' file.
-
-+++
-** Filesets are collections of files.  You can define a fileset in
-various ways, such as based on a directory tree or based on
-program files that include other program files.
-
-Once you have defined a fileset, you can perform various operations on
-all the files in it, such as visiting them or searching and replacing
-in them.
-
-+++
-** Calc is now part of the Emacs distribution.
-
-Calc is an advanced desk calculator and mathematical tool written in
-Emacs Lisp.  The prefix for Calc has been changed to `C-x *' and Calc
-can be started with `C-x * *'.  The Calc manual is separate from the
-Emacs manual; within Emacs, type "C-h i m calc RET" to read the
-manual.  A reference card is available in `etc/calccard.tex' and
-`etc/calccard.ps'.
-
----
-** The new package ibuffer provides a powerful, completely
-customizable replacement for buff-menu.el.
-
----
-** Ido mode is now part of the Emacs distribution.
-
-The ido (interactively do) package is an extension of the iswitchb
-package to do interactive opening of files and directories in addition
-to interactive buffer switching.  Ido is a superset of iswitchb (with
-a few exceptions), so don't enable both packages.
-
-+++
-** Image files are normally visited in Image mode, which lets you toggle
-between viewing the image and viewing the text using C-c C-c.
-
----
 ** CUA mode is now part of the Emacs distribution.
 
 The new cua package provides CUA-like keybindings using C-x for
@@ -1871,7 +1530,49 @@
 must remove older versions of cua.el or cua-mode.el as well as the
 loading and customization of those packages from the .emacs file.
 
-+++
+** Tramp is now part of the distribution.
+
+This package is similar to Ange-FTP: it allows you to edit remote
+files.  But whereas Ange-FTP uses FTP to access the remote host,
+Tramp uses a shell connection.  The shell connection is always used
+for filename completion and directory listings and suchlike, but for
+the actual file transfer, you can choose between the so-called
+`inline' methods (which transfer the files through the shell
+connection using base64 or uu encoding) and the `out-of-band' methods
+(which invoke an external copying program such as `rcp' or `scp' or
+`rsync' to do the copying).
+
+Shell connections can be acquired via `rsh', `ssh', `telnet' and also
+`su' and `sudo'.  Ange-FTP is still supported via the `ftp' method.
+
+If you want to disable Tramp you should set
+
+  (setq tramp-default-method "ftp")
+
+Removing Tramp, and re-enabling Ange-FTP, can be achieved by M-x
+tramp-unload-tramp.
+
+** The image-dired.el package allows you to easily view, tag and in
+other ways manipulate image files and their thumbnails, using dired as
+the main interface.  Image-Dired provides functionality to generate
+simple image galleries.
+
+** Image files are normally visited in Image mode, which lets you toggle
+between viewing the image and viewing the text using C-c C-c.
+
+** The new python.el package is used to edit Python and Jython programs.
+
+** The URL package (which had been part of W3) is now part of Emacs.
+
+** Calc is now part of the Emacs distribution.
+
+Calc is an advanced desk calculator and mathematical tool written in
+Emacs Lisp.  The prefix for Calc has been changed to `C-x *' and Calc
+can be started with `C-x * *'.  The Calc manual is separate from the
+Emacs manual; within Emacs, type "C-h i m calc RET" to read the
+manual.  A reference card is available in `etc/calccard.tex' and
+`etc/calccard.ps'.
+
 ** Org mode is now part of the Emacs distribution
 
 Org mode is a mode for keeping notes, maintaining ToDo lists, and
@@ -1886,11 +1587,49 @@
 type "C-h i m org RET" to read that manual.  A reference card is
 available in `etc/orgcard.tex' and `etc/orgcard.ps'.
 
-+++
-** The new package dns-mode.el adds syntax highlighting of DNS master files.
-It is a modern replacement for zone-mode.el, which is now obsolete.
-
----
+** ERC is now part of the Emacs distribution.
+
+ERC is a powerful, modular, and extensible IRC client for Emacs.
+
+To see what modules are available, type
+M-x customize-option erc-modules RET.
+
+To start an IRC session with ERC, type M-x erc, and follow the prompts
+for server, port, and nick.
+
+** Rcirc is now part of the Emacs distribution.
+
+Rcirc is an Internet relay chat (IRC) client.  It supports
+simultaneous connections to multiple IRC servers.  Each discussion
+takes place in its own buffer.  For each connection you can join
+several channels (many-to-many) and participate in private
+(one-to-one) chats.  Both channel and private chats are contained in
+separate buffers.
+
+To start an IRC session using the default parameters, type M-x irc.
+If you type C-u M-x irc, it prompts you for the server, nick, port and
+startup channel parameters before connecting.
+
+** The new package ibuffer provides a powerful, completely
+customizable replacement for buff-menu.el.
+
+** Newsticker is now part of the Emacs distribution.
+
+Newsticker asynchronously retrieves headlines (RSS) from a list of news
+sites, prepares these headlines for reading, and allows for loading the
+corresponding articles in a web browser.  Its documentation is in a
+separate manual.
+
+** The wdired.el package allows you to use normal editing commands on Dired
+buffers to change filenames, permissions, etc...
+
+** Ido mode is now part of the Emacs distribution.
+
+The ido (interactively do) package is an extension of the iswitchb
+package to do interactive opening of files and directories in addition
+to interactive buffer switching.  Ido is a superset of iswitchb (with
+a few exceptions), so don't enable both packages.
+
 ** The new global minor mode `file-name-shadow-mode' modifies the way
 filenames being entered by the user in the minibuffer are displayed, so
 that it's clear when part of the entered filename will be ignored due to
@@ -1898,36 +1637,6 @@
 invisible, or otherwise less visually noticeable.  The display method can
 be displayed by customizing the variable `file-name-shadow-properties'.
 
-+++
-** The new package flymake.el does on-the-fly syntax checking of program
-source files.  See the Flymake's Info manual for more details.
-
-+++
-** The new keypad setup package provides several common bindings for
-the numeric keypad which is available on most keyboards.  The numeric
-keypad typically has the digits 0 to 9, a decimal point, keys marked
-+, -, /, and *, an Enter key, and a NumLock toggle key.  The keypad
-package only controls the use of the digit and decimal keys.
-
-By customizing the variables `keypad-setup', `keypad-shifted-setup',
-`keypad-numlock-setup', and `keypad-numlock-shifted-setup', or by
-using the function `keypad-setup', you can rebind all digit keys and
-the decimal key of the keypad in one step for each of the four
-possible combinations of the Shift key state (not pressed/pressed) and
-the NumLock toggle state (off/on).
-
-The choices for the keypad keys in each of the above states are:
-`Plain numeric keypad' where the keys generates plain digits,
-`Numeric keypad with decimal key' where the character produced by the
-decimal key can be customized individually (for internationalization),
-`Numeric Prefix Arg' where the keypad keys produce numeric prefix args
-for Emacs editing commands, `Cursor keys' and `Shifted Cursor keys'
-where the keys work like (shifted) arrow keys, home/end, etc., and
-`Unspecified/User-defined' where the keypad keys (kp-0, kp-1, etc.)
-are left unspecified and can be bound individually through the global
-or local keymaps.
-
-+++
 ** Emacs' keyboard macro facilities have been enhanced by the new
 kmacro package.
 
@@ -1961,16 +1670,39 @@
 C-x C-k SPC steps through the last keyboard macro one key sequence
 at a time, prompting for the actions to take.
 
----
-** New minor mode, Visible mode, toggles invisibility in the current buffer.
-When enabled, it makes all invisible text visible.  When disabled, it
-restores the previous value of `buffer-invisibility-spec'.
-
-+++
-** The wdired.el package allows you to use normal editing commands on Dired
-buffers to change filenames, permissions, etc...
-
-+++
+** The new keypad setup package provides several common bindings for
+the numeric keypad which is available on most keyboards.  The numeric
+keypad typically has the digits 0 to 9, a decimal point, keys marked
++, -, /, and *, an Enter key, and a NumLock toggle key.  The keypad
+package only controls the use of the digit and decimal keys.
+
+By customizing the variables `keypad-setup', `keypad-shifted-setup',
+`keypad-numlock-setup', and `keypad-numlock-shifted-setup', or by
+using the function `keypad-setup', you can rebind all digit keys and
+the decimal key of the keypad in one step for each of the four
+possible combinations of the Shift key state (not pressed/pressed) and
+the NumLock toggle state (off/on).
+
+The choices for the keypad keys in each of the above states are:
+`Plain numeric keypad' where the keys generates plain digits,
+`Numeric keypad with decimal key' where the character produced by the
+decimal key can be customized individually (for internationalization),
+`Numeric Prefix Arg' where the keypad keys produce numeric prefix args
+for Emacs editing commands, `Cursor keys' and `Shifted Cursor keys'
+where the keys work like (shifted) arrow keys, home/end, etc., and
+`Unspecified/User-defined' where the keypad keys (kp-0, kp-1, etc.)
+are left unspecified and can be bound individually through the global
+or local keymaps.
+
+** The printing package is now part of the Emacs distribution.
+
+If you enable the printing package by including (require 'printing) in
+the .emacs file, the normal Print item on the File menu is replaced
+with a Print sub-menu which allows you to preview output through
+ghostview, use ghostscript to print (if you don't have a PostScript
+printer) or send directly to printer a PostScript code generated by
+`ps-print' package.  Use M-x pr-help for more information.
+
 ** The new package longlines.el provides a minor mode for editing text
 files composed of long lines, based on the `use-hard-newlines'
 mechanism.  The long lines are broken up by inserting soft newlines,
@@ -1981,41 +1713,11 @@
 similar to Refill mode, but more reliable.  To turn the word wrap
 feature off, set `longlines-auto-wrap' to nil.
 
-+++
-** The printing package is now part of the Emacs distribution.
-
-If you enable the printing package by including (require 'printing) in
-the .emacs file, the normal Print item on the File menu is replaced
-with a Print sub-menu which allows you to preview output through
-ghostview, use ghostscript to print (if you don't have a PostScript
-printer) or send directly to printer a PostScript code generated by
-`ps-print' package.  Use M-x pr-help for more information.
-
----
-** The minor mode Reveal mode makes text visible on the fly as you
-move your cursor into hidden regions of the buffer.
-It should work with any package that uses overlays to hide parts
-of a buffer, such as outline-minor-mode, hs-minor-mode, hide-ifdef-mode, ...
-
-There is also Global Reveal mode which affects all buffers.
-
----
-** The ruler-mode.el library provides a minor mode for displaying an
-"active" ruler in the header line.  You can use the mouse to visually
-change the `fill-column', `window-margins' and `tab-stop-list'
-settings.
-
-+++
 ** SES mode (ses-mode) is a new major mode for creating and editing
 spreadsheet files.  Besides the usual Emacs features (intuitive command
 letters, undo, cell formulas in Lisp, plaintext files, etc.) it also offers
 viral immunity and import/export of tab-separated values.
 
-+++
-** The new global minor mode `size-indication-mode' (off by default)
-shows the size of accessible part of the buffer on the mode line.
-
-+++
 ** The new package table.el implements editable, WYSIWYG, embedded
 `text tables' in Emacs buffers.  It simulates the effect of putting
 these tables in a special major mode.  The package emulates WYSIWYG
@@ -2023,42 +1725,49 @@
 can generate a table source in typesetting and markup languages such
 as latex and html from the visually laid out text table.
 
-+++
-** The tumme.el package allows you to easily view, tag and in other ways
-manipulate image files and their thumbnails, using dired as the main interface.
-Tumme provides functionality to generate simple image galleries.
-
-+++
-** Tramp is now part of the distribution.
-
-This package is similar to Ange-FTP: it allows you to edit remote
-files.  But whereas Ange-FTP uses FTP to access the remote host,
-Tramp uses a shell connection.  The shell connection is always used
-for filename completion and directory listings and suchlike, but for
-the actual file transfer, you can choose between the so-called
-`inline' methods (which transfer the files through the shell
-connection using base64 or uu encoding) and the `out-of-band' methods
-(which invoke an external copying program such as `rcp' or `scp' or
-`rsync' to do the copying).
-
-Shell connections can be acquired via `rsh', `ssh', `telnet' and also
-`su' and `sudo'.  Ange-FTP is still supported via the `ftp' method.
-
-If you want to disable Tramp you should set
-
-  (setq tramp-default-method "ftp")
-
-Removing Tramp, and re-enabling Ange-FTP, can be achieved by M-x
-tramp-unload-tramp.
-
----
-** The URL package (which had been part of W3) is now part of Emacs.
-
----
-** `cfengine-mode' is a major mode for editing GNU Cfengine
-configuration files.
-
-+++
+** Filesets are collections of files.  You can define a fileset in
+various ways, such as based on a directory tree or based on
+program files that include other program files.
+
+Once you have defined a fileset, you can perform various operations on
+all the files in it, such as visiting them or searching and replacing
+in them.
+
+** The minor mode Reveal mode makes text visible on the fly as you
+move your cursor into hidden regions of the buffer.
+It should work with any package that uses overlays to hide parts
+of a buffer, such as outline-minor-mode, hs-minor-mode, hide-ifdef-mode, ...
+
+There is also Global Reveal mode which affects all buffers.
+
+** New minor mode, Visible mode, toggles invisibility in the current buffer.
+When enabled, it makes all invisible text visible.  When disabled, it
+restores the previous value of `buffer-invisibility-spec'.
+
+** The new package flymake.el does on-the-fly syntax checking of program
+source files.  See the Flymake's Info manual for more details.
+
+** savehist saves minibuffer histories between sessions.
+To use this feature, turn on savehist-mode in your `.emacs' file.
+
+** The ruler-mode.el library provides a minor mode for displaying an
+"active" ruler in the header line.  You can use the mouse to visually
+change the `fill-column', `window-margins' and `tab-stop-list'
+settings.
+
+** The file t-mouse.el is now part of Emacs and provides access to mouse
+events from the console.  It still requires gpm to work but has been updated
+for Emacs 22.  In particular, the mode-line is now position sensitive.
+
+** The new package scroll-lock.el provides the Scroll Lock minor mode
+for pager-like scrolling.  Keys which normally move point by line or
+paragraph will scroll the buffer by the respective amount of lines
+instead and point will be kept vertically fixed relative to window
+boundaries during scrolling.
+
+** The new global minor mode `size-indication-mode' (off by default)
+shows the size of accessible part of the buffer on the mode line.
+
 ** The new package conf-mode.el handles thousands of configuration files, with
 varying syntaxes for comments (;, #, //, /* */ or !), assignment (var = value,
 var : value, var value or keyword var value) and sections ([section] or
@@ -2066,49 +1775,215 @@
 .config, .properties (Java), .desktop (KDE/Gnome), .ini and many others are
 recognized.
 
----
 ** GDB-Script-mode is used for files like .gdbinit.
 
-+++
-** The new python.el package is used to edit Python and Jython programs.
-
----
+** The new package dns-mode.el adds syntax highlighting of DNS master files.
+It is a modern replacement for zone-mode.el, which is now obsolete.
+
+** `cfengine-mode' is a major mode for editing GNU Cfengine
+configuration files.
+
 ** The TCL package tcl-mode.el was replaced by tcl.el.
 This was actually done in Emacs-21.1, and was not documented.
-
----
-** The new package scroll-lock.el provides the Scroll Lock minor mode
-for pager-like scrolling.  Keys which normally move point by line or
-paragraph will scroll the buffer by the respective amount of lines
-instead and point will be kept vertically fixed relative to window
-boundaries during scrolling.
-
-+++
-** The file t-mouse.el is now part of Emacs and provides access to mouse
-events from the console.  It still requires gpm to work but has been updated
-for Emacs 22.  In particular, the mode-line is now position sensitive.
 
 * Changes in Specialized Modes and Packages in Emacs 22.1:
 
+** Changes in Dired
+
+*** Bindings for Image-Dired added.
+Several new keybindings, all starting with the C-t prefix, have been
+added to Dired.  They are all bound to commands in Image-Dired.  As a
+starting point, mark some image files in a dired buffer and do C-t d
+to display thumbnails of them in a separate buffer.
+
+** Info mode changes
+
+*** Images in Info pages are supported.
+
+Info pages show embedded images, in Emacs frames with image support.
+Info documentation that includes images, processed with makeinfo
+version 4.7 or newer, compiles to Info pages with embedded images.
+
+*** `Info-index' offers completion.
+
+*** http and ftp links in Info are now operational: they look like cross
+references and following them calls `browse-url'.
+
+*** isearch in Info uses Info-search and searches through multiple nodes.
+
+Before leaving the initial Info node isearch fails once with the error
+message [initial node], and with subsequent C-s/C-r continues through
+other nodes.  When isearch fails for the rest of the manual, it wraps
+around the whole manual to the top/final node.  The user option
+`Info-isearch-search' controls whether to use Info-search for isearch,
+or the default isearch search function that wraps around the current
+Info node.
+
+*** New search commands: `Info-search-case-sensitively' (bound to S),
+`Info-search-backward', and `Info-search-next' which repeats the last
+search without prompting for a new search string.
+
+*** New command `info-apropos' searches the indices of the known
+Info files on your system for a string, and builds a menu of the
+possible matches.
+
+*** New command `Info-history-forward' (bound to r and new toolbar icon)
+moves forward in history to the node you returned from after using
+`Info-history-back' (renamed from `Info-last').
+
+*** New command `Info-history' (bound to L) displays a menu of visited nodes.
+
+*** New command `Info-toc' (bound to T) creates a node with table of contents
+from the tree structure of menus of the current Info file.
+
+*** New command `Info-copy-current-node-name' (bound to w) copies
+the current Info node name into the kill ring.  With a zero prefix
+arg, puts the node name inside the `info' function call.
+
+*** New face `info-xref-visited' distinguishes visited nodes from unvisited
+and a new option `Info-fontify-visited-nodes' to control this.
+
+*** A numeric prefix argument of `info' selects an Info buffer
+with the number appended to the `*info*' buffer name (e.g. "*info*<2>").
+
+*** Info now hides node names in menus and cross references by default.
+
+If you prefer the old behavior, you can set the new user option
+`Info-hide-note-references' to nil.
+
+*** The default value for `Info-scroll-prefer-subnodes' is now nil.
+
+** Emacs server changes
+
+*** You can have several Emacs servers on the same machine.
+
+	% emacs --eval '(setq server-name "foo")' -f server-start &
+	% emacs --eval '(setq server-name "bar")' -f server-start &
+	% emacsclient -s foo file1
+	% emacsclient -s bar file2
+
+*** The `emacsclient' command understands the options `--eval' and
+`--display' which tell Emacs respectively to evaluate the given Lisp
+expression and to use the given display when visiting files.
+
+*** User option `server-mode' can be used to start a server process.
+
+** Locate changes
+
+*** By default, reverting the *Locate* buffer now just runs the last
+`locate' command back over again without offering to update the locate
+database (which normally only works if you have root privileges).  If
+you prefer the old behavior, set the new customizable option
+`locate-update-when-revert' to t.
+
+** Desktop package
+
+*** Desktop saving is now a minor mode, `desktop-save-mode'.
+
+*** The variable `desktop-enable' is obsolete.
+
+Customize `desktop-save-mode' to enable desktop saving.
+
+*** Buffers are saved in the desktop file in the same order as that in the
+buffer list.
+
+*** The desktop package can be customized to restore only some buffers
+immediately, remaining buffers are restored lazily (when Emacs is
+idle).
+
+*** New command line option --no-desktop
+
+*** New commands:
+  - desktop-revert reverts to the last loaded desktop.
+  - desktop-change-dir kills current desktop and loads a new.
+  - desktop-save-in-desktop-dir saves desktop in the directory from which
+    it was loaded.
+  - desktop-lazy-complete runs the desktop load to completion.
+  - desktop-lazy-abort aborts lazy loading of the desktop.
+
+*** New customizable variables:
+  - desktop-save. Determines whether the desktop should be saved when it is
+    killed.
+  - desktop-file-name-format. Format in which desktop file names should be saved.
+  - desktop-path. List of directories in which to lookup the desktop file.
+  - desktop-locals-to-save. List of local variables to save.
+  - desktop-globals-to-clear. List of global variables that `desktop-clear' will clear.
+  - desktop-clear-preserve-buffers-regexp. Regexp identifying buffers that `desktop-clear'
+    should not delete.
+  - desktop-restore-eager. Number of buffers to restore immediately. Remaining buffers are
+    restored lazily (when Emacs is idle).
+  - desktop-lazy-verbose. Verbose reporting of lazily created buffers.
+  - desktop-lazy-idle-delay. Idle delay before starting to create buffers.
+
+*** New hooks:
+  - desktop-after-read-hook run after a desktop is loaded.
+  - desktop-no-desktop-file-hook run when no desktop file is found.
+
+** Recentf changes
+
+The recent file list is now automatically cleaned up when recentf mode is
+enabled.  The new option `recentf-auto-cleanup' controls when to do
+automatic cleanup.
+
+The ten most recent files can be quickly opened by using the shortcut
+keys 1 to 9, and 0, when the recent list is displayed in a buffer via
+the `recentf-open-files', or `recentf-open-more-files' commands.
+
+The `recentf-keep' option replaces `recentf-keep-non-readable-files-p'
+and provides a more general mechanism to customize which file names to
+keep in the recent list.
+
+With the more advanced option `recentf-filename-handlers', you can
+specify functions that successively transform recent file names.  For
+example, if set to `file-truename' plus `abbreviate-file-name', the
+same file will not be in the recent list with different symbolic
+links, and the file name will be abbreviated.
+
+To follow naming convention, `recentf-menu-append-commands-flag'
+replaces the misnamed option `recentf-menu-append-commands-p'.  The
+old name remains available as alias, but has been marked obsolete.
+
+** Auto-Revert changes
+
+*** You can now use Auto Revert mode to `tail' a file.
+
+If point is at the end of a file buffer before reverting, Auto Revert
+mode keeps it at the end after reverting.  Similarly if point is
+displayed at the end of a file buffer in any window, it stays at
+the end of the buffer in that window.  This allows to tail a file:
+just put point at the end of the buffer and it stays there.  This
+rule applies to file buffers.  For non-file buffers, the behavior can
+be mode dependent.
+
+If you are sure that the file will only change by growing at the end,
+then you can tail the file more efficiently by using the new minor
+mode Auto Revert Tail mode.  The function `auto-revert-tail-mode'
+toggles this mode.
+
+*** Auto Revert mode is now more careful to avoid excessive reverts and
+other potential problems when deciding which non-file buffers to
+revert.  This matters especially if Global Auto Revert mode is enabled
+and `global-auto-revert-non-file-buffers' is non-nil.  Auto Revert
+mode only reverts a non-file buffer if the buffer has a non-nil
+`revert-buffer-function' and a non-nil `buffer-stale-function', which
+decides whether the buffer should be reverted.  Currently, this means
+that auto reverting works for Dired buffers (although this may not
+work properly on all operating systems) and for the Buffer Menu.
+
+*** If the new user option `auto-revert-check-vc-info' is non-nil, Auto
+Revert mode reliably updates version control info (such as the version
+control number in the mode line), in all version controlled buffers in
+which it is active.  If the option is nil, the default, then this info
+only gets updated whenever the buffer gets reverted.
+
 ** Changes in Shell Mode
 
----
 *** Shell output normally scrolls so that the input line is at the
 bottom of the window -- thus showing the maximum possible text.  (This
 is similar to the way sequential output to a terminal works.)
 
-** Changes in Dired
-
-+++
-*** Bindings for Tumme added
-Several new keybindings, all starting with the C-t prefix, have been
-added to Dired.  They are all bound to commands in Tumme.  As a starting
-point, mark some image files in a dired buffer and do C-t d to display
-thumbnails of them in a separate buffer.
-
 ** Changes in Hi Lock
 
-+++
 *** hi-lock-mode now only affects a single buffer, and a new function
 `global-hi-lock-mode' enables Hi Lock in all buffers.  By default, if
 hi-lock-mode is used in what appears to be the initialization file, a
@@ -2118,9 +1993,21 @@
 buffers and no warning will be issued (for compatibility with the
 behavior in older versions of Emacs).
 
----
 ** Changes in Allout
 
+*** Topic cryptography added, enabling easy gpg topic encryption and
+decryption.  Per-topic basis enables interspersing encrypted-text and
+clear-text within a single file to your heart's content, using symmetric
+and/or public key modes.  Time-limited key caching, user-provided
+symmetric key hinting and consistency verification, auto-encryption of
+pending topics on save, and more, make it easy to use encryption in
+powerful ways.  Encryption behavior customization is collected in the
+allout-encryption customization group.
+
+*** Default command prefix was changed to "\C-c " (control-c space), to
+avoid intruding on user's keybinding space.  Customize the
+`allout-command-prefix' variable to your preference.
+
 *** Some previously rough topic-header format edge cases are reconciled.
 Level 1 topics use the mode's comment format, and lines starting with the
 asterisk - for instance, the comment close of some languages (eg, c's "*/"
@@ -2149,15 +2036,6 @@
 discontinuities, revealing excessively contained topics rather than either
 leaving them hidden or raising an error.
 
-*** Topic cryptography added, enabling easy gpg topic encryption and
-decryption.  Per-topic basis enables interspersing encrypted-text and
-clear-text within a single file to your heart's content, using symmetric
-and/or public key modes.  Time-limited key caching, user-provided
-symmetric key hinting and consistency verification, auto-encryption of
-pending topics on save, and more, make it easy to use encryption in
-powerful ways.  Encryption behavior customization is collected in the
-allout-encryption customization group.
-
 *** Navigation within an item is easier.  Repeated beginning-of-line and
 end-of-line key commands (usually, ^A and ^E) cycle through the
 beginning/end-of-line and then beginning/end of topic, etc.  See new
@@ -2183,10 +2061,6 @@
 activation hook, `allout-mode-hook' are now run after the `allout-mode'
 variable is changed, rather than before.
 
-*** Default command prefix was changed to "\C-c " (control-c space), to
-avoid intruding on user's keybinding space.  Customize the
-`allout-command-prefix' variable to your preference.
-
 *** Allout now uses text overlay's `invisible' property for concealed text,
 instead of selective-display.  This simplifies the code, in particular
 avoiding the need for kludges for isearch dynamic-display, discretionary
@@ -2217,14 +2091,290 @@
    - many, many other, more minor tweaks, fixes, and refinements.
    - version number incremented to 2.2
 
-+++
-** The variable `woman-topic-at-point' is renamed
-to `woman-use-topic-at-point' and behaves differently: if this
-variable is non-nil, the `woman' command uses the word at point
-automatically, without asking for a confirmation.  Otherwise, the word
-at point is suggested as default, but not inserted at the prompt.
-
----
+** Hideshow mode changes
+
+*** New variable `hs-set-up-overlay' allows customization of the overlay
+used to effect hiding for hideshow minor mode.  Integration with isearch
+handles the overlay property `display' specially, preserving it during
+temporary overlay showing in the course of an isearch operation.
+
+*** New variable `hs-allow-nesting' non-nil means that hiding a block does
+not discard the hidden state of any "internal" blocks; when the parent
+block is later shown, the internal blocks remain hidden.  Default is nil.
+
+** FFAP changes
+
+*** New ffap commands and keybindings:
+
+C-x C-r (`ffap-read-only'),
+C-x C-v (`ffap-alternate-file'), C-x C-d (`ffap-list-directory'),
+C-x 4 r (`ffap-read-only-other-window'), C-x 4 d (`ffap-dired-other-window'),
+C-x 5 r (`ffap-read-only-other-frame'), C-x 5 d (`ffap-dired-other-frame').
+
+*** FFAP accepts wildcards in a file name by default.
+
+C-x C-f passes the file name to `find-file' with non-nil WILDCARDS
+argument, which visits multiple files, and C-x d passes it to `dired'.
+
+** Changes in Skeleton
+
+*** In skeleton.el, `-' marks the `skeleton-point' without interregion interaction.
+
+`@' has reverted to only setting `skeleton-positions' and no longer
+sets `skeleton-point'.  Skeletons which used @ to mark
+`skeleton-point' independent of `_' should now use `-' instead.  The
+updated `skeleton-insert' docstring explains these new features along
+with other details of skeleton construction.
+
+*** The variables `skeleton-transformation', `skeleton-filter', and
+`skeleton-pair-filter' have been renamed to
+`skeleton-transformation-function', `skeleton-filter-function', and
+`skeleton-pair-filter-function'.  The old names are still available
+as aliases.
+
+** HTML/SGML changes
+
+*** Emacs now tries to set up buffer coding systems for HTML/XML files
+automatically.
+
+*** SGML mode has indentation and supports XML syntax.
+The new variable `sgml-xml-mode' tells SGML mode to use XML syntax.
+When this option is enabled, SGML tags are inserted in XML style,
+i.e., there is always a closing tag.
+By default, its setting is inferred on a buffer-by-buffer basis
+from the file name or buffer contents.
+
+*** The variable `sgml-transformation' has been renamed to
+`sgml-transformation-function'.  The old name is still available as
+alias.
+
+*** `xml-mode' is now an alias for `sgml-mode', which has XML support.
+
+** TeX modes
+
+*** New major mode Doctex mode, for *.dtx files.
+
+*** C-c C-c prompts for a command to run, and tries to offer a good default.
+
+*** The user option `tex-start-options-string' has been replaced
+by two new user options: `tex-start-options', which should hold
+command-line options to feed to TeX, and `tex-start-commands' which should hold
+TeX commands to use at startup.
+
+*** verbatim environments are now highlighted in courier by font-lock
+and super/sub-scripts are made into super/sub-scripts.
+
+** RefTeX mode changes
+
+*** Changes to RefTeX's table of contents
+
+The new command keys "<" and ">" in the TOC buffer promote/demote the
+section at point or all sections in the current region, with full
+support for multifile documents.
+
+The new command `reftex-toc-recenter' (`C-c -') shows the current
+section in the TOC buffer without selecting the TOC window.
+Recentering can happen automatically in idle time when the option
+`reftex-auto-recenter-toc' is turned on.  The highlight in the TOC
+buffer stays when the focus moves to a different window.  A dedicated
+frame can show the TOC with the current section always automatically
+highlighted.  The frame is created and deleted from the toc buffer
+with the `d' key.
+
+The toc window can be split off horizontally instead of vertically.
+See new option `reftex-toc-split-windows-horizontally'.
+
+Labels can be renamed globally from the table of contents using the
+key `M-%'.
+
+The new command `reftex-goto-label' jumps directly to a label
+location.
+
+*** Changes related to citations and BibTeX database files
+
+Commands that insert a citation now prompt for optional arguments when
+called with a prefix argument.  Related new options are
+`reftex-cite-prompt-optional-args' and `reftex-cite-cleanup-optional-args'.
+
+The new command `reftex-create-bibtex-file' creates a BibTeX database
+with all entries referenced in the current document.  The keys "e" and
+"E" allow to produce a BibTeX database file from entries marked in a
+citation selection buffer.
+
+The command `reftex-citation' uses the word in the buffer before the
+cursor as a default search string.
+
+The support for chapterbib has been improved.  Different chapters can
+now use BibTeX or an explicit `thebibliography' environment.
+
+The macros which specify the bibliography file (like \bibliography)
+can be configured with the new option `reftex-bibliography-commands'.
+
+Support for jurabib has been added.
+
+*** Global index matched may be verified with a user function.
+
+During global indexing, a user function can verify an index match.
+See new option `reftex-index-verify-function'.
+
+*** Parsing documents with many labels can be sped up.
+
+Operating in a document with thousands of labels can be sped up
+considerably by allowing RefTeX to derive the type of a label directly
+from the label prefix like `eq:' or `fig:'.  The option
+`reftex-trust-label-prefix' needs to be configured in order to enable
+this feature.  While the speed-up is significant, this may reduce the
+quality of the context offered by RefTeX to describe a label.
+
+*** Miscellaneous changes
+
+The macros which input a file in LaTeX (like \input, \include) can be
+configured in the new option `reftex-include-file-commands'.
+
+RefTeX supports global incremental search.
+
+** BibTeX mode
+
+*** The new command `bibtex-url' browses a URL for the BibTeX entry at
+point (bound to C-c C-l and mouse-2, RET on clickable fields).
+
+*** The new command `bibtex-entry-update' (bound to C-c C-u) updates
+an existing BibTeX entry by inserting fields that may occur but are not
+present.
+
+*** New `bibtex-entry-format' option `required-fields', enabled by default.
+
+*** `bibtex-maintain-sorted-entries' can take values `plain',
+`crossref', and `entry-class' which control the sorting scheme used
+for BibTeX entries.  `bibtex-sort-entry-class' controls the sorting
+scheme `entry-class'.  TAB completion for reference keys and
+automatic detection of duplicates does not require anymore that
+`bibtex-maintain-sorted-entries' is non-nil.
+
+*** The new command `bibtex-complete' completes word fragment before
+point according to context (bound to M-tab).
+
+*** In BibTeX mode the command `fill-paragraph' (M-q) fills
+individual fields of a BibTeX entry.
+
+*** The new variable `bibtex-autofill-types' contains a list of entry
+types for which fields are filled automatically (if possible).
+
+*** The new commands `bibtex-find-entry' and `bibtex-find-crossref'
+locate entries and crossref'd entries (bound to C-c C-s and C-c C-x).
+Crossref fields are clickable (bound to mouse-2, RET).
+
+*** The new variables `bibtex-files' and `bibtex-file-path' define a set
+of BibTeX files that are searched for entry keys.
+
+*** The new command `bibtex-validate-globally' checks for duplicate keys
+in multiple BibTeX files.
+
+*** If the new variable `bibtex-autoadd-commas' is non-nil,
+automatically add missing commas at end of BibTeX fields.
+
+*** The new command `bibtex-copy-summary-as-kill' pushes summary
+of BibTeX entry to kill ring (bound to C-c C-t).
+
+*** If the new variable `bibtex-parse-keys-fast' is non-nil,
+use fast but simplified algorithm for parsing BibTeX keys.
+
+*** The new variables bibtex-expand-strings and
+bibtex-autokey-expand-strings control the expansion of strings when
+extracting the content of a BibTeX field.
+
+*** The variables `bibtex-autokey-name-case-convert' and
+`bibtex-autokey-titleword-case-convert' have been renamed to
+`bibtex-autokey-name-case-convert-function' and
+`bibtex-autokey-titleword-case-convert-function'.  The old names are
+still available as aliases.
+
+** GUD changes
+
+*** The new package gdb-ui.el provides an enhanced graphical interface to
+GDB.  You can interact with GDB through the GUD buffer in the usual way, but
+there are also further buffers which control the execution and describe the
+state of your program.  It can separate the input/output of your program from
+that of GDB and watches expressions in the speedbar.  It also uses features of
+Emacs 21/22 such as the toolbar, and bitmaps in the fringe to indicate
+breakpoints.
+
+To use this package just type M-x gdb.  See the Emacs manual if you want the
+old behaviour.
+
+*** GUD mode has its own tool bar for controlling execution of the inferior
+and other common debugger commands.
+
+*** In GUD mode, when talking to GDB, C-x C-a C-j "jumps" the program
+counter to the specified source line (the one where point is).
+
+*** The variable tooltip-gud-tips-p has been removed.  GUD tooltips can now be
+toggled independently of normal tooltips with the minor mode
+`gud-tooltip-mode'.
+
+*** In graphical mode, with a C program, GUD Tooltips have been extended to
+display the #define directive associated with an identifier when program is
+not executing.
+
+*** GUD mode improvements for jdb:
+
+**** Search for source files using jdb classpath and class information.
+Fast startup since there is no need to scan all source files up front.
+There is also no need to create and maintain lists of source
+directories to scan.  Look at `gud-jdb-use-classpath' and
+`gud-jdb-classpath' customization variables documentation.
+
+**** The previous method of searching for source files has been
+preserved in case someone still wants/needs to use it.
+Set `gud-jdb-use-classpath' to nil.
+
+**** Supports the standard breakpoint (gud-break, gud-clear)
+set/clear operations from Java source files under the classpath, stack
+traversal (gud-up, gud-down), and run until current stack finish
+(gud-finish).
+
+**** Supports new jdb (Java 1.2 and later) in addition to oldjdb
+(Java 1.1 jdb).
+
+*** Added jdb Customization Variables
+
+**** `gud-jdb-command-name'.  What command line to use to invoke jdb.
+
+**** `gud-jdb-use-classpath'.  Allows selection of java source file searching
+method: set to t for new method, nil to scan `gud-jdb-directories' for
+java sources (previous method).
+
+**** `gud-jdb-directories'.  List of directories to scan and search for Java
+classes using the original gud-jdb method (if `gud-jdb-use-classpath'
+is nil).
+
+*** Minor Improvements
+
+**** The STARTTLS wrapper (starttls.el) can now use GNUTLS
+instead of the OpenSSL based `starttls' tool.  For backwards
+compatibility, it prefers `starttls', but you can toggle
+`starttls-use-gnutls' to switch to GNUTLS (or simply remove the
+`starttls' tool).
+
+**** Do not allow debugger output history variable to grow without bounds.
+
+** Lisp mode changes
+
+*** Lisp mode now uses `font-lock-doc-face' for doc strings.
+
+*** C-u C-M-q in Emacs Lisp mode pretty-prints the list after point.
+
+*** New features in evaluation commands
+
+**** The function `eval-defun' (C-M-x) called on defface reinitializes
+the face to the value specified in the defface expression.
+
+**** Typing C-x C-e twice prints the value of the integer result
+in additional formats (octal, hexadecimal, character) specified
+by the new function `eval-expression-print-format'.  The same
+function also defines the result format for `eval-expression' (M-:),
+`eval-print-last-sexp' (C-j) and some edebug evaluation functions.
+
 ** Changes to cmuscheme
 
 *** Emacs now offers to start Scheme if the user tries to
@@ -2240,204 +2390,32 @@
 subprocess are controlled by the user options `scheme-trace-command',
 `scheme-untrace-command' and `scheme-expand-current-form'.
 
----
-** Changes in Makefile mode
-
-*** Makefile mode has submodes for automake, gmake, makepp, BSD make and imake.
-
-The former two couldn't be differentiated before, and the latter three
-are new.  Font-locking is robust now and offers new customizable
-faces.
-
-*** The variable `makefile-query-one-target-method' has been renamed
-to `makefile-query-one-target-method-function'.  The old name is still
-available as alias.
-
-+++
-** In Outline mode, `hide-body' no longer hides lines at the top
-of the file that precede the first header line.
-
-+++
-** Telnet now prompts you for a port number with C-u M-x telnet.
-
----
-** The terminal emulation code in term.el has been improved; it can
-run most curses applications now.
-
-+++
-** M-x diff uses Diff mode instead of Compilation mode.
-
-+++
-** Diff mode key bindings changed.
-
-These are the new bindings:
-
-C-c C-e   diff-ediff-patch  (old M-A)
-C-c C-n   diff-restrict-view   (old M-r)
-C-c C-r   diff-reverse-direction  (old M-R)
-C-c C-u   diff-context->unified   (old M-U)
-C-c C-w   diff-refine-hunk  (old C-c C-r)
-
-To convert unified to context format, use C-u C-c C-u.
-In addition, C-c C-u now operates on the region
-in Transient Mark mode when the mark is active.
-
-+++
-** You can now customize `fill-nobreak-predicate' to control where
-filling can break lines.  The value is now normally a list of
-functions, but it can also be a single function, for compatibility.
-
-Emacs provide two predicates, `fill-single-word-nobreak-p' and
-`fill-french-nobreak-p', for use as the value of
-`fill-nobreak-predicate'.
-
----
-** M-x view-file and commands that use it now avoid interfering
-with special modes such as Tar mode.
-
----
-** Commands `winner-redo' and `winner-undo', from winner.el, are now
-bound to C-c <left> and C-c <right>, respectively.  This is an
-incompatible change.
-
----
-** `global-whitespace-mode' is a new alias for `whitespace-global-mode'.
-
-+++
-** M-x compare-windows now can automatically skip non-matching text to
-resync points in both windows.
-
-+++
-** New user option `add-log-always-start-new-record'.
-
-When this option is enabled, M-x add-change-log-entry always
-starts a new record regardless of when the last record is.
-
----
-** PO translation files are decoded according to their MIME headers
-when Emacs visits them.
-
-** Info mode changes:
-
-+++
-*** A numeric prefix argument of `info' selects an Info buffer
-with the number appended to the `*info*' buffer name (e.g. "*info*<2>").
-
-+++
-*** isearch in Info uses Info-search and searches through multiple nodes.
-
-Before leaving the initial Info node isearch fails once with the error
-message [initial node], and with subsequent C-s/C-r continues through
-other nodes.  When isearch fails for the rest of the manual, it wraps
-around the whole manual to the top/final node.  The user option
-`Info-isearch-search' controls whether to use Info-search for isearch,
-or the default isearch search function that wraps around the current
-Info node.
-
----
-*** New search commands: `Info-search-case-sensitively' (bound to S),
-`Info-search-backward', and `Info-search-next' which repeats the last
-search without prompting for a new search string.
-
-+++
-*** New command `Info-history-forward' (bound to r and new toolbar icon)
-moves forward in history to the node you returned from after using
-`Info-history-back' (renamed from `Info-last').
-
----
-*** New command `Info-history' (bound to L) displays a menu of visited nodes.
-
----
-*** New command `Info-toc' (bound to T) creates a node with table of contents
-from the tree structure of menus of the current Info file.
-
-+++
-*** New command `info-apropos' searches the indices of the known
-Info files on your system for a string, and builds a menu of the
-possible matches.
-
----
-*** New command `Info-copy-current-node-name' (bound to w) copies
-the current Info node name into the kill ring.  With a zero prefix
-arg, puts the node name inside the `info' function call.
-
-+++
-*** New face `info-xref-visited' distinguishes visited nodes from unvisited
-and a new option `Info-fontify-visited-nodes' to control this.
-
----
-*** http and ftp links in Info are now operational: they look like cross
-references and following them calls `browse-url'.
-
-+++
-*** Info now hides node names in menus and cross references by default.
-
-If you prefer the old behavior, you can set the new user option
-`Info-hide-note-references' to nil.
-
----
-*** Images in Info pages are supported.
-
-Info pages show embedded images, in Emacs frames with image support.
-Info documentation that includes images, processed with makeinfo
-version 4.7 or newer, compiles to Info pages with embedded images.
-
-+++
-*** The default value for `Info-scroll-prefer-subnodes' is now nil.
-
----
-*** `Info-index' offers completion.
-
-** Lisp mode changes:
-
----
-*** Lisp mode now uses `font-lock-doc-face' for doc strings.
-
-+++
-*** C-u C-M-q in Emacs Lisp mode pretty-prints the list after point.
-
-*** New features in evaluation commands
-
-+++
-**** The function `eval-defun' (C-M-x) called on defface reinitializes
-the face to the value specified in the defface expression.
-
-+++
-**** Typing C-x C-e twice prints the value of the integer result
-in additional formats (octal, hexadecimal, character) specified
-by the new function `eval-expression-print-format'.  The same
-function also defines the result format for `eval-expression' (M-:),
-`eval-print-last-sexp' (C-j) and some edebug evaluation functions.
-
-+++
-** CC mode changes.
+** Ewoc changes
+
+*** The new function `ewoc-delete' deletes specified nodes.
+
+*** `ewoc-create' now takes optional arg NOSEP, which inhibits insertion of
+a newline after each pretty-printed entry and after the header and footer.
+This allows you to create multiple-entry ewocs on a single line and to
+effect "invisible" nodes by arranging for the pretty-printer to not print
+anything for those nodes.
+
+For example, these two sequences of expressions behave identically:
+
+;; NOSEP nil
+(defun PP (data) (insert (format "%S" data)))
+(ewoc-create 'PP "start\n")
+
+;; NOSEP t
+(defun PP (data) (insert (format "%S\n" data)))
+(ewoc-create 'PP "start\n\n" "\n" t)
+
+** CC mode changes
 
 *** The CC Mode manual has been extensively revised.
 The information about using CC Mode has been separated from the larger
 and more difficult chapters about configuration.
 
-*** Changes in Key Sequences
-**** c-toggle-auto-hungry-state is no longer bound to C-c C-t.
-
-**** c-toggle-hungry-state is no longer bound to C-c C-d.
-This binding has been taken over by c-hungry-delete-forwards.
-
-**** c-toggle-auto-state (C-c C-t) has been renamed to c-toggle-auto-newline.
-c-toggle-auto-state remains as an alias.
-
-**** The new commands c-hungry-backspace and c-hungry-delete-forwards
-have key bindings C-c C-DEL (or C-c DEL, for the benefit of TTYs) and
-C-c C-d (or C-c C-<delete> or C-c <delete>) respectively.  These
-commands delete entire blocks of whitespace with a single
-key-sequence.  [N.B. "DEL" is the <backspace> key.]
-
-**** The new command c-toggle-electric-mode is bound to C-c C-l.
-
-**** The new command c-subword-mode is bound to C-c C-w.
-
-*** C-c C-s (`c-show-syntactic-information') now highlights the anchor
-position(s).
-
 *** New Minor Modes
 **** Electric Minor Mode toggles the electric action of non-alphabetic keys.
 The new command c-toggle-electric-mode is bound to C-c C-l.  Turning the
@@ -2450,15 +2428,41 @@
 letters in StudlyCapsIdentifiers.  You enable this feature by C-c C-w.  It can
 also be used in non-CC Mode buffers.  :-) Contributed by Masatake YAMATO.
 
-*** New clean-ups
-
-**** `comment-close-slash'.
-With this clean-up, a block (i.e. c-style) comment can be terminated by
-typing a slash at the start of a line.
-
-**** `c-one-liner-defun'
-This clean-up compresses a short enough defun (for example, an AWK
-pattern/action pair) onto a single line.  "Short enough" is configurable.
+*** Support for the AWK language.
+Support for the AWK language has been introduced.  The implementation is
+based around GNU AWK version 3.1, but it should work pretty well with
+any AWK.  As yet, not all features of CC Mode have been adapted for AWK.
+Here is a summary:
+
+**** Indentation Engine
+The CC Mode indentation engine fully supports AWK mode.
+
+AWK mode handles code formatted in the conventional AWK fashion: `{'s
+which start actions, user-defined functions, or compound statements are
+placed on the same line as the associated construct; the matching `}'s
+are normally placed under the start of the respective pattern, function
+definition, or structured statement.
+
+The predefined line-up functions haven't yet been adapted for AWK
+mode, though some of them may work serendipitously.  There shouldn't
+be any problems writing custom indentation functions for AWK mode.
+
+**** Font Locking
+There is a single level of font locking in AWK mode, rather than the
+three distinct levels the other modes have.  There are several
+idiosyncrasies in AWK mode's font-locking due to the peculiarities of
+the AWK language itself.
+
+**** Comment and Movement Commands
+These commands all work for AWK buffers.  The notion of "defun" has
+been augmented to include AWK pattern-action pairs - the standard
+"defun" commands on key sequences C-M-a, C-M-e, and C-M-h use this
+extended definition.
+
+**** "awk" style, Auto-newline Insertion and Clean-ups
+A new style, "awk" has been introduced, and this is now the default
+style for AWK code.  With auto-newline enabled, the clean-up
+c-one-liner-defun (see above) is useful.
 
 *** Font lock support.
 CC Mode now provides font lock support for all its languages.  This
@@ -2521,41 +2525,27 @@
 All the keywords used in CORBA IDL, PSDL, and CIDL are recognized and
 handled correctly, also wrt indentation.
 
-*** Support for the AWK language.
-Support for the AWK language has been introduced.  The implementation is
-based around GNU AWK version 3.1, but it should work pretty well with
-any AWK.  As yet, not all features of CC Mode have been adapted for AWK.
-Here is a summary:
-
-**** Indentation Engine
-The CC Mode indentation engine fully supports AWK mode.
-
-AWK mode handles code formatted in the conventional AWK fashion: `{'s
-which start actions, user-defined functions, or compound statements are
-placed on the same line as the associated construct; the matching `}'s
-are normally placed under the start of the respective pattern, function
-definition, or structured statement.
-
-The predefined line-up functions haven't yet been adapted for AWK
-mode, though some of them may work serendipitously.  There shouldn't
-be any problems writing custom indentation functions for AWK mode.
-
-**** Font Locking
-There is a single level of font locking in AWK mode, rather than the
-three distinct levels the other modes have.  There are several
-idiosyncrasies in AWK mode's font-locking due to the peculiarities of
-the AWK language itself.
-
-**** Comment and Movement Commands
-These commands all work for AWK buffers.  The notion of "defun" has
-been augmented to include AWK pattern-action pairs - the standard
-"defun" commands on key sequences C-M-a, C-M-e, and C-M-h use this
-extended definition.
-
-**** "awk" style, Auto-newline Insertion and Clean-ups
-A new style, "awk" has been introduced, and this is now the default
-style for AWK code.  With auto-newline enabled, the clean-up
-c-one-liner-defun (see above) is useful.
+*** Changes in Key Sequences
+**** c-toggle-auto-hungry-state is no longer bound to C-c C-t.
+
+**** c-toggle-hungry-state is no longer bound to C-c C-d.
+This binding has been taken over by c-hungry-delete-forwards.
+
+**** c-toggle-auto-state (C-c C-t) has been renamed to c-toggle-auto-newline.
+c-toggle-auto-state remains as an alias.
+
+**** The new commands c-hungry-backspace and c-hungry-delete-forwards
+have key bindings C-c C-DEL (or C-c DEL, for the benefit of TTYs) and
+C-c C-d (or C-c C-<delete> or C-c <delete>) respectively.  These
+commands delete entire blocks of whitespace with a single
+key-sequence.  [N.B. "DEL" is the <backspace> key.]
+
+**** The new command c-toggle-electric-mode is bound to C-c C-l.
+
+**** The new command c-subword-mode is bound to C-c C-w.
+
+*** C-c C-s (`c-show-syntactic-information') now highlights the anchor
+position(s).
 
 *** New syntactic symbols in IDL mode.
 The top level constructs "module" and "composition" (from CIDL) are
@@ -2686,6 +2676,16 @@
 *** New function `c-context-open-line'.
 It's the open-line equivalent of `c-context-line-break'.
 
+*** New clean-ups
+
+**** `comment-close-slash'.
+With this clean-up, a block (i.e. c-style) comment can be terminated by
+typing a slash at the start of a line.
+
+**** `c-one-liner-defun'
+This clean-up compresses a short enough defun (for example, an AWK
+pattern/action pair) onto a single line.  "Short enough" is configurable.
+
 *** New lineup functions
 
 **** `c-lineup-string-cont'
@@ -2708,6 +2708,10 @@
 **** `c-lineup-argcont'
 Lines up continued function arguments after the preceding comma.
 
+*** Added toggle for syntactic indentation.
+The function `c-toggle-syntactic-indentation' can be used to toggle
+syntactic indentation.
+
 *** Better caching of the syntactic context.
 CC Mode caches the positions of the opening parentheses (of any kind)
 of the lists surrounding the point.  Those positions are used in many
@@ -2733,770 +2737,19 @@
 Also, only the block and the closing line is indented; the current
 line is left untouched.
 
-*** Added toggle for syntactic indentation.
-The function `c-toggle-syntactic-indentation' can be used to toggle
-syntactic indentation.
-
----
-** In sh-script, a continuation line is only indented if the backslash was
-preceded by a SPC or a TAB.
-
----
-** Perl mode has a new variable `perl-indent-continued-arguments'.
-
----
-** The old Octave mode bindings C-c f and C-c i have been changed
-to C-c C-f and C-c C-i.  The C-c C-i subcommands now have duplicate
-bindings on control characters--thus, C-c C-i C-b is the same as
-C-c C-i b, and so on.
-
-** Fortran mode changes:
-
----
-*** Fortran mode does more font-locking by default.  Use level 3
-highlighting for the old default.
-
-+++
-*** Fortran mode has a new variable `fortran-directive-re'.
-Adapt this to match the format of any compiler directives you use.
-Lines that match are never indented, and are given distinctive font-locking.
-
-+++
-*** F90 mode and Fortran mode have new navigation commands
-`f90-end-of-block', `f90-beginning-of-block', `f90-next-block',
-`f90-previous-block', `fortran-end-of-block',
-`fortran-beginning-of-block'.
-
----
-*** F90 mode and Fortran mode have support for `hs-minor-mode' (hideshow).
-It cannot deal with every code format, but ought to handle a sizeable
-majority.
-
----
-*** The new function `f90-backslash-not-special' can be used to change
-the syntax of backslashes in F90 buffers.
-
----
-** Reftex mode changes
-
-+++
-*** Changes to RefTeX's table of contents
-
-The new command keys "<" and ">" in the TOC buffer promote/demote the
-section at point or all sections in the current region, with full
-support for multifile documents.
-
-The new command `reftex-toc-recenter' (`C-c -') shows the current
-section in the TOC buffer without selecting the TOC window.
-Recentering can happen automatically in idle time when the option
-`reftex-auto-recenter-toc' is turned on.  The highlight in the TOC
-buffer stays when the focus moves to a different window.  A dedicated
-frame can show the TOC with the current section always automatically
-highlighted.  The frame is created and deleted from the toc buffer
-with the `d' key.
-
-The toc window can be split off horizontally instead of vertically.
-See new option `reftex-toc-split-windows-horizontally'.
-
-Labels can be renamed globally from the table of contents using the
-key `M-%'.
-
-The new command `reftex-goto-label' jumps directly to a label
-location.
-
-+++
-*** Changes related to citations and BibTeX database files
-
-Commands that insert a citation now prompt for optional arguments when
-called with a prefix argument.  Related new options are
-`reftex-cite-prompt-optional-args' and `reftex-cite-cleanup-optional-args'.
-
-The new command `reftex-create-bibtex-file' creates a BibTeX database
-with all entries referenced in the current document.  The keys "e" and
-"E" allow to produce a BibTeX database file from entries marked in a
-citation selection buffer.
-
-The command `reftex-citation' uses the word in the buffer before the
-cursor as a default search string.
-
-The support for chapterbib has been improved.  Different chapters can
-now use BibTeX or an explicit `thebibliography' environment.
-
-The macros which specify the bibliography file (like \bibliography)
-can be configured with the new option `reftex-bibliography-commands'.
-
-Support for jurabib has been added.
-
-+++
-*** Global index matched may be verified with a user function
-
-During global indexing, a user function can verify an index match.
-See new option `reftex-index-verify-function'.
-
-+++
-*** Parsing documents with many labels can be sped up.
-
-Operating in a document with thousands of labels can be sped up
-considerably by allowing RefTeX to derive the type of a label directly
-from the label prefix like `eq:' or `fig:'.  The option
-`reftex-trust-label-prefix' needs to be configured in order to enable
-this feature.  While the speed-up is significant, this may reduce the
-quality of the context offered by RefTeX to describe a label.
-
-+++
-*** Miscellaneous changes
-
-The macros which input a file in LaTeX (like \input, \include) can be
-configured in the new option `reftex-include-file-commands'.
-
-RefTeX supports global incremental search.
-
-+++
-** Prolog mode has a new variable `prolog-font-lock-keywords'
-to support use of font-lock.
-
-** HTML/SGML changes:
-
----
-*** Emacs now tries to set up buffer coding systems for HTML/XML files
-automatically.
-
-+++
-*** SGML mode has indentation and supports XML syntax.
-The new variable `sgml-xml-mode' tells SGML mode to use XML syntax.
-When this option is enabled, SGML tags are inserted in XML style,
-i.e., there is always a closing tag.
-By default, its setting is inferred on a buffer-by-buffer basis
-from the file name or buffer contents.
-
----
-*** The variable `sgml-transformation' has been renamed to
-`sgml-transformation-function'.  The old name is still available as
-alias.
-
-+++
-*** `xml-mode' is now an alias for `sgml-mode', which has XML support.
-
-** TeX modes:
-
-+++
-*** C-c C-c prompts for a command to run, and tries to offer a good default.
-
-+++
-*** The user option `tex-start-options-string' has been replaced
-by two new user options: `tex-start-options', which should hold
-command-line options to feed to TeX, and `tex-start-commands' which should hold
-TeX commands to use at startup.
-
----
-*** verbatim environments are now highlighted in courier by font-lock
-and super/sub-scripts are made into super/sub-scripts.
-
-+++
-*** New major mode Doctex mode, for *.dtx files.
-
----
-** BibTeX mode:
-
-*** The new command `bibtex-url' browses a URL for the BibTeX entry at
-point (bound to C-c C-l and mouse-2, RET on clickable fields).
-
-*** The new command `bibtex-entry-update' (bound to C-c C-u) updates
-an existing BibTeX entry by inserting fields that may occur but are not
-present.
-
-*** New `bibtex-entry-format' option `required-fields', enabled by default.
-
-*** `bibtex-maintain-sorted-entries' can take values `plain',
-`crossref', and `entry-class' which control the sorting scheme used
-for BibTeX entries.  `bibtex-sort-entry-class' controls the sorting
-scheme `entry-class'.  TAB completion for reference keys and
-automatic detection of duplicates does not require anymore that
-`bibtex-maintain-sorted-entries' is non-nil.
-
-*** If the new variable `bibtex-parse-keys-fast' is non-nil,
-use fast but simplified algorithm for parsing BibTeX keys.
-
-*** If the new variable `bibtex-autoadd-commas' is non-nil,
-automatically add missing commas at end of BibTeX fields.
-
-*** The new variable `bibtex-autofill-types' contains a list of entry
-types for which fields are filled automatically (if possible).
-
-*** The new command `bibtex-complete' completes word fragment before
-point according to context (bound to M-tab).
-
-*** The new commands `bibtex-find-entry' and `bibtex-find-crossref'
-locate entries and crossref'd entries (bound to C-c C-s and C-c C-x).
-Crossref fields are clickable (bound to mouse-2, RET).
-
-*** In BibTeX mode the command `fill-paragraph' (M-q) fills
-individual fields of a BibTeX entry.
-
-*** The new variables `bibtex-files' and `bibtex-file-path' define a set
-of BibTeX files that are searched for entry keys.
-
-*** The new command `bibtex-validate-globally' checks for duplicate keys
-in multiple BibTeX files.
-
-*** The new command `bibtex-copy-summary-as-kill' pushes summary
-of BibTeX entry to kill ring (bound to C-c C-t).
-
-*** The new variables bibtex-expand-strings and
-bibtex-autokey-expand-strings control the expansion of strings when
-extracting the content of a BibTeX field.
-
-*** The variables `bibtex-autokey-name-case-convert' and
-`bibtex-autokey-titleword-case-convert' have been renamed to
-`bibtex-autokey-name-case-convert-function' and
-`bibtex-autokey-titleword-case-convert-function'.  The old names are
-still available as aliases.
-
-+++
-** In Artist mode the variable `artist-text-renderer' has been
-renamed to `artist-text-renderer-function'.  The old name is still
+** Changes in Makefile mode
+
+*** Makefile mode has submodes for automake, gmake, makepp, BSD make and imake.
+
+The former two couldn't be differentiated before, and the latter three
+are new.  Font-locking is robust now and offers new customizable
+faces.
+
+*** The variable `makefile-query-one-target-method' has been renamed
+to `makefile-query-one-target-method-function'.  The old name is still
 available as alias.
 
-+++
-** In Enriched mode, `set-left-margin' and `set-right-margin' are now
-by default bound to `C-c [' and `C-c ]' instead of the former `C-c C-l'
-and `C-c C-r'.
-
-** GUD changes:
-
-+++
-*** In GUD mode, when talking to GDB, C-x C-a C-j "jumps" the program
-counter to the specified source line (the one where point is).
-
----
-*** GUD mode has its own tool bar for controlling execution of the inferior
-and other common debugger commands.
-
-+++
-*** The new package gdb-ui.el provides an enhanced graphical interface to
-GDB.  You can interact with GDB through the GUD buffer in the usual way, but
-there are also further buffers which control the execution and describe the
-state of your program.  It can separate the input/output of your program from
-that of GDB and watches expressions in the speedbar.  It also uses features of
-Emacs 21/22 such as the toolbar, and bitmaps in the fringe to indicate
-breakpoints.
-
-To use this package just type M-x gdb.  See the Emacs manual if you want the
-old behaviour.
-
----
-*** The variable tooltip-gud-tips-p has been removed.  GUD tooltips can now be
-toggled independently of normal tooltips with the minor mode
-`gud-tooltip-mode'.
-
-+++
-*** In graphical mode, with a C program, GUD Tooltips have been extended to
-display the #define directive associated with an identifier when program is
-not executing.
-
----
-** GUD mode improvements for jdb:
-
-*** Search for source files using jdb classpath and class information.
-Fast startup since there is no need to scan all source files up front.
-There is also no need to create and maintain lists of source
-directories to scan.  Look at `gud-jdb-use-classpath' and
-`gud-jdb-classpath' customization variables documentation.
-
-*** Supports the standard breakpoint (gud-break, gud-clear)
-set/clear operations from Java source files under the classpath, stack
-traversal (gud-up, gud-down), and run until current stack finish
-(gud-finish).
-
-*** Supports new jdb (Java 1.2 and later) in addition to oldjdb
-(Java 1.1 jdb).
-
-*** The previous method of searching for source files has been
-preserved in case someone still wants/needs to use it.
-Set `gud-jdb-use-classpath' to nil.
-
-*** Added Customization Variables
-
-**** `gud-jdb-command-name'.   What command line to use to invoke jdb.
-
-**** `gud-jdb-use-classpath'.  Allows selection of java source file searching
-method: set to t for new method, nil to scan `gud-jdb-directories' for
-java sources (previous method).
-
-**** `gud-jdb-directories'.  List of directories to scan and search for Java
-classes using the original gud-jdb method (if `gud-jdb-use-classpath'
-is nil).
-
-*** Minor Improvements
-
-**** The STARTTLS wrapper (starttls.el) can now use GNUTLS
-instead of the OpenSSL based `starttls' tool.  For backwards
-compatibility, it prefers `starttls', but you can toggle
-`starttls-use-gnutls' to switch to GNUTLS (or simply remove the
-`starttls' tool).
-
-**** Do not allow debugger output history variable to grow without bounds.
-
-** Auto-Revert changes:
-
-+++
-*** You can now use Auto Revert mode to `tail' a file.
-
-If point is at the end of a file buffer before reverting, Auto Revert
-mode keeps it at the end after reverting.  Similarly if point is
-displayed at the end of a file buffer in any window, it stays at
-the end of the buffer in that window.  This allows to tail a file:
-just put point at the end of the buffer and it stays there.  This
-rule applies to file buffers.  For non-file buffers, the behavior can
-be mode dependent.
-
-If you are sure that the file will only change by growing at the end,
-then you can tail the file more efficiently by using the new minor
-mode Auto Revert Tail mode.  The function `auto-revert-tail-mode'
-toggles this mode.
-
-+++
-*** Auto Revert mode is now more careful to avoid excessive reverts and
-other potential problems when deciding which non-file buffers to
-revert.  This matters especially if Global Auto Revert mode is enabled
-and `global-auto-revert-non-file-buffers' is non-nil.  Auto Revert
-mode only reverts a non-file buffer if the buffer has a non-nil
-`revert-buffer-function' and a non-nil `buffer-stale-function', which
-decides whether the buffer should be reverted.  Currently, this means
-that auto reverting works for Dired buffers (although this may not
-work properly on all operating systems) and for the Buffer Menu.
-
-+++
-*** If the new user option `auto-revert-check-vc-info' is non-nil, Auto
-Revert mode reliably updates version control info (such as the version
-control number in the mode line), in all version controlled buffers in
-which it is active.  If the option is nil, the default, then this info
-only gets updated whenever the buffer gets reverted.
-
----
-** recentf changes.
-
-The recent file list is now automatically cleaned up when recentf mode is
-enabled.  The new option `recentf-auto-cleanup' controls when to do
-automatic cleanup.
-
-The ten most recent files can be quickly opened by using the shortcut
-keys 1 to 9, and 0, when the recent list is displayed in a buffer via
-the `recentf-open-files', or `recentf-open-more-files' commands.
-
-The `recentf-keep' option replaces `recentf-keep-non-readable-files-p'
-and provides a more general mechanism to customize which file names to
-keep in the recent list.
-
-With the more advanced option `recentf-filename-handlers', you can
-specify functions that successively transform recent file names.  For
-example, if set to `file-truename' plus `abbreviate-file-name', the
-same file will not be in the recent list with different symbolic
-links, and the file name will be abbreviated.
-
-To follow naming convention, `recentf-menu-append-commands-flag'
-replaces the misnamed option `recentf-menu-append-commands-p'.  The
-old name remains available as alias, but has been marked obsolete.
-
-+++
-** Desktop package
-
-+++
-*** Desktop saving is now a minor mode, `desktop-save-mode'.
-
-+++
-*** The variable `desktop-enable' is obsolete.
-
-Customize `desktop-save-mode' to enable desktop saving.
-
----
-*** Buffers are saved in the desktop file in the same order as that in the
-buffer list.
-
-+++
-*** The desktop package can be customized to restore only some buffers
-immediately, remaining buffers are restored lazily (when Emacs is
-idle).
-
-+++
-*** New commands:
-  - desktop-revert reverts to the last loaded desktop.
-  - desktop-change-dir kills current desktop and loads a new.
-  - desktop-save-in-desktop-dir saves desktop in the directory from which
-    it was loaded.
-  - desktop-lazy-complete runs the desktop load to completion.
-  - desktop-lazy-abort aborts lazy loading of the desktop.
-
----
-*** New customizable variables:
-  - desktop-save. Determines whether the desktop should be saved when it is
-    killed.
-  - desktop-file-name-format. Format in which desktop file names should be saved.
-  - desktop-path. List of directories in which to lookup the desktop file.
-  - desktop-locals-to-save. List of local variables to save.
-  - desktop-globals-to-clear. List of global variables that `desktop-clear' will clear.
-  - desktop-clear-preserve-buffers-regexp. Regexp identifying buffers that `desktop-clear'
-    should not delete.
-  - desktop-restore-eager. Number of buffers to restore immediately. Remaining buffers are
-    restored lazily (when Emacs is idle).
-  - desktop-lazy-verbose. Verbose reporting of lazily created buffers.
-  - desktop-lazy-idle-delay. Idle delay before starting to create buffers.
-
-+++
-*** New command line option --no-desktop
-
----
-*** New hooks:
-  - desktop-after-read-hook run after a desktop is loaded.
-  - desktop-no-desktop-file-hook run when no desktop file is found.
-
----
-** The saveplace.el package now filters out unreadable files.
-
-When you exit Emacs, the saved positions in visited files no longer
-include files that aren't readable, e.g. files that don't exist.
-Customize the new option `save-place-forget-unreadable-files' to nil
-to get the old behavior.  The new options `save-place-save-skipped'
-and `save-place-skip-check-regexp' allow further fine-tuning of this
-feature.
-
-** EDiff changes.
-
-+++
-***  When comparing directories.
-Typing D brings up a buffer that lists the differences between the contents of
-directories.  Now it is possible to use this buffer to copy the missing files
-from one directory to another.
-
-+++
-*** When comparing files or buffers.
-Typing the = key now offers to perform the word-by-word comparison of the
-currently highlighted regions in an inferior Ediff session.  If you answer 'n'
-then it reverts to the old behavior and asks the user to select regions for
-comparison.
-
-+++
-*** The new command `ediff-backup' compares a file with its most recent
-backup using `ediff'.  If you specify the name of a backup file,
-`ediff-backup' compares it with the file of which it is a backup.
-
-+++
-** Etags changes.
-
-*** New regular expressions features
-
-**** New syntax for regular expressions, multi-line regular expressions.
-
-The syntax --ignore-case-regexp=/regex/ is now undocumented and retained
-only for backward compatibility.  The new equivalent syntax is
---regex=/regex/i.  More generally, it is --regex=/TAGREGEX/TAGNAME/MODS,
-where `/TAGNAME' is optional, as usual, and MODS is a string of 0 or
-more characters among `i' (ignore case), `m' (multi-line) and `s'
-(single-line).  The `m' and `s' modifiers behave as in Perl regular
-expressions: `m' allows regexps to match more than one line, while `s'
-(which implies `m') means that `.' matches newlines.  The ability to
-span newlines allows writing of much more powerful regular expressions
-and rapid prototyping for tagging new languages.
-
-**** Regular expressions can use char escape sequences as in GCC.
-
-The escaped character sequence \a, \b, \d, \e, \f, \n, \r, \t, \v,
-respectively, stand for the ASCII characters BEL, BS, DEL, ESC, FF, NL,
-CR, TAB, VT.
-
-**** Regular expressions can be bound to a given language.
-
-The syntax --regex={LANGUAGE}REGEX means that REGEX is used to make tags
-only for files of language LANGUAGE, and ignored otherwise.  This is
-particularly useful when storing regexps in a file.
-
-**** Regular expressions can be read from a file.
-
-The --regex=@regexfile option means read the regexps from a file, one
-per line.  Lines beginning with space or tab are ignored.
-
-*** New language parsing features
-
-**** The `::' qualifier triggers C++ parsing in C file.
-
-Previously, only the `template' and `class' keywords had this effect.
-
-**** The GCC __attribute__ keyword is now recognized and ignored.
-
-**** New language HTML.
-
-Tags are generated for `title' as well as `h1', `h2', and `h3'.  Also,
-when `name=' is used inside an anchor and whenever `id=' is used.
-
-**** In Makefiles, constants are tagged.
-
-If you want the old behavior instead, thus avoiding to increase the
-size of the tags file, use the --no-globals option.
-
-**** New language Lua.
-
-All functions are tagged.
-
-**** In Perl, packages are tags.
-
-Subroutine tags are named from their package.  You can jump to sub tags
-as you did before, by the sub name, or additionally by looking for
-package::sub.
-
-**** In Prolog, etags creates tags for rules in addition to predicates.
-
-**** New language PHP.
-
-Functions, classes and defines are tags.  If the --members option is
-specified to etags, variables are tags also.
-
-**** New default keywords for TeX.
-
-The new keywords are def, newcommand, renewcommand, newenvironment and
-renewenvironment.
-
-**** In C and derived languages, etags creates tags for #undef
-
-*** Honor #line directives.
-
-When Etags parses an input file that contains C preprocessor's #line
-directives, it creates tags using the file name and line number
-specified in those directives.  This is useful when dealing with code
-created from Cweb source files.  When Etags tags the generated file, it
-writes tags pointing to the source file.
-
-*** New option --parse-stdin=FILE.
-
-This option is mostly useful when calling etags from programs.  It can
-be used (only once) in place of a file name on the command line.  Etags
-reads from standard input and marks the produced tags as belonging to
-the file FILE.
-
-*** The --members option is now the default.
-
-Use --no-members if you want the old default behaviour of not tagging
-struct members in C, members variables in C++ and variables in PHP.
-
-** Ctags changes.
-
-*** Ctags now allows duplicate tags
-
-** VC Changes
-
-+++
-*** The key C-x C-q only changes the read-only state of the buffer
-(toggle-read-only).  It no longer checks files in or out.
-
-We made this change because we held a poll and found that many users
-were unhappy with the previous behavior.  If you do prefer this
-behavior, you can bind `vc-toggle-read-only' to C-x C-q in your
-`.emacs' file:
-
-    (global-set-key "\C-x\C-q" 'vc-toggle-read-only)
-
-The function `vc-toggle-read-only' will continue to exist.
-
-+++
-*** The new variable `vc-cvs-global-switches' specifies switches that
-are passed to any CVS command invoked by VC.
-
-These switches are used as "global options" for CVS, which means they
-are inserted before the command name.  For example, this allows you to
-specify a compression level using the `-z#' option for CVS.
-
-+++
-*** New backends for Subversion and Meta-CVS.
-
-+++
-*** VC-Annotate mode enhancements
-
-In VC-Annotate mode, you can now use the following key bindings for
-enhanced functionality to browse the annotations of past revisions, or
-to view diffs or log entries directly from vc-annotate-mode:
-
-    P:  annotates the previous revision
-    N:  annotates the next revision
-    J:  annotates the revision at line
-    A:  annotates the revision previous to line
-    D:  shows the diff of the revision at line with its previous revision
-    L:  shows the log of the revision at line
-    W:  annotates the workfile (most up to date) version
-
-** pcl-cvs changes:
-
-+++
-*** In pcl-cvs mode, there is a new `d y' command to view the diffs
-between the local version of the file and yesterday's head revision
-in the repository.
-
-+++
-*** In pcl-cvs mode, there is a new `d r' command to view the changes
-anyone has committed to the repository since you last executed
-`checkout', `update' or `commit'.  That means using cvs diff options
--rBASE -rHEAD.
-
-+++
-** The new variable `mail-default-directory' specifies
-`default-directory' for mail buffers.  This directory is used for
-auto-save files of mail buffers.  It defaults to "~/".
-
-+++
-** The mode line can indicate new mail in a directory or file.
-
-See the documentation of the user option
-`display-time-mail-directory'.
-
-** Rmail changes:
-
----
-*** Rmail now displays 5-digit message ids in its summary buffer.
-
-+++
-*** The new commands rmail-end-of-message and rmail-summary end-of-message,
-by default bound to `/', go to the end of the current mail message in
-Rmail and Rmail summary buffers.
-
-+++
-*** Support for `movemail' from GNU mailutils was added to Rmail.
-
-This version of `movemail' allows to read mail from a wide range of
-mailbox formats, including remote POP3 and IMAP4 mailboxes with or
-without TLS encryption.  If GNU mailutils is installed on the system
-and its version of `movemail' can be found in exec-path, it will be
-used instead of the native one.
-
-** Gnus package
-
----
-*** Gnus now includes Sieve and PGG
-
-Sieve is a library for managing Sieve scripts.  PGG is a library to handle
-PGP/MIME.
-
----
-*** There are many news features, bug fixes and improvements.
-
-See the file GNUS-NEWS or the node "Oort Gnus" in the Gnus manual for details.
-
----
-** MH-E changes.
-
-Upgraded to MH-E version 8.0.3.  There have been major changes since
-version 5.0.2; see MH-E-NEWS for details.
-
-** Calendar changes:
-
-+++
-*** The meanings of C-x < and C-x > have been interchanged.
-< means to scroll backward in time, and > means to scroll forward.
-
-+++
-*** You can now use < and >, instead of C-x < and C-x >, to scroll
-the calendar left or right.
-
-+++
-*** There is a new calendar package, icalendar.el, that can be used to
-convert Emacs diary entries to/from the iCalendar format.
-
-+++
-*** The new package cal-html.el writes HTML files with calendar and
-diary entries.
-
-+++
-*** Diary sexp entries can have custom marking in the calendar.
-Diary sexp functions which only apply to certain days (such as
-`diary-block' or `diary-cyclic') now take an optional parameter MARK,
-which is the name of a face or a single-character string indicating
-how to highlight the day in the calendar display.  Specifying a
-single-character string as @var{mark} places the character next to the
-day in the calendar.  Specifying a face highlights the day with that
-face.  This lets you have different colors or markings for vacations,
-appointments, paydays or anything else using a sexp.
-
-+++
-*** The new function `calendar-goto-day-of-year' (g D) prompts for a
-year and day number, and moves to that date.  Negative day numbers
-count backward from the end of the year.
-
-+++
-*** The new Calendar function `calendar-goto-iso-week' (g w)
-prompts for a year and a week number, and moves to the first
-day of that ISO week.
-
----
-*** The new variable `calendar-minimum-window-height' affects the
-window generated by the function `generate-calendar-window'.
-
----
-*** The functions `holiday-easter-etc' and `holiday-advent' now take
-optional arguments, in order to only report on the specified holiday
-rather than all.  This makes customization of variables such as
-`christian-holidays' simpler.
-
----
-*** The function `simple-diary-display' now by default sets a header line.
-This can be controlled through the variables `diary-header-line-flag'
-and `diary-header-line-format'.
-
-+++
-*** The procedure for activating appointment reminders has changed:
-use the new function `appt-activate'.  The new variable
-`appt-display-format' controls how reminders are displayed, replacing
-`appt-issue-message', `appt-visible', and `appt-msg-window'.
-
-+++
-*** The new functions `diary-from-outlook', `diary-from-outlook-gnus',
-and `diary-from-outlook-rmail' can be used to import diary entries
-from Outlook-format appointments in mail messages.  The variable
-`diary-outlook-formats' can be customized to recognize additional
-formats.
-
-+++
-** Speedbar changes:
-
-*** Speedbar items can now be selected by clicking mouse-1, based on
-the `mouse-1-click-follows-link' mechanism.
-
-*** SPC and DEL are no longer bound to scroll up/down in the speedbar
-keymap.
-
-*** The new command `speedbar-toggle-line-expansion', bound to SPC,
-contracts or expands the line under the cursor.
-
-*** New command `speedbar-create-directory', bound to `M'.
-
-*** The new commands `speedbar-expand-line-descendants' and
-`speedbar-contract-line-descendants', bound to `[' and `]'
-respectively, expand and contract the line under cursor with all of
-its descendents.
-
-*** The new user option `speedbar-query-confirmation-method' controls
-how querying is performed for file operations.  A value of 'always
-means to always query before file operations; 'none-but-delete means
-to not query before any file operations, except before a file
-deletion.
-
-*** The new user option `speedbar-select-frame-method' specifies how
-to select a frame for displaying a file opened with the speedbar.  A
-value of 'attached means to use the attached frame (the frame that
-speedbar was started from.)  A number such as 1 or -1 means to pass
-that number to `other-frame'.
-
-*** The new user option `speedbar-use-tool-tips-flag', if non-nil,
-means to display tool-tips for speedbar items.
-
-*** The frame management code in speedbar.el has been split into a new
-`dframe' library.  Emacs Lisp code that makes use of the speedbar
-should use `dframe-attached-frame' instead of
-`speedbar-attached-frame', `dframe-timer' instead of `speedbar-timer',
-`dframe-close-frame' instead of `speedbar-close-frame', and
-`dframe-activity-change-focus-flag' instead of
-`speedbar-activity-change-focus-flag'.  The variables
-`speedbar-update-speed' and `speedbar-navigating-speed' are also
-obsolete; use `dframe-update-speed' instead.
-
----
-** sql changes.
+** Sql changes
 
 *** The variable `sql-product' controls the highlighting of different
 SQL dialects.  This variable can be set globally via Customize, on a
@@ -3569,189 +2822,501 @@
 appropriate `sql-interactive-mode' wrapper for the current setting of
 `sql-product'.
 
----
 *** sql.el supports the SQLite interpreter--call 'sql-sqlite'.
 
-** FFAP changes:
-
-+++
-*** New ffap commands and keybindings:
-
-C-x C-r (`ffap-read-only'),
-C-x C-v (`ffap-alternate-file'), C-x C-d (`ffap-list-directory'),
-C-x 4 r (`ffap-read-only-other-window'), C-x 4 d (`ffap-dired-other-window'),
-C-x 5 r (`ffap-read-only-other-frame'), C-x 5 d (`ffap-dired-other-frame').
-
----
-*** FFAP accepts wildcards in a file name by default.
-
-C-x C-f passes the file name to `find-file' with non-nil WILDCARDS
-argument, which visits multiple files, and C-x d passes it to `dired'.
-
----
-** Changes in Skeleton
-
-*** In skeleton.el, `-' marks the `skeleton-point' without interregion interaction.
-
-`@' has reverted to only setting `skeleton-positions' and no longer
-sets `skeleton-point'.  Skeletons which used @ to mark
-`skeleton-point' independent of `_' should now use `-' instead.  The
-updated `skeleton-insert' docstring explains these new features along
-with other details of skeleton construction.
-
-*** The variables `skeleton-transformation', `skeleton-filter', and
-`skeleton-pair-filter' have been renamed to
-`skeleton-transformation-function', `skeleton-filter-function', and
-`skeleton-pair-filter-function'.  The old names are still available
-as aliases.
-
----
-** Hideshow mode changes
-
-*** New variable `hs-set-up-overlay' allows customization of the overlay
-used to effect hiding for hideshow minor mode.  Integration with isearch
-handles the overlay property `display' specially, preserving it during
-temporary overlay showing in the course of an isearch operation.
-
-*** New variable `hs-allow-nesting' non-nil means that hiding a block does
-not discard the hidden state of any "internal" blocks; when the parent
-block is later shown, the internal blocks remain hidden.  Default is nil.
-
-+++
-** `hide-ifdef-mode' now uses overlays rather than selective-display
-to hide its text.  This should be mostly transparent but slightly
-changes the behavior of motion commands like C-e and C-p.
-
----
-** `partial-completion-mode' now handles partial completion on directory names.
-
----
-** The type-break package now allows `type-break-file-name' to be nil
+** Fortran mode changes
+
+*** F90 mode and Fortran mode have support for `hs-minor-mode' (hideshow).
+It cannot deal with every code format, but ought to handle a sizeable
+majority.
+
+*** F90 mode and Fortran mode have new navigation commands
+`f90-end-of-block', `f90-beginning-of-block', `f90-next-block',
+`f90-previous-block', `fortran-end-of-block',
+`fortran-beginning-of-block'.
+
+*** Fortran mode does more font-locking by default.  Use level 3
+highlighting for the old default.
+
+*** Fortran mode has a new variable `fortran-directive-re'.
+Adapt this to match the format of any compiler directives you use.
+Lines that match are never indented, and are given distinctive font-locking.
+
+*** The new function `f90-backslash-not-special' can be used to change
+the syntax of backslashes in F90 buffers.
+
+** Miscellaneous programming mode changes
+
+*** In sh-script, a continuation line is only indented if the backslash was
+preceded by a SPC or a TAB.
+
+*** Perl mode has a new variable `perl-indent-continued-arguments'.
+
+*** The old Octave mode bindings C-c f and C-c i have been changed
+to C-c C-f and C-c C-i.  The C-c C-i subcommands now have duplicate
+bindings on control characters--thus, C-c C-i C-b is the same as
+C-c C-i b, and so on.
+
+*** Prolog mode has a new variable `prolog-font-lock-keywords'
+to support use of font-lock.
+
+** VC Changes
+
+*** New backends for Subversion and Meta-CVS.
+
+*** The new variable `vc-cvs-global-switches' specifies switches that
+are passed to any CVS command invoked by VC.
+
+These switches are used as "global options" for CVS, which means they
+are inserted before the command name.  For example, this allows you to
+specify a compression level using the `-z#' option for CVS.
+
+*** The key C-x C-q only changes the read-only state of the buffer
+(toggle-read-only).  It no longer checks files in or out.
+
+We made this change because we held a poll and found that many users
+were unhappy with the previous behavior.  If you do prefer this
+behavior, you can bind `vc-toggle-read-only' to C-x C-q in your
+`.emacs' file:
+
+    (global-set-key "\C-x\C-q" 'vc-toggle-read-only)
+
+The function `vc-toggle-read-only' will continue to exist.
+
+*** VC-Annotate mode enhancements
+
+In VC-Annotate mode, you can now use the following key bindings for
+enhanced functionality to browse the annotations of past revisions, or
+to view diffs or log entries directly from vc-annotate-mode:
+
+    P:  annotates the previous revision
+    N:  annotates the next revision
+    J:  annotates the revision at line
+    A:  annotates the revision previous to line
+    D:  shows the diff of the revision at line with its previous revision
+    L:  shows the log of the revision at line
+    W:  annotates the workfile (most up to date) version
+
+** pcl-cvs changes
+
+*** In pcl-cvs mode, there is a new `d y' command to view the diffs
+between the local version of the file and yesterday's head revision
+in the repository.
+
+*** In pcl-cvs mode, there is a new `d r' command to view the changes
+anyone has committed to the repository since you last executed
+`checkout', `update' or `commit'.  That means using cvs diff options
+-rBASE -rHEAD.
+
+** Diff changes
+
+*** M-x diff uses Diff mode instead of Compilation mode.
+
+*** Diff mode key bindings changed.
+
+These are the new bindings:
+
+C-c C-e   diff-ediff-patch  (old M-A)
+C-c C-n   diff-restrict-view   (old M-r)
+C-c C-r   diff-reverse-direction  (old M-R)
+C-c C-u   diff-context->unified   (old M-U)
+C-c C-w   diff-refine-hunk  (old C-c C-r)
+
+To convert unified to context format, use C-u C-c C-u.
+In addition, C-c C-u now operates on the region
+in Transient Mark mode when the mark is active.
+
+** EDiff changes.
+
+***  When comparing directories.
+Typing D brings up a buffer that lists the differences between the contents of
+directories.  Now it is possible to use this buffer to copy the missing files
+from one directory to another.
+
+*** When comparing files or buffers.
+Typing the = key now offers to perform the word-by-word comparison of the
+currently highlighted regions in an inferior Ediff session.  If you answer 'n'
+then it reverts to the old behavior and asks the user to select regions for
+comparison.
+
+*** The new command `ediff-backup' compares a file with its most recent
+backup using `ediff'.  If you specify the name of a backup file,
+`ediff-backup' compares it with the file of which it is a backup.
+
+** Etags changes.
+
+*** New regular expressions features
+
+**** New syntax for regular expressions, multi-line regular expressions.
+
+The syntax --ignore-case-regexp=/regex/ is now undocumented and retained
+only for backward compatibility.  The new equivalent syntax is
+--regex=/regex/i.  More generally, it is --regex=/TAGREGEX/TAGNAME/MODS,
+where `/TAGNAME' is optional, as usual, and MODS is a string of 0 or
+more characters among `i' (ignore case), `m' (multi-line) and `s'
+(single-line).  The `m' and `s' modifiers behave as in Perl regular
+expressions: `m' allows regexps to match more than one line, while `s'
+(which implies `m') means that `.' matches newlines.  The ability to
+span newlines allows writing of much more powerful regular expressions
+and rapid prototyping for tagging new languages.
+
+**** Regular expressions can use char escape sequences as in GCC.
+
+The escaped character sequence \a, \b, \d, \e, \f, \n, \r, \t, \v,
+respectively, stand for the ASCII characters BEL, BS, DEL, ESC, FF, NL,
+CR, TAB, VT.
+
+**** Regular expressions can be bound to a given language.
+
+The syntax --regex={LANGUAGE}REGEX means that REGEX is used to make tags
+only for files of language LANGUAGE, and ignored otherwise.  This is
+particularly useful when storing regexps in a file.
+
+**** Regular expressions can be read from a file.
+
+The --regex=@regexfile option means read the regexps from a file, one
+per line.  Lines beginning with space or tab are ignored.
+
+*** New language parsing features
+
+**** New language HTML.
+
+Tags are generated for `title' as well as `h1', `h2', and `h3'.  Also,
+when `name=' is used inside an anchor and whenever `id=' is used.
+
+**** New language PHP.
+
+Functions, classes and defines are tags.  If the --members option is
+specified to etags, variables are tags also.
+
+**** New language Lua.
+
+All functions are tagged.
+
+**** The `::' qualifier triggers C++ parsing in C file.
+
+Previously, only the `template' and `class' keywords had this effect.
+
+**** The GCC __attribute__ keyword is now recognized and ignored.
+
+**** In C and derived languages, etags creates tags for #undef
+
+**** In Makefiles, constants are tagged.
+
+If you want the old behavior instead, thus avoiding to increase the
+size of the tags file, use the --no-globals option.
+
+**** In Perl, packages are tags.
+
+Subroutine tags are named from their package.  You can jump to sub tags
+as you did before, by the sub name, or additionally by looking for
+package::sub.
+
+**** In Prolog, etags creates tags for rules in addition to predicates.
+
+**** New default keywords for TeX.
+
+The new keywords are def, newcommand, renewcommand, newenvironment and
+renewenvironment.
+
+*** Honor #line directives.
+
+When Etags parses an input file that contains C preprocessor's #line
+directives, it creates tags using the file name and line number
+specified in those directives.  This is useful when dealing with code
+created from Cweb source files.  When Etags tags the generated file, it
+writes tags pointing to the source file.
+
+*** New option --parse-stdin=FILE.
+
+This option is mostly useful when calling etags from programs.  It can
+be used (only once) in place of a file name on the command line.  Etags
+reads from standard input and marks the produced tags as belonging to
+the file FILE.
+
+*** The --members option is now the default.
+
+Use --no-members if you want the old default behaviour of not tagging
+struct members in C, members variables in C++ and variables in PHP.
+
+** Ctags changes.
+
+*** Ctags now allows duplicate tags
+
+** Rmail changes
+
+*** Support for `movemail' from GNU mailutils was added to Rmail.
+
+This version of `movemail' allows to read mail from a wide range of
+mailbox formats, including remote POP3 and IMAP4 mailboxes with or
+without TLS encryption.  If GNU mailutils is installed on the system
+and its version of `movemail' can be found in exec-path, it will be
+used instead of the native one.
+
+*** The new commands rmail-end-of-message and rmail-summary end-of-message,
+by default bound to `/', go to the end of the current mail message in
+Rmail and Rmail summary buffers.
+
+*** Rmail now displays 5-digit message ids in its summary buffer.
+
+** Gnus package
+
+*** Gnus now includes Sieve and PGG
+
+Sieve is a library for managing Sieve scripts.  PGG is a library to handle
+PGP/MIME.
+
+*** There are many news features, bug fixes and improvements.
+
+See the file GNUS-NEWS or the node "Oort Gnus" in the Gnus manual for details.
+
+** MH-E changes.
+
+Upgraded to MH-E version 8.0.3.  There have been major changes since
+version 5.0.2; see MH-E-NEWS for details.
+
+** Miscellaneous mail changes
+
+*** The new variable `mail-default-directory' specifies
+`default-directory' for mail buffers.  This directory is used for
+auto-save files of mail buffers.  It defaults to "~/".
+
+*** The mode line can indicate new mail in a directory or file.
+
+See the documentation of the user option `display-time-mail-directory'.
+
+** Calendar changes
+
+*** There is a new calendar package, icalendar.el, that can be used to
+convert Emacs diary entries to/from the iCalendar format.
+
+*** The new package cal-html.el writes HTML files with calendar and
+diary entries.
+
+*** The new functions `diary-from-outlook', `diary-from-outlook-gnus',
+and `diary-from-outlook-rmail' can be used to import diary entries
+from Outlook-format appointments in mail messages.  The variable
+`diary-outlook-formats' can be customized to recognize additional
+formats.
+
+*** The procedure for activating appointment reminders has changed:
+use the new function `appt-activate'.  The new variable
+`appt-display-format' controls how reminders are displayed, replacing
+`appt-issue-message', `appt-visible', and `appt-msg-window'.
+
+*** The function `simple-diary-display' now by default sets a header line.
+This can be controlled through the variables `diary-header-line-flag'
+and `diary-header-line-format'.
+
+*** Diary sexp entries can have custom marking in the calendar.
+Diary sexp functions which only apply to certain days (such as
+`diary-block' or `diary-cyclic') now take an optional parameter MARK,
+which is the name of a face or a single-character string indicating
+how to highlight the day in the calendar display.  Specifying a
+single-character string as @var{mark} places the character next to the
+day in the calendar.  Specifying a face highlights the day with that
+face.  This lets you have different colors or markings for vacations,
+appointments, paydays or anything else using a sexp.
+
+*** The meanings of C-x < and C-x > have been interchanged.
+< means to scroll backward in time, and > means to scroll forward.
+
+*** You can now use < and >, instead of C-x < and C-x >, to scroll
+the calendar left or right.
+
+*** The new function `calendar-goto-day-of-year' (g D) prompts for a
+year and day number, and moves to that date.  Negative day numbers
+count backward from the end of the year.
+
+*** The new Calendar function `calendar-goto-iso-week' (g w)
+prompts for a year and a week number, and moves to the first
+day of that ISO week.
+
+*** The functions `holiday-easter-etc' and `holiday-advent' now take
+optional arguments, in order to only report on the specified holiday
+rather than all.  This makes customization of variables such as
+`christian-holidays' simpler.
+
+*** The new variable `calendar-minimum-window-height' affects the
+window generated by the function `generate-calendar-window'.
+
+** Speedbar changes
+
+*** Speedbar items can now be selected by clicking mouse-1, based on
+the `mouse-1-click-follows-link' mechanism.
+
+*** The new command `speedbar-toggle-line-expansion', bound to SPC,
+contracts or expands the line under the cursor.
+
+*** New command `speedbar-create-directory', bound to `M'.
+
+*** The new commands `speedbar-expand-line-descendants' and
+`speedbar-contract-line-descendants', bound to `[' and `]'
+respectively, expand and contract the line under cursor with all of
+its descendents.
+
+*** The new user option `speedbar-use-tool-tips-flag', if non-nil,
+means to display tool-tips for speedbar items.
+
+*** The new user option `speedbar-query-confirmation-method' controls
+how querying is performed for file operations.  A value of 'always
+means to always query before file operations; 'none-but-delete means
+to not query before any file operations, except before a file
+deletion.
+
+*** The new user option `speedbar-select-frame-method' specifies how
+to select a frame for displaying a file opened with the speedbar.  A
+value of 'attached means to use the attached frame (the frame that
+speedbar was started from.)  A number such as 1 or -1 means to pass
+that number to `other-frame'.
+
+*** SPC and DEL are no longer bound to scroll up/down in the speedbar
+keymap.
+
+*** The frame management code in speedbar.el has been split into a new
+`dframe' library.  Emacs Lisp code that makes use of the speedbar
+should use `dframe-attached-frame' instead of
+`speedbar-attached-frame', `dframe-timer' instead of `speedbar-timer',
+`dframe-close-frame' instead of `speedbar-close-frame', and
+`dframe-activity-change-focus-flag' instead of
+`speedbar-activity-change-focus-flag'.  The variables
+`speedbar-update-speed' and `speedbar-navigating-speed' are also
+obsolete; use `dframe-update-speed' instead.
+
+** battery.el changes
+
+*** display-battery-mode replaces display-battery.
+
+*** battery.el now works on recent versions of OS X.
+
+** Games
+
+*** The game `mpuz' is enhanced.
+
+`mpuz' now allows the 2nd factor not to have two identical digits.  By
+default, all trivial operations involving whole lines are performed
+automatically.  The game uses faces for better visual feedback.
+
+** Obsolete and deleted packages
+
+*** fast-lock.el and lazy-lock.el are obsolete.  Use jit-lock.el instead.
+
+*** iso-acc.el is now obsolete.  Use one of the latin input methods instead.
+
+*** zone-mode.el is now obsolete.  Use dns-mode.el instead.
+
+*** cplus-md.el has been deleted.
+
+** Miscellaneous
+
+*** The variable `woman-topic-at-point' is renamed
+to `woman-use-topic-at-point' and behaves differently: if this
+variable is non-nil, the `woman' command uses the word at point
+automatically, without asking for a confirmation.  Otherwise, the word
+at point is suggested as default, but not inserted at the prompt.
+
+*** You can now customize `fill-nobreak-predicate' to control where
+filling can break lines.  The value is now normally a list of
+functions, but it can also be a single function, for compatibility.
+
+Emacs provide two predicates, `fill-single-word-nobreak-p' and
+`fill-french-nobreak-p', for use as the value of
+`fill-nobreak-predicate'.
+
+*** M-x view-file and commands that use it now avoid interfering
+with special modes such as Tar mode.
+
+*** `global-whitespace-mode' is a new alias for `whitespace-global-mode'.
+
+*** The saveplace.el package now filters out unreadable files.
+
+When you exit Emacs, the saved positions in visited files no longer
+include files that aren't readable, e.g. files that don't exist.
+Customize the new option `save-place-forget-unreadable-files' to nil
+to get the old behavior.  The new options `save-place-save-skipped'
+and `save-place-skip-check-regexp' allow further fine-tuning of this
+feature.
+
+*** Commands `winner-redo' and `winner-undo', from winner.el, are now
+bound to C-c <left> and C-c <right>, respectively.  This is an
+incompatible change.
+
+*** The type-break package now allows `type-break-file-name' to be nil
 and if so, doesn't store any data across sessions.  This is handy if
 you don't want the `.type-break' file in your home directory or are
 annoyed by the need for interaction when you kill Emacs.
 
----
-** `ps-print' can now print characters from the mule-unicode charsets.
+*** `ps-print' can now print characters from the mule-unicode charsets.
 
 Printing text with characters from the mule-unicode-* sets works with
 `ps-print', provided that you have installed the appropriate BDF
 fonts.  See the file INSTALL for URLs where you can find these fonts.
 
----
-** New command `strokes-global-set-stroke-string'.
+*** New command `strokes-global-set-stroke-string'.
 This is like `strokes-global-set-stroke', but it allows you to bind
 the stroke directly to a string to insert.  This is convenient for
 using strokes as an input method.
 
-** Emacs server changes:
-
-+++
-*** You can have several Emacs servers on the same machine.
-
-	% emacs --eval '(setq server-name "foo")' -f server-start &
-	% emacs --eval '(setq server-name "bar")' -f server-start &
-	% emacsclient -s foo file1
-	% emacsclient -s bar file2
-
-+++
-*** The `emacsclient' command understands the options `--eval' and
-`--display' which tell Emacs respectively to evaluate the given Lisp
-expression and to use the given display when visiting files.
-
-+++
-*** User option `server-mode' can be used to start a server process.
-
----
-** LDAP support now defaults to ldapsearch from OpenLDAP version 2.
-
-+++
-** You can now disable pc-selection-mode after enabling it.
+*** In Outline mode, `hide-body' no longer hides lines at the top
+of the file that precede the first header line.
+
+*** `hide-ifdef-mode' now uses overlays rather than selective-display
+to hide its text.  This should be mostly transparent but slightly
+changes the behavior of motion commands like C-e and C-p.
+
+*** In Artist mode the variable `artist-text-renderer' has been
+renamed to `artist-text-renderer-function'.  The old name is still
+available as alias.
+
+*** In Enriched mode, `set-left-margin' and `set-right-margin' are now
+by default bound to `C-c [' and `C-c ]' instead of the former `C-c C-l'
+and `C-c C-r'.
+
+*** `partial-completion-mode' now handles partial completion on directory names.
+
+*** You can now disable pc-selection-mode after enabling it.
 
 M-x pc-selection-mode behaves like a proper minor mode, and with no
 argument it toggles the mode.  Turning off PC-Selection mode restores
 the global key bindings that were replaced by turning on the mode.
 
----
-** `uniquify-strip-common-suffix' tells uniquify to prefer
+*** `uniquify-strip-common-suffix' tells uniquify to prefer
 `file|dir1' and `file|dir2' to `file|dir1/subdir' and `file|dir2/subdir'.
 
----
-** Support for `magic cookie' standout modes has been removed.
-
-Emacs still works on terminals that require magic cookies in order to
-use standout mode, but they can no longer display mode-lines in
-inverse-video.
-
----
-** The game `mpuz' is enhanced.
-
-`mpuz' now allows the 2nd factor not to have two identical digits.  By
-default, all trivial operations involving whole lines are performed
-automatically.  The game uses faces for better visual feedback.
-
-** battery.el changes:
-
----
-*** display-battery-mode replaces display-battery.
-
----
-*** battery.el now works on recent versions of OS X.
-
----
-** calculator.el now has radix grouping mode.
+*** New user option `add-log-always-start-new-record'.
+
+When this option is enabled, M-x add-change-log-entry always
+starts a new record regardless of when the last record is.
+
+*** M-x compare-windows now can automatically skip non-matching text to
+resync points in both windows.
+
+*** PO translation files are decoded according to their MIME headers
+when Emacs visits them.
+
+*** Telnet now prompts you for a port number with C-u M-x telnet.
+
+*** calculator.el now has radix grouping mode.
 
 To enable this, set `calculator-output-radix' non-nil.  In this mode a
 separator character is used every few digits, making it easier to see
 byte boundaries etc.  For more info, see the documentation of the
 variable `calculator-radix-grouping-mode'.
 
----
-** fast-lock.el and lazy-lock.el are obsolete.  Use jit-lock.el instead.
-
----
-** iso-acc.el is now obsolete.  Use one of the latin input methods instead.
-
----
-** zone-mode.el is now obsolete.  Use dns-mode.el instead.
-
----
-** cplus-md.el has been deleted.
-
----
-** Ewoc changes
-
-*** The new function `ewoc-delete' deletes specified nodes.
-
-*** `ewoc-create' now takes optional arg NOSEP, which inhibits insertion of
-a newline after each pretty-printed entry and after the header and footer.
-This allows you to create multiple-entry ewocs on a single line and to
-effect "invisible" nodes by arranging for the pretty-printer to not print
-anything for those nodes.
-
-For example, these two sequences of expressions behave identically:
-
-;; NOSEP nil
-(defun PP (data) (insert (format "%S" data)))
-(ewoc-create 'PP "start\n")
-
-;; NOSEP t
-(defun PP (data) (insert (format "%S\n" data)))
-(ewoc-create 'PP "start\n\n" "\n" t)
-
-** Locate changes
-
----
-*** By default, reverting the *Locate* buffer now just runs the last
-`locate' command back over again without offering to update the locate
-database (which normally only works if you have root privileges).  If
-you prefer the old behavior, set the new customizable option
-`locate-update-when-revert' to t.
+*** LDAP support now defaults to ldapsearch from OpenLDAP version 2.
+
+*** The terminal emulation code in term.el has been improved; it can
+run most curses applications now.
+
+*** Support for `magic cookie' standout modes has been removed.
+
+Emacs still works on terminals that require magic cookies in order to
+use standout mode, but they can no longer display mode-lines in
+inverse-video.
 
 
 * Changes in Emacs 22.1 on non-free operating systems
 
-+++
 ** The HOME directory defaults to Application Data under the user profile.
 
 If you used a previous version of Emacs without setting the HOME
@@ -3766,7 +3331,32 @@
 shared computers, and the default HOME directory is less likely to be
 read-only on computers that are administered by someone else.
 
-+++
+** Images are now supported on MS Windows.
+
+PBM and XBM images are supported out of the box.  Other image formats
+depend on external libraries.  All of these libraries have been ported
+to Windows, and can be found in both source and binary form at
+http://gnuwin32.sourceforge.net/.  Note that libpng also depends on
+zlib, and tiff depends on the version of jpeg that it was compiled
+against.  For additional information, see nt/INSTALL.
+
+** Sound is now supported on MS Windows.
+
+WAV format is supported on all versions of Windows, other formats such
+as AU, AIFF and MP3 may be supported in the more recent versions of
+Windows, or when other software provides hooks into the system level
+sound support for those formats.
+
+** Tooltips now work on MS Windows.
+
+See the Emacs 21.1 NEWS entry for tooltips for details.
+
+** Pointing devices with more than 3 buttons are now supported on MS Windows.
+
+The new variable `w32-pass-extra-mouse-buttons-to-system' controls
+whether Emacs should handle the extra buttons itself (the default), or
+pass them to Windows to be handled with system-wide functions.
+
 ** Passing resources on the command line now works on MS Windows.
 
 You can use --xrm to pass resource settings to Emacs, overriding any
@@ -3777,52 +3367,6 @@
 will start up Emacs on an initial frame of 100x20 with red background,
 irrespective of geometry or background setting on the Windows registry.
 
----
-** On MS Windows, the "system caret" now follows the cursor.
-
-This enables Emacs to work better with programs that need to track the
-cursor, for example screen magnifiers and text to speech programs.
-When such a program is in use, the system caret is made visible
-instead of Emacs drawing its own cursor. This seems to be required by
-some programs. The new variable w32-use-visible-system-caret allows
-the caret visibility to be manually toggled.
-
----
-** Tooltips now work on MS Windows.
-
-See the Emacs 21.1 NEWS entry for tooltips for details.
-
----
-** Images are now supported on MS Windows.
-
-PBM and XBM images are supported out of the box.  Other image formats
-depend on external libraries.  All of these libraries have been ported
-to Windows, and can be found in both source and binary form at
-http://gnuwin32.sourceforge.net/.  Note that libpng also depends on
-zlib, and tiff depends on the version of jpeg that it was compiled
-against.  For additional information, see nt/INSTALL.
-
----
-** Sound is now supported on MS Windows.
-
-WAV format is supported on all versions of Windows, other formats such
-as AU, AIFF and MP3 may be supported in the more recent versions of
-Windows, or when other software provides hooks into the system level
-sound support for those formats.
-
----
-** Different shaped mouse pointers are supported on MS Windows.
-
-The mouse pointer changes shape depending on what is under the pointer.
-
----
-** Pointing devices with more than 3 buttons are now supported on MS Windows.
-
-The new variable `w32-pass-extra-mouse-buttons-to-system' controls
-whether Emacs should handle the extra buttons itself (the default), or
-pass them to Windows to be handled with system-wide functions.
-
----
 ** Emacs takes note of colors defined in Control Panel on MS-Windows.
 
 The Control Panel defines some default colors for applications in much
@@ -3833,16 +3377,6 @@
 `list-colors-display' shows the list of System color names, in case
 you wish to use them in other faces.
 
----
-** On MS Windows NT/W2K/XP, Emacs uses Unicode for clipboard operations.
-
-Those systems use Unicode internally, so this allows Emacs to share
-multilingual text with other applications.  On other versions of
-MS Windows, Emacs now uses the appropriate locale coding-system, so
-the clipboard should work correctly for your local language without
-any customizations.
-
----
 ** Running in a console window in Windows now uses the console size.
 
 Previous versions of Emacs erred on the side of having a usable Emacs
@@ -3856,46 +3390,42 @@
 other than 80x25, you can still manually set
 w32-use-full-screen-buffer to t.
 
----
+** Different shaped mouse pointers are supported on MS Windows.
+
+The mouse pointer changes shape depending on what is under the pointer.
+
+** On MS Windows, the "system caret" now follows the cursor.
+
+This enables Emacs to work better with programs that need to track the
+cursor, for example screen magnifiers and text to speech programs.
+When such a program is in use, the system caret is made visible
+instead of Emacs drawing its own cursor. This seems to be required by
+some programs. The new variable w32-use-visible-system-caret allows
+the caret visibility to be manually toggled.
+
+** On MS Windows NT/W2K/XP, Emacs uses Unicode for clipboard operations.
+
+Those systems use Unicode internally, so this allows Emacs to share
+multilingual text with other applications.  On other versions of
+MS Windows, Emacs now uses the appropriate locale coding-system, so
+the clipboard should work correctly for your local language without
+any customizations.
+
 ** On Mac OS, `keyboard-coding-system' changes based on the keyboard script.
 
----
 ** The variable `mac-keyboard-text-encoding' and the constants
 `kTextEncodingMacRoman', `kTextEncodingISOLatin1', and
 `kTextEncodingISOLatin2' are obsolete.
 
-+++
 ** The variable `mac-command-key-is-meta' is obsolete.  Use
 `mac-command-modifier' and `mac-option-modifier' instead.
 
 * Incompatible Lisp Changes in Emacs 22.1
 
-+++
-** The `read-file-name' function now returns a null string if the
-user just types RET.
-
-+++
-** The function find-operation-coding-system may be called with a cons
-(FILENAME . BUFFER) in the second argument if the first argument
-OPERATION is `insert-file-contents', and thus a function registered in
-`file-coding-system-alist' is also called with such an argument.
-
----
-** The variables post-command-idle-hook and post-command-idle-delay have
-been removed.  Use run-with-idle-timer instead.
-
-+++
-** `suppress-keymap' now works by remapping `self-insert-command' to
-the command `undefined'.  (In earlier Emacs versions, it used
-`substitute-key-definition' to rebind self inserting characters to
-`undefined'.)
-
-+++
 ** Mode line display ignores text properties as well as the
 :propertize and :eval forms in the value of a variable whose
 `risky-local-variable' property is nil.
 
----
 The function `comint-send-input' now accepts 3 optional arguments:
 
   (comint-send-input &optional no-newline artificial)
@@ -3904,23 +3434,15 @@
 argument `artificial' to a non-nil value, to prevent Emacs from
 deleting the part of subprocess output that matches the input.
 
----
-** Support for Mocklisp has been removed.
-
-+++
-** The variable `memory-full' now remains t until
-there is no longer a shortage of memory.
-
-+++
-** When Emacs receives a USR1 or USR2 signal, this generates
-input events: sigusr1 or sigusr2.  Use special-event-map to
-handle these events.
-
-+++
+** The `read-file-name' function now returns a null string if the
+user just types RET.
+
+** The variables post-command-idle-hook and post-command-idle-delay have
+been removed.  Use run-with-idle-timer instead.
+
 ** A hex or octal escape in a string constant forces the string to
 be multibyte or unibyte, respectively.
 
-+++
 ** The explicit method of creating a display table element by
 combining a face number and a character code into a numeric
 glyph code is deprecated.
@@ -3929,50 +3451,85 @@
 `glyph-face' must be used to create and decode glyph codes in
 display tables.
 
+** `suppress-keymap' now works by remapping `self-insert-command' to
+the command `undefined'.  (In earlier Emacs versions, it used
+`substitute-key-definition' to rebind self inserting characters to
+`undefined'.)
+
+** The third argument of `accept-process-output' is now milliseconds.
+It used to be microseconds.
+
+** The function find-operation-coding-system may be called with a cons
+(FILENAME . BUFFER) in the second argument if the first argument
+OPERATION is `insert-file-contents', and thus a function registered in
+`file-coding-system-alist' is also called with such an argument.
+
+** When Emacs receives a USR1 or USR2 signal, this generates
+input events: sigusr1 or sigusr2.  Use special-event-map to
+handle these events.
+
+** The variable `memory-full' now remains t until
+there is no longer a shortage of memory.
+
+** Support for Mocklisp has been removed.
+
 
 * Lisp Changes in Emacs 22.1
 
 ** General Lisp changes:
 
-+++
-*** The function `expt' handles negative exponents differently.
-The value for `(expt A B)', if both A and B are integers and B is
-negative, is now a float.  For example: (expt 2 -2) => 0.25.
-
-+++
+*** New syntax: \s now stands for the SPACE character.
+
+`?\s' is a new way to write the space character.  You must make sure
+it is not followed by a dash, since `?\s-...' indicates the "super"
+modifier.  However, it would be strange to write a character constant
+and a following symbol (beginning with `-') with no space between
+them.
+
+`\s' stands for space in strings, too, but it is not really meant for
+strings; it is easier and nicer just to write a space.
+
+*** New syntax: \uXXXX and \UXXXXXXXX specify Unicode code points in hex.
+
+For instance, you can use "\u0428" to specify a string consisting of
+CYRILLIC CAPITAL LETTER SHA, or `"U0001D6E2" to specify one consisting
+of MATHEMATICAL ITALIC CAPITAL ALPHA (the latter is greater than
+#xFFFF and thus needs the longer syntax).
+
+This syntax works for both character constants and strings.
+
+*** New function `unsafep' determines whether a Lisp form is safe.
+
+It returns nil if the given Lisp form can't possibly do anything
+dangerous; otherwise it returns a reason why the form might be unsafe
+(calls unknown function, alters global variable, etc.).
+
 *** The function `eql' is now available without requiring the CL package.
 
-+++
 *** The new function `memql' is like `memq', but uses `eql' for comparison,
 that is, floats are compared by value and other elements with `eq'.
 
-+++
+*** New functions `string-or-null-p' and `booleanp'.
+
+`string-or-null-p' returns non-nil iff OBJECT is a string or nil.
+`booleanp' returns non-nil iff OBJECT is t or nil.
+
 *** `makehash' is now obsolete.  Use `make-hash-table' instead.
 
-+++
+*** Minor change in the function `format'.
+
+Some flags that were accepted but not implemented (such as "*") are no
+longer accepted.
+
 *** `add-to-list' takes an optional third argument, APPEND.
 
 If APPEND is non-nil, the new element gets added at the end of the
 list instead of at the beginning.  This change actually occurred in
 Emacs 21.1, but was not documented then.
 
-+++
 *** New function `add-to-ordered-list' is like `add-to-list' but
 associates a numeric ordering of each element added to the list.
 
-+++
-*** New function `copy-tree' makes a copy of a tree.
-
-It recursively copies through both CARs and CDRs.
-
-+++
-*** New function `delete-dups' deletes `equal' duplicate elements from a list.
-
-It modifies the list destructively, like `delete'.  Of several `equal'
-occurrences of an element in the list, the one that's kept is the
-first one.
-
-+++
 *** New function `add-to-history' adds an element to a history list.
 
 Lisp packages should use this function to add elements to their
@@ -3981,13 +3538,31 @@
 If `history-delete-duplicates' is non-nil, it removes duplicates of
 the new element from the history list it updates.
 
-+++
+*** New function `copy-tree' makes a copy of a tree.
+
+It recursively copies through both CARs and CDRs.
+
+*** New function `delete-dups' deletes `equal' duplicate elements from a list.
+
+It modifies the list destructively, like `delete'.  Of several `equal'
+occurrences of an element in the list, the one that's kept is the
+first one.
+
 *** New function `rassq-delete-all'.
 
 (rassq-delete-all VALUE ALIST) deletes, from ALIST, each element whose
 CDR is `eq' to the specified value.
 
-+++
+*** Functions `get' and `plist-get' no longer give errors for bad plists.
+
+They return nil for a malformed property list or if the list is
+cyclic.
+
+*** New functions `lax-plist-get' and `lax-plist-put'.
+
+They are like `plist-get' and `plist-put', except that they compare
+the property name using `equal' rather than `eq'.
+
 *** The function `number-sequence' makes a list of equally-separated numbers.
 
 For instance, (number-sequence 4 9) returns (4 5 6 7 8 9).  By
@@ -3995,30 +3570,57 @@
 separation as the third argument.  (number-sequence 1.5 6 2) returns
 (1.5 3.5 5.5).
 
-+++
 *** New variables `most-positive-fixnum' and `most-negative-fixnum'.
 
 They hold the largest and smallest possible integer values.
 
-+++
-*** Minor change in the function `format'.
-
-Some flags that were accepted but not implemented (such as "*") are no
-longer accepted.
-
-+++
-*** Functions `get' and `plist-get' no longer give errors for bad plists.
-
-They return nil for a malformed property list or if the list is
-cyclic.
-
-+++
-*** New functions `lax-plist-get' and `lax-plist-put'.
-
-They are like `plist-get' and `plist-put', except that they compare
-the property name using `equal' rather than `eq'.
-
-+++
+*** The function `expt' handles negative exponents differently.
+The value for `(expt A B)', if both A and B are integers and B is
+negative, is now a float.  For example: (expt 2 -2) => 0.25.
+
+*** The function `atan' now accepts an optional second argument.
+
+When called with 2 arguments, as in `(atan Y X)', `atan' returns the
+angle in radians between the vector [X, Y] and the X axis.  (This is
+equivalent to the standard C library function `atan2'.)
+
+*** New macro `with-case-table'
+
+This executes the body with the case table temporarily set to a given
+case table.
+
+*** New macro `with-local-quit' temporarily allows quitting.
+
+A quit inside the body of `with-local-quit' is caught by the
+`with-local-quit' form itself, but another quit will happen later once
+the code that has inhibited quitting exits.
+
+This is for use around potentially blocking or long-running code
+inside timer functions and `post-command-hook' functions.
+
+*** New macro `define-obsolete-function-alias'.
+
+This combines `defalias' and `make-obsolete'.
+
+*** New macro `eval-at-startup' specifies expressions to
+evaluate when Emacs starts up.  If this is done after startup,
+it evaluates those expressions immediately.
+
+This is useful in packages that can be preloaded.
+
+*** New function `macroexpand-all' expands all macros in a form.
+
+It is similar to the Common-Lisp function of the same name.
+One difference is that it guarantees to return the original argument
+if no expansion is done, which can be tested using `eq'.
+
+*** A function or macro's doc string can now specify the calling pattern.
+
+You put this info in the doc string's last line.  It should be
+formatted so as to match the regexp "\n\n(fn .*)\\'".  If you don't
+specify this explicitly, Emacs determines it from the actual argument
+names.  Usually that default is right, but not always.
+
 *** New variable `print-continuous-numbering'.
 
 When this is non-nil, successive calls to print functions use a single
@@ -4028,87 +3630,19 @@
 When you bind `print-continuous-numbering' to t, you should
 also bind `print-number-table' to nil.
 
-+++
-*** New function `macroexpand-all' expands all macros in a form.
-
-It is similar to the Common-Lisp function of the same name.
-One difference is that it guarantees to return the original argument
-if no expansion is done, which can be tested using `eq'.
-
-+++
-*** The function `atan' now accepts an optional second argument.
-
-When called with 2 arguments, as in `(atan Y X)', `atan' returns the
-angle in radians between the vector [X, Y] and the X axis.  (This is
-equivalent to the standard C library function `atan2'.)
-
-+++
-*** A function or macro's doc string can now specify the calling pattern.
-
-You put this info in the doc string's last line.  It should be
-formatted so as to match the regexp "\n\n(fn .*)\\'".  If you don't
-specify this explicitly, Emacs determines it from the actual argument
-names.  Usually that default is right, but not always.
-
-+++
-*** New macro `with-local-quit' temporarily allows quitting.
-
-A quit inside the body of `with-local-quit' is caught by the
-`with-local-quit' form itself, but another quit will happen later once
-the code that has inhibited quitting exits.
-
-This is for use around potentially blocking or long-running code
-inside timer functions and `post-command-hook' functions.
-
-+++
-*** New macro `define-obsolete-function-alias'.
-
-This combines `defalias' and `make-obsolete'.
-
-+++
-*** New macro `with-case-table'
-
-This executes the body with the case table temporarily set to a given
-case table.
-
-+++
-*** New function `unsafep' determines whether a Lisp form is safe.
-
-It returns nil if the given Lisp form can't possibly do anything
-dangerous; otherwise it returns a reason why the form might be unsafe
-(calls unknown function, alters global variable, etc.).
-
-+++
-*** New macro `eval-at-startup' specifies expressions to
-evaluate when Emacs starts up.  If this is done after startup,
-it evaluates those expressions immediately.
-
-This is useful in packages that can be preloaded.
-
-+++
 *** `list-faces-display' takes an optional argument, REGEXP.
 
 If it is non-nil, the function lists only faces matching this regexp.
 
-+++
-*** New functions `string-or-null-p' and `booleanp'.
-
-`string-or-null-p' returns non-nil iff OBJECT is a string or nil.
-`booleanp' returns non-nil iff OBJECT is t or nil.
-
-+++
 *** New hook `command-error-function'.
 
 By setting this variable to a function, you can control
 how the editor command loop shows the user an error message.
 
-+++
-*** `debug-on-entry' accepts primitive functions that are not special forms
-now.
+*** `debug-on-entry' accepts primitive functions that are not special forms.
 
 ** Lisp code indentation features:
 
-+++
 *** The `defmacro' form can contain indentation and edebug declarations.
 
 These declarations specify how to indent the macro calls in Lisp mode
@@ -4127,12 +3661,10 @@
 	equivalent to writing a `def-edebug-spec' for the macro,
 	but this is cleaner.)
 
----
 *** cl-indent now allows customization of Indentation of backquoted forms.
 
 See the new user option `lisp-backquote-indentation'.
 
----
 *** cl-indent now handles indentation of simple and extended `loop' forms.
 
 The new user options `lisp-loop-keyword-indentation',
@@ -4140,7 +3672,6 @@
 be used to customize the indentation of keywords and forms in loop
 forms.
 
-+++
 ** Variable aliases:
 
 *** New function: defvaralias ALIAS-VAR BASE-VAR [DOCSTRING]
@@ -4153,6 +3684,9 @@
 DOCSTRING, if present, is the documentation for ALIAS-VAR; else it has
 the same documentation as BASE-VAR.
 
+*** The macro `define-obsolete-variable-alias' combines `defvaralias' and
+`make-obsolete-variable'.
+
 *** New function: indirect-variable VARIABLE
 
 This function returns the variable at the end of the chain of aliases
@@ -4162,64 +3696,37 @@
 It might be noteworthy that variables aliases work for all kinds of
 variables, including buffer-local and frame-local variables.
 
-+++
-*** The macro `define-obsolete-variable-alias' combines `defvaralias' and
-`make-obsolete-variable'.
-
 ** defcustom changes:
 
-+++
 *** The package-version keyword has been added to provide
 `customize-changed-options' functionality to packages in the future.
 Developers who make use of this keyword must also update the new
 variable `customize-package-emacs-version-alist'.
 
-+++
 *** The new customization type `float' requires a floating point number.
 
 ** String changes:
 
-+++
-*** The escape sequence \s is now interpreted as a SPACE character.
-
-Exception: In a character constant, if it is followed by a `-' in a
-character constant (e.g. ?\s-A), it is still interpreted as the super
-modifier.  In strings, \s is always interpreted as a space.
-
-+++
 *** A hex escape in a string constant forces the string to be multibyte.
 
-+++
 *** An octal escape in a string constant forces the string to be unibyte.
 
-+++
+*** New function `string-to-multibyte' converts a unibyte string to a
+multibyte string with the same individual character codes.
+
 *** `split-string' now includes null substrings in the returned list if
 the optional argument SEPARATORS is non-nil and there are matches for
 SEPARATORS at the beginning or end of the string.  If SEPARATORS is
 nil, or if the new optional third argument OMIT-NULLS is non-nil, all
 empty matches are omitted from the returned list.
 
-+++
-*** New function `string-to-multibyte' converts a unibyte string to a
-multibyte string with the same individual character codes.
-
-+++
-*** New function `substring-no-properties' returns a substring without
-text properties.
-
-+++
 *** The new function `assoc-string' replaces `assoc-ignore-case' and
 `assoc-ignore-representation', which are still available, but have
 been declared obsolete.
 
-+++
-*** New syntax: \uXXXX and \UXXXXXXXX specify Unicode code points in hex.
-Use "\u0428" to specify a string consisting of CYRILLIC CAPITAL LETTER SHA,
-or "\U0001D6E2" to specify one consisting of MATHEMATICAL ITALIC CAPITAL
-ALPHA (the latter is greater than #xFFFF and thus needs the longer
-syntax).  Also available for characters.
-
-+++
+*** New function `substring-no-properties' returns a substring without
+text properties.
+
 ** Displaying warnings to the user.
 
 See the functions `warn' and `display-warning', or the Lisp Manual.
@@ -4227,7 +3734,6 @@
 facility is much better than using `message', since it displays
 warnings in a separate window.
 
-+++
 ** Progress reporters.
 
 These provide a simple and uniform way for commands to present
@@ -4239,85 +3745,70 @@
 
 ** Buffer positions:
 
-+++
 *** Function `compute-motion' now calculates the usable window
 width if the WIDTH argument is nil.  If the TOPOS argument is nil,
 the usable window height and width is used.
 
-+++
 *** The `line-move', `scroll-up', and `scroll-down' functions will now
 modify the window vscroll to scroll through display rows that are
 taller that the height of the window, for example in the presence of
 large images.  To disable this feature, bind the new variable
 `auto-window-vscroll' to nil.
 
-+++
 *** The argument to `forward-word', `backward-word' is optional.
 
 It defaults to 1.
 
-+++
 *** Argument to `forward-to-indentation' and `backward-to-indentation' is optional.
 
 It defaults to 1.
 
-+++
+*** `field-beginning' and `field-end' take new optional argument, LIMIT.
+
+This argument tells them not to search beyond LIMIT.  Instead they
+give up and return LIMIT.
+
+*** New function `window-line-height' is an efficient way to get
+information about a specific text line in a window provided that the
+window's display is up-to-date.
+
+*** New function `line-number-at-pos' returns the line number of a position.
+
+It an optional buffer position argument that defaults to point.
+
+*** Function `pos-visible-in-window-p' now returns the pixel coordinates
+and partial visibility state of the corresponding row, if the PARTIALLY
+arg is non-nil.
+
+*** New functions `posn-at-point' and `posn-at-x-y' return
+click-event-style position information for a given visible buffer
+position or for a given window pixel coordinate.
+
 *** New function `mouse-on-link-p' tests if a position is in a clickable link.
 
 This is the function used by the new `mouse-1-click-follows-link'
 functionality.
 
-+++
-*** New function `line-number-at-pos' returns the line number of a position.
-
-It an optional buffer position argument that defaults to point.
-
-+++
-*** `field-beginning' and `field-end' take new optional argument, LIMIT.
-
-This argument tells them not to search beyond LIMIT.  Instead they
-give up and return LIMIT.
-
-+++
-*** Function `pos-visible-in-window-p' now returns the pixel coordinates
-and partial visibility state of the corresponding row, if the PARTIALLY
-arg is non-nil.
-
-+++
-*** New function `window-line-height' is an efficient way to get
-information about a specific text line in a window provided that the
-window's display is up-to-date.
-
-+++
-*** New functions `posn-at-point' and `posn-at-x-y' return
-click-event-style position information for a given visible buffer
-position or for a given window pixel coordinate.
-
 ** Text modification:
 
-+++
 *** The new function `buffer-chars-modified-tick' returns a buffer's
 tick counter for changes to characters.  Each time text in that buffer
 is inserted or deleted, the character-change counter is updated to the
 tick counter (`buffer-modified-tick').  Text property changes leave it
 unchanged.
 
-+++
 *** The new function `insert-for-yank' normally works like `insert', but
 removes the text properties in the `yank-excluded-properties' list
 and handles the `yank-handler' text property.
 
-+++
 *** The new function `insert-buffer-substring-as-yank' is like
 `insert-for-yank' except that it gets the text from another buffer as
 in `insert-buffer-substring'.
 
-+++
 *** The new function `insert-buffer-substring-no-properties' is like
 `insert-buffer-substring', but removes all text properties from the
 inserted substring.
 
-+++
 *** The new function `filter-buffer-substring' extracts a buffer
 substring, passes it through a set of filter functions, and returns
 the filtered substring.  Use it instead of `buffer-substring' or
@@ -4329,33 +3820,27 @@
 `buffer-substring-filters' to remove soft newlines from the copied
 text.
 
-+++
 *** Function `translate-region' accepts also a char-table as TABLE
 argument.
 
-+++
 *** The new translation table `translation-table-for-input'
 is used for customizing self-insertion.  The character to
 be inserted is translated through it.
 
----
 *** Text clones.
 
 The new function `text-clone-create'.  Text clones are chunks of text
 that are kept identical by transparently propagating changes from one
 clone to the other.
 
----
 *** The function `insert-string' is now obsolete.
 
 ** Filling changes.
 
-+++
 *** In determining an adaptive fill prefix, Emacs now tries the function in
 `adaptive-fill-function' _before_ matching the buffer line against
 `adaptive-fill-regexp' rather than _after_ it.
 
-+++
 ** Atomic change groups.
 
 To perform some changes in the current buffer "atomically" so that
@@ -4415,21 +3900,17 @@
 
 ** Buffer-related changes:
 
----
-*** `list-buffers-noselect' now takes an additional argument, BUFFER-LIST.
-
-If it is non-nil, it specifies which buffers to list.
-
-+++
-*** `kill-buffer-hook' is now a permanent local.
-
-+++
 *** The new function `buffer-local-value' returns the buffer-local
 binding of VARIABLE (a symbol) in buffer BUFFER.  If VARIABLE does not
 have a buffer-local binding in buffer BUFFER, it returns the default
 value of VARIABLE instead.
 
----
+*** `list-buffers-noselect' now takes an additional argument, BUFFER-LIST.
+
+If it is non-nil, it specifies which buffers to list.
+
+*** `kill-buffer-hook' is now a permanent local.
+
 *** The function `frame-or-buffer-changed-p' now lets you maintain
 various status records in parallel.
 
@@ -4449,7 +3930,6 @@
 for compatibility, an internal variable which exists only for this
 purpose.
 
-+++
 *** The function `read-buffer' follows the convention for reading from
 the minibuffer with a default value: if DEF is non-nil, the minibuffer
 prompt provided in PROMPT is edited to show the default value provided
@@ -4457,12 +3937,10 @@
 
 ** Searching and matching changes:
 
-+++
 *** New function `looking-back' checks whether a regular expression matches
 the text before point.  Specifying the LIMIT argument bounds how far
 back the match can start; this is a way to keep it from taking too long.
 
-+++
 *** The new variable `search-spaces-regexp' controls how to search
 for spaces in a regular expression.  If it is non-nil, it should be a
 regular expression, and any series of spaces stands for that regular
@@ -4471,36 +3949,29 @@
 Spaces inside of constructs such as `[..]' and inside loops such as
 `*', `+', and `?' are never replaced with `search-spaces-regexp'.
 
-+++
 *** New regular expression operators, `\_<' and `\_>'.
 
 These match the beginning and end of a symbol.  A symbol is a
 non-empty sequence of either word or symbol constituent characters, as
 specified by the syntax table.
 
----
-*** rx.el has new corresponding `symbol-start' and `symbol-end' elements.
-
-+++
 *** `skip-chars-forward' and `skip-chars-backward' now handle
 character classes such as `[:alpha:]', along with individual
 characters and ranges.
 
----
 *** In `replace-match', the replacement text no longer inherits
 properties from surrounding text.
 
-+++
 *** The list returned by `(match-data t)' now has the buffer as a final
 element, if the last match was on a buffer.  `set-match-data'
 accepts such a list for restoring the match state.
 
-+++
 *** Functions `match-data' and `set-match-data' now have an optional
 argument `reseat'.  When non-nil, all markers in the match data list
 passed to these functions will be reseated to point to nowhere.
 
-+++
+*** rx.el has new corresponding `symbol-start' and `symbol-end' elements.
+
 *** The default value of `sentence-end' is now defined using the new
 variable `sentence-end-without-space', which contains such characters
 that end a sentence without following spaces.
@@ -4513,7 +3984,6 @@
 
 ** Undo changes:
 
-+++
 *** `buffer-undo-list' allows programmable elements.
 
 These elements have the form (apply FUNNAME . ARGS), where FUNNAME is
@@ -4524,13 +3994,13 @@
 which indicates that the change which took place was limited to the
 range BEG...END and increased the buffer size by DELTA.
 
-+++
 *** If the buffer's undo list for the current command gets longer than
 `undo-outer-limit', garbage collection empties it.  This is to prevent
 it from using up the available memory and choking Emacs.
 
-+++
-** New `yank-handler' text property can be used to control how
+** Killing and yanking changes:
+
+*** New `yank-handler' text property can be used to control how
 previously killed text on the kill ring is reinserted.
 
 The value of the `yank-handler' property must be a list with one to four
@@ -4574,70 +4044,23 @@
 
 ** Syntax table changes:
 
-+++
-*** The macro `with-syntax-table' no longer copies the syntax table.
-
-+++
+*** The new function `syntax-ppss' provides an efficient way to find the
+current syntactic context at point.
+
 *** The new function `syntax-after' returns the syntax code
 of the character after a specified buffer position, taking account
 of text properties as well as the character code.
 
-+++
 *** `syntax-class' extracts the class of a syntax code (as returned
 by `syntax-after').
 
-+++
-*** The new function `syntax-ppss' provides an efficient way to find the
-current syntactic context at point.
+*** The macro `with-syntax-table' no longer copies the syntax table.
 
 ** File operation changes:
 
-+++
 *** New vars `exec-suffixes' and `load-suffixes' used when
 searching for an executable or an Emacs Lisp file.
 
-+++
-*** The new primitive `set-file-times' sets a file's access and
-modification times.  Magic file name handlers can handle this
-operation.
-
-+++
-*** The new function `file-remote-p' tests a file name and returns
-non-nil if it specifies a remote file (one that Emacs accesses using
-its own special methods and not directly through the file system).
-The value in that case is an identifier for the remote file system.
-
-+++
-*** `buffer-auto-save-file-format' is the new name for what was
-formerly called `auto-save-file-format'.  It is now a permanent local.
-
-+++
-*** Functions `file-name-sans-extension' and `file-name-extension' now
-ignore the leading dots in file names, so that file names such as
-`.emacs' are treated as extensionless.
-
-+++
-*** `visited-file-modtime' and `calendar-time-from-absolute' now return
-a list of two integers, instead of a cons.
-
-+++
-*** `file-chase-links' now takes an optional second argument LIMIT which
-specifies the maximum number of links to chase through.  If after that
-many iterations the file name obtained is still a symbolic link,
-`file-chase-links' returns it anyway.
-
-+++
-*** The new hook `before-save-hook' is invoked by `basic-save-buffer'
-before saving buffers.  This allows packages to perform various final
-tasks.  For example, it can be used by the copyright package to make
-sure saved files have the current year in any copyright headers.
-
-+++
-*** If `buffer-save-without-query' is non-nil in some buffer,
-`save-some-buffers' will always save that buffer without asking (if
-it's modified).
-
-+++
 *** New function `locate-file' searches for a file in a list of directories.
 `locate-file' accepts a name of a file to search (a string), and two
 lists: a list of directories to search in and a list of suffixes to
@@ -4650,7 +4073,35 @@
 `exec-suffixes' is OS-dependant, so this function will find
 executables without polluting Lisp code with OS dependencies.
 
----
+*** The new function `file-remote-p' tests a file name and returns
+non-nil if it specifies a remote file (one that Emacs accesses using
+its own special methods and not directly through the file system).
+The value in that case is an identifier for the remote file system.
+
+*** The new hook `before-save-hook' is invoked by `basic-save-buffer'
+before saving buffers.  This allows packages to perform various final
+tasks.  For example, it can be used by the copyright package to make
+sure saved files have the current year in any copyright headers.
+
+*** `file-chase-links' now takes an optional second argument LIMIT which
+specifies the maximum number of links to chase through.  If after that
+many iterations the file name obtained is still a symbolic link,
+`file-chase-links' returns it anyway.
+
+*** Functions `file-name-sans-extension' and `file-name-extension' now
+ignore the leading dots in file names, so that file names such as
+`.emacs' are treated as extensionless.
+
+*** If `buffer-save-without-query' is non-nil in some buffer,
+`save-some-buffers' will always save that buffer without asking (if
+it's modified).
+
+*** `buffer-auto-save-file-format' is the new name for what was
+formerly called `auto-save-file-format'.  It is now a permanent local.
+
+*** `visited-file-modtime' and `calendar-time-from-absolute' now return
+a list of two integers, instead of a cons.
+
 *** The precedence of file name handlers has been changed.
 
 Instead of choosing the first handler that matches,
@@ -4659,7 +4110,6 @@
 handler whose (match-beginning 0) is the largest is chosen.  In case
 of ties, the old "first matched" rule applies.
 
-+++
 *** A file name handler can declare which operations it handles.
 
 You do this by putting an `operation' property on the handler name
@@ -4670,81 +4120,70 @@
 This is useful for autoloaded handlers, to prevent them from being
 autoloaded when not really necessary.
 
-+++
 *** The function `make-auto-save-file-name' is now handled by file
 name handlers.  This will be exploited for remote files mainly.
 
-+++
 *** The function `file-name-completion' accepts an optional argument
 PREDICATE, and rejects completion candidates that don't satisfy PREDICATE.
 
+*** The new primitive `set-file-times' sets a file's access and
+modification times.  Magic file name handlers can handle this
+operation.
+
 ** Input changes:
 
-+++
+*** Functions `y-or-n-p', `read-char', `read-key-sequence' and the like, that
+display a prompt but don't use the minibuffer, now display the prompt
+using the text properties (esp. the face) of the prompt string.
+
 *** The functions `read-event', `read-char', and `read-char-exclusive'
 have a new optional argument SECONDS.  If non-nil, this specifies a
 maximum time to wait for input, in seconds.  If no input arrives after
 this time elapses, the functions stop waiting and return nil.
 
-+++
 *** An interactive specification can now use the code letter `U' to get
 the up-event that was discarded in case the last key sequence read for a
 previous `k' or `K' argument was a down-event; otherwise nil is used.
 
-+++
 *** The new interactive-specification `G' reads a file name
 much like `F', but if the input is a directory name (even defaulted),
 it returns just the directory name.
 
----
-*** Functions `y-or-n-p', `read-char', `read-key-sequence' and the like, that
-display a prompt but don't use the minibuffer, now display the prompt
-using the text properties (esp. the face) of the prompt string.
-
-+++
 *** (while-no-input BODY...) runs BODY, but only so long as no input
 arrives.  If the user types or clicks anything, BODY stops as if a
 quit had occurred.  `while-no-input' returns the value of BODY, if BODY
 finishes.  It returns nil if BODY was aborted by a quit, and t if
 BODY was aborted by arrival of input.
 
-+++
 *** `recent-keys' now returns the last 300 keys.
 
 ** Minibuffer changes:
 
-+++
 *** The new function `minibufferp' returns non-nil if its optional
 buffer argument is a minibuffer.  If the argument is omitted, it
 defaults to the current buffer.
 
-+++
 *** New function `minibuffer-selected-window' returns the window which
 was selected when entering the minibuffer.
 
-+++
 *** The `read-file-name' function now takes an additional argument which
 specifies a predicate which the file name read must satisfy.  The
 new variable `read-file-name-predicate' contains the predicate argument
 while reading the file name from the minibuffer; the predicate in this
 variable is used by read-file-name-internal to filter the completion list.
 
----
 *** The new variable `read-file-name-function' can be used by Lisp code
 to override the built-in `read-file-name' function.
 
-+++
 *** The new variable `read-file-name-completion-ignore-case' specifies
 whether completion ignores case when reading a file name with the
 `read-file-name' function.
 
-+++
 *** The new function `read-directory-name' is for reading a directory name.
 
 It is like `read-file-name' except that the defaulting works better
 for directories, and completion inside it shows only directories.
 
-+++
 *** The new variable `history-add-new-input' specifies whether to add new
 elements in history.  If set to nil, minibuffer reading functions don't
 add new elements to the history list, so it is possible to do this
@@ -4752,19 +4191,16 @@
 
 ** Completion changes:
 
-+++
 *** The new function `minibuffer-completion-contents' returns the contents
 of the minibuffer just before point.  That is what completion commands
 operate on.
 
-+++
 *** The functions `all-completions' and `try-completion' now accept lists
 of strings as well as hash-tables additionally to alists, obarrays
 and functions.  Furthermore, the function `test-completion' is now
 exported to Lisp.  The keys in alists and hash tables can be either
 strings or symbols, which are automatically converted with to strings.
 
-+++
 *** The new macro `dynamic-completion-table' supports using functions
 as a dynamic completion table.
 
@@ -4777,7 +4213,6 @@
 minibuffer, FUN will be called in the buffer from which the minibuffer was
 entered.  `dynamic-completion-table' then computes the completion.
 
-+++
 *** The new macro `lazy-completion-table' initializes a variable
 as a lazy completion table.
 
@@ -4790,18 +4225,21 @@
 from which the minibuffer was entered.  The return value of
 `lazy-completion-table' must be used to initialize the value of VAR.
 
-+++
+** Abbrev changes:
+
+*** `define-abbrev' now accepts an optional argument SYSTEM-FLAG.
+
+If non-nil, this marks the abbrev as a "system" abbrev, which means
+that it won't be stored in the user's abbrevs file if he saves the
+abbrevs.  Major modes that predefine some abbrevs should always
+specify this flag.
+
+*** The new function `copy-abbrev-table' copies an abbrev table.
+
+It returns a new abbrev table that is a copy of a given abbrev table.
+
 ** Enhancements to keymaps.
 
-*** New keymaps for typing file names
-
-Two new keymaps, `minibuffer-local-filename-completion-map'  and
-`minibuffer-local-must-match-filename-map', apply whenever
-Emacs reads a file name in the minibuffer.  These key maps override
-the usual binding of SPC to `minibuffer-complete-word' (so that file
-names with embedded spaces could be typed without the need to quote
-the spaces).
-
 *** Cleaner way to enter key sequences.
 
 You can enter a constant key sequence in a more natural format, the
@@ -4867,6 +4305,26 @@
   command before remapping.  It is equal to `this-command' when the
   command was not remapped.
 
+*** The definition of a key-binding passed to define-key can use XEmacs-style
+key-sequences, such as [(control a)].
+
+*** New keymaps for typing file names
+
+Two new keymaps, `minibuffer-local-filename-completion-map'  and
+`minibuffer-local-must-match-filename-map', apply whenever
+Emacs reads a file name in the minibuffer.  These key maps override
+the usual binding of SPC to `minibuffer-complete-word' (so that file
+names with embedded spaces could be typed without the need to quote
+the spaces).
+
+*** New function `current-active-maps' returns a list of currently
+active keymaps.
+
+*** New function `describe-buffer-bindings' inserts the list of all
+defined keys and their definitions.
+
+*** New function `keymap-prompt' returns the prompt string of a keymap.
+
 *** If text has a `keymap' property, that keymap takes precedence
 over minor mode keymaps.
 
@@ -4880,21 +4338,8 @@
 position be determined from the key sequence itself, it is also
 possible to specify it with an optional argument explicitly.
 
-*** Dense keymaps now handle inheritance correctly.
-
-Previously a dense keymap would hide all of the simple-char key
-bindings of the parent keymap.
-
 *** `define-key-after' now accepts keys longer than 1.
 
-*** New function `current-active-maps' returns a list of currently
-active keymaps.
-
-*** New function `describe-buffer-bindings' inserts the list of all
-defined keys and their definitions.
-
-*** New function `keymap-prompt' returns the prompt string of a keymap.
-
 *** (map-keymap FUNCTION KEYMAP) applies the function to each binding
 in the keymap.
 
@@ -4904,54 +4349,13 @@
 keymap alist separate from `minor-mode-map-alist' by adding their
 keymap alist to this list.
 
-*** The definition of a key-binding passed to define-key can use XEmacs-style
-key-sequences, such as [(control a)].
-
-** Abbrev changes:
-
-+++
-*** The new function `copy-abbrev-table' copies an abbrev table.
-
-It returns a new abbrev table that is a copy of a given abbrev table.
-
-+++
-*** `define-abbrev' now accepts an optional argument SYSTEM-FLAG.
-
-If non-nil, this marks the abbrev as a "system" abbrev, which means
-that it won't be stored in the user's abbrevs file if he saves the
-abbrevs.  Major modes that predefine some abbrevs should always
-specify this flag.
-
-+++
+*** Dense keymaps now handle inheritance correctly.
+
+Previously a dense keymap would hide all of the simple-char key
+bindings of the parent keymap.
+
 ** Enhancements to process support
 
-*** Function `list-processes' now has an optional argument; if non-nil,
-it lists only the processes whose query-on-exit flag is set.
-
-*** New fns `set-process-query-on-exit-flag' and `process-query-on-exit-flag'.
-
-These replace the old function `process-kill-without-query'.  That
-function is still supported, but new code should use the new
-functions.
-
-*** Function `signal-process' now accepts a process object or process
-name in addition to a process id to identify the signaled process.
-
-*** Processes now have an associated property list where programs can
-maintain process state and other per-process related information.
-
-Use the new functions `process-get' and `process-put' to access, add,
-and modify elements on this property list.  Use the new functions
-`process-plist' and `set-process-plist' to access and replace the
-entire property list of a process.
-
-*** Function `accept-process-output' has a new optional fourth arg
-JUST-THIS-ONE.  If non-nil, only output from the specified process
-is handled, suspending output from other processes.  If value is an
-integer, also inhibit running timers.  This feature is generally not
-recommended, but may be necessary for specific applications, such as
-speech synthesis.
-
 *** Adaptive read buffering of subprocess output.
 
 On some systems, when Emacs reads the output from a subprocess, the
@@ -4962,6 +4366,23 @@
 from such processes, allowing them to produce more output before
 Emacs tries to read it.
 
+*** Processes now have an associated property list where programs can
+maintain process state and other per-process related information.
+
+Use the new functions `process-get' and `process-put' to access, add,
+and modify elements on this property list.  Use the new functions
+`process-plist' and `set-process-plist' to access and replace the
+entire property list of a process.
+
+*** Function `list-processes' now has an optional argument; if non-nil,
+it lists only the processes whose query-on-exit flag is set.
+
+*** New fns `set-process-query-on-exit-flag' and `process-query-on-exit-flag'.
+
+These replace the old function `process-kill-without-query'.  That
+function is still supported, but new code should use the new
+functions.
+
 *** The new function `call-process-shell-command'.
 
 This executes a shell command synchronously in a separate process.
@@ -4970,6 +4391,16 @@
 obeys file handlers.  The file handler is chosen based on
 `default-directory'.
 
+*** Function `signal-process' now accepts a process object or process
+name in addition to a process id to identify the signaled process.
+
+*** Function `accept-process-output' has a new optional fourth arg
+JUST-THIS-ONE.  If non-nil, only output from the specified process
+is handled, suspending output from other processes.  If value is an
+integer, also inhibit running timers.  This feature is generally not
+recommended, but may be necessary for specific applications, such as
+speech synthesis.
+
 *** A process filter function gets the output as multibyte string
 if the process specifies t for its filter's multibyteness.
 
@@ -4989,7 +4420,6 @@
 Previously, it was converted to multibyte by `string-as-multibyte',
 which was not compatible with the behavior of file reading.
 
-+++
 ** Enhanced networking support.
 
 *** The new `make-network-process' function makes network connections.
@@ -5013,19 +4443,6 @@
 
 *** The old `open-network-stream' now uses `make-network-process'.
 
-*** New functions `process-datagram-address', `set-process-datagram-address'.
-
-These functions are used with datagram-based network processes to get
-and set the current address of the remote partner.
-
-*** New function `format-network-address'.
-
-This function reformats the Lisp representation of a network address
-to a printable string.  For example, an IP address A.B.C.D and port
-number P is represented as a five element vector [A B C D P], and the
-printable string returned for this vector is "A.B.C.D:P".  See the doc
-string for other formatting options.
-
 *** `process-contact' has an optional KEY argument.
 
 Depending on this argument, you can get the complete list of network
@@ -5042,6 +4459,14 @@
 stopped state.  For a client process, no input is received in the
 stopped state.
 
+*** New function `format-network-address'.
+
+This function reformats the Lisp representation of a network address
+to a printable string.  For example, an IP address A.B.C.D and port
+number P is represented as a five element vector [A B C D P], and the
+printable string returned for this vector is "A.B.C.D:P".  See the doc
+string for other formatting options.
+
 *** New function `network-interface-list'.
 
 This function returns a list of network interface names and their
@@ -5052,6 +4477,11 @@
 This function returns the network address, hardware address, current
 status, and other information about a specific network interface.
 
+*** New functions `process-datagram-address', `set-process-datagram-address'.
+
+These functions are used with datagram-based network processes to get
+and set the current address of the remote partner.
+
 *** Deleting a network process with `delete-process' calls the sentinel.
 
 The status message passed to the sentinel for a deleted network
@@ -5061,13 +4491,6 @@
 
 ** Using window objects:
 
-+++
-*** New function `window-body-height'.
-
-This is like `window-height' but does not count the mode line or the
-header line.
-
-+++
 *** You can now make a window as short as one line.
 
 A window that is just one line tall does not display either a mode
@@ -5076,53 +4499,58 @@
 cannot display both a mode line and a header line at once; if the
 variables call for both, only the mode line actually appears.
 
-+++
 *** The new function `window-inside-edges' returns the edges of the
 actual text portion of the window, not including the scroll bar or
 divider line, the fringes, the display margins, the header line and
 the mode line.
 
-+++
 *** The new functions `window-pixel-edges' and `window-inside-pixel-edges'
 return window edges in units of pixels, rather than columns and lines.
 
-+++
+*** New function `window-body-height'.
+
+This is like `window-height' but does not count the mode line or the
+header line.
+
+*** The new function `adjust-window-trailing-edge' moves the right
+or bottom edge of a window.  It does not move other window edges.
+
 *** The new macro `with-selected-window' temporarily switches the
 selected window without impacting the order of `buffer-list'.
 It saves and restores the current buffer, too.
 
-+++
 *** `select-window' takes an optional second argument NORECORD.
 
 This is like `switch-to-buffer'.
 
-+++
 *** `save-selected-window' now saves and restores the selected window
 of every frame.  This way, it restores everything that can be changed
 by calling `select-window'.  It also saves and restores the current
 buffer.
 
-+++
 *** `set-window-buffer' has an optional argument KEEP-MARGINS.
 
 If non-nil, that says to preserve the window's current margin, fringe,
 and scroll-bar settings.
 
-+++
 *** The new function `window-tree' returns a frame's window tree.
 
-+++
 *** The functions `get-lru-window' and `get-largest-window' take an optional
 argument `dedicated'.  If non-nil, those functions do not ignore
 dedicated windows.
 
-+++
-*** The new function `adjust-window-trailing-edge' moves the right
-or bottom edge of a window.  It does not move other window edges.
-
-+++
 ** Customizable fringe bitmaps
 
+*** There are new display properties, `left-fringe' and `right-fringe',
+that can be used to show a specific bitmap in the left or right fringe
+bitmap of the display line.
+
+Format is `display (left-fringe BITMAP [FACE])', where BITMAP is a
+symbol identifying a fringe bitmap, either built-in or defined with
+`define-fringe-bitmap', and FACE is an optional face name to be used
+for displaying the bitmap instead of the default `fringe' face.
+When specified, FACE is automatically merged with the `fringe' face.
+
 *** New buffer-local variables `fringe-indicator-alist' and
 `fringe-cursor-alist' maps between logical (internal) fringe indicator
 and cursor symbols and the actual fringe bitmaps to be displayed.
@@ -5141,22 +4569,11 @@
 with the `fringe' face, so normally, the face should only specify the
 foreground color of the bitmap.
 
-*** There are new display properties, `left-fringe' and `right-fringe',
-that can be used to show a specific bitmap in the left or right fringe
-bitmap of the display line.
-
-Format is `display (left-fringe BITMAP [FACE])', where BITMAP is a
-symbol identifying a fringe bitmap, either built-in or defined with
-`define-fringe-bitmap', and FACE is an optional face name to be used
-for displaying the bitmap instead of the default `fringe' face.
-When specified, FACE is automatically merged with the `fringe' face.
-
 *** New function `fringe-bitmaps-at-pos' returns the current fringe
 bitmaps in the display line at a given buffer position.
 
 ** Other window fringe features:
 
-+++
 *** Controlling the default left and right fringe widths.
 
 The default left and right fringe widths for all windows of a frame
@@ -5176,7 +4593,6 @@
 of the currently defined fringe bitmaps.  The width of the built-in
 fringe bitmaps is 8 pixels.
 
-+++
 *** Per-window fringe and scrollbar settings
 
 **** Windows can now have their own individual fringe widths and
@@ -5210,25 +4626,20 @@
 
 ** Redisplay features:
 
-+++
 *** `sit-for' can now be called with args (SECONDS &optional NODISP).
 
-+++
 *** Iconifying or deiconifying a frame no longer makes sit-for return.
 
-+++
 *** New function `redisplay' causes an immediate redisplay if no input is
 available, equivalent to (sit-for 0).  The call (redisplay t) forces
 an immediate redisplay even if input is pending.
 
-+++
 *** New function `force-window-update' can initiate a full redisplay of
 one or all windows.  Normally, this is not needed as changes in window
 contents are detected automatically.  However, certain implicit
 changes to mode lines, header lines, or display properties may require
 forcing an explicit window update.
 
-+++
 *** (char-displayable-p CHAR) returns non-nil if Emacs ought to be able
 to display CHAR.  More precisely, if the selected frame's fontset has
 a font to display the character set that CHAR belongs to.
@@ -5236,7 +4647,6 @@
 Fontsets can specify a font on a per-character basis; when the fontset
 does that, this value cannot be accurate.
 
-+++
 *** You can define multiple overlay arrows via the new
 variable `overlay-arrow-variable-list'.
 
@@ -5250,7 +4660,6 @@
 If either property is not set, the default `overlay-arrow-string' or
 'overlay-arrow-fringe-bitmap' will be used.
 
-+++
 *** New `line-height' and `line-spacing' properties for newline characters
 
 A newline can now have `line-height' and `line-spacing' text or overlay
@@ -5291,11 +4700,9 @@
 If the `line-spacing' property is a float or cons, the line spacing
 is calculated as specified above for the `line-height' property.
 
-+++
 *** The buffer local `line-spacing' variable can now have a float value,
 which is used as a height relative to the default frame line height.
 
-+++
 *** Enhancements to stretch display properties
 
 The display property stretch specification form `(space PROPS)', where
@@ -5352,17 +4759,14 @@
 The form `(+ EXPR ...)' adds up the value of the expressions.
 The form `(- EXPR ...)' negates or subtracts the value of the expressions.
 
-+++
 *** Normally, the cursor is displayed at the end of any overlay and
 text property string that may be present at the current window
 position.  The cursor can now be placed on any character of such
 strings by giving that character a non-nil `cursor' text property.
 
-+++
 *** The display space :width and :align-to text properties are now
 supported on text terminals.
 
-+++
 *** Support for displaying image slices
 
 **** New display property (slice X Y WIDTH HEIGHT) can be used with
@@ -5374,7 +4778,6 @@
 **** New function `insert-sliced-image' inserts a given image as a
 specified number of evenly sized slices (rows x columns).
 
-+++
 *** Images can now have an associated image map via the :map property.
 
 An image map is an alist where each element has the format (AREA ID PLIST).
@@ -5397,7 +4800,6 @@
 an event is composed by combining the ID of the hot-spot with the
 mouse event, e.g. [area4 mouse-1] if the hot-spot's ID is `area4'.
 
-+++
 *** The function `find-image' now searches in etc/images/ and etc/.
 The new variable `image-load-path' is a list of locations in which to
 search for image files.  The default is to search in etc/images, then
@@ -5411,80 +4813,62 @@
 Note that all images formerly located in the lisp directory have been
 moved to etc/images.
 
-+++
 *** New function `image-load-path-for-library' returns a suitable
 search path for images relative to library. This function is useful in
 external packages to save users from having to update
 `image-load-path'.
 
-+++
 *** The new variable `max-image-size' defines the maximum size of
 images that Emacs will load and display.
 
-+++
 *** The new variable `display-mm-dimensions-alist' can be used to
 override incorrect graphical display dimensions returned by functions
 `display-mm-height' and `display-mm-width'.
 
 ** Mouse pointer features:
 
-+++ (lispref)
---- (man)
 *** The mouse pointer shape in void text areas (i.e. after the end of a
 line or below the last line in the buffer) of the text window is now
 controlled by the new variable `void-text-area-pointer'.  The default
 is to use the `arrow' (non-text) pointer.  Other choices are `text'
 (or nil), `hand', `vdrag', `hdrag', `modeline', and `hourglass'.
 
-+++
 *** The mouse pointer shape over an image can now be controlled by the
 :pointer image property.
 
-+++
 *** The mouse pointer shape over ordinary text or images can now be
 controlled/overridden via the `pointer' text property.
 
 ** Mouse event enhancements:
 
-+++
-*** Mouse events for clicks on window fringes now specify `left-fringe'
-or `right-fringe' as the area.
-
-+++
 *** All mouse events now include a buffer position regardless of where
 you clicked.  For mouse clicks in window margins and fringes, this is
 a sensible buffer position corresponding to the surrounding text.
 
-+++
-*** `posn-point' now returns buffer position for non-text area events.
-
-+++
-*** Function `mouse-set-point' now works for events outside text area.
-
-+++
-*** New function `posn-area' returns window area clicked on (nil means
-text area).
-
-+++
+*** Mouse events for clicks on window fringes now specify `left-fringe'
+or `right-fringe' as the area.
+
 *** Mouse events include actual glyph column and row for all event types
 and all areas.
 
-+++
+*** Mouse events can now indicate an image object clicked on.
+
+*** Mouse events include relative X and Y pixel coordinates relative to
+the top left corner of the object (image or character) clicked on.
+
+*** Mouse events include the pixel width and height of the object
+(image or character) clicked on.
+
+*** Function `mouse-set-point' now works for events outside text area.
+
+*** `posn-point' now returns buffer position for non-text area events.
+
+*** New function `posn-area' returns window area clicked on (nil means
+text area).
+
 *** New function `posn-actual-col-row' returns the actual glyph coordinates
 of the mouse event position.
 
-+++
-*** Mouse events can now indicate an image object clicked on.
-
-+++
-*** Mouse events include relative X and Y pixel coordinates relative to
-the top left corner of the object (image or character) clicked on.
-
-+++
-*** Mouse events include the pixel width and height of the object
-(image or character) clicked on.
-
-+++
 *** New functions 'posn-object', 'posn-object-x-y', 'posn-object-width-height'.
 
 These return the image or string object of a mouse click, the X and Y
@@ -5493,11 +4877,9 @@
 
 ** Text property and overlay changes:
 
-+++
 *** Arguments for `remove-overlays' are now optional, so that you can
 remove all overlays in the buffer with just (remove-overlays).
 
-+++
 *** New variable `char-property-alias-alist'.
 
 This variable allows you to create alternative names for text
@@ -5505,14 +4887,12 @@
 although it applies to overlays as well.  This variable was introduced
 to implement the `font-lock-face' property.
 
-+++
 *** New function `get-char-property-and-overlay' accepts the same
 arguments as `get-char-property' and returns a cons whose car is the
 return value of `get-char-property' called with those arguments and
 whose cdr is the overlay in which the property was found, or nil if
 it was found as a text property or not found at all.
 
-+++
 *** The new function `remove-list-of-text-properties'.
 
 It is like `remove-text-properties' except that it takes a list of
@@ -5520,13 +4900,11 @@
 
 ** Face changes
 
-+++
 *** The variable `facemenu-unlisted-faces' has been removed.
 Emacs has a lot more faces than in the past, and nearly all of them
 needed to be excluded.  The new variable `facemenu-listed-faces' lists
 the faces to include in the face menu.
 
-+++
 *** The new face attribute condition `min-colors' can be used to tailor
 the face color to the number of colors supported by a display, and
 define the foreground and background colors accordingly so that they
@@ -5534,7 +4912,6 @@
 is now the preferred method for defining default faces in a way that
 makes a good use of the capabilities of the display.
 
-+++
 *** New function `display-supports-face-attributes-p' can be used to test
 whether a given set of face attributes is actually displayable.
 
@@ -5542,43 +4919,30 @@
 specification language, which can be used to do this test for faces
 defined with `defface'.
 
----
 *** The special treatment of faces whose names are of the form `fg:COLOR'
 or `bg:COLOR' has been removed.  Lisp programs should use the
 `defface' facility for defining faces with specific colors, or use
 the feature of specifying the face attributes :foreground and :background
 directly in the `face' property instead of using a named face.
 
-+++
 *** The first face specification element in a defface can specify
 `default' instead of frame classification.  Then its attributes act as
 defaults that apply to all the subsequent cases (and can be overridden
 by them).
 
-+++
-*** The variable `face-font-rescale-alist' specifies how much larger
-(or smaller) font we should use.  For instance, if the value is
-'((SOME-FONTNAME-PATTERN . 1.3)) and a face requests a font of 10
-point, we actually use a font of 13 point if the font matches
-SOME-FONTNAME-PATTERN.
-
----
 *** The function `face-differs-from-default-p' now truly checks
 whether the given face displays differently from the default face or
 not (previously it did only a very cursory check).
 
-+++
 *** `face-attribute', `face-foreground', `face-background', `face-stipple'.
 
 These now accept a new optional argument, INHERIT, which controls how
 face inheritance is used when determining the value of a face
 attribute.
 
-+++
 *** New functions `face-attribute-relative-p' and `merge-face-attribute'
 help with handling relative face attributes.
 
-+++
 *** The priority of faces in an :inherit attribute face list is reversed.
 
 If a face contains an :inherit attribute with a list of faces, earlier
@@ -5587,20 +4951,23 @@
 so that :inherit face lists operate identically to face lists in text
 `face' properties.
 
----
+*** The variable `face-font-rescale-alist' specifies how much larger
+(or smaller) font we should use.  For instance, if the value is
+'((SOME-FONTNAME-PATTERN . 1.3)) and a face requests a font of 10
+point, we actually use a font of 13 point if the font matches
+SOME-FONTNAME-PATTERN.
+
 *** On terminals, faces with the :inverse-video attribute are displayed
 with swapped foreground and background colors even when one of them is
 not specified.  In previous releases of Emacs, if either foreground
 or background color was unspecified, colors were not swapped.  This
 was inconsistent with the face behavior under X.
 
----
 *** `set-fontset-font', `fontset-info', `fontset-font' now operate on
 the default fontset if the argument NAME is nil..
 
 ** Font-Lock changes:
 
-+++
 *** New special text property `font-lock-face'.
 
 This property acts like the `face' property, but it is controlled by
@@ -5608,7 +4975,6 @@
 property.  Instead, it is implemented inside font-core.el, using the
 new variable `char-property-alias-alist'.
 
-+++
 *** font-lock can manage arbitrary text-properties beside `face'.
 
 **** the FACENAME returned in `font-lock-keywords' can be a list of the
@@ -5618,7 +4984,6 @@
 **** `font-lock-extra-managed-props' can be set to make sure those
 extra properties are automatically cleaned up by font-lock.
 
----
 *** jit-lock obeys a new text-property `jit-lock-defer-multiline'.
 
 If a piece of text with that property gets contextually refontified
@@ -5645,72 +5010,62 @@
 
 ** Major mode mechanism changes:
 
-+++
-*** If new variable `auto-mode-case-fold' is set to a non-nil value,
-Emacs will perform a second case-insensitive search through
-`auto-mode-alist' if the first case-sensitive search fails.
-This means that a file FILE.TXT is opened in text-mode, and a file PROG.PY
-is opened in python-mode.  Note however, that independent of this
-setting, *.C files are usually recognized as C++ files.
-It also has no effect on systems with case-insensitive file names.
-
-+++
 *** New variable `magic-mode-alist' determines major mode for a file by
 looking at the file contents.  It takes precedence over `auto-mode-alist'.
 
-+++
+*** New variable `file-start-mode-alist' determines major mode for a file by
+looking at the file contents.  It is handled after `auto-mode-alist',
+only if `auto-mode-alist' says nothing about the file.
+
+*** XML or SGML major mode is selected when file starts with an `<?xml'
+or `<!DOCTYPE' declaration.
+
 *** An interpreter magic line (if present) takes precedence over the
 file name when setting the major mode.
 
-+++
-*** XML or SGML major mode is selected when file starts with an `<?xml'
-or `<!DOCTYPE' declaration.
-
-+++
-*** Use the new function `run-mode-hooks' to run the major mode's mode hook.
-
-+++
+*** If new variable `auto-mode-case-fold' is set to a non-nil value,
+Emacs will perform a second case-insensitive search through
+`auto-mode-alist' if the first case-sensitive search fails.  This
+means that a file FILE.TXT is opened in text-mode, and a file
+PROG.HTML is opened in html-mode.  Note however, that independent of
+this setting, *.C files are usually recognized as C++ files.  It also
+has no effect on systems with case-insensitive file names.
+
 *** All major mode functions should now run the new normal hook
 `after-change-major-mode-hook', at their very end, after the mode
 hooks.  `run-mode-hooks' does this automatically.
 
----
+*** Major modes can define `eldoc-documentation-function'
+locally to provide Eldoc functionality by some method appropriate to
+the language.
+
+*** Use the new function `run-mode-hooks' to run the major mode's mode hook.
+
+*** The new function `run-mode-hooks' and the new macro `delay-mode-hooks'
+are used by `define-derived-mode' to make sure the mode hook for the
+parent mode is run at the end of the child mode.
+
+*** `define-derived-mode' by default creates a new empty abbrev table.
+It does not copy abbrevs from the parent mode's abbrev table.
+
 *** If a major mode function has a non-nil `no-clone-indirect'
 property, `clone-indirect-buffer' signals an error if you use
 it in that buffer.
 
-+++
-*** Major modes can define `eldoc-documentation-function'
-locally to provide Eldoc functionality by some method appropriate to
-the language.
-
-+++
-*** `define-derived-mode' by default creates a new empty abbrev table.
-It does not copy abbrevs from the parent mode's abbrev table.
-
-+++
-*** The new function `run-mode-hooks' and the new macro `delay-mode-hooks'
-are used by `define-derived-mode' to make sure the mode hook for the
-parent mode is run at the end of the child mode.
-
 ** Minor mode changes:
 
-+++
 *** `define-minor-mode' now accepts arbitrary additional keyword arguments
 and simply passes them to `defcustom', if applicable.
 
-+++
-*** `minor-mode-list' now holds a list of minor mode commands.
-
-+++
-*** `define-global-minor-mode'.
+*** `define-globalized-minor-mode'.
 
 This is a new name for what was formerly called
 `easy-mmode-define-global-mode'.  The old name remains as an alias.
 
+*** `minor-mode-list' now holds a list of minor mode commands.
+
 ** Command loop changes:
 
-+++
 *** The new function `called-interactively-p' does what many people
 have mistakenly believed `interactive-p' to do: it returns t if the
 calling function was called through `call-interactively'.
@@ -5718,14 +5073,12 @@
 Only use this when you cannot solve the problem by adding a new
 INTERACTIVE argument to the command.
 
-+++
 *** The function `commandp' takes an additional optional argument.
 
 If it is non-nil, then `commandp' checks for a function that could be
 called with `call-interactively', and does not return t for keyboard
 macros.
 
-+++
 *** When a command returns, the command loop moves point out from
 within invisible text, in the same way it moves out from within text
 covered by an image or composition property.
@@ -5736,51 +5089,41 @@
 (including `goto-char', ...) whereas this new code is only run after
 `post-command-hook' and thus does not care about intermediate states.
 
-+++
 *** If a command sets `transient-mark-mode' to `only', that
 enables Transient Mark mode for the following command only.
 During that following command, the value of `transient-mark-mode'
 is `identity'.  If it is still `identity' at the end of the command,
 the next return to the command loop changes to nil.
 
-+++
 *** Both the variable and the function `disabled-command-hook' have
 been renamed to `disabled-command-function'.  The variable
 `disabled-command-hook' has been kept as an obsolete alias.
 
-+++
 *** `emacsserver' now runs `pre-command-hook' and `post-command-hook'
 when it receives a request from emacsclient.
 
-+++
 *** `current-idle-time' reports how long Emacs has been idle.
 
 ** Lisp file loading changes:
 
-+++
 *** `load-history' can now have elements of the form (t . FUNNAME),
 which means FUNNAME was previously defined as an autoload (before the
 current file redefined it).
 
-+++
 *** `load-history' now records (defun . FUNNAME) when a function is
 defined.  For a variable, it records just the variable name.
 
-+++
 *** The function `symbol-file' can now search specifically for function,
 variable or face definitions.
 
-+++
 *** `provide' and `featurep' now accept an optional second argument
 to test/provide subfeatures.  Also `provide' now checks `after-load-alist'
 and runs any code associated with the provided feature.
 
----
 *** The variable `recursive-load-depth-limit' has been deleted.
 Emacs now signals an error if the same file is loaded with more
 than 3 levels of nesting.
 
-+++
 ** Byte compiler changes:
 
 *** The byte compiler now displays the actual line and character
@@ -5817,36 +5160,65 @@
 
 *** The local variable `no-byte-compile' in Lisp files is now obeyed.
 
----
 *** When a Lisp file uses CL functions at run-time, compiling the file
 now issues warnings about these calls, unless the file performs
 (require 'cl) when loaded.
 
 ** Frame operations:
 
-+++
 *** New functions `frame-current-scroll-bars' and `window-current-scroll-bars'.
 
 These functions return the current locations of the vertical and
 horizontal scroll bars in a frame or window.
 
-+++
 *** The new function `modify-all-frames-parameters' modifies parameters
 for all (existing and future) frames.
 
-+++
 *** The new frame parameter `tty-color-mode' specifies the mode to use
 for color support on character terminal frames.  Its value can be a
 number of colors to support, or a symbol.  See the Emacs Lisp
 Reference manual for more detailed documentation.
 
-+++
 *** When using non-toolkit scroll bars with the default width,
 the `scroll-bar-width' frame parameter value is nil.
 
+** Mode line changes:
+
+*** New function `format-mode-line'.
+
+This returns the mode line or header line of the selected (or a
+specified) window as a string with or without text properties.
+
+*** The new mode-line construct `(:propertize ELT PROPS...)' can be
+used to add text properties to mode-line elements.
+
+*** The new `%i' and `%I' constructs for `mode-line-format' can be used
+to display the size of the accessible part of the buffer on the mode
+line.
+
+*** Mouse-face on mode-line (and header-line) is now supported.
+
+** Menu manipulation changes:
+
+*** To manipulate the File menu using easy-menu, you must specify the
+proper name "file".  In previous Emacs versions, you had to specify
+"files", even though the menu item itself was changed to say "File"
+several versions ago.
+
+*** The dummy function keys made by easy-menu are now always lower case.
+If you specify the menu item name "Ada", for instance, it uses `ada'
+as the "key" bound by that key binding.
+
+This is relevant only if Lisp code looks for the bindings that were
+made with easy-menu.
+
+*** `easy-menu-define' now allows you to use nil for the symbol name
+if you don't need to give the menu a name.  If you install the menu
+into other keymaps right away (MAPS is non-nil), it usually doesn't
+need to have a name.
+
 ** Mule changes:
 
-+++
 *** Already true in Emacs 21.1, but not emphasized clearly enough:
 
 Multibyte buffers can now faithfully record all 256 character codes
@@ -5862,111 +5234,67 @@
 3. For binary files where format conversion would be pointless and
 wasteful.
 
----
-*** `set-buffer-file-coding-system' now takes an additional argument,
-NOMODIFY.  If it is non-nil, it means don't mark the buffer modified.
-
-+++
 *** The new variable `auto-coding-functions' lets you specify functions
 to examine a file being visited and deduce the proper coding system
 for it.  (If the coding system is detected incorrectly for a specific
 file, you can put a `coding:' tags to override it.)
 
-+++
 *** The new variable `ascii-case-table' stores the case table for the
 ascii character set.  Language environments (such as Turkish) may
 alter the case correspondences of ASCII characters.  This variable
 saves the original ASCII case table before any such changes.
 
----
 *** The new function `merge-coding-systems' fills in unspecified aspects
 of one coding system from another coding system.
 
----
 *** New coding system property `mime-text-unsuitable' indicates that
 the coding system's `mime-charset' is not suitable for MIME text
 parts, e.g. utf-16.
 
-+++
 *** New function `decode-coding-inserted-region' decodes a region as if
 it is read from a file without decoding.
 
----
 *** New CCL functions `lookup-character' and `lookup-integer' access
 hash tables defined by the Lisp function `define-translation-hash-table'.
 
----
 *** New function `quail-find-key' returns a list of keys to type in the
 current input method to input a character.
 
-** Mode line changes:
-
-+++
-*** New function `format-mode-line'.
-
-This returns the mode line or header line of the selected (or a
-specified) window as a string with or without text properties.
-
-+++
-*** The new mode-line construct `(:propertize ELT PROPS...)' can be
-used to add text properties to mode-line elements.
-
-+++
-*** The new `%i' and `%I' constructs for `mode-line-format' can be used
-to display the size of the accessible part of the buffer on the mode
-line.
-
-+++
-*** Mouse-face on mode-line (and header-line) is now supported.
-
-** Menu manipulation changes:
-
----
-*** To manipulate the File menu using easy-menu, you must specify the
-proper name "file".  In previous Emacs versions, you had to specify
-"files", even though the menu item itself was changed to say "File"
-several versions ago.
-
----
-*** The dummy function keys made by easy-menu are now always lower case.
-If you specify the menu item name "Ada", for instance, it uses `ada'
-as the "key" bound by that key binding.
-
-This is relevant only if Lisp code looks for the bindings that were
-made with easy-menu.
-
----
-*** `easy-menu-define' now allows you to use nil for the symbol name
-if you don't need to give the menu a name.  If you install the menu
-into other keymaps right away (MAPS is non-nil), it usually doesn't
-need to have a name.
+*** `set-buffer-file-coding-system' now takes an additional argument,
+NOMODIFY.  If it is non-nil, it means don't mark the buffer modified.
 
 ** Operating system access:
 
-+++
 *** The new primitive `get-internal-run-time' returns the processor
 run time used by Emacs since start-up.
 
-+++
 *** Functions `user-uid' and `user-real-uid' now return floats if the
 user UID doesn't fit in a Lisp integer.  Function `user-full-name'
 accepts a float as UID parameter.
 
-+++
 *** New function `locale-info' accesses locale information.
 
----
 *** On MS Windows, locale-coding-system is used to interact with the OS.
 The Windows specific variable w32-system-coding-system, which was
 formerly used for that purpose is now an alias for locale-coding-system.
 
----
 *** New function `redirect-debugging-output' can be used to redirect
 debugging output on the stderr file handle to a file.
 
+** GC changes:
+
+*** New variable `gc-cons-percentage' automatically grows the GC cons threshold
+as the heap size increases.
+
+*** New variables `gc-elapsed' and `gcs-done' provide extra information
+on garbage collection.
+
+*** The normal hook `post-gc-hook' is run at the end of garbage collection.
+
+The hook is run with GC inhibited, so use it with care.
+
 ** Miscellaneous:
 
-+++
 *** A number of hooks have been renamed to better follow the conventions:
 
 `find-file-hooks' to `find-file-hook',
@@ -5979,50 +5307,29 @@
 
 In each case the old name remains as an alias for the moment.
 
-+++
 *** Variable `local-write-file-hooks' is marked obsolete.
 
 Use the LOCAL arg of `add-hook'.
 
----
 *** New function `x-send-client-message' sends a client message when
 running under X.
-
-** GC changes:
-
-+++
-*** New variable `gc-cons-percentage' automatically grows the GC cons threshold
-as the heap size increases.
-
-+++
-*** New variables `gc-elapsed' and `gcs-done' provide extra information
-on garbage collection.
-
-+++
-*** The normal hook `post-gc-hook' is run at the end of garbage collection.
-
-The hook is run with GC inhibited, so use it with care.
 
 * New Packages for Lisp Programming in Emacs 22.1
 
-+++
 ** The new library button.el implements simple and fast `clickable
 buttons' in Emacs buffers.  Buttons are much lighter-weight than the
 `widgets' implemented by widget.el, and can be used by lisp code that
 doesn't require the full power of widgets.  Emacs uses buttons for
 such things as help and apropos buffers.
 
----
 ** The new library tree-widget.el provides a widget to display a set
 of hierarchical data as an outline.  For example, the tree-widget is
 well suited to display a hierarchy of directories and files.
 
-+++
 ** The new library bindat.el provides functions to unpack and pack
 binary data structures, such as network packets, to and from Lisp
 data structures.
 
----
 ** master-mode.el implements a minor mode for scrolling a slave
 buffer without leaving your current buffer, the master buffer.
 
@@ -6043,12 +5350,10 @@
    (function (lambda ()
 	       (master-set-slave sql-buffer))))
 
-+++
 ** The new library benchmark.el does timing measurements on Lisp code.
 
 This includes measuring garbage collection time.
 
-+++
 ** The new library testcover.el does test coverage checking.
 
 This is so you can tell whether you've tested all paths in your Lisp
--- a/etc/PROBLEMS	Sun Apr 22 13:47:56 2007 +0000
+++ b/etc/PROBLEMS	Fri May 11 18:24:42 2007 +0000
@@ -2161,6 +2161,11 @@
 of Windows. This is caused by a deficiency in the underlying system
 library function.
 
+Files larger than 4GB cause overflow in the size (represented as a
+32-bit integer) reported by `file-attributes'.  This affects Dired as
+well, since the Windows port uses a Lisp emulation of `ls' that relies
+on `file-attributes'.
+
 ** Typing Alt-Shift has strange effects on MS-Windows.
 
 This combination of keys is a command to change keyboard layout.  If
@@ -2781,6 +2786,25 @@
 Using directory paths with spaces is not supported at this time: you
 must re-configure without using spaces.
 
+*** On Solaris, use GNU Make when installing an out-of-tree build
+
+The Emacs configuration process allows you to configure the
+build environment so that you can build emacs in a directory
+outside of the distribution tree.  When installing Emacs from an
+out-of-tree build directory on Solaris, you may need to use GNU
+make.  The make programs bundled with Solaris support the VPATH
+macro but use it differently from the way the VPATH macro is
+used by GNU make.  The differences will cause the "make install"
+step to fail, leaving you with an incomplete emacs
+installation.  GNU make is available in /usr/sfw/bin on Solaris
+10 and can be installed as /opt/sfw/bin/gmake from the Solaris 9
+Software Companion CDROM.
+
+The problems due to the VPATH processing differences affect only
+out of tree builds so, if you are on a Solaris installation
+without GNU make, you can install Emacs completely by installing
+from a build environment using the original emacs distribution tree.
+
 ** First execution
 
 *** Emacs binary is not in executable format, and cannot be run.
--- a/etc/TODO	Sun Apr 22 13:47:56 2007 +0000
+++ b/etc/TODO	Fri May 11 18:24:42 2007 +0000
@@ -101,6 +101,13 @@
 ** make back_comment use syntax-ppss or equivalent.
 
 ** Improve configure's treatment of NON_GNU_CPP on Solaris.
+(patch available for after Emacs 22)
+
+** Consider improving src/sysdep.c's search for a fqdn.
+http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg00782.html
+
+** Find a proper fix for rcirc multiline nick adding.
+http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg00684.html
 
 * Important features:
 
@@ -477,6 +484,13 @@
   the definition of `file-attributes' and `directory-files-and-attributes'
   and from the calls.
 
+** Modify the emulation of `stat' for MS-Windows to support large files.
+  The current version uses the stock Windows definition of `struct
+  stat', where the file's size is returned as a 32-bit integer.  That
+  overflows for files larger than 4GB.  To fix, modify `stat' to use
+  64-bit size, and use a declaration of `struct stat' that supports
+  such sizes.
+
 ** Make language-info-alist customizable.  Currently a user can customize
   only the variable `current-language-environment'.
 
@@ -580,6 +594,33 @@
 
 * Other known bugs:
 
+** The \\{...} keymap dump output does not correctly remove shadowed entries:
+From: "Drew Adams" <drew.adams@oracle.com>
+
+(define-key minibuffer-local-map [(control ?=)] 'foo)
+(define-key minibuffer-local-completion-map [(control ?=)] 'foo)
+
+(defun toto () "\\{minibuffer-local-completion-map}"  4)
+
+C-h f toto shows a duplicate entry for C-=:
+
+toto is a Lisp function.
+(toto)
+
+key             binding
+- ---             -------
+
+C-g		abort-recursive-edit
+TAB		minibuffer-complete
+C-j		exit-minibuffer
+RET		exit-minibuffer
+ESC		Prefix Command
+SPC		minibuffer-complete-word
+?		minibuffer-completion-help
+C-=		foo
+C-=		foo
+...
+
 ** a two-char comment-starter whose two chars are symbol constituents will
 not be noticed if it appears within a word.
 
--- a/etc/emacs.1	Sun Apr 22 13:47:56 2007 +0000
+++ b/etc/emacs.1	Fri May 11 18:24:42 2007 +0000
@@ -157,7 +157,7 @@
 .TP 8
 .BI \-batch
 Edit in batch mode.  The editor will send messages to stderr.  This
-option must be the first in the argument list.  You must use -l and -f
+option must be the first in the argument list.  You must use \-l and \-f
 options to specify files to execute and functions to call.
 .TP
 .B \-kill
@@ -399,12 +399,12 @@
 T}
 .\" START DELETING HERE IF YOU'RE NOT USING X MENUS
 CTRL-SHIFT-left	T{
-X buffer menu--hold the buttons and keys
+X buffer menu \(em hold the buttons and keys
 down, wait for menu to appear, select
 buffer, and release.  Move mouse out of
 menu and release to cancel.
 T}
-CTRL-SHIFT-middle	X help menu--pop up index card menu for Emacs help.
+CTRL-SHIFT-middle	X help menu \(em pop up index card menu for Emacs help.
 .\" STOP DELETING HERE IF YOU'RE NOT USING X MENUS
 CTRL-SHIFT-right	T{
 Select window with mouse, and delete all
--- a/etc/etags.1	Sun Apr 22 13:47:56 2007 +0000
+++ b/etc/etags.1	Fri May 11 18:24:42 2007 +0000
@@ -224,7 +224,7 @@
 
 .br
 A regexp can be preceded by {\fIlang\fP}, thus restricting it to match
-lines of files of the specified language.  Use \fBetags --help\fP to obtain
+lines of files of the specified language.  Use \fBetags \-\-help\fP to obtain
 a list of the recognised languages.  This feature is particularly useful inside
 \fBregex files\fP.  A regex file contains one regex per line.  Empty lines,
 and those lines beginning with space or tab are ignored.  Lines beginning
Binary file etc/images/icons/emacs_16.png has changed
Binary file etc/images/icons/emacs_24.png has changed
Binary file etc/images/icons/emacs_32.png has changed
Binary file etc/images/icons/emacs_48.png has changed
--- a/lib-src/ChangeLog	Sun Apr 22 13:47:56 2007 +0000
+++ b/lib-src/ChangeLog	Fri May 11 18:24:42 2007 +0000
@@ -1,3 +1,7 @@
+2007-04-26  Glenn Morris  <rgm@gnu.org>
+
+	* makefile.w32-in (VERSION): Increase to 22.1.50.
+
 2007-02-26  Francesco Potort,Al(B  <pot@gnu.org>
 
 	* Makefile.in (etags, ctags): Define EMACS_NAME as "GNU Emacs".
@@ -1845,7 +1849,7 @@
 	[WINDOWSNT]: #undef DOS_NT and #define it even if built with
 	HAVE_CONFIG_H.  This change does nothing in Emacs, as DOS_NT is
 	always defined when HAVE_CONFIG_H and WINDOWS are both defined.
-	[!HAVE_UNISTD_H]: use defined(WINDOWSNT) instead of the bare
+	[!HAVE_UNISTD_H]: Use defined(WINDOWSNT) instead of the bare
 	WINDOWSNT, as this is the correct way to use it.
 
 2001-01-28  Francesco Potort,Al(B  <pot@gnu.org>
@@ -2996,7 +3000,7 @@
 
 1997-03-14  Francesco Potort,Al(B  <F.Potorti@cnuce.cnr.it>
 
-	* etags.c (add_regex): reset *putbuf before using it.
+	* etags.c (add_regex): Reset *putbuf before using it.
 
 1997-02-23  Jonathan I. Kamens  <jik@kamens.brookline.ma.us>
 
@@ -3560,7 +3564,7 @@
 
 1995-12-04  Francesco Potort,Al(B  <pot@cnuce.cnr.it>
 
-	* Makefile.in (ctags): depend on etags only for simplicity;
+	* Makefile.in (ctags): Depend on etags only for simplicity;
 	compile with regexp support enabled.
 
 1995-11-24  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
@@ -3685,13 +3689,13 @@
 
 1995-06-27  Francesco Potort,Al(B  (pot@cnuce.cnr.it)
 
-	* etags.c (plain_C_entries): new function.
-	(lowcase): new macro.
-	(tail, Fortran_functions, Pascal_functions): use new macro lowcase.
-	(lang_suffixes): new suffix ".pc" for Pro*C files.
-	(consider_token): don't tag all tokens beginning with DEFUN & Co..
-	(tail): look for the end of the token when comparing.
-	(takeprec): since now tail behaves differently, use strneq.
+	* etags.c (plain_C_entries): New function.
+	(lowcase): New macro.
+	(tail, Fortran_functions, Pascal_functions): Use new macro lowcase.
+	(lang_suffixes): New suffix ".pc" for Pro*C files.
+	(consider_token): Don't tag all tokens beginning with DEFUN & Co..
+	(tail): Look for the end of the token when comparing.
+	(takeprec): Since now tail behaves differently, use strneq.
 
 1995-07-08  Paul Eggert  <eggert@twinsun.com>
 
@@ -3723,13 +3727,13 @@
 
 1995-06-27  Francesco Potort,Al(B  (pot@cnuce.cnr.it)
 
-	* etags.c (plain_C_entries): new function.
-	(lowcase): new macro.
-	(tail, Fortran_functions, Pascal_functions): use new macro lowcase.
-	(lang_suffixes): new suffix ".pc" for Pro*C files.
-	(consider_token): don't tag all tokens beginning with DEFUN & Co..
-	(tail): look for the end of the token when comparing.
-	(takeprec): since now tail behaves differently, use strneq.
+	* etags.c (plain_C_entries): New function.
+	(lowcase): New macro.
+	(tail, Fortran_functions, Pascal_functions): Use new macro lowcase.
+	(lang_suffixes): New suffix ".pc" for Pro*C files.
+	(consider_token): Don't tag all tokens beginning with DEFUN & Co..
+	(tail): Look for the end of the token when comparing.
+	(takeprec): Since now tail behaves differently, use strneq.
 
 1995-06-26  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
 
@@ -3906,7 +3910,7 @@
 
 1995-03-13  Francesco Potort,Al(B  (pot@cnuce.cnr.it)
 
-	* etags.c (process_file): free (filename) after using it.
+	* etags.c (process_file): Free (filename) after using it.
 	(readline_internal): Do not access the char before start of line.
 
 1995-02-22  Francesco Potort,Al(B  (pot@cnuce.cnr.it)
@@ -4039,8 +4043,8 @@
 
 1994-11-22  Francesco Potort,Al(B  (pot@cnuce.cnr.it)
 
-	* etags.c (print_help): print --regex usage for ctags also.
-	(main): use -h in addition to -H as abbreviation for --help.
+	* etags.c (print_help): Print --regex usage for ctags also.
+	(main): Use -h in addition to -H as abbreviation for --help.
 
 1994-11-16  Francesco Potort,Al(B  (pot@cnuce.cnr.it)
 
@@ -4105,9 +4109,9 @@
 
 1994-10-21  Francesco Potort,Al(B  (pot@cnuce.cnr.it)
 
-	* etags.c (prestr, substr): return a logical type.
+	* etags.c (prestr, substr): Return a logical type.
 	(consider_token): Comment out "EXFUN".  Use "DEFUN" instead of "DEF".
-	(consider_token): set funcdef to fignore when a DEFUN is met.
+	(consider_token): Set funcdef to fignore when a DEFUN is met.
 	(C_entries): Now we can use Tom Hageman patch for extern "C".
 
 1994-10-20  Richard Stallman  <rms@mole.gnu.ai.mit.edu>
@@ -4190,8 +4194,8 @@
 
 1994-10-17  Francesco Potort,Al(B  (pot@fly.cnuce.cnr.it)
 
-	* Makefile.in.in (etags): add dependency on regex.o, link with it.
-	(REGEXPOBJ, REGEXPDEPS, regex.o): target and macros added.
+	* Makefile.in.in (etags): Add dependency on regex.o, link with it.
+	(REGEXPOBJ, REGEXPDEPS, regex.o): Target and macros added.
 
 1994-10-12  David J. MacKenzie  (djm@duality.gnu.ai.mit.edu)
 
@@ -4341,7 +4345,7 @@
 
 1994-07-08  Dave Love  (d.love@dl.ac.uk)
 
-	* etags.c (takeprec): recognise `character*(*) function'
+	* etags.c (takeprec): Recognise `character*(*) function'.
 
 1994-07-08  Francesco Potort,Al(B  (pot@cnuce.cnr.it)
 
@@ -4489,11 +4493,11 @@
 
 1994-04-18  Francesco Potort,Al(B  (pot@fly.cnuce.cnr.it)
 
-	* etags.c (main, print_help): eliminate the -F option.
+	* etags.c (main, print_help): Eliminate the -F option.
 
 1994-04-18  Francesco Potort,Al(B  (pot@fly.cnuce.cnr.it)
 
-	* etags.c (absolute_filename): compare against '\0' instead of NULL.
+	* etags.c (absolute_filename): Compare against '\0' instead of NULL.
 
 1994-04-16  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
@@ -4527,21 +4531,21 @@
 
 1994-04-08  Francesco Potort,Al(B  (pot@fly.cnuce.cnr.it)
 
-	* etags.c (outf, outfiledir): renamed to tagf, tagfiledir.
-	(PF_funcs, Asm_funcs, L_funcs, PAS_funcs, TEX_funcs,
-	Scheme_funcs, prolog_funcs): renamed to Fortran_functions,
+	* etags.c (outf, outfiledir): Renamed to tagf, tagfiledir.
+	(PF_funcs, Asm_funcs, L_funcs, PAS_funcs, TEX_funcs)
+	(Scheme_funcs, prolog_funcs): Renamed to Fortran_functions,
 	Asm_labels, Lisp_functions, Pascal_functions, Scheme_functions,
 	TeX_functions, Prolog_functions.
-	(inf): no more a global variable.
-	(C_entries): take 2nd parameter `inf' instead of using the global one.
-	(find_entries): added the cp1 var for optimisation.
-	(find_entries): added more suffixes for assembler files.
+	(inf): No more a global variable.
+	(C_entries): Take 2nd parameter `inf' instead of using the global one.
+	(find_entries): Added the cp1 var for optimisation.
+	(find_entries): Added more suffixes for assembler files.
 	(Asm_funcs): Now finds labels even without an ending colon.
 
 1994-03-30  Francesco Potort,Al(B  (pot@fly.cnuce.cnr.it)
 
-	* etags.c (main): use etags_getcwd for compatibility.
-	(etags_getcwd): new function.
+	* etags.c (main): Use etags_getcwd for compatibility.
+	(etags_getcwd): New function.
 
 1994-03-25  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
@@ -4549,22 +4553,22 @@
 
 1994-03-25  Francesco Potort,Al(B  (pot@cnuce.cnr.it)
 
-	* etags.c (emacs_tags_format, ETAGS): removed.  Use CTAGS instead.
-	(main): don't allow the use of -t and -T in etags mode.
-	(print_help): don't show options enabled by default.
-	(print_version): show the emacs version number if VERSION is #defined.
-	(find_entries): add "ss" as suffix for Chez Scheme.
+	* etags.c (emacs_tags_format, ETAGS): Removed.  Use CTAGS instead.
+	(main): Don't allow the use of -t and -T in etags mode.
+	(print_help): Don't show options enabled by default.
+	(print_version): Show the emacs version number if VERSION is #defined.
+	(find_entries): Add "ss" as suffix for Chez Scheme.
 
 1994-03-23  Francesco Potort,Al(B  (pot@cnuce.cnr.it)
 
-	* etags.c (cwd, outfiledir): vars added.
+	* etags.c (cwd, outfiledir): Vars added.
 	(relative_filename, absolute_filename, absolute_dirname):
 	functions added to compute filenames in tags files.
-	(process_file): filenames in tags file are relative to the
+	(process_file): Filenames in tags file are relative to the
 	directory where the tags file is (useful with the -o option).
-	(main): initialise the outfiledir var.
-	(TYPEDST): added the `tignore' value.
-	(C_entries): corrected various small bugs.
+	(main): Initialise the outfiledir var.
+	(TYPEDST): Added the `tignore' value.
+	(C_entries): Corrected various small bugs.
 
 1994-03-19  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
@@ -4579,8 +4583,8 @@
 
 1994-03-14  Francesco Potort,Al(B  (pot@cnuce.cnr.it)
 
-	* etags.c (TYPEDST): added the `tignore' value.
-	(C_entries): corrected various bugs, now correctly parses the
+	* etags.c (TYPEDST): Added the `tignore' value.
+	(C_entries): Corrected various bugs, now correctly parses the
 	`extern "C" {' construction (patch by Tom R.Hageman).
 
 1994-03-05  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
@@ -4621,7 +4625,7 @@
 1994-02-22  Karl Heuer  (kwzh@gnu.ai.mit.edu)
 
 	* profile.c (get_time): Simplify; avoid calling index.
-	(main): exit on EOF.
+	(main): Exit on EOF.
 
 1994-02-17  Francesco Potort,Al(B  (pot@cnuce.cnr.it)
 
@@ -4633,11 +4637,11 @@
 
 1994-02-14  Francesco Potort,Al(B  (pot@fly)
 
-	* etags.c (absolute_pathnames, cwd): added global vars.
-	(longopts, print_help, main, process_file): put absolute filenames
+	* etags.c (absolute_pathnames, cwd): Added global vars.
+	(longopts, print_help, main, process_file): Put absolute filenames
 	in the tag file if the -A --absolute-pathnames option is used.
-	(print_help): alfabetically order the options.
-	(malloc, realloc, strcpy, strncpy, strcmp): remove extern declar.
+	(print_help): Alfabetically order the options.
+	(malloc, realloc, strcpy, strncpy, strcmp): Remove extern declar.
 
 1994-02-09  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
@@ -4666,15 +4670,15 @@
 1994-01-14  Francesco Potort,Al(B  (pot@cnuce.cnr.it)
 
 	* etags.c (stab_entry, stab_create, stab_find, stab_search,
-	stab_type, add_keyword, C_reate_stab, C_create_stabs): deleted.
+	stab_type, add_keyword, C_reate_stab, C_create_stabs): Deleted.
 	Use gperf generated hash table instead of linked list.
-	(C_stab_entry, hash, in_word_set, get_C_stab, C_symtype): added.
+	(C_stab_entry, hash, in_word_set, get_C_stab, C_symtype): Added.
 	Mostly code generated by gperf.
-	(consider_token): removed unused parameter `lp'.
-	(PF_funcs, getit): allow subroutine and similar declarations
+	(consider_token): Removed unused parameter `lp'.
+	(PF_funcs, getit): Allow subroutine and similar declarations
 	to span multiple lines.
-	(C_entries): check for newline if inchar to avoid bus errors.
-	(process_file, find_entries): distinguish among nonexistent
+	(C_entries): Check for newline if inchar to avoid bus errors.
+	(process_file, find_entries): Distinguish among nonexistent
 	and not regular file.
 
 1994-01-14  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
@@ -4811,14 +4815,14 @@
 	functions returning a pointer to a function, a la `signal', can be
 	parsed.  This also required new state `fstartlist' to `FUNCST'.
 	(SAVE_TOKEN, RESTORE_TOKEN, TOKEN_SAVED_P): 1-deep token save stack.
-	(C_entries, CNL): use it to isolate preprocessor directive processing
+	(C_entries, CNL): Use it to isolate preprocessor directive processing
 	from the other state engines.
-	(begtk): add '~', for C++ class destructors.
+	(begtk): Add '~', for C++ class destructors.
 
 1993-11-02  Francesco Potort,Al(B  (pot@cnuce.cnr.it)
 
-	* etags.c (consider_token): removed unused variable firsttok.
-	(prolog_getit): call pfnote with the right number of arguments.
+	* etags.c (consider_token): Removed unused variable firsttok.
+	(prolog_getit): Call pfnote with the right number of arguments.
 
 1993-10-19  Paul Eggert  (eggert@twinsun.com)
 
@@ -4837,9 +4841,9 @@
 
 1993-10-01  Francesco Potort,Al(B  (pot@cnuce.cnr.it)
 
-	* etags.c (process_file): dead code removed.
+	* etags.c (process_file): Dead code removed.
 	(S_ISREG): #define it using S_IFREG if not defined.
-	(process_file): regular files have nothing to do with symlinks.
+	(process_file): Regular files have nothing to do with symlinks.
 
 1993-09-28  Brian Fox  (bfox@ai.mit.edu)
 
@@ -4922,10 +4926,10 @@
 
 1993-08-04  Francesco Potort,Al(B  (pot@spiff.gnu.ai.mit.edu)
 
-	* etags.c (L_isdef, L_isquote, L_getit): small optimisations.
-	(L_funcs): the (foo::defmumble stuff now should work.
-	(consider_token): function returned random value--corrected.
-	(C_entries): corrected == versus = typo.
+	* etags.c (L_isdef, L_isquote, L_getit): Small optimisations.
+	(L_funcs): The (foo::defmumble stuff now should work.
+	(consider_token): Function returned random value--corrected.
+	(C_entries): Corrected == versus = typo.
 
 1993-08-01  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
 
@@ -4941,11 +4945,11 @@
 	* etags.c (FINCST): Added the fignore status.  Means we are
 	after the parameter list and before the open curly brace.
 	Allows correct parsing of C++ constructors.
-	(C_entries, consider_token): make use of fignore.
-	(consider_token): reset funcdef when next_token_is_func: when in
+	(C_entries, consider_token): Make use of fignore.
+	(consider_token): Reset funcdef when next_token_is_func: when in
 	ctags mode makes DEFVAR and others work better.
-	(L_isquote): function that recognises the "(quote" string.
-	(L_getit): ignore quoting via "'" or "(quote".  Useful for defalias.
+	(L_isquote): Function that recognises the "(quote" string.
+	(L_getit): Ignore quoting via "'" or "(quote".  Useful for defalias.
 
 1993-07-29  Paul Eggert  (eggert@twinsun.com)
 
@@ -4977,20 +4981,20 @@
 
 1993-07-08  Francesco Potort,Al(B  (pot@cnuce.cnr.it)
 
-	* etags.c (alloca): removed all references to it.
-	(main): now calls xnew instead of alloca for portability.
-	(../src/config.h): included only if HAVE_CONFIG_H.
-	(const): void definition removed--config.h takes care of it.
+	* etags.c (alloca): Removed all references to it.
+	(main): Now calls xnew instead of alloca for portability.
+	(../src/config.h): Included only if HAVE_CONFIG_H.
+	(const): Void definition removed--config.h takes care of it.
 
 1993-07-08  Francesco Potort,Al(B  (pot@cnuce.cnr.it)
 
-	* etags.c (consider_token): was `==', now is `='.
+	* etags.c (consider_token): Was `==', now is `='.
 	(consider_token): DEFUNs now treated like funcs in ctags mode.
 
-	* etags.c (LEVEL_OK_FOR_FUNCDEF): removed.
-	(C_entries): optimized the test that used LEVEL_OK_FOR_FUNCDEF.
-	(C_entries): removed a piece of useless code.
-	(C_entries): making typedef tags is delayed until a semicolon
+	* etags.c (LEVEL_OK_FOR_FUNCDEF): Removed.
+	(C_entries): Optimized the test that used LEVEL_OK_FOR_FUNCDEF.
+	(C_entries): Removed a piece of useless code.
+	(C_entries): Making typedef tags is delayed until a semicolon
 	is met.  This handles "typedef int X, Y, Z;" correctly.
 
 1993-07-06  Jim Blandy  (jimb@geech.gnu.ai.mit.edu)
@@ -5266,38 +5270,38 @@
 
 1993-03-22  Francesco Potort,Al(B  (pot@cnuce.cnr.it)
 
-	* etags.c (YACC): flag added to c_ext.
-	(c_ext): no more a synonim for c_ext&C_PLPL because of YACC.
-	(find_entries): consistently use streq when reasonable.
-	(find_entries): a .y file is a yacc file.
+	* etags.c (YACC): Flag added to c_ext.
+	(c_ext): No more a synonim for c_ext&C_PLPL because of YACC.
+	(find_entries): Consistently use streq when reasonable.
+	(find_entries): A .y file is a yacc file.
 	(get_C_stab): c_ext becomes c_ext&C_PLPL.
-	(C_entries): logical cplpl means c_ext&C_PLPL.
-	(C_entries): logical yacc_rules means we are after the first %%.
-	(C_entries): added logic for yacc files.
+	(C_entries): Logical cplpl means c_ext&C_PLPL.
+	(C_entries): Logical yacc_rules means we are after the first %%.
+	(C_entries): Added logic for yacc files.
 
 1993-03-16  Francesco Potort,Al(B  (pot@cnuce.cnr.it)
 
 	* etags.c (C_entries): ':' case moved to the second switch.
-	(C_entries): do not examine token if structdef==scolonseen.
+	(C_entries): Do not examine token if structdef==scolonseen.
 	(consider_token): structtag set to null string for enum.
 
 1993-03-12  Francesco Potort,Al(B  (pot@cnuce.cnr.it)
 
-	* etags.c (GET_COOKIE): and related macros removed.
-	(logical): is now int, no more a char.
-	(reg): define deleted.
-	(isgood, _gd, notgd): deleted.
-	(gotone): deleted.
-	(TOKEN): member linestart removed.
-	(linepos, prev_linepos, lb1): deleted.
-	(main): call initbuffer on lbs array instead of lb1.
-	(init): removed the initialisation of the logical _gd array;
-	(find_entries): a .sa suffix means assembler file.
+	* etags.c (GET_COOKIE): And related macros removed.
+	(logical): Is now int, no more a char.
+	(reg): Define deleted.
+	(isgood, _gd, notgd): Deleted.
+	(gotone): Deleted.
+	(TOKEN): Member linestart removed.
+	(linepos, prev_linepos, lb1): Deleted.
+	(main): Call initbuffer on lbs array instead of lb1.
+	(init): Removed the initialisation of the logical _gd array;
+	(find_entries): A .sa suffix means assembler file.
 	(C_create_stab): "auto", "void", "extern", "static" are st_C_typespec.
 	All C state machines rewritten.
-	(C_entries): complete rewrite.
-	(condider_token): complete rewrite.
-	(getline): deleted.
+	(C_entries): Complete rewrite.
+	(condider_token): Complete rewrite.
+	(getline): Deleted.
 
 1993-03-01  Francesco Potort,Al(B  (pot@fly.CNUCE.CNR.IT)
 
@@ -5311,7 +5315,7 @@
 
 1993-03-19  Eric S. Raymond  (eric@geech.gnu.ai.mit.edu)
 
-	* Makefile.in (EXECUTABLES): added rcs-checkin.
+	* Makefile.in (EXECUTABLES): Added rcs-checkin.
 
 	* Makefile.in (unlock, relock): New productions.
 
@@ -5594,7 +5598,7 @@
 
 1992-05-04  Jim Blandy  (jimb@pogo.cs.oberlin.edu)
 
-	* Makefile.in: flags in CC invocations rearranged for no reason.
+	* Makefile.in: Flags in CC invocations rearranged for no reason.
 
 1992-04-20  Jim Blandy  (jimb@pogo.cs.oberlin.edu)
 
@@ -6007,13 +6011,13 @@
 
 1989-04-18  Richard Stallman  (rms@sugar-bombs.ai.mit.edu)
 
-	* loadst.c: on bsd4.3, use gettimeofday instead of CPUSTATES.
+	* loadst.c: On bsd4.3, use gettimeofday instead of CPUSTATES.
 
 1989-03-15  Jeff Peck  (rms@sugar-bombs.ai.mit.edu)
 
 	* emacstool.c: setenv IN_EMACSTOOL=t, TERM=sun, TERMCAP=.
 
-	* emacsstool.1: update to document environment variables.
+	* emacsstool.1: Update to document environment variables.
 
 1989-02-21  Richard Stallman  (rms@sugar-bombs.ai.mit.edu)
 
@@ -6114,7 +6118,7 @@
 
 1988-09-24  Richard Stallman  (rms@gluteus.ai.mit.edu)
 
-	* etags.c (main): default setting of eflag was backwards.
+	* etags.c (main): Default setting of eflag was backwards.
 
 1988-09-23  Richard Stallman  (rms@sugar-bombs.ai.mit.edu)
 
@@ -6197,7 +6201,7 @@
 1988-04-28  Richard Stallman  (rms@frosted-flakes.ai.mit.edu)
 
 	* movemail.c: #undef close, since config can #define it on V.3.
-	* emacsclient.c, fakemail.c, loadst.c, server.c: likewise.
+	* emacsclient.c, fakemail.c, loadst.c, server.c: Likewise.
 
 1988-04-26  Richard Stallman  (rms@lucky-charms.ai.mit.edu)
 
@@ -6208,9 +6212,9 @@
 
 1988-03-20  Richard M. Stallman  (rms@wilson)
 
-	* server.c [not BSD and not HAVE_SYSVIPC]: fix error message.
-
-	* loadst.c (main) [XENIX]: use /usr/spool/mail, not /usr/mail.
+	* server.c [not BSD and not HAVE_SYSVIPC]: Fix error message.
+
+	* loadst.c (main) [XENIX]: Use /usr/spool/mail, not /usr/mail.
 
 ;; Local Variables:
 ;; coding: iso-2022-7bit
--- a/lib-src/makefile.w32-in	Sun Apr 22 13:47:56 2007 +0000
+++ b/lib-src/makefile.w32-in	Fri May 11 18:24:42 2007 +0000
@@ -24,7 +24,7 @@
 
 .PHONY: $(ALL)
 
-VERSION		= 22.0.98
+VERSION		= 22.1.50
 
 LOCAL_FLAGS	= -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \
 		  -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../nt/inc \
--- a/lisp/ChangeLog	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/ChangeLog	Fri May 11 18:24:42 2007 +0000
@@ -1,3 +1,370 @@
+2007-05-10  Richard Stallman  <rms@gnu.org>
+
+	* international/iso-cvt.el (iso-cvt-read-only): Ignore arguments.
+	(iso-cvt-write-only): Likewise.
+
+	* emacs-lisp/easy-mmode.el (define-minor-mode):
+	Fix generated doc string.
+
+	* startup.el (fancy-splash-text): Add URL of guided tour.
+	Adjust horizontal and vertical whitespace.
+
+	* progmodes/compile.el (compilation-handle-exit):
+	Use run-hook-with-args to run compilation-finish-functions.
+
+	* files.el (file-start-mode-alist): New variable.
+	(magic-mode-regexp-match-limit): Doc fix.
+	(set-auto-mode): Handle file-start-mode-alist.
+	A little cleanup of structure.
+
+2007-05-10  Micha,Ak(Bl Cadilhac  <michael@cadilhac.name>
+
+	* man.el (Man-next-section): Don't consider the last line of the page
+	as being part of any section.
+
+2007-05-10  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* textmodes/sgml-mode.el (sgml-value): Fix handling of attributes which
+	can take any number of values.
+
+2007-05-09  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* textmodes/tex-mode.el (tex-font-lock-keywords-2): Add citet and citep
+	to the list of citation commands.
+
+2007-05-09  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* vc-hooks.el (vc-find-root): Stop searching when the user changes.
+
+2007-05-09  Edward O'Connor  <hober0@gmail.com>  (tiny change)
+
+	* progmodes/python.el (python-font-lock-keywords)
+	(python-open-block-statement-p, python-mode): Add support for the new
+	"with" keyword.
+
+2007-05-08  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* diff-mode.el (diff-apply-hunk, diff-test-hunk): Don't do by default
+	the exact opposite of diff-goto-source.
+
+	* emacs-lisp/advice.el (ad-special-forms): Remove.
+	(ad-special-form-p): Use subr-arity.
+
+	* newcomment.el (comment-search-forward): Make sure we search forward.
+	(comment-enter-backward): Try and distinguish the non-matching case at
+	EOB from the non-matching case with a missing comment-end-skip for
+	a 2-char comment ender.
+	(comment-choose-indent): New function extracted from comment-indent.
+	Improve the alignment algorithm.
+	(comment-indent): Use it.
+
+	* textmodes/sgml-mode.el (sgml-lexical-context): Add handling of
+	XML style Processing Instructions.
+	(sgml-parse-tag-backward): Handle XML-style PIs.  Also ensure progress.
+	(sgml-calculate-indent): Handle `pi' context.
+
+	* vc.el: Ensure that update-changelog issues an error when used with
+	a backend that does not implement it.
+	(vc-update-changelog-rcs2log): Rename from vc-default-update-changelog.
+	Remove `backend' argument.  Use expand-file-name.
+	(vc-cvs-update-changelog, vc-rcs-update-changelog): New aliases.
+
+	* progmodes/python.el (python-end-of-block): Revert last change.
+	(python-end-of-statement): Make sure we move *forward*.
+
+2007-05-08  Richard Stallman  <rms@gnu.org>
+
+	* mail/mailabbrev.el (sendmail-pre-abbrev-expand-hook):
+	Don't include non-self-insert commands in the exception for `-'.
+
+2007-05-08  David Reitter  <david.reitter@gmail.com>
+
+	* progmodes/python.el (python-guess-indent): Check non-nullness
+	before comparing indent against the 2..8 interval.
+
+2007-05-07  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* term/mac-win.el (mac-ts-unicode-for-key-event): Check if text is
+	available.
+
+2007-05-06  Richard Stallman  <rms@gnu.org>
+
+	* emacs-lisp/eldoc.el (turn-on-eldoc-mode): Doc fix.
+
+2007-05-05  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* diff.el (diff): Use buffer-local vars diff-old-file and diff-new-file
+	rather than storing their value in the revert-buffer function.
+
+2007-05-04  Nick Roberts  <nickrob@snap.net.nz>
+
+	* t-mouse.el (t-mouse-mode): Do nothing on a graphical display
+	when disabling t-mouse-mode.
+
+2007-05-01  Davis Herring  <herring@lanl.gov>
+
+	* calendar/timeclock.el: Update version number.
+	(timeclock-modeline-display): Mention timeclock-use-display-time
+	in explanatory message.
+	(timeclock-in): Fix non-interactive workday specifications.
+	(timeclock-log): Don't kill the log buffer if it already existed.
+	Suppress warnings when finding the log.  Don't check for a nil
+	project twice.  Run hooks after killing the buffer (if applicable).
+	(timeclock-geometric-mean): Rename to `timeclock-mean' (it never
+	was geometric).  All uses changed.
+	(timeclock-generate-report): Support prefix argument.
+
+2007-05-03  Ryan Yeske  <rcyeske@gmail.com>
+
+	* net/rcirc.el (rcirc-timeout-seconds): Increase to prevent unwanted
+	disconnections.
+
+2007-05-01  Romain Francoise  <romain@orebokech.com>
+
+	* dired-x.el: Revert 2007-04-06 change.
+
+2007-04-29  Stephen Berman  <Stephen.Berman@gmx.net>
+
+	* find-dired.el (find-dired-filter): Propertize all text down to eob.
+
+2007-04-29  Richard Stallman  <rms@gnu.org>
+
+	* international/mule.el (auto-coding-alist): Add pdf => no-conversion.
+
+2007-04-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* progmodes/cc-mode.el (c-before-change): Use point-min rather
+	than 1.
+
+2007-04-28  Richard Stallman  <rms@gnu.org>
+
+	* progmodes/sh-script.el (sh-mode): Recognize .profile as sh style.
+
+2007-04-28  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gud.el (gud-menu-map): Pdb can't handle SIGINT so
+	don't put stop on toolbar.
+
+2007-04-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* vc-hooks.el (vc-ignore-dir-regexp): Add /.../ for the DFS filesystem.
+
+2007-04-28  Eli Zaretskii  <eliz@gnu.org>
+
+	* makefile.w32-in ($(lisp)/mh-e/mh-loaddefs.el): Use ./mh-e
+	instead of $(lisp)/mh-e.
+
+2007-04-28  Glenn Morris  <rgm@gnu.org>
+
+	* image-dired.el (image-dired-cmd-create-thumbnail-options)
+	(image-dired-cmd-create-temp-image-options): Replace option
+	+profile "*" with -strip.
+
+2007-04-27  Chong Yidong  <cyd@stupidchicken.com>
+
+	* textmodes/flyspell.el (flyspell-auto-correct-previous-word):
+	Use window-start and window-end.
+
+2007-04-27  Andreas Schwab  <schwab@suse.de>
+
+	* emacs-lisp/sregex.el (sregexq): Fix doc string quoting.
+
+2007-04-27  Eli Zaretskii  <eliz@gnu.org>
+
+	* textmodes/fill.el (fill-paragraph): Doc fix.
+
+2007-04-26  Luc Teirlinck  <teirllm@dms.auburn.edu>
+
+	* locate.el (locate-in-alternate-database): Doc fix.
+
+2007-04-26  Glenn Morris  <rgm@gnu.org>
+
+	* button.el (button): Use underline if supported, else fall back
+	to color.
+
+	* version.el (emacs-version): Increase to 22.1.50.
+
+2007-04-25  Richard Stallman  <rms@gnu.org>
+
+	* hi-lock.el (hi-lock-file-patterns-policy): Default to `ask'.
+
+2007-04-25  J.D. Smith  <jdsmith@as.arizona.edu>
+
+	* progmodes/idlwave.el (idlwave-beginning-of-subprogram)
+	(idlwave-end-of-subprogram): Take optional NOMARK arg to prevent
+	pushing mark.
+	(idlwave-current-routine): Don't push mark.
+
+2007-04-25  Mathias Dahl  <mathias.dahl@gmail.com>
+
+	* image-dired.el (image-dired-display-image): Derive image-type from
+	filename rather than assuming jpeg, in case no resizing was needed.
+
+2007-04-25  Johan Bockg,Ae(Brd  <bojohan@dd.chalmers.se>
+
+	* custom.el (defface): Doc fix.
+
+2007-04-24  J.D. Smith  <jdsmith@as.arizona.edu>
+
+	* progmodes/idlw-shell.el (idlwave-shell-clear-all-bp):
+	Don't re-query for each cleared BP.
+	(idlwave-shell-clear-bp): Optionally skip BP query.
+	(idlwave-shell-update-bp-overlays): Use set-window-margins instead
+	of set-window-buffer, which incorrectly moves displayed region.
+
+2007-04-23  Jay Belanger  <jay.p.belanger@gmail.com>
+
+	* calc/calc.el (calc-bug-address): Update maintainer's address.
+	* calc/*: Update maintainer's address.
+
+2007-04-23  Richard Stallman  <rms@gnu.org>
+
+	* simple.el (set-mark-command-repeat-pop): Doc fix.
+	Put in `editing-basics' group.
+
+2007-04-23  Chong Yidong  <cyd@stupidchicken.com>
+
+	* info.el (Info-mouse-scroll-up, Info-mouse-scroll-down):
+	New functions.
+	(Info-mode-line-node-keymap): Bind mouse commands to
+	Info-mouse-scroll-up/down instead of Info-scroll-up/down.
+
+2007-04-23  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* locate.el (locate-local-prompt): New var.
+	(locate-prompt-for-command): Doc fix.
+	(locate-prompt-for-search-string): New function.
+	(locate): New optional arg.  Make locate-local-prompt
+	buffer-local.  Use locate-prompt-for-search-string.
+	(locate-with-filter): New optional arg.
+	Use locate-prompt-for-search-string.
+	(locate-update): Bind locate-prompt-for-command.
+
+2007-04-23  Glenn Morris  <rgm@gnu.org>
+
+	* files.el (magic-mode-alist): `<!DOCTYPE HTML' in html-mode.
+
+2007-04-23  Nick Roberts  <nickrob@snap.net.nz>
+
+	* button.el (button): Inherit from link face on a tty.
+
+2007-04-23  Glenn Morris  <rgm@gnu.org>
+
+	* button.el (button): Use color for this face on a tty.
+
+	* files.el (magic-mode-alist): Allow for carriage-returns in
+	html-mode and sgml-mode entries.
+
+2007-04-22  Richard Stallman  <rms@gnu.org>
+
+	* emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
+	Improve doc string of generated command.
+
+	* subr.el (read-number): Catch errors.
+
+	* hi-lock.el (hi-lock-file-patterns-policy): Doc fix.
+
+2007-04-22  Chong Yidong  <cyd@stupidchicken.com>
+
+	* image-dired.el: Rename from thumbnails.el.  All instances of
+	"thumbnails" replaced with "image-dired".
+
+	* dired.el (dired-mode-map): Rename "thumbnails" again, to
+	"image-dired".
+
+2007-04-22  Kim F. Storm  <storm@cua.dk>
+
+	* ido.el (ido-kill-buffer-at-head, ido-delete-file-at-head):
+	Don't use kill-line.
+
+2007-04-22  Nick Roberts  <nickrob@snap.net.nz>
+
+	* t-mouse.el (t-mouse-make-event): Pass on mev's more informative
+	error message.
+
+2007-04-22  Chong Yidong  <cyd@stupidchicken.com>
+
+	* dired.el: Rename "tumme" to "thumbnails".
+
+	* thumbnails.el: Rename from tumme.el.  All instances of "tumme"
+	replaced with "thumbnails".
+
+2007-04-22  Glenn Morris  <rgm@gnu.org>
+
+	* hi-lock.el (hi-lock-file-patterns-policy): Make it a defcustom,
+	and give it the risky-local-variable property.
+
+	* textmodes/flyspell.el (flyspell-define-abbrev): Downcase abbrev
+	before defining it.
+
+2007-04-21  Martin Rudalics  <rudalics@gmx.at>
+
+	* progmodes/cc-mode.el (c-remove-any-local-eval-or-mode-variables):
+	Use delete-region instead of kill-line.
+
+2007-04-21  Alan Mackenzie  <acm@muc.de>
+
+	* progmodes/cc-cmds.el (c-electric-slash): Replace wrong use of
+	`kill-region' by `delete-region'.
+
+2007-04-21  Chong Yidong  <cyd@stupidchicken.com>
+
+	* progmodes/perl-mode.el (perl-indent-command): Use delete-region
+	instead of kill-region.
+
+	* progmodes/mantemp.el (mantemp-make-mantemps-region)
+	(mantemp-insert-cxx-syntax, mantemp-sort-and-unique-lines)
+	(mantemp-remove-memfuncs): Use delete-region instead of kill-word
+	and kill-line.
+
+	* progmodes/vhdl-mode.el (vhdl-template-type)
+	(vhdl-template-record, vhdl-template-nature)
+	(vhdl-template-configuration-spec, vhdl-template-component-inst)
+	(vhdl-template-break, vhdl-regress-line, vhdl-electric-tab):
+	Use delete-region instead of kill-word and kill-line.
+
+2007-04-21  Johan Bockg,Ae(Brd  <bojohan@dd.chalmers.se>
+
+	* dired-x.el (dired-virtual-mode): Doc fix.
+
+2007-04-21  Richard Stallman  <rms@gnu.org>
+
+	* font-lock.el (font-lock-keywords-alist): Mark as risky.
+
+	* subr.el (read-number): Doc fix.
+
+	* simple.el (pop-to-mark-command): Display message "mark popped"
+	if point does not move.
+	(set-mark-command): Doc fix.
+
+2007-04-21  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* locate.el: Revert 2006-09-09 and 2007-04-20 changes.
+	(locate-local-filter, locate-local-search): New vars.
+	(locate): Make variables local.
+	(locate-update): Bind locate-buffer-name.  Call locate using
+	locate-local-filter and locate-local-search.
+
+2007-04-20  David Koppelman  <koppel@ece.lsu.edu>
+
+	* hi-lock.el (hi-lock-file-patterns-policy): New var.
+	(hi-lock-find-patterns): Use hi-lock-file-patterns-policy.
+	(hi-lock-mode): Update docstring.
+
+2007-04-20  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* textmodes/fill.el (fill-move-to-break-point): Don't inhibit
+	fill-nobreak-predicate when the break is past fill-column.
+
+2007-04-20  Francesco Potort,Al(B  <pot@gnu.org>
+
+	* locate.el (locate): Output from shell-command should go in the
+	current buffer rather than *Shell Command Output*.
+
+2007-04-20  Chong Yidong  <cyd@stupidchicken.com>
+
+	* paren.el (show-paren-function): Fix last fix.
+
 2007-04-19  Kevin Ryde  <user42@zip.com.au>
 
 	* arc-mode.el (archive-find-type): lzh-exe for lzh self-extracting exe.
@@ -104,8 +471,8 @@
 
 	* textmodes/bibtex.el (bibtex-insert-kill): Pass non-nil NODELIM
 	arg to bibtex-make-field.
-	(bibtex-make-field): Add optional fourth arg NODELIM.  Insert
-	delimiters around INIT unless this arg is non-nil.
+	(bibtex-make-field): Add optional fourth arg NODELIM.
+	Insert delimiters around INIT unless this arg is non-nil.
 
 2007-04-14  Nick Roberts  <nickrob@snap.net.nz>
 
@@ -143,7 +510,7 @@
 	window marked as dedicated.
 
 	* mail/footnote.el (footnote-latin-string): New variable.
-	(footnote-latin-regexp): Redefined as regexp alternative.
+	(footnote-latin-regexp): Redefine as regexp alternative.
 	(Footnote-latin): Use footnote-latin-string instead of
 	footnote-latin-regexp.
 
@@ -173,17 +540,17 @@
 
 2007-04-11  Markus Triska  <markus.triska@gmx.at>
 
-        * emacs-lisp/byte-opt.el (byte-optimize-backward-char)
-        (byte-optimize-backward-word): Remove (move to bytecomp.el).
+	* emacs-lisp/byte-opt.el (byte-optimize-backward-char)
+	(byte-optimize-backward-word): Remove (move to bytecomp.el).
 	(byte-optimize-form-code-walker): Evaluate pure function calls if
 	possible.
 	(byte-optimize-all-constp): New function.
 
-        * emacs-lisp/bytecomp.el (byte-compile-char-before): Improve
-        numeric argument case.
-        (byte-compile-backward-char, byte-compile-backward-word): New
-        functions, performing rewriting previously done in byte-opt.el.
-        Fix their "Fixme" item (restriction to numeric arguments).
+	* emacs-lisp/bytecomp.el (byte-compile-char-before):
+	Improve numeric argument case.
+	(byte-compile-backward-char, byte-compile-backward-word):
+	New functions, performing rewriting previously done in byte-opt.el.
+	Fix their "Fixme" item (restriction to numeric arguments).
 
 2007-04-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 
@@ -273,7 +640,7 @@
 
 	* cus-start.el <scroll-preserve-screen-position>: Add choices.
 
-2007-04-08  Johan Bockg,Ae(Brd  <bojohan+news@dd.chalmers.se>
+2007-04-08  Johan Bockg,Ae(Brd  <bojohan@dd.chalmers.se>
 
 	* term/xterm.el (terminal-init-xterm): Fix key definitions.
 	Add binding for C-M-SPC.
@@ -631,7 +998,7 @@
 	* textmodes/flyspell.el (flyspell-large-region):
 	Use ispell-call-process-region.
 
-2007-03-26  Johan Bockg,Ae(Brd  <bojohan+sf@dd.chalmers.se>
+2007-03-26  Johan Bockg,Ae(Brd  <bojohan@dd.chalmers.se>
 
 	* emacs-lisp/bytecomp.el (byte-compile-file-form-defmumble):
 	Use prin1 instead of princ.
@@ -5591,7 +5958,7 @@
 
 	* dired.el (dired-build-subdir-alist): Fix previous change.
 
-2006-10-01  Johan Bockg,Ae(Brd  <bojohan+mail@dd.chalmers.se>
+2006-10-01  Johan Bockg,Ae(Brd  <bojohan@dd.chalmers.se>
 
 	* simple.el (undo-elt-crosses-region): Fix the inequalities.
 
@@ -13380,8 +13747,8 @@
 
 2006-01-29  Edward O'Connor  <ted@oconnor.cx>
 
-	* emulation/viper.el (viper-major-mode-modifier-list): Add
-	insert-state and vi-state entries for erc-mode.
+	* emulation/viper.el (viper-major-mode-modifier-list):
+	Add insert-state and vi-state entries for erc-mode.
 	(viper-go-away, viper-set-hooks): Add and remove
 	viper-comint-mode-hook from erc-mode-hook as appropriate.
 
@@ -21291,7 +21658,7 @@
 
 	* net/newsticker.el: Get rid of CVS keyword.
 
-2005-09-19  Johan Bockg,Ae(Brd  <bojohan+sf@dd.chalmers.se>
+2005-09-19  Johan Bockg,Ae(Brd  <bojohan@dd.chalmers.se>
 
 	* dired-aux.el (dired-handle-overwrite): Don't use `format' here.
 	The prompt is formatted later.
@@ -30374,7 +30741,7 @@
 	(mail-directory-process defvar): Doc fix.
 	(mail-names): Doc fix.
 
-2005-03-25  Johan Bockg,Ae(Brd  <bojohan+mail@dd.chalmers.se>  (tiny change)
+2005-03-25  Johan Bockg,Ae(Brd  <bojohan@dd.chalmers.se>  (tiny change)
 
 	* textmodes/flyspell.el (mail-mode-flyspell-verify): Fix regexp syntax.
 
--- a/lisp/ChangeLog.8	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/ChangeLog.8	Fri May 11 18:24:42 2007 +0000
@@ -5354,12 +5354,12 @@
 
 	* international/mule.el (auto-coding-alist): Add .tgz.
 
-1999-05-2  Eli Zaretskii  <eliz@is.elta.co.il>
+1999-05-02  Eli Zaretskii  <eliz@is.elta.co.il>
 
 	* international/codepage.el (cp-coding-system-for-codepage-1):
 	Make the magnification parameter for the -dos encoder be 2.
 
-1999-05-2  Andrew Innes  <andrewi@gnu.org>
+1999-05-02  Andrew Innes  <andrewi@gnu.org>
 
 	* term/w32-win.el (w32-drag-n-drop): Select file in window where
 	it is dropped, rather than current window.
--- a/lisp/button.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/button.el	Fri May 11 18:24:42 2007 +0000
@@ -52,9 +52,12 @@
 ;; Globals
 
 ;; Use color for the MS-DOS port because it doesn't support underline.
+;; FIXME if MS-DOS correctly answers the (supports) question, it need
+;; no longer be a special case.
 (defface button '((((type pc) (class color))
 		   (:foreground "lightblue"))
-		  (t :underline t))
+		  (((supports :underline t)) :underline t)
+		  (t (:foreground "lightblue")))
   "Default face used for buttons."
   :group 'basic-faces)
 
--- a/lisp/calc/README	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/README	Fri May 11 18:24:42 2007 +0000
@@ -17,7 +17,7 @@
 	daveg@synaptics.com, uunet!synaptx!daveg
 
 Currently maintained by:
-     Jay Belanger <belanger@truman.edu>
+     Jay Belanger <jay.p.belanger@gmail.com>
 
 From the introduction to the manual:
 
@@ -59,7 +59,7 @@
 Calc is written entirely in Emacs Lisp, for maximum portability.
 
 I am anxious to hear about your experiences using Calc.  Send mail to
-"belanger@truman.edu".  A bug report is most useful if you include the
+"jay.p.belanger@gmail.com".  A bug report is most useful if you include the
 exact input and output that occurred, any modes in effect (such as the
 current precision), and so on.  If you find Calc is difficult to operate
 in any way, or if you have other suggestions, don't hesitate to let me
--- a/lisp/calc/calc-aent.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-aent.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: Dave Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-alg.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-alg.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger  <belanger@truman.edu>
+;; Maintainer: Jay Belanger  <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-arith.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-arith.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-bin.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-bin.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-comb.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-comb.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-cplx.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-cplx.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-embed.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-embed.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-ext.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-ext.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-fin.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-fin.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-forms.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-forms.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-frac.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-frac.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-funcs.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-funcs.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-graph.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-graph.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-help.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-help.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007  Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-incom.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-incom.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-keypd.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-keypd.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-lang.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-lang.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-macs.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-macs.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-map.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-map.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-math.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-math.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-misc.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-misc.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-mode.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-mode.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-mtx.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-mtx.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-poly.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-poly.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-prog.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-prog.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-rewr.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-rewr.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-rules.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-rules.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-sel.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-sel.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-stat.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-stat.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-store.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-store.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-stuff.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-stuff.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-trail.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-trail.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-undo.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-undo.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-units.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-units.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-vec.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-vec.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc-yank.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc-yank.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calc.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calc.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 ;; Keywords: convenience, extensions
 ;; Version: 2.1
 
@@ -401,7 +401,7 @@
   :group 'calc
   :type '(choice (string) (sexp)))
 
-(defvar calc-bug-address "belanger@truman.edu"
+(defvar calc-bug-address "jay.p.belanger@gmail.com"
   "Address of the maintainer of Calc, for use by `report-calc-bug'.")
 
 (defvar calc-scan-for-dels t
--- a/lisp/calc/calcalg2.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calcalg2.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calcalg3.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calcalg3.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calccomp.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calccomp.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calc/calcsel2.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calc/calcsel2.el	Fri May 11 18:24:42 2007 +0000
@@ -4,7 +4,7 @@
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
-;; Maintainer: Jay Belanger <belanger@truman.edu>
+;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/calendar/timeclock.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calendar/timeclock.el	Fri May 11 18:24:42 2007 +0000
@@ -5,7 +5,7 @@
 
 ;; Author: John Wiegley <johnw@gnu.org>
 ;; Created: 25 Mar 1999
-;; Version: 2.6
+;; Version: 2.6.1
 ;; Keywords: calendar data
 
 ;; This file is part of GNU Emacs.
@@ -304,8 +304,8 @@
                 ;; Update immediately so there is a visible change
                 ;; on calling this function.
                 (if display-time-mode (timeclock-update-modeline)
-                  (message "Activate `display-time-mode' to see \
-timeclock information"))
+                  (message "Activate `display-time-mode' or turn off \
+`timeclock-use-display-time' to see timeclock information"))
                 (add-hook 'display-time-hook 'timeclock-update-modeline))
 	    (setq timeclock-update-timer
 		  (run-at-time nil 60 'timeclock-update-modeline))))
@@ -375,8 +375,9 @@
 	(setq timeclock-discrepancy
 	      (- (or timeclock-discrepancy 0) workday))
 	(if (not (= workday timeclock-workday))
-	    (timeclock-log "h" (and (numberp arg)
-				    (number-to-string arg))))))
+	    (timeclock-log "h" (number-to-string
+				(/ workday (if (zerop (% workday (* 60 60)))
+					       60 60.0) 60))))))
     (timeclock-log "i" (or project
 			   (and timeclock-get-project-function
 				(or find-project (interactive-p))
@@ -588,6 +589,38 @@
 	(message "%s" string)
       string)))
 
+(defun timeclock-make-hours-explicit (old-default)
+  "Specify all workday lengths in `timeclock-file'.
+OLD-DEFAULT hours are set for every day that has no number indicated."
+  (interactive "P")
+  (if old-default (setq old-default (prefix-numeric-value old-default))
+    (error "timelog-make-hours-explicit requires an explicit argument"))
+  (let ((extant-timelog (find-buffer-visiting timeclock-file))
+	current-date)
+    (with-current-buffer (find-file-noselect timeclock-file t)
+      (unwind-protect
+	  (save-excursion
+	    (save-restriction
+	      (widen)
+	      (goto-char (point-min))
+	      (while (progn (skip-chars-forward "\n") (not (eobp)))
+		;; This is just a variant of `timeclock-moment-regexp'.
+		(unless (looking-at
+			 (concat "^\\([bhioO]\\) \\([0-9]+/[0-9]+/[0-9]+\\) "
+				 "\\([0-9]+:[0-9]+:[0-9]+\\)"))
+		  (error "Can't parse `%s'" timeclock-file))
+		(let ((this-date (match-string 2)))
+		  (unless (or (and current-date
+				   (string= this-date current-date))
+			      (string= (match-string 1) "h"))
+		    (insert (format "h %s %s %s\n" (match-string 2)
+				    (match-string 3) old-default)))
+		  (if (string-match "^[ih]" (match-string 1)) ; ignore logouts
+		      (setq current-date this-date)))
+		(forward-line))
+	      (save-buffer)))
+	(unless extant-timelog (kill-buffer (current-buffer)))))))
+
 ;;; Internal Functions:
 
 (defvar timeclock-project-list nil)
@@ -651,31 +684,34 @@
   "Log the event CODE to the timeclock log, at the time of call.
 If PROJECT is a string, it represents the project which the event is
 being logged for.  Normally only \"in\" events specify a project."
-  (with-current-buffer (find-file-noselect timeclock-file)
-    (goto-char (point-max))
-    (if (not (bolp))
-	(insert "\n"))
-    (let ((now (current-time)))
-      (insert code " "
-	      (format-time-string "%Y/%m/%d %H:%M:%S" now)
-	      (or (and project
-		       (stringp project)
-		       (> (length project) 0)
-		       (concat " " project))
-		  "")
-	      "\n")
-      (if (equal (downcase code) "o")
-	  (setq timeclock-last-period
-		(- (timeclock-time-to-seconds now)
-		   (timeclock-time-to-seconds
-		    (cadr timeclock-last-event)))
-		timeclock-discrepancy
-		(+ timeclock-discrepancy
-		   timeclock-last-period)))
-      (setq timeclock-last-event (list code now project)))
-    (save-buffer)
-    (run-hooks 'timeclock-event-hook)
-    (kill-buffer (current-buffer))))
+  (let ((extant-timelog (find-buffer-visiting timeclock-file)))
+    (with-current-buffer (find-file-noselect timeclock-file t)
+      (save-excursion
+	(save-restriction
+	  (widen)
+	  (goto-char (point-max))
+	  (if (not (bolp))
+	      (insert "\n"))
+	  (let ((now (current-time)))
+	    (insert code " "
+		    (format-time-string "%Y/%m/%d %H:%M:%S" now)
+		    (or (and (stringp project)
+			     (> (length project) 0)
+			     (concat " " project))
+			"")
+		    "\n")
+	    (if (equal (downcase code) "o")
+		(setq timeclock-last-period
+		      (- (timeclock-time-to-seconds now)
+			 (timeclock-time-to-seconds
+			  (cadr timeclock-last-event)))
+		      timeclock-discrepancy
+		      (+ timeclock-discrepancy
+			 timeclock-last-period)))
+	    (setq timeclock-last-event (list code now project)))))
+      (save-buffer)
+      (unless extant-timelog (kill-buffer (current-buffer)))))
+  (run-hooks 'timeclock-event-hook))
 
 (defvar timeclock-moment-regexp
   (concat "\\([bhioO]\\)\\s-+"
@@ -1147,8 +1183,8 @@
     (setcar (nthcdr 2 decoded) 0)
     (apply 'encode-time decoded)))
 
-(defun timeclock-geometric-mean (l)
-  "Compute the geometric mean of the values in the list L."
+(defun timeclock-mean (l)
+  "Compute the arithmetic mean of the values in the list L."
   (let ((total 0)
 	(count 0))
     (while l
@@ -1163,7 +1199,7 @@
   "Generate a summary report based on the current timelog file.
 By default, the report is in plain text, but if the optional argument
 HTML-P is non-nil, HTML markup is added."
-  (interactive)
+  (interactive "P")
   (let ((log (timeclock-log-data))
 	(today (timeclock-day-base)))
     (if html-p (insert "<p>"))
@@ -1295,14 +1331,10 @@
 	  ;; average statistics
 	  (let ((i 0) (l 5))
 	    (while (< i l)
-	      (aset time-in i (timeclock-geometric-mean
-			       (cdr (aref time-in i))))
-	      (aset time-out i (timeclock-geometric-mean
-				(cdr (aref time-out i))))
-	      (aset breaks i (timeclock-geometric-mean
-			      (cdr (aref breaks i))))
-	      (aset workday i (timeclock-geometric-mean
-			       (cdr (aref workday i))))
+	      (aset time-in i (timeclock-mean (cdr (aref time-in i))))
+	      (aset time-out i (timeclock-mean (cdr (aref time-out i))))
+	      (aset breaks i (timeclock-mean (cdr (aref breaks i))))
+	      (aset workday i (timeclock-mean (cdr (aref workday i))))
 	      (setq i (1+ i))))
 	  ;; Output the HTML table
 	  (insert "<tr>\n")
--- a/lisp/calendar/todo-mode.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/calendar/todo-mode.el	Fri May 11 18:24:42 2007 +0000
@@ -205,7 +205,7 @@
 ;;     	by the binary insertion algorithm.  However, you may not
 ;;     	really have a need for such accurate priorities amongst your
 ;;     	TODO items.  If you now think about the binary insertion
-;;     	halfing the size of the window each time, then the threshold
+;;     	halving the size of the window each time, then the threshold
 ;;     	is the window size at which it will stop.  If you set the
 ;;     	threshold to zero, the upper and lower bound will coincide at
 ;;     	the end of the loop and you will insert your item just before
@@ -231,7 +231,7 @@
 ;;          an event (unless marked by &)
 ;;      o   The optional COUNT variable of todo-forward-item should be
 ;;          applied to the other functions performing similar tasks
-;;      o   Modularization could be done for repeaded elements of
+;;      o   Modularization could be done for repeated elements of
 ;;          the code, like the completing-read lines of code.
 ;;	o   license / version function
 ;;	o   export to diary file
@@ -241,7 +241,7 @@
 ;;          outline mode)
 ;;	o   rewrite complete package to store data as lisp objects
 ;;          and have display modes for display, for diary export,
-;;          etc. (Richard Stallman pointed out this is a bad idea)
+;;          etc.  (Richard Stallman pointed out this is a bad idea)
 ;;      o   so base todo-mode.el on generic-mode.el instead
 ;;
 ;;  History and Gossip
@@ -254,7 +254,7 @@
 ;;	things to my parents' address!
 ;;
 ;;	Oliver Seidel
-;;	(Lessingstr. 8, 65760 Eschborn, Federal Republic of Germany)
+;;	(Lessingstr.  8, 65760 Eschborn, Federal Republic of Germany)
 
 ;;; Code:
 
@@ -280,7 +280,7 @@
 diary.  With the default value \"*/*\" the diary displays each entry
 every day and it may also be marked on every day of the calendar.
 Using \"&%%(equal (calendar-current-date) date)\" instead will only
-show and mark todo entreis for today, but may slow down processing of
+show and mark todo entries for today, but may slow down processing of
 the diary file somewhat."
   :type 'string
   :group 'todo)
@@ -306,7 +306,7 @@
 If you have 8 items in your TODO list, then you may get asked 4
 questions by the binary insertion algorithm.  However, you may not
 really have a need for such accurate priorities amongst your TODO
-items.  If you now think about the binary insertion halfing the size
+items.  If you now think about the binary insertion halving the size
 of the window each time, then the threshold is the window size at
 which it will stop.  If you set the threshold to zero, the upper and
 lower bound will coincide at the end of the loop and you will insert
--- a/lisp/custom.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/custom.el	Fri May 11 18:24:42 2007 +0000
@@ -331,7 +331,7 @@
 
 SPEC should be an alist of the form ((DISPLAY ATTS)...).
 
-In the first element, DISPLAY can be :default.  The ATTS in that
+In the first element, DISPLAY can be `default'.  The ATTS in that
 element then act as defaults for all the following elements.
 
 Aside from that, DISPLAY specifies conditions to match some or
@@ -341,7 +341,7 @@
 elements are ignored, on that frame.
 
 In the last element, DISPLAY can be t.  That element applies to a
-frame if none of the previous elements (except the :default if
+frame if none of the previous elements (except the `default' if
 any) did.
 
 ATTS is a list of face attributes followed by their values:
@@ -351,7 +351,7 @@
 `:slant', `:underline', `:overline', `:strike-through', `:box',
 `:foreground', `:background', `:stipple', `:inverse-video', and `:inherit'.
 
-DISPLAY can be `:default' (only in the first element), the symbol
+DISPLAY can be `default' (only in the first element), the symbol
 t (only in the last element) to match all frames, or an alist of
 conditions of the form \(REQ ITEM...).  For such an alist to
 match a frame, each of the conditions must be satisfied, meaning
--- a/lisp/dabbrev.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/dabbrev.el	Fri May 11 18:24:42 2007 +0000
@@ -128,7 +128,7 @@
 		 (const :tag "off" nil))
   :group 'dabbrev)
 
-(defcustom dabbrev--eliminate-newlines t
+(defcustom dabbrev-eliminate-newlines t
   "*Non-nil means dabbrev should not insert newlines.
 Instead it converts them to spaces."
   :type 'boolean
@@ -913,10 +913,12 @@
 			  ((equal abbrev (downcase abbrev)) 'downcase)))))
 
     ;; Convert whitespace to single spaces.
-    (if dabbrev--eliminate-newlines
-	;; Start searching at end of ABBREV so that any whitespace
-	;; carried over from the existing text is not changed.
-	(let ((pos (length abbrev)))
+    (if dabbrev-eliminate-newlines
+	(let ((pos
+	       (if (equal abbrev " ") 0 (length abbrev))))
+	  ;; If ABBREV is real, search after the end of it.
+	  ;; If ABBREV is space and we are copying successive words,
+	  ;; search starting at the front.
 	  (while (string-match "[\n \t]+" expansion pos)
 	    (setq pos (1+ (match-beginning 0)))
 	    (setq expansion (replace-match " " nil nil expansion)))))
--- a/lisp/diff-mode.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/diff-mode.el	Fri May 11 18:24:42 2007 +0000
@@ -72,7 +72,7 @@
   :group 'diff-mode)
 
 (defcustom diff-jump-to-old-file nil
-  "*Non-nil means `diff-goto-source' jumps to the old file.
+  "Non-nil means `diff-goto-source' jumps to the old file.
 Else, it jumps to the new file."
   :type 'boolean
   :group 'diff-mode)
@@ -1276,7 +1276,7 @@
 	(if (> (- (car forw) orig) (- orig (car back))) back forw)
       (or back forw))))
 
-(defsubst diff-xor (a b) (if a (not b) b))
+(defsubst diff-xor (a b) (if a (if (not b) a) b))
 
 (defun diff-find-source-location (&optional other-file reverse)
   "Find out (BUF LINE-OFFSET POS SRC DST SWITCHED).
@@ -1358,8 +1358,15 @@
 With a prefix argument, REVERSE the hunk."
   (interactive "P")
   (destructuring-bind (buf line-offset pos old new &optional switched)
-      ;; If REVERSE go to the new file, otherwise go to the old.
-      (diff-find-source-location (not reverse) reverse)
+      ;; Sometimes we'd like to have the following behavior: if REVERSE go
+      ;; to the new file, otherwise go to the old.  But that means that by
+      ;; default we use the old file, which is the opposite of the default
+      ;; for diff-goto-source, and is thus confusing.  Also when you don't
+      ;; know about it it's pretty surprising.
+      ;; TODO: make it possible to ask explicitly for this behavior.
+      ;; 
+      ;; This is duplicated in diff-test-hunk.
+      (diff-find-source-location nil reverse)
     (cond
      ((null line-offset)
       (error "Can't find the text to patch"))
@@ -1403,8 +1410,7 @@
 With a prefix argument, try to REVERSE the hunk."
   (interactive "P")
   (destructuring-bind (buf line-offset pos src dst &optional switched)
-      ;; If REVERSE go to the new file, otherwise go to the old.
-      (diff-find-source-location (not reverse) reverse)
+      (diff-find-source-location nil reverse)
     (set-window-point (display-buffer buf) (+ (car pos) (cdr src)))
     (diff-hunk-status-msg line-offset (diff-xor reverse switched) t)))
 
--- a/lisp/diff.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/diff.el	Fri May 11 18:24:42 2007 +0000
@@ -124,9 +124,13 @@
 	(erase-buffer))
       (buffer-enable-undo (current-buffer))
       (diff-mode)
+      ;; Use below 2 vars for backward-compatibility.
+      (set (make-local-variable 'diff-old-file) old)
+      (set (make-local-variable 'diff-new-file) new)
+      (set (make-local-variable 'diff-extra-args) (list switches no-async))
       (set (make-local-variable 'revert-buffer-function)
-	   `(lambda (ignore-auto noconfirm)
-	      (diff ',old ',new ',switches ',no-async)))
+	   (lambda (ignore-auto noconfirm)
+             (apply 'diff diff-old-file diff-new-file diff-extra-args)))
       (set (make-local-variable 'diff-old-temp-file) old-alt)
       (set (make-local-variable 'diff-new-temp-file) new-alt)
       (setq default-directory thisdir)
@@ -186,5 +190,5 @@
 
 (provide 'diff)
 
-;;; arch-tag: 7de2c29b-7ea5-4b85-9b9d-72dd860de2bd
+;; arch-tag: 7de2c29b-7ea5-4b85-9b9d-72dd860de2bd
 ;;; diff.el ends here
--- a/lisp/dired-x.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/dired-x.el	Fri May 11 18:24:42 2007 +0000
@@ -45,8 +45,12 @@
 ;; (add-hook 'dired-load-hook
 ;;           (function (lambda ()
 ;;                       (load "dired-x")
-;;                       ;; Set variables here.  For example:
+;;                       ;; Set global variables here.  For example:
 ;;                       ;; (setq dired-guess-shell-gnutar "gtar")
+;;                       )))
+;; (add-hook 'dired-mode-hook
+;;           (function (lambda ()
+;;                       ;; Set buffer-local variables here.  For example:
 ;;                       ;; (dired-omit-mode 1)
 ;;                       )))
 ;;
@@ -790,21 +794,18 @@
     (revert-buffer)))
 
 ;; A zero-arg version of dired-virtual.
-;; You need my modified version of set-auto-mode for the
-;; `buffer-contents-mode-alist'.
-;; Or you use infer-mode.el and infer-mode-alist, same syntax.
 (defun dired-virtual-mode ()
   "Put current buffer into Virtual Dired mode (see `dired-virtual').
-Useful on `buffer-contents-mode-alist' (which see) with the regexp
+Useful on `magic-mode-alist' with the regexp
 
-    \"^  \\(/[^ /]+\\)/?+:$\"
+  \"^  \\\\(/[^ /]+\\\\)+/?:$\"
 
 to put saved dired buffers automatically into Virtual Dired mode.
 
-Also useful for `auto-mode-alist' (which see) like this:
+Also useful for `auto-mode-alist' like this:
 
-  \(setq auto-mode-alist (cons '(\"[^/]\\.dired\\'\" . dired-virtual-mode)
-                              auto-mode-alist)\)"
+  (add-to-list 'auto-mode-alist
+               '(\"[^/]\\\\.dired\\\\'\" . dired-virtual-mode))"
   (interactive)
   (dired-virtual (dired-virtual-guess-dir)))
 
@@ -1126,11 +1127,17 @@
   :group 'dired-x
   :type '(alist :key-type regexp :value-type (repeat sexp)))
 
+(defcustom dired-guess-shell-case-fold-search t
+  "If non-nil, `dired-guess-shell-alist-default' and
+`dired-guess-shell-alist-user' are matched case-insensitively."
+  :group 'dired-x
+  :type 'boolean)
+
 (defun dired-guess-default (files)
   "Guess a shell commands for FILES.  Return command or list of commands.
 See `dired-guess-shell-alist-user'."
 
-  (let* ((case-fold-search t)
+  (let* ((case-fold-search dired-guess-shell-case-fold-search)
          ;; Prepend the user's alist to the default alist.
          (alist (append dired-guess-shell-alist-user
                         dired-guess-shell-alist-default))
--- a/lisp/dired.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/dired.el	Fri May 11 18:24:42 2007 +0000
@@ -1251,19 +1251,19 @@
     (define-key map "\177" 'dired-unmark-backward)
     (define-key map [remap undo] 'dired-undo)
     (define-key map [remap advertised-undo] 'dired-undo)
-    ;; thumbnail manipulation (tumme)
-    (define-key map "\C-td" 'tumme-display-thumbs)
-    (define-key map "\C-tt" 'tumme-tag-files)
-    (define-key map "\C-tr" 'tumme-delete-tag)
-    (define-key map "\C-tj" 'tumme-jump-thumbnail-buffer)
-    (define-key map "\C-ti" 'tumme-dired-display-image)
-    (define-key map "\C-tx" 'tumme-dired-display-external)
-    (define-key map "\C-ta" 'tumme-display-thumbs-append)
-    (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)
-    (define-key map "\C-te" 'tumme-dired-edit-comment-and-tags)
+    ;; thumbnail manipulation (image-dired)
+    (define-key map "\C-td" 'image-dired-display-thumbs)
+    (define-key map "\C-tt" 'image-dired-tag-files)
+    (define-key map "\C-tr" 'image-dired-delete-tag)
+    (define-key map "\C-tj" 'image-dired-jump-thumbnail-buffer)
+    (define-key map "\C-ti" 'image-dired-dired-display-image)
+    (define-key map "\C-tx" 'image-dired-dired-display-external)
+    (define-key map "\C-ta" 'image-dired-display-thumbs-append)
+    (define-key map "\C-t." 'image-dired-display-thumb)
+    (define-key map "\C-tc" 'image-dired-dired-comment-files)
+    (define-key map "\C-tf" 'image-dired-mark-tagged-files)
+    (define-key map "\C-t\C-t" 'image-dired-dired-insert-marked-thumbs)
+    (define-key map "\C-te" 'image-dired-dired-edit-comment-and-tags)
 
     ;; Make menu bar items.
 
@@ -1310,12 +1310,12 @@
       (cons "Immediate" (make-sparse-keymap "Immediate")))
 
     (define-key map
-      [menu-bar immediate tumme-dired-display-external]
-      '(menu-item "Display Image Externally" tumme-dired-display-external
+      [menu-bar immediate image-dired-dired-display-external]
+      '(menu-item "Display Image Externally" image-dired-dired-display-external
                   :help "Display image in external viewer"))
     (define-key map
-      [menu-bar immediate tumme-dired-display-image]
-      '(menu-item "Display Image" tumme-dired-display-image
+      [menu-bar immediate image-dired-dired-display-image]
+      '(menu-item "Display Image" image-dired-dired-display-image
                   :help "Display sized image in a separate window"))
 
     (define-key map [menu-bar immediate dashes-4]
@@ -1358,8 +1358,8 @@
       (cons "Regexp" (make-sparse-keymap "Regexp")))
 
     (define-key map
-      [menu-bar regexp tumme-mark-tagged-files]
-      '(menu-item "Mark From Image Tag..." tumme-mark-tagged-files
+      [menu-bar regexp image-dired-mark-tagged-files]
+      '(menu-item "Mark From Image Tag..." image-dired-mark-tagged-files
                   :help "Mark files whose image tags matches regexp"))    
     
     (define-key map [menu-bar regexp dashes-1]
@@ -1456,21 +1456,21 @@
       '("--"))
 
     (define-key map
-      [menu-bar operate tumme-delete-tag]
-      '(menu-item "Delete Image Tag..." tumme-delete-tag
+      [menu-bar operate image-dired-delete-tag]
+      '(menu-item "Delete Image Tag..." image-dired-delete-tag
                   :help "Delete image tag from current or marked files"))
     (define-key map
-      [menu-bar operate tumme-tag-files]
-      '(menu-item "Add Image Tags..." tumme-tag-files
+      [menu-bar operate image-dired-tag-files]
+      '(menu-item "Add Image Tags..." image-dired-tag-files
                   :help "Add image tags to current or marked files"))
     (define-key map
-      [menu-bar operate tumme-dired-comment-files]
-      '(menu-item "Add Image Comment..." tumme-dired-comment-files
+      [menu-bar operate image-dired-dired-comment-files]
+      '(menu-item "Add Image Comment..." image-dired-dired-comment-files
                   :help "Add image comment to current or marked files"))
     (define-key map
-      [menu-bar operate tumme-display-thumbs]
-      '(menu-item "Display Thumbnails" tumme-display-thumbs
-                  :help "Display thumbnails for current or marked image files"))
+      [menu-bar operate image-dired-display-thumbs]
+      '(menu-item "Display Image-Dired" image-dired-display-thumbs
+                  :help "Display image-dired for current or marked image files"))
     
     (define-key map [menu-bar operate dashes-3]
       '("--"))    
--- a/lisp/emacs-lisp/advice.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/emacs-lisp/advice.el	Fri May 11 18:24:42 2007 +0000
@@ -2467,23 +2467,11 @@
   "Take a macro function DEFINITION and make a lambda out of it."
   `(cdr ,definition))
 
-;; There is no way to determine whether some subr is a special form or not,
-;; hence we need this list (which is probably out of date):
-(defvar ad-special-forms
-  (let ((tem '(and catch cond condition-case defconst defmacro
-		   defun defvar function if interactive let let*
-		   or prog1 prog2 progn quote save-current-buffer
-		   save-excursion save-restriction save-window-excursion
-		   setq setq-default unwind-protect while
-		   with-output-to-temp-buffer)))
-    ;; track-mouse could be void in some configurations.
-    (if (fboundp 'track-mouse)
-	(push 'track-mouse tem))
-    (mapcar 'symbol-function tem)))
-
-(defmacro ad-special-form-p (definition)
-  ;;"non-nil if DEFINITION is a special form."
-  (list 'memq definition 'ad-special-forms))
+(defun ad-special-form-p (definition)
+  "Non-nil iff DEFINITION is a special form."
+  (if (and (symbolp definition) (fboundp definition))
+      (setq definition (indirect-function definition)))
+  (and (subrp definition) (eq (cdr (subr-arity definition)) 'unevalled)))
 
 (defmacro ad-interactive-p (definition)
   ;;"non-nil if DEFINITION can be called interactively."
--- a/lisp/emacs-lisp/easy-mmode.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/emacs-lisp/easy-mmode.el	Fri May 11 18:24:42 2007 +0000
@@ -197,7 +197,7 @@
 
 	  (let ((base-doc-string
                  (concat "Non-nil if %s is enabled.
-See the command `%s' for a description of this minor-mode."
+See the command `%s' for a description of this minor mode."
                          (if body "
 Setting this variable directly does not take effect;
 either customize it (see the info node `Easy Customization')
@@ -327,11 +327,12 @@
        (make-variable-buffer-local ',MODE-major-mode)
        ;; The actual global minor-mode
        (define-minor-mode ,global-mode
-	 ,(format "Toggle %s in every buffer.
+	 ,(format "Toggle %s in every possible buffer.
 With prefix ARG, turn %s on if and only if ARG is positive.
-%s is actually not turned on in every buffer but only in those
-in which `%s' turns it on."
-		  pretty-name pretty-global-name pretty-name turn-on)
+%s is enabled in all buffers where `%s' would do it.
+See `%s' for more information on %s."
+		  pretty-name pretty-global-name pretty-name turn-on
+		  mode pretty-name)
 	 :global t ,@group ,@(nreverse extra-keywords)
 
 	 ;; Setup hook to handle future mode changes and new buffers.
--- a/lisp/emacs-lisp/eldoc.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/emacs-lisp/eldoc.el	Fri May 11 18:24:42 2007 +0000
@@ -157,7 +157,7 @@
 
 ;;;###autoload
 (defun turn-on-eldoc-mode ()
-  "Unequivocally turn on eldoc-mode (see variable documentation)."
+  "Unequivocally turn on ElDoc mode (see command `eldoc-mode')."
   (interactive)
   (eldoc-mode 1))
 
--- a/lisp/emacs-lisp/sregex.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/emacs-lisp/sregex.el	Fri May 11 18:24:42 2007 +0000
@@ -436,11 +436,11 @@
   or end of a word.
 
 - the symbol `bow'
-  Stands for \"\\\\\\=<\", matching the empty string at the beginning of a
+  Stands for \"\\\\=\\<\", matching the empty string at the beginning of a
   word.
 
 - the symbol `eow'
-  Stands for \"\\\\\\=>\", matching the empty string at the end of a word.
+  Stands for \"\\\\=\\>\", matching the empty string at the end of a word.
 
 - the symbol `wordchar'
   Stands for the regex \"\\\\w\", matching a word-constituent character
--- a/lisp/files.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/files.el	Fri May 11 18:24:42 2007 +0000
@@ -2123,19 +2123,20 @@
   `((image-type-auto-detected-p . image-mode)
     ;; 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.
+    ;; We use [ \t\r\n] instead of `\\s ' to make regex overflow less likely.
     (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)")
-	     (comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\n]*<\\)")))
-	(concat "\\(?:<\\?xml[ \t\n]+[^>]*>\\)?[ \t\n]*<"
+	     (comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\r\n]*<\\)")))
+	(concat "\\(?:<\\?xml[ \t\r\n]+[^>]*>\\)?[ \t\r\n]*<"
 		comment-re "*"
-		"\\(?:!DOCTYPE[ \t\n]+[^>]*>[ \t\n]*<[ \t\n]*" comment-re "*\\)?"
+		"\\(?:!DOCTYPE[ \t\r\n]+[^>]*>[ \t\r\n]*<[ \t\r\n]*" comment-re "*\\)?"
 		"[Hh][Tt][Mm][Ll]"))
      . html-mode)
+    ("<!DOCTYPE[ \t\r\n]+[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 "*-->[ \t\n]*<\\)")))
-	(concat "[ \t\n]*<" comment-re "*!DOCTYPE "))
+	     (comment-re (concat "\\(?:!--" incomment-re "*-->[ \t\r\n]*<\\)")))
+	(concat "[ \t\r\n]*<" comment-re "*!DOCTYPE "))
      . sgml-mode)
     ("%!PS" . ps-mode)
     ("# xmcd " . conf-unix-mode))
@@ -2150,8 +2151,21 @@
 \"allow `auto-mode-alist' to decide for these files.\")")
 (put 'magic-mode-alist 'risky-local-variable t)
 
+(defvar file-start-mode-alist
+  nil
+  "Like `magic-mode-alist' but has lower priority than `auto-mode-alist'.
+Each element looks like (REGEXP . FUNCTION) or (MATCH-FUNCTION . FUNCTION).
+After visiting a file, if REGEXP matches the text at the beginning of the
+buffer, or calling MATCH-FUNCTION returns non-nil, `normal-mode' will
+call FUNCTION, provided that `magic-mode-alist' and `auto-mode-alist'
+have not specified a mode for this file.
+
+If FUNCTION is nil, then it is not called.")
+(put 'file-start-mode-alist 'risky-local-variable t)
+
 (defvar magic-mode-regexp-match-limit 4000
-  "Upper limit on `magic-mode-alist' regexp matches.")
+  "Upper limit on `magic-mode-alist' regexp matches.
+Also applies to `file-start-mode-alist'.")
 
 (defun set-auto-mode (&optional keep-mode-if-same)
   "Select major mode appropriate for current buffer.
@@ -2206,10 +2220,10 @@
 	      (or (set-auto-mode-0 mode keep-mode-if-same)
 		  ;; continuing would call minor modes again, toggling them off
 		  (throw 'nop nil))))))
+    ;; If we didn't, look for an interpreter specified in the first line.
+    ;; As a special case, allow for things like "#!/bin/env perl", which
+    ;; finds the interpreter anywhere in $PATH.
     (unless done
-      ;; If we didn't, look for an interpreter specified in the first line.
-      ;; As a special case, allow for things like "#!/bin/env perl", which
-      ;; finds the interpreter anywhere in $PATH.
       (setq mode (save-excursion
 		   (goto-char (point-min))
 		   (if (looking-at auto-mode-interpreter-regexp)
@@ -2222,7 +2236,7 @@
       ;; If we found an interpreter mode to use, invoke it now.
       (if done
 	  (set-auto-mode-0 (cdr done) keep-mode-if-same)))
-    ;; If we didn't, match the buffer beginning against magic-mode-alist.
+    ;; Next try matching the buffer beginning against magic-mode-alist.
     (unless done
       (if (setq done (save-excursion
 		       (goto-char (point-min))
@@ -2235,39 +2249,55 @@
 					  (if (functionp re)
 					      (funcall re)
 					    (looking-at re)))))))
-	  (set-auto-mode-0 done keep-mode-if-same)
-	;; Compare the filename against the entries in auto-mode-alist.
-	(if buffer-file-name
-	    (let ((name buffer-file-name))
-	      ;; Remove backup-suffixes from file name.
-	      (setq name (file-name-sans-versions name))
-	      (while name
-		;; Find first matching alist entry.
-		(setq mode
-		      (if (memq system-type '(vax-vms windows-nt cygwin))
-			  ;; System is case-insensitive.
-			  (let ((case-fold-search t))
-			    (assoc-default name auto-mode-alist
-					   'string-match))
-			;; System is case-sensitive.
-			(or
-			 ;; First match case-sensitively.
-			 (let ((case-fold-search nil))
-			   (assoc-default name auto-mode-alist
-					  'string-match))
-			 ;; Fallback to case-insensitive match.
-			 (and auto-mode-case-fold
-			      (let ((case-fold-search t))
-				(assoc-default name auto-mode-alist
-					       'string-match))))))
-		(if (and mode
-			 (consp mode)
-			 (cadr mode))
-		    (setq mode (car mode)
-			  name (substring name 0 (match-beginning 0)))
-		  (setq name))
-		(when mode
-		  (set-auto-mode-0 mode keep-mode-if-same)))))))))
+	  (set-auto-mode-0 done keep-mode-if-same)))
+    ;; Next compare the filename against the entries in auto-mode-alist.
+    (unless done
+      (if buffer-file-name
+	  (let ((name buffer-file-name))
+	    ;; Remove backup-suffixes from file name.
+	    (setq name (file-name-sans-versions name))
+	    (while name
+	      ;; Find first matching alist entry.
+	      (setq mode
+		    (if (memq system-type '(vax-vms windows-nt cygwin))
+			;; System is case-insensitive.
+			(let ((case-fold-search t))
+			  (assoc-default name auto-mode-alist
+					 'string-match))
+		      ;; System is case-sensitive.
+		      (or
+		       ;; First match case-sensitively.
+		       (let ((case-fold-search nil))
+			 (assoc-default name auto-mode-alist
+					'string-match))
+		       ;; Fallback to case-insensitive match.
+		       (and auto-mode-case-fold
+			    (let ((case-fold-search t))
+			      (assoc-default name auto-mode-alist
+					     'string-match))))))
+	      (if (and mode
+		       (consp mode)
+		       (cadr mode))
+		  (setq mode (car mode)
+			name (substring name 0 (match-beginning 0)))
+		(setq name))
+	      (when mode
+		(set-auto-mode-0 mode keep-mode-if-same)
+		(setq done t))))))
+    ;; Next try matching the buffer beginning against file-start-mode-alist.
+    (unless done
+      (if (setq done (save-excursion
+		       (goto-char (point-min))
+		       (save-restriction
+			 (narrow-to-region (point-min)
+					   (min (point-max)
+						(+ (point-min) magic-mode-regexp-match-limit)))
+			 (assoc-default nil file-start-mode-alist
+					(lambda (re dummy)
+					  (if (functionp re)
+					      (funcall re)
+					    (looking-at re)))))))
+	  (set-auto-mode-0 done keep-mode-if-same)))))
 
 ;; When `keep-mode-if-same' is set, we are working on behalf of
 ;; set-visited-file-name.  In that case, if the major mode specified is the
--- a/lisp/find-dired.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/find-dired.el	Fri May 11 18:24:42 2007 +0000
@@ -257,7 +257,7 @@
 		  (delete-region (point) (- (point) 2)))
 		;; Find all the complete lines in the unprocessed
 		;; output and process it to add text properties.
-		(goto-char end)
+		(goto-char (point-max))
 		(if (search-backward "\n" (process-mark proc) t)
 		    (progn
 		      (dired-insert-set-properties (process-mark proc)
--- a/lisp/font-lock.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/font-lock.el	Fri May 11 18:24:42 2007 +0000
@@ -468,6 +468,7 @@
 
 This is normally set via `font-lock-add-keywords' and
 `font-lock-remove-keywords'.")
+(put 'font-lock-keywords-alist 'risky-local-variable t)
 
 (defvar font-lock-removed-keywords-alist nil
   "Alist of `font-lock-keywords' elements to be removed for major modes.
--- a/lisp/gnus/ChangeLog	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/gnus/ChangeLog	Fri May 11 18:24:42 2007 +0000
@@ -1,3 +1,9 @@
+2007-05-09  Didier Verna  <didier@xemacs.org>
+
+	* gnus-diary.el, nndiary.el: Remove the description comment (nndiary is
+	now properly documented in the Gnus manual).  Fix the spelling of "Back
+	End".
+
 2007-04-19  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* gnus-art.el (gnus-mime-strip-charset-parameters): New function.
--- a/lisp/gnus/gnus-diary.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/gnus/gnus-diary.el	Fri May 11 18:24:42 2007 +0000
@@ -1,4 +1,4 @@
-;;; gnus-diary.el --- Wrapper around the NNDiary Gnus backend
+;;; gnus-diary.el --- Wrapper around the NNDiary Gnus back end
 
 ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005,
 ;;   2006, 2007  Free Software Foundation, Inc.
@@ -33,63 +33,8 @@
 ;; Description:
 ;; ===========
 
-;; Gnus-Diary is a wrapper around the NNDiary Gnus backend.  It is here to
-;; make your nndiary-user life easier in different ways.  So, you don't have
-;; to use it if you don't want to.  But, really, you should.
-
-;; Gnus-Diary offers the following features on top of the NNDiary backend:
-
-;;  - A nice summary line format:
-;;    Displaying diary messages in standard summary line format (usually
-;;    something like "<From Joe>: <Subject>") is pretty useless.  Most of the
-;;    time, you're the one who wrote the message, and you mostly want to see
-;;    the event's date.  Gnus-Diary offers you a nice summary line format
-;;    which will do this.  By default, a summary line will appear like this:
-;;
-;;     <Event Date>: <Subject> <Remaining time>
-;;
-;;   for example, here's how Joe's birthday is displayed in my
-;;   "nndiary:birhdays" summary buffer (the message is expirable, but will
-;;   never be deleted, as it specifies a regular event):
-;;
-;;   E  Sat, Sep 22 01, 12:00: Joe's birthday (in 6 months, 1 week)
-
-;;  - More article sorting functions:
-;;    Gnus-Diary adds a new sorting function called
-;;    `gnus-summary-sort-by-schedule'.  This function lets you organize your
-;;    diary summary buffers from the closest event to the farthest one.
-
-;;  - Automatic generation of diary group parameters:
-;;    When you create a new diary group, or visit one, Gnus-Diary checks your
-;;    group parameters, and if needed, sets the summary line format to the
-;;    diary-specific value, adds the diary-specific sorting functions, and
-;;    also adds the different `X-Diary-*' headers to the group's
-;;    posting-style.  It is then easier to send a diary message, because if
-;;    you use `C-u a' or `C-u m' on a diary group to prepare a message, these
-;;    headers will be inserted automatically (but not filled with proper
-;;    values yet).
-
-;;  - An interactive mail-to-diary convertion function:
-;;    The function `gnus-diary-check-message' ensures that the current message
-;;    contains all the required diary headers, and prompts you for values /
-;;    correction if needed.  This function is hooked in the nndiary backend so
-;;    that moving an article to an nndiary group will trigger it
-;;    automatically.  It is also bound to `C-c D c' in message-mode and
-;;    article-edit-mode in order to ease the process of converting a usual
-;;    mail to a diary one.  This function takes a prefix argument which will
-;;    force prompting of all diary headers, regardless of their
-;;    presence/validity.  That way, you can very easily reschedule a diary
-;;    message for instance.
-
-
-;; Usage:
-;; =====
-
-;; 0/ Don't use any `gnus-user-format-function-[d|D]'.  Gnus-Diary provides
-;;    both of these (sorry if you used them before).
-;; 1/ Add '(require 'gnus-diary) to your gnusrc file.
-;; 2/ Customize your gnus-diary options to suit your needs.
-
+;; gnus-diary is a utility toolkit used on top of the nndiary back end. It is
+;; now fully documented in the Gnus manual.
 
 
 ;; Bugs / Todo:
@@ -103,7 +48,7 @@
 (require 'gnus-art)
 
 (defgroup gnus-diary nil
-  "Utilities on top of the nndiary backend for Gnus."
+  "Utilities on top of the nndiary back end for Gnus."
   :version "22.1"
   :group 'gnus)
 
@@ -136,7 +81,7 @@
   :group 'gnus-diary)
 
 (defconst gnus-diary-version nndiary-version
-  "Current Diary backend version.")
+  "Current Diary back end version.")
 
 
 ;; Compatibility functions ==================================================
@@ -334,7 +279,7 @@
     ))
 
 ;; Called when a group is subscribed. This is needed because groups created
-;; because of mail splitting are *not* created with the backend function.
+;; because of mail splitting are *not* created with the back end function.
 ;; Thus, `nndiary-request-create-group-hooks' is inoperative.
 (defun gnus-diary-maybe-update-group-parameters (group)
   (when (eq (car (gnus-find-method-for-group group)) 'nndiary)
@@ -452,7 +397,7 @@
 ;; The end ==================================================================
 
 (defun gnus-diary-version ()
-  "Current Diary backend version."
+  "Current Diary back end version."
   (interactive)
   (message "NNDiary version %s" nndiary-version))
 
--- a/lisp/gnus/nndiary.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/gnus/nndiary.el	Fri May 11 18:24:42 2007 +0000
@@ -1,4 +1,4 @@
-;;; nndiary.el --- A diary backend for Gnus
+;;; nndiary.el --- A diary back end for Gnus
 
 ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
@@ -33,127 +33,8 @@
 ;; Description:
 ;; ===========
 
-;; This package implements NNDiary, a diary backend for Gnus.  NNDiary is a
-;; mail backend, pretty similar to nnml in its functionnning (it has all the
-;; features of nnml, actually), but in which messages are treated as event
-;; reminders.
-
-;; Here is a typical scenario:
-;; - You've got a date with Andy Mc Dowell or Bruce Willis (select according
-;;   to your sexual preference) in one month.  You don't want to forget it.
-;; - Send a (special) diary message to yourself (see below).
-;; - Forget all about it and keep on getting and reading new mail, as usual.
-;; - From time to time, as you type `g' in the group buffer and as the date
-;;   is getting closer, the message will pop up again, just like if it were
-;;   new and unread.
-;; - Read your "new" messages, this one included, and start dreaming of the
-;;   night you're gonna have.
-;; - Once the date is over (you actually fell asleep just after dinner), the
-;;   message will be automatically deleted if it is marked as expirable.
-
-;; Some more notes on the diary backend:
-;; - NNDiary is a *real* mail backend.  You *really* send real diary
-;;   messsages.  This means for instance that you can give appointements to
-;;   anybody (provided they use Gnus and NNDiary) by sending the diary message
-;;   to them as well.
-;; - However, since NNDiary also has a 'request-post method, you can also
-;;  `C-u a' instead of `C-u m' on a diary group and the message won't actually
-;;   be sent; just stored in the group.
-;; - The events you want to remember need not be punctual.  You can set up
-;;   reminders for regular dates (like once each week, each monday at 13:30
-;;   and so on).  Diary messages of this kind will never be deleted (unless
-;;   you do it explicitely).  But that, you guessed.
-
-
-;; Usage:
-;; =====
-
-;;  1/ NNDiary has two modes of operation: traditional (the default) and
-;;     autonomous.
-;;     a/ In traditional mode, NNDiary does not get new mail by itself.  You
-;;        have to move mails from your primary mail backend to nndiary
-;;        groups.
-;;     b/ In autonomous mode, NNDiary retrieves its own mail and handles it
-;;        independantly of your primary mail backend.  To use NNDiary in
-;;        autonomous mode, you have several things to do:
-;;           i/ Put (setq nndiary-get-new-mail t) in your gnusrc file.
-;;          ii/ Diary messages contain several `X-Diary-*' special headers.
-;;              You *must* arrange that these messages be split in a private
-;;              folder *before* Gnus treat them.  You need this because Gnus
-;;              is not able yet to manage multiple backends for mail
-;;              retrieval.  Getting them from a separate source will
-;;              compensate this misfeature to some extent, as we will see.
-;;              As an example, here's my procmailrc entry to store diary files
-;;              in ~/.nndiary (the default nndiary mail source file):
-;;
-;;              :0 HD :
-;;              * ^X-Diary
-;;              .nndiary
-;;         iii/ Customize the variables `nndiary-mail-sources' and
-;;              `nndiary-split-methods'.  These are replacements for the usual
-;;              mail sources and split methods which, and will be used in
-;;              autonomous mode.  `nndiary-mail-sources' defaults to
-;;              '(file :path "~/.nndiary").
-;;  2/ Install nndiary somewhere Emacs / Gnus can find it.  Normally, you
-;;     *don't* have to '(require 'nndiary) anywhere.  Gnus will do so when
-;;     appropriate as long as nndiary is somewhere in the load path.
-;;  3/ Now, customize the rest of nndiary.  In particular, you should
-;;     customize `nndiary-reminders', the list of times when you want to be
-;;     reminded of your appointements (e.g. 3 weeks before, then 2 days
-;;     before, then 1 hour before and that's it).
-;;  4/ You *must* use the group timestamp feature of Gnus.  This adds a
-;;     timestamp to each groups' parameters (please refer to the Gnus
-;;     documentation ("Group Timestamp" info node) to see how it's done.
-;;  5/ Once you have done this, you may add a permanent nndiary virtual server
-;;     (something like '(nndiary "")) to your `gnus-secondary-select-methods'.
-;;     Yes, this server will be able to retrieve mails and split them when you
-;;     type `g' in the group buffer, just as if it were your only mail backend.
-;;     This is the benefit of using a private folder.
-;;  6/ Hopefully, almost everything (see the TODO section below) will work as
-;;     expected when you restart Gnus: in the group buffer, `g' and `M-g' will
-;;     also get your new diary mails, `F' will find your new diary groups etc.
-
-
-;; How to send diary messages:
-;; ==========================
-
-;; There are 7 special headers in diary messages. These headers are of the
-;; form `X-Diary-<something>', the <something> being one of `Minute', `Hour',
-;; `Dom', `Month', `Year', `Time-Zone' and `Dow'. `Dom' means "Day of Month",
-;; and `dow' means "Day of Week".  These headers actually behave like crontab
-;; specifications and define the event date(s).
-
-;; For all headers but the `Time-Zone' one, a header value is either a
-;; star (meaning all possible values), or a list of fields (separated by a
-;; comma).  A field is either an integer, or a range.  A range is two integers
-;; separated by a dash.  Possible integer values are 0-59 for `Minute', 0-23
-;; for `Hour', 1-31 for `Dom', `1-12' for Month, above 1971 for `Year' and 0-6
-;; for `Dow' (0 = sunday).  As a special case, a star in either `Dom' or `Dow'
-;; doesn't mean "all possible values", but "use only the other field".  Note
-;; that if both are star'ed, the use of either one gives the same result :-),
-
-;; The `Time-Zone' header is special in that it can have only one value (you
-;; bet ;-).
-;; A star doesn't mean "all possible values" (because it has no sense), but
-;; "the current local time zone".
-
-;; As an example, here's how you would say "Each Monday and each 1st of month,
-;; at 12:00, 20:00, 21:00, 22:00, 23:00 and 24:00, from 1999 to 2010" (I let
-;; you find what to do then):
-;;
-;;   X-Diary-Minute: 0
-;;   X-Diary-Hour: 12, 20-24
-;;   X-Diary-Dom: 1
-;;   X-Diary-Month: *
-;;   X-Diary-Year: 1999-2010
-;;   X-Diary-Dow: 1
-;;   X-Diary-Time-Zone: *
-;;
-;;
-;; Sending a diary message is not different from sending any other kind of
-;; mail, except that such messages are identified by the presence of these
-;; special headers.
-
+;; nndiary is a mail back end designed to handle mails as diary event
+;; reminders. It is now fully documented in the Gnus manual.
 
 
 ;; Bugs / Todo:
@@ -161,43 +42,43 @@
 
 ;; * Respooling doesn't work because contrary to the request-scan function,
 ;;   Gnus won't allow me to override the split methods when calling the
-;;   respooling backend functions.
+;;   respooling back end functions.
 ;; * There's a bug in the time zone mechanism with variable TZ locations.
 ;; * We could allow a keyword like `ask' in X-Diary-* headers, that would mean
 ;;   "ask for value upon reception of the message".
 ;; * We could add an optional header X-Diary-Reminders to specify a special
 ;;   reminders value for this message. Suggested by Jody Klymak.
 ;; * We should check messages validity in other circumstances than just
-;;   moving an article from sonwhere else (request-accept). For instance, when
-;;   editing / saving and so on.
+;;   moving an article from somewhere else (request-accept). For instance,
+;;   when editing / saving and so on.
 
 
 ;; Remarks:
 ;; =======
 
-;; * nnoo.
-;;   NNDiary is very similar to nnml.  This makes the idea of using nnoo (to
-;;   derive nndiary from nnml) natural.  However, my experience with nnoo is
-;;   that for reasonably complex backends like this one, noo is a burden
-;;   rather than an help.  It's tricky to use, not everything can be
-;;   inherited, what can be inherited and when is not very clear, and you've
-;;   got to be very careful because a little mistake can fuck up your your
-;;   other backends, especially because their variables will be use instead of
-;;   your real ones.  Finally, I found it easier to just clone the needed
-;;   parts of nnml, and tracking nnml updates is not a big deal.
+;; * nnoo. NNDiary is very similar to nnml. This makes the idea of using nnoo
+;;   (to derive nndiary from nnml) natural. However, my experience with nnoo
+;;   is that for reasonably complex back ends like this one, noo is a burden
+;;   rather than an help. It's tricky to use, not everything can be inherited,
+;;   what can be inherited and when is not very clear, and you've got to be
+;;   very careful because a little mistake can fuck up your other back ends,
+;;   especially because their variables will be use instead of your real ones.
+;;   Finally, I found it easier to just clone the needed parts of nnml, and
+;;   tracking nnml updates is not a big deal.
 
 ;;   IMHO, nnoo is actually badly designed.  A much simpler, and yet more
 ;;   powerful one would be to make *real* functions and variables for a new
-;;   backend based on another. Lisp is a reflexive language so that's a very
+;;   back end based on another. Lisp is a reflexive language so that's a very
 ;;   easy thing to do: inspect the function's form, replace occurences of
 ;;   <nnfrom> (even in strings) with <nnto>, and you're done.
 
 ;; * nndiary-get-new-mail, nndiary-mail-source and nndiary-split-methods:
 ;;   NNDiary has some experimental parts, in the sense Gnus normally uses only
-;;   one mail backends for mail retreival and splitting.  This backend is also
-;;   an attempt to make it behave differently.  For Gnus developpers: as you
-;;   can see if you snarf into the code, that was not a very difficult thing
-;;   to do.  Something should be done about the respooling breakage though.
+;;   one mail back ends for mail retreival and splitting. This back end is
+;;   also an attempt to make it behave differently. For Gnus developpers: as
+;;   you can see if you snarf into the code, that was not a very difficult
+;;   thing to do. Something should be done about the respooling breakage
+;;   though.
 
 
 ;;; Code:
@@ -220,10 +101,10 @@
       (apply #'error args))))
 
 
-;; Backend behavior customization ===========================================
+;; Back End behavior customization ===========================================
 
 (defgroup nndiary nil
-  "The Gnus Diary backend."
+  "The Gnus Diary back end."
   :version "22.1"
   :group 'gnus-diary)
 
@@ -326,27 +207,27 @@
   :type 'boolean)
 
 
-;; Backend declaration ======================================================
+;; Back End declaration ======================================================
 
 ;; Well, most of this is nnml clonage.
 
 (nnoo-declare nndiary)
 
 (defvoo nndiary-directory (nnheader-concat gnus-directory "diary/")
-  "Spool directory for the nndiary backend.")
+  "Spool directory for the nndiary back end.")
 
 (defvoo nndiary-active-file
     (expand-file-name "active" nndiary-directory)
-  "Active file for the nndiary backend.")
+  "Active file for the nndiary back end.")
 
 (defvoo nndiary-newsgroups-file
     (expand-file-name "newsgroups" nndiary-directory)
-  "Newsgroups description file for the nndiary backend.")
+  "Newsgroups description file for the nndiary back end.")
 
 (defvoo nndiary-get-new-mail nil
   "Whether nndiary gets new mail and split it.
-Contrary to traditional mail backends, this variable can be set to t
-even if your primary mail backend also retreives mail. In such a case,
+Contrary to traditional mail back ends, this variable can be set to t
+even if your primary mail back end also retreives mail. In such a case,
 NDiary uses its own mail-sources and split-methods.")
 
 (defvoo nndiary-nov-is-evil nil
@@ -367,10 +248,10 @@
 
 
 (defconst nndiary-version "0.2-b14"
-  "Current Diary backend version.")
+  "Current Diary back end version.")
 
 (defun nndiary-version ()
-  "Current Diary backend version."
+  "Current Diary back end version."
   (interactive)
   (message "NNDiary version %s" nndiary-version))
 
@@ -631,7 +512,7 @@
 
 (deffoo nndiary-request-scan (&optional group server)
   ;; Use our own mail sources and split methods while Gnus doesn't let us have
-  ;; multiple backends for retrieving mail.
+  ;; multiple back ends for retrieving mail.
   (let ((mail-sources nndiary-mail-sources)
 	(nnmail-split-methods nndiary-split-methods))
     (setq nndiary-article-file-alist nil)
--- a/lisp/hi-lock.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/hi-lock.el	Fri May 11 18:24:42 2007 +0000
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
-;; Author: David M. Koppelman, koppel@ee.lsu.edu
+;; Author: David M. Koppelman, koppel@ece.lsu.edu
 ;; Keywords: faces, minor-mode, matching, display
 
 ;; This file is part of GNU Emacs.
@@ -33,7 +33,8 @@
 ;;  will remove the highlighting.  Any existing face can be used for
 ;;  highlighting and a set of appropriate faces is provided.  The
 ;;  regexps can be written into the current buffer in a form that will
-;;  be recognized the next time the corresponding file is read.
+;;  be recognized the next time the corresponding file is read (when
+;;  file patterns is turned on).
 ;;
 ;;  Applications:
 ;;
@@ -60,6 +61,14 @@
 ;;
 ;;    (global-hi-lock-mode 1)
 ;;
+;;    To enable the use of patterns found in files (presumably placed
+;;    there by hi-lock) include the following in your .emacs file:
+;;
+;;    (setq hi-lock-file-patterns-policy 'ask)
+;;
+;;    If you get tired of being asked each time a file is loaded replace
+;;    `ask' with a function that returns t if patterns should be read.
+;;
 ;;    You might also want to bind the hi-lock commands to more
 ;;    finger-friendly sequences:
 
@@ -115,6 +124,20 @@
   :type '(repeat symbol)
   :group 'hi-lock)
 
+(defcustom hi-lock-file-patterns-policy 'ask
+  "Specify when hi-lock should use patterns found in file.
+If `ask', prompt when patterns found in buffer; if bound to a function,
+use patterns when function returns t (function is called with patterns
+as first argument); if nil or `never' or anything else, don't use file
+patterns."
+  :type '(choice (const :tag "Do not use file patterns" never)
+                 (const :tag "Ask about file patterns" ask)
+                 (function :tag "Function to check file patterns"))
+  :group 'hi-lock
+  :version "22.1")
+
+;; It can have a function value.
+(put 'hi-lock-file-patterns-policy 'risky-local-variable t)
 
 (defgroup hi-lock-faces nil
   "Faces for hi-lock."
@@ -196,7 +219,7 @@
   "History of regexps used for interactive fontification.")
 
 (defvar hi-lock-file-patterns-prefix "Hi-lock"
-  "Regexp for finding hi-lock patterns at top of file.")
+  "Search target for finding hi-lock patterns at top of file.")
 
 (defvar hi-lock-archaic-interface-message-used nil
   "True if user alerted that `global-hi-lock-mode' is now the global switch.
@@ -283,17 +306,22 @@
   Remove highlighting on matches of REGEXP in current buffer.
 
 \\[hi-lock-write-interactive-patterns]
-  Write active REGEXPs into buffer as comments (if possible).  They will
+  Write active REGEXPs into buffer as comments (if possible).  They may
   be read the next time file is loaded or when the \\[hi-lock-find-patterns] command
   is issued.  The inserted regexps are in the form of font lock keywords.
-  (See `font-lock-keywords'.)  They may be edited and re-loaded with \\[hi-lock-find-patterns],
-  any valid `font-lock-keywords' form is acceptable.
+  (See `font-lock-keywords'.)  They may be edited and re-loaded with \\[hi-lock-find-patterns], 
+  any valid `font-lock-keywords' form is acceptable. When a file is
+  loaded the patterns are read if `hi-lock-file-patterns-policy is
+  'ask and the user responds y to the prompt, or if
+  `hi-lock-file-patterns-policy' is bound to a function and that
+  function returns t.
 
 \\[hi-lock-find-patterns]
   Re-read patterns stored in buffer (in the format produced by \\[hi-lock-write-interactive-patterns]).
 
-When hi-lock is started and if the mode is not excluded, the
-beginning of the buffer is searched for lines of the form:
+When hi-lock is started and if the mode is not excluded or patterns
+rejected, the beginning of the buffer is searched for lines of the
+form:
   Hi-lock: FOO
 where FOO is a list of patterns.  These are added to the font lock
 keywords already present.  The patterns must start before position
@@ -590,9 +618,18 @@
                 (setq all-patterns (append (read (current-buffer)) all-patterns))
               (error (message "Invalid pattern list expression at %d"
                               (line-number-at-pos)))))))
-      (when hi-lock-mode (hi-lock-set-file-patterns all-patterns))
-      (if (interactive-p)
-        (message "Hi-lock added %d patterns." (length all-patterns))))))
+      (when (and all-patterns
+                 hi-lock-mode
+                 (cond
+                  ((eq this-command 'hi-lock-find-patterns) t)
+                  ((functionp hi-lock-file-patterns-policy)
+                   (funcall hi-lock-file-patterns-policy all-patterns))
+                  ((eq hi-lock-file-patterns-policy 'ask)
+                   (y-or-n-p "Add patterns from this buffer to hi-lock? "))
+                  (t nil)))
+        (hi-lock-set-file-patterns all-patterns)
+        (if (interactive-p)
+            (message "Hi-lock added %d patterns." (length all-patterns)))))))
 
 (defun hi-lock-font-lock-hook ()
   "Add hi-lock patterns to font-lock's."
--- a/lisp/ido.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/ido.el	Fri May 11 18:24:42 2007 +0000
@@ -3817,7 +3817,7 @@
 If cursor is not at the end of the user input, delete to end of input."
   (interactive)
   (if (not (eobp))
-      (kill-line)
+      (delete-region (point) (line-end-position))
     (let ((enable-recursive-minibuffers t)
 	  (buf (ido-name (car ido-matches))))
       (when buf
@@ -3835,7 +3835,7 @@
 If cursor is not at the end of the user input, delete to end of input."
   (interactive)
   (if (not (eobp))
-      (kill-line)
+      (delete-region (point) (line-end-position))
     (let ((enable-recursive-minibuffers t)
 	  (file (ido-name (car ido-matches))))
       (if file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/image-dired.el	Fri May 11 18:24:42 2007 +0000
@@ -0,0 +1,2599 @@
+;;; image-dired.el --- use dired to browse and manipulate your images
+;;
+;; Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+;;
+;; Version: 0.4.11
+;; Keywords: multimedia
+;; Author: Mathias Dahl <mathias.rem0veth1s.dahl@gmail.com>
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+;;
+;; BACKGROUND
+;; ==========
+;;
+;;  I needed a program to browse, organize and tag my pictures.  I got
+;; tired of the old gallery program I used as it did not allow
+;; multi-file operations easily.  Also, it put things out of my
+;; control.  Image viewing programs I tested did not allow multi-file
+;; operations or did not do what I wanted it to.
+;;
+;;  So, I got the idea to use the wonderful functionality of Emacs and
+;; `dired' to do it.  It would allow me to do almost anything I wanted,
+;; which is basically just to browse all my pictures in an easy way,
+;; letting me manipulate and tag them in various ways.  `dired' already
+;; provide all the file handling and navigation facilities; I only
+;; needed to add some functions to display the images.
+;;
+;;  I briefly tried out thumbs.el, and although it seemed more
+;; powerful than this package, it did not work the way I wanted to.  It
+;; was too slow to created thumbnails of all files in a directory (I
+;; currently keep all my 2000+ images in the same directory) and
+;; browsing the thumbnail buffer was slow too.  image-dired.el will not
+;; create thumbnails until they are needed and the browsing is done
+;; quickly and easily in dired.  I copied a great deal of ideas and
+;; code from there though... :)
+;;
+;;  `image-dired' stores the thumbnail files in `image-dired-dir'
+;; using the file name format ORIGNAME.thumb.ORIGEXT.  For example
+;; ~/.emacs.d/image-dired/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
+;;
+;;
+;; PREREQUISITES
+;; =============
+;;
+;; * The ImageMagick package.  Currently, `convert' and `mogrify' are
+;; used.  Find it here: http://www.imagemagick.org.
+;;
+;; * For non-lossy rotation of JPEG images, the JpegTRAN program is
+;; needed.
+;;
+;; * For `image-dired-get-exif-data' and `image-dired-write-exif-data' to work,
+;; the command line tool `exiftool' is needed.  It can be found here:
+;; http://www.sno.phy.queensu.ca/~phil/exiftool/.  These two functions
+;; are, among other things, used for writing comments to image files
+;; using `image-dired-thumbnail-set-image-description' and to create
+;; "unique" file names using `image-dired-get-exif-file-name' (used by
+;; `image-dired-copy-with-exif-file-name').
+;;
+;;
+;; USAGE
+;; =====
+;;
+;; This information has been moved to the manual.  Type `C-h r' to open
+;; the Emacs manual and go to the node Thumbnails by typing `g
+;; Thumbnails RET'.
+;;
+;; Quickstart: M-x image-dired RET DIRNAME RET
+;;
+;; where DIRNAME is a directory containing image files.
+;;
+;; LIMITATIONS
+;; ===========
+;;
+;; * Supports all image formats that Emacs and convert supports, but
+;; the thumbnails are hard-coded to JPEG format.
+;;
+;; * WARNING: The "database" format used might be changed so keep a
+;; backup of `image-dired-db-file' when testing new versions.
+;;
+;;
+;; TODO
+;; ====
+;;
+;; * Support gallery creation when using per-directory thumbnail
+;; storage.
+;;
+;; * Some sort of auto-rotate function based on rotate info in the
+;; EXIF data.
+;;
+;; * Check if exiftool exist before trying to call it to give a better
+;; error message.
+;;
+;; * Investigate if it is possible to also write the tags to the image
+;; files.
+;;
+;; * From thumbs.el: Add an option for clean-up/max-size functionality
+;;   for thumbnail directory.
+;;
+;; * From thumbs.el: Add setroot function.
+;;
+;; * From thumbs.el: Add image resizing, if useful (image-dired's automatic
+;;  "image fit" might be enough)
+;;
+;; * From thumbs.el: Add the "modify" commands (emboss, negate,
+;;   monochrome etc).
+;;
+;; * Asynchronous creation of thumbnails.
+;;
+;; * Add `image-dired-display-thumbs-ring' and functions to cycle that.  Find
+;; out which is best, saving old batch just before inserting new, or
+;; saving the current batch in the ring when inserting it.  Adding it
+;; probably needs rewriting `image-dired-display-thumbs' to be more general.
+;;
+;; * Find some way of toggling on and off really nice keybindings in
+;; dired (for example, using C-n or <down> instead of C-S-n).  Richard
+;; suggested that we could keep C-t as prefix for image-dired commands
+;; as it is currently not used in dired.  He also suggested that
+;; `dired-next-line' and `dired-previous-line' figure out if
+;; image-dired is enabled in the current buffer and, if it is, call
+;; `image-dired-dired-next-line' and
+;; `image-dired-dired-previous-line', 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.
+;;
+;; * Rewrite `image-dired-modify-mark-on-thumb-original-file' to be
+;; less ugly.
+;;
+;; * In some way keep track of buffers and windows and stuff so that
+;; it works as the user expects.
+;;
+;; * More/better documentation
+;;
+;;
+;;; Code:
+
+(require 'dired)
+(require 'format-spec)
+(require 'widget)
+
+(eval-when-compile
+  (require 'wid-edit))
+
+(defgroup image-dired nil
+  "Use dired to browse your images as thumbnails, and more."
+  :prefix "image-dired-"
+  :group 'multimedia)
+
+(defcustom image-dired-dir "~/.emacs.d/image-dired/"
+  "Directory where thumbnail images are stored."
+  :type 'string
+  :group 'image-dired)
+
+(defcustom image-dired-thumbnail-storage 'use-image-dired-dir
+  "How to store image-dired's thumbnail files.
+Image-Dired can store thumbnail files in one of two ways and this is
+controlled by this variable.  \"Use image-dired dir\" means that the
+thumbnails are stored in a central directory.  \"Per directory\"
+means that each thumbnail is stored in a subdirectory called
+\".image-dired\" 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 image-dired-dir" use-image-dired-dir)
+                 (const :tag "Per-directory" per-directory))
+  :group 'image-dired)
+
+(defcustom image-dired-db-file "~/.emacs.d/image-dired/.image-dired_db"
+  "Database file where file names and their associated tags are stored."
+  :type 'string
+  :group 'image-dired)
+
+(defcustom image-dired-temp-image-file "~/.emacs.d/image-dired/.image-dired_temp"
+  "Name of temporary image file used by various commands."
+  :type 'string
+  :group 'image-dired)
+
+(defcustom image-dired-gallery-dir "~/.emacs.d/image-dired/.image-dired_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 image-dired creates."
+  :type 'string
+  :group 'image-dired)
+
+(defcustom image-dired-gallery-image-root-url
+"http://your.own.server/image-diredpics"
+  "URL where the full size images are to be found.
+Note that this path has to be configured in your web server.  Image-Dired
+expects to find pictures in this directory."
+  :type 'string
+  :group 'image-dired)
+
+(defcustom image-dired-gallery-thumb-image-root-url
+"http://your.own.server/image-diredthumbs"
+  "URL where the thumbnail images are to be found.
+Note that this path has to be configured in your web server.  Image-Dired
+expects to find pictures in this directory."
+  :type 'string
+  :group 'image-dired)
+
+(defcustom image-dired-cmd-create-thumbnail-program
+  "convert"
+  "Executable used to create thumbnail.
+Used together with `image-dired-cmd-create-thumbnail-options'."
+  :type 'string
+  :group 'image-dired)
+
+(defcustom image-dired-cmd-create-thumbnail-options
+  "%p -size %wx%h \"%f\" -resize %wx%h -strip jpeg:\"%t\""
+  "Format of command used to create thumbnail image.
+Available options are %p which is replaced by
+`image-dired-cmd-create-thumbnail-program', %w which is replaced by
+`image-dired-thumb-width', %h which is replaced by `image-dired-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 'image-dired)
+
+(defcustom image-dired-cmd-create-temp-image-program
+  "convert"
+  "Executable used to create temporary image.
+Used together with `image-dired-cmd-create-temp-image-options'."
+  :type 'string
+  :group 'image-dired)
+
+(defcustom image-dired-cmd-create-temp-image-options
+  "%p -size %wx%h \"%f\" -resize %wx%h -strip jpeg:\"%t\""
+  "Format of command used to create temporary image for display window.
+Available options are %p which is replaced by
+`image-dired-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 'image-dired)
+
+(defcustom image-dired-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 'image-dired)
+
+(defcustom image-dired-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 'image-dired)
+
+(defcustom image-dired-cmd-create-standard-thumbnail-command
+  (concat
+   image-dired-cmd-create-thumbnail-program " "
+   "-size %wx%h \"%f\" "
+   (unless (or image-dired-cmd-pngcrush-program image-dired-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 image-dired-cmd-pngnq-program
+       (concat
+        " ; " image-dired-cmd-pngnq-program " -f \"%t\""
+        (unless image-dired-cmd-pngcrush-program
+          " ; mv %q %t")))
+   (if image-dired-cmd-pngcrush-program
+       (concat
+        (unless image-dired-cmd-pngcrush-program
+          " ; cp %t %q")
+        " ; " image-dired-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 'image-dired)
+
+(defcustom image-dired-cmd-rotate-thumbnail-program
+  "mogrify"
+  "Executable used to rotate thumbnail.
+Used together with `image-dired-cmd-rotate-thumbnail-options'."
+  :type 'string
+  :group 'image-dired)
+
+(defcustom image-dired-cmd-rotate-thumbnail-options
+  "%p -rotate %d \"%t\""
+  "Format of command used to rotate thumbnail image.
+Available options are %p which is replaced by
+`image-dired-cmd-rotate-thumbnail-program', %d which is replaced by the
+number of (positive) degrees to rotate the image, normally 90 or 270
+\(for 90 degrees right and left), %t which is replaced by the file name
+of the thumbnail file."
+  :type 'string
+  :group 'image-dired)
+
+(defcustom image-dired-cmd-rotate-original-program
+  "jpegtran"
+  "Executable used to rotate original image.
+Used together with `image-dired-cmd-rotate-original-options'."
+  :type 'string
+  :group 'image-dired)
+
+(defcustom image-dired-cmd-rotate-original-options
+  "%p -rotate %d -copy all -outfile %t \"%o\""
+  "Format of command used to rotate original image.
+Available options are %p which is replaced by
+`image-dired-cmd-rotate-original-program', %d which is replaced by the
+number of (positive) degrees to rotate the image, normally 90 or
+270 \(for 90 degrees right and left), %o which is replaced by the
+original image file name and %t which is replaced by
+`image-dired-temp-image-file'."
+  :type 'string
+  :group 'image-dired)
+
+(defcustom image-dired-temp-rotate-image-file
+  "~/.emacs.d/image-dired/.image-dired_rotate_temp"
+  "Temporary file for rotate operations."
+  :type 'string
+  :group 'image-dired)
+
+(defcustom image-dired-rotate-original-ask-before-overwrite t
+  "Confirm overwrite of original file after rotate operation.
+If non-nil, ask user for confirmation before overwriting the
+original file with `image-dired-temp-rotate-image-file'."
+  :type 'boolean
+  :group 'image-dired)
+
+(defcustom image-dired-cmd-write-exif-data-program
+  "exiftool"
+  "Program used to write EXIF data to image.
+Used together with `image-dired-cmd-write-exif-data-options'."
+  :type 'string
+  :group 'image-dired)
+
+(defcustom image-dired-cmd-write-exif-data-options
+  "%p -%t=\"%v\" \"%f\""
+  "Format of command used to write EXIF data.
+Available options are %p which is replaced by
+`image-dired-cmd-write-exif-data-program', %f which is replaced by the
+image file name, %t which is replaced by the tag name and %v
+which is replaced by the tag value."
+  :type 'string
+  :group 'image-dired)
+
+(defcustom image-dired-cmd-read-exif-data-program
+  "exiftool"
+  "Program used to read EXIF data to image.
+Used together with `image-dired-cmd-read-exif-data-program-options'."
+  :type 'string
+  :group 'image-dired)
+
+(defcustom image-dired-cmd-read-exif-data-options
+  "%p -s -s -s -%t \"%f\""
+  "Format of command used to read EXIF data.
+Available options are %p which is replaced by
+`image-dired-cmd-write-exif-data-options', %f which is replaced
+by the image file name and %t which is replaced by the tag name."
+  :type 'string
+  :group 'image-dired)
+
+(defcustom image-dired-gallery-hidden-tags
+  (list "private" "hidden" "pending")
+  "List of \"hidden\" tags.
+Used by `image-dired-gallery-generate' to leave out \"hidden\" images."
+  :type '(repeat string)
+  :group 'image-dired)
+
+(defcustom image-dired-thumb-size (if (eq 'standard image-dired-thumbnail-storage) 128 100)
+  "Size of thumbnails, in pixels.
+This is the default size for both `image-dired-thumb-width' and `image-dired-thumb-height'."
+  :type 'integer
+  :group 'image-dired)
+
+(defcustom image-dired-thumb-width image-dired-thumb-size
+  "Width of thumbnails, in pixels."
+  :type 'integer
+  :group 'image-dired)
+
+(defcustom image-dired-thumb-height image-dired-thumb-size
+  "Height of thumbnails, in pixels."
+  :type 'integer
+  :group 'image-dired)
+
+(defcustom image-dired-thumb-relief 2
+  "Size of button-like border around thumbnails."
+  :type 'integer
+  :group 'image-dired)
+
+(defcustom image-dired-thumb-margin 2
+  "Size of the margin around thumbnails.
+This is where you see the cursor."
+  :type 'integer
+  :group 'image-dired)
+
+(defcustom image-dired-line-up-method 'dynamic
+  "Default method for line-up of thumbnails in thumbnail buffer.
+Used by `image-dired-display-thumbs' and other functions that needs to
+line-up thumbnails.  Dynamic means to use the available width of the
+window containing the thumbnail buffer, Fixed means to use
+`image-dired-thumbs-per-row', Interactive is for asking the user, and No
+line-up means that no automatic line-up will be done."
+  :type '(choice :tag "Default line-up method"
+                 (const :tag "Dynamic" dynamic)
+		 (const :tag "Fixed" fixed)
+		 (const :tag "Interactive" interactive)
+                 (const :tag "No line-up" none))
+  :group 'image-dired)
+
+(defcustom image-dired-thumbs-per-row 3
+  "Number of thumbnails to display per row in thumb buffer."
+  :type 'integer
+  :group 'image-dired)
+
+(defcustom image-dired-display-window-width-correction 1
+  "Number to be used to correct image display window width.
+Change if the default (1) does not work (i.e. if the image does not
+completely fit)."
+  :type 'integer
+  :group 'image-dired)
+
+(defcustom image-dired-display-window-height-correction 0
+  "Number to be used to correct image display window height.
+Change if the default (0) does not work (i.e. if the image does not
+completely fit)."
+  :type 'integer
+  :group 'image-dired)
+
+(defcustom image-dired-track-movement t
+  "The current state of the tracking and mirroring.
+For more information, see the documentation for
+`image-dired-toggle-movement-tracking'."
+  :type 'boolean
+  :group 'image-dired)
+
+(defcustom image-dired-append-when-browsing nil
+  "Append thumbnails in thumbnail buffer when browsing.
+If non-nil, using `image-dired-next-line-and-display' and
+`image-dired-previous-line-and-display' will leave a trail of thumbnail
+images in the thumbnail buffer.  If you enable this and want to clean
+the thumbnail buffer because it is filled with too many thumbmnails,
+just call `image-dired-display-thumb' to display only the image at point.
+This value can be toggled using `image-dired-toggle-append-browsing'."
+  :type 'boolean
+  :group 'image-dired)
+
+(defcustom image-dired-dired-disp-props t
+  "If non-nil, display properties for dired file when browsing.
+Used by `image-dired-next-line-and-display',
+`image-dired-previous-line-and-display' and `image-dired-mark-and-display-next'.
+If the database file is large, this can slow down image browsing in
+dired and you might want to turn it off."
+  :type 'boolean
+  :group 'image-dired)
+
+(defcustom image-dired-display-properties-format "%b: %f (%t): %c"
+  "Display format for thumbnail properties.
+%b is replaced with associated dired buffer name, %f with file name
+\(without path) of original image file, %t with the list of tags and %c
+with the comment."
+  :type 'string
+  :group 'image-dired)
+
+(defcustom image-dired-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
+`image-dired-thumbnail-mode'."
+  :type 'string
+  :group 'image-dired)
+
+(defcustom image-dired-main-image-directory "~/pics/"
+  "Name of main image directory, if any.
+Used by `image-dired-copy-with-exif-file-name'."
+  :type 'string
+  :group 'image-dired)
+
+(defcustom image-dired-show-all-from-dir-max-files 50
+  "Maximum number of files to show using `image-dired-show-all-from-dir'.
+before warning the user."
+  :type 'integer
+  :group 'image-dired)
+
+(defun image-dired-dir ()
+  "Return the current thumbnails directory (from variable `image-dired-dir').
+Create the thumbnails directory if it does not exist."
+  (let ((image-dired-dir (file-name-as-directory
+                    (expand-file-name image-dired-dir))))
+    (unless (file-directory-p image-dired-dir)
+      (make-directory image-dired-dir t)
+      (message "Creating thumbnails directory"))
+    image-dired-dir))
+
+(defun image-dired-insert-image (file type relief margin)
+  "Insert image FILE of image TYPE, using RELIEF and MARGIN, at point."
+
+  (let ((i `(image :type ,type
+                   :file ,file
+                   :relief ,relief
+                   :margin ,margin)))
+    (insert-image i)))
+
+(defun image-dired-get-thumbnail-image (file)
+  "Return the image descriptor for a thumbnail of image file FILE."
+  (unless (string-match (image-file-name-regexp) file)
+    (error "%s is not a valid image file" file))
+  (let ((thumb-file (image-dired-thumb-name file)))
+    (unless (and (file-exists-p thumb-file)
+		 (<= (float-time (nth 5 (file-attributes file)))
+		     (float-time (nth 5 (file-attributes thumb-file)))))
+      (image-dired-create-thumb file thumb-file))
+    (create-image thumb-file)
+;;     (list 'image :type 'jpeg
+;;           :file thumb-file
+;; 	  :relief image-dired-thumb-relief :margin image-dired-thumb-margin)
+    ))
+
+(defun image-dired-insert-thumbnail (file original-file-name
+                                    associated-dired-buffer)
+  "Insert thumbnail image FILE.
+Add text properties ORIGINAL-FILE-NAME and ASSOCIATED-DIRED-BUFFER."
+  (let (beg end)
+    (setq beg (point))
+    (image-dired-insert-image file
+                        ;; TODO: this should depend on the real file type
+                        (if (eq 'standard image-dired-thumbnail-storage)
+                            'png 'jpeg)
+                        image-dired-thumb-relief
+                        image-dired-thumb-margin)
+    (setq end (point))
+    (add-text-properties
+     beg end
+     (list 'image-dired-thumbnail t
+           'original-file-name original-file-name
+           'associated-dired-buffer associated-dired-buffer
+           'tags (image-dired-list-tags original-file-name)
+           'mouse-face 'highlight
+           'comment (image-dired-get-comment original-file-name)))))
+
+(defun image-dired-thumb-name (file)
+  "Return thumbnail file name for FILE.
+Depending on the value of `image-dired-thumbnail-storage', the file
+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.  For standard storage, produce the file name
+according to the Thumbnail Managing Standard."
+  (cond ((eq 'standard image-dired-thumbnail-storage)
+         (expand-file-name
+          (concat "~/.thumbnails/normal/"
+                  (md5 (concat "file://" (expand-file-name file))) ".png")))
+        ((eq 'use-image-dired-dir image-dired-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 (image-dired-dir)))
+                   (file-name-sans-extension (file-name-nondirectory f))
+                   (if md5-hash (concat "_" md5-hash) "")
+                   (file-name-extension f))))
+        ((eq 'per-directory image-dired-thumbnail-storage)
+         (let ((f (expand-file-name file)))
+           (format "%s.image-dired/%s.thumb.%s"
+                   (file-name-directory f)
+                   (file-name-sans-extension (file-name-nondirectory f))
+                   (file-name-extension f))))))
+
+(defun image-dired-create-thumb (original-file thumbnail-file)
+  "For ORIGINAL-FILE, create thumbnail image named THUMBNAIL-FILE."
+  (let* ((width (int-to-string image-dired-thumb-width))
+         (height (int-to-string image-dired-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
+           (if (eq 'standard image-dired-thumbnail-storage)
+               image-dired-cmd-create-standard-thumbnail-command
+             image-dired-cmd-create-thumbnail-options)
+           (list
+            (cons ?p image-dired-cmd-create-thumbnail-program)
+            (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
+                (setq thumbnail-dir (file-name-directory thumbnail-file))))
+      (message "Creating thumbnail directory.")
+      (make-directory thumbnail-dir))
+    (call-process shell-file-name nil nil nil shell-command-switch command)))
+
+;;;###autoload
+(defun image-dired-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 (image-dired-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 'image-dired-dired-after-readin-hook nil t))
+
+(defun image-dired-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 image-dired-next-line-and-display ()
+  "Move to next dired line and display thumbnail image."
+  (interactive)
+  (dired-next-line 1)
+  (image-dired-display-thumbs
+   t (or image-dired-append-when-browsing nil) t)
+  (if image-dired-dired-disp-props
+      (image-dired-dired-display-properties)))
+
+(defun image-dired-previous-line-and-display ()
+  "Move to previous dired line and display thumbnail image."
+  (interactive)
+  (dired-previous-line 1)
+  (image-dired-display-thumbs
+   t (or image-dired-append-when-browsing nil) t)
+  (if image-dired-dired-disp-props
+      (image-dired-dired-display-properties)))
+
+(defun image-dired-toggle-append-browsing ()
+  "Toggle `image-dired-append-when-browsing'."
+  (interactive)
+  (setq image-dired-append-when-browsing
+        (not image-dired-append-when-browsing))
+  (message "Append browsing %s."
+           (if image-dired-append-when-browsing
+               "on"
+             "off")))
+
+(defun image-dired-mark-and-display-next ()
+  "Mark current file in dired and display next thumbnail image."
+  (interactive)
+  (dired-mark 1)
+  (image-dired-display-thumbs
+   t (or image-dired-append-when-browsing nil) t)
+  (if image-dired-dired-disp-props
+      (image-dired-dired-display-properties)))
+
+(defun image-dired-toggle-dired-display-properties ()
+  "Toggle `image-dired-dired-disp-props'."
+  (interactive)
+  (setq image-dired-dired-disp-props
+        (not image-dired-dired-disp-props))
+  (message "Dired display properties %s."
+           (if image-dired-dired-disp-props
+               "on"
+             "off")))
+
+(defvar image-dired-thumbnail-buffer "*image-dired*"
+  "Image-Dired's thumbnail buffer.")
+
+(defun image-dired-create-thumbnail-buffer ()
+  "Create thumb buffer and set `image-dired-thumbnail-mode'."
+  (let ((buf (get-buffer-create image-dired-thumbnail-buffer)))
+    (with-current-buffer buf
+      (setq buffer-read-only t)
+      (if (not (eq major-mode 'image-dired-thumbnail-mode))
+          (image-dired-thumbnail-mode)))
+    buf))
+
+(defvar image-dired-display-image-buffer "*image-dired-display-image*"
+  "Where larger versions of the images are display.")
+
+(defun image-dired-create-display-image-buffer ()
+  "Create image display buffer and set `image-dired-display-image-mode'."
+  (let ((buf (get-buffer-create image-dired-display-image-buffer)))
+    (with-current-buffer buf
+      (setq buffer-read-only t)
+      (if (not (eq major-mode 'image-dired-display-image-mode))
+          (image-dired-display-image-mode)))
+    buf))
+
+(defvar image-dired-saved-window-configuration nil
+  "Saved window configuration.")
+
+;;;###autoload
+(defun image-dired-dired-with-window-configuration (dir &optional arg)
+  "Open directory DIR and create a default window configuration.
+
+Convenience command that:
+
+ - Opens dired in folder DIR
+ - Splits windows in most useful (?) way
+ - Set `truncate-lines' to t
+
+After the command has finished, you would typically mark some
+image files in dired and type
+\\[image-dired-display-thumbs] (`image-dired-display-thumbs').
+
+If called with prefix argument ARG, skip splitting of windows.
+
+The current window configuration is saved and can be restored by
+calling `image-dired-restore-window-configuration'."
+  (interactive "DDirectory: \nP")
+  (let ((buf (image-dired-create-thumbnail-buffer))
+        (buf2 (image-dired-create-display-image-buffer)))
+    (setq image-dired-saved-window-configuration
+          (current-window-configuration))
+    (dired dir)
+    (delete-other-windows)
+    (when (not arg)
+      (split-window-horizontally)
+      (setq truncate-lines t)
+      (save-excursion
+        (other-window 1)
+        (switch-to-buffer buf)
+        (split-window-vertically)
+        (other-window 1)
+        (switch-to-buffer buf2)
+        (other-window -2)))))
+
+(defun image-dired-restore-window-configuration ()
+  "Restore window configuration.
+Restore any changes to the window configuration made by calling
+`image-dired-dired-with-window-configuration'."
+  (interactive)
+  (if image-dired-saved-window-configuration
+      (set-window-configuration image-dired-saved-window-configuration)
+    (message "No saved window configuration")))
+
+;;;###autoload
+(defun image-dired-display-thumbs (&optional arg append do-not-pop)
+  "Display thumbnails of all marked files, in `image-dired-thumbnail-buffer'.
+If a thumbnail image does not exist for a file, it is created on the
+fly.  With prefix argument ARG, display only thumbnail for file at
+point (this is useful if you have marked some files but want to show
+another one).
+
+Recommended usage is to split the current frame horizontally so that
+you have the dired buffer in the left window and the
+`image-dired-thumbnail-buffer' buffer in the right window.
+
+With optional argument APPEND, append thumbnail to thumbnail buffer
+instead of erasing it first.
+
+Option argument DO-NOT-POP controls if `pop-to-buffer' should be
+used or not.  If non-nil, use `display-buffer' instead of
+`pop-to-buffer'.  This is used from functions like
+`image-dired-next-line-and-display' and
+`image-dired-previous-line-and-display' where we do not want the
+thumbnail buffer to be selected."
+  (interactive "P")
+  (let ((buf (image-dired-create-thumbnail-buffer))
+        curr-file thumb-name files count dired-buf beg)
+    (if arg
+        (setq files (list (dired-get-filename)))
+      (setq files (dired-get-marked-files)))
+    (setq dired-buf (current-buffer))
+    (with-current-buffer buf
+      (let ((inhibit-read-only t))
+        (if (not append)
+            (erase-buffer)
+          (goto-char (point-max)))
+        (mapcar
+         (lambda (curr-file)
+           (setq thumb-name (image-dired-thumb-name curr-file))
+           (if (and (not (file-exists-p thumb-name))
+                    (not (= 0 (image-dired-create-thumb curr-file thumb-name))))
+               (message "Thumb could not be created for file %s" curr-file)
+             (image-dired-insert-thumbnail thumb-name curr-file dired-buf)))
+         files))
+      (cond ((eq 'dynamic image-dired-line-up-method)
+             (image-dired-line-up-dynamic))
+            ((eq 'fixed image-dired-line-up-method)
+             (image-dired-line-up))
+            ((eq 'interactive image-dired-line-up-method)
+             (image-dired-line-up-interactive))
+            ((eq 'none image-dired-line-up-method)
+             nil)
+            (t
+             (image-dired-line-up-dynamic))))
+    (if do-not-pop
+        (display-buffer image-dired-thumbnail-buffer)
+      (pop-to-buffer image-dired-thumbnail-buffer))))
+
+;;;###autoload
+(defun image-dired-show-all-from-dir (dir)
+  "Make a preview buffer for all images in DIR and display it.
+If the number of files in DIR matching `image-file-name-regexp'
+exceeds `image-dired-show-all-from-dir-max-files', a warning will be
+displayed."
+  (interactive "DDir: ")
+  (dired dir)
+  (dired-mark-files-regexp (image-file-name-regexp))
+  (let ((files (dired-get-marked-files)))
+    (if (or (<= (length files) image-dired-show-all-from-dir-max-files)
+            (and (> (length files) image-dired-show-all-from-dir-max-files)
+                 (y-or-n-p
+                  (format
+                   "Directory contains more than %d image files.  Proceed? "
+                   image-dired-show-all-from-dir-max-files))))
+        (progn
+          (image-dired-display-thumbs)
+          (pop-to-buffer image-dired-thumbnail-buffer))
+      (message "Cancelled."))))
+
+;;;###autoload
+(defalias 'image-dired 'image-dired-show-all-from-dir)
+
+;;;###autoload
+(defalias 'tumme 'image-dired-show-all-from-dir)
+
+(defun image-dired-write-tags (file-tags)
+  "Write file tags to database.
+Write each file and tag in FILE-TAGS to the database.  FILE-TAGS
+is an alist in the following form:
+ ((FILE . TAG) ... )"
+  (let (end file tag)
+    (with-temp-file image-dired-db-file
+      (insert-file-contents image-dired-db-file)
+      (dolist (elt file-tags)
+	(setq file (car elt)
+	      tag (cdr elt))
+	(goto-char (point-min))
+	(if (search-forward-regexp (format "^%s.*$" file) nil t)
+	    (progn
+	      (setq end (point))
+	      (beginning-of-line)
+	      (when (not (search-forward (format ";%s" tag) end t))
+		(end-of-line)
+		(insert (format ";%s" tag))))
+	  (goto-char (point-max))
+	  (insert (format "\n%s;%s" file tag)))))))
+
+(defun image-dired-remove-tag (files tag)
+  "For all FILES, remove TAG from the image database."
+  (save-excursion
+    (let (end buf start)
+      (setq buf (find-file image-dired-db-file))
+      (if (not (listp files))
+          (if (stringp files)
+              (setq files (list files))
+            (error "Files must be a string or a list of strings!")))
+      (mapcar
+       (lambda (file)
+         (goto-char (point-min))
+         (when (search-forward-regexp
+                (format "^%s" file) nil t)
+           (end-of-line)
+           (setq end (point))
+           (beginning-of-line)
+           (when (search-forward-regexp (format "\\(;%s\\)" tag) end t)
+             (delete-region (match-beginning 1) (match-end 1))
+             ;; Check if file should still be in the database. If
+             ;; it has no tags or comments, it will be removed.
+             (end-of-line)
+             (setq end (point))
+             (beginning-of-line)
+             (when (not (search-forward ";" end t))
+               (kill-line 1)
+               ;; If on empty line at end of buffer
+               (when (and (eobp)
+                          (looking-at "^$"))
+                 (delete-backward-char 1))))))
+       files)
+      (save-buffer)
+      (kill-buffer buf))))
+
+(defun image-dired-list-tags (file)
+  "Read all tags for image FILE from the image database."
+  (save-excursion
+    (let (end buf (tags ""))
+      (setq buf (find-file image-dired-db-file))
+      (goto-char (point-min))
+      (when (search-forward-regexp
+             (format "^%s" file) nil t)
+        (end-of-line)
+        (setq end (point))
+        (beginning-of-line)
+        (if (search-forward ";" end t)
+            (if (search-forward "comment:" end t)
+                (if (search-forward ";" end t)
+                    (setq tags (buffer-substring (point) end)))
+              (setq tags (buffer-substring (point) end)))))
+      (kill-buffer buf)
+      (split-string tags ";"))))
+
+;;;###autoload
+(defun image-dired-tag-files (arg)
+  "Tag marked file(s) in dired.  With prefix ARG, tag file at point."
+  (interactive "P")
+  (let ((tag (read-string "Tags to add (separate tags with a semicolon): "))
+        curr-file files)
+    (if arg
+        (setq files (list (dired-get-filename)))
+      (setq files (dired-get-marked-files)))
+    (image-dired-write-tags
+     (mapcar
+      (lambda (x)
+        (cons x tag))
+      files))))
+
+(defun image-dired-tag-thumbnail ()
+  "Tag current thumbnail."
+  (interactive)
+  (let ((tag (read-string "Tags to add (separate tags with a semicolon): ")))
+    (image-dired-write-tags (list (cons (image-dired-original-file-name) tag))))
+  (image-dired-update-property
+   'tags (image-dired-list-tags (image-dired-original-file-name))))
+
+;;;###autoload
+(defun image-dired-delete-tag (arg)
+  "Remove tag for selected file(s).
+With prefix argument ARG, remove tag from file at point."
+  (interactive "P")
+  (let ((tag (read-string "Tag to remove: "))
+        files)
+    (if arg
+        (setq files (list (dired-get-filename)))
+      (setq files (dired-get-marked-files)))
+    (image-dired-remove-tag files tag)))
+
+(defun image-dired-tag-thumbnail-remove ()
+  "Remove tag from thumbnail."
+  (interactive)
+  (let ((tag (read-string "Tag to remove: ")))
+    (image-dired-remove-tag (image-dired-original-file-name) tag))
+  (image-dired-update-property
+   'tags (image-dired-list-tags (image-dired-original-file-name))))
+
+(defun image-dired-original-file-name ()
+  "Get original file name for thumbnail or display image at point."
+  (get-text-property (point) 'original-file-name))
+
+(defun image-dired-associated-dired-buffer ()
+  "Get associated dired buffer at point."
+  (get-text-property (point) 'associated-dired-buffer))
+
+(defun image-dired-get-buffer-window (buf)
+  "Return window where buffer BUF is."
+  (get-window-with-predicate
+   (lambda (window)
+     (equal (window-buffer window) buf))
+   nil t))
+
+(defun image-dired-track-original-file ()
+  "Track the original file in the associated dired buffer.
+See documentation for `image-dired-toggle-movement-tracking'.  Interactive
+use only useful if `image-dired-track-movement' is nil."
+  (interactive)
+  (let ((old-buf (current-buffer))
+        (dired-buf (image-dired-associated-dired-buffer))
+        (file-name (image-dired-original-file-name)))
+    (when (and (buffer-live-p dired-buf) file-name)
+      (setq file-name (file-name-nondirectory file-name))
+      (set-buffer dired-buf)
+      (goto-char (point-min))
+      (if (not (search-forward file-name nil t))
+          (message "Could not track file")
+        (dired-move-to-filename)
+        (set-window-point
+         (image-dired-get-buffer-window dired-buf) (point)))
+      (set-buffer old-buf))))
+
+(defun image-dired-toggle-movement-tracking ()
+  "Turn on and off `image-dired-track-movement'.
+Tracking of the movements between thumbnail and dired buffer so that
+they are \"mirrored\" in the dired buffer.  When this is on, moving
+around in the thumbnail or dired buffer will find the matching
+position in the other buffer."
+  (interactive)
+  (setq image-dired-track-movement (not image-dired-track-movement))
+  (message "Tracking %s" (if image-dired-track-movement "on" "off")))
+
+(defun image-dired-track-thumbnail ()
+  "Track current dired file's thumb in `image-dired-thumbnail-buffer'.
+This is almost the same as what `image-dired-track-original-file' does, but
+the other way around."
+  (let ((file (dired-get-filename))
+        (old-buf (current-buffer))
+        prop-val found)
+    (when (get-buffer image-dired-thumbnail-buffer)
+      (set-buffer image-dired-thumbnail-buffer)
+      (goto-char (point-min))
+      (while (and (not (eobp))
+                  (not found))
+        (if (and (setq prop-val
+                       (get-text-property (point) 'original-file-name))
+                 (string= prop-val file))
+            (setq found t))
+        (if (not found)
+            (forward-char 1)))
+      (when found
+        (set-window-point
+         (image-dired-thumbnail-window) (point))
+        (image-dired-display-thumb-properties))
+      (set-buffer old-buf))))
+
+(defun image-dired-dired-next-line (&optional arg)
+  "Call `dired-next-line', then track thumbnail.
+This can safely replace `dired-next-line'.  With prefix argument, move
+ARG lines."
+  (interactive "P")
+  (dired-next-line (or arg 1))
+  (if image-dired-track-movement
+      (image-dired-track-thumbnail)))
+
+(defun image-dired-dired-previous-line (&optional arg)
+  "Call `dired-previous-line', then track thumbnail.
+This can safely replace `dired-previous-line'.  With prefix argument,
+move ARG lines."
+  (interactive "P")
+  (dired-previous-line (or arg 1))
+  (if image-dired-track-movement
+      (image-dired-track-thumbnail)))
+
+(defun image-dired-forward-image (&optional arg)
+  "Move to next image and display properties.
+Optional prefix ARG says how many images to move; default is one
+image."
+  (interactive "p")
+  (let (pos (steps (or arg 1)))
+    (dotimes (i steps)
+      (if (and (not (eobp))
+               (save-excursion
+                 (forward-char)
+                 (while (and (not (eobp))
+                             (not (image-dired-image-at-point-p)))
+                   (forward-char))
+                 (setq pos (point))
+                 (image-dired-image-at-point-p)))
+          (goto-char pos)
+        (error "At last image"))))
+  (when image-dired-track-movement
+    (image-dired-track-original-file))
+  (image-dired-display-thumb-properties))
+
+(defun image-dired-backward-image (&optional arg)
+  "Move to previous image and display properties.
+Optional prefix ARG says how many images to move; default is one
+image."
+  (interactive "p")
+  (let (pos (steps (or arg 1)))
+    (dotimes (i steps)
+      (if (and (not (bobp))
+               (save-excursion
+                 (backward-char)
+                 (while (and (not (bobp))
+                             (not (image-dired-image-at-point-p)))
+                   (backward-char))
+                 (setq pos (point))
+                 (image-dired-image-at-point-p)))
+          (goto-char pos)
+        (error "At first image"))))
+  (when image-dired-track-movement
+    (image-dired-track-original-file))
+  (image-dired-display-thumb-properties))
+
+(defun image-dired-next-line ()
+  "Move to next line and display properties."
+  (interactive)
+  (next-line 1)
+  ;; If we end up in an empty spot, back up to the next thumbnail.
+  (if (not (image-dired-image-at-point-p))
+      (image-dired-backward-image))
+  (if image-dired-track-movement
+      (image-dired-track-original-file))
+  (image-dired-display-thumb-properties))
+
+
+(defun image-dired-previous-line ()
+  "Move to previous line and display properties."
+  (interactive)
+  (previous-line 1)
+  ;; If we end up in an empty spot, back up to the next
+  ;; thumbnail. This should only happen if the user deleted a
+  ;; thumbnail and did not refresh, so it is not very common. But we
+  ;; can handle it in a good manner, so why not?
+  (if (not (image-dired-image-at-point-p))
+      (image-dired-backward-image))
+  (if image-dired-track-movement
+      (image-dired-track-original-file))
+  (image-dired-display-thumb-properties))
+
+(defun image-dired-format-properties-string (buf file props comment)
+  "Format display properties.
+BUF is the associated dired buffer, FILE is the original image file
+name, PROPS is a list of tags and COMMENT is the image files's
+comment."
+  (format-spec
+   image-dired-display-properties-format
+   (list
+    (cons ?b (or buf ""))
+    (cons ?f file)
+    (cons ?t (or (princ props) ""))
+    (cons ?c (or comment "")))))
+
+(defun image-dired-display-thumb-properties ()
+  "Display thumbnail properties in the echo area."
+  (if (not (eobp))
+      (let ((file-name (file-name-nondirectory (image-dired-original-file-name)))
+            (dired-buf (buffer-name (image-dired-associated-dired-buffer)))
+            (props (mapconcat
+                    'princ
+                    (get-text-property (point) 'tags)
+                    ", "))
+            (comment (get-text-property (point) 'comment)))
+        (if file-name
+            (message
+             (image-dired-format-properties-string
+              dired-buf
+              file-name
+              props
+              comment))))))
+
+(defun image-dired-dired-file-marked-p ()
+  "Check whether file on current line is marked or not."
+  (save-excursion
+    (beginning-of-line)
+    (not (looking-at "^ .*$"))))
+
+(defun image-dired-modify-mark-on-thumb-original-file (command)
+  "Modify mark in dired buffer.
+This is quite ugly but I don't know how to implemented in a better
+way.  COMMAND is one of 'mark for marking file in dired, 'unmark for
+unmarking file in dired or 'flag for flagging file for delete in
+dired."
+  (let ((file-name (image-dired-original-file-name))
+        (dired-buf (image-dired-associated-dired-buffer)))
+    (if (not (and dired-buf file-name))
+        (message "No image, or image with correct properties, at point.")
+    (with-current-buffer dired-buf
+        (message file-name)
+        (setq file-name (file-name-nondirectory file-name))
+        (goto-char (point-min))
+        (if (search-forward file-name nil t)
+            (cond ((eq command 'mark) (dired-mark 1))
+                  ((eq command 'unmark) (dired-unmark 1))
+                  ((eq command 'toggle)
+                   (if (image-dired-dired-file-marked-p)
+                       (dired-unmark 1)
+                     (dired-mark 1)))
+                  ((eq command 'flag) (dired-flag-file-deletion 1))))))))
+
+(defun image-dired-mark-thumb-original-file ()
+  "Mark original image file in associated dired buffer."
+  (interactive)
+  (image-dired-modify-mark-on-thumb-original-file 'mark)
+  (image-dired-forward-image))
+
+(defun image-dired-unmark-thumb-original-file ()
+  "Unmark original image file in associated dired buffer."
+  (interactive)
+  (image-dired-modify-mark-on-thumb-original-file 'unmark)
+  (image-dired-forward-image))
+
+(defun image-dired-flag-thumb-original-file ()
+  "Flag original image file for deletion in associated dired buffer."
+  (interactive)
+  (image-dired-modify-mark-on-thumb-original-file 'flag)
+  (image-dired-forward-image))
+
+(defun image-dired-toggle-mark-thumb-original-file ()
+  "Toggle mark on original image file in associated dired buffer."
+  (interactive)
+  (image-dired-modify-mark-on-thumb-original-file 'toggle))
+
+(defun image-dired-jump-original-dired-buffer ()
+  "Jump to the dired buffer associated with the current image file.
+You probably want to use this together with
+`image-dired-track-original-file'."
+  (interactive)
+  (let ((buf (image-dired-associated-dired-buffer))
+        window frame)
+    (setq window (image-dired-get-buffer-window buf))
+    (if window
+        (progn
+          (if (not (equal (selected-frame) (setq frame (window-frame window))))
+              (select-frame-set-input-focus frame))
+          (select-window window))
+      (message "Associated dired buffer not visible"))))
+
+;;;###autoload
+(defun image-dired-jump-thumbnail-buffer ()
+  "Jump to thumbnail buffer."
+  (interactive)
+  (let ((window (image-dired-thumbnail-window))
+        frame)
+    (if window
+        (progn
+          (if (not (equal (selected-frame) (setq frame (window-frame window))))
+              (select-frame-set-input-focus frame))
+          (select-window window))
+      (message "Thumbnail buffer not visible"))))
+
+(defvar image-dired-thumbnail-mode-map (make-sparse-keymap)
+  "Keymap for `image-dired-thumbnail-mode'.")
+
+(defvar image-dired-thumbnail-mode-line-up-map (make-sparse-keymap)
+  "Keymap for line-up commands in `image-dired-thumbnail-mode'.")
+
+(defvar image-dired-thumbnail-mode-tag-map (make-sparse-keymap)
+  "Keymap for tag commands in `image-dired-thumbnail-mode'.")
+
+(defun image-dired-define-thumbnail-mode-keymap ()
+  "Define keymap for `image-dired-thumbnail-mode'."
+
+  ;; Keys
+  (define-key image-dired-thumbnail-mode-map [right] 'image-dired-forward-image)
+  (define-key image-dired-thumbnail-mode-map [left] 'image-dired-backward-image)
+  (define-key image-dired-thumbnail-mode-map [up] 'image-dired-previous-line)
+  (define-key image-dired-thumbnail-mode-map [down] 'image-dired-next-line)
+  (define-key image-dired-thumbnail-mode-map "\C-f" 'image-dired-forward-image)
+  (define-key image-dired-thumbnail-mode-map "\C-b" 'image-dired-backward-image)
+  (define-key image-dired-thumbnail-mode-map "\C-p" 'image-dired-previous-line)
+  (define-key image-dired-thumbnail-mode-map "\C-n" 'image-dired-next-line)
+
+  (define-key image-dired-thumbnail-mode-map "d" 'image-dired-flag-thumb-original-file)
+  (define-key image-dired-thumbnail-mode-map [delete]
+    'image-dired-flag-thumb-original-file)
+  (define-key image-dired-thumbnail-mode-map "m" 'image-dired-mark-thumb-original-file)
+  (define-key image-dired-thumbnail-mode-map "u" 'image-dired-unmark-thumb-original-file)
+  (define-key image-dired-thumbnail-mode-map "." 'image-dired-track-original-file)
+  (define-key image-dired-thumbnail-mode-map [tab] 'image-dired-jump-original-dired-buffer)
+
+  ;; add line-up map
+  (define-key image-dired-thumbnail-mode-map "g" image-dired-thumbnail-mode-line-up-map)
+
+  ;; map it to "g" so that the user can press it more quickly
+  (define-key image-dired-thumbnail-mode-line-up-map "g" 'image-dired-line-up-dynamic)
+  ;; "f" for "fixed" number of thumbs per row
+  (define-key image-dired-thumbnail-mode-line-up-map "f" 'image-dired-line-up)
+  ;; "i" for "interactive"
+  (define-key image-dired-thumbnail-mode-line-up-map "i" 'image-dired-line-up-interactive)
+
+  ;; add tag map
+  (define-key image-dired-thumbnail-mode-map "t" image-dired-thumbnail-mode-tag-map)
+
+  ;; map it to "t" so that the user can press it more quickly
+  (define-key image-dired-thumbnail-mode-tag-map "t" 'image-dired-tag-thumbnail)
+  ;; "r" for "remove"
+  (define-key image-dired-thumbnail-mode-tag-map "r" 'image-dired-tag-thumbnail-remove)
+
+  (define-key image-dired-thumbnail-mode-map "\C-m"
+    'image-dired-display-thumbnail-original-image)
+  (define-key image-dired-thumbnail-mode-map [C-return]
+    'image-dired-thumbnail-display-external)
+
+  (define-key image-dired-thumbnail-mode-map "l" 'image-dired-rotate-thumbnail-left)
+  (define-key image-dired-thumbnail-mode-map "r" 'image-dired-rotate-thumbnail-right)
+
+  (define-key image-dired-thumbnail-mode-map "L" 'image-dired-rotate-original-left)
+  (define-key image-dired-thumbnail-mode-map "R" 'image-dired-rotate-original-right)
+
+  (define-key image-dired-thumbnail-mode-map "D"
+    'image-dired-thumbnail-set-image-description)
+
+  (define-key image-dired-thumbnail-mode-map "\C-d" 'image-dired-delete-char)
+  (define-key image-dired-thumbnail-mode-map " "
+    'image-dired-display-next-thumbnail-original)
+  (define-key image-dired-thumbnail-mode-map
+    (kbd "DEL") 'image-dired-display-previous-thumbnail-original)
+  (define-key image-dired-thumbnail-mode-map "c" 'image-dired-comment-thumbnail)
+  (define-key image-dired-thumbnail-mode-map "q" 'image-dired-kill-buffer-and-window)
+
+  ;; Mouse
+  (define-key image-dired-thumbnail-mode-map [mouse-2] 'image-dired-mouse-display-image)
+  (define-key image-dired-thumbnail-mode-map [mouse-1] 'image-dired-mouse-select-thumbnail)
+
+  ;; Seems I must first set C-down-mouse-1 to undefined, or else it
+  ;; will trigger the buffer menu. If I try to instead bind
+  ;; C-down-mouse-1 to `image-dired-mouse-toggle-mark', I get a message
+  ;; about C-mouse-1 not being defined afterwards. Annoying, but I
+  ;; probably do not completely understand mouse events.
+
+  (define-key image-dired-thumbnail-mode-map [C-down-mouse-1] 'undefined)
+  (define-key image-dired-thumbnail-mode-map [C-mouse-1] 'image-dired-mouse-toggle-mark)
+
+  ;; Menu
+  (define-key image-dired-thumbnail-mode-map [menu-bar image-dired]
+    (cons "Image-Dired" (make-sparse-keymap "Image-Dired")))
+
+  (define-key image-dired-thumbnail-mode-map
+    [menu-bar image-dired image-dired-kill-buffer-and-window]
+    '("Quit" . image-dired-kill-buffer-and-window))
+
+  (define-key image-dired-thumbnail-mode-map
+    [menu-bar image-dired image-dired-delete-char]
+    '("Delete thumbnail from buffer" . image-dired-delete-char))
+
+  (define-key image-dired-thumbnail-mode-map
+    [menu-bar image-dired image-dired-tag-thumbnail-remove]
+    '("Remove tag from thumbnail" . image-dired-tag-thumbnail-remove))
+
+  (define-key image-dired-thumbnail-mode-map
+    [menu-bar image-dired image-dired-tag-thumbnail]
+    '("Tag thumbnail" . image-dired-tag-thumbnail))
+
+  (define-key image-dired-thumbnail-mode-map
+    [menu-bar image-dired image-dired-comment-thumbnail]
+    '("Comment thumbnail" . image-dired-comment-thumbnail))
+
+  (define-key image-dired-thumbnail-mode-map
+    [menu-bar image-dired image-dired-refresh-thumb]
+    '("Refresh thumb" . image-dired-refresh-thumb))
+  (define-key image-dired-thumbnail-mode-map
+    [menu-bar image-dired image-dired-line-up-dynamic]
+    '("Dynamic line up" . image-dired-line-up-dynamic))
+  (define-key image-dired-thumbnail-mode-map
+    [menu-bar image-dired image-dired-line-up]
+    '("Line up thumbnails" . image-dired-line-up))
+
+  (define-key image-dired-thumbnail-mode-map
+    [menu-bar image-dired image-dired-rotate-thumbnail-left]
+    '("Rotate thumbnail left" . image-dired-rotate-thumbnail-left))
+  (define-key image-dired-thumbnail-mode-map
+    [menu-bar image-dired image-dired-rotate-thumbnail-right]
+    '("Rotate thumbnail right" . image-dired-rotate-thumbnail-right))
+
+  (define-key image-dired-thumbnail-mode-map
+    [menu-bar image-dired image-dired-rotate-original-left]
+    '("Rotate original left" . image-dired-rotate-original-left))
+  (define-key image-dired-thumbnail-mode-map
+    [menu-bar image-dired image-dired-rotate-original-right]
+    '("Rotate original right" . image-dired-rotate-original-right))
+
+  (define-key image-dired-thumbnail-mode-map
+    [menu-bar image-dired image-dired-toggle-movement-tracking]
+    '("Toggle movement tracking on/off" . image-dired-toggle-movement-tracking))
+
+  (define-key image-dired-thumbnail-mode-map
+    [menu-bar image-dired image-dired-jump-original-dired-buffer]
+    '("Jump to dired buffer" . image-dired-jump-original-dired-buffer))
+  (define-key image-dired-thumbnail-mode-map
+    [menu-bar image-dired image-dired-track-original-file]
+    '("Track original" . image-dired-track-original-file))
+
+  (define-key image-dired-thumbnail-mode-map
+    [menu-bar image-dired image-dired-flag-thumb-original-file]
+    '("Flag original for deletion" . image-dired-flag-thumb-original-file))
+  (define-key image-dired-thumbnail-mode-map
+    [menu-bar image-dired image-dired-unmark-thumb-original-file]
+    '("Unmark original" . image-dired-unmark-thumb-original-file))
+  (define-key image-dired-thumbnail-mode-map
+    [menu-bar image-dired image-dired-mark-thumb-original-file]
+    '("Mark original" . image-dired-mark-thumb-original-file))
+
+  (define-key image-dired-thumbnail-mode-map
+    [menu-bar image-dired image-dired-thumbnail-display-external]
+    '("Display in external viewer" . image-dired-thumbnail-display-external))
+  (define-key image-dired-thumbnail-mode-map
+    [menu-bar image-dired image-dired-display-thumbnail-original-image]
+    '("Display image" . image-dired-display-thumbnail-original-image)))
+
+(defvar image-dired-display-image-mode-map (make-sparse-keymap)
+  "Keymap for `image-dired-display-image-mode'.")
+
+(defun image-dired-define-display-image-mode-keymap ()
+  "Define keymap for `image-dired-display-image-mode'."
+
+  ;; Keys
+  (define-key image-dired-display-image-mode-map "q" 'image-dired-kill-buffer-and-window)
+
+  (define-key image-dired-display-image-mode-map "f"
+    'image-dired-display-current-image-full)
+
+  (define-key image-dired-display-image-mode-map "s"
+    'image-dired-display-current-image-sized)
+
+  ;; Menu
+  (define-key image-dired-display-image-mode-map [menu-bar image-dired]
+    (cons "Image-Dired" (make-sparse-keymap "Image-Dired")))
+
+  (define-key image-dired-display-image-mode-map
+    [menu-bar image-dired image-dired-kill-buffer-and-window]
+    '("Quit" . image-dired-kill-buffer-and-window))
+
+  (define-key image-dired-display-image-mode-map
+    [menu-bar image-dired image-dired-display-current-image-sized]
+    '("Display original, sized to fit" . image-dired-display-current-image-sized))
+
+  (define-key image-dired-display-image-mode-map
+    [menu-bar image-dired image-dired-display-current-image-full]
+    '("Display original, full size" . image-dired-display-current-image-full))
+
+  )
+
+(defun image-dired-display-current-image-full ()
+  "Display current image in full size."
+  (interactive)
+  (let ((file (image-dired-original-file-name)))
+    (if file
+        (progn
+          (image-dired-display-image file t)
+          (message "Full size image displayed"))
+      (error "No original file name at point"))))
+
+(defun image-dired-display-current-image-sized ()
+  "Display current image in sized to fit window dimensions."
+  (interactive)
+  (let ((file (image-dired-original-file-name)))
+    (if file
+        (progn
+          (image-dired-display-image file)
+          (message "Full size image displayed"))
+      (error "No original file name at point"))))
+
+(define-derived-mode image-dired-thumbnail-mode
+  fundamental-mode "image-dired-thumbnail"
+  "Browse and manipulate thumbnail images using dired.
+Use `image-dired-dired' and `image-dired-setup-dired-keybindings' to get a
+nice setup to start with."
+  (image-dired-define-thumbnail-mode-keymap)
+  (message "image-dired-thumbnail-mode enabled"))
+
+(define-derived-mode image-dired-display-image-mode
+  fundamental-mode "image-dired-image-display"
+  "Mode for displaying and manipulating original image.
+Resized or in full-size."
+  (image-dired-define-display-image-mode-keymap)
+  (message "image-dired-display-image-mode enabled"))
+
+;;;###autoload
+(defun image-dired-setup-dired-keybindings ()
+  "Setup easy-to-use keybindings for the commands to be used in dired mode.
+Note that n, p and <down> and <up> will be hijacked and bound to
+`image-dired-dired-x-line'."
+  (interactive)
+
+  ;; Hijack previous and next line movement. Let C-p and C-b be
+  ;; though...
+
+  (define-key dired-mode-map "p" 'image-dired-dired-previous-line)
+  (define-key dired-mode-map "n" 'image-dired-dired-next-line)
+  (define-key dired-mode-map [up] 'image-dired-dired-previous-line)
+  (define-key dired-mode-map [down] 'image-dired-dired-next-line)
+
+  (define-key dired-mode-map (kbd "C-S-n") 'image-dired-next-line-and-display)
+  (define-key dired-mode-map (kbd "C-S-p") 'image-dired-previous-line-and-display)
+  (define-key dired-mode-map (kbd "C-S-m") 'image-dired-mark-and-display-next)
+
+  (define-key dired-mode-map "\C-td" 'image-dired-display-thumbs)
+  (define-key dired-mode-map "\C-tt" 'image-dired-tag-files)
+  (define-key dired-mode-map "\C-tr" 'image-dired-delete-tag)
+  (define-key dired-mode-map [tab] 'image-dired-jump-thumbnail-buffer)
+  (define-key dired-mode-map "\C-ti" 'image-dired-dired-display-image)
+  (define-key dired-mode-map "\C-tx" 'image-dired-dired-display-external)
+  (define-key dired-mode-map "\C-ta" 'image-dired-display-thumbs-append)
+  (define-key dired-mode-map "\C-t." 'image-dired-display-thumb)
+  (define-key dired-mode-map "\C-tc" 'image-dired-dired-comment-files)
+  (define-key dired-mode-map "\C-tf" 'image-dired-mark-tagged-files)
+
+  ;; Menu for dired
+  (define-key dired-mode-map [menu-bar image-dired]
+    (cons "Image-Dired" (make-sparse-keymap "Image-Dired")))
+
+  (define-key dired-mode-map [menu-bar image-dired image-dired-copy-with-exif-file-name]
+    '("Copy with EXIF file name" . image-dired-copy-with-exif-file-name))
+
+  (define-key dired-mode-map [menu-bar image-dired image-dired-dired-comment-files]
+    '("Comment files" . image-dired-dired-comment-files))
+
+  (define-key dired-mode-map [menu-bar image-dired image-dired-mark-tagged-files]
+    '("Mark tagged files" . image-dired-mark-tagged-files))
+
+  (define-key dired-mode-map [menu-bar image-dired image-dired-delete-tag]
+    '("Remove tag from files" . image-dired-delete-tag))
+
+  (define-key dired-mode-map [menu-bar image-dired image-dired-tag-files]
+    '("Tag files" . image-dired-tag-files))
+
+  (define-key dired-mode-map [menu-bar image-dired image-dired-jump-thumbnail-buffer]
+    '("Jump to thumbnail buffer" . image-dired-jump-thumbnail-buffer))
+
+  (define-key dired-mode-map [menu-bar image-dired image-dired-toggle-movement-tracking]
+    '("Toggle movement tracking" . image-dired-toggle-movement-tracking))
+
+  (define-key dired-mode-map
+    [menu-bar image-dired image-dired-toggle-append-browsing]
+    '("Toggle append browsing" . image-dired-toggle-append-browsing))
+
+  (define-key dired-mode-map
+    [menu-bar image-dired image-dired-toggle-disp-props]
+    '("Toggle display properties" . image-dired-toggle-dired-display-properties))
+
+  (define-key dired-mode-map
+    [menu-bar image-dired image-dired-dired-display-external]
+    '("Display in external viewer" . image-dired-dired-display-external))
+  (define-key dired-mode-map
+    [menu-bar image-dired image-dired-dired-display-image]
+    '("Display image" . image-dired-dired-display-image))
+  (define-key dired-mode-map
+    [menu-bar image-dired image-dired-display-thumb]
+    '("Display this thumbnail" . image-dired-display-thumb))
+  (define-key dired-mode-map
+    [menu-bar image-dired image-dired-display-thumbs-append]
+    '("Display thumbnails append" . image-dired-display-thumbs-append))
+  (define-key dired-mode-map
+    [menu-bar image-dired image-dired-display-thumbs]
+    '("Display thumbnails" . image-dired-display-thumbs))
+
+  (define-key dired-mode-map
+    [menu-bar image-dired image-dired-create-thumbs]
+    '("Create thumbnails for marked files" . image-dired-create-thumbs))
+
+  (define-key dired-mode-map
+    [menu-bar image-dired image-dired-mark-and-display-next]
+    '("Mark and display next" . image-dired-mark-and-display-next))
+  (define-key dired-mode-map
+    [menu-bar image-dired image-dired-previous-line-and-display]
+    '("Display thumb for previous file" . image-dired-previous-line-and-display))
+  (define-key dired-mode-map
+    [menu-bar image-dired image-dired-next-line-and-display]
+    '("Display thumb for next file" . image-dired-next-line-and-display)))
+
+(defun image-dired-create-thumbs (&optional arg)
+  "Create thumbnail images for all marked files in dired.
+With prefix argument ARG, create thumbnails even if they already exist
+\(i.e.  use this to refresh your thumbnails)."
+  (interactive "P")
+  (let (curr-file thumb-name files count)
+    (setq files (dired-get-marked-files))
+    (mapcar
+     (lambda (curr-file)
+       (setq thumb-name (image-dired-thumb-name curr-file))
+       ;; If the user overrides the exist check, we must clear the
+       ;; image cache so that if the user wants to display the
+       ;; thumnail, it is not fetched from cache.
+       (if arg
+           (clear-image-cache))
+       (if (or (not (file-exists-p thumb-name))
+               arg)
+           (if (not (= 0 (image-dired-create-thumb curr-file
+                                             (image-dired-thumb-name curr-file))))
+               (error "Thumb could not be created"))))
+     files)))
+
+(defvar image-dired-slideshow-timer nil
+  "Slideshow timer.")
+
+(defvar image-dired-slideshow-count 0
+  "Keeping track on number of images in slideshow.")
+
+(defvar image-dired-slideshow-times 0
+  "Number of pictures to display in slideshow.")
+
+(defun image-dired-slideshow-step ()
+  "Step to next file, if `image-dired-slideshow-times' has not been reached."
+  (if (< image-dired-slideshow-count image-dired-slideshow-times)
+      (progn
+        (message "%s" (1+ image-dired-slideshow-count))
+        (setq image-dired-slideshow-count (1+ image-dired-slideshow-count))
+        (image-dired-next-line-and-display))
+    (image-dired-slideshow-stop)))
+
+(defun image-dired-slideshow-start ()
+  "Start slideshow.
+Ask user for number of images to show and the delay in between."
+  (interactive)
+  (setq image-dired-slideshow-count 0)
+  (setq image-dired-slideshow-times (string-to-number (read-string "How many: ")))
+  (let ((repeat (string-to-number
+                 (read-string
+                  "Delay, in seconds. Decimals are accepted : " "1"))))
+    (setq image-dired-slideshow-timer
+          (run-with-timer
+           0 repeat
+           'image-dired-slideshow-step))))
+
+(defun image-dired-slideshow-stop ()
+  "Cancel slideshow."
+  (interactive)
+  (cancel-timer image-dired-slideshow-timer))
+
+(defun image-dired-delete-char ()
+  "Remove current thumbnail from thumbnail buffer and line up."
+  (interactive)
+  (let ((inhibit-read-only t))
+    (delete-char 1)
+    (if (looking-at " ")
+        (delete-char 1))))
+
+;;;###autoload
+(defun image-dired-display-thumbs-append ()
+  "Append thumbnails to `image-dired-thumbnail-buffer'."
+  (interactive)
+  (image-dired-display-thumbs nil t t))
+
+;;;###autoload
+(defun image-dired-display-thumb ()
+  "Shorthand for `image-dired-display-thumbs' with prefix argument."
+  (interactive)
+  (image-dired-display-thumbs t nil t))
+
+(defun image-dired-line-up ()
+  "Line up thumbnails according to `image-dired-thumbs-per-row'.
+See also `image-dired-line-up-dynamic'."
+  (interactive)
+  (let ((inhibit-read-only t))
+    (goto-char (point-min))
+    (while (and (not (image-dired-image-at-point-p))
+                (not (eobp)))
+      (delete-char 1))
+    (while (not (eobp))
+      (forward-char)
+      (while (and (not (image-dired-image-at-point-p))
+                  (not (eobp)))
+        (delete-char 1)))
+    (goto-char (point-min))
+    (let ((count 0))
+      (while (not (eobp))
+        (forward-char)
+        (if (= image-dired-thumbs-per-row 1)
+            (insert "\n")
+          (insert " ")
+          (setq count (1+ count))
+          (when (and (= count (- image-dired-thumbs-per-row 1))
+		     (not (eobp)))
+            (forward-char)
+            (insert "\n")
+            (setq count 0)))))
+    (goto-char (point-min))))
+
+(defun image-dired-line-up-dynamic ()
+  "Line up thumbnails images dynamically.
+Calculate how many thumbnails fit."
+  (interactive)
+  (let* ((char-width (frame-char-width))
+        (width (image-dired-window-width-pixels (image-dired-thumbnail-window)))
+        (image-dired-thumbs-per-row
+         (/ width
+            (+ (* 2 image-dired-thumb-relief)
+               (* 2 image-dired-thumb-margin)
+               image-dired-thumb-width char-width))))
+    (image-dired-line-up)))
+
+(defun image-dired-line-up-interactive ()
+  "Line up thumbnails interactively.
+Ask user how many thumbnails should be displayed per row."
+  (interactive)
+  (let ((image-dired-thumbs-per-row
+         (string-to-number (read-string "How many thumbs per row: "))))
+    (if (not (> image-dired-thumbs-per-row 0))
+        (message "Number must be greater than 0")
+      (image-dired-line-up))))
+
+(defun image-dired-thumbnail-display-external ()
+  "Display original image for thumbnail at point using external viewer."
+  (interactive)
+  (let ((file (image-dired-original-file-name)))
+    (if (not (image-dired-image-at-point-p))
+        (message "No thumbnail at point")
+      (if (not file)
+          (message "No original file name found")
+        (call-process shell-file-name nil nil nil shell-command-switch
+		      (format "%s \"%s\"" image-dired-external-viewer file))))))
+
+;;;###autoload
+(defun image-dired-dired-display-external ()
+  "Display file at point using an external viewer."
+  (interactive)
+  (let ((file (dired-get-filename)))
+    (call-process shell-file-name nil nil nil shell-command-switch
+		  (format "%s \"%s\"" image-dired-external-viewer file))))
+
+(defun image-dired-window-width-pixels (window)
+  "Calculate WINDOW width in pixels."
+    (* (window-width window) (frame-char-width)))
+
+(defun image-dired-window-height-pixels (window)
+  "Calculate WINDOW height in pixels."
+  ;; Note: The mode-line consumes one line
+    (* (- (window-height window) 1) (frame-char-height)))
+
+(defun image-dired-display-window ()
+  "Return window where `image-dired-display-image-buffer' is visible."
+  (get-window-with-predicate
+   (lambda (window)
+     (equal (buffer-name (window-buffer window)) image-dired-display-image-buffer))
+   nil t))
+
+(defun image-dired-thumbnail-window ()
+  "Return window where `image-dired-thumbnail-buffer' is visible."
+  (get-window-with-predicate
+   (lambda (window)
+     (equal (buffer-name (window-buffer window)) image-dired-thumbnail-buffer))
+   nil t))
+
+(defun image-dired-associated-dired-buffer-window ()
+  "Return window where associated dired buffer is visible."
+  (let (buf)
+    (if (image-dired-image-at-point-p)
+        (progn
+          (setq buf (image-dired-associated-dired-buffer))
+          (get-window-with-predicate
+           (lambda (window)
+             (equal (window-buffer window) buf))))
+      (error "No thumbnail image at point"))))
+
+(defun image-dired-display-window-width ()
+  "Return width, in pixels, of image-dired's image display window."
+  (- (image-dired-window-width-pixels (image-dired-display-window))
+     image-dired-display-window-width-correction))
+
+(defun image-dired-display-window-height ()
+  "Return height, in pixels, of image-dired's image display window."
+  (- (image-dired-window-height-pixels (image-dired-display-window))
+     image-dired-display-window-height-correction))
+
+(defun image-dired-display-image (file &optional original-size)
+  "Display image FILE in image buffer.
+Use this when you want to display the image, semi sized, in a new
+window.  The image is sized to fit the display window (using a
+temporary file, don't worry).  Because of this, it will not be as
+quick as opening it directly, but on most modern systems it
+should feel snappy enough.
+
+If optional argument ORIGINAL-SIZE is non-nil, display image in its
+original size."
+  (let ((new-file (expand-file-name image-dired-temp-image-file))
+        width height command ret
+        (image-type 'jpeg))
+    (setq file (expand-file-name file))
+    (if (not original-size)
+        (progn
+          (setq width (image-dired-display-window-width))
+          (setq height (image-dired-display-window-height))
+          (setq command
+                (format-spec
+                 image-dired-cmd-create-temp-image-options
+                 (list
+                  (cons ?p image-dired-cmd-create-temp-image-program)
+                  (cons ?w width)
+                  (cons ?h height)
+                  (cons ?f file)
+                  (cons ?t new-file))))
+          (setq ret (call-process shell-file-name nil nil nil
+				  shell-command-switch command))
+          (if (not (= 0 ret))
+              (error "Could not resize image")))
+      (setq image-type (image-type-from-file-name file))
+      (copy-file file new-file t))
+    (with-current-buffer (image-dired-create-display-image-buffer)
+      (let ((inhibit-read-only t))
+        (erase-buffer)
+        (clear-image-cache)
+        (image-dired-insert-image image-dired-temp-image-file image-type 0 0)
+        (goto-char (point-min))
+        (image-dired-update-property 'original-file-name file)))))
+
+(defun image-dired-display-thumbnail-original-image (&optional arg)
+  "Display current thumbnail's original image in display buffer.
+See documentation for `image-dired-display-image' for more information.
+With prefix argument ARG, display image in its original size."
+  (interactive "P")
+  (let ((file (image-dired-original-file-name)))
+    (if (not (string-equal major-mode "image-dired-thumbnail-mode"))
+        (message "Not in image-dired-thumbnail-mode")
+      (if (not (image-dired-image-at-point-p))
+          (message "No thumbnail at point")
+        (if (not file)
+            (message "No original file name found")
+	  (image-dired-create-display-image-buffer)
+          (display-buffer image-dired-display-image-buffer)
+          (image-dired-display-image file arg))))))
+
+
+;;;###autoload
+(defun image-dired-dired-display-image (&optional arg)
+  "Display current image file.
+See documentation for `image-dired-display-image' for more information.
+With prefix argument ARG, display image in its original size."
+  (interactive "P")
+  (image-dired-create-display-image-buffer)
+  (display-buffer image-dired-display-image-buffer)
+  (image-dired-display-image (dired-get-filename) arg))
+
+(defun image-dired-image-at-point-p ()
+  "Return true if there is a image-dired thumbnail at point."
+  (get-text-property (point) 'image-dired-thumbnail))
+
+(defun image-dired-rotate-thumbnail (degrees)
+  "Rotate thumbnail DEGREES degrees."
+  (if (not (image-dired-image-at-point-p))
+      (message "No thumbnail at point")
+    (let ((file (image-dired-thumb-name (image-dired-original-file-name)))
+          command)
+      (setq command (format-spec
+                     image-dired-cmd-rotate-thumbnail-options
+                     (list
+                      (cons ?p image-dired-cmd-rotate-thumbnail-program)
+                      (cons ?d degrees)
+                      (cons ?t (expand-file-name file)))))
+      (call-process shell-file-name nil nil nil shell-command-switch command)
+      ;; Clear the cache to refresh image. I wish I could just refresh
+      ;; the current file but I do not know how to do that. Yet...
+      (clear-image-cache))))
+
+(defun image-dired-rotate-thumbnail-left ()
+  "Rotate thumbnail left (counter clockwise) 90 degrees.
+The result of the rotation is displayed in the image display area
+and a confirmation is needed before the original image files is
+overwritten.  This confirmation can be turned off using
+`image-dired-rotate-original-ask-before-overwrite'."
+  (interactive)
+  (image-dired-rotate-thumbnail "270"))
+
+(defun image-dired-rotate-thumbnail-right ()
+  "Rotate thumbnail counter right (clockwise) 90 degrees.
+The result of the rotation is displayed in the image display area
+and a confirmation is needed before the original image files is
+overwritten.  This confirmation can be turned off using
+`image-dired-rotate-original-ask-before-overwrite'."
+  (interactive)
+  (image-dired-rotate-thumbnail "90"))
+
+(defun image-dired-refresh-thumb ()
+  "Force creation of new image for current thumbnail."
+  (interactive)
+  (let ((file (image-dired-original-file-name)))
+    (clear-image-cache)
+    (image-dired-create-thumb file (image-dired-thumb-name file))))
+
+(defun image-dired-rotate-original (degrees)
+  "Rotate original image DEGREES degrees."
+  (if (not (image-dired-image-at-point-p))
+      (message "No image at point")
+    (let ((file (image-dired-original-file-name))
+          command temp-file)
+      (if (not (string-match "\.[jJ][pP[eE]?[gG]$" file))
+          (error "Only JPEG images can be rotated!"))
+      (setq command (format-spec
+                     image-dired-cmd-rotate-original-options
+                     (list
+                      (cons ?p image-dired-cmd-rotate-original-program)
+                      (cons ?d degrees)
+                      (cons ?o (expand-file-name file))
+                      (cons ?t image-dired-temp-rotate-image-file))))
+      (if (not (= 0 (call-process shell-file-name nil nil nil
+				  shell-command-switch command)))
+          (error "Could not rotate image")
+        (image-dired-display-image image-dired-temp-rotate-image-file)
+        (if (or (and image-dired-rotate-original-ask-before-overwrite
+                     (y-or-n-p
+		      "Rotate to temp file OK.  Overwrite original image? "))
+                (not image-dired-rotate-original-ask-before-overwrite))
+            (progn
+              (copy-file image-dired-temp-rotate-image-file file t)
+              (image-dired-refresh-thumb))
+          (image-dired-display-image file))))))
+
+(defun image-dired-rotate-original-left ()
+  "Rotate original image left (counter clockwise) 90 degrees."
+  (interactive)
+  (image-dired-rotate-original "270"))
+
+(defun image-dired-rotate-original-right ()
+  "Rotate original image right (clockwise) 90 degrees."
+  (interactive)
+  (image-dired-rotate-original "90"))
+
+(defun image-dired-get-exif-file-name (file)
+  "Use the image's EXIF information to return a unique file name.
+The file name should be unique as long as you do not take more than
+one picture per second.  The original file name is suffixed at the end
+for traceability.  The format of the returned file name is
+YYYY_MM_DD_HH_MM_DD_ORIG_FILE_NAME.jpg.  Used from
+`image-dired-copy-with-exif-file-name'."
+  (let (data no-exif-data-found)
+    (if (not (string-match "\.[Jj][Pp][Ee]?[Gg]$" (expand-file-name file)))
+        (progn
+          (setq no-exif-data-found t)
+          (setq data
+                (format-time-string
+                 "%Y:%m:%d %H:%M:%S"
+                 (nth 5 (file-attributes (expand-file-name file))))))
+      (setq data (image-dired-get-exif-data (expand-file-name file)
+				      "DateTimeOriginal")))
+    (while (string-match "[ :]" data)
+      (setq data (replace-match "_" nil nil data)))
+    (format "%s%s%s" data
+            (if no-exif-data-found
+                "_noexif_"
+              "_")
+            (file-name-nondirectory file))))
+
+(defun image-dired-thumbnail-set-image-description ()
+  "Set the ImageDescription EXIF tag for the original image.
+If the image already has a value for this tag, it is used as the
+default value at the prompt."
+  (interactive)
+  (if (not (image-dired-image-at-point-p))
+      (message "No thumbnail at point")
+    (let* ((file (image-dired-original-file-name))
+           (old-value (image-dired-get-exif-data file "ImageDescription")))
+      (if (eq 0
+              (image-dired-set-exif-data file "ImageDescription"
+                                   (read-string "Value of ImageDescription: "
+						old-value)))
+          (message "Successfully wrote ImageDescription tag.")
+        (error "Could not write ImageDescription tag")))))
+
+(defun image-dired-set-exif-data (file tag-name tag-value)
+  "In FILE, set EXIF tag TAG-NAME to value TAG-VALUE."
+  (let (command)
+    (setq command (format-spec
+                   image-dired-cmd-write-exif-data-options
+                   (list
+                    (cons ?p image-dired-cmd-write-exif-data-program)
+                    (cons ?f (expand-file-name file))
+                    (cons ?t tag-name)
+                    (cons ?v tag-value))))
+    (call-process shell-file-name nil nil nil shell-command-switch command)))
+
+(defun image-dired-get-exif-data (file tag-name)
+  "From FILE, return EXIF tag TAG-NAME."
+  (let ((buf (get-buffer-create "*image-dired-get-exif-data*"))
+        command tag-value)
+    (setq command (format-spec
+                   image-dired-cmd-read-exif-data-options
+                   (list
+                    (cons ?p image-dired-cmd-read-exif-data-program)
+                    (cons ?f file)
+                    (cons ?t tag-name))))
+    (with-current-buffer buf
+      (delete-region (point-min) (point-max))
+      (if (not (eq (call-process shell-file-name nil t nil
+				 shell-command-switch command) 0))
+          (error "Could not get EXIF tag")
+        (goto-char (point-min))
+        ;; Clean buffer from newlines and carriage returns before
+        ;; getting final info
+        (while (search-forward-regexp "[\n\r]" nil t)
+          (replace-match "" nil t))
+        (setq tag-value (buffer-substring (point-min) (point-max)))))
+    tag-value))
+
+(defun image-dired-copy-with-exif-file-name ()
+  "Copy file with unique name to main image directory.
+Copy current or all marked files in dired to a new file in your
+main image directory, using a file name generated by
+`image-dired-get-exif-file-name'.  A typical usage for this if when
+copying images from a digital camera into the image directory.
+
+ Typically, you would open up the folder with the incoming
+digital images, mark the files to be copied, and execute this
+function.  The result is a couple of new files in
+`image-dired-main-image-directory' called
+2005_05_08_12_52_00_dscn0319.jpg,
+2005_05_08_14_27_45_dscn0320.jpg etc."
+  (interactive)
+  (let (new-name
+        (files (dired-get-marked-files)))
+    (mapcar
+     (lambda (curr-file)
+       (setq new-name
+             (format "%s/%s"
+                     (file-name-as-directory
+                      (expand-file-name image-dired-main-image-directory))
+                     (image-dired-get-exif-file-name curr-file)))
+       (message "Copying %s to %s" curr-file new-name)
+       (copy-file curr-file new-name))
+     files)))
+
+(defun image-dired-display-next-thumbnail-original ()
+  "In thubnail buffer, move to next thumbnail and display the image."
+  (interactive)
+  (image-dired-forward-image)
+  (image-dired-display-thumbnail-original-image))
+
+(defun image-dired-display-previous-thumbnail-original ()
+  "Move to previous thumbnail and display image."
+  (interactive)
+  (image-dired-backward-image)
+  (image-dired-display-thumbnail-original-image))
+
+(defun image-dired-write-comments (file-comments)
+  "Write file comments to database.
+Write file comments to one or more files.  FILE-COMMENTS is an alist on
+the following form:
+ ((FILE . COMMENT) ... )"
+  (let (end comment-beg-pos comment-end-pos file comment)
+    (with-temp-file image-dired-db-file
+      (insert-file-contents image-dired-db-file)
+      (dolist (elt file-comments)
+	(setq file (car elt)
+	      comment (cdr elt))
+	(goto-char (point-min))
+	(if (search-forward-regexp (format "^%s.*$" file) nil t)
+	    (progn
+	      (setq end (point))
+	      (beginning-of-line)
+	      ;; Delete old comment, if any
+	      (when (search-forward ";comment:" end t)
+		(setq comment-beg-pos (match-beginning 0))
+		;; Any tags after the comment?
+		(if (search-forward ";" end t)
+		    (setq comment-end-pos (- (point) 1))
+		  (setq comment-end-pos end))
+		;; Delete comment tag and comment
+		(delete-region comment-beg-pos comment-end-pos))
+	      ;; Insert new comment
+	      (beginning-of-line)
+	      (unless (search-forward ";" end t)
+		(end-of-line)
+		(insert ";"))
+	      (insert (format "comment:%s;" comment)))
+	  ;; File does not exist in database - add it.
+	  (goto-char (point-max))
+	  (insert (format "\n%s;comment:%s" file comment)))))))
+
+(defun image-dired-update-property (prop value)
+  "Update text property PROP with value VALUE at point."
+  (let ((inhibit-read-only t))
+    (put-text-property
+     (point) (1+ (point))
+     prop
+     value)))
+
+;;;###autoload
+(defun image-dired-dired-comment-files ()
+  "Add comment to current or marked files in dired."
+  (interactive)
+  (let ((comment (image-dired-read-comment)))
+    (image-dired-write-comments
+     (mapcar
+      (lambda (curr-file)
+        (cons curr-file comment))
+      (dired-get-marked-files)))))
+
+(defun image-dired-comment-thumbnail ()
+  "Add comment to current thumbnail in thumbnail buffer."
+  (interactive)
+  (let* ((file (image-dired-original-file-name))
+         (comment (image-dired-read-comment file)))
+    (image-dired-write-comments (list (cons file comment)))
+    (image-dired-update-property 'comment comment))
+  (image-dired-display-thumb-properties))
+
+(defun image-dired-read-comment (&optional file)
+  "Read comment for an image.
+Read comment for an image, optionally using old comment from FILE
+as initial value."
+  (let ((comment
+         (read-string
+          "Comment: "
+          (if file (image-dired-get-comment file)))))
+    comment))
+
+(defun image-dired-get-comment (file)
+  "Get comment for file FILE."
+  (save-excursion
+    (let (end buf comment-beg-pos comment-end-pos comment)
+      (setq buf (find-file image-dired-db-file))
+      (goto-char (point-min))
+      (when (search-forward-regexp
+             (format "^%s" file) nil t)
+        (end-of-line)
+        (setq end (point))
+        (beginning-of-line)
+        (cond ((search-forward ";comment:" end t)
+               (setq comment-beg-pos (point))
+               (if (search-forward ";" end t)
+                   (setq comment-end-pos (- (point) 1))
+                 (setq comment-end-pos end))
+               (setq comment (buffer-substring
+                              comment-beg-pos comment-end-pos)))))
+      (kill-buffer buf)
+      comment)))
+
+;;;###autoload
+(defun image-dired-mark-tagged-files ()
+  "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 image-dired'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)
+        files buf)
+    (save-excursion
+      (setq buf (find-file image-dired-db-file))
+      (goto-char (point-min))
+      ;; Collect matches
+      (while (search-forward-regexp
+              (concat "\\(^[^;\n]+\\);.*" tag ".*$") nil t)
+        (setq files (append (list (match-string 1)) files)))
+      (kill-buffer buf)
+      ;; Mark files
+      (mapcar
+       ;; I tried using `dired-mark-files-regexp' but it was
+       ;; waaaay to slow.
+       (lambda (curr-file)
+         ;; Don't bother about hits found in other directories than
+         ;; the current one.
+         (when (string= (file-name-as-directory
+                         (expand-file-name default-directory))
+                      (file-name-as-directory
+                       (file-name-directory curr-file)))
+           (setq curr-file (file-name-nondirectory curr-file))
+           (goto-char (point-min))
+           (when (search-forward-regexp (format "\\s %s$" curr-file) nil t)
+             (setq hits (+ hits 1))
+             (dired-mark 1))))
+       files))
+    (message "%d files with matching tag marked." hits)))
+
+(defun image-dired-mouse-display-image (event)
+  "Use mouse EVENT, call `image-dired-display-image' to display image.
+Track this in associated dired buffer if `image-dired-track-movement' is
+non-nil."
+  (interactive "e")
+  (let (file)
+    (mouse-set-point event)
+    (goto-char (posn-point (event-end event)))
+    (setq file (image-dired-original-file-name))
+    (if image-dired-track-movement
+        (image-dired-track-original-file))
+    (image-dired-create-display-image-buffer)
+    (display-buffer image-dired-display-image-buffer)
+    (image-dired-display-image file)))
+
+(defun image-dired-mouse-select-thumbnail (event)
+  "Use mouse EVENT to select thumbnail image.
+Track this in associated dired buffer if `image-dired-track-movement' is
+non-nil."
+  (interactive "e")
+  (let (file)
+    (mouse-set-point event)
+    (goto-char (posn-point (event-end event)))
+    (if image-dired-track-movement
+        (image-dired-track-original-file)))
+  (image-dired-display-thumb-properties))
+
+(defun image-dired-mouse-toggle-mark (event)
+  "Use mouse EVENT to toggle dired mark for thumbnail.
+Track this in associated dired buffer if `image-dired-track-movement' is
+non-nil."
+  (interactive "e")
+  (let (file)
+    (mouse-set-point event)
+    (goto-char (posn-point (event-end event)))
+    (if image-dired-track-movement
+        (image-dired-track-original-file)))
+  (image-dired-toggle-mark-thumb-original-file))
+
+(defun image-dired-dired-display-properties ()
+  "Display properties for dired file in the echo area."
+  (interactive)
+  (let* ((file (dired-get-filename))
+         (file-name (file-name-nondirectory file))
+         (dired-buf (buffer-name (current-buffer)))
+         (props (mapconcat
+                 'princ
+                 (image-dired-list-tags file)
+                 ", "))
+         (comment (image-dired-get-comment file)))
+    (if file-name
+        (message
+         (image-dired-format-properties-string
+          dired-buf
+          file-name
+          props
+          comment)))))
+
+(defvar image-dired-tag-file-list nil
+  "List to store tag-file structure.")
+
+(defvar image-dired-file-tag-list nil
+  "List to store file-tag structure.")
+
+(defvar image-dired-file-comment-list nil
+  "List to store file comments.")
+
+(defun image-dired-add-to-tag-file-list (tag file)
+  "Add relation between TAG and FILE."
+  (let (curr)
+    (if image-dired-tag-file-list
+        (if (setq curr (assoc tag image-dired-tag-file-list))
+            (if (not (member file curr))
+                (setcdr curr (cons file (cdr curr))))
+          (setcdr image-dired-tag-file-list
+                  (cons (list tag file) (cdr image-dired-tag-file-list))))
+      (setq image-dired-tag-file-list (list (list tag file))))))
+
+(defun image-dired-add-to-tag-file-lists (tag file)
+  "Helper function used from `image-dired-create-gallery-lists'.
+
+Add TAG to FILE in one list and FILE to TAG in the other.
+
+Lisp structures look like the following:
+
+image-dired-file-tag-list:
+
+  ((\"filename1\" \"tag1\" \"tag2\" \"tag3\" ...)
+   (\"filename2\" \"tag1\" \"tag2\" \"tag3\" ...)
+   ...)
+
+image-dired-tag-file-list:
+
+ ((\"tag1\" \"filename1\" \"filename2\" \"filename3\" ...)
+  (\"tag2\" \"filename1\" \"filename2\" \"filename3\" ...)
+  ...)"
+  ;; Add tag to file list
+  (let (curr)
+    (if image-dired-file-tag-list
+        (if (setq curr (assoc file image-dired-file-tag-list))
+            (setcdr curr (cons tag (cdr curr)))
+          (setcdr image-dired-file-tag-list
+                  (cons (list file tag) (cdr image-dired-file-tag-list))))
+      (setq image-dired-file-tag-list (list (list file tag))))
+    ;; Add file to tag list
+    (if image-dired-tag-file-list
+        (if (setq curr (assoc tag image-dired-tag-file-list))
+            (if (not (member file curr))
+                (setcdr curr (cons file (cdr curr))))
+          (setcdr image-dired-tag-file-list
+                  (cons (list tag file) (cdr image-dired-tag-file-list))))
+      (setq image-dired-tag-file-list (list (list tag file))))))
+
+(defun image-dired-add-to-file-comment-list (file comment)
+  "Helper function used from `image-dired-create-gallery-lists'.
+
+For FILE, add COMMENT to list.
+
+Lisp structure looks like the following:
+
+image-dired-file-comment-list:
+
+  ((\"filename1\" .  \"comment1\")
+   (\"filename2\" .  \"comment2\")
+   ...)"
+  (if image-dired-file-comment-list
+      (if (not (assoc file image-dired-file-comment-list))
+          (setcdr image-dired-file-comment-list
+                  (cons (cons file comment)
+                        (cdr image-dired-file-comment-list))))
+    (setq image-dired-file-comment-list (list (cons file comment)))))
+
+(defun image-dired-create-gallery-lists ()
+  "Create temporary lists used by `image-dired-gallery-generate'."
+  (let ((buf (find-file image-dired-db-file))
+        end beg file row-tags)
+    (setq image-dired-tag-file-list nil)
+    (setq image-dired-file-tag-list nil)
+    (setq image-dired-file-comment-list nil)
+    (goto-char (point-min))
+    (while (search-forward-regexp "^." nil t)
+      (end-of-line)
+      (setq end (point))
+      (beginning-of-line)
+      (setq beg (point))
+      (if (not (search-forward ";" end nil))
+          (error "Something is really wrong, check format of database"))
+      (setq row-tags (split-string
+                      (buffer-substring beg end) ";"))
+      (setq file (car row-tags))
+      (mapc
+       (lambda (x)
+         (if (not (string-match "^comment:\\(.*\\)" x))
+             (image-dired-add-to-tag-file-lists x file)
+           (image-dired-add-to-file-comment-list file (match-string 1 x))))
+       (cdr row-tags)))
+    (kill-buffer buf))
+  ;; Sort tag-file list
+  (setq image-dired-tag-file-list
+        (sort image-dired-tag-file-list
+              (lambda (x y)
+                (string< (car x) (car y))))))
+
+(defun image-dired-hidden-p (file)
+  "Return t if image FILE has a \"hidden\" tag."
+  (let (hidden)
+    (mapc
+     (lambda (tag)
+       (if (member tag image-dired-gallery-hidden-tags)
+           (setq hidden t)))
+     (cdr (assoc file image-dired-file-tag-list)))
+    hidden))
+
+(defun image-dired-gallery-generate ()
+  "Generate gallery pages.
+First we create a couple of Lisp structures from the database to make
+it easier to generate, then HTML-files are created in
+`image-dired-gallery-dir'"
+  (interactive)
+  (if (eq 'per-directory image-dired-thumbnail-storage)
+      (error "Currently, gallery generation is not supported \
+when using per-directory thumbnail file storage"))
+  (image-dired-create-gallery-lists)
+  (let ((tags image-dired-tag-file-list)
+        count curr tag index-buf tag-buf
+        comment file-tags tag-link tag-link-list)
+    ;; Make sure gallery root exist
+    (if (file-exists-p image-dired-gallery-dir)
+        (if (not (file-directory-p image-dired-gallery-dir))
+            (error "Variable image-dired-gallery-dir is not a directory"))
+      (make-directory image-dired-gallery-dir))
+    ;; Open index file
+    (setq index-buf (find-file
+                     (format "%s/index.html" image-dired-gallery-dir)))
+    (erase-buffer)
+    (insert "<html>\n")
+    (insert "  <body>\n")
+    (insert "   <h2>Image-Dired Gallery</h2>\n")
+    (insert (format "<p>\n    Gallery generated %s\n   <p>\n"
+                    (current-time-string)))
+    (insert "   <h3>Tag index</h3>\n")
+    (setq count 1)
+    ;; Pre-generate list of all tag links
+    (mapc
+     (lambda (curr)
+       (setq tag (car curr))
+       (when (not (member tag image-dired-gallery-hidden-tags))
+         (setq tag-link (format "<a href=\"%d.html\">%s</a>" count tag))
+         (if tag-link-list
+             (setq tag-link-list
+                   (append tag-link-list (list (cons tag tag-link))))
+           (setq tag-link-list (list (cons tag tag-link))))
+         (setq count (1+ count))))
+     tags)
+    (setq count 1)
+    ;; Main loop where we generated thumbnail pages per tag
+    (mapc
+     (lambda (curr)
+       (setq tag (car curr))
+       ;; Don't display hidden tags
+       (when (not (member tag image-dired-gallery-hidden-tags))
+         ;; Insert link to tag page in index
+         (insert (format "    %s<br>\n" (cdr (assoc tag tag-link-list))))
+         ;; Open per-tag file
+         (setq tag-buf (find-file
+                        (format "%s/%s.html" image-dired-gallery-dir count)))
+         (erase-buffer)
+         (insert "<html>\n")
+         (insert "  <body>\n")
+         (insert "  <p><a href=\"index.html\">Index</a></p>\n")
+         (insert (format "  <h2>Images with tag &quot;%s&quot;</h2>" tag))
+         ;; Main loop for files per tag page
+         (mapc
+          (lambda (file)
+            (when (not (image-dired-hidden-p file))
+              ;; Insert thumbnail with link to full image
+              (insert
+               (format "<a href=\"%s/%s\"><img src=\"%s/%s\"%s></a>\n"
+                       image-dired-gallery-image-root-url
+		       (file-name-nondirectory file)
+                       image-dired-gallery-thumb-image-root-url
+                       (file-name-nondirectory (image-dired-thumb-name file)) file))
+              ;; Insert comment, if any
+              (if (setq comment (cdr (assoc file image-dired-file-comment-list)))
+                  (insert (format "<br>\n%s<br>\n" comment))
+                (insert "<br>\n"))
+              ;; Insert links to other tags, if any
+              (when (> (length
+                        (setq file-tags (assoc file image-dired-file-tag-list))) 2)
+                (insert "[ ")
+                (mapc
+                 (lambda (extra-tag)
+                   ;; Only insert if not file name or the main tag
+                   (if (and (not (equal extra-tag tag))
+                            (not (equal extra-tag file)))
+                       (insert
+                        (format "%s " (cdr (assoc extra-tag tag-link-list))))))
+                 file-tags)
+                (insert "]<br>\n"))))
+          (cdr curr))
+         (insert "  <p><a href=\"index.html\">Index</a></p>\n")
+         (insert "  </body>\n")
+         (insert "</html>\n")
+         (save-buffer)
+         (kill-buffer tag-buf)
+         (setq count (1+ count))))
+       tags)
+    (insert "  </body>\n")
+    (insert "</html>")
+    (save-buffer)
+    (kill-buffer index-buf)))
+
+(defun image-dired-kill-buffer-and-window ()
+  "Kill the current buffer and, if possible, also the window."
+  (interactive)
+  (let ((buffer (current-buffer)))
+    (condition-case nil
+        (delete-window (selected-window))
+      (error nil))
+    (kill-buffer buffer)))
+
+(defvar image-dired-widget-list nil
+  "List to keep track of meta data in edit buffer.")
+
+;;;###autoload
+(defun image-dired-dired-edit-comment-and-tags ()
+  "Edit comment and tags of current or marked image files.
+Edit comment and tags for all marked image files in an
+easy-to-use form."
+  (interactive)
+  (setq image-dired-widget-list nil)
+  ;; Setup buffer.
+  (let ((files (dired-get-marked-files)))
+    (switch-to-buffer "*Image-Dired Edit Meta Data*")
+    (kill-all-local-variables)
+    (make-local-variable 'widget-example-repeat)
+    (let ((inhibit-read-only t))
+      (erase-buffer))
+    (remove-overlays)
+    ;; Some help for the user.
+    (widget-insert
+"\nEdit comments and tags for each image.  Separate multiple tags
+with a comma.  Move forward between fields using TAB or RET.
+Move to the previous field using backtab (S-TAB).  Save by
+activating the Save button at the bottom of the form or cancel
+the operation by activating the Cancel button.\n\n")
+    ;; Here comes all images and a comment and tag field for each
+    ;; image.
+    (let (thumb-file img comment-widget tag-widget)
+
+      (dolist (file files)
+
+       (setq thumb-file (image-dired-thumb-name file)
+             img (create-image thumb-file))
+
+       (insert-image img)
+       (widget-insert "\n\nComment: ")
+       (setq comment-widget
+             (widget-create 'editable-field
+                            :size 60
+                            :format "%v "
+                            :value (or (image-dired-get-comment file) "")))
+       (widget-insert "\nTags:    ")
+       (setq tag-widget
+             (widget-create 'editable-field
+                            :size 60
+                            :format "%v "
+                            :value (or (mapconcat
+                                        (lambda (tag)
+                                          tag)
+                                        (image-dired-list-tags file)
+                                        ",") "")))
+       ;; Save information in all widgets so that we can use it when
+       ;; the user saves the form.
+       (setq image-dired-widget-list
+             (append image-dired-widget-list
+                     (list (list file comment-widget tag-widget))))
+       (widget-insert "\n\n")))
+
+    ;; Footer with Save and Cancel button.
+    (widget-insert "\n")
+    (widget-create 'push-button
+                 :notify
+                 (lambda (&rest ignore)
+                   (image-dired-save-information-from-widgets)
+                   (bury-buffer)
+                   (message "Done."))
+                 "Save")
+    (widget-insert " ")
+    (widget-create 'push-button
+                   :notify
+                   (lambda (&rest ignore)
+                     (bury-buffer)
+                     (message "Operation canceled."))
+                   "Cancel")
+    (widget-insert "\n")
+    (use-local-map widget-keymap)
+    (widget-setup)
+    ;; Jump to the first widget.
+    (widget-forward 1)))
+
+(defun image-dired-save-information-from-widgets ()
+  "Save information found in `image-dired-widget-list'.
+Use the information in `image-dired-widget-list' to save comments and
+tags to their respective image file.  Internal function used by
+`image-dired-dired-edit-comment-and-tags'."
+  (let (file comment tag-string tag-list lst)
+    (image-dired-write-comments
+          (mapcar
+           (lambda (widget)
+             (setq file (car widget)
+                   comment (widget-value (cadr widget)))
+             (cons file comment))
+           image-dired-widget-list))
+    (image-dired-write-tags
+     (dolist (widget image-dired-widget-list lst)
+       (setq file (car widget)
+             tag-string (widget-value (car (cddr widget)))
+             tag-list (split-string tag-string ","))
+       (dolist (tag tag-list)
+         (push (cons file tag) lst))))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;; TEST-SECTION ;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; (defvar image-dired-dir-max-size 12300000)
+
+;; (defun image-dired-test-clean-old-files ()
+;;   "Clean `image-dired-dir' from old thumbnail files.
+;; \"Oldness\" measured using last access time.  If the total size of all
+;; thumbnail files in `image-dired-dir' is larger than 'image-dired-dir-max-size',
+;; old files are deleted until the max size is reached."
+;;   (let* ((files
+;;           (sort
+;;            (mapcar
+;;             (lambda (f)
+;;               (let ((fattribs (file-attributes f)))
+;;                 ;; Get last access time and file size
+;;                 `(,(nth 4 fattribs) ,(nth 7 fattribs) ,f)))
+;;             (directory-files (image-dired-dir) t ".+\.thumb\..+$"))
+;;            ;; Sort function. Compare time between two files.
+;;            '(lambda (l1 l2)
+;;               (time-less-p (car l1) (car l2)))))
+;;          (dirsize (apply '+ (mapcar (lambda (x) (cadr x)) files))))
+;;     (while (> dirsize image-dired-dir-max-size)
+;;       (y-or-n-p
+;;        (format "Size of thumbnail directory: %d, delete old file %s? "
+;;                dirsize (cadr (cdar files))))
+;;       (delete-file (cadr (cdar files)))
+;;       (setq dirsize (- dirsize (car (cdar files))))
+;;       (setq files (cdr files)))))
+
+;;;;;;;;;;;;;;;;;;;;;;,
+
+;; (defun dired-speedbar-buttons (dired-buffer)
+;;   (when (and (boundp 'image-dired-use-speedbar)
+;; 	     image-dired-use-speedbar)
+;;     (let ((filename (with-current-buffer dired-buffer
+;; 		      (dired-get-filename))))
+;;       (when (and (not (string-equal filename (buffer-string)))
+;; 		 (string-match (image-file-name-regexp) filename))
+;; 	(erase-buffer)
+;; 	(insert (propertize
+;; 		 filename
+;; 		 'display
+;; 		 (image-dired-get-thumbnail-image filename)))))))
+
+;; (setq image-dired-use-speedbar t)
+
+(provide 'image-dired)
+
+;; arch-tag: 9d11411d-331f-4380-8b44-8adfe3a0343e
+;;; image-dired.el ends here
--- a/lisp/info.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/info.el	Fri May 11 18:24:42 2007 +0000
@@ -1400,8 +1400,8 @@
 
 (defvar Info-mode-line-node-keymap
   (let ((map (make-sparse-keymap)))
-    (define-key map [mode-line mouse-1] 'Info-scroll-up)
-    (define-key map [mode-line mouse-3] 'Info-scroll-down)
+    (define-key map [mode-line mouse-1] 'Info-mouse-scroll-up)
+    (define-key map [mode-line mouse-3] 'Info-mouse-scroll-down)
     map)
   "Keymap to put on the Info node name in the mode line.")
 
@@ -2620,6 +2620,15 @@
 	 (t (Info-next-preorder)))
       (scroll-up))))
 
+(defun Info-mouse-scroll-up (e)
+  "Scroll one screenful forward in Info, using the mouse.
+See `Info-scroll-up'."
+  (interactive "e")
+  (save-selected-window
+    (if (eventp e)
+	(select-window (posn-window (event-start e))))
+    (Info-scroll-up)))
+
 (defun Info-scroll-down ()
   "Scroll one screenful back in Info, considering all nodes as one sequence.
 If point is within the menu of a node, and `Info-scroll-prefer-subnodes'
@@ -2646,6 +2655,15 @@
 	(Info-last-preorder)
       (scroll-down))))
 
+(defun Info-mouse-scroll-down (e)
+  "Scroll one screenful backward in Info, using the mouse.
+See `Info-scroll-down'."
+  (interactive "e")
+  (save-selected-window
+    (if (eventp e)
+	(select-window (posn-window (event-start e))))
+    (Info-scroll-down)))
+
 (defun Info-next-reference (&optional recur)
   "Move cursor to the next cross-reference or menu item in the node."
   (interactive)
--- a/lisp/international/iso-cvt.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/international/iso-cvt.el	Fri May 11 18:24:42 2007 +0000
@@ -823,13 +823,13 @@
  (iso-translate-conventions from to iso-sgml2iso-trans-tab))
 
 ;;;###autoload
-(defun iso-cvt-read-only ()
+(defun iso-cvt-read-only (&rest ignore)
   "Warn that format is read-only."
   (interactive)
   (error "This format is read-only; specify another format for writing"))
 
 ;;;###autoload
-(defun iso-cvt-write-only ()
+(defun iso-cvt-write-only (&rest ignore)
   "Warn that format is write-only."
   (interactive)
   (error "This format is write-only"))
--- a/lisp/international/mule.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/international/mule.el	Fri May 11 18:24:42 2007 +0000
@@ -1593,6 +1593,7 @@
     ("\\.\\(sx[dmicw]\\|odt\\|tar\\|tgz\\)\\'" . no-conversion)
     ("\\.\\(gz\\|Z\\|bz\\|bz2\\|gpg\\)\\'" . no-conversion)
     ("\\.\\(jpe?g\\|png\\|gif\\|tiff?\\|p[bpgn]m\\)\\'" . no-conversion)
+    ("\\.pdf\\'" . no-conversion)
     ("/#[^/]+#\\'" . emacs-mule))
   "Alist of filename patterns vs corresponding coding systems.
 Each element looks like (REGEXP . CODING-SYSTEM).
--- a/lisp/ldefs-boot.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/ldefs-boot.el	Fri May 11 18:24:42 2007 +0000
@@ -306,7 +306,7 @@
 
 ;;;### (autoloads (defadvice ad-activate ad-add-advice ad-disable-advice
 ;;;;;;  ad-enable-advice ad-default-compilation-action ad-redefinition-action)
-;;;;;;  "advice" "emacs-lisp/advice.el" (17888 32279))
+;;;;;;  "advice" "emacs-lisp/advice.el" (17988 45864))
 ;;; Generated autoloads from emacs-lisp/advice.el
 
 (defvar ad-redefinition-action (quote warn) "\
@@ -2598,8 +2598,8 @@
 ;;;***
 
 ;;;### (autoloads (insert-text-button make-text-button insert-button
-;;;;;;  make-button define-button-type) "button" "button.el" (17963
-;;;;;;  21008))
+;;;;;;  make-button define-button-type) "button" "button.el" (17988
+;;;;;;  45683))
 ;;; Generated autoloads from button.el
 
 (defvar button-map (let ((map (make-sparse-keymap))) (define-key map "
" (quote push-button)) (define-key map [mouse-2] (quote push-button)) map) "\
@@ -2818,7 +2818,7 @@
 ;;;### (autoloads (defmath calc-embedded-activate calc-embedded calc-grab-rectangle
 ;;;;;;  calc-grab-region full-calc-keypad calc-keypad calc-eval quick-calc
 ;;;;;;  full-calc calc calc-dispatch calc-settings-file) "calc" "calc/calc.el"
-;;;;;;  (17963 22155))
+;;;;;;  (17988 45674))
 ;;; Generated autoloads from calc/calc.el
 
 (defvar calc-settings-file (convert-standard-filename "~/.calc.el") "\
@@ -3535,7 +3535,7 @@
 
 ;;;### (autoloads (pike-mode idl-mode java-mode objc-mode c++-mode
 ;;;;;;  c-mode c-initialize-cc-mode) "cc-mode" "progmodes/cc-mode.el"
-;;;;;;  (17963 20867))
+;;;;;;  (17988 45794))
 ;;; Generated autoloads from progmodes/cc-mode.el
 
 (autoload (quote c-initialize-cc-mode) "cc-mode" "\
@@ -4611,7 +4611,7 @@
 ;;;;;;  compilation-shell-minor-mode compilation-mode compilation-start
 ;;;;;;  compile compilation-disable-input compile-command compilation-search-path
 ;;;;;;  compilation-ask-about-save compilation-window-height compilation-mode-hook)
-;;;;;;  "compile" "progmodes/compile.el" (17963 22155))
+;;;;;;  "compile" "progmodes/compile.el" (17988 45882))
 ;;; Generated autoloads from progmodes/compile.el
 
 (defvar compilation-mode-hook nil "\
@@ -6076,7 +6076,7 @@
 ;;;***
 
 ;;;### (autoloads (dabbrev-expand dabbrev-completion) "dabbrev" "dabbrev.el"
-;;;;;;  (17888 32279))
+;;;;;;  (17988 45877))
 ;;; Generated autoloads from dabbrev.el
  (define-key esc-map "/" 'dabbrev-expand)
  (define-key esc-map [?\C-/] 'dabbrev-completion)
@@ -6798,7 +6798,7 @@
 ;;;***
 
 ;;;### (autoloads (diff-backup diff diff-command diff-switches) "diff"
-;;;;;;  "diff.el" (17888 32279))
+;;;;;;  "diff.el" (17988 45843))
 ;;; Generated autoloads from diff.el
 
 (defvar diff-switches "-c" "\
@@ -6832,7 +6832,7 @@
 ;;;***
 
 ;;;### (autoloads (diff-minor-mode diff-mode) "diff-mode" "diff-mode.el"
-;;;;;;  (17963 21318))
+;;;;;;  (17988 45864))
 ;;; Generated autoloads from diff-mode.el
 
 (autoload (quote diff-mode) "diff-mode" "\
@@ -6864,7 +6864,7 @@
 ;;;;;;  dired dired-copy-preserve-time dired-dwim-target dired-keep-marker-symlink
 ;;;;;;  dired-keep-marker-hardlink dired-keep-marker-copy dired-keep-marker-rename
 ;;;;;;  dired-trivial-filenames dired-ls-F-marks-symlinks dired-listing-switches)
-;;;;;;  "dired" "dired.el" (17888 32279))
+;;;;;;  "dired" "dired.el" (17988 45668))
 ;;; Generated autoloads from dired.el
 
 (defvar dired-listing-switches "-al" "\
@@ -7484,7 +7484,7 @@
 ;;;***
 
 ;;;### (autoloads (dired-do-relsymlink dired-jump) "dired-x" "dired-x.el"
-;;;;;;  (17963 21318))
+;;;;;;  (17988 45811))
 ;;; Generated autoloads from dired-x.el
 
 (autoload (quote dired-jump) "dired-x" "\
@@ -7784,7 +7784,7 @@
 
 ;;;### (autoloads (easy-mmode-defsyntax easy-mmode-defmap easy-mmode-define-keymap
 ;;;;;;  define-globalized-minor-mode define-minor-mode) "easy-mmode"
-;;;;;;  "emacs-lisp/easy-mmode.el" (17888 36645))
+;;;;;;  "emacs-lisp/easy-mmode.el" (17988 45882))
 ;;; Generated autoloads from emacs-lisp/easy-mmode.el
 
 (defalias (quote easy-mmode-define-minor-mode) (quote define-minor-mode))
@@ -8955,7 +8955,7 @@
 ;;;***
 
 ;;;### (autoloads (turn-on-eldoc-mode eldoc-mode eldoc-minor-mode-string)
-;;;;;;  "eldoc" "emacs-lisp/eldoc.el" (17888 32279))
+;;;;;;  "eldoc" "emacs-lisp/eldoc.el" (17988 45849))
 ;;; Generated autoloads from emacs-lisp/eldoc.el
 
 (defvar eldoc-minor-mode-string " ElDoc" "\
@@ -8976,7 +8976,7 @@
 \(fn &optional ARG)" t nil)
 
 (autoload (quote turn-on-eldoc-mode) "eldoc" "\
-Unequivocally turn on eldoc-mode (see variable documentation).
+Unequivocally turn on ElDoc mode (see command `eldoc-mode').
 
 \(fn)" t nil)
 
@@ -10945,7 +10945,7 @@
 
 ;;;***
 
-;;;### (autoloads nil "fill" "textmodes/fill.el" (17888 32281))
+;;;### (autoloads nil "fill" "textmodes/fill.el" (17988 45746))
 ;;; Generated autoloads from textmodes/fill.el
 (put 'colon-double-space 'safe-local-variable 'booleanp)
 
@@ -10953,7 +10953,7 @@
 
 ;;;### (autoloads (find-grep-dired find-name-dired find-dired find-grep-options
 ;;;;;;  find-ls-subdir-switches find-ls-option) "find-dired" "find-dired.el"
-;;;;;;  (17888 32279))
+;;;;;;  (17988 45804))
 ;;; Generated autoloads from find-dired.el
 
 (defvar find-ls-option (if (eq system-type (quote berkeley-unix)) (quote ("-ls" . "-gilsb")) (quote ("-exec ls -ld {} \\;" . "-ld"))) "\
@@ -11367,7 +11367,7 @@
 
 ;;;### (autoloads (flyspell-buffer flyspell-region flyspell-mode-off
 ;;;;;;  turn-off-flyspell turn-on-flyspell flyspell-mode flyspell-prog-mode)
-;;;;;;  "flyspell" "textmodes/flyspell.el" (17963 21318))
+;;;;;;  "flyspell" "textmodes/flyspell.el" (17988 45746))
 ;;; Generated autoloads from textmodes/flyspell.el
 
 (autoload (quote flyspell-prog-mode) "flyspell" "\
@@ -12150,7 +12150,7 @@
 ;;;***
 
 ;;;### (autoloads (gnus-user-format-function-D gnus-user-format-function-d)
-;;;;;;  "gnus-diary" "gnus/gnus-diary.el" (17888 32279))
+;;;;;;  "gnus-diary" "gnus/gnus-diary.el" (17988 45869))
 ;;; Generated autoloads from gnus/gnus-diary.el
 
 (autoload (quote gnus-user-format-function-d) "gnus-diary" "\
@@ -12850,7 +12850,7 @@
 ;;;***
 
 ;;;### (autoloads (gdb-script-mode jdb pdb perldb xdb dbx sdb gdb)
-;;;;;;  "gud" "progmodes/gud.el" (17963 22153))
+;;;;;;  "gud" "progmodes/gud.el" (17988 45791))
 ;;; Generated autoloads from progmodes/gud.el
 
 (autoload (quote gdb) "gud" "\
@@ -13382,7 +13382,7 @@
 ;;;### (autoloads (hi-lock-write-interactive-patterns hi-lock-unface-buffer
 ;;;;;;  hi-lock-face-phrase-buffer hi-lock-face-buffer hi-lock-line-face-buffer
 ;;;;;;  global-hi-lock-mode hi-lock-mode) "hi-lock" "hi-lock.el"
-;;;;;;  (17888 36646))
+;;;;;;  (17988 45749))
 ;;; Generated autoloads from hi-lock.el
 
 (autoload (quote hi-lock-mode) "hi-lock" "\
@@ -13410,17 +13410,22 @@
   Remove highlighting on matches of REGEXP in current buffer.
 
 \\[hi-lock-write-interactive-patterns]
-  Write active REGEXPs into buffer as comments (if possible).  They will
+  Write active REGEXPs into buffer as comments (if possible).  They may
   be read the next time file is loaded or when the \\[hi-lock-find-patterns] command
   is issued.  The inserted regexps are in the form of font lock keywords.
-  (See `font-lock-keywords'.)  They may be edited and re-loaded with \\[hi-lock-find-patterns],
-  any valid `font-lock-keywords' form is acceptable.
+  (See `font-lock-keywords'.)  They may be edited and re-loaded with \\[hi-lock-find-patterns], 
+  any valid `font-lock-keywords' form is acceptable. When a file is
+  loaded the patterns are read if `hi-lock-file-patterns-policy is
+  'ask and the user responds y to the prompt, or if
+  `hi-lock-file-patterns-policy' is bound to a function and that
+  function returns t.
 
 \\[hi-lock-find-patterns]
   Re-read patterns stored in buffer (in the format produced by \\[hi-lock-write-interactive-patterns]).
 
-When hi-lock is started and if the mode is not excluded, the
-beginning of the buffer is searched for lines of the form:
+When hi-lock is started and if the mode is not excluded or patterns
+rejected, the beginning of the buffer is searched for lines of the
+form:
   Hi-lock: FOO
 where FOO is a list of patterns.  These are added to the font lock
 keywords already present.  The patterns must start before position
@@ -13433,7 +13438,7 @@
 
 (defvar global-hi-lock-mode nil "\
 Non-nil if Global-Hi-Lock mode is enabled.
-See the command `global-hi-lock-mode' for a description of this minor-mode.
+See the command `global-hi-lock-mode' for a description of this minor mode.
 Setting this variable directly does not take effect;
 either customize it (see the info node `Easy Customization')
 or call the function `global-hi-lock-mode'.")
@@ -13441,10 +13446,10 @@
 (custom-autoload (quote global-hi-lock-mode) "hi-lock" nil)
 
 (autoload (quote global-hi-lock-mode) "hi-lock" "\
-Toggle Hi-Lock mode in every buffer.
+Toggle Hi-Lock mode in every possible buffer.
 With prefix ARG, turn Global-Hi-Lock mode on if and only if ARG is positive.
-Hi-Lock mode is actually not turned on in every buffer but only in those
-in which `turn-on-hi-lock-if-enabled' turns it on.
+Hi-Lock mode is enabled in all buffers where `turn-on-hi-lock-if-enabled' would do it.
+See `hi-lock-mode' for more information on Hi-Lock mode.
 
 \(fn &optional ARG)" t nil)
 
@@ -14576,7 +14581,7 @@
 ;;;***
 
 ;;;### (autoloads (idlwave-shell) "idlw-shell" "progmodes/idlw-shell.el"
-;;;;;;  (17963 21008))
+;;;;;;  (17988 45674))
 ;;; Generated autoloads from progmodes/idlw-shell.el
 
 (autoload (quote idlwave-shell) "idlw-shell" "\
@@ -14602,7 +14607,7 @@
 ;;;***
 
 ;;;### (autoloads (idlwave-mode) "idlwave" "progmodes/idlwave.el"
-;;;;;;  (17963 21008))
+;;;;;;  (17988 45680))
 ;;; Generated autoloads from progmodes/idlwave.el
 
 (autoload (quote idlwave-mode) "idlwave" "\
@@ -14737,8 +14742,8 @@
 ;;;;;;  ido-find-alternate-file ido-find-file-other-window ido-find-file
 ;;;;;;  ido-find-file-in-dir ido-switch-buffer-other-frame ido-insert-buffer
 ;;;;;;  ido-kill-buffer ido-display-buffer ido-switch-buffer-other-window
-;;;;;;  ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (17963
-;;;;;;  21001))
+;;;;;;  ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (17988
+;;;;;;  45668))
 ;;; Generated autoloads from ido.el
 
 (defvar ido-mode nil "\
@@ -15205,6 +15210,145 @@
 
 ;;;***
 
+;;;### (autoloads (image-dired-dired-edit-comment-and-tags image-dired-mark-tagged-files
+;;;;;;  image-dired-dired-comment-files image-dired-dired-display-image
+;;;;;;  image-dired-dired-display-external image-dired-display-thumb
+;;;;;;  image-dired-display-thumbs-append image-dired-setup-dired-keybindings
+;;;;;;  image-dired-jump-thumbnail-buffer image-dired-delete-tag
+;;;;;;  image-dired-tag-files image-dired-show-all-from-dir image-dired-display-thumbs
+;;;;;;  image-dired-dired-with-window-configuration image-dired-dired-insert-marked-thumbs)
+;;;;;;  "image-dired" "image-dired.el" (17988 45791))
+;;; Generated autoloads from image-dired.el
+
+(autoload (quote image-dired-dired-insert-marked-thumbs) "image-dired" "\
+Insert thumbnails before file names of marked files in the dired buffer.
+
+\(fn)" t nil)
+
+(autoload (quote image-dired-dired-with-window-configuration) "image-dired" "\
+Open directory DIR and create a default window configuration.
+
+Convenience command that:
+
+ - Opens dired in folder DIR
+ - Splits windows in most useful (?) way
+ - Set `truncate-lines' to t
+
+After the command has finished, you would typically mark some
+image files in dired and type
+\\[image-dired-display-thumbs] (`image-dired-display-thumbs').
+
+If called with prefix argument ARG, skip splitting of windows.
+
+The current window configuration is saved and can be restored by
+calling `image-dired-restore-window-configuration'.
+
+\(fn DIR &optional ARG)" t nil)
+
+(autoload (quote image-dired-display-thumbs) "image-dired" "\
+Display thumbnails of all marked files, in `image-dired-thumbnail-buffer'.
+If a thumbnail image does not exist for a file, it is created on the
+fly.  With prefix argument ARG, display only thumbnail for file at
+point (this is useful if you have marked some files but want to show
+another one).
+
+Recommended usage is to split the current frame horizontally so that
+you have the dired buffer in the left window and the
+`image-dired-thumbnail-buffer' buffer in the right window.
+
+With optional argument APPEND, append thumbnail to thumbnail buffer
+instead of erasing it first.
+
+Option argument DO-NOT-POP controls if `pop-to-buffer' should be
+used or not.  If non-nil, use `display-buffer' instead of
+`pop-to-buffer'.  This is used from functions like
+`image-dired-next-line-and-display' and
+`image-dired-previous-line-and-display' where we do not want the
+thumbnail buffer to be selected.
+
+\(fn &optional ARG APPEND DO-NOT-POP)" t nil)
+
+(autoload (quote image-dired-show-all-from-dir) "image-dired" "\
+Make a preview buffer for all images in DIR and display it.
+If the number of files in DIR matching `image-file-name-regexp'
+exceeds `image-dired-show-all-from-dir-max-files', a warning will be
+displayed.
+
+\(fn DIR)" t nil)
+
+(defalias (quote image-dired) (quote image-dired-show-all-from-dir))
+
+(defalias (quote tumme) (quote image-dired-show-all-from-dir))
+
+(autoload (quote image-dired-tag-files) "image-dired" "\
+Tag marked file(s) in dired.  With prefix ARG, tag file at point.
+
+\(fn ARG)" t nil)
+
+(autoload (quote image-dired-delete-tag) "image-dired" "\
+Remove tag for selected file(s).
+With prefix argument ARG, remove tag from file at point.
+
+\(fn ARG)" t nil)
+
+(autoload (quote image-dired-jump-thumbnail-buffer) "image-dired" "\
+Jump to thumbnail buffer.
+
+\(fn)" t nil)
+
+(autoload (quote image-dired-setup-dired-keybindings) "image-dired" "\
+Setup easy-to-use keybindings for the commands to be used in dired mode.
+Note that n, p and <down> and <up> will be hijacked and bound to
+`image-dired-dired-x-line'.
+
+\(fn)" t nil)
+
+(autoload (quote image-dired-display-thumbs-append) "image-dired" "\
+Append thumbnails to `image-dired-thumbnail-buffer'.
+
+\(fn)" t nil)
+
+(autoload (quote image-dired-display-thumb) "image-dired" "\
+Shorthand for `image-dired-display-thumbs' with prefix argument.
+
+\(fn)" t nil)
+
+(autoload (quote image-dired-dired-display-external) "image-dired" "\
+Display file at point using an external viewer.
+
+\(fn)" t nil)
+
+(autoload (quote image-dired-dired-display-image) "image-dired" "\
+Display current image file.
+See documentation for `image-dired-display-image' for more information.
+With prefix argument ARG, display image in its original size.
+
+\(fn &optional ARG)" t nil)
+
+(autoload (quote image-dired-dired-comment-files) "image-dired" "\
+Add comment to current or marked files in dired.
+
+\(fn)" t nil)
+
+(autoload (quote image-dired-mark-tagged-files) "image-dired" "\
+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 image-dired'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.
+
+\(fn)" t nil)
+
+(autoload (quote image-dired-dired-edit-comment-and-tags) "image-dired" "\
+Edit comment and tags of current or marked image files.
+Edit comment and tags for all marked image files in an
+easy-to-use form.
+
+\(fn)" t nil)
+
+;;;***
+
 ;;;### (autoloads (auto-image-file-mode insert-image-file image-file-name-regexp
 ;;;;;;  image-file-name-regexps image-file-name-extensions) "image-file"
 ;;;;;;  "image-file.el" (17888 32280))
@@ -15532,7 +15676,7 @@
 ;;;### (autoloads (Info-speedbar-browser Info-goto-emacs-key-command-node
 ;;;;;;  Info-goto-emacs-command-node Info-mode info-apropos Info-index
 ;;;;;;  Info-directory Info-on-current-buffer info-standalone info-emacs-manual
-;;;;;;  info info-other-window) "info" "info.el" (17963 21008))
+;;;;;;  info info-other-window) "info" "info.el" (17988 45674))
 ;;; Generated autoloads from info.el
 
 (autoload (quote info-other-window) "info" "\
@@ -15882,7 +16026,7 @@
 ;;;### (autoloads (iso-cvt-define-menu iso-cvt-write-only iso-cvt-read-only
 ;;;;;;  iso-sgml2iso iso-iso2sgml iso-iso2duden iso-iso2gtex iso-gtex2iso
 ;;;;;;  iso-tex2iso iso-iso2tex iso-german iso-spanish) "iso-cvt"
-;;;;;;  "international/iso-cvt.el" (17888 32280))
+;;;;;;  "international/iso-cvt.el" (17988 45882))
 ;;; Generated autoloads from international/iso-cvt.el
 
 (autoload (quote iso-spanish) "iso-cvt" "\
@@ -15951,12 +16095,12 @@
 (autoload (quote iso-cvt-read-only) "iso-cvt" "\
 Warn that format is read-only.
 
-\(fn)" t nil)
+\(fn &rest IGNORE)" t nil)
 
 (autoload (quote iso-cvt-write-only) "iso-cvt" "\
 Warn that format is write-only.
 
-\(fn)" t nil)
+\(fn &rest IGNORE)" t nil)
 
 (autoload (quote iso-cvt-define-menu) "iso-cvt" "\
 Add submenus to the File menu, to convert to and from various formats.
@@ -16958,7 +17102,7 @@
 ;;;***
 
 ;;;### (autoloads (locate-with-filter locate locate-ls-subdir-switches)
-;;;;;;  "locate" "locate.el" (17888 32280))
+;;;;;;  "locate" "locate.el" (17988 45794))
 ;;; Generated autoloads from locate.el
 
 (defvar locate-ls-subdir-switches "-al" "\
@@ -16986,7 +17130,9 @@
 The main use of FILTER is to implement `locate-with-filter'.  See
 the docstring of that function for its meaning.
 
-\(fn SEARCH-STRING &optional FILTER)" t nil)
+ARG is the interactive prefix arg.
+
+\(fn SEARCH-STRING &optional FILTER ARG)" t nil)
 
 (autoload (quote locate-with-filter) "locate" "\
 Run the executable program `locate' with a filter.
@@ -16998,10 +17144,12 @@
 contain a match for the regular expression FILTER; this is often useful
 to constrain a big search.
 
+ARG is the interactive prefix arg, which has the same effect as in `locate'.
+
 When called from Lisp, this function is identical with `locate',
 except that FILTER is not optional.
 
-\(fn SEARCH-STRING FILTER)" t nil)
+\(fn SEARCH-STRING FILTER &optional ARG)" t nil)
 
 ;;;***
 
@@ -17411,7 +17559,7 @@
 ;;;***
 
 ;;;### (autoloads (define-mail-abbrev build-mail-abbrevs mail-abbrevs-setup)
-;;;;;;  "mailabbrev" "mail/mailabbrev.el" (17888 32280))
+;;;;;;  "mailabbrev" "mail/mailabbrev.el" (17988 45866))
 ;;; Generated autoloads from mail/mailabbrev.el
 
 (autoload (quote mail-abbrevs-setup) "mailabbrev" "\
@@ -17624,7 +17772,7 @@
 
 ;;;***
 
-;;;### (autoloads (man-follow man) "man" "man.el" (17963 20867))
+;;;### (autoloads (man-follow man) "man" "man.el" (17988 45877))
 ;;; Generated autoloads from man.el
 
 (defalias (quote manual-entry) (quote man))
@@ -19009,7 +19157,7 @@
 ;;;;;;  uncomment-region comment-kill comment-set-column comment-indent
 ;;;;;;  comment-indent-default comment-normalize-vars comment-multi-line
 ;;;;;;  comment-padding comment-style comment-column) "newcomment"
-;;;;;;  "newcomment.el" (17963 21008))
+;;;;;;  "newcomment.el" (17988 45864))
 ;;; Generated autoloads from newcomment.el
 
 (defalias (quote indent-for-comment) (quote comment-indent))
@@ -19029,10 +19177,10 @@
 
 (defvar comment-column 32 "\
 Column to indent right-margin comments to.
-Each mode establishes a different default value for this variable; you
+Each mode may establish a different default value for this variable; you
 can set the value for a particular mode using that mode's hook.
-Comments might be indented to a value smaller than this in order
-not to go beyond `comment-fill-column'.")
+Comments might be indented to a different value in order not to go beyond
+`comment-fill-column' or in order to align them with surrounding comments.")
 
 (custom-autoload (quote comment-column) "newcomment" t)
 (put 'comment-column 'safe-local-variable 'integerp)
@@ -19247,7 +19395,7 @@
 ;;;***
 
 ;;;### (autoloads (nndiary-generate-nov-databases) "nndiary" "gnus/nndiary.el"
-;;;;;;  (17888 32280))
+;;;;;;  (17988 45869))
 ;;; Generated autoloads from gnus/nndiary.el
 
 (autoload (quote nndiary-generate-nov-databases) "nndiary" "\
@@ -19886,12 +20034,12 @@
 
 ;;;***
 
-;;;### (autoloads (show-paren-mode) "paren" "paren.el" (17963 22704))
+;;;### (autoloads (show-paren-mode) "paren" "paren.el" (17988 45669))
 ;;; Generated autoloads from paren.el
 
 (defvar show-paren-mode nil "\
 Non-nil if Show-Paren mode is enabled.
-See the command `show-paren-mode' for a description of this minor-mode.
+See the command `show-paren-mode' for a description of this minor mode.
 Setting this variable directly does not take effect;
 either customize it (see the info node `Easy Customization')
 or call the function `show-paren-mode'.")
@@ -20339,7 +20487,7 @@
 ;;;***
 
 ;;;### (autoloads (perl-mode) "perl-mode" "progmodes/perl-mode.el"
-;;;;;;  (17963 22157))
+;;;;;;  (17988 45669))
 ;;; Generated autoloads from progmodes/perl-mode.el
 
 (autoload (quote perl-mode) "perl-mode" "\
@@ -21696,7 +21844,7 @@
 ;;;***
 
 ;;;### (autoloads (jython-mode python-mode run-python) "python" "progmodes/python.el"
-;;;;;;  (17963 22158))
+;;;;;;  (17988 45869))
 ;;; Generated autoloads from progmodes/python.el
 
 (add-to-list (quote interpreter-mode-alist) (quote ("jython" . jython-mode)))
@@ -22098,7 +22246,7 @@
 ;;;***
 
 ;;;### (autoloads (rcirc-track-minor-mode rcirc-connect rcirc) "rcirc"
-;;;;;;  "net/rcirc.el" (17963 19063))
+;;;;;;  "net/rcirc.el" (17988 45849))
 ;;; Generated autoloads from net/rcirc.el
 
 (autoload (quote rcirc) "rcirc" "\
@@ -22116,7 +22264,7 @@
 
 (defvar rcirc-track-minor-mode nil "\
 Non-nil if Rcirc-Track minor mode is enabled.
-See the command `rcirc-track-minor-mode' for a description of this minor-mode.
+See the command `rcirc-track-minor-mode' for a description of this minor mode.
 Setting this variable directly does not take effect;
 either customize it (see the info node `Easy Customization')
 or call the function `rcirc-track-minor-mode'.")
@@ -24161,7 +24309,7 @@
 ;;;***
 
 ;;;### (autoloads (html-mode sgml-mode) "sgml-mode" "textmodes/sgml-mode.el"
-;;;;;;  (17888 37037))
+;;;;;;  (17988 45877))
 ;;; Generated autoloads from textmodes/sgml-mode.el
 
 (autoload (quote sgml-mode) "sgml-mode" "\
@@ -24229,7 +24377,7 @@
 ;;;***
 
 ;;;### (autoloads (sh-mode) "sh-script" "progmodes/sh-script.el"
-;;;;;;  (17888 32281))
+;;;;;;  (17988 45794))
 ;;; Generated autoloads from progmodes/sh-script.el
 (put 'sh-shell 'safe-local-variable 'symbolp)
 
@@ -24478,7 +24626,7 @@
 
 ;;;***
 
-;;;### (autoloads nil "simple" "simple.el" (17963 22151))
+;;;### (autoloads nil "simple" "simple.el" (17988 45674))
 ;;; Generated autoloads from simple.el
 (put 'fill-prefix 'safe-local-variable 'string-or-null-p)
 
@@ -25741,7 +25889,7 @@
 
 ;;;***
 
-;;;### (autoloads (locate-library) "subr" "subr.el" (17963 22152))
+;;;### (autoloads (locate-library) "subr" "subr.el" (17988 45669))
 ;;; Generated autoloads from subr.el
 
 (autoload (quote locate-library) "subr" "\
@@ -25795,12 +25943,12 @@
 
 ;;;***
 
-;;;### (autoloads (t-mouse-mode) "t-mouse" "t-mouse.el" (17963 21011))
+;;;### (autoloads (t-mouse-mode) "t-mouse" "t-mouse.el" (17988 45828))
 ;;; Generated autoloads from t-mouse.el
 
 (defvar t-mouse-mode nil "\
 Non-nil if T-Mouse mode is enabled.
-See the command `t-mouse-mode' for a description of this minor-mode.
+See the command `t-mouse-mode' for a description of this minor mode.
 Setting this variable directly does not take effect;
 either customize it (see the info node `Easy Customization')
 or call the function `t-mouse-mode'.")
@@ -26665,7 +26813,7 @@
 ;;;;;;  tex-start-commands tex-start-options slitex-run-command latex-run-command
 ;;;;;;  tex-run-command tex-offer-save tex-main-file tex-first-line-header-regexp
 ;;;;;;  tex-directory tex-shell-file-name) "tex-mode" "textmodes/tex-mode.el"
-;;;;;;  (17888 32281))
+;;;;;;  (17988 45877))
 ;;; Generated autoloads from textmodes/tex-mode.el
 
 (defvar tex-shell-file-name nil "\
@@ -27195,7 +27343,7 @@
 
 ;;;### (autoloads (thumbs-dired-setroot thumbs-dired-show thumbs-dired-show-marked
 ;;;;;;  thumbs-show-from-dir thumbs-find-thumb) "thumbs" "thumbs.el"
-;;;;;;  (17888 32281))
+;;;;;;  (17988 45669))
 ;;; Generated autoloads from thumbs.el
 
 (autoload (quote thumbs-find-thumb) "thumbs" "\
@@ -27509,7 +27657,7 @@
 ;;;;;;  timeclock-workday-remaining-string timeclock-reread-log timeclock-query-out
 ;;;;;;  timeclock-change timeclock-status-string timeclock-out timeclock-in
 ;;;;;;  timeclock-modeline-display) "timeclock" "calendar/timeclock.el"
-;;;;;;  (17888 32279))
+;;;;;;  (17988 45815))
 ;;; Generated autoloads from calendar/timeclock.el
 
 (autoload (quote timeclock-modeline-display) "timeclock" "\
@@ -27778,7 +27926,7 @@
 
 ;;;### (autoloads (todo-show todo-cp todo-mode todo-print todo-top-priorities
 ;;;;;;  todo-insert-item todo-add-item-non-interactively todo-add-category)
-;;;;;;  "todo-mode" "calendar/todo-mode.el" (17963 22703))
+;;;;;;  "todo-mode" "calendar/todo-mode.el" (17988 45668))
 ;;; Generated autoloads from calendar/todo-mode.el
 
 (autoload (quote todo-add-category) "todo-mode" "\
@@ -28137,142 +28285,6 @@
 
 ;;;***
 
-;;;### (autoloads (tumme-dired-edit-comment-and-tags tumme-mark-tagged-files
-;;;;;;  tumme-dired-comment-files tumme-dired-display-image tumme-dired-display-external
-;;;;;;  tumme-display-thumb tumme-display-thumbs-append tumme-setup-dired-keybindings
-;;;;;;  tumme-jump-thumbnail-buffer tumme-delete-tag tumme-tag-files
-;;;;;;  tumme-show-all-from-dir tumme-display-thumbs tumme-dired-with-window-configuration
-;;;;;;  tumme-dired-insert-marked-thumbs) "tumme" "tumme.el" (17888
-;;;;;;  32281))
-;;; Generated autoloads from tumme.el
-
-(autoload (quote tumme-dired-insert-marked-thumbs) "tumme" "\
-Insert thumbnails before file names of marked files in the dired buffer.
-
-\(fn)" t nil)
-
-(autoload (quote tumme-dired-with-window-configuration) "tumme" "\
-Open directory DIR and create a default window configuration.
-
-Convenience command that:
-
- - Opens dired in folder DIR
- - Splits windows in most useful (?) way
- - Set `truncate-lines' to t
-
-After the command has finished, you would typically mark some
-image files in dired and type
-\\[tumme-display-thumbs] (`tumme-display-thumbs').
-
-If called with prefix argument ARG, skip splitting of windows.
-
-The current window configuration is saved and can be restored by
-calling `tumme-restore-window-configuration'.
-
-\(fn DIR &optional ARG)" t nil)
-
-(autoload (quote tumme-display-thumbs) "tumme" "\
-Display thumbnails of all marked files, in `tumme-thumbnail-buffer'.
-If a thumbnail image does not exist for a file, it is created on the
-fly.  With prefix argument ARG, display only thumbnail for file at
-point (this is useful if you have marked some files but want to show
-another one).
-
-Recommended usage is to split the current frame horizontally so that
-you have the dired buffer in the left window and the
-`tumme-thumbnail-buffer' buffer in the right window.
-
-With optional argument APPEND, append thumbnail to thumbnail buffer
-instead of erasing it first.
-
-Option argument DO-NOT-POP controls if `pop-to-buffer' should be
-used or not.  If non-nil, use `display-buffer' instead of
-`pop-to-buffer'.  This is used from functions like
-`tumme-next-line-and-display' and
-`tumme-previous-line-and-display' where we do not want the
-thumbnail buffer to be selected.
-
-\(fn &optional ARG APPEND DO-NOT-POP)" t nil)
-
-(autoload (quote tumme-show-all-from-dir) "tumme" "\
-Make a preview buffer for all images in DIR and display it.
-If the number of files in DIR matching `image-file-name-regexp'
-exceeds `tumme-show-all-from-dir-max-files', a warning will be
-displayed.
-
-\(fn DIR)" t nil)
-
-(defalias (quote tumme) (quote tumme-show-all-from-dir))
-
-(autoload (quote tumme-tag-files) "tumme" "\
-Tag marked file(s) in dired.  With prefix ARG, tag file at point.
-
-\(fn ARG)" t nil)
-
-(autoload (quote tumme-delete-tag) "tumme" "\
-Remove tag for selected file(s).
-With prefix argument ARG, remove tag from file at point.
-
-\(fn ARG)" t nil)
-
-(autoload (quote tumme-jump-thumbnail-buffer) "tumme" "\
-Jump to thumbnail buffer.
-
-\(fn)" t nil)
-
-(autoload (quote tumme-setup-dired-keybindings) "tumme" "\
-Setup easy-to-use keybindings for the commands to be used in dired mode.
-Note that n, p and <down> and <up> will be hijacked and bound to
-`tumme-dired-x-line'.
-
-\(fn)" t nil)
-
-(autoload (quote tumme-display-thumbs-append) "tumme" "\
-Append thumbnails to `tumme-thumbnail-buffer'.
-
-\(fn)" t nil)
-
-(autoload (quote tumme-display-thumb) "tumme" "\
-Shorthand for `tumme-display-thumbs' with prefix argument.
-
-\(fn)" t nil)
-
-(autoload (quote tumme-dired-display-external) "tumme" "\
-Display file at point using an external viewer.
-
-\(fn)" t nil)
-
-(autoload (quote tumme-dired-display-image) "tumme" "\
-Display current image file.
-See documentation for `tumme-display-image' for more information.
-With prefix argument ARG, display image in its original size.
-
-\(fn &optional ARG)" t nil)
-
-(autoload (quote tumme-dired-comment-files) "tumme" "\
-Add comment to current or marked files in dired.
-
-\(fn)" t nil)
-
-(autoload (quote tumme-mark-tagged-files) "tumme" "\
-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.
-
-\(fn)" t nil)
-
-(autoload (quote tumme-dired-edit-comment-and-tags) "tumme" "\
-Edit comment and tags of current or marked image files.
-Edit comment and tags for all marked image files in an
-easy-to-use form.
-
-\(fn)" t nil)
-
-;;;***
-
 ;;;### (autoloads (help-with-tutorial) "tutorial" "tutorial.el" (17963
 ;;;;;;  18445))
 ;;; Generated autoloads from tutorial.el
@@ -29241,7 +29253,7 @@
 ;;;;;;  vc-directory vc-merge vc-insert-headers vc-version-other-window
 ;;;;;;  vc-diff vc-register vc-next-action vc-do-command edit-vc-file
 ;;;;;;  with-vc-file vc-branch-part vc-trunk-p vc-before-checkin-hook
-;;;;;;  vc-checkin-hook vc-checkout-hook) "vc" "vc.el" (17888 32281))
+;;;;;;  vc-checkin-hook vc-checkout-hook) "vc" "vc.el" (17988 45860))
 ;;; Generated autoloads from vc.el
 
 (defvar vc-checkout-hook nil "\
@@ -29608,7 +29620,7 @@
 ;;;***
 
 ;;;### (autoloads (vhdl-mode) "vhdl-mode" "progmodes/vhdl-mode.el"
-;;;;;;  (17888 36581))
+;;;;;;  (17988 45669))
 ;;; Generated autoloads from progmodes/vhdl-mode.el
 
 (autoload (quote vhdl-mode) "vhdl-mode" "\
@@ -31271,7 +31283,7 @@
 ;;;;;;  "url/url-vars.el" "url/vc-dav.el" "vc-hooks.el" "vcursor.el"
 ;;;;;;  "version.el" "vms-patch.el" "vmsproc.el" "vt-control.el"
 ;;;;;;  "vt100-led.el" "w32-fns.el" "w32-vars.el" "widget.el" "window.el"
-;;;;;;  "x-dnd.el") (17963 23051 399870))
+;;;;;;  "x-dnd.el") (17988 46002 912169))
 
 ;;;***
 
--- a/lisp/locate.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/locate.el	Fri May 11 18:24:42 2007 +0000
@@ -114,8 +114,10 @@
 
 ;; Variables
 
-(defvar locate-current-search nil)
 (defvar locate-current-filter nil)
+(defvar locate-local-filter nil)
+(defvar locate-local-search nil)
+(defvar locate-local-prompt nil)
 
 (defgroup locate nil
   "Interface to the locate command."
@@ -220,7 +222,10 @@
 
 (defcustom locate-prompt-for-command nil
   "If non-nil, the `locate' command prompts for a command to run.
-Otherwise, that behavior is invoked via a prefix argument."
+Otherwise, that behavior is invoked via a prefix argument.
+
+Setting this option non-nil actually inverts the meaning of a prefix arg;
+that is, with a prefix arg, you get the default behavior."
   :group 'locate
   :type 'boolean)
 
@@ -240,8 +245,32 @@
        (skip-chars-backward "." pt)
        (point)))))
 
+;; Function for use in interactive declarations.
+(defun locate-prompt-for-search-string ()
+  (if (or (and current-prefix-arg
+	       (not locate-prompt-for-command))
+	  (and (not current-prefix-arg) locate-prompt-for-command))
+      (let ((locate-cmd (funcall locate-make-command-line "")))
+	(read-from-minibuffer
+	 "Run locate (like this): "
+	 (cons
+	  (concat (car locate-cmd) "  "
+		  (mapconcat 'identity (cdr locate-cmd) " "))
+	  (+ 2 (length (car locate-cmd))))
+	 nil nil 'locate-history-list))
+    (let* ((default (locate-word-at-point))
+	   (input
+	    (read-from-minibuffer
+	     (if  (> (length default) 0)
+		 (format "Locate (default %s): " default)
+	       (format "Locate: "))
+	     nil nil nil 'locate-history-list default t)))
+      (and (equal input "") default
+	   (setq input default))
+      input)))
+
 ;;;###autoload
-(defun locate (search-string &optional filter)
+(defun locate (search-string &optional filter arg)
   "Run the program `locate', putting results in `*Locate*' buffer.
 Pass it SEARCH-STRING as argument.  Interactively, prompt for SEARCH-STRING.
 With prefix arg, prompt for the exact shell command to run instead.
@@ -258,68 +287,49 @@
 the variables `locate-command' or `locate-make-command-line'.
 
 The main use of FILTER is to implement `locate-with-filter'.  See
-the docstring of that function for its meaning."
+the docstring of that function for its meaning.
+
+ARG is the interactive prefix arg."
   (interactive
-      (list
-       (if (or (and current-prefix-arg
-		    (not locate-prompt-for-command))
-	       (and (not current-prefix-arg) locate-prompt-for-command))
-	   (let ((locate-cmd (funcall locate-make-command-line "")))
-	     (read-from-minibuffer
-	      "Run locate (like this): "
-	      (cons
-	       (concat (car locate-cmd) "  "
-		       (mapconcat 'identity (cdr locate-cmd) " "))
-		       (+ 2 (length (car locate-cmd))))
-	      nil nil 'locate-history-list))
-	 (let* ((default (locate-word-at-point))
-	       (input
-		(read-from-minibuffer
-		 (if  (> (length default) 0)
-		     (format "Locate (default %s): " default)
-		   (format "Locate: "))
-		 nil nil nil 'locate-history-list default t)))
-	       (and (equal input "") default
-		    (setq input default))
-	       input))))
+   (list
+    (locate-prompt-for-search-string)
+    nil
+    current-prefix-arg))
+
   (if (equal search-string "")
       (error "Please specify a filename to search for"))
   (let* ((locate-cmd-list (funcall locate-make-command-line search-string))
 	 (locate-cmd (car locate-cmd-list))
 	 (locate-cmd-args (cdr locate-cmd-list))
 	 (run-locate-command
-	  (or (and current-prefix-arg (not locate-prompt-for-command))
-	      (and (not current-prefix-arg) locate-prompt-for-command)))
-         locate-buffer
+	  (or (and arg (not locate-prompt-for-command))
+	      (and (not arg) locate-prompt-for-command)))
 	 )
 
     ;; Find the Locate buffer
-    (setq locate-buffer (if (eq major-mode 'locate-mode)
-                            (current-buffer)
-                          (get-buffer-create locate-buffer-name)))
+    (save-window-excursion
+      (set-buffer (get-buffer-create locate-buffer-name))
+      (locate-mode)
+      (let ((inhibit-read-only t)
+	    (buffer-undo-list t))
+	(erase-buffer)
 
-    (save-excursion
-      (set-buffer locate-buffer)
-      (locate-mode)
-
-      (let ((inhibit-read-only t)
-            (buffer-undo-list t))
-        (erase-buffer)
+	(setq locate-current-filter filter)
+	(set (make-local-variable 'locate-local-search) search-string)
+	(set (make-local-variable 'locate-local-filter) filter)
+	(set (make-local-variable 'locate-local-prompt) run-locate-command)
 
-        (set (make-local-variable 'locate-current-search) search-string)
-        (set (make-local-variable 'locate-current-filter) filter)
-
-        (if run-locate-command
-            (shell-command search-string)
-          (apply 'call-process locate-cmd nil t nil locate-cmd-args))
+	(if run-locate-command
+	    (shell-command search-string locate-buffer-name)
+	  (apply 'call-process locate-cmd nil t nil locate-cmd-args))
 
-        (and filter
-             (locate-filter-output filter))
+	(and filter
+	     (locate-filter-output filter))
 
-        (locate-do-setup search-string)))
-
-    (unless (eq (current-buffer) locate-buffer)
-      (switch-to-buffer-other-window locate-buffer))
+	(locate-do-setup search-string)
+	))
+    (and (not (string-equal (buffer-name) locate-buffer-name))
+	(switch-to-buffer-other-window locate-buffer-name))
 
     (run-hooks 'dired-mode-hook)
     (dired-next-line 3)			;move to first matching file.
@@ -328,7 +338,7 @@
   )
 
 ;;;###autoload
-(defun locate-with-filter (search-string filter)
+(defun locate-with-filter (search-string filter &optional arg)
   "Run the executable program `locate' with a filter.
 This function is similar to the function `locate', which see.
 The difference is that, when invoked interactively, the present function
@@ -338,14 +348,17 @@
 contain a match for the regular expression FILTER; this is often useful
 to constrain a big search.
 
+ARG is the interactive prefix arg, which has the same effect as in `locate'.
+
 When called from Lisp, this function is identical with `locate',
 except that FILTER is not optional."
   (interactive
-   (list (read-from-minibuffer "Locate: " nil nil
-			       nil 'locate-history-list)
-	 (read-from-minibuffer "Filter: " nil nil
-			       nil 'locate-grep-history-list)))
-  (locate search-string filter))
+   (list
+    (locate-prompt-for-search-string)
+    (read-from-minibuffer "Filter: " nil nil
+			  nil 'locate-grep-history-list)
+    current-prefix-arg))
+  (locate search-string filter arg))
 
 (defun locate-filter-output (filter)
   "Filter output from the locate command."
@@ -469,7 +482,6 @@
         default-directory   "/"
 	buffer-read-only    t
 	selective-display   t)
-  (buffer-disable-undo)
   (dired-alist-add-1 default-directory (point-min-marker))
   (set (make-local-variable 'dired-directory) "/")
   (set (make-local-variable 'dired-subdir-switches) locate-ls-subdir-switches)
@@ -501,12 +513,11 @@
     ;; Nothing returned from locate command?
     (and (eobp)
 	 (progn
-           (let ((filter locate-current-filter)) ; local
-             (kill-buffer (current-buffer))
-             (if filter
-                 (error "Locate: no match for %s in database using filter %s"
-                        search-string filter)
-               (error "Locate: no match for %s in database" search-string)))))
+	   (kill-buffer locate-buffer-name)
+	   (if locate-current-filter
+	       (error "Locate: no match for %s in database using filter %s"
+		      search-string locate-current-filter)
+	     (error "Locate: no match for %s in database" search-string))))
 
     (locate-insert-header search-string)
 
@@ -590,14 +601,16 @@
   "Revert the *Locate* buffer.
 If `locate-update-when-revert' is non-nil, offer to update the
 locate database using the shell command in `locate-update-command'."
-  (and locate-update-when-revert
-       (yes-or-no-p "Update locate database (may take a few seconds)? ")
-       ;; `expand-file-name' is used in order to autoload Tramp if
-       ;; necessary.  It cannot be loaded when `default-directory'
-       ;; is remote.
-       (let ((default-directory (expand-file-name locate-update-path)))
-         (shell-command locate-update-command)))
-  (locate locate-current-search locate-current-filter))
+  (let ((locate-buffer-name (buffer-name))
+	(locate-prompt-for-command locate-local-prompt))
+    (and locate-update-when-revert
+	 (yes-or-no-p "Update locate database (may take a few seconds)? ")
+	 ;; `expand-file-name' is used in order to autoload Tramp if
+	 ;; necessary.  It cannot be loaded when `default-directory'
+	 ;; is remote.
+	 (let ((default-directory (expand-file-name locate-update-path)))
+	   (shell-command locate-update-command)))
+    (locate locate-local-search locate-local-filter)))
 
 ;;; Modified three functions from `dired.el':
 ;;;   dired-find-directory,
@@ -656,7 +669,12 @@
 
 ;; Only for GNU locate
 (defun locate-in-alternate-database  (search-string database)
-  "Run the GNU locate command, using an alternate database."
+  "Run the GNU locate program, using an alternate database.
+
+This command only works if you use GNU locate.  It does not work
+properly if `locate-prompt-for-command' is set to t.  In that
+case, you can just run the regular `locate' command and specify
+the database on the command line."
   (interactive
       (list
        (progn
--- a/lisp/mail/mailabbrev.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/mail/mailabbrev.el	Fri May 11 18:24:42 2007 +0000
@@ -494,6 +494,8 @@
 	     ;; the usual syntax table.
 
 	     (or (and (integerp last-command-char)
+		      ;; Some commands such as M-> may want to expand first.
+		      (equal this-command 'self-insert)
 		      (or (eq (char-syntax last-command-char) ?_)
 			  ;; Don't expand on @.
 			  (memq last-command-char '(?@ ?. ?% ?! ?_ ?-))))
--- a/lisp/makefile.w32-in	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/makefile.w32-in	Fri May 11 18:24:42 2007 +0000
@@ -308,6 +308,8 @@
 	$(lisp)/mh-e/mh-tool-bar.el $(lisp)/mh-e/mh-utils.el	\
 	$(lisp)/mh-e/mh-xface.el
 
+# See the commentary for autoloads above for why we use ./mh-e below
+# instead of $(lisp)/mh-e.
 mh-autoloads: $(lisp)/mh-e/mh-loaddefs.el
 $(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC)
 	$(MAKE) $(MFLAGS) pre-mh-loaddefs.el-$(SHELLTYPE)
@@ -319,7 +321,7 @@
 	   --eval "(setq find-file-suppress-same-file-warnings t)" \
 	   --eval "(setq make-backup-files nil)" \
 	   -f w32-batch-update-autoloads \
-	   "$(lisp)/mh-e/mh-loaddefs.el" $(lisp)/mh-e
+	   "$(lisp)/mh-e/mh-loaddefs.el" ./mh-e
 
 pre-mh-loaddefs.el-SH:
 	echo ";;; mh-loaddefs.el --- automatically extracted autoloads" > $@
--- a/lisp/man.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/man.el	Fri May 11 18:24:42 2007 +0000
@@ -1296,7 +1296,9 @@
 	(forward-line 1))
     (if (re-search-forward Man-heading-regexp (point-max) t n)
 	(beginning-of-line)
-      (goto-char (point-max)))))
+      (goto-char (point-max))
+      ;; The last line doesn't belong to any section.
+      (forward-line -1))))
 
 (defun Man-previous-section (n)
   "Move point to Nth previous section (default 1)."
--- a/lisp/net/rcirc.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/net/rcirc.el	Fri May 11 18:24:42 2007 +0000
@@ -312,7 +312,7 @@
   "List of urls seen in the current buffer.")
 (put 'rcirc-urls 'permanent-local t)
 
-(defvar rcirc-timeout-seconds 60
+(defvar rcirc-timeout-seconds 600
   "Kill connection after this many seconds if there is no activity.")
 
 (defconst rcirc-id-string (concat "rcirc on GNU Emacs " emacs-version))
--- a/lisp/newcomment.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/newcomment.el	Fri May 11 18:24:42 2007 +0000
@@ -97,10 +97,10 @@
 ;;;###autoload
 (defcustom comment-column 32
   "Column to indent right-margin comments to.
-Each mode establishes a different default value for this variable; you
+Each mode may establish a different default value for this variable; you
 can set the value for a particular mode using that mode's hook.
-Comments might be indented to a value smaller than this in order
-not to go beyond `comment-fill-column'."
+Comments might be indented to a different value in order not to go beyond
+`comment-fill-column' or in order to align them with surrounding comments."
   :type 'integer
   :group 'comment)
 (make-variable-buffer-local 'comment-column)
@@ -491,16 +491,24 @@
         (goto-char (point-min))
         (re-search-forward (concat comment-end-skip "\\'") nil t))
       (goto-char (match-beginning 0)))
-     ;; comment-end-skip not found.  Maybe we're at EOB which implicitly
-     ;; closes the comment.
-     ((eobp) (skip-syntax-backward " "))
-     (t
-      ;; else comment-end-skip was not found probably because it was not
-      ;; set right.  Since \\s> should catch the single-char case, we'll
-      ;; blindly assume we're at the end of a two-char comment-end.
+     ;; comment-end-skip not found probably because it was not set
+     ;; right.  Since \\s> should catch the single-char case, let's
+     ;; check that we're looking at a two-char comment ender.
+     ((not (or (<= (- (point-max) (line-beginning-position)) 1)
+               (zerop (logand (car (syntax-after (- (point) 1)))
+                              ;; Here we take advantage of the fact that
+                              ;; the syntax class " " is encoded to 0,
+                              ;; so "  4" gives us just the 4 bit.
+                              (car (string-to-syntax "  4"))))
+               (zerop (logand (car (syntax-after (- (point) 2)))
+                              (car (string-to-syntax "  3"))))))
       (backward-char 2)
       (skip-chars-backward (string (char-after)))
-      (skip-syntax-backward " ")))))
+      (skip-syntax-backward " "))
+     ;; No clue what's going on: maybe we're really not right after the
+     ;; end of a comment.  Maybe we're at the "end" because of EOB rather
+     ;; than because of a marker.
+     (t (skip-syntax-backward " ")))))
 
 ;;;;
 ;;;; Commands
@@ -516,6 +524,58 @@
 	      (and (> comment-add 0) (looking-at "\\s<\\(\\S<\\|\\'\\)")))
       comment-column)))
 
+(defun comment-choose-indent (&optional indent)
+  "Choose the indentation to use for a right-hand-side comment.
+The criteria are (in this order):
+- try to keep the comment's text within `comment-fill-column'.
+- try to align with surrounding comments.
+- prefer INDENT (or `comment-column' if nil).
+Point is expected to be at the start of the comment."
+  (unless indent (setq indent comment-column))
+  ;; Avoid moving comments past the fill-column.
+  (let ((max (+ (current-column)
+                (- (or comment-fill-column fill-column)
+                   (save-excursion (end-of-line) (current-column)))))
+        (other nil)
+        (min (save-excursion (skip-chars-backward " \t")
+                             (1+ (current-column)))))
+    ;; Fix up the range.
+    (if (< max min) (setq max min))
+    ;; Don't move past the fill column.
+    (if (<= max indent) (setq indent max))
+    ;; We can choose anywhere between min..max.
+    ;; Let's try to align to a comment on the previous line.
+    (save-excursion
+      (when (and (zerop (forward-line -1))
+                 (setq other (comment-search-forward
+                              (line-end-position) t)))
+        (goto-char other) (setq other (current-column))))
+    (if (and other (<= other max) (>= other min))
+        ;; There is a comment and it's in the range: bingo!
+        other
+      ;; Can't align to a previous comment: let's try to align to comments
+      ;; on the following lines, then.  These have not been re-indented yet,
+      ;; so we can't directly align ourselves with them.  All we do is to try
+      ;; and choose an indentation point with which they will be able to
+      ;; align themselves.
+      (save-excursion
+        (while (and (zerop (forward-line 1))
+                    (setq other (comment-search-forward
+                                 (line-end-position) t)))
+          (goto-char other)
+          (let ((omax (+ (current-column)
+                         (- (or comment-fill-column fill-column)
+                            (save-excursion (end-of-line) (current-column)))))
+                (omin (save-excursion (skip-chars-backward " \t")
+                                      (1+ (current-column)))))
+            (if (and (>= omax min) (<= omin max))
+                (progn (setq min (max omin min))
+                       (setq max (min omax max)))
+              ;; Can't align with this anyway, so exit the loop.
+              (goto-char (point-max))))))
+      ;; Return the closest point to indent within min..max.
+      (max min (min max indent)))))
+
 ;;;###autoload
 (defun comment-indent (&optional continue)
   "Indent this line's comment to `comment-column', or insert an empty comment.
@@ -569,38 +629,9 @@
       (if (not indent)
 	  ;; comment-indent-function refuses: delegate to line-indent.
 	  (indent-according-to-mode)
-	;; If the comment is at the left of code, adjust the indentation.
+	;; If the comment is at the right of code, adjust the indentation.
 	(unless (save-excursion (skip-chars-backward " \t") (bolp))
-	  ;; Avoid moving comments past the fill-column.
-	  (let ((max (+ (current-column)
-			(- (or comment-fill-column fill-column)
-			   (save-excursion (end-of-line) (current-column))))))
-	    (if (<= max indent)
-		(setq indent max)	;Don't move past the fill column.
-	      ;; We can choose anywhere between indent..max.
-	      ;; Let's try to align to a comment on the previous line.
-	      (let ((other nil)
-		    (min (max indent
-			      (save-excursion (skip-chars-backward " \t")
-					      (1+ (current-column))))))
-		(save-excursion
-		  (when (and (zerop (forward-line -1))
-			     (setq other (comment-search-forward
-					 (line-end-position) t)))
-		    (goto-char other) (setq other (current-column))))
-		(if (and other (<= other max) (>= other min))
-		    ;; There is a comment and it's in the range: bingo.
-		    (setq indent other)
-		  ;; Let's try to align to a comment on the next line, then.
-		  (let ((other nil))
-		    (save-excursion
-		      (when (and (zerop (forward-line 1))
-				 (setq other (comment-search-forward
-					     (line-end-position) t)))
-			(goto-char other) (setq other (current-column))))
-		    (if (and other (<= other max) (> other min))
-			;; There is a comment and it's in the range: bingo.
-			(setq indent other))))))))
+          (setq indent (comment-choose-indent indent)))
 	;; Update INDENT to leave at least one space
 	;; after other nonwhite text on the line.
 	(save-excursion
--- a/lisp/paren.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/paren.el	Fri May 11 18:24:42 2007 +0000
@@ -253,7 +253,8 @@
 	;; force redisplay to recenter the window (since there is no
 	;; way for it to know that the overlay changes to the buffer
 	;; are harmless).  So reset the window-start.
-	(set-window-start (selected-window) window-start))
+	(unless (window-minibuffer-p)
+	  (set-window-start (selected-window) window-start)))
     ;; show-paren-mode is nil in this buffer.
     (and show-paren-overlay
 	 (delete-overlay show-paren-overlay))
--- a/lisp/progmodes/cc-cmds.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/progmodes/cc-cmds.el	Fri May 11 18:24:42 2007 +0000
@@ -856,8 +856,8 @@
 		   (narrow-to-region (point-min) (point))
 		   (back-to-indentation)
 		   (looking-at (concat c-current-comment-prefix "[ \t]*$")))))
-      (kill-region (progn (forward-line 0) (point))
-		   (progn (end-of-line) (point)))
+      (delete-region (progn (forward-line 0) (point))
+		     (progn (end-of-line) (point)))
       (insert-char ?* 1)) ; the / comes later. ; Do I need a t (retain sticky properties) here?
 
     (setq indentp (and (not arg)
--- a/lisp/progmodes/cc-mode.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/progmodes/cc-mode.el	Fri May 11 18:24:42 2007 +0000
@@ -522,7 +522,7 @@
 	    (setq lim (max (point-min) (1- (point))))
 
 	    ;; Look for the latest `c-type' property before end1
-	    (when (and (> end1 1)
+	    (when (and (> end1 (point-min))
 		       (setq type-pos
 			     (if (get-text-property (1- end1) 'c-type)
 				 end1
@@ -820,7 +820,7 @@
 		      "$")
 	      nil t)
 	(beginning-of-line)
-	(kill-line 1)))
+	(delete-region (point) (progn (end-of-line) (point)))))
 
     ;; Delete the first line, if we've got one, in case it contains a mode spec.
     (unless (and lv-point
@@ -828,8 +828,7 @@
 			(forward-line 0)
 			(bobp)))
       (goto-char (point-min))
-      (unless (eobp)
-	(kill-line 1)))))
+      (delete-region (point) (progn (end-of-line) (point))))))
 
 (defun c-postprocess-file-styles ()
   "Function that post processes relevant file local variables in CC Mode.
--- a/lisp/progmodes/compile.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/progmodes/compile.el	Fri May 11 18:24:42 2007 +0000
@@ -1448,10 +1448,7 @@
     (with-no-warnings
       (if compilation-finish-function
 	  (funcall compilation-finish-function (current-buffer) msg)))
-    (let ((functions compilation-finish-functions))
-      (while functions
-	(funcall (car functions) (current-buffer) msg)
-	(setq functions (cdr functions))))))
+    (run-hook-with-args compilation-finish-functions (current-buffer) msg)))
 
 ;; Called when compilation process changes state.
 (defun compilation-sentinel (proc msg)
@@ -1863,7 +1860,24 @@
           (let* ((name (read-file-name
                         (format "Find this %s in (default %s): "
                                 compilation-error filename)
-                        spec-dir filename t nil))
+                        spec-dir filename t nil
+                        ;; The predicate below is fine when called from
+                        ;; minibuffer-complete-and-exit, but it's too
+                        ;; restrictive otherwise, since it also prevents the
+                        ;; user from completing "fo" to "foo/" when she
+                        ;; wants to enter "foo/bar".
+                        ;; 
+                        ;; Try to make sure the user can only select
+                        ;; a valid answer.  This predicate may be ignored,
+                        ;; tho, so we still have to double-check afterwards.
+                        ;; TODO: We should probably fix read-file-name so
+                        ;; that it never ignores this predicate, even when
+                        ;; using popup dialog boxes.
+                        ;; (lambda (name)
+                        ;;   (if (file-directory-p name)
+                        ;;       (setq name (expand-file-name filename name)))
+                        ;;   (file-exists-p name))
+                        ))
                  (origname name))
             (cond
              ((not (file-exists-p name))
--- a/lisp/progmodes/gud.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/progmodes/gud.el	Fri May 11 18:24:42 2007 +0000
@@ -152,7 +152,7 @@
 		  :visible (and (not gud-running)
 				(eq gud-minor-mode 'gdba)))
     ([stop]	menu-item "Stop" gud-stop-subjob
-		  :visible (or (not (eq gud-minor-mode 'gdba))
+		  :visible (or (not (memq gud-minor-mode '(gdba pdb)))
 			       (and gud-running
 				    (eq gud-minor-mode 'gdba))))
     ([until]	menu-item "Continue to selection" gud-until
--- a/lisp/progmodes/idlw-shell.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/progmodes/idlw-shell.el	Fri May 11 18:24:42 2007 +0000
@@ -2586,7 +2586,7 @@
 			      (if (idlwave-shell-hide-p 'debug) 'mostly)
 			      nil t))
 
-(defun idlwave-shell-clear-bp (bp)
+(defun idlwave-shell-clear-bp (bp &optional no-query)
   "Clear breakpoint BP.
 Clears in IDL and in `idlwave-shell-bp-alist'."
   (let ((index (idlwave-shell-bp-get bp)))
@@ -2595,7 +2595,7 @@
           (idlwave-shell-send-command
            (concat "breakpoint,/clear," (int-to-string index))
 	   nil (idlwave-shell-hide-p 'breakpoint) nil t)
-	  (idlwave-shell-bp-query)))))
+	  (unless no-query (idlwave-shell-bp-query))))))
 
 (defun idlwave-shell-current-frame ()
   "Return a list containing the current file name and line point is in.
@@ -3722,17 +3722,22 @@
 		(setq old-buffers (delq (current-buffer) old-buffers)))
 	    (if (fboundp 'set-specifier) ;; XEmacs
 		(set-specifier left-margin-width (cons (current-buffer) 2))
-	      (setq left-margin-width 2))
-	    (if (setq win (get-buffer-window (current-buffer) t))
-		(set-window-buffer win (current-buffer))))))
+	      (if (< left-margin-width 2)
+		  (setq left-margin-width 2)))
+	    (let ((window (get-buffer-window (current-buffer) 0)))
+	      (if window
+		  (set-window-margins 
+		   window left-margin-width right-margin-width))))))
       (if use-glyph
 	  (while (setq buf (pop old-buffers))
 	    (with-current-buffer buf
 	      (if (fboundp 'set-specifier) ;; XEmacs
 		  (set-specifier left-margin-width (cons (current-buffer) 0))
 		(setq left-margin-width 0))
-	      (if (setq win (get-buffer-window buf t))
-		  (set-window-buffer win buf))))))))
+	      (let ((window (get-buffer-window buf 0)))
+		(if window
+		    (set-window-margins 
+		     window left-margin-width right-margin-width)))))))))
 
 (defun idlwave-shell-make-new-bp-overlay (&optional type disabled)
   "Make a new overlay for highlighting breakpoints.  
@@ -4055,7 +4060,9 @@
    idlwave-shell-bp-query
    '(progn
       (idlwave-shell-filter-bp)
-      (mapcar 'idlwave-shell-clear-bp idlwave-shell-bp-alist))
+      (mapcar (lambda (x) (idlwave-shell-clear-bp x 'no-query))
+	      idlwave-shell-bp-alist)
+      (idlwave-shell-bp-query))
    'hide))
 
 (defun idlwave-shell-list-all-bp ()
--- a/lisp/progmodes/idlwave.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/progmodes/idlwave.el	Fri May 11 18:24:42 2007 +0000
@@ -2411,16 +2411,18 @@
     ;; Reindent new line
     (idlwave-indent-line)))
 
-(defun idlwave-beginning-of-subprogram ()
-  "Moves point to the beginning of the current program unit."
+(defun idlwave-beginning-of-subprogram (&optional nomark)
+  "Moves point to the beginning of the current program unit.
+If NOMARK is non-nil, do not push mark."
   (interactive)
-  (idlwave-find-key idlwave-begin-unit-reg -1))
-
-(defun idlwave-end-of-subprogram ()
-  "Moves point to the start of the next program unit."
+  (idlwave-find-key idlwave-begin-unit-reg -1 nomark))
+
+(defun idlwave-end-of-subprogram (&optional nomark)
+  "Moves point to the start of the next program unit.
+If NOMARK is non-nil, do not push mark."
   (interactive)
   (idlwave-end-of-statement)
-  (idlwave-find-key idlwave-end-unit-reg 1))
+  (idlwave-find-key idlwave-end-unit-reg 1 nomark))
 
 (defun idlwave-mark-statement ()
   "Mark current IDL statement."
@@ -2535,7 +2537,7 @@
   "Return (NAME TYPE CLASS) of current routine."
   (idlwave-routines)
   (save-excursion
-    (idlwave-beginning-of-subprogram)
+    (idlwave-beginning-of-subprogram 'nomark)
     (if (looking-at "[ \t]*\\<\\(pro\\|function\\)\\>\\s-+\\(\\([a-zA-Z0-9$_]+\\)::\\)?\\([a-zA-Z0-9$_]+\\)")
 	(let* ((type (if (string= (downcase (match-string 1)) "pro")
 			 'pro 'function))
--- a/lisp/progmodes/mantemp.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/progmodes/mantemp.el	Fri May 11 18:24:42 2007 +0000
@@ -105,14 +105,14 @@
 	    "^[A-z :&*<>~=,0-9+]*>::operator " nil t nil)
       (progn
 	(backward-char 11)
-	(kill-line)))
+	(delete-region (point) (line-end-position))))
     ;; Remove other member function extensions.
     (goto-char (point-min))
     (message "Removing member function extensions")
     (while (re-search-forward "^[A-z :&*<>~=,0-9+]*>::" nil t nil)
       (progn
 	(backward-char 2)
-	(kill-line)))))
+	(delete-region (point) (line-end-position))))))
 
 (defun mantemp-sort-and-unique-lines ()
   "Eliminate all consecutive duplicate lines in the buffer."
@@ -127,7 +127,7 @@
       (progn
 	(forward-line -1)
 	(beginning-of-line)
-	(kill-line 1)))))
+	(delete-region (point) (progn (forward-line 1) (point)))))))
 
 (defun mantemp-insert-cxx-syntax ()
   "Insert C++ syntax around each template class and function.
@@ -161,7 +161,7 @@
       (progn
 	(beginning-of-line)
 	(forward-word 1)
-	(kill-word 1)))))
+	(delete-region (point) (progn (forward-word 1) (point)))))))
 
 (defun mantemp-make-mantemps ()
   "Gathering interface to the functions modifying the buffer."
@@ -189,16 +189,16 @@
 but operates on the region."
   (interactive)
   (let ((cur-buf (current-buffer))
-	(mantemp-buffer (generate-new-buffer "*mantemp*")))
+	(mantemp-buffer (generate-new-buffer "*mantemp*"))
+	(str (buffer-substring (mark) (point))))
     ;; Copy the region to a temporary buffer, make the C++ code there
     ;; and copy the result back to the current buffer.
-    (kill-region (mark) (point))
     (set-buffer mantemp-buffer)
-    (yank)
+    (insert str)
     (mantemp-make-mantemps)
-    (kill-region (point-min) (point-max))
+    (setq str (buffer-string))
     (set-buffer cur-buf)
-    (yank)
+    (insert str)
     (kill-buffer mantemp-buffer))
   (message "Done"))
 
--- a/lisp/progmodes/perl-mode.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/progmodes/perl-mode.el	Fri May 11 18:24:42 2007 +0000
@@ -647,10 +647,10 @@
 		     (if (and comment-start-skip
 			      (re-search-forward comment-start-skip eol 'move))
 			 (if (eolp)
-			     (progn	; kill existing comment
+			     (progn	; delete existing comment
 			       (goto-char (match-beginning 0))
 			       (skip-chars-backward " \t")
-			       (kill-region (point) eol))
+			       (delete-region (point) eol))
 			   (if (or (< oldpnt (point)) (= oldpnt eol))
 			       (indent-for-comment) ; indent existing comment
 			     (end-of-line)))
--- a/lisp/progmodes/python.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/progmodes/python.el	Fri May 11 18:24:42 2007 +0000
@@ -96,7 +96,7 @@
 	     "import" "in" "is" "lambda" "not" "or" "pass" "print"
 	     "raise" "return" "try" "while" "yield"
 	     ;; Future keywords
-	     "as" "None"
+	     "as" "None" "with"
              ;; Not real keywords, but close enough to be fontified as such
              "self" "True" "False")
 	 symbol-end)
@@ -374,7 +374,7 @@
   (save-excursion
     (unless bos (python-beginning-of-statement))
     (looking-at (rx (and (or "if" "else" "elif" "while" "for" "def"
-			     "class" "try" "except" "finally")
+			     "class" "try" "except" "finally" "with")
 			 symbol-end)))))
 
 (defun python-close-block-statement-p (&optional bos)
@@ -461,7 +461,7 @@
 	      (let ((initial (current-indentation)))
 		(if (zerop (python-next-statement))
 		    (setq indent (- (current-indentation) initial)))
-		(if (and (>= indent 2) (<= indent 8)) ; sanity check
+		(if (and indent (>= indent 2) (<= indent 8)) ; sanity check
 		    (setq done t))))))
 	(when done
 	  (when (/= indent (default-value 'python-indent))
@@ -883,10 +883,13 @@
 			   nil)
 			  ((eq 'string (syntax-ppss-context s))
 			   ;; Go to start of string and skip it.
-			   (goto-char (nth 8 s))
-			   (condition-case () ; beware invalid syntax
-			       (progn (forward-sexp) t)
-			     (error (end-of-line))))
+                           (let ((pos (point)))
+                             (goto-char (nth 8 s))
+                             (condition-case () ; beware invalid syntax
+                                 (progn (forward-sexp) t)
+                               ;; If there's a mismatched string, make sure
+                               ;; we still overall move *forward*.
+                               (error (goto-char pos) (end-of-line)))))
 			  ((python-skip-out t s))))
 	     (end-of-line))
 	   (unless comment
@@ -981,15 +984,11 @@
 		       (_ (if (python-comment-line-p)
 			      (python-skip-comments/blanks t)))
 		       (ci (current-indentation))
-		       (open (python-open-block-statement-p))
-		       opoint)
+		       (open (python-open-block-statement-p)))
 		  (if (and (zerop ci) (not open))
 		      (not (goto-char point))
 		    (catch 'done
-		      (setq opoint (point))
-		      (while (and (zerop (python-next-statement))
-		      		  (not (= opoint (point))))
-			(setq opoint (point))
+                      (while (zerop (python-next-statement))
 			(when (or (and open (<= (current-indentation) ci))
 				  (< (current-indentation) ci))
 			  (python-skip-comments/blanks t)
@@ -2240,7 +2239,7 @@
        #'python-current-defun)
   (set (make-local-variable 'outline-regexp)
        (rx (* space) (or "class" "def" "elif" "else" "except" "finally"
-			 "for" "if" "try" "while")
+			 "for" "if" "try" "while" "with")
 	   symbol-end))
   (set (make-local-variable 'outline-heading-end-regexp) ":\\s-*\n")
   (set (make-local-variable 'outline-level) #'python-outline-level)
--- a/lisp/progmodes/sh-script.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/progmodes/sh-script.el	Fri May 11 18:24:42 2007 +0000
@@ -1530,6 +1530,8 @@
           "ksh")
          ((string-match "[.]csh\\>" buffer-file-name)
           "csh")
+	 ((equal (file-name-nondirectory buffer-file-name) ".profile")
+          "sh")
          (t
           sh-shell-file))
    nil nil)
--- a/lisp/progmodes/vhdl-mode.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/progmodes/vhdl-mode.el	Fri May 11 18:24:42 2007 +0000
@@ -7028,7 +7028,7 @@
 	    (indent-to comment-column)
 	    (indent-according-to-mode))
 	   (t				; inline comment indent
-	    (kill-line -0))))
+	    (delete-region (line-beginning-position) (point)))))
     ;; dedent
     ((and (>= (current-indentation) vhdl-basic-offset)
 	  (or (eq last-command 'vhdl-electric-tab)
@@ -7161,7 +7161,7 @@
 	(when (not (looking-at "^\\s-*\\(--.*\\)?$"))
 	  (end-of-line)
 	  (if (search-backward " -- ((" (vhdl-point 'bol) t)
-	      (kill-line))
+	      (delete-region (point) (line-end-position)))
 	  (insert " -- ")
 	  (insert (format "%s" expurgated))))))
   (vhdl-keep-region-active))
@@ -8346,7 +8346,9 @@
 	    (progn (vhdl-insert-keyword "FOR ")
 		   (if (vhdl-template-field "[quantity name]" " USE " t)
 		       (progn (vhdl-template-field "quantity name" " => ") t)
-		     (kill-word -1) nil))
+		     (delete-region (point)
+				    (progn (forward-word -1) (point)))
+		     nil))
 	    (vhdl-template-field "[quantity name]" " => " t))
       (vhdl-template-field "expression")
       (setq position (point))
@@ -8482,7 +8484,7 @@
       (setq position (point))
       (vhdl-insert-keyword "PORT ")
       (unless (vhdl-template-map position t t)
-	(kill-line -0)
+	(delete-region (line-beginning-position) (point))
 	(delete-char -1))
       (insert ";"))))
 
@@ -8573,7 +8575,7 @@
 	       (setq position (point))
 	       (vhdl-insert-keyword "PORT ")
 	       (unless (vhdl-template-map position t t)
-		 (kill-line -0)
+		 (delete-region (line-beginning-position) (point))
 		 (delete-char -1))
 	       (insert ";")
 	       t)
@@ -9116,11 +9118,11 @@
 	(cond ((equal definition "")
 	       (insert ";"))
 	      ((equal definition "ARRAY")
-	       (kill-word -1)
+	       (delete-region (point) (progn (forward-word -1) (point)))
 	       (vhdl-template-array 'nature t))
 	      ((equal definition "RECORD")
 	       (setq mid-pos (point-marker))
-	       (kill-word -1)
+	       (delete-region (point) (progn (forward-word -1) (point)))
 	       (vhdl-template-record 'nature name t))
 	      (t
 	       (vhdl-insert-keyword " ACROSS ")
@@ -9435,7 +9437,7 @@
 	(insert "\n")
 	(indent-to (+ margin vhdl-basic-offset))
 	(setq first nil))
-      (kill-line -0)
+      (delete-region (line-beginning-position) (point))
       (indent-to margin)
       (vhdl-insert-keyword "END RECORD")
       (unless (vhdl-standard-p '87) (and name (insert " " name)))
@@ -9600,11 +9602,11 @@
 	       (delete-backward-char 4)
 	       (insert ";"))
 	      ((equal definition "ARRAY")
-	       (kill-word -1)
+	       (delete-region (point) (progn (forward-word -1) (point)))
 	       (vhdl-template-array 'type t))
 	      ((equal definition "RECORD")
 	       (setq mid-pos (point-marker))
-	       (kill-word -1)
+	       (delete-region (point) (progn (forward-word -1) (point)))
 	       (vhdl-template-record 'type name t))
 	      ((equal definition "ACCESS")
 	       (insert " ")
--- a/lisp/simple.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/simple.el	Fri May 11 18:24:42 2007 +0000
@@ -3171,6 +3171,8 @@
   (interactive)
   (if (null (mark t))
       (error "No mark set in this buffer")
+    (if (= (point) (mark t))
+	(message "Mark popped"))
     (goto-char (mark t))
     (pop-mark)))
 
@@ -3188,24 +3190,31 @@
 	(message "Mark activated")))))
 
 (defcustom set-mark-command-repeat-pop nil
-  "*Non-nil means that repeating \\[set-mark-command] after popping will pop.
-This means that if you type C-u \\[set-mark-command] \\[set-mark-command]
-will pop twice."
+  "*Non-nil means repeating \\[set-mark-command] after popping mark pops it again.
+That means that C-u \\[set-mark-command] \\[set-mark-command]
+will pop the mark twice, and
+C-u \\[set-mark-command] \\[set-mark-command] \\[set-mark-command]
+will pop the mark three times.
+
+nil means \\[set-mark-command]'s behavior does not change
+after C-u \\[set-mark-command]."
   :type 'boolean
-  :group 'editing)
+  :group 'editing-basics)
 
 (defun set-mark-command (arg)
-  "Set mark where point is, or jump to mark.
-Setting the mark also sets the \"region\", which is the closest
-equivalent in Emacs to what some editors call the \"selection\".
-
-With no prefix argument, set mark and push old mark position on local
-mark ring.  Also, push mark on global mark ring, if last mark was set in
-another buffer.  Immediately repeating the command activates
-`transient-mark-mode' temporarily.
+  "Set the mark where point is, or jump to the mark.
+Setting the mark also alters the region, which is the text
+between point and mark; this is the closest equivalent in
+Emacs to what some editors call the \"selection\".
+
+With no prefix argument, set the mark at point, and push the
+old mark position on local mark ring.  Also push the old mark on
+global mark ring, if the previous mark was set in another buffer.
+
+Immediately repeating this command activates `transient-mark-mode' temporarily.
 
 With prefix argument \(e.g., \\[universal-argument] \\[set-mark-command]\), \
-jump to mark, and set mark from
+jump to the mark, and set the mark from
 position popped off the local mark ring \(this does not affect the global
 mark ring\).  Use \\[pop-global-mark] to jump to a mark popped off the global
 mark ring \(see `pop-global-mark'\).
@@ -3214,9 +3223,9 @@
 the \\[set-mark-command] command with no prefix argument pops the next position
 off the local (or global) mark ring and jumps there.
 
-With a double \\[universal-argument] prefix argument \(e.g., \\[universal-argument] \
-\\[universal-argument] \\[set-mark-command]\), unconditionally
-set mark where point is, even if `set-mark-command-repeat-pop' is non-nil.
+With \\[universal-argument] \\[universal-argument] as prefix
+argument, unconditionally set mark where point is, even if
+`set-mark-command-repeat-pop' is non-nil.
 
 Novice Emacs Lisp programmers often try to use the mark for the wrong
 purposes.  See the documentation of `set-mark' for more information."
--- a/lisp/startup.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/startup.el	Fri May 11 18:24:42 2007 +0000
@@ -1133,21 +1133,25 @@
                 "\n")))
            :face variable-pitch "\
 Emacs FAQ\t\tFrequently asked questions and answers
-View Emacs Manual\tView the Emacs manual using Info
+View Emacs Manual\t\tView the Emacs manual using Info
 Absence of Warranty\tGNU Emacs comes with "
 	   :face (variable-pitch :slant oblique)
 	   "ABSOLUTELY NO WARRANTY\n"
 	   :face variable-pitch
 	   "\
-Copying Conditions\tConditions for redistributing and changing Emacs
+Copying Conditions\t\tConditions for redistributing and changing Emacs
 Getting New Versions\tHow to obtain the latest version of Emacs
 More Manuals / Ordering Manuals       Buying printed manuals from the FSF\n")
   (:face variable-pitch
-	 "To quit a partially entered command, type "
+	 "\nTo quit a partially entered command, type "
 	 :face default
 	 "Control-g"
 	 :face variable-pitch
-	 ".\n"
+	 ".
+
+Emacs Guided Tour\t\tSee http://www.gnu.org/software/emacs/tour/
+
+"
 	 :face (variable-pitch :weight bold)
 	 "Useful File menu items:\n"
 	 :face variable-pitch
@@ -1160,13 +1164,7 @@
 	 "Control-c"
 	 :face variable-pitch
 	 ")
-Recover Crashed Session\tRecover files you were editing before a crash
-
-
-
-
-
-"
+Recover Crashed Session\tRecover files you were editing before a crash\n"
 	   ))
   "A list of texts to show in the middle part of splash screens.
 Each element in the list should be a list of strings or pairs
--- a/lisp/subr.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/subr.el	Fri May 11 18:24:42 2007 +0000
@@ -1719,6 +1719,9 @@
 
 ;; This should be used by `call-interactively' for `n' specs.
 (defun read-number (prompt &optional default)
+  "Read a numeric value in the minibuffer, prompting with PROMPT.
+DEFAULT specifies a default value to return if the user just types RET.
+The value of DEFAULT is inserted into PROMPT."
   (let ((n nil))
     (when default
       (setq prompt
@@ -1732,9 +1735,11 @@
 	  (let ((str (read-from-minibuffer prompt nil nil nil nil
 					   (and default
 						(number-to-string default)))))
-	    (setq n (cond
-		     ((zerop (length str)) default)
-		     ((stringp str) (read str)))))
+	    (condition-case nil
+		(setq n (cond
+			 ((zerop (length str)) default)
+			 ((stringp str) (read str))))
+	      (error nil)))
 	  (unless (numberp n)
 	    (message "Please enter a number.")
 	    (sit-for 1)
--- a/lisp/t-mouse.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/t-mouse.el	Fri May 11 18:24:42 2007 +0000
@@ -166,6 +166,8 @@
     (if (or (eq (car ob-pos) 'STILL) (eq (car ob-pos) '***) (not ob-pos))
 	nil
       (setq ob (car ob-pos))
+      (if (string-match "mev:$" (prin1-to-string ob))
+	  (error "Can't open mouse connection"))
       (setq t-mouse-filter-accumulator
             (substring t-mouse-filter-accumulator (cdr ob-pos)))
 
@@ -273,32 +275,32 @@
 
 Turn it on to use Emacs mouse commands, and off to use t-mouse commands."
   nil " Mouse" nil :global t
-  (if t-mouse-mode
-      ;; Turn it on
-      (unless window-system
-        ;; Starts getting a stream of mouse events from an asynchronous process.
-        ;; Only works if Emacs is running on a virtual terminal without a window system.
+  (unless window-system
+    (if t-mouse-mode
+	;; Turn it on.  Starts getting a stream of mouse events from an
+        ;; asynchronous process.  Only works if Emacs is running on a virtual
+        ;; terminal without a window system.
 	(progn
-	 (setq mouse-position-function #'t-mouse-mouse-position-function)
-	 (let ((tty (t-mouse-tty))
-	       (process-connection-type t))
-	   (if (not (stringp tty))
-	       (error "Cannot find a virtual terminal"))
-	   (setq t-mouse-process
-		 (start-process "t-mouse" nil
-				"mev" "-i" "-E" "-C" tty
-				(if t-mouse-swap-alt-keys
-				    "-M-leftAlt" "-M-rightAlt")
-				"-e-move"
-				"-dall" "-d-hard"
-				"-f")))
-	 (setq t-mouse-filter-accumulator "")
-	 (set-process-filter t-mouse-process 't-mouse-process-filter)
-	 (set-process-query-on-exit-flag t-mouse-process nil)))
+	  (setq mouse-position-function #'t-mouse-mouse-position-function)
+	  (let ((tty (t-mouse-tty))
+		(process-connection-type t))
+	    (if (not (stringp tty))
+		(error "Cannot find a virtual terminal"))
+	    (setq t-mouse-process
+		  (start-process "t-mouse" nil
+				 "mev" "-i" "-E" "-C" tty
+				 (if t-mouse-swap-alt-keys
+				     "-M-leftAlt" "-M-rightAlt")
+				 "-e-move"
+				 "-dall" "-d-hard"
+				 "-f")))
+	  (setq t-mouse-filter-accumulator "")
+	  (set-process-filter t-mouse-process 't-mouse-process-filter)
+	  (set-process-query-on-exit-flag t-mouse-process nil))
     ;; Turn it off
-    (setq mouse-position-function nil)
-    (delete-process t-mouse-process)
-    (setq t-mouse-process nil)))
+      (setq mouse-position-function nil)
+      (delete-process t-mouse-process)
+      (setq t-mouse-process nil))))
 
 (provide 't-mouse)
 
--- a/lisp/term/mac-win.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/term/mac-win.el	Fri May 11 18:24:42 2007 +0000
@@ -2104,7 +2104,8 @@
 	 (coding (or (cdr (assq (car script-language)
 				mac-script-code-coding-systems))
 		     'mac-roman)))
-    (mac-unread-string (mac-utxt-to-string text coding))))
+    (if text
+	(mac-unread-string (mac-utxt-to-string text coding)))))
 
 ;; kEventClassTextInput/kEventTextInputUpdateActiveInputArea
 (define-key mac-apple-event-map [text-input update-active-input-area]
--- a/lisp/textmodes/fill.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/textmodes/fill.el	Fri May 11 18:24:42 2007 +0000
@@ -521,7 +521,6 @@
       ;; Ok, skip at least one word or one \c| character.
       ;; Meanwhile, don't stop at a period followed by one space.
       (let ((to (line-end-position))
-	    (fill-nobreak-predicate nil) ;to break sooner.
 	    (first t))
 	(goto-char linebeg)
 	(while (and (< (point) to) (or first (fill-nobreak-p)))
@@ -749,7 +748,9 @@
     (fill-paragraph arg)))
 
 (defun fill-paragraph (arg)
-  "Fill paragraph at or after point.  Prefix ARG means justify as well.
+  "Fill paragraph at or after point.
+
+If ARG is non-nil (interactively, with prefix argument), justify as well.
 If `sentence-end-double-space' is non-nil, then period followed by one
 space does not end a sentence, so don't break a line there.
 the variable `fill-column' controls the width for filling.
--- a/lisp/textmodes/flyspell.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/textmodes/flyspell.el	Fri May 11 18:24:42 2007 +0000
@@ -1827,7 +1827,7 @@
 (defun flyspell-define-abbrev (name expansion)
   (let ((table (flyspell-abbrev-table)))
     (when table
-      (define-abbrev table name expansion))))
+      (define-abbrev table (downcase name) expansion))))
 
 ;;*---------------------------------------------------------------------*/
 ;;*    flyspell-auto-correct-word ...                                   */
@@ -1961,12 +1961,8 @@
 But don't look beyond what's visible on the screen."
   (interactive "d")
 
-  (let (top bot)
-    (save-excursion
-      (move-to-window-line 0)
-      (setq top (point))
-      (move-to-window-line -1)
-      (setq bot (point)))
+  (let ((top (window-start))
+	(bot (window-end)))
     (save-excursion
       (save-restriction
 	(narrow-to-region top bot)
--- a/lisp/textmodes/sgml-mode.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/textmodes/sgml-mode.el	Fri May 11 18:24:42 2007 +0000
@@ -45,12 +45,12 @@
   :group 'languages)
 
 (defcustom sgml-basic-offset 2
-  "*Specifies the basic indentation level for `sgml-indent-line'."
+  "Specifies the basic indentation level for `sgml-indent-line'."
   :type 'integer
   :group 'sgml)
 
 (defcustom sgml-transformation-function 'identity
-  "*Default value for `skeleton-transformation-function' in SGML mode."
+  "Default value for `skeleton-transformation-function' in SGML mode."
   :type 'function
   :group 'sgml)
 
@@ -166,7 +166,7 @@
   "Syntax table used to parse SGML tags.")
 
 (defcustom sgml-name-8bit-mode nil
-  "*When non-nil, insert non-ASCII characters as named entities."
+  "When non-nil, insert non-ASCII characters as named entities."
   :type 'boolean
   :group 'sgml)
 
@@ -225,7 +225,7 @@
 ;; The -s option suppresses output.
 
 (defcustom sgml-validate-command "nsgmls -s" ; replaced old `sgmls'
-  "*The command to validate an SGML document.
+  "The command to validate an SGML document.
 The file name of current buffer file name will be appended to this,
 separated by a space."
   :type 'string
@@ -238,7 +238,7 @@
 ;; I doubt that null end tags are used much for large elements,
 ;; so use a small distance here.
 (defcustom sgml-slash-distance 1000
-  "*If non-nil, is the maximum distance to search for matching `/'."
+  "If non-nil, is the maximum distance to search for matching `/'."
   :type '(choice (const nil) integer)
   :group 'sgml)
 
@@ -318,7 +318,7 @@
     ("!doctype")
     ("!element")
     ("!entity"))
-  "*Alist of tag names for completing read and insertion rules.
+  "Alist of tag names for completing read and insertion rules.
 This alist is made up as
 
   ((\"tag\" . TAGRULE)
@@ -348,15 +348,14 @@
     ("!doctype" . "Document type (DTD) declaration")
     ("!element" . "Tag declaration")
     ("!entity" . "Entity (macro) declaration"))
-  "*Alist of tag name and short description."
+  "Alist of tag name and short description."
   :type '(repeat (cons (string :tag "Tag Name")
 		       (string :tag "Description")))
   :group 'sgml)
 
 (defcustom sgml-xml-mode nil
-  "*When non-nil, tag insertion functions will be XML-compliant.
-If this variable is customized, the custom value is used always.
-Otherwise, it is set to be buffer-local when the file has
+  "When non-nil, tag insertion functions will be XML-compliant.
+It is set to be buffer-local when the file has
 a DOCTYPE or an XML declaration."
   :type 'boolean
   :version "22.1"
@@ -937,7 +936,7 @@
 (defun sgml-lexical-context (&optional limit)
   "Return the lexical context at point as (TYPE . START).
 START is the location of the start of the lexical element.
-TYPE is one of `string', `comment', `tag', `cdata', or `text'.
+TYPE is one of `string', `comment', `tag', `cdata', `pi', or `text'.
 
 Optional argument LIMIT is the position to start parsing from.
 If nil, start from a preceding tag at indentation."
@@ -964,12 +963,19 @@
                   (let ((cdata-start (point)))
                     (unless (search-forward "]]>" pos 'move)
                       (list 0 nil nil 'cdata nil nil nil nil cdata-start))))
+                 ((and sgml-xml-mode (looking-at "<\\?"))
+                  ;; Processing Instructions.
+                  ;; In SGML, it's basically a normal tag of the form
+                  ;; <?NAME ...> but in XML, it takes the form <? ... ?>.
+                  (let ((pi-start (point)))
+                    (unless (search-forward "?>" pos 'move)
+                      (list 0 nil nil 'pi nil nil nil nil pi-start))))
                  (t
                   ;; We've reached a tag.  Parse it.
                   ;; FIXME: Handle net-enabling start-tags
                   (parse-partial-sexp (point) pos 0))))))
       (cond
-       ((eq (nth 3 state) 'cdata) (cons 'cdata (nth 8 state)))
+       ((memq (nth 3 state) '(cdata pi)) (cons (nth 3 state) (nth 8 state)))
        ((nth 3 state) (cons 'string (nth 8 state)))
        ((nth 4 state) (cons 'comment (nth 8 state)))
        ((and state (> (nth 0 state) 0)) (cons 'tag (nth 1 state)))
@@ -1003,8 +1009,10 @@
 	      (insert alist ?\")
 	    (delete-backward-char 2)))
       (insert "=\"")
-      (when alist
-        (insert (skeleton-read '(completing-read "Value: " alist))))
+      (if (cdr alist)
+          (insert (skeleton-read '(completing-read "Value: " alist)))
+        (when (null alist)
+          (insert (skeleton-read '(read-string "Value: ")))))
       (insert ?\"))))
 
 (defun sgml-quote (start end &optional unquotep)
@@ -1093,9 +1101,15 @@
       (when (eq (char-after) ?<)
 	;; Oops!! Looks like we were not in a textual context after all!.
 	;; Let's try to recover.
+        ;; Remember the tag-start so we don't need to look for it later.
+	;; This is not just an optimization but also makes sure we don't get
+	;; stuck in infloops in cases where "looking back for <" would not go
+	;; back far enough.
+        (setq tag-start (point))
 	(with-syntax-table sgml-tag-syntax-table
 	  (let ((pos (point)))
 	    (condition-case nil
+                ;; FIXME: This does not correctly skip over PI an CDATA tags.
 		(forward-sexp)
 	      (scan-error
 	       ;; This < seems to be just a spurious one, let's ignore it.
@@ -1110,33 +1124,41 @@
       (cond
        ((sgml-looking-back-at "--")	; comment
 	(setq tag-type 'comment
-	      tag-start (search-backward "<!--" nil t)))
+	      tag-start (or tag-start (search-backward "<!--" nil t))))
        ((sgml-looking-back-at "]]")	; cdata
 	(setq tag-type 'cdata
-	      tag-start (re-search-backward "<!\\[[A-Z]+\\[" nil t)))
+	      tag-start (or tag-start
+                            (re-search-backward "<!\\[[A-Z]+\\[" nil t))))
+       ((sgml-looking-back-at "?")      ; XML processing-instruction
+        (setq tag-type 'pi
+              ;; IIUC: SGML processing instructions take the form <?foo ...>
+              ;; i.e. a "normal" tag, handled below.  In XML this is changed
+              ;; to <?foo ... ?> where "..." can contain < and > and even <?
+              ;; but not ?>.  This means that when parsing backward, there's
+              ;; no easy way to make sure that we find the real beginning of
+              ;; the PI.
+	      tag-start (or tag-start (search-backward "<?" nil t))))
        (t
-	(setq tag-start
-	      (with-syntax-table sgml-tag-syntax-table
-		(goto-char tag-end)
-		(condition-case nil
-		    (backward-sexp)
-		  (scan-error
-		   ;; This > isn't really the end of a tag. Skip it.
-		   (goto-char (1- tag-end))
-		   (throw 'found (sgml-parse-tag-backward limit))))
-		(point)))
+        (unless tag-start
+          (setq tag-start
+                (with-syntax-table sgml-tag-syntax-table
+                  (goto-char tag-end)
+                  (condition-case nil
+                      (backward-sexp)
+                    (scan-error
+                     ;; This > isn't really the end of a tag. Skip it.
+                     (goto-char (1- tag-end))
+                     (throw 'found (sgml-parse-tag-backward limit))))
+                  (point))))
 	(goto-char (1+ tag-start))
 	(case (char-after)
-	  (?!				; declaration
-	   (setq tag-type 'decl))
-	  (??				; processing-instruction
-	   (setq tag-type 'pi))
+	  (?! (setq tag-type 'decl))    ; declaration
+	  (?? (setq tag-type 'pi))      ; processing-instruction
+	  (?% (setq tag-type 'jsp))	; JSP tags
 	  (?/				; close-tag
 	   (forward-char 1)
 	   (setq tag-type 'close
 		 name (sgml-parse-tag-name)))
-	  (?%				; JSP tags
-	   (setq tag-type 'jsp))
 	  (t				; open or empty tag
 	   (setq tag-type 'open
 		 name (sgml-parse-tag-name))
@@ -1331,6 +1353,8 @@
 
     ;; We don't know how to indent it.  Let's be honest about it.
     (cdata nil)
+    ;; We don't know how to indent it.  Let's be honest about it.
+    (pi nil)
 
     (tag
      (goto-char (1+ (cdr lcon)))
--- a/lisp/textmodes/tex-mode.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/textmodes/tex-mode.el	Fri May 11 18:24:42 2007 +0000
@@ -527,6 +527,8 @@
 	    (citations (regexp-opt
 			'("label" "ref" "pageref" "vref" "eqref"
 			  "cite" "nocite" "index" "glossary" "bibitem"
+                          ;; natbib's two variants of \cite:
+                          "citep" "citet"
 			  ;; These are text, rather than citations.
 			  ;; "caption" "footnote" "footnotemark" "footnotetext"
 			  )
--- a/lisp/thumbs.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/thumbs.el	Fri May 11 18:24:42 2007 +0000
@@ -29,7 +29,7 @@
 ;; It is used for basic browsing and viewing of images from within Emacs.
 ;; Minimal image manipulation functions are also available via external
 ;; programs.  If you want to do more complex tasks like categorise and tag
-;; your images, use tumme.el
+;; your images, use image-dired.el
 ;;
 ;; The 'convert' program from 'ImageMagick'
 ;; [URL:http://www.imagemagick.org/] is required.
--- a/lisp/tumme.el	Sun Apr 22 13:47:56 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2599 +0,0 @@
-;;; tumme.el --- use dired to browse and manipulate your images
-;;
-;; Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
-;;
-;; Version: 0.4.11
-;; Keywords: multimedia
-;; Author: Mathias Dahl <mathias.rem0veth1s.dahl@gmail.com>
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
-
-;;; Commentary:
-;;
-;; BACKGROUND
-;; ==========
-;;
-;;  I needed a program to browse, organize and tag my pictures.  I got
-;; tired of the old gallery program I used as it did not allow
-;; multi-file operations easily.  Also, it put things out of my
-;; control.  Image viewing programs I tested did not allow multi-file
-;; operations or did not do what I wanted it to.
-;;
-;;  So, I got the idea to use the wonderful functionality of Emacs and
-;; `dired' to do it.  It would allow me to do almost anything I wanted,
-;; which is basically just to browse all my pictures in an easy way,
-;; letting me manipulate and tag them in various ways.  `dired' already
-;; provide all the file handling and navigation facilities; I only
-;; needed to add some functions to display the images.
-;;
-;;  I briefly tried out thumbs.el, and although it seemed more
-;; powerful than this package, it did not work the way I wanted to.  It
-;; was too slow to created thumbnails of all files in a directory (I
-;; currently keep all my 2000+ images in the same directory) and
-;; browsing the thumbnail buffer was slow too.  tumme.el will not
-;; create thumbnails until they are needed and the browsing is done
-;; quickly and easily in dired.  I copied a great deal of ideas and
-;; code from there though... :)
-;;
-;;  About the name: tumme means thumb in Swedish and it is used for
-;; working with thumbnails, so... :) If you want to know how to
-;; pronounce it, go to the page on EmacsWiki and download the .ogg
-;; file from there.
-;;
-;;  `tumme' stores the thumbnail files in `tumme-dir' using the file
-;; name format ORIGNAME.thumb.ORIGEXT.  For example
-;; ~/.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
-;;
-;;
-;; PREREQUISITES
-;; =============
-;;
-;; * The ImageMagick package.  Currently, `convert' and `mogrify' are
-;; used.  Find it here: http://www.imagemagick.org.
-;;
-;; * For non-lossy rotation of JPEG images, the JpegTRAN program is
-;; needed.
-;;
-;; * For `tumme-get-exif-data' and `tumme-write-exif-data' to work,
-;; the command line tool `exiftool' is needed.  It can be found here:
-;; http://www.sno.phy.queensu.ca/~phil/exiftool/.  These two functions
-;; are, among other things, used for writing comments to image files
-;; using `tumme-thumbnail-set-image-description' and to create
-;; "unique" file names using `tumme-get-exif-file-name' (used by
-;; `tumme-copy-with-exif-file-name').
-;;
-;;
-;; USAGE
-;; =====
-;;
-;; This information has been moved to the manual.  Type `C-h r' to open
-;; the Emacs manual and go to the node Thumbnails by typing `g
-;; Thumbnails RET'.
-;;
-;; Quickstart: M-x tumme RET DIRNAME RET
-;;
-;; where DIRNAME is a directory containing image files.
-;;
-;; LIMITATIONS
-;; ===========
-;;
-;; * Supports all image formats that Emacs and convert supports, but
-;; the thumbnails are hard-coded to JPEG format.
-;;
-;; * WARNING: The "database" format used might be changed so keep a
-;; backup of `tumme-db-file' when testing new versions.
-;;
-;;
-;; TODO
-;; ====
-;;
-;; * Support gallery creation when using per-directory thumbnail
-;; storage.
-;;
-;; * Some sort of auto-rotate function based on rotate info in the
-;; EXIF data.
-;;
-;; * Check if exiftool exist before trying to call it to give a better
-;; error message.
-;;
-;; * Investigate if it is possible to also write the tags to the image
-;; files.
-;;
-;; * From thumbs.el: Add an option for clean-up/max-size functionality
-;;   for thumbnail directory.
-;;
-;; * From thumbs.el: Add setroot function.
-;;
-;; * From thumbs.el: Add image resizing, if useful (tumme's automatic
-;;  "image fit" might be enough)
-;;
-;; * From thumbs.el: Add the "modify" commands (emboss, negate,
-;;   monochrome etc).
-;;
-;; * Asynchronous creation of thumbnails.
-;;
-;; * Add `tumme-display-thumbs-ring' and functions to cycle that.  Find
-;; out which is best, saving old batch just before inserting new, or
-;; saving the current batch in the ring when inserting it.  Adding it
-;; probably needs rewriting `tumme-display-thumbs' to be more general.
-;;
-;; * Find some way of toggling on and off really nice keybindings in
-;; dired (for example, using C-n or <down> instead of C-S-n).  Richard
-;; suggested that we could keep C-t as prefix for tumme commands as it
-;; is currently not used in dired.  He also suggested that
-;; `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.  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.
-;;
-;; * Rewrite `tumme-modify-mark-on-thumb-original-file' to be less
-;; ugly.
-;;
-;; * In some way keep track of buffers and windows and stuff so that
-;; it works as the user expects.
-;;
-;; * More/better documentation
-;;
-;;
-;;; Code:
-
-(require 'dired)
-(require 'format-spec)
-(require 'widget)
-
-(eval-when-compile
-  (require 'wid-edit))
-
-(defgroup tumme nil
-  "Use dired to browse your images as thumbnails, and more."
-  :prefix "tumme-"
-  :group 'multimedia)
-
-(defcustom tumme-dir "~/.emacs.d/tumme/"
-  "Directory where thumbnail images are stored."
-  :type 'string
-  :group 'tumme)
-
-(defcustom tumme-thumbnail-storage 'use-tumme-dir
-  "How to store tumme's thumbnail files.
-Tumme can store thumbnail files in one of two ways and this is
-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.
-\"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 "~/.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 "~/.emacs.d/tumme/.tumme_temp"
-  "Name of temporary image file used by various commands."
-  :type 'string
-  :group 'tumme)
-
-(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."
-  :type 'string
-  :group 'tumme)
-
-(defcustom tumme-gallery-image-root-url
-"http://your.own.server/tummepics"
-  "URL where the full size images are to be found.
-Note that this path has to be configured in your web server.  Tumme
-expects to find pictures in this directory."
-  :type 'string
-  :group 'tumme)
-
-(defcustom tumme-gallery-thumb-image-root-url
-"http://your.own.server/tummethumbs"
-  "URL where the thumbnail images are to be found.
-Note that this path has to be configured in your web server.  Tumme
-expects to find pictures in this directory."
-  :type 'string
-  :group 'tumme)
-
-(defcustom tumme-cmd-create-thumbnail-program
-  "convert"
-  "Executable used to create thumbnail.
-Used together with `tumme-cmd-create-thumbnail-options'."
-  :type 'string
-  :group 'tumme)
-
-(defcustom tumme-cmd-create-thumbnail-options
-  "%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', %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)
-
-(defcustom tumme-cmd-create-temp-image-program
-  "convert"
-  "Executable used to create temporary image.
-Used together with `tumme-cmd-create-temp-image-options'."
-  :type 'string
-  :group 'tumme)
-
-(defcustom tumme-cmd-create-temp-image-options
-  "%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', %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.
-Used together with `tumme-cmd-rotate-thumbnail-options'."
-  :type 'string
-  :group 'tumme)
-
-(defcustom tumme-cmd-rotate-thumbnail-options
-  "%p -rotate %d \"%t\""
-  "Format of command used to rotate thumbnail image.
-Available options are %p which is replaced by
-`tumme-cmd-rotate-thumbnail-program', %d which is replaced by the
-number of (positive) degrees to rotate the image, normally 90 or 270
-\(for 90 degrees right and left), %t which is replaced by the file name
-of the thumbnail file."
-  :type 'string
-  :group 'tumme)
-
-(defcustom tumme-cmd-rotate-original-program
-  "jpegtran"
-  "Executable used to rotate original image.
-Used together with `tumme-cmd-rotate-original-options'."
-  :type 'string
-  :group 'tumme)
-
-(defcustom tumme-cmd-rotate-original-options
-  "%p -rotate %d -copy all -outfile %t \"%o\""
-  "Format of command used to rotate original image.
-Available options are %p which is replaced by
-`tumme-cmd-rotate-original-program', %d which is replaced by the
-number of (positive) degrees to rotate the image, normally 90 or
-270 \(for 90 degrees right and left), %o which is replaced by the
-original image file name and %t which is replaced by
-`tumme-temp-image-file'."
-  :type 'string
-  :group 'tumme)
-
-(defcustom tumme-temp-rotate-image-file
-  "~/.emacs.d/tumme/.tumme_rotate_temp"
-  "Temporary file for rotate operations."
-  :type 'string
-  :group 'tumme)
-
-(defcustom tumme-rotate-original-ask-before-overwrite t
-  "Confirm overwrite of original file after rotate operation.
-If non-nil, ask user for confirmation before overwriting the
-original file with `tumme-temp-rotate-image-file'."
-  :type 'boolean
-  :group 'tumme)
-
-(defcustom tumme-cmd-write-exif-data-program
-  "exiftool"
-  "Program used to write EXIF data to image.
-Used together with `tumme-cmd-write-exif-data-options'."
-  :type 'string
-  :group 'tumme)
-
-(defcustom tumme-cmd-write-exif-data-options
-  "%p -%t=\"%v\" \"%f\""
-  "Format of command used to write EXIF data.
-Available options are %p which is replaced by
-`tumme-cmd-write-exif-data-program', %f which is replaced by the
-image file name, %t which is replaced by the tag name and %v
-which is replaced by the tag value."
-  :type 'string
-  :group 'tumme)
-
-(defcustom tumme-cmd-read-exif-data-program
-  "exiftool"
-  "Program used to read EXIF data to image.
-Used together with `tumme-cmd-read-exif-data-program-options'."
-  :type 'string
-  :group 'tumme)
-
-(defcustom tumme-cmd-read-exif-data-options
-  "%p -s -s -s -%t \"%f\""
-  "Format of command used to read EXIF data.
-Available options are %p which is replaced by
-`tumme-cmd-write-exif-data-options', %f which is replaced
-by the image file name and %t which is replaced by the tag name."
-  :type 'string
-  :group 'tumme)
-
-(defcustom tumme-gallery-hidden-tags
-  (list "private" "hidden" "pending")
-  "List of \"hidden\" tags.
-Used by `tumme-gallery-generate' to leave out \"hidden\" images."
-  :type '(repeat string)
-  :group 'tumme)
-
-(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)
-
-(defcustom tumme-thumb-relief 2
-  "Size of button-like border around thumbnails."
-  :type 'integer
-  :group 'tumme)
-
-(defcustom tumme-thumb-margin 2
-  "Size of the margin around thumbnails.
-This is where you see the cursor."
-  :type 'integer
-  :group 'tumme)
-
-(defcustom tumme-line-up-method 'dynamic
-  "Default method for line-up of thumbnails in thumbnail buffer.
-Used by `tumme-display-thumbs' and other functions that needs to
-line-up thumbnails.  Dynamic means to use the available width of the
-window containing the thumbnail buffer, Fixed means to use
-`tumme-thumbs-per-row', Interactive is for asking the user, and No
-line-up means that no automatic line-up will be done."
-  :type '(choice :tag "Default line-up method"
-                 (const :tag "Dynamic" dynamic)
-		 (const :tag "Fixed" fixed)
-		 (const :tag "Interactive" interactive)
-                 (const :tag "No line-up" none))
-  :group 'tumme)
-
-(defcustom tumme-thumbs-per-row 3
-  "Number of thumbnails to display per row in thumb buffer."
-  :type 'integer
-  :group 'tumme)
-
-(defcustom tumme-display-window-width-correction 1
-  "Number to be used to correct image display window width.
-Change if the default (1) does not work (i.e. if the image does not
-completely fit)."
-  :type 'integer
-  :group 'tumme)
-
-(defcustom tumme-display-window-height-correction 0
-  "Number to be used to correct image display window height.
-Change if the default (0) does not work (i.e. if the image does not
-completely fit)."
-  :type 'integer
-  :group 'tumme)
-
-(defcustom tumme-track-movement t
-  "The current state of the tracking and mirroring.
-For more information, see the documentation for
-`tumme-toggle-movement-tracking'."
-  :type 'boolean
-  :group 'tumme)
-
-(defcustom tumme-append-when-browsing nil
-  "Append thumbnails in thumbnail buffer when browsing.
-If non-nil, using `tumme-next-line-and-display' and
-`tumme-previous-line-and-display' will leave a trail of thumbnail
-images in the thumbnail buffer.  If you enable this and want to clean
-the thumbnail buffer because it is filled with too many thumbmnails,
-just call `tumme-display-thumb' to display only the image at point.
-This value can be toggled using `tumme-toggle-append-browsing'."
-  :type 'boolean
-  :group 'tumme)
-
-(defcustom tumme-dired-disp-props t
-  "If non-nil, display properties for dired file when browsing.
-Used by `tumme-next-line-and-display',
-`tumme-previous-line-and-display' and `tumme-mark-and-display-next'.
-If the database file is large, this can slow down image browsing in
-dired and you might want to turn it off."
-  :type 'boolean
-  :group 'tumme)
-
-(defcustom tumme-display-properties-format "%b: %f (%t): %c"
-  "Display format for thumbnail properties.
-%b is replaced with associated dired buffer name, %f with file name
-\(without path) of original image file, %t with the list of tags and %c
-with the comment."
-  :type 'string
-  :group 'tumme)
-
-(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'."
-  :type 'string
-  :group 'tumme)
-
-(defcustom tumme-main-image-directory "~/pics/"
-  "Name of main image directory, if any.
-Used by `tumme-copy-with-exif-file-name'."
-  :type 'string
-  :group 'tumme)
-
-(defcustom tumme-show-all-from-dir-max-files 50
-  "Maximum number of files to show using `tumme-show-all-from-dir'.
-before warning the user."
-  :type 'integer
-  :group 'tumme)
-
-(defun tumme-dir ()
-  "Return the current thumbnails directory (from variable `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."
-
-  (let ((i `(image :type ,type
-                   :file ,file
-                   :relief ,relief
-                   :margin ,margin)))
-    (insert-image i)))
-
-(defun tumme-get-thumbnail-image (file)
-  "Return the image descriptor for a thumbnail of image file FILE."
-  (unless (string-match (image-file-name-regexp) file)
-    (error "%s is not a valid image file" file))
-  (let ((thumb-file (tumme-thumb-name file)))
-    (unless (and (file-exists-p thumb-file)
-		 (<= (float-time (nth 5 (file-attributes file)))
-		     (float-time (nth 5 (file-attributes thumb-file)))))
-      (tumme-create-thumb file thumb-file))
-    (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)
-  "Insert thumbnail image FILE.
-Add text properties ORIGINAL-FILE-NAME and ASSOCIATED-DIRED-BUFFER."
-  (let (beg end)
-    (setq beg (point))
-    (tumme-insert-image file
-                        ;; 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))
-    (add-text-properties
-     beg end
-     (list 'tumme-thumbnail t
-           'original-file-name original-file-name
-           'associated-dired-buffer associated-dired-buffer
-           'tags (tumme-list-tags original-file-name)
-           'mouse-face 'highlight
-           'comment (tumme-get-comment original-file-name)))))
-
-(defun tumme-thumb-name (file)
-  "Return thumbnail file name for FILE.
-Depending on the value of `tumme-thumbnail-storage', the file
-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.  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* ((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
-           (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 ?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
-                (setq thumbnail-dir (file-name-directory thumbnail-file))))
-      (message "Creating thumbnail directory.")
-      (make-directory thumbnail-dir))
-    (call-process shell-file-name nil nil nil shell-command-switch command)))
-
-;;;###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)
-  (dired-next-line 1)
-  (tumme-display-thumbs
-   t (or tumme-append-when-browsing nil) t)
-  (if tumme-dired-disp-props
-      (tumme-dired-display-properties)))
-
-(defun tumme-previous-line-and-display ()
-  "Move to previous dired line and display thumbnail image."
-  (interactive)
-  (dired-previous-line 1)
-  (tumme-display-thumbs
-   t (or tumme-append-when-browsing nil) t)
-  (if tumme-dired-disp-props
-      (tumme-dired-display-properties)))
-
-(defun tumme-toggle-append-browsing ()
-  "Toggle `tumme-append-when-browsing'."
-  (interactive)
-  (setq tumme-append-when-browsing
-        (not tumme-append-when-browsing))
-  (message "Append browsing %s."
-           (if tumme-append-when-browsing
-               "on"
-             "off")))
-
-(defun tumme-mark-and-display-next ()
-  "Mark current file in dired and display next thumbnail image."
-  (interactive)
-  (dired-mark 1)
-  (tumme-display-thumbs
-   t (or tumme-append-when-browsing nil) t)
-  (if tumme-dired-disp-props
-      (tumme-dired-display-properties)))
-
-(defun tumme-toggle-dired-display-properties ()
-  "Toggle `tumme-dired-disp-props'."
-  (interactive)
-  (setq tumme-dired-disp-props
-        (not tumme-dired-disp-props))
-  (message "Dired display properties %s."
-           (if tumme-dired-disp-props
-               "on"
-             "off")))
-
-(defvar tumme-thumbnail-buffer "*tumme*"
-  "Tumme's thumbnail buffer.")
-
-(defun tumme-create-thumbnail-buffer ()
-  "Create thumb buffer and set `tumme-thumbnail-mode'."
-  (let ((buf (get-buffer-create tumme-thumbnail-buffer)))
-    (with-current-buffer buf
-      (setq buffer-read-only t)
-      (if (not (eq major-mode 'tumme-thumbnail-mode))
-          (tumme-thumbnail-mode)))
-    buf))
-
-(defvar tumme-display-image-buffer "*tumme-display-image*"
-  "Where larger versions of the images are display.")
-
-(defun tumme-create-display-image-buffer ()
-  "Create image display buffer and set `tumme-display-image-mode'."
-  (let ((buf (get-buffer-create tumme-display-image-buffer)))
-    (with-current-buffer buf
-      (setq buffer-read-only t)
-      (if (not (eq major-mode 'tumme-display-image-mode))
-          (tumme-display-image-mode)))
-    buf))
-
-(defvar tumme-saved-window-configuration nil
-  "Saved window configuration.")
-
-;;;###autoload
-(defun tumme-dired-with-window-configuration (dir &optional arg)
-  "Open directory DIR and create a default window configuration.
-
-Convenience command that:
-
- - Opens dired in folder DIR
- - Splits windows in most useful (?) way
- - Set `truncate-lines' to t
-
-After the command has finished, you would typically mark some
-image files in dired and type
-\\[tumme-display-thumbs] (`tumme-display-thumbs').
-
-If called with prefix argument ARG, skip splitting of windows.
-
-The current window configuration is saved and can be restored by
-calling `tumme-restore-window-configuration'."
-  (interactive "DDirectory: \nP")
-  (let ((buf (tumme-create-thumbnail-buffer))
-        (buf2 (tumme-create-display-image-buffer)))
-    (setq tumme-saved-window-configuration
-          (current-window-configuration))
-    (dired dir)
-    (delete-other-windows)
-    (when (not arg)
-      (split-window-horizontally)
-      (setq truncate-lines t)
-      (save-excursion
-        (other-window 1)
-        (switch-to-buffer buf)
-        (split-window-vertically)
-        (other-window 1)
-        (switch-to-buffer buf2)
-        (other-window -2)))))
-
-(defun tumme-restore-window-configuration ()
-  "Restore window configuration.
-Restore any changes to the window configuration made by calling
-`tumme-dired-with-window-configuration'."
-  (interactive)
-  (if tumme-saved-window-configuration
-      (set-window-configuration tumme-saved-window-configuration)
-    (message "No saved window configuration")))
-
-;;;###autoload
-(defun tumme-display-thumbs (&optional arg append do-not-pop)
-  "Display thumbnails of all marked files, in `tumme-thumbnail-buffer'.
-If a thumbnail image does not exist for a file, it is created on the
-fly.  With prefix argument ARG, display only thumbnail for file at
-point (this is useful if you have marked some files but want to show
-another one).
-
-Recommended usage is to split the current frame horizontally so that
-you have the dired buffer in the left window and the
-`tumme-thumbnail-buffer' buffer in the right window.
-
-With optional argument APPEND, append thumbnail to thumbnail buffer
-instead of erasing it first.
-
-Option argument DO-NOT-POP controls if `pop-to-buffer' should be
-used or not.  If non-nil, use `display-buffer' instead of
-`pop-to-buffer'.  This is used from functions like
-`tumme-next-line-and-display' and
-`tumme-previous-line-and-display' where we do not want the
-thumbnail buffer to be selected."
-  (interactive "P")
-  (let ((buf (tumme-create-thumbnail-buffer))
-        curr-file thumb-name files count dired-buf beg)
-    (if arg
-        (setq files (list (dired-get-filename)))
-      (setq files (dired-get-marked-files)))
-    (setq dired-buf (current-buffer))
-    (with-current-buffer buf
-      (let ((inhibit-read-only t))
-        (if (not append)
-            (erase-buffer)
-          (goto-char (point-max)))
-        (mapcar
-         (lambda (curr-file)
-           (setq thumb-name (tumme-thumb-name curr-file))
-           (if (and (not (file-exists-p thumb-name))
-                    (not (= 0 (tumme-create-thumb curr-file thumb-name))))
-               (message "Thumb could not be created for file %s" curr-file)
-             (tumme-insert-thumbnail thumb-name curr-file dired-buf)))
-         files))
-      (cond ((eq 'dynamic tumme-line-up-method)
-             (tumme-line-up-dynamic))
-            ((eq 'fixed tumme-line-up-method)
-             (tumme-line-up))
-            ((eq 'interactive tumme-line-up-method)
-             (tumme-line-up-interactive))
-            ((eq 'none tumme-line-up-method)
-             nil)
-            (t
-             (tumme-line-up-dynamic))))
-    (if do-not-pop
-        (display-buffer tumme-thumbnail-buffer)
-      (pop-to-buffer tumme-thumbnail-buffer))))
-
-;;;###autoload
-(defun tumme-show-all-from-dir (dir)
-  "Make a preview buffer for all images in DIR and display it.
-If the number of files in DIR matching `image-file-name-regexp'
-exceeds `tumme-show-all-from-dir-max-files', a warning will be
-displayed."
-  (interactive "DDir: ")
-  (dired dir)
-  (dired-mark-files-regexp (image-file-name-regexp))
-  (let ((files (dired-get-marked-files)))
-    (if (or (<= (length files) tumme-show-all-from-dir-max-files)
-            (and (> (length files) tumme-show-all-from-dir-max-files)
-                 (y-or-n-p
-                  (format
-                   "Directory contains more than %d image files.  Proceed? "
-                   tumme-show-all-from-dir-max-files))))
-        (progn
-          (tumme-display-thumbs)
-          (pop-to-buffer tumme-thumbnail-buffer))
-      (message "Cancelled."))))
-
-;;;###autoload
-(defalias 'tumme 'tumme-show-all-from-dir)
-
-(defun tumme-write-tags (file-tags)
-  "Write file tags to database.
-Write each file and tag in FILE-TAGS to the database.  FILE-TAGS
-is an alist in the following form:
- ((FILE . TAG) ... )"
-  (let (end file tag)
-    (with-temp-file tumme-db-file
-      (insert-file-contents tumme-db-file)
-      (dolist (elt file-tags)
-	(setq file (car elt)
-	      tag (cdr elt))
-	(goto-char (point-min))
-	(if (search-forward-regexp (format "^%s.*$" file) nil t)
-	    (progn
-	      (setq end (point))
-	      (beginning-of-line)
-	      (when (not (search-forward (format ";%s" tag) end t))
-		(end-of-line)
-		(insert (format ";%s" tag))))
-	  (goto-char (point-max))
-	  (insert (format "\n%s;%s" file tag)))))))
-
-(defun tumme-remove-tag (files tag)
-  "For all FILES, remove TAG from the image database."
-  (save-excursion
-    (let (end buf start)
-      (setq buf (find-file tumme-db-file))
-      (if (not (listp files))
-          (if (stringp files)
-              (setq files (list files))
-            (error "Files must be a string or a list of strings!")))
-      (mapcar
-       (lambda (file)
-         (goto-char (point-min))
-         (when (search-forward-regexp
-                (format "^%s" file) nil t)
-           (end-of-line)
-           (setq end (point))
-           (beginning-of-line)
-           (when (search-forward-regexp (format "\\(;%s\\)" tag) end t)
-             (delete-region (match-beginning 1) (match-end 1))
-             ;; Check if file should still be in the database. If
-             ;; it has no tags or comments, it will be removed.
-             (end-of-line)
-             (setq end (point))
-             (beginning-of-line)
-             (when (not (search-forward ";" end t))
-               (kill-line 1)
-               ;; If on empty line at end of buffer
-               (when (and (eobp)
-                          (looking-at "^$"))
-                 (delete-backward-char 1))))))
-       files)
-      (save-buffer)
-      (kill-buffer buf))))
-
-(defun tumme-list-tags (file)
-  "Read all tags for image FILE from the image database."
-  (save-excursion
-    (let (end buf (tags ""))
-      (setq buf (find-file tumme-db-file))
-      (goto-char (point-min))
-      (when (search-forward-regexp
-             (format "^%s" file) nil t)
-        (end-of-line)
-        (setq end (point))
-        (beginning-of-line)
-        (if (search-forward ";" end t)
-            (if (search-forward "comment:" end t)
-                (if (search-forward ";" end t)
-                    (setq tags (buffer-substring (point) end)))
-              (setq tags (buffer-substring (point) end)))))
-      (kill-buffer buf)
-      (split-string tags ";"))))
-
-;;;###autoload
-(defun tumme-tag-files (arg)
-  "Tag marked file(s) in dired.  With prefix ARG, tag file at point."
-  (interactive "P")
-  (let ((tag (read-string "Tags to add (separate tags with a semicolon): "))
-        curr-file files)
-    (if arg
-        (setq files (list (dired-get-filename)))
-      (setq files (dired-get-marked-files)))
-    (tumme-write-tags
-     (mapcar
-      (lambda (x)
-        (cons x tag))
-      files))))
-
-(defun tumme-tag-thumbnail ()
-  "Tag current thumbnail."
-  (interactive)
-  (let ((tag (read-string "Tags to add (separate tags with a semicolon): ")))
-    (tumme-write-tags (list (cons (tumme-original-file-name) tag))))
-  (tumme-update-property
-   'tags (tumme-list-tags (tumme-original-file-name))))
-
-;;;###autoload
-(defun tumme-delete-tag (arg)
-  "Remove tag for selected file(s).
-With prefix argument ARG, remove tag from file at point."
-  (interactive "P")
-  (let ((tag (read-string "Tag to remove: "))
-        files)
-    (if arg
-        (setq files (list (dired-get-filename)))
-      (setq files (dired-get-marked-files)))
-    (tumme-remove-tag files tag)))
-
-(defun tumme-tag-thumbnail-remove ()
-  "Remove tag from thumbnail."
-  (interactive)
-  (let ((tag (read-string "Tag to remove: ")))
-    (tumme-remove-tag (tumme-original-file-name) tag))
-  (tumme-update-property
-   'tags (tumme-list-tags (tumme-original-file-name))))
-
-(defun tumme-original-file-name ()
-  "Get original file name for thumbnail or display image at point."
-  (get-text-property (point) 'original-file-name))
-
-(defun tumme-associated-dired-buffer ()
-  "Get associated dired buffer at point."
-  (get-text-property (point) 'associated-dired-buffer))
-
-(defun tumme-get-buffer-window (buf)
-  "Return window where buffer BUF is."
-  (get-window-with-predicate
-   (lambda (window)
-     (equal (window-buffer window) buf))
-   nil t))
-
-(defun tumme-track-original-file ()
-  "Track the original file in the associated dired buffer.
-See documentation for `tumme-toggle-movement-tracking'.  Interactive
-use only useful if `tumme-track-movement' is nil."
-  (interactive)
-  (let ((old-buf (current-buffer))
-        (dired-buf (tumme-associated-dired-buffer))
-        (file-name (tumme-original-file-name)))
-    (when (and (buffer-live-p dired-buf) file-name)
-      (setq file-name (file-name-nondirectory file-name))
-      (set-buffer dired-buf)
-      (goto-char (point-min))
-      (if (not (search-forward file-name nil t))
-          (message "Could not track file")
-        (dired-move-to-filename)
-        (set-window-point
-         (tumme-get-buffer-window dired-buf) (point)))
-      (set-buffer old-buf))))
-
-(defun tumme-toggle-movement-tracking ()
-  "Turn on and off `tumme-track-movement'.
-Tracking of the movements between thumbnail and dired buffer so that
-they are \"mirrored\" in the dired buffer.  When this is on, moving
-around in the thumbnail or dired buffer will find the matching
-position in the other buffer."
-  (interactive)
-  (setq tumme-track-movement (not tumme-track-movement))
-  (message "Tracking %s" (if tumme-track-movement "on" "off")))
-
-(defun tumme-track-thumbnail ()
-  "Track current dired file's thumb in `tumme-thumbnail-buffer'.
-This is almost the same as what `tumme-track-original-file' does, but
-the other way around."
-  (let ((file (dired-get-filename))
-        (old-buf (current-buffer))
-        prop-val found)
-    (when (get-buffer tumme-thumbnail-buffer)
-      (set-buffer tumme-thumbnail-buffer)
-      (goto-char (point-min))
-      (while (and (not (eobp))
-                  (not found))
-        (if (and (setq prop-val
-                       (get-text-property (point) 'original-file-name))
-                 (string= prop-val file))
-            (setq found t))
-        (if (not found)
-            (forward-char 1)))
-      (when found
-        (set-window-point
-         (tumme-thumbnail-window) (point))
-        (tumme-display-thumb-properties))
-      (set-buffer old-buf))))
-
-(defun tumme-dired-next-line (&optional arg)
-  "Call `dired-next-line', then track thumbnail.
-This can safely replace `dired-next-line'.  With prefix argument, move
-ARG lines."
-  (interactive "P")
-  (dired-next-line (or arg 1))
-  (if tumme-track-movement
-      (tumme-track-thumbnail)))
-
-(defun tumme-dired-previous-line (&optional arg)
-  "Call `dired-previous-line', then track thumbnail.
-This can safely replace `dired-previous-line'.  With prefix argument,
-move ARG lines."
-  (interactive "P")
-  (dired-previous-line (or arg 1))
-  (if tumme-track-movement
-      (tumme-track-thumbnail)))
-
-(defun tumme-forward-image (&optional arg)
-  "Move to next image and display properties.
-Optional prefix ARG says how many images to move; default is one
-image."
-  (interactive "p")
-  (let (pos (steps (or arg 1)))
-    (dotimes (i steps)
-      (if (and (not (eobp))
-               (save-excursion
-                 (forward-char)
-                 (while (and (not (eobp))
-                             (not (tumme-image-at-point-p)))
-                   (forward-char))
-                 (setq pos (point))
-                 (tumme-image-at-point-p)))
-          (goto-char pos)
-        (error "At last image"))))
-  (when tumme-track-movement
-    (tumme-track-original-file))
-  (tumme-display-thumb-properties))
-
-(defun tumme-backward-image (&optional arg)
-  "Move to previous image and display properties.
-Optional prefix ARG says how many images to move; default is one
-image."
-  (interactive "p")
-  (let (pos (steps (or arg 1)))
-    (dotimes (i steps)
-      (if (and (not (bobp))
-               (save-excursion
-                 (backward-char)
-                 (while (and (not (bobp))
-                             (not (tumme-image-at-point-p)))
-                   (backward-char))
-                 (setq pos (point))
-                 (tumme-image-at-point-p)))
-          (goto-char pos)
-        (error "At first image"))))
-  (when tumme-track-movement
-    (tumme-track-original-file))
-  (tumme-display-thumb-properties))
-
-(defun tumme-next-line ()
-  "Move to next line and display properties."
-  (interactive)
-  (next-line 1)
-  ;; If we end up in an empty spot, back up to the next thumbnail.
-  (if (not (tumme-image-at-point-p))
-      (tumme-backward-image))
-  (if tumme-track-movement
-      (tumme-track-original-file))
-  (tumme-display-thumb-properties))
-
-
-(defun tumme-previous-line ()
-  "Move to previous line and display properties."
-  (interactive)
-  (previous-line 1)
-  ;; If we end up in an empty spot, back up to the next
-  ;; thumbnail. This should only happen if the user deleted a
-  ;; thumbnail and did not refresh, so it is not very common. But we
-  ;; can handle it in a good manner, so why not?
-  (if (not (tumme-image-at-point-p))
-      (tumme-backward-image))
-  (if tumme-track-movement
-      (tumme-track-original-file))
-  (tumme-display-thumb-properties))
-
-(defun tumme-format-properties-string (buf file props comment)
-  "Format display properties.
-BUF is the associated dired buffer, FILE is the original image file
-name, PROPS is a list of tags and COMMENT is the image files's
-comment."
-  (format-spec
-   tumme-display-properties-format
-   (list
-    (cons ?b (or buf ""))
-    (cons ?f file)
-    (cons ?t (or (princ props) ""))
-    (cons ?c (or comment "")))))
-
-(defun tumme-display-thumb-properties ()
-  "Display thumbnail properties in the echo area."
-  (if (not (eobp))
-      (let ((file-name (file-name-nondirectory (tumme-original-file-name)))
-            (dired-buf (buffer-name (tumme-associated-dired-buffer)))
-            (props (mapconcat
-                    'princ
-                    (get-text-property (point) 'tags)
-                    ", "))
-            (comment (get-text-property (point) 'comment)))
-        (if file-name
-            (message
-             (tumme-format-properties-string
-              dired-buf
-              file-name
-              props
-              comment))))))
-
-(defun tumme-dired-file-marked-p ()
-  "Check whether file on current line is marked or not."
-  (save-excursion
-    (beginning-of-line)
-    (not (looking-at "^ .*$"))))
-
-(defun tumme-modify-mark-on-thumb-original-file (command)
-  "Modify mark in dired buffer.
-This is quite ugly but I don't know how to implemented in a better
-way.  COMMAND is one of 'mark for marking file in dired, 'unmark for
-unmarking file in dired or 'flag for flagging file for delete in
-dired."
-  (let ((file-name (tumme-original-file-name))
-        (dired-buf (tumme-associated-dired-buffer)))
-    (if (not (and dired-buf file-name))
-        (message "No image, or image with correct properties, at point.")
-    (with-current-buffer dired-buf
-        (message file-name)
-        (setq file-name (file-name-nondirectory file-name))
-        (goto-char (point-min))
-        (if (search-forward file-name nil t)
-            (cond ((eq command 'mark) (dired-mark 1))
-                  ((eq command 'unmark) (dired-unmark 1))
-                  ((eq command 'toggle)
-                   (if (tumme-dired-file-marked-p)
-                       (dired-unmark 1)
-                     (dired-mark 1)))
-                  ((eq command 'flag) (dired-flag-file-deletion 1))))))))
-
-(defun tumme-mark-thumb-original-file ()
-  "Mark original image file in associated dired buffer."
-  (interactive)
-  (tumme-modify-mark-on-thumb-original-file 'mark)
-  (tumme-forward-image))
-
-(defun tumme-unmark-thumb-original-file ()
-  "Unmark original image file in associated dired buffer."
-  (interactive)
-  (tumme-modify-mark-on-thumb-original-file 'unmark)
-  (tumme-forward-image))
-
-(defun tumme-flag-thumb-original-file ()
-  "Flag original image file for deletion in associated dired buffer."
-  (interactive)
-  (tumme-modify-mark-on-thumb-original-file 'flag)
-  (tumme-forward-image))
-
-(defun tumme-toggle-mark-thumb-original-file ()
-  "Toggle mark on original image file in associated dired buffer."
-  (interactive)
-  (tumme-modify-mark-on-thumb-original-file 'toggle))
-
-(defun tumme-jump-original-dired-buffer ()
-  "Jump to the dired buffer associated with the current image file.
-You probably want to use this together with
-`tumme-track-original-file'."
-  (interactive)
-  (let ((buf (tumme-associated-dired-buffer))
-        window frame)
-    (setq window (tumme-get-buffer-window buf))
-    (if window
-        (progn
-          (if (not (equal (selected-frame) (setq frame (window-frame window))))
-              (select-frame-set-input-focus frame))
-          (select-window window))
-      (message "Associated dired buffer not visible"))))
-
-;;;###autoload
-(defun tumme-jump-thumbnail-buffer ()
-  "Jump to thumbnail buffer."
-  (interactive)
-  (let ((window (tumme-thumbnail-window))
-        frame)
-    (if window
-        (progn
-          (if (not (equal (selected-frame) (setq frame (window-frame window))))
-              (select-frame-set-input-focus frame))
-          (select-window window))
-      (message "Thumbnail buffer not visible"))))
-
-(defvar tumme-thumbnail-mode-map (make-sparse-keymap)
-  "Keymap for `tumme-thumbnail-mode'.")
-
-(defvar tumme-thumbnail-mode-line-up-map (make-sparse-keymap)
-  "Keymap for line-up commands in `tumme-thumbnail-mode'.")
-
-(defvar tumme-thumbnail-mode-tag-map (make-sparse-keymap)
-  "Keymap for tag commands in `tumme-thumbnail-mode'.")
-
-(defun tumme-define-thumbnail-mode-keymap ()
-  "Define keymap for `tumme-thumbnail-mode'."
-
-  ;; Keys
-  (define-key tumme-thumbnail-mode-map [right] 'tumme-forward-image)
-  (define-key tumme-thumbnail-mode-map [left] 'tumme-backward-image)
-  (define-key tumme-thumbnail-mode-map [up] 'tumme-previous-line)
-  (define-key tumme-thumbnail-mode-map [down] 'tumme-next-line)
-  (define-key tumme-thumbnail-mode-map "\C-f" 'tumme-forward-image)
-  (define-key tumme-thumbnail-mode-map "\C-b" 'tumme-backward-image)
-  (define-key tumme-thumbnail-mode-map "\C-p" 'tumme-previous-line)
-  (define-key tumme-thumbnail-mode-map "\C-n" 'tumme-next-line)
-
-  (define-key tumme-thumbnail-mode-map "d" 'tumme-flag-thumb-original-file)
-  (define-key tumme-thumbnail-mode-map [delete]
-    'tumme-flag-thumb-original-file)
-  (define-key tumme-thumbnail-mode-map "m" 'tumme-mark-thumb-original-file)
-  (define-key tumme-thumbnail-mode-map "u" 'tumme-unmark-thumb-original-file)
-  (define-key tumme-thumbnail-mode-map "." 'tumme-track-original-file)
-  (define-key tumme-thumbnail-mode-map [tab] 'tumme-jump-original-dired-buffer)
-
-  ;; add line-up map
-  (define-key tumme-thumbnail-mode-map "g" tumme-thumbnail-mode-line-up-map)
-
-  ;; map it to "g" so that the user can press it more quickly
-  (define-key tumme-thumbnail-mode-line-up-map "g" 'tumme-line-up-dynamic)
-  ;; "f" for "fixed" number of thumbs per row
-  (define-key tumme-thumbnail-mode-line-up-map "f" 'tumme-line-up)
-  ;; "i" for "interactive"
-  (define-key tumme-thumbnail-mode-line-up-map "i" 'tumme-line-up-interactive)
-
-  ;; add tag map
-  (define-key tumme-thumbnail-mode-map "t" tumme-thumbnail-mode-tag-map)
-
-  ;; map it to "t" so that the user can press it more quickly
-  (define-key tumme-thumbnail-mode-tag-map "t" 'tumme-tag-thumbnail)
-  ;; "r" for "remove"
-  (define-key tumme-thumbnail-mode-tag-map "r" 'tumme-tag-thumbnail-remove)
-
-  (define-key tumme-thumbnail-mode-map "\C-m"
-    'tumme-display-thumbnail-original-image)
-  (define-key tumme-thumbnail-mode-map [C-return]
-    'tumme-thumbnail-display-external)
-
-  (define-key tumme-thumbnail-mode-map "l" 'tumme-rotate-thumbnail-left)
-  (define-key tumme-thumbnail-mode-map "r" 'tumme-rotate-thumbnail-right)
-
-  (define-key tumme-thumbnail-mode-map "L" 'tumme-rotate-original-left)
-  (define-key tumme-thumbnail-mode-map "R" 'tumme-rotate-original-right)
-
-  (define-key tumme-thumbnail-mode-map "D"
-    'tumme-thumbnail-set-image-description)
-
-  (define-key tumme-thumbnail-mode-map "\C-d" 'tumme-delete-char)
-  (define-key tumme-thumbnail-mode-map " "
-    'tumme-display-next-thumbnail-original)
-  (define-key tumme-thumbnail-mode-map
-    (kbd "DEL") 'tumme-display-previous-thumbnail-original)
-  (define-key tumme-thumbnail-mode-map "c" 'tumme-comment-thumbnail)
-  (define-key tumme-thumbnail-mode-map "q" 'tumme-kill-buffer-and-window)
-
-  ;; Mouse
-  (define-key tumme-thumbnail-mode-map [mouse-2] 'tumme-mouse-display-image)
-  (define-key tumme-thumbnail-mode-map [mouse-1] 'tumme-mouse-select-thumbnail)
-
-  ;; Seems I must first set C-down-mouse-1 to undefined, or else it
-  ;; will trigger the buffer menu. If I try to instead bind
-  ;; C-down-mouse-1 to `tumme-mouse-toggle-mark', I get a message
-  ;; about C-mouse-1 not being defined afterwards. Annoying, but I
-  ;; probably do not completely understand mouse events.
-
-  (define-key tumme-thumbnail-mode-map [C-down-mouse-1] 'undefined)
-  (define-key tumme-thumbnail-mode-map [C-mouse-1] 'tumme-mouse-toggle-mark)
-
-  ;; Menu
-  (define-key tumme-thumbnail-mode-map [menu-bar tumme]
-    (cons "Tumme" (make-sparse-keymap "Tumme")))
-
-  (define-key tumme-thumbnail-mode-map
-    [menu-bar tumme tumme-kill-buffer-and-window]
-    '("Quit" . tumme-kill-buffer-and-window))
-
-  (define-key tumme-thumbnail-mode-map
-    [menu-bar tumme tumme-delete-char]
-    '("Delete thumbnail from buffer" . tumme-delete-char))
-
-  (define-key tumme-thumbnail-mode-map
-    [menu-bar tumme tumme-tag-thumbnail-remove]
-    '("Remove tag from thumbnail" . tumme-tag-thumbnail-remove))
-
-  (define-key tumme-thumbnail-mode-map
-    [menu-bar tumme tumme-tag-thumbnail]
-    '("Tag thumbnail" . tumme-tag-thumbnail))
-
-  (define-key tumme-thumbnail-mode-map
-    [menu-bar tumme tumme-comment-thumbnail]
-    '("Comment thumbnail" . tumme-comment-thumbnail))
-
-  (define-key tumme-thumbnail-mode-map
-    [menu-bar tumme tumme-refresh-thumb]
-    '("Refresh thumb" . tumme-refresh-thumb))
-  (define-key tumme-thumbnail-mode-map
-    [menu-bar tumme tumme-line-up-dynamic]
-    '("Dynamic line up" . tumme-line-up-dynamic))
-  (define-key tumme-thumbnail-mode-map
-    [menu-bar tumme tumme-line-up]
-    '("Line up thumbnails" . tumme-line-up))
-
-  (define-key tumme-thumbnail-mode-map
-    [menu-bar tumme tumme-rotate-thumbnail-left]
-    '("Rotate thumbnail left" . tumme-rotate-thumbnail-left))
-  (define-key tumme-thumbnail-mode-map
-    [menu-bar tumme tumme-rotate-thumbnail-right]
-    '("Rotate thumbnail right" . tumme-rotate-thumbnail-right))
-
-  (define-key tumme-thumbnail-mode-map
-    [menu-bar tumme tumme-rotate-original-left]
-    '("Rotate original left" . tumme-rotate-original-left))
-  (define-key tumme-thumbnail-mode-map
-    [menu-bar tumme tumme-rotate-original-right]
-    '("Rotate original right" . tumme-rotate-original-right))
-
-  (define-key tumme-thumbnail-mode-map
-    [menu-bar tumme tumme-toggle-movement-tracking]
-    '("Toggle movement tracking on/off" . tumme-toggle-movement-tracking))
-
-  (define-key tumme-thumbnail-mode-map
-    [menu-bar tumme tumme-jump-original-dired-buffer]
-    '("Jump to dired buffer" . tumme-jump-original-dired-buffer))
-  (define-key tumme-thumbnail-mode-map
-    [menu-bar tumme tumme-track-original-file]
-    '("Track original" . tumme-track-original-file))
-
-  (define-key tumme-thumbnail-mode-map
-    [menu-bar tumme tumme-flag-thumb-original-file]
-    '("Flag original for deletion" . tumme-flag-thumb-original-file))
-  (define-key tumme-thumbnail-mode-map
-    [menu-bar tumme tumme-unmark-thumb-original-file]
-    '("Unmark original" . tumme-unmark-thumb-original-file))
-  (define-key tumme-thumbnail-mode-map
-    [menu-bar tumme tumme-mark-thumb-original-file]
-    '("Mark original" . tumme-mark-thumb-original-file))
-
-  (define-key tumme-thumbnail-mode-map
-    [menu-bar tumme tumme-thumbnail-display-external]
-    '("Display in external viewer" . tumme-thumbnail-display-external))
-  (define-key tumme-thumbnail-mode-map
-    [menu-bar tumme tumme-display-thumbnail-original-image]
-    '("Display image" . tumme-display-thumbnail-original-image)))
-
-(defvar tumme-display-image-mode-map (make-sparse-keymap)
-  "Keymap for `tumme-display-image-mode'.")
-
-(defun tumme-define-display-image-mode-keymap ()
-  "Define keymap for `tumme-display-image-mode'."
-
-  ;; Keys
-  (define-key tumme-display-image-mode-map "q" 'tumme-kill-buffer-and-window)
-
-  (define-key tumme-display-image-mode-map "f"
-    'tumme-display-current-image-full)
-
-  (define-key tumme-display-image-mode-map "s"
-    'tumme-display-current-image-sized)
-
-  ;; Menu
-  (define-key tumme-display-image-mode-map [menu-bar tumme]
-    (cons "Tumme" (make-sparse-keymap "Tumme")))
-
-  (define-key tumme-display-image-mode-map
-    [menu-bar tumme tumme-kill-buffer-and-window]
-    '("Quit" . tumme-kill-buffer-and-window))
-
-  (define-key tumme-display-image-mode-map
-    [menu-bar tumme tumme-display-current-image-sized]
-    '("Display original, sized to fit" . tumme-display-current-image-sized))
-
-  (define-key tumme-display-image-mode-map
-    [menu-bar tumme tumme-display-current-image-full]
-    '("Display original, full size" . tumme-display-current-image-full))
-
-  )
-
-(defun tumme-display-current-image-full ()
-  "Display current image in full size."
-  (interactive)
-  (let ((file (tumme-original-file-name)))
-    (if file
-        (progn
-          (tumme-display-image file t)
-          (message "Full size image displayed"))
-      (error "No original file name at point"))))
-
-(defun tumme-display-current-image-sized ()
-  "Display current image in sized to fit window dimensions."
-  (interactive)
-  (let ((file (tumme-original-file-name)))
-    (if file
-        (progn
-          (tumme-display-image file)
-          (message "Full size image displayed"))
-      (error "No original file name at point"))))
-
-(define-derived-mode tumme-thumbnail-mode
-  fundamental-mode "tumme-thumbnail"
-  "Browse and manipulate thumbnail images using dired.
-Use `tumme-dired' and `tumme-setup-dired-keybindings' to get a
-nice setup to start with."
-  (tumme-define-thumbnail-mode-keymap)
-  (message "tumme-thumbnail-mode enabled"))
-
-(define-derived-mode tumme-display-image-mode
-  fundamental-mode "tumme-image-display"
-  "Mode for displaying and manipulating original image.
-Resized or in full-size."
-  (tumme-define-display-image-mode-keymap)
-  (message "tumme-display-image-mode enabled"))
-
-;;;###autoload
-(defun tumme-setup-dired-keybindings ()
-  "Setup easy-to-use keybindings for the commands to be used in dired mode.
-Note that n, p and <down> and <up> will be hijacked and bound to
-`tumme-dired-x-line'."
-  (interactive)
-
-  ;; Hijack previous and next line movement. Let C-p and C-b be
-  ;; though...
-
-  (define-key dired-mode-map "p" 'tumme-dired-previous-line)
-  (define-key dired-mode-map "n" 'tumme-dired-next-line)
-  (define-key dired-mode-map [up] 'tumme-dired-previous-line)
-  (define-key dired-mode-map [down] 'tumme-dired-next-line)
-
-  (define-key dired-mode-map (kbd "C-S-n") 'tumme-next-line-and-display)
-  (define-key dired-mode-map (kbd "C-S-p") 'tumme-previous-line-and-display)
-  (define-key dired-mode-map (kbd "C-S-m") 'tumme-mark-and-display-next)
-
-  (define-key dired-mode-map "\C-td" 'tumme-display-thumbs)
-  (define-key dired-mode-map "\C-tt" 'tumme-tag-files)
-  (define-key dired-mode-map "\C-tr" 'tumme-delete-tag)
-  (define-key dired-mode-map [tab] 'tumme-jump-thumbnail-buffer)
-  (define-key dired-mode-map "\C-ti" 'tumme-dired-display-image)
-  (define-key dired-mode-map "\C-tx" 'tumme-dired-display-external)
-  (define-key dired-mode-map "\C-ta" 'tumme-display-thumbs-append)
-  (define-key dired-mode-map "\C-t." 'tumme-display-thumb)
-  (define-key dired-mode-map "\C-tc" 'tumme-dired-comment-files)
-  (define-key dired-mode-map "\C-tf" 'tumme-mark-tagged-files)
-
-  ;; Menu for dired
-  (define-key dired-mode-map [menu-bar tumme]
-    (cons "Tumme" (make-sparse-keymap "Tumme")))
-
-  (define-key dired-mode-map [menu-bar tumme tumme-copy-with-exif-file-name]
-    '("Copy with EXIF file name" . tumme-copy-with-exif-file-name))
-
-  (define-key dired-mode-map [menu-bar tumme tumme-dired-comment-files]
-    '("Comment files" . tumme-dired-comment-files))
-
-  (define-key dired-mode-map [menu-bar tumme tumme-mark-tagged-files]
-    '("Mark tagged files" . tumme-mark-tagged-files))
-
-  (define-key dired-mode-map [menu-bar tumme tumme-delete-tag]
-    '("Remove tag from files" . tumme-delete-tag))
-
-  (define-key dired-mode-map [menu-bar tumme tumme-tag-files]
-    '("Tag files" . tumme-tag-files))
-
-  (define-key dired-mode-map [menu-bar tumme tumme-jump-thumbnail-buffer]
-    '("Jump to thumbnail buffer" . tumme-jump-thumbnail-buffer))
-
-  (define-key dired-mode-map [menu-bar tumme tumme-toggle-movement-tracking]
-    '("Toggle movement tracking" . tumme-toggle-movement-tracking))
-
-  (define-key dired-mode-map
-    [menu-bar tumme tumme-toggle-append-browsing]
-    '("Toggle append browsing" . tumme-toggle-append-browsing))
-
-  (define-key dired-mode-map
-    [menu-bar tumme tumme-toggle-disp-props]
-    '("Toggle display properties" . tumme-toggle-dired-display-properties))
-
-  (define-key dired-mode-map
-    [menu-bar tumme tumme-dired-display-external]
-    '("Display in external viewer" . tumme-dired-display-external))
-  (define-key dired-mode-map
-    [menu-bar tumme tumme-dired-display-image]
-    '("Display image" . tumme-dired-display-image))
-  (define-key dired-mode-map
-    [menu-bar tumme tumme-display-thumb]
-    '("Display this thumbnail" . tumme-display-thumb))
-  (define-key dired-mode-map
-    [menu-bar tumme tumme-display-thumbs-append]
-    '("Display thumbnails append" . tumme-display-thumbs-append))
-  (define-key dired-mode-map
-    [menu-bar tumme tumme-display-thumbs]
-    '("Display thumbnails" . tumme-display-thumbs))
-
-  (define-key dired-mode-map
-    [menu-bar tumme tumme-create-thumbs]
-    '("Create thumbnails for marked files" . tumme-create-thumbs))
-
-  (define-key dired-mode-map
-    [menu-bar tumme tumme-mark-and-display-next]
-    '("Mark and display next" . tumme-mark-and-display-next))
-  (define-key dired-mode-map
-    [menu-bar tumme tumme-previous-line-and-display]
-    '("Display thumb for previous file" . tumme-previous-line-and-display))
-  (define-key dired-mode-map
-    [menu-bar tumme tumme-next-line-and-display]
-    '("Display thumb for next file" . tumme-next-line-and-display)))
-
-(defun tumme-create-thumbs (&optional arg)
-  "Create thumbnail images for all marked files in dired.
-With prefix argument ARG, create thumbnails even if they already exist
-\(i.e.  use this to refresh your thumbnails)."
-  (interactive "P")
-  (let (curr-file thumb-name files count)
-    (setq files (dired-get-marked-files))
-    (mapcar
-     (lambda (curr-file)
-       (setq thumb-name (tumme-thumb-name curr-file))
-       ;; If the user overrides the exist check, we must clear the
-       ;; image cache so that if the user wants to display the
-       ;; thumnail, it is not fetched from cache.
-       (if arg
-           (clear-image-cache))
-       (if (or (not (file-exists-p thumb-name))
-               arg)
-           (if (not (= 0 (tumme-create-thumb curr-file
-                                             (tumme-thumb-name curr-file))))
-               (error "Thumb could not be created"))))
-     files)))
-
-(defvar tumme-slideshow-timer nil
-  "Slideshow timer.")
-
-(defvar tumme-slideshow-count 0
-  "Keeping track on number of images in slideshow.")
-
-(defvar tumme-slideshow-times 0
-  "Number of pictures to display in slideshow.")
-
-(defun tumme-slideshow-step ()
-  "Step to next file, if `tumme-slideshow-times' has not been reached."
-  (if (< tumme-slideshow-count tumme-slideshow-times)
-      (progn
-        (message "%s" (1+ tumme-slideshow-count))
-        (setq tumme-slideshow-count (1+ tumme-slideshow-count))
-        (tumme-next-line-and-display))
-    (tumme-slideshow-stop)))
-
-(defun tumme-slideshow-start ()
-  "Start slideshow.
-Ask user for number of images to show and the delay in between."
-  (interactive)
-  (setq tumme-slideshow-count 0)
-  (setq tumme-slideshow-times (string-to-number (read-string "How many: ")))
-  (let ((repeat (string-to-number
-                 (read-string
-                  "Delay, in seconds. Decimals are accepted : " "1"))))
-    (setq tumme-slideshow-timer
-          (run-with-timer
-           0 repeat
-           'tumme-slideshow-step))))
-
-(defun tumme-slideshow-stop ()
-  "Cancel slideshow."
-  (interactive)
-  (cancel-timer tumme-slideshow-timer))
-
-(defun tumme-delete-char ()
-  "Remove current thumbnail from thumbnail buffer and line up."
-  (interactive)
-  (let ((inhibit-read-only t))
-    (delete-char 1)
-    (if (looking-at " ")
-        (delete-char 1))))
-
-;;;###autoload
-(defun tumme-display-thumbs-append ()
-  "Append thumbnails to `tumme-thumbnail-buffer'."
-  (interactive)
-  (tumme-display-thumbs nil t t))
-
-;;;###autoload
-(defun tumme-display-thumb ()
-  "Shorthand for `tumme-display-thumbs' with prefix argument."
-  (interactive)
-  (tumme-display-thumbs t nil t))
-
-(defun tumme-line-up ()
-  "Line up thumbnails according to `tumme-thumbs-per-row'.
-See also `tumme-line-up-dynamic'."
-  (interactive)
-  (let ((inhibit-read-only t))
-    (goto-char (point-min))
-    (while (and (not (tumme-image-at-point-p))
-                (not (eobp)))
-      (delete-char 1))
-    (while (not (eobp))
-      (forward-char)
-      (while (and (not (tumme-image-at-point-p))
-                  (not (eobp)))
-        (delete-char 1)))
-    (goto-char (point-min))
-    (let ((count 0))
-      (while (not (eobp))
-        (forward-char)
-        (if (= tumme-thumbs-per-row 1)
-            (insert "\n")
-          (insert " ")
-          (setq count (1+ count))
-          (when (and (= count (- tumme-thumbs-per-row 1))
-		     (not (eobp)))
-            (forward-char)
-            (insert "\n")
-            (setq count 0)))))
-    (goto-char (point-min))))
-
-(defun tumme-line-up-dynamic ()
-  "Line up thumbnails images dynamically.
-Calculate how many thumbnails fit."
-  (interactive)
-  (let* ((char-width (frame-char-width))
-        (width (tumme-window-width-pixels (tumme-thumbnail-window)))
-        (tumme-thumbs-per-row
-         (/ width
-            (+ (* 2 tumme-thumb-relief)
-               (* 2 tumme-thumb-margin)
-               tumme-thumb-width char-width))))
-    (tumme-line-up)))
-
-(defun tumme-line-up-interactive ()
-  "Line up thumbnails interactively.
-Ask user how many thumbnails should be displayed per row."
-  (interactive)
-  (let ((tumme-thumbs-per-row
-         (string-to-number (read-string "How many thumbs per row: "))))
-    (if (not (> tumme-thumbs-per-row 0))
-        (message "Number must be greater than 0")
-      (tumme-line-up))))
-
-(defun tumme-thumbnail-display-external ()
-  "Display original image for thumbnail at point using external viewer."
-  (interactive)
-  (let ((file (tumme-original-file-name)))
-    (if (not (tumme-image-at-point-p))
-        (message "No thumbnail at point")
-      (if (not file)
-          (message "No original file name found")
-        (call-process shell-file-name nil nil nil shell-command-switch
-		      (format "%s \"%s\"" tumme-external-viewer file))))))
-
-;;;###autoload
-(defun tumme-dired-display-external ()
-  "Display file at point using an external viewer."
-  (interactive)
-  (let ((file (dired-get-filename)))
-    (call-process shell-file-name nil nil nil shell-command-switch
-		  (format "%s \"%s\"" tumme-external-viewer file))))
-
-(defun tumme-window-width-pixels (window)
-  "Calculate WINDOW width in pixels."
-    (* (window-width window) (frame-char-width)))
-
-(defun tumme-window-height-pixels (window)
-  "Calculate WINDOW height in pixels."
-  ;; Note: The mode-line consumes one line
-    (* (- (window-height window) 1) (frame-char-height)))
-
-(defun tumme-display-window ()
-  "Return window where `tumme-display-image-buffer' is visible."
-  (get-window-with-predicate
-   (lambda (window)
-     (equal (buffer-name (window-buffer window)) tumme-display-image-buffer))
-   nil t))
-
-(defun tumme-thumbnail-window ()
-  "Return window where `tumme-thumbnail-buffer' is visible."
-  (get-window-with-predicate
-   (lambda (window)
-     (equal (buffer-name (window-buffer window)) tumme-thumbnail-buffer))
-   nil t))
-
-(defun tumme-associated-dired-buffer-window ()
-  "Return window where associated dired buffer is visible."
-  (let (buf)
-    (if (tumme-image-at-point-p)
-        (progn
-          (setq buf (tumme-associated-dired-buffer))
-          (get-window-with-predicate
-           (lambda (window)
-             (equal (window-buffer window) buf))))
-      (error "No thumbnail image at point"))))
-
-(defun tumme-display-window-width ()
-  "Return width, in pixels, of tumme's image display window."
-  (- (tumme-window-width-pixels (tumme-display-window))
-     tumme-display-window-width-correction))
-
-(defun tumme-display-window-height ()
-  "Return height, in pixels, of tumme's image display window."
-  (- (tumme-window-height-pixels (tumme-display-window))
-     tumme-display-window-height-correction))
-
-(defun tumme-display-image (file &optional original-size)
-  "Display image FILE in image buffer.
-Use this when you want to display the image, semi sized, in a new
-window.  The image is sized to fit the display window (using a
-temporary file, don't worry).  Because of this, it will not be as
-quick as opening it directly, but on most modern systems it
-should feel snappy enough.
-
-If optional argument ORIGINAL-SIZE is non-nil, display image in its
-original size."
-  (let ((new-file (expand-file-name tumme-temp-image-file))
-        width height command ret)
-    (setq file (expand-file-name file))
-    (if (not original-size)
-        (progn
-          (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 ?w width)
-                  (cons ?h height)
-                  (cons ?f file)
-                  (cons ?t new-file))))
-          (setq ret (call-process shell-file-name nil nil nil
-				  shell-command-switch command))
-          (if (not (= 0 ret))
-              (error "Could not resize image")))
-      (copy-file file new-file t))
-    (with-current-buffer (tumme-create-display-image-buffer)
-      (let ((inhibit-read-only t))
-        (erase-buffer)
-        (clear-image-cache)
-        (tumme-insert-image tumme-temp-image-file 'jpeg 0 0)
-        (goto-char (point-min))
-        (tumme-update-property 'original-file-name file)))))
-
-(defun tumme-display-thumbnail-original-image (&optional arg)
-  "Display current thumbnail's original image in display buffer.
-See documentation for `tumme-display-image' for more information.
-With prefix argument ARG, display image in its original size."
-  (interactive "P")
-  (let ((file (tumme-original-file-name)))
-    (if (not (string-equal major-mode "tumme-thumbnail-mode"))
-        (message "Not in tumme-thumbnail-mode")
-      (if (not (tumme-image-at-point-p))
-          (message "No thumbnail at point")
-        (if (not file)
-            (message "No original file name found")
-	  (tumme-create-display-image-buffer)
-          (display-buffer tumme-display-image-buffer)
-          (tumme-display-image file arg))))))
-
-
-;;;###autoload
-(defun tumme-dired-display-image (&optional arg)
-  "Display current image file.
-See documentation for `tumme-display-image' for more information.
-With prefix argument ARG, display image in its original size."
-  (interactive "P")
-  (tumme-create-display-image-buffer)
-  (display-buffer tumme-display-image-buffer)
-  (tumme-display-image (dired-get-filename) arg))
-
-(defun tumme-image-at-point-p ()
-  "Return true if there is a tumme thumbnail at point."
-  (get-text-property (point) 'tumme-thumbnail))
-
-(defun tumme-rotate-thumbnail (degrees)
-  "Rotate thumbnail DEGREES degrees."
-  (if (not (tumme-image-at-point-p))
-      (message "No thumbnail at point")
-    (let ((file (tumme-thumb-name (tumme-original-file-name)))
-          command)
-      (setq command (format-spec
-                     tumme-cmd-rotate-thumbnail-options
-                     (list
-                      (cons ?p tumme-cmd-rotate-thumbnail-program)
-                      (cons ?d degrees)
-                      (cons ?t (expand-file-name file)))))
-      (call-process shell-file-name nil nil nil shell-command-switch command)
-      ;; Clear the cache to refresh image. I wish I could just refresh
-      ;; the current file but I do not know how to do that. Yet...
-      (clear-image-cache))))
-
-(defun tumme-rotate-thumbnail-left ()
-  "Rotate thumbnail left (counter clockwise) 90 degrees.
-The result of the rotation is displayed in the image display area
-and a confirmation is needed before the original image files is
-overwritten.  This confirmation can be turned off using
-`tumme-rotate-original-ask-before-overwrite'."
-  (interactive)
-  (tumme-rotate-thumbnail "270"))
-
-(defun tumme-rotate-thumbnail-right ()
-  "Rotate thumbnail counter right (clockwise) 90 degrees.
-The result of the rotation is displayed in the image display area
-and a confirmation is needed before the original image files is
-overwritten.  This confirmation can be turned off using
-`tumme-rotate-original-ask-before-overwrite'."
-  (interactive)
-  (tumme-rotate-thumbnail "90"))
-
-(defun tumme-refresh-thumb ()
-  "Force creation of new image for current thumbnail."
-  (interactive)
-  (let ((file (tumme-original-file-name)))
-    (clear-image-cache)
-    (tumme-create-thumb file (tumme-thumb-name file))))
-
-(defun tumme-rotate-original (degrees)
-  "Rotate original image DEGREES degrees."
-  (if (not (tumme-image-at-point-p))
-      (message "No image at point")
-    (let ((file (tumme-original-file-name))
-          command temp-file)
-      (if (not (string-match "\.[jJ][pP[eE]?[gG]$" file))
-          (error "Only JPEG images can be rotated!"))
-      (setq command (format-spec
-                     tumme-cmd-rotate-original-options
-                     (list
-                      (cons ?p tumme-cmd-rotate-original-program)
-                      (cons ?d degrees)
-                      (cons ?o (expand-file-name file))
-                      (cons ?t tumme-temp-rotate-image-file))))
-      (if (not (= 0 (call-process shell-file-name nil nil nil
-				  shell-command-switch command)))
-          (error "Could not rotate image")
-        (tumme-display-image tumme-temp-rotate-image-file)
-        (if (or (and tumme-rotate-original-ask-before-overwrite
-                     (y-or-n-p
-		      "Rotate to temp file OK.  Overwrite original image? "))
-                (not tumme-rotate-original-ask-before-overwrite))
-            (progn
-              (copy-file tumme-temp-rotate-image-file file t)
-              (tumme-refresh-thumb))
-          (tumme-display-image file))))))
-
-(defun tumme-rotate-original-left ()
-  "Rotate original image left (counter clockwise) 90 degrees."
-  (interactive)
-  (tumme-rotate-original "270"))
-
-(defun tumme-rotate-original-right ()
-  "Rotate original image right (clockwise) 90 degrees."
-  (interactive)
-  (tumme-rotate-original "90"))
-
-(defun tumme-get-exif-file-name (file)
-  "Use the image's EXIF information to return a unique file name.
-The file name should be unique as long as you do not take more than
-one picture per second.  The original file name is suffixed at the end
-for traceability.  The format of the returned file name is
-YYYY_MM_DD_HH_MM_DD_ORIG_FILE_NAME.jpg.  Used from
-`tumme-copy-with-exif-file-name'."
-  (let (data no-exif-data-found)
-    (if (not (string-match "\.[Jj][Pp][Ee]?[Gg]$" (expand-file-name file)))
-        (progn
-          (setq no-exif-data-found t)
-          (setq data
-                (format-time-string
-                 "%Y:%m:%d %H:%M:%S"
-                 (nth 5 (file-attributes (expand-file-name file))))))
-      (setq data (tumme-get-exif-data (expand-file-name file)
-				      "DateTimeOriginal")))
-    (while (string-match "[ :]" data)
-      (setq data (replace-match "_" nil nil data)))
-    (format "%s%s%s" data
-            (if no-exif-data-found
-                "_noexif_"
-              "_")
-            (file-name-nondirectory file))))
-
-(defun tumme-thumbnail-set-image-description ()
-  "Set the ImageDescription EXIF tag for the original image.
-If the image already has a value for this tag, it is used as the
-default value at the prompt."
-  (interactive)
-  (if (not (tumme-image-at-point-p))
-      (message "No thumbnail at point")
-    (let* ((file (tumme-original-file-name))
-           (old-value (tumme-get-exif-data file "ImageDescription")))
-      (if (eq 0
-              (tumme-set-exif-data file "ImageDescription"
-                                   (read-string "Value of ImageDescription: "
-						old-value)))
-          (message "Successfully wrote ImageDescription tag.")
-        (error "Could not write ImageDescription tag")))))
-
-(defun tumme-set-exif-data (file tag-name tag-value)
-  "In FILE, set EXIF tag TAG-NAME to value TAG-VALUE."
-  (let (command)
-    (setq command (format-spec
-                   tumme-cmd-write-exif-data-options
-                   (list
-                    (cons ?p tumme-cmd-write-exif-data-program)
-                    (cons ?f (expand-file-name file))
-                    (cons ?t tag-name)
-                    (cons ?v tag-value))))
-    (call-process shell-file-name nil nil nil shell-command-switch command)))
-
-(defun tumme-get-exif-data (file tag-name)
-  "From FILE, return EXIF tag TAG-NAME."
-  (let ((buf (get-buffer-create "*tumme-get-exif-data*"))
-        command tag-value)
-    (setq command (format-spec
-                   tumme-cmd-read-exif-data-options
-                   (list
-                    (cons ?p tumme-cmd-read-exif-data-program)
-                    (cons ?f file)
-                    (cons ?t tag-name))))
-    (with-current-buffer buf
-      (delete-region (point-min) (point-max))
-      (if (not (eq (call-process shell-file-name nil t nil
-				 shell-command-switch command) 0))
-          (error "Could not get EXIF tag")
-        (goto-char (point-min))
-        ;; Clean buffer from newlines and carriage returns before
-        ;; getting final info
-        (while (search-forward-regexp "[\n\r]" nil t)
-          (replace-match "" nil t))
-        (setq tag-value (buffer-substring (point-min) (point-max)))))
-    tag-value))
-
-(defun tumme-copy-with-exif-file-name ()
-  "Copy file with unique name to main image directory.
-Copy current or all marked files in dired to a new file in your
-main image directory, using a file name generated by
-`tumme-get-exif-file-name'.  A typical usage for this if when
-copying images from a digital camera into the image directory.
-
- Typically, you would open up the folder with the incoming
-digital images, mark the files to be copied, and execute this
-function.  The result is a couple of new files in
-`tumme-main-image-directory' called
-2005_05_08_12_52_00_dscn0319.jpg,
-2005_05_08_14_27_45_dscn0320.jpg etc."
-  (interactive)
-  (let (new-name
-        (files (dired-get-marked-files)))
-    (mapcar
-     (lambda (curr-file)
-       (setq new-name
-             (format "%s/%s"
-                     (file-name-as-directory
-                      (expand-file-name tumme-main-image-directory))
-                     (tumme-get-exif-file-name curr-file)))
-       (message "Copying %s to %s" curr-file new-name)
-       (copy-file curr-file new-name))
-     files)))
-
-(defun tumme-display-next-thumbnail-original ()
-  "In thubnail buffer, move to next thumbnail and display the image."
-  (interactive)
-  (tumme-forward-image)
-  (tumme-display-thumbnail-original-image))
-
-(defun tumme-display-previous-thumbnail-original ()
-  "Move to previous thumbnail and display image."
-  (interactive)
-  (tumme-backward-image)
-  (tumme-display-thumbnail-original-image))
-
-(defun tumme-write-comments (file-comments)
-  "Write file comments to database.
-Write file comments to one or more files.  FILE-COMMENTS is an alist on
-the following form:
- ((FILE . COMMENT) ... )"
-  (let (end comment-beg-pos comment-end-pos file comment)
-    (with-temp-file tumme-db-file
-      (insert-file-contents tumme-db-file)
-      (dolist (elt file-comments)
-	(setq file (car elt)
-	      comment (cdr elt))
-	(goto-char (point-min))
-	(if (search-forward-regexp (format "^%s.*$" file) nil t)
-	    (progn
-	      (setq end (point))
-	      (beginning-of-line)
-	      ;; Delete old comment, if any
-	      (when (search-forward ";comment:" end t)
-		(setq comment-beg-pos (match-beginning 0))
-		;; Any tags after the comment?
-		(if (search-forward ";" end t)
-		    (setq comment-end-pos (- (point) 1))
-		  (setq comment-end-pos end))
-		;; Delete comment tag and comment
-		(delete-region comment-beg-pos comment-end-pos))
-	      ;; Insert new comment
-	      (beginning-of-line)
-	      (unless (search-forward ";" end t)
-		(end-of-line)
-		(insert ";"))
-	      (insert (format "comment:%s;" comment)))
-	  ;; File does not exist in database - add it.
-	  (goto-char (point-max))
-	  (insert (format "\n%s;comment:%s" file comment)))))))
-
-(defun tumme-update-property (prop value)
-  "Update text property PROP with value VALUE at point."
-  (let ((inhibit-read-only t))
-    (put-text-property
-     (point) (1+ (point))
-     prop
-     value)))
-
-;;;###autoload
-(defun tumme-dired-comment-files ()
-  "Add comment to current or marked files in dired."
-  (interactive)
-  (let ((comment (tumme-read-comment)))
-    (tumme-write-comments
-     (mapcar
-      (lambda (curr-file)
-        (cons curr-file comment))
-      (dired-get-marked-files)))))
-
-(defun tumme-comment-thumbnail ()
-  "Add comment to current thumbnail in thumbnail buffer."
-  (interactive)
-  (let* ((file (tumme-original-file-name))
-         (comment (tumme-read-comment file)))
-    (tumme-write-comments (list (cons file comment)))
-    (tumme-update-property 'comment comment))
-  (tumme-display-thumb-properties))
-
-(defun tumme-read-comment (&optional file)
-  "Read comment for an image.
-Read comment for an image, optionally using old comment from FILE
-as initial value."
-  (let ((comment
-         (read-string
-          "Comment: "
-          (if file (tumme-get-comment file)))))
-    comment))
-
-(defun tumme-get-comment (file)
-  "Get comment for file FILE."
-  (save-excursion
-    (let (end buf comment-beg-pos comment-end-pos comment)
-      (setq buf (find-file tumme-db-file))
-      (goto-char (point-min))
-      (when (search-forward-regexp
-             (format "^%s" file) nil t)
-        (end-of-line)
-        (setq end (point))
-        (beginning-of-line)
-        (cond ((search-forward ";comment:" end t)
-               (setq comment-beg-pos (point))
-               (if (search-forward ";" end t)
-                   (setq comment-end-pos (- (point) 1))
-                 (setq comment-end-pos end))
-               (setq comment (buffer-substring
-                              comment-beg-pos comment-end-pos)))))
-      (kill-buffer buf)
-      comment)))
-
-;;;###autoload
-(defun tumme-mark-tagged-files ()
-  "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)
-        files buf)
-    (save-excursion
-      (setq buf (find-file tumme-db-file))
-      (goto-char (point-min))
-      ;; Collect matches
-      (while (search-forward-regexp
-              (concat "\\(^[^;\n]+\\);.*" tag ".*$") nil t)
-        (setq files (append (list (match-string 1)) files)))
-      (kill-buffer buf)
-      ;; Mark files
-      (mapcar
-       ;; I tried using `dired-mark-files-regexp' but it was
-       ;; waaaay to slow.
-       (lambda (curr-file)
-         ;; Don't bother about hits found in other directories than
-         ;; the current one.
-         (when (string= (file-name-as-directory
-                         (expand-file-name default-directory))
-                      (file-name-as-directory
-                       (file-name-directory curr-file)))
-           (setq curr-file (file-name-nondirectory curr-file))
-           (goto-char (point-min))
-           (when (search-forward-regexp (format "\\s %s$" curr-file) nil t)
-             (setq hits (+ hits 1))
-             (dired-mark 1))))
-       files))
-    (message "%d files with matching tag marked." hits)))
-
-(defun tumme-mouse-display-image (event)
-  "Use mouse EVENT, call `tumme-display-image' to display image.
-Track this in associated dired buffer if `tumme-track-movement' is
-non-nil."
-  (interactive "e")
-  (let (file)
-    (mouse-set-point event)
-    (goto-char (posn-point (event-end event)))
-    (setq file (tumme-original-file-name))
-    (if tumme-track-movement
-        (tumme-track-original-file))
-    (tumme-create-display-image-buffer)
-    (display-buffer tumme-display-image-buffer)
-    (tumme-display-image file)))
-
-(defun tumme-mouse-select-thumbnail (event)
-  "Use mouse EVENT to select thumbnail image.
-Track this in associated dired buffer if `tumme-track-movement' is
-non-nil."
-  (interactive "e")
-  (let (file)
-    (mouse-set-point event)
-    (goto-char (posn-point (event-end event)))
-    (if tumme-track-movement
-        (tumme-track-original-file)))
-  (tumme-display-thumb-properties))
-
-(defun tumme-mouse-toggle-mark (event)
-  "Use mouse EVENT to toggle dired mark for thumbnail.
-Track this in associated dired buffer if `tumme-track-movement' is
-non-nil."
-  (interactive "e")
-  (let (file)
-    (mouse-set-point event)
-    (goto-char (posn-point (event-end event)))
-    (if tumme-track-movement
-        (tumme-track-original-file)))
-  (tumme-toggle-mark-thumb-original-file))
-
-(defun tumme-dired-display-properties ()
-  "Display properties for dired file in the echo area."
-  (interactive)
-  (let* ((file (dired-get-filename))
-         (file-name (file-name-nondirectory file))
-         (dired-buf (buffer-name (current-buffer)))
-         (props (mapconcat
-                 'princ
-                 (tumme-list-tags file)
-                 ", "))
-         (comment (tumme-get-comment file)))
-    (if file-name
-        (message
-         (tumme-format-properties-string
-          dired-buf
-          file-name
-          props
-          comment)))))
-
-(defvar tumme-tag-file-list nil
-  "List to store tag-file structure.")
-
-(defvar tumme-file-tag-list nil
-  "List to store file-tag structure.")
-
-(defvar tumme-file-comment-list nil
-  "List to store file comments.")
-
-(defun tumme-add-to-tag-file-list (tag file)
-  "Add relation between TAG and FILE."
-  (let (curr)
-    (if tumme-tag-file-list
-        (if (setq curr (assoc tag tumme-tag-file-list))
-            (if (not (member file curr))
-                (setcdr curr (cons file (cdr curr))))
-          (setcdr tumme-tag-file-list
-                  (cons (list tag file) (cdr tumme-tag-file-list))))
-      (setq tumme-tag-file-list (list (list tag file))))))
-
-(defun tumme-add-to-tag-file-lists (tag file)
-  "Helper function used from `tumme-create-gallery-lists'.
-
-Add TAG to FILE in one list and FILE to TAG in the other.
-
-Lisp structures look like the following:
-
-tumme-file-tag-list:
-
-  ((\"filename1\" \"tag1\" \"tag2\" \"tag3\" ...)
-   (\"filename2\" \"tag1\" \"tag2\" \"tag3\" ...)
-   ...)
-
-tumme-tag-file-list:
-
- ((\"tag1\" \"filename1\" \"filename2\" \"filename3\" ...)
-  (\"tag2\" \"filename1\" \"filename2\" \"filename3\" ...)
-  ...)"
-  ;; Add tag to file list
-  (let (curr)
-    (if tumme-file-tag-list
-        (if (setq curr (assoc file tumme-file-tag-list))
-            (setcdr curr (cons tag (cdr curr)))
-          (setcdr tumme-file-tag-list
-                  (cons (list file tag) (cdr tumme-file-tag-list))))
-      (setq tumme-file-tag-list (list (list file tag))))
-    ;; Add file to tag list
-    (if tumme-tag-file-list
-        (if (setq curr (assoc tag tumme-tag-file-list))
-            (if (not (member file curr))
-                (setcdr curr (cons file (cdr curr))))
-          (setcdr tumme-tag-file-list
-                  (cons (list tag file) (cdr tumme-tag-file-list))))
-      (setq tumme-tag-file-list (list (list tag file))))))
-
-(defun tumme-add-to-file-comment-list (file comment)
-  "Helper function used from `tumme-create-gallery-lists'.
-
-For FILE, add COMMENT to list.
-
-Lisp structure looks like the following:
-
-tumme-file-comment-list:
-
-  ((\"filename1\" .  \"comment1\")
-   (\"filename2\" .  \"comment2\")
-   ...)"
-  (if tumme-file-comment-list
-      (if (not (assoc file tumme-file-comment-list))
-          (setcdr tumme-file-comment-list
-                  (cons (cons file comment)
-                        (cdr tumme-file-comment-list))))
-    (setq tumme-file-comment-list (list (cons file comment)))))
-
-(defun tumme-create-gallery-lists ()
-  "Create temporary lists used by `tumme-gallery-generate'."
-  (let ((buf (find-file tumme-db-file))
-        end beg file row-tags)
-    (setq tumme-tag-file-list nil)
-    (setq tumme-file-tag-list nil)
-    (setq tumme-file-comment-list nil)
-    (goto-char (point-min))
-    (while (search-forward-regexp "^." nil t)
-      (end-of-line)
-      (setq end (point))
-      (beginning-of-line)
-      (setq beg (point))
-      (if (not (search-forward ";" end nil))
-          (error "Something is really wrong, check format of database"))
-      (setq row-tags (split-string
-                      (buffer-substring beg end) ";"))
-      (setq file (car row-tags))
-      (mapc
-       (lambda (x)
-         (if (not (string-match "^comment:\\(.*\\)" x))
-             (tumme-add-to-tag-file-lists x file)
-           (tumme-add-to-file-comment-list file (match-string 1 x))))
-       (cdr row-tags)))
-    (kill-buffer buf))
-  ;; Sort tag-file list
-  (setq tumme-tag-file-list
-        (sort tumme-tag-file-list
-              (lambda (x y)
-                (string< (car x) (car y))))))
-
-(defun tumme-hidden-p (file)
-  "Return t if image FILE has a \"hidden\" tag."
-  (let (hidden)
-    (mapc
-     (lambda (tag)
-       (if (member tag tumme-gallery-hidden-tags)
-           (setq hidden t)))
-     (cdr (assoc file tumme-file-tag-list)))
-    hidden))
-
-(defun tumme-gallery-generate ()
-  "Generate gallery pages.
-First we create a couple of Lisp structures from the database to make
-it easier to generate, then HTML-files are created in
-`tumme-gallery-dir'"
-  (interactive)
-  (if (eq 'per-directory tumme-thumbnail-storage)
-      (error "Currently, gallery generation is not supported \
-when using per-directory thumbnail file storage"))
-  (tumme-create-gallery-lists)
-  (let ((tags tumme-tag-file-list)
-        count curr tag index-buf tag-buf
-        comment file-tags tag-link tag-link-list)
-    ;; Make sure gallery root exist
-    (if (file-exists-p tumme-gallery-dir)
-        (if (not (file-directory-p tumme-gallery-dir))
-            (error "Variable tumme-gallery-dir is not a directory"))
-      (make-directory tumme-gallery-dir))
-    ;; Open index file
-    (setq index-buf (find-file
-                     (format "%s/index.html" tumme-gallery-dir)))
-    (erase-buffer)
-    (insert "<html>\n")
-    (insert "  <body>\n")
-    (insert "   <h2>Tumme Gallery</h2>\n")
-    (insert (format "<p>\n    Gallery generated %s\n   <p>\n"
-                    (current-time-string)))
-    (insert "   <h3>Tag index</h3>\n")
-    (setq count 1)
-    ;; Pre-generate list of all tag links
-    (mapc
-     (lambda (curr)
-       (setq tag (car curr))
-       (when (not (member tag tumme-gallery-hidden-tags))
-         (setq tag-link (format "<a href=\"%d.html\">%s</a>" count tag))
-         (if tag-link-list
-             (setq tag-link-list
-                   (append tag-link-list (list (cons tag tag-link))))
-           (setq tag-link-list (list (cons tag tag-link))))
-         (setq count (1+ count))))
-     tags)
-    (setq count 1)
-    ;; Main loop where we generated thumbnail pages per tag
-    (mapc
-     (lambda (curr)
-       (setq tag (car curr))
-       ;; Don't display hidden tags
-       (when (not (member tag tumme-gallery-hidden-tags))
-         ;; Insert link to tag page in index
-         (insert (format "    %s<br>\n" (cdr (assoc tag tag-link-list))))
-         ;; Open per-tag file
-         (setq tag-buf (find-file
-                        (format "%s/%s.html" tumme-gallery-dir count)))
-         (erase-buffer)
-         (insert "<html>\n")
-         (insert "  <body>\n")
-         (insert "  <p><a href=\"index.html\">Index</a></p>\n")
-         (insert (format "  <h2>Images with tag &quot;%s&quot;</h2>" tag))
-         ;; Main loop for files per tag page
-         (mapc
-          (lambda (file)
-            (when (not (tumme-hidden-p file))
-              ;; Insert thumbnail with link to full image
-              (insert
-               (format "<a href=\"%s/%s\"><img src=\"%s/%s\"%s></a>\n"
-                       tumme-gallery-image-root-url
-		       (file-name-nondirectory file)
-                       tumme-gallery-thumb-image-root-url
-                       (file-name-nondirectory (tumme-thumb-name file)) file))
-              ;; Insert comment, if any
-              (if (setq comment (cdr (assoc file tumme-file-comment-list)))
-                  (insert (format "<br>\n%s<br>\n" comment))
-                (insert "<br>\n"))
-              ;; Insert links to other tags, if any
-              (when (> (length
-                        (setq file-tags (assoc file tumme-file-tag-list))) 2)
-                (insert "[ ")
-                (mapc
-                 (lambda (extra-tag)
-                   ;; Only insert if not file name or the main tag
-                   (if (and (not (equal extra-tag tag))
-                            (not (equal extra-tag file)))
-                       (insert
-                        (format "%s " (cdr (assoc extra-tag tag-link-list))))))
-                 file-tags)
-                (insert "]<br>\n"))))
-          (cdr curr))
-         (insert "  <p><a href=\"index.html\">Index</a></p>\n")
-         (insert "  </body>\n")
-         (insert "</html>\n")
-         (save-buffer)
-         (kill-buffer tag-buf)
-         (setq count (1+ count))))
-       tags)
-    (insert "  </body>\n")
-    (insert "</html>")
-    (save-buffer)
-    (kill-buffer index-buf)))
-
-(defun tumme-kill-buffer-and-window ()
-  "Kill the current buffer and, if possible, also the window."
-  (interactive)
-  (let ((buffer (current-buffer)))
-    (condition-case nil
-        (delete-window (selected-window))
-      (error nil))
-    (kill-buffer buffer)))
-
-(defvar tumme-widget-list nil
-  "List to keep track of meta data in edit buffer.")
-
-;;;###autoload
-(defun tumme-dired-edit-comment-and-tags ()
-  "Edit comment and tags of current or marked image files.
-Edit comment and tags for all marked image files in an
-easy-to-use form."
-  (interactive)
-  (setq tumme-widget-list nil)
-  ;; Setup buffer.
-  (let ((files (dired-get-marked-files)))
-    (switch-to-buffer "*Tumme Edit Meta Data*")
-    (kill-all-local-variables)
-    (make-local-variable 'widget-example-repeat)
-    (let ((inhibit-read-only t))
-      (erase-buffer))
-    (remove-overlays)
-    ;; Some help for the user.
-    (widget-insert
-"\nEdit comments and tags for each image.  Separate multiple tags
-with a comma.  Move forward between fields using TAB or RET.
-Move to the previous field using backtab (S-TAB).  Save by
-activating the Save button at the bottom of the form or cancel
-the operation by activating the Cancel button.\n\n")
-    ;; Here comes all images and a comment and tag field for each
-    ;; image.
-    (let (thumb-file img comment-widget tag-widget)
-
-      (dolist (file files)
-
-       (setq thumb-file (tumme-thumb-name file)
-             img (create-image thumb-file))
-
-       (insert-image img)
-       (widget-insert "\n\nComment: ")
-       (setq comment-widget
-             (widget-create 'editable-field
-                            :size 60
-                            :format "%v "
-                            :value (or (tumme-get-comment file) "")))
-       (widget-insert "\nTags:    ")
-       (setq tag-widget
-             (widget-create 'editable-field
-                            :size 60
-                            :format "%v "
-                            :value (or (mapconcat
-                                        (lambda (tag)
-                                          tag)
-                                        (tumme-list-tags file)
-                                        ",") "")))
-       ;; Save information in all widgets so that we can use it when
-       ;; the user saves the form.
-       (setq tumme-widget-list
-             (append tumme-widget-list
-                     (list (list file comment-widget tag-widget))))
-       (widget-insert "\n\n")))
-
-    ;; Footer with Save and Cancel button.
-    (widget-insert "\n")
-    (widget-create 'push-button
-                 :notify
-                 (lambda (&rest ignore)
-                   (tumme-save-information-from-widgets)
-                   (bury-buffer)
-                   (message "Done."))
-                 "Save")
-    (widget-insert " ")
-    (widget-create 'push-button
-                   :notify
-                   (lambda (&rest ignore)
-                     (bury-buffer)
-                     (message "Operation canceled."))
-                   "Cancel")
-    (widget-insert "\n")
-    (use-local-map widget-keymap)
-    (widget-setup)
-    ;; Jump to the first widget.
-    (widget-forward 1)))
-
-(defun tumme-save-information-from-widgets ()
-  "Save information found in `tumme-widget-list'.
-Use the information in `tumme-widget-list' to save comments and
-tags to their respective image file.  Internal function used by
-`tumme-dired-edit-comment-and-tags'."
-  (let (file comment tag-string tag-list lst)
-    (tumme-write-comments
-          (mapcar
-           (lambda (widget)
-             (setq file (car widget)
-                   comment (widget-value (cadr widget)))
-             (cons file comment))
-           tumme-widget-list))
-    (tumme-write-tags
-     (dolist (widget tumme-widget-list lst)
-       (setq file (car widget)
-             tag-string (widget-value (car (cddr widget)))
-             tag-list (split-string tag-string ","))
-       (dolist (tag tag-list)
-         (push (cons file tag) lst))))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;; TEST-SECTION ;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;; (defvar tumme-dir-max-size 12300000)
-
-;; (defun tumme-test-clean-old-files ()
-;;   "Clean `tumme-dir' from old thumbnail files.
-;; \"Oldness\" measured using last access time.  If the total size of all
-;; thumbnail files in `tumme-dir' is larger than 'tumme-dir-max-size',
-;; old files are deleted until the max size is reached."
-;;   (let* ((files
-;;           (sort
-;;            (mapcar
-;;             (lambda (f)
-;;               (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\..+$"))
-;;            ;; Sort function. Compare time between two files.
-;;            '(lambda (l1 l2)
-;;               (time-less-p (car l1) (car l2)))))
-;;          (dirsize (apply '+ (mapcar (lambda (x) (cadr x)) files))))
-;;     (while (> dirsize tumme-dir-max-size)
-;;       (y-or-n-p
-;;        (format "Size of thumbnail directory: %d, delete old file %s? "
-;;                dirsize (cadr (cdar files))))
-;;       (delete-file (cadr (cdar files)))
-;;       (setq dirsize (- dirsize (car (cdar files))))
-;;       (setq files (cdr files)))))
-
-;;;;;;;;;;;;;;;;;;;;;;,
-
-;; (defun dired-speedbar-buttons (dired-buffer)
-;;   (when (and (boundp 'tumme-use-speedbar)
-;; 	     tumme-use-speedbar)
-;;     (let ((filename (with-current-buffer dired-buffer
-;; 		      (dired-get-filename))))
-;;       (when (and (not (string-equal filename (buffer-string)))
-;; 		 (string-match (image-file-name-regexp) filename))
-;; 	(erase-buffer)
-;; 	(insert (propertize
-;; 		 filename
-;; 		 'display
-;; 		 (tumme-get-thumbnail-image filename)))))))
-
-;; (setq tumme-use-speedbar t)
-
-(provide 'tumme)
-
-;; arch-tag: 9d11411d-331f-4380-8b44-8adfe3a0343e
-;;; tumme.el ends here
--- a/lisp/vc-hooks.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/vc-hooks.el	Fri May 11 18:24:42 2007 +0000
@@ -52,7 +52,9 @@
 (defvar vc-header-alist ())
 (make-obsolete-variable 'vc-header-alist 'vc-BACKEND-header)
 
-(defcustom vc-ignore-dir-regexp "\\`\\([\\/][\\/]\\|/net/\\|/afs/\\)\\'"
+(defcustom vc-ignore-dir-regexp
+  ;; Stop SMB, automounter, AFS, and DFS host lookups.
+  "\\`\\(?:[\\/][\\/]\\|/\\(?:net\\|afs\\|\\.\\\.\\.\\)/\\)\\'"
   "Regexp matching directory names that are not under VC's control.
 The default regexp prevents fruitless and time-consuming attempts
 to determine the VC status in directories in which filenames are
@@ -313,10 +315,17 @@
   ;; Represent /home/luser/foo as ~/foo so that we don't try to look for
   ;; witnesses in /home or in /.
   (setq file (abbreviate-file-name file))
-  (let ((root nil))
+  (let ((root nil)
+        (user (nth 2 (file-attributes file))))
     (while (not (or root
                    (equal file (setq file (file-name-directory file)))
                    (null file)
+                   ;; As a heuristic, we stop looking up the hierarchy of
+                   ;; directories as soon as we find a directory belonging
+                   ;; to another user.  This should save us from looking in
+                   ;; things like /net and /afs.  This assumes that all the
+                   ;; files inside a project belong to the same user.
+                   (not (equal user (file-attributes file)))
                    (string-match vc-ignore-dir-regexp file)))
       (if (file-exists-p (expand-file-name witness file))
          (setq root file)
--- a/lisp/vc.el	Sun Apr 22 13:47:56 2007 +0000
+++ b/lisp/vc.el	Fri May 11 18:24:42 2007 +0000
@@ -2909,7 +2909,11 @@
   (vc-call-backend (vc-responsible-backend default-directory)
                    'update-changelog args))
 
-(defun vc-default-update-changelog (backend files)
+(defalias 'vc-cvs-update-changelog 'vc-update-changelog-rcs2log)
+(defalias 'vc-rcs-update-changelog 'vc-update-changelog-rcs2log)
+;; FIXME: This should probably be moved to vc-rcs.el and replaced in
+;; vc-cvs.el by code using cvs2cl.
+(defun vc-update-changelog-rcs2log (files)
   "Default implementation of update-changelog.
 Uses `rcs2log' which only works for RCS and CVS."
   ;; FIXME: We (c|sh)ould add support for cvs2cl
@@ -2950,9 +2954,7 @@
                                     (mapcar
                                      (lambda (f)
                                        (file-relative-name
-                                        (if (file-name-absolute-p f)
-                                            f
-                                          (concat odefault f))))
+                                        (expand-file-name f odefault)))
                                      files)))
                        "done"
 		     (pop-to-buffer (get-buffer-create "*vc*"))
--- a/lispref/ChangeLog	Sun Apr 22 13:47:56 2007 +0000
+++ b/lispref/ChangeLog	Fri May 11 18:24:42 2007 +0000
@@ -1,3 +1,83 @@
+2007-05-10  Richard Stallman  <rms@gnu.org>
+
+	* keymaps.texi (Scanning Keymaps): Update where-is-internal example.
+
+	* help.texi (Keys in Documentation): Add reference to
+	Documentation Tips.
+
+	* files.texi (Format Conversion): TO-FN gets three arguments.
+
+	* modes.texi (Auto Major Mode): Document file-start-mode-alist.
+
+2007-05-10  Thien-Thi Nguyen  <ttn@gnuvola.org>
+
+	* elisp.texi (Top): Remove "Saving Properties" from detailed menu.
+	* files.texi (Format Conversion): Expand intro; add menu.
+	(Format Conversion Overview, Format Conversion Round-Trip)
+	(Format Conversion Piecemeal): New nodes/subsections.
+	* hooks.texi: Xref "Format Conversion" , not "Saving Properties".
+	* text.texi (Text Properties): Remove "Saving Properties" from menu.
+	(Saving Properties): Delete node/subsection.
+
+2007-05-07  Karl Berry  <karl@gnu.org>
+
+	* elisp.texi (EMACSVER): back to 22.
+
+2007-05-06  Richard Stallman  <rms@gnu.org>
+
+	* processes.texi (Accepting Output): Revert most of previous change.
+
+2007-05-05  Richard Stallman  <rms@gnu.org>
+
+	* processes.texi (Accepting Output): accept-process-output
+	uses microseconds, not milliseconds.  But that arg is obsolete.
+
+2007-05-04  Karl Berry  <karl@tug.org>
+
+	* elisp.texi (EMACSVER) [smallbook]: 22.1, not 22.
+
+2007-05-04  Eli Zaretskii  <eliz@gnu.org>
+
+	* tips.texi (Documentation Tips): Rearrange items to place the
+	more important ones first.  Add an index entry for hyperlinks.
+
+2007-05-03  Karl Berry  <karl@gnu.org>
+
+	* elisp.texi (\urlcolor, \linkcolor) [smallbook]: \Black for printing.
+	 (EMACSVER) [smallbook]: 22 for printed version.
+
+	* control.texi (Signaling Errors) <signal>: texinfo.tex is fixed,
+	so restore anchor to normal position after defun.  Found by Kevin Ryde.
+
+2007-04-26  Glenn Morris  <rgm@gnu.org>
+
+	* elisp.texi (EMACSVER): Increase to 22.1.50.
+
+2007-04-28  Karl Berry  <karl@gnu.org>
+
+	* elisp.texi: Improve line breaks on copyright page,
+	similar layout to emacs manual, 8.5x11 by default.
+
+2007-04-24  Richard Stallman  <rms@gnu.org>
+
+	* text.texi (Special Properties): Add xref to Overlay Properties.
+
+	* display.texi (Overlay Properties): Add xref to Special Properties.
+
+2007-04-22  Richard Stallman  <rms@gnu.org>
+
+	* keymaps.texi (Extended Menu Items): Move the info about
+	format with cached keyboard binding.
+
+2007-04-21  Richard Stallman  <rms@gnu.org>
+
+	* text.texi (Special Properties): Clarify previous change.
+
+	* files.texi (File Name Expansion): Clarify previous change.
+
+	* display.texi (Attribute Functions): Fix example for
+	face-attribute-relative-p.
+
 2007-04-19  Kenichi Handa  <handa@m17n.org>
 
 	* text.texi (Special Properties): Document composition property.
@@ -326,7 +406,7 @@
 
 	* loading.texi (How Programs Do Loading): Fix anchor position at
 	load-read-function definition doc. (tiny change)
-	
+
 2007-02-21  Kim F. Storm  <storm@cua.dk>
 
 	* strings.texi (Text Comparison): Mention that assoc-string
--- a/lispref/control.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/lispref/control.texi	Fri May 11 18:24:42 2007 +0000
@@ -783,13 +783,10 @@
 @end defun
 
 @defun signal error-symbol data
-This
 @anchor{Definition of signal}
-@c unfortunately, a page break is allowed if the anchor immediately
-@c follows the @defun, due to hard-to-fix TeXnicalities.  
-function signals an error named by @var{error-symbol}.  The
-argument @var{data} is a list of additional Lisp objects relevant to the
-circumstances of the error.
+This function signals an error named by @var{error-symbol}.  The
+argument @var{data} is a list of additional Lisp objects relevant to
+the circumstances of the error.
 
 The argument @var{error-symbol} must be an @dfn{error symbol}---a symbol
 bearing a property @code{error-conditions} whose value is a list of
--- a/lispref/display.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/lispref/display.texi	Fri May 11 18:24:42 2007 +0000
@@ -1418,6 +1418,9 @@
 @code{inhibit-modification-hooks} to @code{t} around doing so, to
 avoid confusing the internal mechanism that calls these hooks.
 
+Text properties also support the @code{modification-hooks} property,
+but the details are somewhat different (@pxref{Special Properties}).
+
 @item insert-in-front-hooks
 @kindex insert-in-front-hooks @r{(overlay property)}
 This property's value is a list of functions to be called before and
@@ -2144,10 +2147,9 @@
 For example:
 
 @example
-(read-face-name "Describe face" "= `default' face" t)
+(face-attribute-relative-p :height 2.0)
+     @result{} t
 @end example
-
-prompts with @samp{Describe face (default = `default' face): }.
 @end defun
 
 @defun merge-face-attribute attribute value1 value2
--- a/lispref/elisp.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/lispref/elisp.texi	Fri May 11 18:24:42 2007 +0000
@@ -7,29 +7,35 @@
 @c Version of the manual and of Emacs.
 @c Please remember to update the edition number in README as well.
 @set VERSION  2.9
-@set EMACSVER 22.0.98
+@set EMACSVER 22.0.99
 
 @dircategory Emacs
 @direntry
 * Elisp: (elisp).       The Emacs Lisp Reference Manual.
 @end direntry
 
-@c for full 8.5x11, comment this out.
-@set smallbook
+@c in general, keep the following line commented out, unless doing a
+@c copy of this manual that will be published.  the manual should go
+@c onto the distribution in the full, 8.5 x 11" size.
+@c set smallbook
 
 @ifset smallbook
 @smallbook
 @end ifset
 
 @c per rms and peterb, use 10pt fonts for the main text, mostly to
-@c save on paper cost.  Also, do not declare @setchapternewpage odd,
-@c for the same reason. Do this inside @tex for now, so the
-@c last-released makeinfo does not complain.
+@c save on paper cost.  
+@c Do this inside @tex for now, so current makeinfo does not complain.
 @tex
 @ifset smallbook
 @fonttextsize 10
+@set EMACSVER 22
+\global\let\urlcolor=\Black % don't print links in grayscale
+\global\let\linkcolor=\Black
 @end ifset
 \global\hbadness=6666 % don't worry about not-too-underfull boxes
+\global\let\urlcolor=\Black % don't print links in grayscale
+\global\let\linkcolor=\Black
 @end tex
 
 @c Combine indices.
@@ -41,8 +47,8 @@
 @c @syncodeindex tp fn
 
 @copying
-This is edition @value{VERSION} of the GNU Emacs Lisp
-Reference Manual, corresponding to Emacs version @value{EMACSVER}.
+This is edition @value{VERSION} of the GNU Emacs Lisp Reference Manual,@*
+corresponding to Emacs version @value{EMACSVER}.
 
 Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007  Free Software
@@ -74,14 +80,14 @@
 @vskip 0pt plus 1filll
 @insertcopying
 
-@sp 1
+@sp 2
 Published by the Free Software Foundation @*
 51 Franklin St, Fifth Floor @*
 Boston, MA 02110-1301 @*
 USA @*
 ISBN 1-882114-74-4
 
-@sp 1
+@sp 2
 Cover art by Etienne Suvasa.
 @end titlepage
 
@@ -1060,8 +1066,6 @@
 * Format Properties::       Properties for representing formatting of text.
 * Sticky Properties::       How inserted text gets properties from
                               neighboring text.
-* Saving Properties::       Saving text properties in files, and reading
-                              them back.
 * Lazy Properties::         Computing text properties in a lazy fashion
                               only when text is examined.
 * Clickable Text::          Using text properties to make regions of text
--- a/lispref/files.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/lispref/files.texi	Fri May 11 18:24:42 2007 +0000
@@ -374,8 +374,7 @@
 @end deffn
 
   Saving a buffer runs several hooks.  It also performs format
-conversion (@pxref{Format Conversion}), and may save text properties in
-``annotations'' (@pxref{Saving Properties}).
+conversion (@pxref{Format Conversion}).
 
 @defvar write-file-functions
 The value of this variable is a list of functions to be called before
@@ -496,9 +495,9 @@
 
 The function @code{insert-file-contents} checks the file contents
 against the defined file formats, and converts the file contents if
-appropriate.  @xref{Format Conversion}.  It also calls the functions in
-the list @code{after-insert-file-functions}; see @ref{Saving
-Properties}.  Normally, one of the functions in the
+appropriate and also calls the functions in
+the list @code{after-insert-file-functions}.  @xref{Format Conversion}.
+Normally, one of the functions in the
 @code{after-insert-file-functions} list determines the coding system
 (@pxref{Coding Systems}) used for decoding the file's contents,
 including end-of-line conversion.
@@ -620,9 +619,10 @@
 @var{filename} and @var{visit} for that purpose.
 
 The function @code{write-region} converts the data which it writes to
-the appropriate file formats specified by @code{buffer-file-format}.
-@xref{Format Conversion}.  It also calls the functions in the list
-@code{write-region-annotate-functions}; see @ref{Saving Properties}.
+the appropriate file formats specified by @code{buffer-file-format}
+and also calls the functions in the list
+@code{write-region-annotate-functions}.
+@xref{Format Conversion}.
 
 Normally, @code{write-region} displays the message @samp{Wrote
 @var{filename}} in the echo area.  If @var{visit} is neither @code{t}
@@ -1990,7 +1990,7 @@
 @end group
 @end example
 
-In some cases, a leading @samp{..} can remain in the output:
+In some cases, a leading @samp{..} component can remain in the output:
 
 @example
 @group
@@ -1999,7 +1999,8 @@
 @end group
 @end example
 
-This is for use with filesystems that have the concept of a
+@noindent
+This is for the sake of filesystems that have the concept of a
 ``superroot'' above the root directory @file{/}.  On other filesystems,
 @file{/../} is interpreted exactly the same as @file{/}.
 
@@ -2801,23 +2802,70 @@
 @cindex file format conversion
 @cindex encoding file formats
 @cindex decoding file formats
-  The variable @code{format-alist} defines a list of @dfn{file formats},
-which describe textual representations used in files for the data (text,
-text-properties, and possibly other information) in an Emacs buffer.
-Emacs performs format conversion if appropriate when reading and writing
-files.
+@cindex text properties in files
+@cindex saving text properties
+  Emacs performs several steps to convert the data in a buffer (text,
+text properties, and possibly other information) to and from a
+representation suitable for storing into a file.  This section describes
+the fundamental functions that perform this @dfn{format conversion},
+namely @code{insert-file-contents} for reading a file into a buffer,
+and @code{write-region} for writing a buffer into a file.
+
+@menu
+* Overview: Format Conversion Overview.     @code{insert-file-contents} and @code{write-region}
+* Round-Trip: Format Conversion Round-Trip. Using @code{format-alist}.
+* Piecemeal: Format Conversion Piecemeal.   Specifying non-paired conversion.
+@end menu
+
+@node Format Conversion Overview
+@subsection Overview
+@noindent
+The function @code{insert-file-contents}:
+
+@itemize
+@item initially, inserts bytes from the file into the buffer;
+@item decodes bytes to characters as appropriate;
+@item processes formats as defined by entries in @code{format-alist}; and
+@item calls functions in @code{after-insert-file-functions}.
+@end itemize
+
+@noindent
+The function @code{write-region}:
+
+@itemize
+@item initially, calls functions in @code{write-region-annotate-functions};
+@item processes formats as defined by entries in @code{format-alist};
+@item encodes characters to bytes as appropriate; and
+@item modifies the file with the bytes.
+@end itemize
+
+  This shows the symmetry of the lowest-level operations; reading and
+writing handle things in opposite order.  The rest of this section
+describes the two facilities surrounding the three variables named
+above, as well as some related functions.  @ref{Coding Systems}, for
+details on character encoding and decoding.
+
+@node Format Conversion Round-Trip
+@subsection Round-Trip Specification
+
+  The most general of the two facilities is controlled by the variable
+@code{format-alist}, a list of @dfn{file format} specifications, which
+describe textual representations used in files for the data in an Emacs
+buffer.  The descriptions for reading and writing are paired, which is
+why we call this ``round-trip'' specification
+(@pxref{Format Conversion Piecemeal}, for non-paired specification).
 
 @defvar format-alist
 This list contains one format definition for each defined file format.
-@end defvar
-
-@cindex format definition
 Each format definition is a list of this form:
 
 @example
 (@var{name} @var{doc-string} @var{regexp} @var{from-fn} @var{to-fn} @var{modify} @var{mode-fn})
 @end example
-
+@end defvar
+
+@cindex format definition
+@noindent
 Here is what the elements in a format definition mean:
 
 @table @var
@@ -2855,9 +2903,10 @@
 If @var{to-fn} is a string, it is a shell command; Emacs runs the
 command as a filter to perform the conversion.
 
-If @var{to-fn} is a function, it is called with two arguments, @var{begin}
-and @var{end}, which specify the part of the buffer it should convert.
-There are two ways it can do the conversion:
+If @var{to-fn} is a function, it is called with three arguments:
+@var{begin} and @var{end}, which specify the part of the buffer it
+should convert, and @var{buffer}, which specifies which buffer.  There
+are two ways it can do the conversion:
 
 @itemize @bullet
 @item
@@ -2955,6 +3004,89 @@
 in all buffers.
 @end defvar
 
+@node Format Conversion Piecemeal
+@subsection Piecemeal Specification
+
+  In contrast to the round-trip specification described in the previous
+subsection (@pxref{Format Conversion Round-Trip}), you can use the variables
+@code{after-insert-file-functions} and @code{write-region-annotate-functions}
+to separately control the respective reading and writing conversions.
+
+  Conversion starts with one representation and produces another
+representation.  When there is only one conversion to do, there is no
+conflict about what to start with.  However, when there are multiple
+conversions involved, conflict may arise when two conversions need to
+start with the same data.
+
+  This situation is best understood in the context of converting text
+properties during @code{write-region}.  For example, the character at
+position 42 in a buffer is @samp{X} with a text property @code{foo}.  If
+the conversion for @code{foo} is done by inserting into the buffer, say,
+@samp{FOO:}, then that changes the character at position 42 from
+@samp{X} to @samp{F}.  The next conversion will start with the wrong
+data straight away.
+
+  To avoid conflict, cooperative conversions do not modify the buffer,
+but instead specify @dfn{annotations}, a list of elements of the form
+@code{(@var{position} . @var{string})}, sorted in order of increasing
+@var{position}.
+
+  If there is more than one conversion, @code{write-region} merges their
+annotations destructively into one sorted list.  Later, when the text
+from the buffer is actually written to the file, it intermixes the
+specified annotations at the corresponding positions.  All this takes
+place without modifying the buffer.
+
+@c ??? What about ``overriding'' conversions like those allowed
+@c ??? for `write-region-annotate-functions', below?  --ttn
+
+  In contrast, when reading, the annotations intermixed with the text
+are handled immediately.  @code{insert-file-contents} sets point to the
+beginning of some text to be converted, then calls the conversion
+functions with the length of that text.  These functions should always
+return with point at the beginning of the inserted text.  This approach
+makes sense for reading because annotations removed by the first
+converter can't be mistakenly processed by a later converter.
+
+  Each conversion function should scan for the annotations it
+recognizes, remove the annotation, modify the buffer text (to set a text
+property, for example), and return the updated length of the text, as it
+stands after those changes.  The value returned by one function becomes
+the argument to the next function.
+
+@defvar write-region-annotate-functions
+A list of functions for @code{write-region} to call.  Each function in
+the list is called with two arguments: the start and end of the region
+to be written.  These functions should not alter the contents of the
+buffer.  Instead, they should return annotations.
+
+@c ??? Following adapted from comment in `build_annotations' (fileio.c).
+@c ??? Perhaps this is intended for internal use only?
+@c ??? Someone who understands this, please reword it. --ttn
+As a special case, if a function returns with a different buffer
+current, Emacs takes it to mean the current buffer contains altered text
+to be output, and discards all previous annotations because they should
+have been dealt with by this function.
+@end defvar
+
+@defvar after-insert-file-functions
+Each function in this list is called by @code{insert-file-contents}
+with one argument, the number of characters inserted, and should
+return the new character count, leaving point the same.
+@c ??? The docstring mentions a handler from `file-name-handler-alist'
+@c     "intercepting" `insert-file-contents'.  Hmmm.  --ttn
+@end defvar
+
+  We invite users to write Lisp programs to store and retrieve text
+properties in files, using these hooks, and thus to experiment with
+various data formats and find good ones.  Eventually we hope users
+will produce good, general extensions we can install in Emacs.
+
+  We suggest not trying to handle arbitrary Lisp objects as text property
+names or values---because a program that general is probably difficult
+to write, and slow.  Instead, choose a set of possible data types that
+are reasonably flexible, and not too hard to encode.
+
 @ignore
    arch-tag: 141f74ce-6ae3-40dc-a6c4-ef83fc4ec35c
 @end ignore
--- a/lispref/help.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/lispref/help.texi	Fri May 11 18:24:42 2007 +0000
@@ -384,6 +384,10 @@
 @end group
 @end smallexample
 
+  There are other special conventions for the text in documentation
+strings---for instance, you can refer to functions, variables, and
+sections of this manual.  @xref{Documentation Tips}, for details.
+
 @node Describing Characters
 @section Describing Characters for Help Messages
 @cindex describe characters and events
--- a/lispref/hooks.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/lispref/hooks.texi	Fri May 11 18:24:42 2007 +0000
@@ -48,7 +48,7 @@
 @xref{Init File}.
 
 @item after-insert-file-functions
-@xref{Saving Properties}.
+@xref{Format Conversion}.
 
 @item after-make-frame-functions
 @xref{Creating Frames}.
@@ -330,7 +330,7 @@
 @xref{Saving Buffers}.
 
 @item write-region-annotate-functions
-@xref{Saving Properties}.
+@xref{Format Conversion}.
 @end table
 
 @ignore
--- a/lispref/keymaps.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/lispref/keymaps.texi	Fri May 11 18:24:42 2007 +0000
@@ -1895,7 +1895,8 @@
 @smallexample
 @group
 (where-is-internal 'describe-function)
-    @result{} ("\^hf" "\^hd")
+    @result{} ([8 102] [f1 102] [help 102]
+         [menu-bar help-menu describe describe-function])
 @end group
 @end smallexample
 @end defun
@@ -2094,7 +2095,17 @@
 string.  Thus, the string need not be a constant.  The third element,
 @var{real-binding}, is the command to execute.  The tail of the list,
 @var{item-property-list}, has the form of a property list which contains
-other information.  Here is a table of the properties that are supported:
+other information.
+
+  When an equivalent keyboard key binding is cached, the extended menu
+item binding looks like this:
+
+@example
+(menu-item @var{item-name} @var{real-binding} (@var{key-binding-data})
+    . @var{item-property-list})
+@end example
+
+  Here is a table of the properties that are supported:
 
 @table @code
 @item :enable @var{form}
@@ -2180,13 +2191,6 @@
 safely be called at any time.
 @end table
 
-  When an equivalent key binding is cached, the binding looks like this.
-
-@example
-(menu-item @var{item-name} @var{real-binding} (@var{key-binding-data})
-    . @var{item-property-list})
-@end example
-
 @node Menu Separators
 @subsubsection Menu Separators
 @cindex menu separators
--- a/lispref/modes.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/lispref/modes.texi	Fri May 11 18:24:42 2007 +0000
@@ -616,6 +616,11 @@
 @code{auto-mode-alist} gets to decide the mode.
 @end defvar
 
+@defvar file-start-mode-alist
+This works like @code{magic-mode-alist}, except that it is handled
+only if @code{auto-mode-alist} does not specify a mode for this file.
+@end defvar
+
 @defvar auto-mode-alist
 This variable contains an association list of file name patterns
 (regular expressions) and corresponding major mode commands.  Usually,
--- a/lispref/processes.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/lispref/processes.texi	Fri May 11 18:24:42 2007 +0000
@@ -1307,13 +1307,13 @@
 periods.  The former specifies a period measured in seconds and the
 latter specifies one measured in milliseconds.  The two time periods
 thus specified are added together, and @code{accept-process-output}
-returns after that much time whether or not there has been any
+returns after that much time, whether or not there has been any
 subprocess output.
-
-The argument @var{seconds} need not be an integer.  If it is a floating
-point number, this function waits for a fractional number of seconds.
-If @var{seconds} is 0, the function accepts whatever output is
-pending but does not wait.
+  
+The argument @var{millisec} is semi-obsolete nowadays because
+@var{seconds} can be a floating point number to specify waiting a
+fractional number of seconds.  If @var{seconds} is 0, the function
+accepts whatever output is pending but does not wait.
 
 @c Emacs 22.1 feature
 If @var{process} is a process, and the argument @var{just-this-one} is
--- a/lispref/text.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/lispref/text.texi	Fri May 11 18:24:42 2007 +0000
@@ -2577,8 +2577,6 @@
 * Format Properties::      Properties for representing formatting of text.
 * Sticky Properties::      How inserted text gets properties from
                              neighboring text.
-* Saving Properties::      Saving text properties in files, and reading
-                             them back.
 * Lazy Properties::        Computing text properties in a lazy fashion
                              only when text is examined.
 * Clickable Text::         Using text properties to make regions of text
@@ -3195,6 +3193,9 @@
 @code{inhibit-modification-hooks} to @code{t} around doing so, to
 avoid confusing the internal mechanism that calls these hooks.
 
+Overlays also support the @code{modification-hooks} property, but the
+details are somewhat different (@pxref{Overlay Properties}).
+
 @item insert-in-front-hooks
 @itemx insert-behind-hooks
 @kindex insert-in-front-hooks @r{(text property)}
@@ -3262,22 +3263,25 @@
 @item composition
 @kindex composition @r{(text property)}
 This text property is used to display a sequence of characters as a
-single glyph composed from components.  For instance, Thai base
+single glyph composed from components.  For instance, in Thai a base
 consonant is composed with the following combining vowel as a single
-glyph.
-
-The value is a character or a sequence (vector, list, or
-string) of integers.
-
-If it is a character, it is an alternate character to display instead
+glyph.  The value should be a character or a sequence (vector, list,
+or string) of integers.
+
+@itemize @bullet
+@item
+If it is a character, it means to display that character instead of
+the text in the region.
+
+@item
+If it is a string, it means to display that string's contents instead
 of the text in the region.
 
-If it is a string, it is an alternate character sequences to
-display.
-
-If it is a vector or list, it is a sequence of alternate
-characters interleaved with internal codes specifying how to
-compose the following character with the previous one.
+@item
+If it is a vector or list, the elements are characters interleaved
+with internal codes specifying how to compose the following character
+with the previous one.
+@end itemize
 @end table
 
 @node Format Properties
@@ -3393,75 +3397,6 @@
   @xref{Insertion}, for the ordinary insertion functions which do not
 inherit.
 
-@node Saving Properties
-@subsection Saving Text Properties in Files
-@cindex text properties in files
-@cindex saving text properties
-
-  You can save text properties in files (along with the text itself),
-and restore the same text properties when visiting or inserting the
-files, using these two hooks:
-
-@defvar write-region-annotate-functions
-This variable's value is a list of functions for @code{write-region} to
-run to encode text properties in some fashion as annotations to the text
-being written in the file.  @xref{Writing to Files}.
-
-Each function in the list is called with two arguments: the start and
-end of the region to be written.  These functions should not alter the
-contents of the buffer.  Instead, they should return lists indicating
-annotations to write in the file in addition to the text in the
-buffer.
-
-Each function should return a list of elements of the form
-@code{(@var{position} . @var{string})}, where @var{position} is an
-integer specifying the relative position within the text to be written,
-and @var{string} is the annotation to add there.
-
-Each list returned by one of these functions must be already sorted in
-increasing order by @var{position}.  If there is more than one function,
-@code{write-region} merges the lists destructively into one sorted list.
-
-When @code{write-region} actually writes the text from the buffer to the
-file, it intermixes the specified annotations at the corresponding
-positions.  All this takes place without modifying the buffer.
-@end defvar
-
-@defvar after-insert-file-functions
-This variable holds a list of functions for @code{insert-file-contents}
-to call after inserting a file's contents.  These functions should scan
-the inserted text for annotations, and convert them to the text
-properties they stand for.
-
-Each function receives one argument, the length of the inserted text;
-point indicates the start of that text.  The function should scan that
-text for annotations, delete them, and create the text properties that
-the annotations specify.  The function should return the updated length
-of the inserted text, as it stands after those changes.  The value
-returned by one function becomes the argument to the next function.
-
-These functions should always return with point at the beginning of
-the inserted text.
-
-The intended use of @code{after-insert-file-functions} is for converting
-some sort of textual annotations into actual text properties.  But other
-uses may be possible.
-@end defvar
-
-We invite users to write Lisp programs to store and retrieve text
-properties in files, using these hooks, and thus to experiment with
-various data formats and find good ones.  Eventually we hope users
-will produce good, general extensions we can install in Emacs.
-
-We suggest not trying to handle arbitrary Lisp objects as text property
-names or values---because a program that general is probably difficult
-to write, and slow.  Instead, choose a set of possible data types that
-are reasonably flexible, and not too hard to encode.
-
-@xref{Format Conversion}, for a related feature.
-
-@c ??? In next edition, merge this info Format Conversion.
-
 @node Lazy Properties
 @subsection Lazy Computation of Text Properties
 
--- a/lispref/tips.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/lispref/tips.texi	Fri May 11 18:24:42 2007 +0000
@@ -648,6 +648,12 @@
 variable.  Please use complete sentences for the rest of the text too.
 
 @item
+When the user tries to use a disabled command, Emacs displays just the
+first paragraph of its documentation string---everything through the
+first blank line.  If you wish, you can choose which information to
+include before the first blank line so as to make this display useful.
+
+@item
 The first line should mention all the important arguments of the
 function, and should mention them in the order that they are written
 in a function call.  If the function has many arguments, then it is
@@ -656,69 +662,6 @@
 important arguments.
 
 @item
-For consistency, phrase the verb in the first sentence of a function's
-documentation string as an imperative---for instance, use ``Return the
-cons of A and B.'' in preference to ``Returns the cons of A and B@.''
-Usually it looks good to do likewise for the rest of the first
-paragraph.  Subsequent paragraphs usually look better if each sentence
-is indicative and has a proper subject.
-
-@item
-Write documentation strings in the active voice, not the passive, and in
-the present tense, not the future.  For instance, use ``Return a list
-containing A and B.'' instead of ``A list containing A and B will be
-returned.''
-
-@item
-Avoid using the word ``cause'' (or its equivalents) unnecessarily.
-Instead of, ``Cause Emacs to display text in boldface,'' write just
-``Display text in boldface.''
-
-@item
-When a command is meaningful only in a certain mode or situation,
-do mention that in the documentation string.  For example,
-the documentation of @code{dired-find-file} is:
-
-@example
-In Dired, visit the file or directory named on this line.
-@end example
-
-@item
-Do not start or end a documentation string with whitespace.
-
-@item
-@strong{Do not} indent subsequent lines of a documentation string so
-that the text is lined up in the source code with the text of the first
-line.  This looks nice in the source code, but looks bizarre when users
-view the documentation.  Remember that the indentation before the
-starting double-quote is not part of the string!
-
-@item
-When the user tries to use a disabled command, Emacs displays just the
-first paragraph of its documentation string---everything through the
-first blank line.  If you wish, you can choose which information to
-include before the first blank line so as to make this display useful.
-
-@item
-When you define a variable that users ought to set interactively, you
-normally should use @code{defcustom}.  However, if for some reason you
-use @code{defvar} instead, start the doc string with a @samp{*}.
-@xref{Defining Variables}.
-
-@item
-The documentation string for a variable that is a yes-or-no flag should
-start with words such as ``Non-nil means,'' to make it clear that
-all non-@code{nil} values are equivalent and indicate explicitly what
-@code{nil} and non-@code{nil} mean.
-
-@item
-The documentation string for a function that is a yes-or-no predicate
-should start with words such as ``Return t if,'' to indicate
-explicitly what constitutes ``truth.''  The word ``return'' avoids
-starting the sentence with lower-case ``t,'' which could be somewhat
-distracting.
-
-@item
 When a function's documentation string mentions the value of an argument
 of the function, use the argument name in capital letters as if it were
 a name for that value.  Thus, the documentation string of the function
@@ -754,16 +697,14 @@
 is not at the start of it.
 
 @item
-If a line in a documentation string begins with an open-parenthesis,
-write a backslash before the open-parenthesis, like this:
+Do not start or end a documentation string with whitespace.
 
-@example
-The argument FOO can be either a number
-\(a buffer position) or a string (a file name).
-@end example
-
-This prevents the open-parenthesis from being treated as the start of a
-defun (@pxref{Defuns,, Defuns, emacs, The GNU Emacs Manual}).
+@item
+@strong{Do not} indent subsequent lines of a documentation string so
+that the text is lined up in the source code with the text of the first
+line.  This looks nice in the source code, but looks bizarre when users
+view the documentation.  Remember that the indentation before the
+starting double-quote is not part of the string!
 
 @anchor{Docstring hyperlinks}
 @item
@@ -781,6 +722,7 @@
 convention, with single-quotes for all symbols.)
 @end ifnottex
 
+@cindex hyperlinks in documentation strings
 Help mode automatically creates a hyperlink when a documentation string
 uses a symbol name inside single quotes, if the symbol has either a
 function or a variable definition.  You do not need to do anything
@@ -863,6 +805,65 @@
 display of the documentation string will become slow.  So use this to
 describe the most important commands in your major mode, and then use
 @samp{\\@{@dots{}@}} to display the rest of the mode's keymap.
+
+@item
+For consistency, phrase the verb in the first sentence of a function's
+documentation string as an imperative---for instance, use ``Return the
+cons of A and B.'' in preference to ``Returns the cons of A and B@.''
+Usually it looks good to do likewise for the rest of the first
+paragraph.  Subsequent paragraphs usually look better if each sentence
+is indicative and has a proper subject.
+
+@item
+The documentation string for a function that is a yes-or-no predicate
+should start with words such as ``Return t if,'' to indicate
+explicitly what constitutes ``truth.''  The word ``return'' avoids
+starting the sentence with lower-case ``t,'' which could be somewhat
+distracting.
+
+@item
+If a line in a documentation string begins with an open-parenthesis,
+write a backslash before the open-parenthesis, like this:
+
+@example
+The argument FOO can be either a number
+\(a buffer position) or a string (a file name).
+@end example
+
+This prevents the open-parenthesis from being treated as the start of a
+defun (@pxref{Defuns,, Defuns, emacs, The GNU Emacs Manual}).
+
+@item
+Write documentation strings in the active voice, not the passive, and in
+the present tense, not the future.  For instance, use ``Return a list
+containing A and B.'' instead of ``A list containing A and B will be
+returned.''
+
+@item
+Avoid using the word ``cause'' (or its equivalents) unnecessarily.
+Instead of, ``Cause Emacs to display text in boldface,'' write just
+``Display text in boldface.''
+
+@item
+When a command is meaningful only in a certain mode or situation,
+do mention that in the documentation string.  For example,
+the documentation of @code{dired-find-file} is:
+
+@example
+In Dired, visit the file or directory named on this line.
+@end example
+
+@item
+When you define a variable that users ought to set interactively, you
+normally should use @code{defcustom}.  However, if for some reason you
+use @code{defvar} instead, start the doc string with a @samp{*}.
+@xref{Defining Variables}.
+
+@item
+The documentation string for a variable that is a yes-or-no flag should
+start with words such as ``Non-nil means,'' to make it clear that
+all non-@code{nil} values are equivalent and indicate explicitly what
+@code{nil} and non-@code{nil} mean.
 @end itemize
 
 @node Comment Tips
--- a/mac/ChangeLog	Sun Apr 22 13:47:56 2007 +0000
+++ b/mac/ChangeLog	Fri May 11 18:24:42 2007 +0000
@@ -1,3 +1,13 @@
+2007-04-26  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* INSTALL: Fix description about using colors in terminal.
+	Fix typos (/Application -> /Applications).
+
+2007-04-26  Glenn Morris  <rgm@gnu.org>
+
+	* Emacs.app/Contents/Resources/English.lproj/InfoPlist.strings:
+	* src/Emacs.r: Increase version to 22.1.50.
+
 2007-04-09  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
 	* make-package (compver): Don't hardcode processor type.
--- a/mac/Emacs.app/Contents/Resources/English.lproj/InfoPlist.strings	Sun Apr 22 13:47:56 2007 +0000
+++ b/mac/Emacs.app/Contents/Resources/English.lproj/InfoPlist.strings	Fri May 11 18:24:42 2007 +0000
@@ -1,5 +1,5 @@
 /* Localized versions of Info.plist keys */
 
 CFBundleName = "Emacs";
-CFBundleShortVersionString = "22.0.98";
-CFBundleGetInfoString = "22.0.98, Copyright (C) 2007 Free Software Foundation, Inc.";
+CFBundleShortVersionString = "22.1.50";
+CFBundleGetInfoString = "22.1.50, Copyright (C) 2007 Free Software Foundation, Inc.";
--- a/mac/INSTALL	Sun Apr 22 13:47:56 2007 +0000
+++ b/mac/INSTALL	Fri May 11 18:24:42 2007 +0000
@@ -21,8 +21,8 @@
 recommended; see the notes section below for more details.
 
 The --enable-carbon-app specifies that the Carbon GUI application
-should be installed into /Application.  If you want it to install in a
-different location, specify --enable-carbon-app=<mydir>
+should be installed into /Applications.  If you want it to install in
+a different location, specify --enable-carbon-app=<mydir>
 
 You can type `make bootstrap' instead of `make' to rebuild everything,
 including byte-compiling the Lisp files.
@@ -44,7 +44,7 @@
 To start Emacs as a GUI application from the terminal, the pathname to
 the executable in the bundle, i.e.,
 
-  /Application/Emacs.app/Contents/MacOS/Emacs
+  /Applications/Emacs.app/Contents/MacOS/Emacs
 
 must be typed to the shell to enable Emacs to locate its resources
 correctly.  You may want to create an alias to this path to quickly
@@ -60,8 +60,8 @@
 Note that the Carbon-specific functions mentioned above are not
 available on the X11-enabled build.
 
-To use colors in a terminal, put the following lines in the file
-~/.termcap and log in again.
+To use colors in Terminal.app on Mac OS X 10.1, put the following
+lines in the file ~/.termcap and log in again.
 
 -----
 # added ANSI color
--- a/mac/src/Emacs.r	Sun Apr 22 13:47:56 2007 +0000
+++ b/mac/src/Emacs.r	Fri May 11 18:24:42 2007 +0000
@@ -219,12 +219,12 @@
 
 resource 'vers' (1) {
 	0x22,		/* Major revision in BCD */
-	0x0,		/* Minor revision in BCD */
-	alpha,	/* development, alpha, beta, or final (release) */
-	98,		/* Non-final release # */
+	0x1,		/* Minor revision in BCD */
+	development,	/* development, alpha, beta, or final (release) */
+	50,		/* Non-final release # */
 	0,		/* Region code */
-	"22.0.98",	/* Short version number */
-	"22.0.98, Copyright \0xa9 2007 "
+	"22.1.50",	/* Short version number */
+	"22.1.50, Copyright \0xa9 2007 "
 	"Free Software Foundation, Inc." /* Long version number */
 };
 
--- a/man/.cvsignore	Sun Apr 22 13:47:56 2007 +0000
+++ b/man/.cvsignore	Fri May 11 18:24:42 2007 +0000
@@ -9,6 +9,7 @@
 *.log
 *.op
 *.ops
+*.pdf
 *.pg
 *.pgs
 *.ps
--- a/man/ChangeLog	Sun Apr 22 13:47:56 2007 +0000
+++ b/man/ChangeLog	Fri May 11 18:24:42 2007 +0000
@@ -1,3 +1,122 @@
+2007-05-09  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* gnus.texi (Running NNDiary): Use ~/.gnus.el instead of gnusrc.
+
+2007-05-09  Didier Verna  <didier@xemacs.org>
+
+	* gnus.texi (Email Based Diary): New. Proper documentation for the
+	nndiary back end and the gnus-diary library.
+
+2007-05-07  Karl Berry  <karl@gnu.org>
+
+	* emacs.texi (EMACSVER): back to 22.
+
+2007-05-06  Richard Stallman  <rms@gnu.org>
+
+	* maintaining.texi (Create Tags Table): Clean up previous change.
+
+2007-05-05  Francesco Potort,Al(B  <pot@gnu.org>
+
+	* maintaining.texi (Create Tags Table): Add text about the dangers of
+	making symbolic links to tags files.
+
+2007-05-04  Karl Berry  <karl@gnu.org>
+
+	* emacs.texi (EMACSVER) [smallbook]: 22.1 for printed version, not 22.
+
+2007-05-03  Karl Berry  <karl@gnu.org>
+
+	* emacs.texi (EMACSVER) [smallbook]: 22 for printed version.
+
+	* .cvsignore (*.pdf): new entry.
+
+	* texinfo.tex: update from current version for better pdf generation.
+
+	* emacs.texi (\urlcolor, \linkcolor) [smallbook]: \let to \Black
+	for printing.
+
+2007-05-01  Richard Stallman  <rms@gnu.org>
+
+	* cmdargs.texi (Initial Options): Under --batch, mention --eval.
+
+2007-04-30  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* gnus.texi (Article Highlighting): Clarify gnus-cite-parse-max-size.
+
+2007-04-28  Glenn Morris  <rgm@gnu.org>
+
+	* ack.texi (Acknowledgments):
+	* anti.texi (Antinews):
+	* faq.texi (New in Emacs 22):
+	* programs.texi (Program Modes): Restore mention of python.el pending
+	consideration of legal status.
+
+2007-04-28  Richard Stallman  <rms@gnu.org>
+
+	* files.texi (File Names): Fixes to ~ description on MS systems.
+
+2007-04-27  J.D. Smith  <jdsmith@as.arizona.edu>
+
+	* idlwave.texi: Minor updates for IDLWAVE 6.1.
+
+2007-04-26  Glenn Morris  <rgm@gnu.org>
+
+	* emacs.texi (EMACSVER): Increase to 22.1.50.
+
+2007-04-25  Karl Berry  <karl@gnu.org>
+
+	* emacs.texi: Improve line breaks on copyright page,
+	similar layout to lispref, 8.5x11 by default.
+
+	* dired.texi (Image-Dired): Improve line break, fix typo.
+
+2007-04-24  Chong Yidong  <cyd@stupidchicken.com>
+
+	* programs.texi (Program Modes):
+	* faq.texi (New in Emacs 22):
+	* anti.texi (Antinews):
+	* ack.texi (Acknowledgments): python.el removed.
+
+2007-04-23  Jay Belanger  <jay.p.belanger@gmail.com>
+
+	* calc.texi (Reporting bugs): Update maintainer's address.
+
+2007-04-23  Chong Yidong  <cyd@stupidchicken.com>
+
+	* display.texi (Highlight Interactively): Correct description of
+	hi-lock-file-patterns-policy.
+
+	* files.texi (File Archives): Mention self-extracting executables.
+
+2007-04-23  Eli Zaretskii  <eliz@gnu.org>
+
+	* search.texi (Unconditional Replace, Query Replace): Add xref to
+	"Replacement and Case".
+
+2007-04-22  Chong Yidong  <cyd@stupidchicken.com>
+
+	* dired.texi (Image-Dired): Move from Thumbnails node.
+	* misc.texi (Thumbnails): Node deleted.
+	* emacs.texi (Top): Update node listing.
+
+	* files.texi (File Conveniences):
+	* ack.texi (Acknowledgments):
+	* faq.texi (New in Emacs 22): Rename "tumme" to "image-dired".
+
+2007-04-21  Richard Stallman  <rms@gnu.org>
+
+	* display.texi (Highlight Interactively): Correct previous change.
+	Clarify doc of hi-lock-find-patterns, and move new features into it.
+
+2007-04-20  David Koppelman  <koppel@ece.lsu.edu>
+
+	* display.texi (Highlight Interactively): Document
+	hi-lock-file-patterns-policy.
+
+2007-04-20  Martin Rudalics  <rudalics@gmx.at>
+
+	* display.texi (Scrolling): Fix typo.
+
 2007-04-15  Jay Belanger  <belanger@truman.edu>
 
 	* calc.texi (Title page): Remove the date.
@@ -26,7 +145,7 @@
 	* emacs.texi: Insert node heading for GFDL.
 
 	* dired-x.texi: Relicence under GFDL.  Remove date from title page.
-	
+
 	* calc.texi (Algebraic Tutorial): Emphasize that / binds less strongly
 	than *.
 
@@ -69,7 +188,7 @@
 	8.5x11 format.
 	* mule.texi (Language Environments): \hbadness=10000 since there's
 	no way to reword.
-	* emacs.texi (smallbook): new @set to more easily switch between
+	* emacs.texi (smallbook): New @set to more easily switch between
 	smallbook and 8.5x11.
 
 2007-04-11  Richard Stallman  <rms@gnu.org>
--- a/man/ack.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/man/ack.texi	Fri May 11 18:24:42 2007 +0000
@@ -186,8 +186,8 @@
 for compiled Emacs Lisp code.
 
 @item
-Mathias Dahl wrote @file{tumme.el}, a package for viewing image files
-as ``thumbnails.''
+Mathias Dahl wrote @file{image-dired.el}, a package for viewing image
+files as ``thumbnails.''
 
 @item
 Michael DeCorte wrote @file{emacs.csh}, a C-shell script that starts a
@@ -682,7 +682,7 @@
 @file{latin1-disp.el}, a package that lets you display ISO 8859
 characters on Latin-1 terminals by setting up appropriate display
 tables,
-@item
+@item                                                                          
 @file{python.el}, a major mode for the Python programming language.
 @item
 @file{refill.el}, a mode for automatic paragraph refilling, akin to
--- a/man/calc.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/man/calc.texi	Fri May 11 18:24:42 2007 +0000
@@ -35165,7 +35165,7 @@
 If you find a bug in Calc, send e-mail to Jay Belanger,
 
 @example
-belanger@@truman.edu
+jay.p.belanger@@gmail.com
 @end example
 
 @noindent
--- a/man/cmdargs.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/man/cmdargs.texi	Fri May 11 18:24:42 2007 +0000
@@ -215,8 +215,8 @@
 @itemx --batch
 Run Emacs in @dfn{batch mode}.  Batch mode is used for running
 programs written in Emacs Lisp from shell scripts, makefiles, and so
-on.  You should also use the @samp{-l} option or @samp{-f} option, to
-invoke a Lisp program to do batch processing.
+on.  You should also use the @samp{-l}, @samp{-f} or @samp{--eval}
+option, to invoke a Lisp program to do batch processing.
 
 In batch mode, Emacs does not display the text being edited, and the
 standard terminal interrupt characters such as @kbd{C-z} and @kbd{C-c}
--- a/man/dired.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/man/dired.texi	Fri May 11 18:24:42 2007 +0000
@@ -44,6 +44,7 @@
 * Updating: Dired Updating.   Discarding lines for files of no interest.
 * Find: Dired and Find.	      Using `find' to choose the files for Dired.
 * Wdired::                    Operating on files by editing the Dired buffer.
+* Image-Dired::               Viewing image thumbnails in Dired
 * Misc: Misc Dired Features.  Various other features.
 @end menu
 
@@ -920,6 +921,9 @@
 subdirectory's contents.  Use @kbd{C-u k} on the subdirectory header
 line to delete the subdirectory.  @xref{Dired Updating}.
 
+
+
+
 @ifnottex
 @include dired-xtra.texi
 @end ifnottex
@@ -1174,6 +1178,78 @@
 world-writable.  These changes also take effect when you type @kbd{C-c
 C-c}.
 
+@node Image-Dired
+@section Viewing Image Thumbnails in Dired
+@cindex image-dired mode
+@cindex image-dired
+
+  Image-Dired is a facility for browsing image files.  It provides viewing
+the images either as thumbnails or in full size, either inside Emacs
+or through an external viewer.
+
+@kindex C-t d @r{(Image-Dired)}
+@findex image-dired-display-thumbs
+  To enter Image-Dired, mark the image files you want to look at in
+the Dired buffer, using @kbd{m} as usual.  Then type @kbd{C-t d}
+(@code{image-dired-display-thumbs}).  This creates and switches to a
+buffer containing image-dired, corresponding to the marked files.
+
+  You can also enter Image-Dired directly by typing @kbd{M-x
+image-dired}.  This prompts for a directory; specify one that has
+image files.  This creates thumbnails for all the images in that
+directory, and displays them all in the ``thumbnail buffer.''  This
+takes a long time if the directory contains many image files, and it
+asks for confirmation if the number of image files exceeds
+@code{image-dired-show-all-from-dir-max-files}.
+
+  With point in the thumbnail buffer, you can type @kbd{RET}
+(@code{image-dired-display-thumbnail-original-image}) to display a
+sized version of it in another window.  This sizes the image to fit
+the window.  Use the arrow keys to move around in the buffer.  For
+easy browsing, use @kbd{SPC}
+(@code{image-dired-display-next-thumbnail-original}) to advance and
+display the next image.  Typing @kbd{DEL}
+(@code{image-dired-display-previous-thumbnail-original}) backs up to
+the previous thumbnail and displays that instead.
+
+@vindex image-dired-external-viewer
+  To view and the image in its original size, either provide a prefix
+argument (@kbd{C-u}) before pressing @kbd{RET}, or type
+@kbd{C-@key{RET}} (@code{image-dired-thumbnail-display-external}) to
+display the image in an external viewer.  You must first configure
+@code{image-dired-external-viewer}.
+
+  You can delete images through Image-Dired also.  Type @kbd{d}
+(@code{image-dired-flag-thumb-original-file}) to flag the image file
+for deletion in the Dired buffer.  You can also delete the thumbnail
+image from the thumbnail buffer with @kbd{C-d}
+(@code{image-dired-delete-char}).
+
+  More advanced features include @dfn{image tags}, which are metadata
+used to categorize image files.  The tags are stored in a plain text
+file configured by @code{image-dired-db-file}.
+
+  To tag image files, mark them in the dired buffer (you can also mark
+files in Dired from the thumbnail buffer by typing @kbd{m}) and type
+@kbd{C-t t} (@code{image-dired-tag-files}).  You will be prompted for
+a tag.  To mark files having a certain tag, type @kbd{C-t f}
+(@code{image-dired-mark-tagged-files}).  After marking image files
+with a certain tag, you can use @kbd{C-t d} to view them.
+
+  You can also tag a file directly from the thumbnail buffer by typing
+@kbd{t t} and you can remove a tag 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.  Type @kbd{C-t c} to add
+a comment from Dired (@code{image-dired-dired-comment-files}).
+
+  Image-Dired also provides simple image manipulation.  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 is lossless, and uses an external utility called JpegTRAN.
+
 @node Misc Dired Features
 @section Other Dired Features
 
--- a/man/display.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/man/display.texi	Fri May 11 18:24:42 2007 +0000
@@ -128,7 +128,7 @@
 @code{scroll-preserve-screen-position} to a non-@code{nil} value.  In
 this mode, when these commands would scroll the text around point off
 the screen, or within @code{scroll-margin} lines of the edge, they
-moves point to keep the same vertical position within the window.
+move point to keep the same vertical position within the window.
 This mode is convenient for browsing through a file by scrolling by
 screenfuls; if you come back to the screen where you started, point
 goes back to the line where it started.  However, this mode is
@@ -651,15 +651,14 @@
 
 @cindex Hi Lock mode
 @findex hi-lock-mode
-  Hi Lock mode is another minor mode, which highlights text that
-matches your specified regular expressions.  For example, you might
-wish to see all the references to a certain variable in a program
-source file, highlight certain parts in a voluminous output of some
-program, or make certain names stand out in an article.  Use the
-@kbd{M-x hi-lock-mode} command to enable (or disable) Hi Lock mode.
-To enable Hi Lock mode for all buffers, use @kbd{M-x
-global-hi-lock-mode} or place @code{(global-hi-lock-mode 1)} in your
-@file{.emacs} file.
+  Hi Lock mode highlights text that matches regular expressions you
+specify.  For example, you might wish to see all the references to a
+certain variable in a program source file, highlight certain parts in
+a voluminous output of some program, or make certain names stand out
+in an article.  Use the @kbd{M-x hi-lock-mode} command to enable (or
+disable) Hi Lock mode.  To enable Hi Lock mode for all buffers, use
+@kbd{M-x global-hi-lock-mode} or place @code{(global-hi-lock-mode 1)}
+in your @file{.emacs} file.
 
   Hi Lock mode works like Font Lock mode (@pxref{Font Lock}), except
 that you specify explicitly the regular expressions to highlight.  You
@@ -711,26 +710,36 @@
 program.  (This key binding runs the
 @code{hi-lock-write-interactive-patterns} command.)
 
-These patterns will be read the next time you visit the file while
-Hi Lock mode is enabled, or whenever you use the @kbd{M-x
-hi-lock-find-patterns} command.
+These patterns are extracted from the comments, if appropriate, if you
+invoke @kbd{M-x hi-lock-find-patterns}, or if you visit the file while
+Hi Lock mode is enabled (since that runs @code{hi-lock-find-patterns}).
 
 @item C-x w i
 @kindex C-x w i
 @findex hi-lock-find-patterns
-@vindex hi-lock-exclude-modes
-Re-read regexp/face pairs in the current buffer
-(@code{hi-lock-write-interactive-patterns}).  Users familiar with Font
-Lock keywords might interactively enter patterns
-(@code{highlight-regexp}), write them into the file
-(@code{hi-lock-write-interactive-patterns}), edit them, perhaps
+Extract regexp/face pairs from comments in the current buffer
+(@code{hi-lock-find-patterns}).  Thus, you can enter patterns
+interactively with @code{highlight-regexp}, store them into the file
+with @code{hi-lock-write-interactive-patterns}, edit them (perhaps
 including different faces for different parenthesized parts of the
-match, and finally use this command
-(@code{hi-lock-write-interactive-patterns}) to have Hi Lock highlight
-them.
+match), and finally use this command (@code{hi-lock-find-patterns}) to
+have Hi Lock highlight the edited patterns.
 
-This command does nothing if the current major mode's symbol is a member
-of the list @code{hi-lock-exclude-modes}.
+@vindex hi-lock-file-patterns-policy
+The variable @code{hi-lock-file-patterns-policy} controls whether Hi
+Lock mode should automatically extract and highlight patterns found in
+a file when it is visited.  Its value can be @code{nil} (never
+highlight), @code{t} (highlight the patterns), @code{ask} (query the
+user), or a function.  If it is a function,
+@code{hi-lock-find-patterns} calls it with the patterns as argument;
+if the function returns non-@code{nil}, the patterns are used.  The
+default is @code{nil}.  Note that patterns are always highlighted if
+you call @code{hi-lock-find-patterns} directly, regardless of the
+value of this variable.
+
+@vindex hi-lock-exclude-modes
+Also, @code{hi-lock-find-patterns} does nothing if the current major
+mode's symbol is a member of the list @code{hi-lock-exclude-modes}.
 @end table
 
 @node Fringes
--- a/man/emacs.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/man/emacs.texi	Fri May 11 18:24:42 2007 +0000
@@ -5,10 +5,10 @@
 
 @c The edition number appears in several places in this file
 @set EDITION   Sixteenth
-@set EMACSVER  22.0.98
+@set EMACSVER  22.1.50
 
 @copying
-This is the @value{EDITION} edition of the @cite{GNU Emacs Manual},
+This is the @value{EDITION} edition of the @cite{GNU Emacs Manual},@*
 updated for Emacs version @value{EMACSVER}.
 
 Copyright @copyright{} 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997,
@@ -39,18 +39,21 @@
 @c in general, keep the following line commented out, unless doing a
 @c copy of this manual that will be published.  the manual should go
 @c onto the distribution in the full, 8.5 x 11" size.
-@set smallbook
+@c set smallbook
 
 @ifset smallbook
 @smallbook
 @end ifset
 
 @c per rms and peterb, use 10pt fonts for the main text, mostly to
-@c save on paper cost.  Also do not declare @setchapternewpage odd.
+@c save on paper cost.
 @c Do this inside @tex for now, so current makeinfo does not complain.
 @tex
 @ifset smallbook
 @fonttextsize 10
+@set EMACSVER 22
+\global\let\urlcolor=\Black % don't print links in grayscale
+\global\let\linkcolor=\Black
 @end ifset
 \global\hbadness=6666 % don't worry about not-too-underfull boxes
 @end tex
@@ -76,10 +79,10 @@
 @insertcopying
 
 @sp 2
-ISBN 1-882114-86-8*
 Published by the Free Software Foundation @*
 51 Franklin Street, Fifth Floor @*
-Boston, MA 02110-1301 USA
+Boston, MA 02110-1301 USA @*
+ISBN 1-882114-86-8
 
 @sp 2
 Cover art by Etienne Suvasa.
@@ -222,7 +225,6 @@
 			  "recursive editing level".
 * Emulation::	        Emulating some other editors with Emacs.
 * Hyperlinking::        Following links in buffers.
-* Thumbnails::          Browsing images using thumbnails.
 * Dissociated Press::   Dissociating text for fun.
 * Amusements::	        Various games and hacks.
 * Customization::       Modifying the behavior of Emacs.
@@ -801,6 +803,7 @@
 * Dired Updating::           Discarding lines for files of no interest.
 * Dired and Find::	     Using `find' to choose the files for Dired.
 * Wdired::                   Operating on files by editing the Dired buffer.
+* Image-Dired::              Viewing image thumbnails in Dired
 * Misc Dired Features::      Various other features.
 
 The Calendar and the Diary
--- a/man/faq.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/man/faq.texi	Fri May 11 18:24:42 2007 +0000
@@ -1211,8 +1211,8 @@
 @item
 @cindex New modes
 Many new modes and packages have been included in Emacs, such as Calc,
-TRAMP, URL, IDO, CUA, ERC, rcirc, Table, Tumme, SES, Ruler, Org, PGG,
-Flymake, Password, Printing, Reveal, wdired, t-mouse, longlines,
+TRAMP, URL, IDO, CUA, ERC, rcirc, Table, Image-Dired, SES, Ruler, Org,
+PGG, Flymake, Password, Printing, Reveal, wdired, t-mouse, longlines,
 savehist, Conf mode, Python mode, DNS mode, etc.
 
 @cindex Multilingual Environment
--- a/man/files.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/man/files.texi	Fri May 11 18:24:42 2007 +0000
@@ -112,9 +112,9 @@
 or @file{~@var{user-id}/} to mean the home directory of a user whose
 login name is @code{user-id}@footnote{
 On MS-Windows and MS-DOS systems, where a user doesn't have a home
-directory, Emacs substitutes @file{~/} with the value of the
-environment variable @code{HOME}; see @ref{General Variables}.  The
-@file{~@var{user-id}/} construct is supported on those systems only
+directory, Emacs replaces @file{~/} with the value of the
+environment variable @code{HOME}; see @ref{General Variables}.  On
+these systems, the @file{~@var{user-id}/} construct is supported only
 for the current user, i.e., only if @var{user-id} is the current
 user's login name.}.
 
@@ -2583,6 +2583,8 @@
   A separate but similar Archive mode is used for archives produced by
 the programs @code{arc}, @code{jar}, @code{lzh}, @code{zip}, and
 @code{zoo}, which have extensions corresponding to the program names.
+Archive mode also works for those @code{exe} files that are
+self-extracting executables.
 
   The key bindings of Archive mode are similar to those in Tar mode,
 with the addition of the @kbd{m} key which marks a file for subsequent
@@ -2816,8 +2818,8 @@
 
 @findex thumbs-mode
 @findex mode, thumbs
-  See also the Tumme package (@pxref{Thumbnails}) for viewing images
-as thumbnails.
+  See also the Image-Dired package (@pxref{Image-Dired}) for viewing
+images as thumbnails.
 
 @node Filesets
 @section Filesets
--- a/man/gnus.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/man/gnus.texi	Fri May 11 18:24:42 2007 +0000
@@ -623,6 +623,7 @@
 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
 * Other Sources::               Reading directories, files, SOUP packets.
 * Combined Groups::             Combining groups into one group.
+* Email Based Diary::           Using mails to manage diary events in Gnus.
 * Gnus Unplugged::              Reading news and mail offline.
 
 Server Buffer
@@ -720,6 +721,25 @@
 * Virtual Groups::              Combining articles from many groups.
 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
 
+Email Based Diary
+
+* The NNDiary Back End::        Basic setup and usage.
+* The Gnus Diary Library::      Utility toolkit on top of nndiary.
+* Sending or Not Sending::      A final note on sending diary messages.
+
+The NNDiary Back End
+
+* Diary Messages::              What makes a message valid for nndiary.
+* Running NNDiary::             NNDiary has two modes of operation.
+* Customizing NNDiary::         Bells and whistles.
+
+The Gnus Diary Library
+
+* Diary Summary Line Format::           A nicer summary buffer line format.
+* Diary Articles Sorting::              A nicer way to sort messages.
+* Diary Headers Generation::            Not doing it manually.
+* Diary Group Parameters::              Not handling them manually.
+
 Gnus Unplugged
 
 * Agent Basics::                How it all is supposed to work.
@@ -8148,8 +8168,8 @@
 @vindex gnus-cite-parse-max-size
 
 @item gnus-cite-parse-max-size
-If the article size if bigger than this variable (which is 25000 by
-default), no citation highlighting will be performed.
+If the article size in bytes is bigger than this variable (which is
+25000 by default), no citation highlighting will be performed.
 
 @item gnus-cite-max-prefix
 @vindex gnus-cite-max-prefix
@@ -12343,6 +12363,7 @@
 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
 * Other Sources::               Reading directories, files, SOUP packets.
 * Combined Groups::             Combining groups into one group.
+* Email Based Diary::           Using mails to manage diary events in Gnus.
 * Gnus Unplugged::              Reading news and mail offline.
 @end menu
 
@@ -17878,6 +17899,381 @@
 their @acronym{NOV} lines removed from the @acronym{NOV} file.
 
 
+@node Email Based Diary
+@section Email Based Diary
+@cindex diary
+@cindex email based diary
+@cindex calendar
+
+This section describes a special mail back end called @code{nndiary},
+and its companion library @code{gnus-diary}.  It is ``special'' in the
+sense that it is not meant to be one of the standard alternatives for
+reading mail with Gnus.  See @ref{Choosing a Mail Back End} for that.
+Instead, it is used to treat @emph{some} of your mails in a special way,
+namely, as event reminders.
+
+Here is a typical scenario:
+
+@itemize @bullet
+@item
+You've got a date with Andy Mc Dowell or Bruce Willis (select according
+to your sexual preference) in one month.  You don't want to forget it.
+@item
+So you send a ``reminder'' message (actually, a diary one) to yourself.
+@item
+You forget all about it and keep on getting and reading new mail, as usual.
+@item
+From time to time, as you type `g' in the group buffer and as the date
+is getting closer, the message will pop up again to remind you of your
+appointment, just as if it were new and unread.
+@item
+Read your ``new'' messages, this one included, and start dreaming again
+of the night you're gonna have.
+@item
+Once the date is over (you actually fell asleep just after dinner), the
+message will be automatically deleted if it is marked as expirable.
+@end itemize
+
+The Gnus Diary back end has the ability to handle regular appointments
+(that wouldn't ever be deleted) as well as punctual ones, operates as a
+real mail back end and is configurable in many ways.  All of this is
+explained in the sections below.
+
+@menu
+* The NNDiary Back End::        Basic setup and usage.
+* The Gnus Diary Library::      Utility toolkit on top of nndiary.
+* Sending or Not Sending::      A final note on sending diary messages.
+@end menu
+
+
+@node The NNDiary Back End
+@subsection The NNDiary Back End
+@cindex nndiary
+@cindex the nndiary back end
+
+@code{nndiary} is a back end very similar to @code{nnml} (@pxref{Mail
+Spool}).  Actually, it could appear as a mix of @code{nnml} and
+@code{nndraft}.  If you know @code{nnml}, you're already familiar with
+the message storing scheme of @code{nndiary}: one file per message, one
+directory per group.
+
+  Before anything, there is one requirement to be able to run
+@code{nndiary} properly: you @emph{must} use the group timestamp feature
+of Gnus.  This adds a timestamp to each group's parameters.  @ref{Group
+Timestamp} to see how it's done.
+
+@menu
+* Diary Messages::              What makes a message valid for nndiary.
+* Running NNDiary::             NNDiary has two modes of operation.
+* Customizing NNDiary::         Bells and whistles.
+@end menu
+
+@node Diary Messages
+@subsubsection Diary Messages
+@cindex nndiary messages
+@cindex nndiary mails
+
+@code{nndiary} messages are just normal ones, except for the mandatory
+presence of 7 special headers.  These headers are of the form
+@code{X-Diary-<something>}, @code{<something>} being one of
+@code{Minute}, @code{Hour}, @code{Dom}, @code{Month}, @code{Year},
+@code{Time-Zone} and @code{Dow}.  @code{Dom} means ``Day of Month'', and
+@code{dow} means ``Day of Week''.  These headers actually behave like
+crontab specifications and define the event date(s):
+
+@itemize @bullet
+@item
+For all headers except the @code{Time-Zone} one, a header value is
+either a star (meaning all possible values), or a list of fields
+(separated by a comma).
+@item
+A field is either an integer, or a range.
+@item
+A range is two integers separated by a dash.
+@item
+Possible integer values are 0--59 for @code{Minute}, 0--23 for
+@code{Hour}, 1--31 for @code{Dom}, 1--12 for @code{Month}, above 1971
+for @code{Year} and 0--6 for @code{Dow} (0 meaning Sunday).
+@item
+As a special case, a star in either @code{Dom} or @code{Dow} doesn't
+mean ``all possible values'', but ``use only the other field''.  Note
+that if both are star'ed, the use of either one gives the same result.
+@item
+The @code{Time-Zone} header is special in that it can only have one
+value (@code{GMT}, for instance).  A star doesn't mean ``all possible
+values'' (because it makes no sense), but ``the current local time
+zone''.  Most of the time, you'll be using a star here.  However, for a
+list of available time zone values, see the variable
+@code{nndiary-headers}.
+@end itemize
+
+As a concrete example, here are the diary headers to add to your message
+for specifying ``Each Monday and each 1st of month, at 12:00, 20:00,
+21:00, 22:00, 23:00 and 24:00, from 1999 to 2010'' (I'll let you find
+what to do then):
+
+@example
+X-Diary-Minute: 0
+X-Diary-Hour: 12, 20-24
+X-Diary-Dom: 1
+X-Diary-Month: *
+X-Diary-Year: 1999-2010
+X-Diary-Dow: 1
+X-Diary-Time-Zone: *
+@end example
+
+@node Running NNDiary
+@subsubsection Running NNDiary
+@cindex running nndiary
+@cindex nndiary operation modes
+
+@code{nndiary} has two modes of operation: ``traditional'' (the default)
+and ``autonomous''.  In traditional mode, @code{nndiary} does not get new
+mail by itself.  You have to move (@kbd{B m}) or copy (@kbd{B c}) mails
+from your primary mail back end to nndiary groups in order to handle them
+as diary messages.  In autonomous mode, @code{nndiary} retrieves its own
+mail and handles it independently from your primary mail back end.
+
+One should note that Gnus is not inherently designed to allow several
+``master'' mail back ends at the same time.  However, this does make
+sense with @code{nndiary}: you really want to send and receive diary
+messages to your diary groups directly.  So, @code{nndiary} supports
+being sort of a ``second primary mail back end'' (to my knowledge, it is
+the only back end offering this feature).  However, there is a limitation
+(which I hope to fix some day): respooling doesn't work in autonomous
+mode.
+
+In order to use @code{nndiary} in autonomous mode, you have several
+things to do:
+
+@itemize @bullet
+@item
+Allow @code{nndiary} to retrieve new mail by itself.  Put the following
+line in your @file{~/.gnus.el} file:
+
+@lisp
+(setq nndiary-get-new-mail t)
+@end lisp
+@item
+You must arrange for diary messages (those containing @code{X-Diary-*}
+headers) to be split in a private folder @emph{before} Gnus treat them.
+Again, this is needed because Gnus cannot (yet ?) properly handle
+multiple primary mail back ends.  Getting those messages from a separate
+source will compensate this misfeature to some extent.
+
+As an example, here's my procmailrc entry to store diary files in
+@file{~/.nndiary} (the default @code{nndiary} mail source file):
+
+@example
+:0 HD :
+* ^X-Diary
+.nndiary
+@end example
+@end itemize
+
+Once this is done, you might want to customize the following two options
+that affect the diary mail retrieval and splitting processes:
+
+@defvar nndiary-mail-sources
+This is the diary-specific replacement for the standard
+@code{mail-sources} variable.  It obeys the same syntax, and defaults to
+@code{(file :path "~/.nndiary")}.
+@end defvar
+
+@defvar nndiary-split-methods
+This is the diary-specific replacement for the standard
+@code{nnmail-split-methods} variable.  It obeys the same syntax.
+@end defvar
+
+  Finally, you may add a permanent @code{nndiary} virtual server
+(something like @code{(nndiary "diary")} should do) to your
+@code{gnus-secondary-select-methods}.
+
+  Hopefully, almost everything (see the TODO section in
+@file{nndiary.el}) will work as expected when you restart Gnus: in
+autonomous mode, typing @kbd{g} and @kbd{M-g} in the group buffer, will
+also get your new diary mails and split them according to your
+diary-specific rules, @kbd{F} will find your new diary groups etc.
+
+@node Customizing NNDiary
+@subsubsection Customizing NNDiary
+@cindex customizing nndiary
+@cindex nndiary customization
+
+Now that @code{nndiary} is up and running, it's time to customize it.
+The custom group is called @code{nndiary} (no, really ?!).  You should
+browse it to figure out which options you'd like to tweak.  The following
+two variables are probably the only ones you will want to change:
+
+@defvar nndiary-reminders
+This is the list of times when you want to be reminded of your
+appointements (e.g. 3 weeks before, then 2 days before, then 1 hour
+before and that's it).  Remember that ``being reminded'' means that the
+diary message will pop up as brand new and unread again when you get new
+mail.
+@end defvar
+
+@defvar nndiary-week-starts-on-monday
+Rather self-explanatory.  Otherwise, Sunday is assumed (this is the
+default).
+@end defvar
+
+
+@node The Gnus Diary Library
+@subsection The Gnus Diary Library
+@cindex gnus-diary
+@cindex the gnus diary library
+
+Using @code{nndiary} manually (I mean, writing the headers by hand and
+so on) would be rather boring.  Fortunately, there is a library called
+@code{gnus-diary} written on top of @code{nndiary}, that does many
+useful things for you.
+
+  In order to use it, add the following line to your @file{~/.gnus.el} file:
+
+@lisp
+(require 'gnus-diary)
+@end lisp
+
+  Also, you shouldn't use any @code{gnus-user-format-function-[d|D]}
+(@pxref{Summary Buffer Lines}).  @code{gnus-diary} provides both of these
+(sorry if you used them before).
+
+
+@menu
+* Diary Summary Line Format::           A nicer summary buffer line format.
+* Diary Articles Sorting::              A nicer way to sort messages.
+* Diary Headers Generation::            Not doing it manually.
+* Diary Group Parameters::              Not handling them manually.
+@end menu
+
+@node Diary Summary Line Format
+@subsubsection Diary Summary Line Format
+@cindex diary summary buffer line
+@cindex diary summary line format
+
+Displaying diary messages in standard summary line format (usually
+something like @samp{From Joe: Subject}) is pretty useless.  Most of
+the time, you're the one who wrote the message, and you mostly want to
+see the event's date.
+
+  @code{gnus-diary} provides two supplemental user formats to be used in
+summary line formats.  @code{D} corresponds to a formatted time string
+for the next occurrence of the event (e.g. ``Sat, Sep 22 01, 12:00''),
+while @code{d} corresponds to an approximative remaining time until the
+next occurrence of the event (e.g. ``in 6 months, 1 week'').
+
+  For example, here's how Joe's birthday is displayed in my
+@code{nndiary+diary:birthdays} summary buffer (note that the message is
+expirable, but will never be deleted, as it specifies a periodic event):
+
+@example
+   E  Sat, Sep 22 01, 12:00: Joe's birthday (in 6 months, 1 week)
+@end example
+
+In order to get something like the above, you would normally add the
+following line to your diary groups'parameters:
+
+@lisp
+(gnus-summary-line-format "%U%R%z %uD: %(%s%) (%ud)\n")
+@end lisp
+
+However, @code{gnus-diary} does it automatically (@pxref{Diary Group
+Parameters}).  You can however customize the provided summary line format
+with the following user options:
+
+@defvar gnus-diary-summary-line-format
+Defines the summary line format used for diary groups (@pxref{Summary
+Buffer Lines}).  @code{gnus-diary} uses it to automatically update the
+diary groups'parameters.
+@end defvar
+
+@defvar gnus-diary-time-format
+Defines the format to display dates in diary summary buffers.  This is
+used by the @code{D} user format.  See the docstring for details.
+@end defvar
+
+@defvar gnus-diary-delay-format-function
+Defines the format function to use for displaying delays (remaining
+times) in diary summary buffers.  This is used by the @code{d} user
+format.  There are currently built-in functions for English and French;
+you can also define your own.  See the docstring for details.
+@end defvar
+
+@node Diary Articles Sorting
+@subsubsection Diary Articles Sorting
+@cindex diary articles sorting
+@cindex diary summary lines sorting
+@findex gnus-summary-sort-by-schedule
+@findex gnus-thread-sort-by-schedule
+@findex gnus-article-sort-by-schedule
+
+@code{gnus-diary} provides new sorting functions (@pxref{Sorting the
+Summary Buffer} ) called @code{gnus-summary-sort-by-schedule},
+@code{gnus-thread-sort-by-schedule} and
+@code{gnus-article-sort-by-schedule}.  These functions let you organize
+your diary summary buffers from the closest event to the farthest one.
+
+@code{gnus-diary} automatically installs
+@code{gnus-summary-sort-by-schedule} as a menu item in the summary
+buffer's ``sort'' menu, and the two others as the primary (hence
+default) sorting functions in the group parameters (@pxref{Diary Group
+Parameters}).
+
+@node Diary Headers Generation
+@subsubsection Diary Headers Generation
+@cindex diary headers generation
+@findex gnus-diary-check-message
+
+@code{gnus-diary} provides a function called
+@code{gnus-diary-check-message} to help you handle the @code{X-Diary-*}
+headers.  This function ensures that the current message contains all the
+required diary headers, and prompts you for values or corrections if
+needed.
+
+  This function is hooked into the @code{nndiary} back end, so that
+moving or copying an article to a diary group will trigger it
+automatically.  It is also bound to @kbd{C-c D c} in @code{message-mode}
+and @code{article-edit-mode} in order to ease the process of converting
+a usual mail to a diary one.
+
+  This function takes a prefix argument which will force prompting of
+all diary headers, regardless of their presence or validity.  That way,
+you can very easily reschedule an already valid diary message, for
+instance.
+
+@node Diary Group Parameters
+@subsubsection Diary Group Parameters
+@cindex diary group parameters
+
+When you create a new diary group, or visit one, @code{gnus-diary}
+automatically checks your group parameters and if needed, sets the
+summary line format to the diary-specific value, installs the
+diary-specific sorting functions, and also adds the different
+@code{X-Diary-*} headers to the group's posting-style.  It is then easier
+to send a diary message, because if you use @kbd{C-u a} or @kbd{C-u m}
+on a diary group to prepare a message, these headers will be inserted
+automatically (although not filled with proper values yet).
+
+@node Sending or Not Sending
+@subsection Sending or Not Sending
+
+Well, assuming you've read of of the above, here are two final notes on
+mail sending with @code{nndiary}:
+
+@itemize @bullet
+@item
+@code{nndiary} is a @emph{real} mail back end.  You really send real diary
+messsages for real.  This means for instance that you can give
+appointements to anybody (provided they use Gnus and @code{nndiary}) by
+sending the diary message to them as well.
+@item
+However, since @code{nndiary} also has a @code{request-post} method, you
+can also use @kbd{C-u a} instead of @kbd{C-u m} on a diary group and the
+message won't actually be sent; just stored locally in the group. This
+comes in very handy for private appointments.
+@end itemize
+
 @node Gnus Unplugged
 @section Gnus Unplugged
 @cindex offline
--- a/man/idlwave.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/man/idlwave.texi	Fri May 11 18:24:42 2007 +0000
@@ -9,16 +9,13 @@
 @synindex ky cp
 @syncodeindex vr cp
 @syncodeindex fn cp
-@set VERSION 6.0
-@set EDITION 6.0
-@set IDLVERSION 6.2
-@set NSYSROUTINES 1966
-@set DATE Feb, 2006
+@set VERSION 6.1
+@set EDITION 6.1
+@set IDLVERSION 6.3
+@set NSYSROUTINES 4346
+@set DATE April, 2007
 @set AUTHOR J.D. Smith & Carsten Dominik
-@set AUTHOREMAIL jdsmith@@as.arizona.edu
 @set MAINTAINER J.D. Smith
-@set MAINTAINEREMAIL jdsmith@@as.arizona.edu
-@set IDLWAVEHOMEPAGE http://idlwave.org/
 @c %**end of header
 @finalout
 
@@ -320,6 +317,9 @@
 @tab Re-indent all lines in the current statement.
 @item @kbd{M-@key{RET}}
 @tab Start a continuation line, splitting the current line at point.
+@item @kbd{M-;}
+@tab Start new comment at line beginning or after code, or (un)comment
+highlighted region.
 @item @kbd{M-q}
 @tab Fill the current comment paragraph.
 @item @kbd{C-c ?}
@@ -354,6 +354,8 @@
 @tab Complete a procedure name, function name or keyword in the shell buffer.
 @item @kbd{C-c C-d C-c}
 @tab Save and compile the source file in the current buffer.
+@item @kbd{C-c C-d C-e}
+@tab Compile and run the current region.
 @item @kbd{C-c C-d C-x}
 @tab Go to next syntax error.
 @item @kbd{C-c C-d C-v}
@@ -2954,6 +2956,13 @@
 been set (or you give two prefix arguments), the last command on the
 @code{comint} input history is sent.
 
+@kindex C-c C-d C-e
+@cindex Compiling regions
+For quickly compiling and running the currently marked region as a main
+level program @kbd{C-c C-d C-e} (@code{idlwave-shell-run-region}) is
+very useful.  A temporary file is created holding the contents of the
+current region (with @code{END} appended), and run from the shell.
+
 @node Walking the Calling Stack, Electric Debug Mode, Compiling Programs, Debugging IDL Programs
 @subsection Walking the Calling Stack
 @cindex Calling stack, walking
@@ -3439,7 +3448,7 @@
 @item
 It has a @emph{builtin list} with information about the routines IDL
 ships with.  IDLWAVE @value{VERSION} is distributed with a list of
-@value{NSYSROUTINES} routines, reflecting IDL version
+@value{NSYSROUTINES} routines and object methods, reflecting IDL version
 @value{IDLVERSION}.  As of IDL v6.2, the routine info is distributed
 directly with IDL in the form of an XML catalog which IDLWAVE scans.
 Formerly, this list was created by scanning the IDL manuals to produce
@@ -4062,7 +4071,7 @@
 Here is an example of the additional configuration needed for a Windows
 system.  I am assuming that IDLWAVE has been installed in
 @w{@samp{C:\Program Files\IDLWAVE}} and that IDL is installed in
-@w{@samp{C:\RSI\IDL62}}.
+@w{@samp{C:\RSI\IDL63}}.
 
 @lisp
 ;; location of the lisp files (only needed if IDLWAVE is not part of
@@ -4072,10 +4081,10 @@
 ;; The location of the IDL library directories, both standard,  and your own.
 ;; note that the initial "+" expands the path recursively
 (setq idlwave-library-path
-        '("+c:/RSI/IDL55/lib/" "+c:/path/to/my/idllibs" ))
+        '("+c:/RSI/IDL63/lib/" "+c:/path/to/my/idllibs" ))
 
 ;; location of the IDL system directory (try "print,!DIR")
-(setq idlwave-system-directory "c:/RSI/IDL62/")
+(setq idlwave-system-directory "c:/RSI/IDL63/")
 
 @end lisp
 
--- a/man/maintaining.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/man/maintaining.texi	Fri May 11 18:24:42 2007 +0000
@@ -409,6 +409,10 @@
 files.  If the tags file is in @file{/dev}, however, the file names are
 made relative to the current working directory.  This is useful, for
 example, when writing the tags to @file{/dev/stdout}.
+ 
+  When using a a relative file name, it should not be a symbolic link
+pointing to a tags file in a different directory, because this would
+generally render the file names invalid.
 
   If you specify absolute file names as arguments to @code{etags}, then
 the tags file will contain absolute file names.  This way, the tags file
--- a/man/misc.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/man/misc.texi	Fri May 11 18:24:42 2007 +0000
@@ -2235,7 +2235,7 @@
 key bindings.
 @end table
 
-@node Hyperlinking, Thumbnails, Emulation, Top
+@node Hyperlinking, Dissociated Press, Emulation, Top
 @section Hyperlinking and Navigation Features
 
 @cindex hyperlinking
@@ -2401,76 +2401,7 @@
 find the one you select (@code{ffap-menu}).
 @end table
 
-@node Thumbnails, Dissociated Press, Hyperlinking, Top
-@section Viewing Images as Thumbnails
-@cindex tumme mode
-@cindex thumbnails
-
-  Tumme is a facility for browsing image files.  It provides viewing
-the images either as thumbnails or in full size, either inside Emacs
-or through an external viewer.
-
-  To enter Tumme, type @kbd{M-x tumme}.  It prompts for a directory;
-specify one that has images files.  This creates thumbnails for all
-the images in that directory, and displays them all in the ``thumbnail
-buffer.''  This takes a long time if the directory contains many image
-files, and it asks for confirmation if the number of image files
-exceeds @code{tumme-show-all-from-dir-max-files}.
-
-@kindex C-t d @r{(Tumme)}
-@findex tumme-display-thumbs
-  You can also enter Tumme through Dired.  Mark the image files you
-want to look at, using @kbd{m} as usual, then type @kbd{C-t d}
-(@code{tumme-display-thumbs}).  This too creates and switches to
-a buffer containing thumbnails, corresponding to the marked files.
-
-  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.  This sizes the image to fit the
-window.  Use the arrow keys to move around in the buffer.  For easy
-browsing, 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 that instead.
-
-@vindex tumme-external-viewer
-  To view and the image in its original size, either provide a prefix
-argument (@kbd{C-u}) before pressing @kbd{RET}, or type @kbd{C-@key{RET}}
-(@code{tumme-thumbnail-display-external}) to display the image in an
-external viewer.  You must first configure
-@code{tumme-external-viewer}.
-
-  You can delete images through Tumme also.  Type @kbd{d}
-(@code{tumme-flag-thumb-original-file}) to flag the image file for
-deletion in the Dired buffer.  You can also delete the thumbnail image
-from the thumbnail buffer with @kbd{C-d} (@code{tumme-delete-char}).
-
-  More advanced features include @dfn{image tags}, which are metadata
-used to categorize image files.  The tags are stored in a plain text
-file configured by @code{tumme-db-file}.
-
-  To tag image files, mark them in the dired buffer (you can also mark
-files in Dired from the thumbnail buffer by typing @kbd{m}) 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, you can use @kbd{C-t d} to view them.
-
-  You can also tag a file directly from the thumbnail buffer by typing
-@kbd{t t} and you can remove a tag 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.  Type @kbd{C-t c} to add
-a comment from Dired (@code{tumme-dired-comment-files}).
-
-  Tumme also provides simple image manipulation.  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 is lossless, and uses an external utility called JpegTRAN.
-
-@node Dissociated Press, Amusements, Thumbnails, Top
+@node Dissociated Press, Amusements, Hyperlinking, Top
 @section Dissociated Press
 
 @findex dissociated-press
--- a/man/search.texi	Sun Apr 22 13:47:56 2007 +0000
+++ b/man/search.texi	Fri May 11 18:24:42 2007 +0000
@@ -1002,6 +1002,9 @@
   A numeric argument restricts replacement to matches that are surrounded
 by word boundaries.  The argument's value doesn't matter.
 
+  @xref{Replacement and Case}, for details about case-sensitivity in
+replace commands.
+
   What if you want to exchange @samp{x} and @samp{y}: replace every @samp{x} with a @samp{y} and vice versa?  You can do it this way:
 
 @example
@@ -1155,9 +1158,9 @@
 occurrence and asks you whether to replace it.  Aside from querying,
 @code{query-replace} works just like @code{replace-string}.  It
 preserves case, like @code{replace-string}, provided
-@code{case-replace} is non-@code{nil}, as it normally is.  A numeric
-argument means consider only occurrences that are bounded by
-word-delimiter characters.
+@code{case-replace} is non-@code{nil}, as it normally is
+(@pxref{Replacement and Case}).  A numeric argument means consider
+only occurrences that are bounded by word-delimiter characters.
 
 @kindex C-M-%
 @findex query-replace-regexp
--- a/man/texinfo.tex	Sun Apr 22 13:47:56 2007 +0000
+++ b/man/texinfo.tex	Fri May 11 18:24:42 2007 +0000
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2007-04-08.09}
+\def\texinfoversion{2007-05-04.09}
 %
 % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -1327,7 +1327,11 @@
   % used to mark target names; must be expandable.
   \def\pdfmkpgn#1{#1}
   %
-  \let\linkcolor = \Blue  % was Cyan, but that seems light?
+  % by default, use a color that is dark enough to print on paper as
+  % nearly black, but still distinguishable for online viewing.
+  % (Defined in pdfcolor.tex.)
+  \let\urlcolor = \BrickRed
+  \let\linkcolor = \BrickRed
   \def\endlink{\Black\pdfendlink}
   %
   % Adding outlines to PDF; macros for calculating structure of outlines
@@ -1431,7 +1435,7 @@
       \indexnofonts
       \setupdatafile
       \catcode`\\=\active \otherbackslash
-      \input \jobname.toc
+      \input \tocreadfilename
     \endgroup
   }
   %
@@ -1461,7 +1465,7 @@
       \def\@{@}%
       \let\/=\empty
       \makevalueexpandable
-      \leavevmode\Red
+      \leavevmode\urlcolor
       \startlink attr{/Border [0 0 0]}%
         user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
     \endgroup}
@@ -1551,11 +1555,276 @@
   }%
 }
 
+%
+% PDF CMaps.  See also LaTeX's t1.cmap.
+%
+% \cmapOT1
+\ifpdf
+  \begingroup
+    \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
+    \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (TeX-OT1-0)
+%%Title: (TeX-OT1-0 TeX OT1 0)
+%%Version: 1.000
+%%EndComments
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CIDSystemInfo
+<< /Registry (TeX)
+/Ordering (OT1)
+/Supplement 0
+>> def
+/CMapName /TeX-OT1-0 def
+/CMapType 2 def
+1 begincodespacerange
+<00> <7F>
+endcodespacerange
+8 beginbfrange
+<00> <01> <0393>
+<09> <0A> <03A8>
+<23> <26> <0023>
+<28> <3B> <0028>
+<3F> <5B> <003F>
+<5D> <5E> <005D>
+<61> <7A> <0061>
+<7B> <7C> <2013>
+endbfrange
+40 beginbfchar
+<02> <0398>
+<03> <039B>
+<04> <039E>
+<05> <03A0>
+<06> <03A3>
+<07> <03D2>
+<08> <03A6>
+<0B> <00660066>
+<0C> <00660069>
+<0D> <0066006C>
+<0E> <006600660069>
+<0F> <00660066006C>
+<10> <0131>
+<11> <0237>
+<12> <0060>
+<13> <00B4>
+<14> <02C7>
+<15> <02D8>
+<16> <00AF>
+<17> <02DA>
+<18> <00B8>
+<19> <00DF>
+<1A> <00E6>
+<1B> <0153>
+<1C> <00F8>
+<1D> <00C6>
+<1E> <0152>
+<1F> <00D8>
+<21> <0021>
+<22> <201D>
+<27> <2019>
+<3C> <00A1>
+<3D> <003D>
+<3E> <00BF>
+<5C> <201C>
+<5F> <02D9>
+<60> <2018>
+<7D> <02DD>
+<7E> <007E>
+<7F> <00A8>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+%%EndResource
+%%EOF
+    }\endgroup
+  \expandafter\edef\csname cmapOT1\endcsname#1{%
+    \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
+  }%
+%
+% \cmapOT1IT
+  \begingroup
+    \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
+    \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (TeX-OT1IT-0)
+%%Title: (TeX-OT1IT-0 TeX OT1IT 0)
+%%Version: 1.000
+%%EndComments
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CIDSystemInfo
+<< /Registry (TeX)
+/Ordering (OT1IT)
+/Supplement 0
+>> def
+/CMapName /TeX-OT1IT-0 def
+/CMapType 2 def
+1 begincodespacerange
+<00> <7F>
+endcodespacerange
+8 beginbfrange
+<00> <01> <0393>
+<09> <0A> <03A8>
+<25> <26> <0025>
+<28> <3B> <0028>
+<3F> <5B> <003F>
+<5D> <5E> <005D>
+<61> <7A> <0061>
+<7B> <7C> <2013>
+endbfrange
+42 beginbfchar
+<02> <0398>
+<03> <039B>
+<04> <039E>
+<05> <03A0>
+<06> <03A3>
+<07> <03D2>
+<08> <03A6>
+<0B> <00660066>
+<0C> <00660069>
+<0D> <0066006C>
+<0E> <006600660069>
+<0F> <00660066006C>
+<10> <0131>
+<11> <0237>
+<12> <0060>
+<13> <00B4>
+<14> <02C7>
+<15> <02D8>
+<16> <00AF>
+<17> <02DA>
+<18> <00B8>
+<19> <00DF>
+<1A> <00E6>
+<1B> <0153>
+<1C> <00F8>
+<1D> <00C6>
+<1E> <0152>
+<1F> <00D8>
+<21> <0021>
+<22> <201D>
+<23> <0023>
+<24> <00A3>
+<27> <2019>
+<3C> <00A1>
+<3D> <003D>
+<3E> <00BF>
+<5C> <201C>
+<5F> <02D9>
+<60> <2018>
+<7D> <02DD>
+<7E> <007E>
+<7F> <00A8>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+%%EndResource
+%%EOF
+    }\endgroup
+  \expandafter\edef\csname cmapOT1IT\endcsname#1{%
+    \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
+  }%
+%
+% \cmapOT1TT
+  \begingroup
+    \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
+    \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (TeX-OT1TT-0)
+%%Title: (TeX-OT1TT-0 TeX OT1TT 0)
+%%Version: 1.000
+%%EndComments
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CIDSystemInfo
+<< /Registry (TeX)
+/Ordering (OT1TT)
+/Supplement 0
+>> def
+/CMapName /TeX-OT1TT-0 def
+/CMapType 2 def
+1 begincodespacerange
+<00> <7F>
+endcodespacerange
+5 beginbfrange
+<00> <01> <0393>
+<09> <0A> <03A8>
+<21> <26> <0021>
+<28> <5F> <0028>
+<61> <7E> <0061>
+endbfrange
+32 beginbfchar
+<02> <0398>
+<03> <039B>
+<04> <039E>
+<05> <03A0>
+<06> <03A3>
+<07> <03D2>
+<08> <03A6>
+<0B> <2191>
+<0C> <2193>
+<0D> <0027>
+<0E> <00A1>
+<0F> <00BF>
+<10> <0131>
+<11> <0237>
+<12> <0060>
+<13> <00B4>
+<14> <02C7>
+<15> <02D8>
+<16> <00AF>
+<17> <02DA>
+<18> <00B8>
+<19> <00DF>
+<1A> <00E6>
+<1B> <0153>
+<1C> <00F8>
+<1D> <00C6>
+<1E> <0152>
+<1F> <00D8>
+<20> <2423>
+<27> <2019>
+<60> <2018>
+<7F> <00A8>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+%%EndResource
+%%EOF
+    }\endgroup
+  \expandafter\edef\csname cmapOT1TT\endcsname#1{%
+    \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
+  }%
+\else
+  \expandafter\let\csname cmapOT1\endcsname\gobble
+  \expandafter\let\csname cmapOT1IT\endcsname\gobble
+  \expandafter\let\csname cmapOT1TT\endcsname\gobble
+\fi
+
 
 % Set the font macro #1 to the font named #2, adding on the
 % specified font prefix (normally `cm').
-% #3 is the font's design size, #4 is a scale factor
-\def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4}
+% #3 is the font's design size, #4 is a scale factor, #5 is the CMap
+% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass
+% empty to omit).
+\def\setfont#1#2#3#4#5{%
+  \font#1=\fontprefix#2#3 scaled #4
+  \csname cmap#5\endcsname#1%
+}
+% This is what gets called when #5 of \setfont is empty.
+\let\cmap\gobble
 
 
 % Use cm as the default font prefix.
@@ -1588,59 +1857,59 @@
 % Text fonts (11.2pt, magstep1).
 \def\textnominalsize{11pt}
 \edef\mainmagstep{\magstephalf}
-\setfont\textrm\rmshape{10}{\mainmagstep}
-\setfont\texttt\ttshape{10}{\mainmagstep}
-\setfont\textbf\bfshape{10}{\mainmagstep}
-\setfont\textit\itshape{10}{\mainmagstep}
-\setfont\textsl\slshape{10}{\mainmagstep}
-\setfont\textsf\sfshape{10}{\mainmagstep}
-\setfont\textsc\scshape{10}{\mainmagstep}
-\setfont\textttsl\ttslshape{10}{\mainmagstep}
+\setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
+\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
+\setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
+\setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
+\setfont\textsl\slshape{10}{\mainmagstep}{OT1}
+\setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
+\setfont\textsc\scshape{10}{\mainmagstep}{OT1}
+\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
 \font\texti=cmmi10 scaled \mainmagstep
 \font\textsy=cmsy10 scaled \mainmagstep
 
 % A few fonts for @defun names and args.
-\setfont\defbf\bfshape{10}{\magstep1}
-\setfont\deftt\ttshape{10}{\magstep1}
-\setfont\defttsl\ttslshape{10}{\magstep1}
+\setfont\defbf\bfshape{10}{\magstep1}{OT1}
+\setfont\deftt\ttshape{10}{\magstep1}{OT1TT}
+\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT}
 \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
 
 % Fonts for indices, footnotes, small examples (9pt).
 \def\smallnominalsize{9pt}
-\setfont\smallrm\rmshape{9}{1000}
-\setfont\smalltt\ttshape{9}{1000}
-\setfont\smallbf\bfshape{10}{900}
-\setfont\smallit\itshape{9}{1000}
-\setfont\smallsl\slshape{9}{1000}
-\setfont\smallsf\sfshape{9}{1000}
-\setfont\smallsc\scshape{10}{900}
-\setfont\smallttsl\ttslshape{10}{900}
+\setfont\smallrm\rmshape{9}{1000}{OT1}
+\setfont\smalltt\ttshape{9}{1000}{OT1TT}
+\setfont\smallbf\bfshape{10}{900}{OT1}
+\setfont\smallit\itshape{9}{1000}{OT1IT}
+\setfont\smallsl\slshape{9}{1000}{OT1}
+\setfont\smallsf\sfshape{9}{1000}{OT1}
+\setfont\smallsc\scshape{10}{900}{OT1}
+\setfont\smallttsl\ttslshape{10}{900}{OT1TT}
 \font\smalli=cmmi9
 \font\smallsy=cmsy9
 
 % Fonts for small examples (8pt).
 \def\smallernominalsize{8pt}
-\setfont\smallerrm\rmshape{8}{1000}
-\setfont\smallertt\ttshape{8}{1000}
-\setfont\smallerbf\bfshape{10}{800}
-\setfont\smallerit\itshape{8}{1000}
-\setfont\smallersl\slshape{8}{1000}
-\setfont\smallersf\sfshape{8}{1000}
-\setfont\smallersc\scshape{10}{800}
-\setfont\smallerttsl\ttslshape{10}{800}
+\setfont\smallerrm\rmshape{8}{1000}{OT1}
+\setfont\smallertt\ttshape{8}{1000}{OT1TT}
+\setfont\smallerbf\bfshape{10}{800}{OT1}
+\setfont\smallerit\itshape{8}{1000}{OT1IT}
+\setfont\smallersl\slshape{8}{1000}{OT1}
+\setfont\smallersf\sfshape{8}{1000}{OT1}
+\setfont\smallersc\scshape{10}{800}{OT1}
+\setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
 \font\smalleri=cmmi8
 \font\smallersy=cmsy8
 
 % Fonts for title page (20.4pt):
 \def\titlenominalsize{20pt}
-\setfont\titlerm\rmbshape{12}{\magstep3}
-\setfont\titleit\itbshape{10}{\magstep4}
-\setfont\titlesl\slbshape{10}{\magstep4}
-\setfont\titlett\ttbshape{12}{\magstep3}
-\setfont\titlettsl\ttslshape{10}{\magstep4}
-\setfont\titlesf\sfbshape{17}{\magstep1}
+\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
+\setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
+\setfont\titlesl\slbshape{10}{\magstep4}{OT1}
+\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
+\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
+\setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
 \let\titlebf=\titlerm
-\setfont\titlesc\scbshape{10}{\magstep4}
+\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
 \font\titlei=cmmi12 scaled \magstep3
 \font\titlesy=cmsy10 scaled \magstep4
 \def\authorrm{\secrm}
@@ -1648,53 +1917,53 @@
 
 % Chapter (and unnumbered) fonts (17.28pt).
 \def\chapnominalsize{17pt}
-\setfont\chaprm\rmbshape{12}{\magstep2}
-\setfont\chapit\itbshape{10}{\magstep3}
-\setfont\chapsl\slbshape{10}{\magstep3}
-\setfont\chaptt\ttbshape{12}{\magstep2}
-\setfont\chapttsl\ttslshape{10}{\magstep3}
-\setfont\chapsf\sfbshape{17}{1000}
+\setfont\chaprm\rmbshape{12}{\magstep2}{OT1}
+\setfont\chapit\itbshape{10}{\magstep3}{OT1IT}
+\setfont\chapsl\slbshape{10}{\magstep3}{OT1}
+\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT}
+\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT}
+\setfont\chapsf\sfbshape{17}{1000}{OT1}
 \let\chapbf=\chaprm
-\setfont\chapsc\scbshape{10}{\magstep3}
+\setfont\chapsc\scbshape{10}{\magstep3}{OT1}
 \font\chapi=cmmi12 scaled \magstep2
 \font\chapsy=cmsy10 scaled \magstep3
 
 % Section fonts (14.4pt).
 \def\secnominalsize{14pt}
-\setfont\secrm\rmbshape{12}{\magstep1}
-\setfont\secit\itbshape{10}{\magstep2}
-\setfont\secsl\slbshape{10}{\magstep2}
-\setfont\sectt\ttbshape{12}{\magstep1}
-\setfont\secttsl\ttslshape{10}{\magstep2}
-\setfont\secsf\sfbshape{12}{\magstep1}
+\setfont\secrm\rmbshape{12}{\magstep1}{OT1}
+\setfont\secit\itbshape{10}{\magstep2}{OT1IT}
+\setfont\secsl\slbshape{10}{\magstep2}{OT1}
+\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT}
+\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT}
+\setfont\secsf\sfbshape{12}{\magstep1}{OT1}
 \let\secbf\secrm
-\setfont\secsc\scbshape{10}{\magstep2}
+\setfont\secsc\scbshape{10}{\magstep2}{OT1}
 \font\seci=cmmi12 scaled \magstep1
 \font\secsy=cmsy10 scaled \magstep2
 
 % Subsection fonts (13.15pt).
 \def\ssecnominalsize{13pt}
-\setfont\ssecrm\rmbshape{12}{\magstephalf}
-\setfont\ssecit\itbshape{10}{1315}
-\setfont\ssecsl\slbshape{10}{1315}
-\setfont\ssectt\ttbshape{12}{\magstephalf}
-\setfont\ssecttsl\ttslshape{10}{1315}
-\setfont\ssecsf\sfbshape{12}{\magstephalf}
+\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1}
+\setfont\ssecit\itbshape{10}{1315}{OT1IT}
+\setfont\ssecsl\slbshape{10}{1315}{OT1}
+\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT}
+\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT}
+\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1}
 \let\ssecbf\ssecrm
-\setfont\ssecsc\scbshape{10}{1315}
+\setfont\ssecsc\scbshape{10}{1315}{OT1}
 \font\sseci=cmmi12 scaled \magstephalf
 \font\ssecsy=cmsy10 scaled 1315
 
 % Reduced fonts for @acro in text (10pt).
 \def\reducednominalsize{10pt}
-\setfont\reducedrm\rmshape{10}{1000}
-\setfont\reducedtt\ttshape{10}{1000}
-\setfont\reducedbf\bfshape{10}{1000}
-\setfont\reducedit\itshape{10}{1000}
-\setfont\reducedsl\slshape{10}{1000}
-\setfont\reducedsf\sfshape{10}{1000}
-\setfont\reducedsc\scshape{10}{1000}
-\setfont\reducedttsl\ttslshape{10}{1000}
+\setfont\reducedrm\rmshape{10}{1000}{OT1}
+\setfont\reducedtt\ttshape{10}{1000}{OT1TT}
+\setfont\reducedbf\bfshape{10}{1000}{OT1}
+\setfont\reducedit\itshape{10}{1000}{OT1IT}
+\setfont\reducedsl\slshape{10}{1000}{OT1}
+\setfont\reducedsf\sfshape{10}{1000}{OT1}
+\setfont\reducedsc\scshape{10}{1000}{OT1}
+\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT}
 \font\reducedi=cmmi10
 \font\reducedsy=cmsy10
 
@@ -1713,59 +1982,59 @@
 % Text fonts (10pt).
 \def\textnominalsize{10pt}
 \edef\mainmagstep{1000}
-\setfont\textrm\rmshape{10}{\mainmagstep}
-\setfont\texttt\ttshape{10}{\mainmagstep}
-\setfont\textbf\bfshape{10}{\mainmagstep}
-\setfont\textit\itshape{10}{\mainmagstep}
-\setfont\textsl\slshape{10}{\mainmagstep}
-\setfont\textsf\sfshape{10}{\mainmagstep}
-\setfont\textsc\scshape{10}{\mainmagstep}
-\setfont\textttsl\ttslshape{10}{\mainmagstep}
+\setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
+\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
+\setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
+\setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
+\setfont\textsl\slshape{10}{\mainmagstep}{OT1}
+\setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
+\setfont\textsc\scshape{10}{\mainmagstep}{OT1}
+\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
 \font\texti=cmmi10 scaled \mainmagstep
 \font\textsy=cmsy10 scaled \mainmagstep
 
 % A few fonts for @defun names and args.
-\setfont\defbf\bfshape{10}{\magstephalf}
-\setfont\deftt\ttshape{10}{\magstephalf}
-\setfont\defttsl\ttslshape{10}{\magstephalf}
+\setfont\defbf\bfshape{10}{\magstephalf}{OT1}
+\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT}
+\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT}
 \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
 
 % Fonts for indices, footnotes, small examples (9pt).
 \def\smallnominalsize{9pt}
-\setfont\smallrm\rmshape{9}{1000}
-\setfont\smalltt\ttshape{9}{1000}
-\setfont\smallbf\bfshape{10}{900}
-\setfont\smallit\itshape{9}{1000}
-\setfont\smallsl\slshape{9}{1000}
-\setfont\smallsf\sfshape{9}{1000}
-\setfont\smallsc\scshape{10}{900}
-\setfont\smallttsl\ttslshape{10}{900}
+\setfont\smallrm\rmshape{9}{1000}{OT1}
+\setfont\smalltt\ttshape{9}{1000}{OT1TT}
+\setfont\smallbf\bfshape{10}{900}{OT1}
+\setfont\smallit\itshape{9}{1000}{OT1IT}
+\setfont\smallsl\slshape{9}{1000}{OT1}
+\setfont\smallsf\sfshape{9}{1000}{OT1}
+\setfont\smallsc\scshape{10}{900}{OT1}
+\setfont\smallttsl\ttslshape{10}{900}{OT1TT}
 \font\smalli=cmmi9
 \font\smallsy=cmsy9
 
 % Fonts for small examples (8pt).
 \def\smallernominalsize{8pt}
-\setfont\smallerrm\rmshape{8}{1000}
-\setfont\smallertt\ttshape{8}{1000}
-\setfont\smallerbf\bfshape{10}{800}
-\setfont\smallerit\itshape{8}{1000}
-\setfont\smallersl\slshape{8}{1000}
-\setfont\smallersf\sfshape{8}{1000}
-\setfont\smallersc\scshape{10}{800}
-\setfont\smallerttsl\ttslshape{10}{800}
+\setfont\smallerrm\rmshape{8}{1000}{OT1}
+\setfont\smallertt\ttshape{8}{1000}{OT1TT}
+\setfont\smallerbf\bfshape{10}{800}{OT1}
+\setfont\smallerit\itshape{8}{1000}{OT1IT}
+\setfont\smallersl\slshape{8}{1000}{OT1}
+\setfont\smallersf\sfshape{8}{1000}{OT1}
+\setfont\smallersc\scshape{10}{800}{OT1}
+\setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
 \font\smalleri=cmmi8
 \font\smallersy=cmsy8
 
 % Fonts for title page (20.4pt):
 \def\titlenominalsize{20pt}
-\setfont\titlerm\rmbshape{12}{\magstep3}
-\setfont\titleit\itbshape{10}{\magstep4}
-\setfont\titlesl\slbshape{10}{\magstep4}
-\setfont\titlett\ttbshape{12}{\magstep3}
-\setfont\titlettsl\ttslshape{10}{\magstep4}
-\setfont\titlesf\sfbshape{17}{\magstep1}
+\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
+\setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
+\setfont\titlesl\slbshape{10}{\magstep4}{OT1}
+\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
+\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
+\setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
 \let\titlebf=\titlerm
-\setfont\titlesc\scbshape{10}{\magstep4}
+\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
 \font\titlei=cmmi12 scaled \magstep3
 \font\titlesy=cmsy10 scaled \magstep4
 \def\authorrm{\secrm}
@@ -1773,53 +2042,53 @@
 
 % Chapter fonts (14.4pt).
 \def\chapnominalsize{14pt}
-\setfont\chaprm\rmbshape{12}{\magstep1}
-\setfont\chapit\itbshape{10}{\magstep2}
-\setfont\chapsl\slbshape{10}{\magstep2}
-\setfont\chaptt\ttbshape{12}{\magstep1}
-\setfont\chapttsl\ttslshape{10}{\magstep2}
-\setfont\chapsf\sfbshape{12}{\magstep1}
+\setfont\chaprm\rmbshape{12}{\magstep1}{OT1}
+\setfont\chapit\itbshape{10}{\magstep2}{OT1IT}
+\setfont\chapsl\slbshape{10}{\magstep2}{OT1}
+\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT}
+\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT}
+\setfont\chapsf\sfbshape{12}{\magstep1}{OT1}
 \let\chapbf\chaprm
-\setfont\chapsc\scbshape{10}{\magstep2}
+\setfont\chapsc\scbshape{10}{\magstep2}{OT1}
 \font\chapi=cmmi12 scaled \magstep1
 \font\chapsy=cmsy10 scaled \magstep2
 
 % Section fonts (12pt).
 \def\secnominalsize{12pt}
-\setfont\secrm\rmbshape{12}{1000}
-\setfont\secit\itbshape{10}{\magstep1}
-\setfont\secsl\slbshape{10}{\magstep1}
-\setfont\sectt\ttbshape{12}{1000}
-\setfont\secttsl\ttslshape{10}{\magstep1}
-\setfont\secsf\sfbshape{12}{1000}
+\setfont\secrm\rmbshape{12}{1000}{OT1}
+\setfont\secit\itbshape{10}{\magstep1}{OT1IT}
+\setfont\secsl\slbshape{10}{\magstep1}{OT1}
+\setfont\sectt\ttbshape{12}{1000}{OT1TT}
+\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT}
+\setfont\secsf\sfbshape{12}{1000}{OT1}
 \let\secbf\secrm
-\setfont\secsc\scbshape{10}{\magstep1}
+\setfont\secsc\scbshape{10}{\magstep1}{OT1}
 \font\seci=cmmi12 
 \font\secsy=cmsy10 scaled \magstep1
 
 % Subsection fonts (10pt).
 \def\ssecnominalsize{10pt}
-\setfont\ssecrm\rmbshape{10}{1000}
-\setfont\ssecit\itbshape{10}{1000}
-\setfont\ssecsl\slbshape{10}{1000}
-\setfont\ssectt\ttbshape{10}{1000}
-\setfont\ssecttsl\ttslshape{10}{1000}
-\setfont\ssecsf\sfbshape{10}{1000}
+\setfont\ssecrm\rmbshape{10}{1000}{OT1}
+\setfont\ssecit\itbshape{10}{1000}{OT1IT}
+\setfont\ssecsl\slbshape{10}{1000}{OT1}
+\setfont\ssectt\ttbshape{10}{1000}{OT1TT}
+\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT}
+\setfont\ssecsf\sfbshape{10}{1000}{OT1}
 \let\ssecbf\ssecrm
-\setfont\ssecsc\scbshape{10}{1000}
+\setfont\ssecsc\scbshape{10}{1000}{OT1}
 \font\sseci=cmmi10
 \font\ssecsy=cmsy10
 
 % Reduced fonts for @acro in text (9pt).
 \def\reducednominalsize{9pt}
-\setfont\reducedrm\rmshape{9}{1000}
-\setfont\reducedtt\ttshape{9}{1000}
-\setfont\reducedbf\bfshape{10}{900}
-\setfont\reducedit\itshape{9}{1000}
-\setfont\reducedsl\slshape{9}{1000}
-\setfont\reducedsf\sfshape{9}{1000}
-\setfont\reducedsc\scshape{10}{900}
-\setfont\reducedttsl\ttslshape{10}{900}
+\setfont\reducedrm\rmshape{9}{1000}{OT1}
+\setfont\reducedtt\ttshape{9}{1000}{OT1TT}
+\setfont\reducedbf\bfshape{10}{900}{OT1}
+\setfont\reducedit\itshape{9}{1000}{OT1IT}
+\setfont\reducedsl\slshape{9}{1000}{OT1}
+\setfont\reducedsf\sfshape{9}{1000}{OT1}
+\setfont\reducedsc\scshape{10}{900}{OT1}
+\setfont\reducedttsl\ttslshape{10}{900}{OT1TT}
 \font\reducedi=cmmi9
 \font\reducedsy=cmsy9
 
@@ -1977,10 +2246,10 @@
 \newcount\fontdepth \fontdepth=0
 
 % Fonts for short table of contents.
-\setfont\shortcontrm\rmshape{12}{1000}
-\setfont\shortcontbf\bfshape{10}{\magstep1}  % no cmb12
-\setfont\shortcontsl\slshape{12}{1000}
-\setfont\shortconttt\ttshape{12}{1000}
+\setfont\shortcontrm\rmshape{12}{1000}{OT1}
+\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1}  % no cmb12
+\setfont\shortcontsl\slshape{12}{1000}{OT1}
+\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
 
 %% Add scribe-like font environments, plus @l for inline lisp (usually sans
 %% serif) and @ii for TeX italic
@@ -2043,7 +2312,7 @@
   \null
 }
 \def\samp#1{`\tclose{#1}'\null}
-\setfont\keyrm\rmshape{8}{1000}
+\setfont\keyrm\rmshape{8}{1000}{OT1}
 \font\keysy=cmsy9
 \def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
   \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
@@ -4032,11 +4301,8 @@
     % The following is kludged to not output a line of dots in the index if
     % there are no page numbers.  The next person who breaks this will be
     % cursed by a Unix daemon.
-    \def\tempa{{\rm }}%
-    \def\tempb{#1}%
-    \edef\tempc{\tempa}%
-    \edef\tempd{\tempb}%
-    \ifx\tempc\tempd
+    \setbox\boxA = \hbox{#1}%
+    \ifdim\wd\boxA = 0pt
       \ %
     \else
       %
@@ -4908,7 +5174,7 @@
 \def\readtocfile{%
   \setupdatafile
   \activecatcodes
-  \input \jobname.toc
+  \input \tocreadfilename
 }
 
 \newskip\contentsrightmargin \contentsrightmargin=1in
@@ -4939,11 +5205,16 @@
     \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
 }
 
+% redefined for the two-volume lispref.  We always output on
+% \jobname.toc even if this is redefined.
+% 
+\def\tocreadfilename{\jobname.toc}
 
 % Normal (long) toc.
+%
 \def\contents{%
   \startcontents{\putwordTOC}%
-    \openin 1 \jobname.toc
+    \openin 1 \tocreadfilename\space
     \ifeof 1 \else
       \readtocfile
     \fi
@@ -4981,7 +5252,7 @@
     \let\numsubsubsecentry = \numsecentry
     \let\appsubsubsecentry = \numsecentry
     \let\unnsubsubsecentry = \numsecentry
-    \openin 1 \jobname.toc
+    \openin 1 \tocreadfilename\space
     \ifeof 1 \else
       \readtocfile
     \fi
@@ -8071,7 +8342,7 @@
   \textleading = 12pt
   %
   \internalpagesizes{7.5in}{5in}%
-                    {\voffset}{.25in}%
+                    {-.2in}{0in}%
                     {\bindingoffset}{16pt}%
                     {9.25in}{7in}%
   %
--- a/nt/ChangeLog	Sun Apr 22 13:47:56 2007 +0000
+++ b/nt/ChangeLog	Fri May 11 18:24:42 2007 +0000
@@ -1,3 +1,7 @@
+2007-04-26  Glenn Morris  <rgm@gnu.org>
+
+	* emacs.rc: Increase version to 22.1.50.
+
 2007-03-31  Eli Zaretskii  <eliz@gnu.org>
 
 	* INSTALL: Mention the VCVARS32.BAT batch file for VS.NET users.
--- a/nt/INSTALL	Sun Apr 22 13:47:56 2007 +0000
+++ b/nt/INSTALL	Fri May 11 18:24:42 2007 +0000
@@ -157,11 +157,11 @@
     cygwin compiled gmake 3.77:          fails[1, 5]   fails[2, 5]
     cygwin compiled make 3.78.1:         fails[5]      fails[2, 5]
     cygwin compiled make 3.79.1:         fails[3, 5]   fails[2?, 5]
-    cygwin compiled make 3.80:           fails?[6]     fails?[6]
-    cygwin compiled make 3.81:           fails         fails?[6]
+    cygwin compiled make 3.80:           okay[6]       fails?[7]
+    cygwin compiled make 3.81:           fails         fails?[7]
     mingw32 compiled make 3.79.1:        okay          okay
-    mingw32 compiled make 3.80:          okay          okay[6]
-    mingw32 compiled make 3.81:          okay          okay[7]
+    mingw32 compiled make 3.80:          okay          okay[7]
+    mingw32 compiled make 3.81:          okay          okay[8]
 
   Notes:
 
@@ -173,8 +173,10 @@
     [4] may fail on Windows 9X and Windows ME; if so, install Bash.
     [5] fails when building leim due to the use of cygwin style paths.
         May work if building emacs without leim.
-    [6] not recommended; please report if you try this combination.
-    [7] tested only on Windows XP.
+    [6] need to uncomment 3 lines in nt/gmake.defs that invoke `cygpath'
+    	(look for "cygpath" near line 85 of gmake.defs).
+    [7] not recommended; please report if you try this combination.
+    [8] tested only on Windows XP.
 
   Other compilers may work, but specific reports from people that have
   tried suggest that the Intel C compiler (for example) may produce an
--- a/nt/configure.bat	Sun Apr 22 13:47:56 2007 +0000
+++ b/nt/configure.bat	Fri May 11 18:24:42 2007 +0000
@@ -41,11 +41,11 @@
 rem  cygwin compiled gmake 3.77:          fails[1,5]    fails[2,5]
 rem  cygwin compiled gmake 3.78.1:        fails[5]      fails[2,5]
 rem  cygwin compiled gmake 3.79.1:        fails[3,5]    fails[2?,5]
-rem  cygwin compiled make 3.80:           fails?[6]     fails?[6]
-rem  cygwin compiled make 3.81:           fails         fails?[6]
+rem  cygwin compiled make 3.80:           okay[6]       fails?[7]
+rem  cygwin compiled make 3.81:           fails         fails?[7]
 rem  mingw32 compiled make 3.79.1:        okay          okay
-rem  mingw32 compiled make 3.80:          okay          okay?[6]
-rem  mingw32 compiled make 3.81:          okay          okay[7]
+rem  mingw32 compiled make 3.80:          okay          okay?[7]
+rem  mingw32 compiled make 3.81:          okay          okay[8]
 rem
 rem [1] doesn't cope with makefiles with DOS line endings, so must mount
 rem     emacs source with text!=binary.
@@ -55,8 +55,10 @@
 rem [4] may fail on Windows 9X and Windows ME; if so, install Bash.
 rem [5] fails when building leim due to the use of cygwin style paths.
 rem     May work if building emacs without leim.
-rem [6] not recommended; please report if you try this combination.
-rem [7] tested only on Windows XP.
+rem [6] need to uncomment 3 lines in nt/gmake.defs that invoke `cygpath';
+rem    	look for "cygpath" near line 85 of gmake.defs.
+rem [7] not recommended; please report if you try this combination.
+rem [8] tested only on Windows XP.
 rem
 
 if exist config.log del config.log
--- a/nt/emacs.rc	Sun Apr 22 13:47:56 2007 +0000
+++ b/nt/emacs.rc	Fri May 11 18:24:42 2007 +0000
@@ -6,8 +6,8 @@
 #endif
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 22,0,98,0
- PRODUCTVERSION 22,0,98,0
+ FILEVERSION 22,1,50,0
+ PRODUCTVERSION 22,1,50,0
  FILEFLAGSMASK 0x3FL
 #ifdef EMACSDEBUG
  FILEFLAGS 0x1L
@@ -24,12 +24,12 @@
 	BEGIN
 	    VALUE "CompanyName", "Free Software Foundation\0"
 	    VALUE "FileDescription", "GNU Emacs for Windows NT/95/98/2000/ME/XP\0"
-	    VALUE "FileVersion", "22, 0, 98, 0\0"
+	    VALUE "FileVersion", "22, 1, 50, 0\0"
 	    VALUE "InternalName", "Emacs\0"
 	    VALUE "LegalCopyright", "Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007\0"
 	    VALUE "OriginalFilename", "emacs.exe"
 	    VALUE "ProductName", "Emacs: The extensible self-documenting text editor\0"
-	    VALUE "ProductVersion", "22, 0, 98, 0\0"
+	    VALUE "ProductVersion", "22, 1, 50, 0\0"
 	    VALUE "OLESelfRegister", "\0"
 	 END
      END
--- a/src/ChangeLog	Sun Apr 22 13:47:56 2007 +0000
+++ b/src/ChangeLog	Fri May 11 18:24:42 2007 +0000
@@ -1,3 +1,72 @@
+2007-05-07  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* editfns.c (Ftranspose_regions): Yet another int/Lisp_Object mixup (YAILOM)
+
+2007-05-07  Andreas Schwab  <schwab@suse.de>
+
+	* keymap.c (Flookup_key): Fix typo in last change. 
+
+2007-05-07  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* keymap.c (Fdefine_key, Flookup_key): Only do the 0x80->meta_modifier
+	mapping for unibyte strings.
+
+2007-05-01  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* macmenu.c (mac_dialog_show): Apply 2007-04-27 change for xmenu.c.
+	(Fx_popup_dialog) [MAC_OSX]: Likewise.
+
+2007-04-29  Richard Stallman  <rms@gnu.org>
+
+	* insdel.c (replace_range): For undo, record insertion first.
+
+2007-04-29  Andreas Schwab  <schwab@suse.de>
+
+	* lisp.h (VECSIZE): Use OFFSETOF.
+
+2007-04-29  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* xdisp.c (try_window_reusing_current_matrix): Fix number of
+	disabled lines.
+
+2007-04-28  Richard Stallman  <rms@gnu.org>
+
+	* lread.c (read_escape): In a string, \s is always space.
+
+2007-04-27  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
+
+	* xmenu.c (xdialog_show): Call Fredisplay before showing the dialog.
+
+	* gtkutil.c (xg_update_menubar, create_menus): Create empty
+	submenu for menu bar items.
+
+2007-04-24  Chong Yidong  <cyd@stupidchicken.com>
+
+	* xdisp.c (redisplay_window): Use BEG_UNCHANGED and END_UNCHANGED
+	values of the actual window.
+
+2007-04-23  Richard Stallman  <rms@gnu.org>
+
+	* process.c (Fstart_process): Doc fix.
+
+2007-04-23  Eli Zaretskii  <eliz@gnu.org>
+
+	* process.c (Fstart_process): Doc fix.
+
+2007-04-22  Richard Stallman  <rms@gnu.org>
+
+	* abbrev.c (Fdefine_abbrev): Doc fix.
+
+	* keymap.c (Fdefine_key): Minor doc fix.
+
+2007-04-21  Glenn Morris  <rgm@gnu.org>
+
+	* keymap.c (Fdefine_key): Fix info ref in doc string.
+
+2007-04-20  Glenn Morris  <rgm@gnu.org>
+
+	* sysdep.c (init_system_name): Don't accept localhost.localdomain.
+
 2007-04-19  Juanma Barranquero  <lekktu@gmail.com>
 
 	* minibuf.c (Fminibuffer_contents, Fminibuffer_contents_no_properties)
@@ -6,8 +75,8 @@
 
 2007-04-16  Chong Yidong  <cyd@stupidchicken.com>
 
-	* dispnew.c (adjust_frame_glyphs_for_frame_redisplay): Set
-	garbaged flag in presence of window margins.
+	* dispnew.c (adjust_frame_glyphs_for_frame_redisplay):
+	Set garbaged flag in presence of window margins.
 	(showing_window_margins_p): New function.
 
 	* xdisp.c (cursor_row_p): Only end row on newline if it's a
--- a/src/abbrev.c	Sun Apr 22 13:47:56 2007 +0000
+++ b/src/abbrev.c	Fri May 11 18:24:42 2007 +0000
@@ -110,7 +110,7 @@
 
 DEFUN ("define-abbrev", Fdefine_abbrev, Sdefine_abbrev, 3, 6, 0,
        doc: /* Define an abbrev in TABLE named NAME, to expand to EXPANSION and call HOOK.
-NAME must be a string.
+NAME must be a string, and should be lower-case.
 EXPANSION should usually be a string.
 To undefine an abbrev, define it with EXPANSION = nil.
 If HOOK is non-nil, it should be a function of no arguments;
--- a/src/editfns.c	Sun Apr 22 13:47:56 2007 +0000
+++ b/src/editfns.c	Fri May 11 18:24:42 2007 +0000
@@ -4393,8 +4393,7 @@
       fix_start_end_in_overlays (start1, end2);
     }
 
-  signal_after_change (XINT (start1), XINT (end2 - start1),
-		       XINT (end2 - start1));
+  signal_after_change (start1, end2 - start1, end2 - start1);
   return Qnil;
 }
 
--- a/src/gtkutil.c	Sun Apr 22 13:47:56 2007 +0000
+++ b/src/gtkutil.c	Fri May 11 18:24:42 2007 +0000
@@ -2192,7 +2192,9 @@
                                       cl_data,
                                       &group);
 
-          if (item->contents)
+          /* Create a possibly empty submenu for menu bar items, since some
+             themes don't highlight items correctly without it. */
+          if (item->contents || menu_bar_p)
             {
               GtkWidget *submenu = create_menus (item->contents,
                                                  f,
@@ -2479,8 +2481,14 @@
                                                  cl_data,
                                                  &group);
 
+          /* Create a possibly empty submenu for menu bar items, since some
+             themes don't highlight items correctly without it. */
+          GtkWidget *submenu = create_menus (NULL, f,
+                                             select_cb, NULL, highlight_cb,
+                                             0, 0, 0, 0, cl_data, 0);
           gtk_widget_set_name (w, MENU_ITEM_NAME);
           gtk_menu_shell_insert (GTK_MENU_SHELL (menubar), w, pos);
+          gtk_menu_item_set_submenu (GTK_MENU_ITEM (w), submenu);
 
           g_list_free (*list);
           *list = iter = gtk_container_get_children (GTK_CONTAINER (menubar));
--- a/src/insdel.c	Sun Apr 22 13:47:56 2007 +0000
+++ b/src/insdel.c	Fri May 11 18:24:42 2007 +0000
@@ -1603,8 +1603,12 @@
 
   if (! EQ (current_buffer->undo_list, Qt))
     {
+      /* Record the insertion first, so that when we undo,
+	 the deletion will be undone first.  Thus, undo
+	 will insert before deleting, and thus will keep
+	 the markers before and after this text separate.  */
+      record_insert (from + SCHARS (deletion), inschars);
       record_delete (from, deletion);
-      record_insert (from, inschars);
     }
 
   GAP_SIZE -= outgoing_insbytes;
--- a/src/keymap.c	Sun Apr 22 13:47:56 2007 +0000
+++ b/src/keymap.c	Fri May 11 18:24:42 2007 +0000
@@ -1118,7 +1118,8 @@
  a cons (STRING . DEFN), meaning that DEFN is the definition
     (DEFN should be a valid definition in its own right),
  or a cons (MAP . CHAR), meaning use definition of CHAR in keymap MAP,
- or an extended menu item definition.  (See info node `Extended Menu Items'.)
+ or an extended menu item definition.
+ (See info node `(elisp)Extended Menu Items'.)
 
 If KEYMAP is a sparse keymap with a binding for KEY, the existing
 binding is altered.  If there is no binding for KEY, the new pair
@@ -1148,7 +1149,8 @@
   if (SYMBOLP (def) && !EQ (Vdefine_key_rebound_commands, Qt))
     Vdefine_key_rebound_commands = Fcons (def, Vdefine_key_rebound_commands);
 
-  meta_bit = VECTORP (key) ? meta_modifier : 0x80;
+  meta_bit = (VECTORP (key) || STRINGP (key) && STRING_MULTIBYTE (key)
+	      ? meta_modifier : 0x80);
 
   if (VECTORP (def) && ASIZE (def) > 0 && CONSP (AREF (def, 0)))
     { /* DEF is apparently an XEmacs-style keyboard macro.  */
@@ -1304,7 +1306,7 @@
 	c = Fevent_convert_list (c);
 
       /* Turn the 8th bit of string chars into a meta modifier.  */
-      if (INTEGERP (c) && XINT (c) & 0x80 && STRINGP (key))
+      if (STRINGP (key) && XINT (c) & 0x80 && !STRING_MULTIBYTE (key))
 	XSETINT (c, (XINT (c) | meta_modifier) & ~0x80);
 
       /* Allow string since binding for `menu-bar-select-buffer'
--- a/src/lisp.h	Sun Apr 22 13:47:56 2007 +0000
+++ b/src/lisp.h	Fri May 11 18:24:42 2007 +0000
@@ -735,9 +735,9 @@
 
 /* If a struct is made to look like a vector, this macro returns the length
    of the shortest vector that would hold that struct.  */
-#define VECSIZE(type) ((sizeof (type) - (sizeof (struct Lisp_Vector)  \
-                                         - sizeof (Lisp_Object))      \
-                        + sizeof(Lisp_Object) - 1) /* round up */     \
+#define VECSIZE(type) ((sizeof (type)					  \
+			- OFFSETOF (struct Lisp_Vector, contents[0])      \
+                        + sizeof(Lisp_Object) - 1) /* round up */	  \
 		       / sizeof (Lisp_Object))
 
 /* Like VECSIZE, but used when the pseudo-vector has non-Lisp_Object fields
--- a/src/lread.c	Sun Apr 22 13:47:56 2007 +0000
+++ b/src/lread.c	Fri May 11 18:24:42 2007 +0000
@@ -1896,7 +1896,7 @@
 
     case 's':
       c = READCHAR;
-      if (c != '-')
+      if (stringp || c != '-')
 	{
 	  UNREAD (c);
 	  return ' ';
--- a/src/macmenu.c	Sun Apr 22 13:47:56 2007 +0000
+++ b/src/macmenu.c	Fri May 11 18:24:42 2007 +0000
@@ -1011,6 +1011,11 @@
       DialogItemIndex item_hit;
       Lisp_Object tem;
 
+      /* Force a redisplay before showing the dialog.  If a frame is
+	 created just before showing the dialog, its contents may not
+	 have been fully drawn.  */
+      Fredisplay (Qt);
+
       tem = Fstring_match (concat3 (build_string ("\\("),
 				    call0 (intern ("sentence-end")),
 				    build_string ("\\)\n")),
@@ -2943,6 +2948,11 @@
     first_wv = wv;
   }
 
+  /* Force a redisplay before showing the dialog.  If a frame is created
+     just before showing the dialog, its contents may not have been fully
+     drawn.  */
+  Fredisplay (Qt);
+
   /* Actually create the dialog.  */
 #if TARGET_API_MAC_CARBON
   menu_item_selection = create_and_show_dialog (f, first_wv);
--- a/src/process.c	Sun Apr 22 13:47:56 2007 +0000
+++ b/src/process.c	Fri May 11 18:24:42 2007 +0000
@@ -1558,13 +1558,19 @@
        doc: /* Start a program in a subprocess.  Return the process object for it.
 NAME is name for process.  It is modified if necessary to make it unique.
 BUFFER is the buffer (or buffer name) to associate with the process.
- Process output goes at end of that buffer, unless you specify
- an output stream or filter function to handle the output.
- BUFFER may be also nil, meaning that this process is not associated
- with any buffer.
+
+Process output (both standard output and standard error streams) goes
+at end of BUFFER, unless you specify an output stream or filter
+function to handle the output.  BUFFER may also be nil, meaning that
+this process is not associated with any buffer.
+
 PROGRAM is the program file name.  It is searched for in PATH.
 Remaining arguments are strings to give program as arguments.
 
+If you want to separate standard output from standard error, invoke
+the command through a shell and redirect one of them using the shell
+syntax.
+
 usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS)  */)
      (nargs, args)
      int nargs;
--- a/src/sysdep.c	Sun Apr 22 13:47:56 2007 +0000
+++ b/src/sysdep.c	Fri May 11 18:24:42 2007 +0000
@@ -2531,7 +2531,9 @@
 		/* We still don't have a fully qualified domain name.
 		   Try to find one in the list of alternate names */
 		char **alias = hp->h_aliases;
-		while (*alias && !index (*alias, '.'))
+		while (*alias
+		       && (!index (*alias, '.')
+			   || !strcmp (*alias, "localhost.localdomain")))
 		  alias++;
 		if (*alias)
 		  fqdn = *alias;
--- a/src/xdisp.c	Sun Apr 22 13:47:56 2007 +0000
+++ b/src/xdisp.c	Fri May 11 18:24:42 2007 +0000
@@ -12786,8 +12786,7 @@
   int rc;
   int centering_position = -1;
   int last_line_misfit = 0;
-  int save_beg_unchanged = BEG_UNCHANGED;
-  int save_end_unchanged = END_UNCHANGED;
+  int save_beg_unchanged, save_end_unchanged;
 
   SET_TEXT_POS (lpoint, PT, PT_BYTE);
   opoint = lpoint;
@@ -12852,6 +12851,9 @@
   set_buffer_internal_1 (XBUFFER (w->buffer));
   SET_TEXT_POS (opoint, PT, PT_BYTE);
 
+  save_beg_unchanged = BEG_UNCHANGED;
+  save_end_unchanged = END_UNCHANGED;
+
   current_matrix_up_to_date_p
     = (!NILP (w->window_end_valid)
        && !current_buffer->clip_changed
@@ -13821,7 +13823,7 @@
 			 nrows_scrolled);
 
 	  /* Disable lines that must be updated.  */
-	  for (i = 0; i < it.vpos; ++i)
+	  for (i = 0; i < nrows_scrolled; ++i)
 	    (start_row + i)->enabled_p = 0;
 
 	  /* Re-compute Y positions.  */
--- a/src/xmenu.c	Sun Apr 22 13:47:56 2007 +0000
+++ b/src/xmenu.c	Fri May 11 18:24:42 2007 +0000
@@ -3375,6 +3375,14 @@
   /* No selection has been chosen yet.  */
   menu_item_selection = 0;
 
+  /* Force a redisplay before showing the dialog.  If a frame is created
+     just before showing the dialog, its contents may not have been fully
+     drawn, as this depends on timing of events from the X server.  Redisplay
+     is not done when a dialog is shown.  If redisplay could be done in the
+     X event loop (i.e. the X event loop does not run in a signal handler)
+     this would not be needed.  */
+  Fredisplay (Qt);
+
   /* Actually create and show the dialog.  */
   create_and_show_dialog (f, first_wv);