changeset 90370:e3bacb89536a

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-46 Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 157-163) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 58-61) - Update from CVS
author Miles Bader <miles@gnu.org>
date Sun, 19 Mar 2006 19:43:57 +0000
parents 88810aee3a45 (current diff) b4faac2800dd (diff)
children 383ada7eac9c
files ChangeLog Makefile.in etc/ChangeLog etc/DEBUG etc/NEWS lib-src/ChangeLog lib-src/vcdiff lisp/ChangeLog lisp/allout.el lisp/cus-edit.el lisp/font-core.el lisp/font-lock.el lisp/gnus/ChangeLog lisp/gnus/gnus-art.el lisp/gnus/gnus-util.el lisp/gnus/message.el lisp/gnus/mm-decode.el lisp/gnus/mm-uu.el lisp/ido.el lisp/image.el lisp/international/mule.el lisp/isearch.el lisp/iswitchb.el lisp/jit-lock.el lisp/locate.el lisp/mail/rmail.el lisp/mh-e/ChangeLog lisp/mh-e/mh-comp.el lisp/mh-e/mh-compat.el lisp/mh-e/mh-e.el lisp/mh-e/mh-utils.el lisp/mouse.el lisp/progmodes/gdb-ui.el lisp/progmodes/grep.el lisp/progmodes/gud.el lisp/sort.el lisp/term/w32-win.el lisp/textmodes/ispell.el lisp/textmodes/org.el lispref/ChangeLog lispref/display.texi lispref/modes.texi man/ChangeLog man/Makefile.in man/abbrevs.texi man/emacs.texi man/files.texi man/maintaining.texi man/makefile.w32-in man/mh-e.texi man/picture.texi man/programs.texi man/sending.texi man/text.texi nt/INSTALL src/ChangeLog src/dispextern.h src/emacs.c src/fringe.c src/image.c src/m/mips.h src/m/pmax.h src/macterm.c src/sheap.c src/unexelf.c src/w32fns.c src/xdisp.c src/xterm.c src/xterm.h
diffstat 76 files changed, 4033 insertions(+), 2191 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Mar 14 12:15:08 2006 +0000
+++ b/ChangeLog	Sun Mar 19 19:43:57 2006 +0000
@@ -1,3 +1,11 @@
+2006-03-18  Claudio Fontana  <claudio@gnu.org>
+
+	* Makefile.in (INFO_FILES): New variable, contains all Info file names.
+	(install-arch-indep, uninstall): Use $(INFO_FILES) to specify files
+	to be installed/uninstalled.
+	(uninstall): Invoke "$(INSTALL_INFO) --remove" to remove references
+	to Info files installed by Emacs.
+
 2006-03-03  Claudio Fontana  <claudio@gnu.org>
 
 	* Makefile.in (install, uninstall): Add DESTDIR variable to
--- a/Makefile.in	Tue Mar 14 12:15:08 2006 +0000
+++ b/Makefile.in	Sun Mar 19 19:43:57 2006 +0000
@@ -134,6 +134,11 @@
 # since there are now many packages documented with the texinfo
 # system, it is inappropriate to imply that it is part of Emacs.
 infodir=@infodir@
+INFO_FILES=ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq \
+           elisp eintr emacs emacs-mime emacs-xtra eshell eudc flymake \
+           forms gnus idlwave info message mh-e newsticker org pcl-cvs \
+           pgg reftex sc ses sieve speedbar tramp vip viper widget     \
+           woman smtpmail url rcirc erc
 
 # Directory for local state files for all programs.
 localstatedir=@localstatedir@
@@ -497,19 +502,20 @@
 	      chmod a+r $(DESTDIR)${infodir}/dir); \
 	   fi; \
 	   cd ${srcdir}/info ; \
-	   for f in ada-mode* autotype* calc* ccmode* cl* dired-x* ebrowse* ediff* efaq* eintr* elisp* emacs* emacs-mime* emacs-xtra* eshell* eudc* flymake* forms* gnus* idlwave* info* message* mh-e* newsticker* org* pcl-cvs* pgg* reftex* sc* ses* sieve* speedbar* tramp* vip* widget* woman* smtpmail* url* rcirc* erc*; do \
-	     (cd $${thisdir}; \
-	      ${INSTALL_DATA} ${srcdir}/info/$$f $(DESTDIR)${infodir}/$$f; \
-	      chmod a+r $(DESTDIR)${infodir}/$$f); \
+	   for elt in $(INFO_FILES); do \
+	      for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \
+	        ${INSTALL_DATA} $$f $(DESTDIR)${infodir}/$$f; \
+	        chmod a+r $(DESTDIR)${infodir}/$$f; \
+	      done; \
 	   done); \
 	else true; fi
 	-unset CDPATH; \
 	thisdir=`/bin/pwd`; \
 	if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd $(DESTDIR)${infodir} && /bin/pwd)` ]; \
 	then \
-	  for f in ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq elisp eintr emacs emacs-mime emacs-xtra eshell eudc flymake forms gnus idlwave info message mh-e newsticker org pcl-cvs pgg reftex sc ses sieve speedbar tramp vip viper widget woman smtpmail url rcirc erc; do \
+	  for elt in $(INFO_FILES); do \
 	    (cd $${thisdir}; \
-	     ${INSTALL_INFO} --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$f); \
+	     ${INSTALL_INFO} --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \
 	  done; \
 	else true; fi
 	-chmod -R a+r $(DESTDIR)${datadir}/emacs ${COPYDESTS} $(DESTDIR)${infodir}
@@ -573,7 +579,13 @@
 	done
 	(cd $(DESTDIR)${archlibdir} && rm -f fns-*)
 	-rm -rf $(DESTDIR)${libexecdir}/emacs/${version}
-	(cd $(DESTDIR)${infodir} && rm -f cl* ada-mode* autotype* calc* ccmode* ebrowse* efaq* eintr elisp* eshell* eudc* idlwave* message* pcl-cvs* reftex* speedbar* tramp* widget* woman* dired-x* ediff* emacs* emacs-xtra* flymake* forms* gnus* info* mh-e* newsticker* org* sc* ses* vip* smtpmail* url* rcirc* erc*)
+	(cd $(DESTDIR)${infodir} && \
+	  for elt in $(INFO_FILES); do \
+	    $(INSTALL_INFO) --remove --info-dir=. $$elt; \
+	    for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \
+	      rm -f $$f; \
+	    done; \
+	  done;)
 	(cd $(DESTDIR)${man1dir}  && rm -f emacs${manext} emacsclient${manext} etags${manext} ctags${manext})
 	(cd $(DESTDIR)${bindir}  && rm -f $(EMACSFULL) $(EMACS))
 
--- a/etc/ChangeLog	Tue Mar 14 12:15:08 2006 +0000
+++ b/etc/ChangeLog	Sun Mar 19 19:43:57 2006 +0000
@@ -1,3 +1,11 @@
+2006-03-15  Carsten Dominik  <dominik@science.uva.nl>
+
+	* orgcard.tex: Version number change only.
+
+2006-03-15  Nick Roberts  <nickrob@snap.net.nz>
+
+	* DEBUG (Note): Describe features for debugging with GDB in Emacs.
+
 2006-03-11  Miles Bader  <miles@gnu.org>
 
 	* images/mail: New directory.
--- a/etc/DEBUG	Tue Mar 14 12:15:08 2006 +0000
+++ b/etc/DEBUG	Sun Mar 19 19:43:57 2006 +0000
@@ -245,6 +245,25 @@
 
    xsymbol
 
+** Using GDB in Emacs
+
+Debugging with GDB in Emacs offers some advantages over the command line (See
+the GDB Graphical Interface node of the Emacs manual).  There are also some
+features available just for debugging Emacs:
+
+1) The command gud-pp isavailable on the tool bar (the `pp' icon) and allows
+   the user to print the s-expression of the variable at point, in the GUD
+   buffer.
+
+2) Pressing `p' on a component of a watch expression that is a lisp object
+   in the speedbar prints its s-expression in the GUD buffer.
+
+3) The STOP button on the tool bar is adjusted so that it sends SIGTSTP
+   instead of the usual SIGINT.
+
+4) The command gud-pv has the global binding 'C-x C-a C-v' and prints the
+   value of the lisp variable at point.
+
 ** Debugging what happens while preloading and dumping Emacs
 
 Type `gdb temacs' and start it with `r -batch -l loadup dump'.
@@ -487,22 +506,44 @@
 The array `last_marked' (defined on alloc.c) can be used to display up
 to 500 last objects marked by the garbage collection process.
 Whenever the garbage collector marks a Lisp object, it records the
-pointer to that object in the `last_marked' array.  The variable
-`last_marked_index' holds the index into the `last_marked' array one
-place beyond where the pointer to the very last marked object is
-stored.
+pointer to that object in the `last_marked' array, which is maintained
+as a circular buffer.  The variable `last_marked_index' holds the
+index into the `last_marked' array one place beyond where the pointer
+to the very last marked object is stored.
 
 The single most important goal in debugging GC problems is to find the
 Lisp data structure that got corrupted.  This is not easy since GC
 changes the tag bits and relocates strings which make it hard to look
 at Lisp objects with commands such as `pr'.  It is sometimes necessary
 to convert Lisp_Object variables into pointers to C struct's manually.
-Use the `last_marked' array and the source to reconstruct the sequence
-that objects were marked.
 
-Once you discover the corrupted Lisp object or data structure, it is
-useful to look at it in a fresh Emacs session and compare its contents
-with a session that you are debugging.
+Use the `last_marked' array and the source to reconstruct the sequence
+that objects were marked.  In general, you need to correlate the
+values recorded in the `last_marked' array with the corresponding
+stack frames in the backtrace, beginning with the innermost frame.
+Some subroutines of `mark_object' are invoked recursively, others loop
+over portions of the data structure and mark them as they go.  By
+looking at the code of those routines and comparing the frames in the
+backtrace with the values in `last_marked', you will be able to find
+connections between the values in `last_marked'.  E.g., when GC finds
+a cons cell, it recursively marks its car and its cdr.  Similar things
+happen with properties of symbols, elements of vectors, etc.  Use
+these connections to reconstruct the data structure that was being
+marked, paying special attention to the strings and names of symbols
+that you encounter: these strings and symbol names can be used to grep
+the sources to find out what high-level symbols and global variables
+are involved in the crash.
+
+Once you discover the corrupted Lisp object or data structure, grep
+the sources for its uses and try to figure out what could cause the
+corruption.  If looking at the sources doesn;t help, you could try
+setting a watchpoint on the corrupted data, and see what code modifies
+it in some invalid way.  (Obviously, this technique is only useful for
+data that is modified only very rarely.)
+
+It is also useful to look at the corrupted object or data structure in
+a fresh Emacs session and compare its contents with a session that you
+are debugging.
 
 ** Debugging problems with non-ASCII characters
 
--- a/etc/NEWS	Tue Mar 14 12:15:08 2006 +0000
+++ b/etc/NEWS	Sun Mar 19 19:43:57 2006 +0000
@@ -234,6 +234,10 @@
 ** 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
@@ -948,11 +952,6 @@
 `Info-mode-hook'.
 
 +++
-*** font-lock-lines-before specifies a number of lines before the
-current line that should be refontified when you change the buffer.
-The default value is 1.
-
-+++
 *** font-lock: in modes like C and Lisp where the fontification assumes that
 an open-paren in column 0 is always outside of any string or comment,
 font-lock now highlights any such open-paren-in-column-zero in bold-red
--- a/etc/orgcard.tex	Tue Mar 14 12:15:08 2006 +0000
+++ b/etc/orgcard.tex	Sun Mar 19 19:43:57 2006 +0000
@@ -1,4 +1,4 @@
-% Reference Card for Org Mode 4.09
+% Reference Card for Org Mode 4.10
 %
 %**start of header
 \newcount\columnsperpage
@@ -58,7 +58,7 @@
 % Thanks to Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik
 % for their many good ideas.
 
-\def\orgversionnumber{4.09}
+\def\orgversionnumber{4.10}
 \def\year{2006}
 
 \def\shortcopyrightnotice{\vskip 1ex plus 2 fill
--- a/lib-src/ChangeLog	Tue Mar 14 12:15:08 2006 +0000
+++ b/lib-src/ChangeLog	Sun Mar 19 19:43:57 2006 +0000
@@ -1,3 +1,8 @@
+2006-03-18  Andre Spiegel  <spiegel@gnu.org>
+
+	* vcdiff: Use "echo" as a default for $echo, otherwise we'll
+	execute $DIFF twice, and once with the wrong options.
+
 2006-02-23  Claudio Fontana  <claudio@gnu.org>
 
 	* Makefile.in (install, uninstall): Add DESTDIR variable to
--- a/lib-src/vcdiff	Tue Mar 14 12:15:08 2006 +0000
+++ b/lib-src/vcdiff	Sun Mar 19 19:43:57 2006 +0000
@@ -29,7 +29,7 @@
 
 PATH=$PATH:/usr/ccs/bin:/usr/sccs:/usr/xpg4/bin # common SCCS hangouts
 
-echo=
+echo="echo"
 sid1= sid2=
 
 for f
@@ -96,7 +96,7 @@
 				workfile=$rev2
 			esac
 		then
-			$echo $DIFF $options $sid1 $sid2 $workfile >&2
+			$echo $DIFF $options $rev1 $workfile >&2
 			$DIFF $options $rev1 $workfile
 			s=$?
 		fi
--- a/lisp/ChangeLog	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/ChangeLog	Sun Mar 19 19:43:57 2006 +0000
@@ -1,3 +1,199 @@
+2006-03-18  Ben North  <ben@redfrontdoor.org>  (tiny change)
+
+	* isearch.el (isearch-other-meta-char): Handle user bindings for
+	shifted control characters.
+
+2006-03-18  Agustin Martin  <agustin.martin@hispalinux.es>
+
+	* textmodes/ispell.el (ispell-skip-region-alist): Add "_+" to the
+	part that matches email addresses, file names, etc.
+
+2006-03-18  Eli Zaretskii  <eliz@gnu.org>
+
+	* term/w32-win.el (mouse-set-font): Mention
+	w32-list-proportional-fonts in the doc string.
+
+2006-03-18  Kim F. Storm  <storm@cua.dk>
+
+	* ido.el (ido-cache-ftp-work-directory-time): Doc fix.
+	(ido-unc-hosts): New user option to explicitly define list of know
+	UNC-style hosts for completion.
+	(ido-cache-unc-host-shares-time): New user option.
+	(ido-is-unc-root, ido-is-unc-host, ido-cache-unc-valid): New
+	helper functions for UNC file-name support.
+	(ido-may-cache-directory): Check for UNC host.  Simplify.
+	(ido-wash-history): Clean out old UNC hosts.
+	(ido-nonreadable-directory-p): UNC hosts are always readable.
+	(ido-directory-too-big-p): UNC hosts are never too big.
+	(ido-set-current-directory): Handle UNC root path.
+	(ido-file-name-all-completions): Complete UNC host names from
+	ido-unc-hosts list.  Cache UNC host shares.
+	(ido-make-file-list-1): Don't filter UNC root.
+	(ido-exhibit): Check for // in root directory, and switch to UNC
+	mode by setting ido-current-directory to //.
+
+2006-03-17  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* cus-edit.el (customize-changed-options): Mention explicit
+	version number as default in prompt.
+
+2006-03-17  Bill Wohler  <wohler@newt.com>
+
+	* image.el (image-load-path-for-library): Minor docstring fix.
+
+2006-03-17  Carsten Dominik  <dominik@science.uva.nl>
+
+	* textmodes/org.el (org-read-date): Include subgroup 5 into
+	replacement text.
+	(org-popup-calendar-for-date-prompt): Fix customization type.
+
+2006-03-17  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gdb-ui.el (gud-watch): Provide completion.
+	(gdb-continuation): New variable.
+	(gdb-send): Deal with continuation lines.
+
+	* progmodes/gud.el (gud-gdb-complete-command)
+	(gud-gdb-run-command-fetch-lines): Adapt for use with watch
+	expressions.
+	(gud-tooltip-mode): Use buffer-local value.
+
+2006-03-16  Kim F. Storm  <storm@cua.dk>
+
+	* ido.el (ido-edit-input): Use selected match, if any.
+
+2006-03-16  Bill Wohler  <wohler@newt.com>
+
+	* image.el (image-load-path-for-library): Prefer user's images in
+	image-load-path.
+
+2006-03-16  Martin Rudalics  <rudalics@gmx.at>
+
+	* mouse.el (mouse-drag-vertical-line): Use window-inside-edges
+	when checking for attempt to drag leftmost or rightmost scrollbar.
+
+2006-03-16  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gdb-ui.el (gdb-inferior-status): New variable.
+	(gdb-force-mode-line-update): New function.
+	(gdb-resync, gdb-starting, gdb-signal, gdb-exited, gdb-stopped)
+	(gdb-exited): Use them.
+	(gdb-signal): New fuction.
+	(gdb-annotation-rules): Provide a rule for it.
+
+2006-03-16  Kenichi Handa  <handa@m17n.org>
+
+	* international/mule.el (auto-coding-regexp-alist): Add entries
+	for Unicode BOM.
+
+	* sort.el (sort-build-lists): Temporarily bind
+	inhibit-field-text-motion to t.
+
+2006-03-15  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* locate.el (locate-command, locate-make-command-line)
+	(locate-fcodes-file, locate-update-command)
+	(locate-prompt-for-command, locate, locate-with-filter)
+	(locate-get-file-positions): Doc fixes.
+	(locate-buffer-name, locate-header-face): Remove leading `*' in
+	defcustom.
+	(locate-filter-output): Use `keep-lines' instead of its alias
+	`delete-non-matching-lines'.
+	(locate-get-filename, locate-get-dirname): Add introductory comment.
+	(locate-find-directory-other-window): Give appropriate error
+	message if used outside main listing.
+
+2006-03-15  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* font-lock.el (font-lock-lines-before): Delete variable, subsumed by
+	the new extend-region feature.
+	(font-lock-after-change-function): Update correspondingly.
+	* jit-lock.el (jit-lock-after-change): Update correspondingly.
+	* progmodes/grep.el (font-lock-lines-before): Don't disable.
+
+2006-03-15  Bill Wohler  <wohler@newt.com>
+
+	* image.el (image-load-path-for-library): Fix example by not
+	recommending that one binds image-load-path. Just defvar it to
+	placate compiler and only use it if previously defined.
+
+2006-03-15  Carsten Dominik  <dominik@science.uva.nl>
+
+	* textmodes/org.el (org-insert-centered): Use `string-width' to
+	make underlining work for wide characters.
+	(org-goto-map, org-agenda-mode-map, org-mode-map): Explicitly bind
+	TAB to `org-cycle', to make sure that no binding in
+	`outline-mode-map' can supercede it.
+
+2006-03-14  Ken Manheimer  <ken.manheimer@gmail.com>
+
+	* allout.el: Increment version to 2.2.1 in file commentary.
+
+	(allout-version): Increment to 2.2.1.
+
+	(allout-default-layout): New customization variable, used when the
+	file lacks a specific allout-layout.  Uses allout-layout-type for
+	recursively nested definition.
+
+	(allout-layout-type): Widget defining allout layouts, necessary for
+	self-recursive definition.
+
+	(allout-mode): Incorporate allout-default-layout as fallback for
+	allout-layout.
+
+	(allout-layout): Mark as 'safe-local-variable', and refer mention
+	fallback to `allout-default-layout' in absence of a specified value.
+	(allout-passphrase-verifier-string)
+	(allout-passphrase-hint-string): Mark as 'safe-local-variable'.
+
+	(allout-file-passphrase-verifier-string): Obsolete variable, removed.
+
+	(allout-get-encryption-passphrase-verifier): Use correct name of
+	passphrase verifier in docstring.
+
+2006-03-15  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gdb-ui.el (gdb-var-list): Change order of first two
+	elements.
+	(gdb-find-watch-expression): Make it work for arrays too.  Follow
+	change to gdb-var-list.
+	(gud-watch): Allow the user to enter variable name with a prexix
+	arg.  Create keybindings.
+	(gdb-var-create-handler, gdb-var-evaluate-expression-handler)
+	(gdb-var-list-children-handler, gdb-var-update-handler)
+	(gdb-var-delete, gdb-edit-value, gdb-speedbar-expand-node)
+	(gdb-var-list-children-handler-1, gdb-var-update-handler-1):
+	Follow change to gdb-var-list.
+	(gdb-starting): Don't show the overlay arrows when program is
+	running.
+
+	* progmodes/gud.el (gud-speedbar-buttons): Follow change to
+	gdb-var-list.
+
+2006-03-14  Bill Wohler  <wohler@newt.com>
+
+	* image.el (image-load-path-for-library): Pass value of path
+	rather than symbol.  Always return list of directories.  Guarantee
+	that image directory comes first.
+
+2006-03-14  Alan Mackenzie  <acm@muc.de>
+
+	* font-core.el: New function/variable
+	font-lock-extend-region\(-function\)?.
+
+	* font-lock.el (font-lock-after-change-function): Call
+	font-lock-extend-region.  Obey font-lock-lines-before.
+	(font-lock-default-fontify-region): Remove reference to
+	font-lock-lines-before.
+
+	* jit-lock.el (jit-lock-after-change): Call
+	font-lock-extend-region.  Obey font-lock-lines-before.
+
+2006-03-14  David Ponce  <david@dponce.com>
+
+	* tree-widget.el (tree-widget-themes-load-path)
+	(tree-widget-themes-directory, tree-widget-theme): Doc fix.
+
 2006-03-13  Ryan Yeske  <rcyeske@gmail.com>
 
 	* net/rcirc.el (rcirc) <defgroup>: Add link to manual.
@@ -8,8 +204,8 @@
 
 2006-03-13  Miles Bader  <miles@gnu.org>
 
-	* net/rcirc.el (rcirc-nick-abbrevs): Variable removed.
-	(rcirc-abbrev-nick): Function removed.
+	* net/rcirc.el (rcirc-nick-abbrevs): Remove variable.
+	(rcirc-abbrev-nick): Remove function.
 	(rcirc-format-response-string): Don't call `rcirc-abbrev-nick'.
 
 2006-03-13  David Ponce  <david@dponce.com>
@@ -25,11 +221,11 @@
 
 2006-03-13  Carsten Dominik  <dominik@science.uva.nl>
 
-	* textmodes/org.el: (org-link-search): Avoid self-matching of
+	* textmodes/org.el (org-link-search): Avoid self-matching of
 	links, allow target text to be distributed over several lines.
 	(org-search-not-link): New function.
-	(org-set-regexps-and-options, org-get-current-options): New
-	startup options.
+	(org-set-regexps-and-options, org-get-current-options):
+	New startup options.
 	(org-export-as-html): Take odd-level setting from local variable.
 	(org-fontify-emphasized-text): New option.
 	(org-set-font-lock-defaults): Include emphasized text.
@@ -100,8 +296,8 @@
 
 2006-03-11  Kurt Hornik  <Kurt.Hornik@wu-wien.ac.at>
 
-	* progmodes/octave-mod.el (octave-indent-for-comment): Behave
-	according to do string.
+	* progmodes/octave-mod.el (octave-indent-for-comment):
+	Behave according to do string.
 
 2006-03-11  Agustin Martin  <agustin.martin@hispalinux.es>
 
@@ -139,7 +335,7 @@
 	* progmodes/gdb-ui.el (gdb-remove-text-properties): Rename from
 	gdb-remove-mouse-face and remove help-echo too.
 	(gdb-enqueue-input): Correct conditional clause.
-	
+
 2006-03-10  Glenn Morris  <rgm@gnu.org>
 
 	* calendar/calendar.el (calendar-holidays): Doc fix.
--- a/lisp/allout.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/allout.el	Sun Mar 19 19:43:57 2006 +0000
@@ -6,7 +6,7 @@
 ;; Author: Ken Manheimer <ken dot manheimer at gmail dot com>
 ;; Maintainer: Ken Manheimer <ken dot manheimer at gmail dot com>
 ;; Created: Dec 1991 - first release to usenet
-;; Version: 2.2
+;; Version: 2.2.1
 ;; Keywords: outlines wp languages
 
 ;; This file is part of GNU Emacs.
@@ -126,38 +126,72 @@
                 (const :tag "Mode only" "activate")
                 (const :tag "Off" nil))
   :group 'allout)
-;;;_  = allout-layout
-(defvar allout-layout nil
-  "*Layout specification and provisional mode trigger for allout outlines.
-
-Buffer-specific.
-
-A list value specifies a default layout for the current buffer, to be
-applied upon activation of `allout-mode'.  Any non-nil value will
-automatically trigger `allout-mode' \(provided `allout-init' has been called
-to enable this behavior).
-
-See the docstring for `allout-init' for details on setting up for
-auto-mode-activation, and for `allout-expose-topic' for the format of
-the layout specification.
-
-You can associate a particular outline layout with a file by setting
-this var via the file's local variables.  For example, the following
-lines at the bottom of an Emacs Lisp file:
-
-;;;Local variables:
-;;;allout-layout: \(0 : -1 -1 0)
-;;;End:
-
-will, modulo the above-mentioned conditions, cause the mode to be
-activated when the file is visited, followed by the equivalent of
-`\(allout-expose-topic 0 : -1 -1 0)'.  \(This is the layout used for
-the allout.el source file.)
+;;;_  = allout-default-layout
+(defcustom allout-default-layout '(-2 : 0)
+  "*Default allout outline layout specification.
+
+This setting specifies the outline exposure to use when
+`allout-layout' has the local value `t'.  This docstring describes the
+layout specifications.
+
+A list value specifies a default layout for the current buffer,
+to be applied upon activation of `allout-mode'.  Any non-nil
+value will automatically trigger `allout-mode', provided
+`allout-init' has been called to enable this behavior.
+
+The types of elements in the layout specification are:
+
+ integer - dictate the relative depth to open the corresponding topic(s),
+           where:
+         - negative numbers force the topic to be closed before opening
+           to the absolute value of the number, so all siblings are open
+           only to that level.
+         - positive numbers open to the relative depth indicated by the
+           number, but do not force already opened subtopics to be closed.
+         - 0 means to close topic - hide all subitems.
+ :   - repeat spec - apply the preceeding element to all siblings at
+       current level, *up to* those siblings that would be covered by specs
+       following the `:' on the list.  Ie, apply to all topics at level but
+       trailing ones accounted for by trailing specs.  \(Only the first of
+       multiple colons at the same level is honored - later ones are ignored.)
+ *   - completely exposes the topic, including bodies
+ +   - exposes all subtopics, but not the bodies
+ -   - exposes the body of the corresponding topic, but not subtopics
+ list - a nested layout spec, to be applied intricately to its
+        corresponding item(s)
+
+Examples:
+ '(-2 : 0)
+	Collapse the top-level topics to show their children and
+        grandchildren, but completely collapse the final top-level topic.
+ '(-1 () : 1 0)
+	Close the first topic so only the immediate subtopics are shown,
+        leave the subsequent topics exposed as they are until the second
+	second to last topic, which is exposed at least one level, and
+        completely close the last topic.
+ '(-2 : -1 *)
+        Expose children and grandchildren of all topics at current
+	level except the last two; expose children of the second to
+	last and completely expose the last one, including its subtopics.
+
+See `allout-expose-topic' for more about the exposure process.
 
 Also, allout's mode-specific provisions will make topic prefixes default
 to the comment-start string, if any, of the language of the file.  This
-is modulo the setting of `allout-use-mode-specific-leader', which see.")
-(make-variable-buffer-local 'allout-layout)
+is modulo the setting of `allout-use-mode-specific-leader', which see."
+  :type 'allout-layout-type
+  :group 'allout)
+;;;_  : allout-layout-type
+(define-widget 'allout-layout-type 'lazy
+  "Allout layout format customization basic building blocks."
+  :type '(repeat
+          (choice (integer :tag "integer (<= zero is strict)")
+                  (const :tag ": (repeat prior)" :)
+                  (const :tag "* (completely expose)" *)
+                  (const :tag "+ (expose all offspring, headlines only)" +)
+                  (const :tag "- (expose topic body but not offspring)" -)
+                  (allout-layout-type :tag "<Nested layout>"))))
+
 ;;;_  = allout-show-bodies
 (defcustom allout-show-bodies nil
   "*If non-nil, show entire body when exposing a topic, rather than
@@ -590,7 +624,7 @@
 ;;;_ #1 Internal Outline Formatting and Configuration
 ;;;_  : Version
 ;;;_   = allout-version
-(defvar allout-version "2.2"
+(defvar allout-version "2.2.1"
   "Version of currently loaded outline package.  \(allout.el)")
 ;;;_   > allout-version
 (defun allout-version (&optional here)
@@ -604,6 +638,36 @@
 ;;;_   = allout-mode
 (defvar allout-mode nil "Allout outline mode minor-mode flag.")
 (make-variable-buffer-local 'allout-mode)
+;;;_   = allout-layout nil
+(defvar allout-layout nil            ; LEAVE GLOBAL VALUE NIL - see docstring.
+  "Buffer-specific setting for allout layout.
+
+In buffers where this is non-nil \(and if `allout-init' has been run, to
+enable this behavior), `allout-mode' will be automatically activated.  The
+layout dictated by the value will be used to set the initial exposure when
+`allout-mode' is activated.
+
+\*You should not setq-default this variable non-nil unless you want every
+visited file to be treated as an allout file.*
+
+The value would typically be set by a file local variable.  For
+example, the following lines at the bottom of an Emacs Lisp file:
+
+;;;Local variables:
+;;;allout-layout: \(0 : -1 -1 0)
+;;;End:
+
+dictate activation of `allout-mode' mode when the file is visited
+\(presuming allout-init was already run), followed by the
+equivalent of `\(allout-expose-topic 0 : -1 -1 0)'.  \(This is
+the layout used for the allout.el source file.)
+
+`allout-default-layout' describes the specification format.
+`allout-layout' can additionally have the value `t', in which
+case the value of `allout-default-layout' is used.")
+(make-variable-buffer-local 'allout-layout)
+(put 'allout-layout 'safe-local-variable t)
+
 ;;;_  : Topic header format
 ;;;_   = allout-regexp
 (defvar allout-regexp ""
@@ -973,11 +1037,6 @@
   "Horrible hack used to prevent invalid multiple triggering of outline
 mode from prop-line file-var activation.  Used by `allout-mode' function
 to track repeats.")
-;;;_   = allout-file-passphrase-verifier-string
-(defvar allout-file-passphrase-verifier-string nil
-  "Name for use as a file variable for verifying encryption passphrase
-across sessions.")
-(make-variable-buffer-local 'allout-file-passphrase-verifier-string)
 ;;;_   = allout-passphrase-verifier-string
 (defvar allout-passphrase-verifier-string nil
   "Setting used to test solicited encryption passphrases against the one
@@ -993,6 +1052,7 @@
 the emacs buffer state, if file variable adjustments are enabled.  See
 `allout-enable-file-variable-adjustment' for details about that.")
 (make-variable-buffer-local 'allout-passphrase-verifier-string)
+(put 'allout-passphrase-verifier-string 'safe-local-variable t)
 ;;;_   = allout-passphrase-hint-string
 (defvar allout-passphrase-hint-string ""
   "Variable used to retain reminder string for file's encryption passphrase.
@@ -1004,6 +1064,7 @@
 state, if file variable adjustments are enabled.  See
 `allout-enable-file-variable-adjustment' for details about that.")
 (make-variable-buffer-local 'allout-passphrase-hint-string)
+(put 'allout-passphrase-hint-string 'safe-local-variable t)
 (setq-default allout-passphrase-hint-string "")
 ;;;_   = allout-after-save-decrypt
 (defvar allout-after-save-decrypt nil
@@ -1578,30 +1639,33 @@
       (allout-infer-body-reindent))
      )					; cond
 
-    (if (and do-layout
-	     allout-auto-activation
-	     (listp allout-layout)
-	     (and (not (eq allout-auto-activation 'activate))
-		  (if (eq allout-auto-activation 'ask)
-		      (if (y-or-n-p (format "Expose %s with layout '%s'? "
-					    (buffer-name)
-					    allout-layout))
-			  t
-			(message "Skipped %s layout." (buffer-name))
-			nil)
-		    t)))
-	(save-excursion
-	  (message "Adjusting '%s' exposure..." (buffer-name))
-	  (goto-char 0)
-	  (allout-this-or-next-heading)
-	  (condition-case err
-	      (progn
-		(apply 'allout-expose-topic (list allout-layout))
-		(message "Adjusting '%s' exposure... done." (buffer-name)))
-	    ;; Problem applying exposure - notify user, but don't
-	    ;; interrupt, eg, file visit:
-	    (error (message "%s" (car (cdr err)))
-		   (sit-for 1)))))
+    (let ((use-layout (if (listp allout-layout)
+                          allout-layout
+                        allout-default-layout)))
+      (if (and do-layout
+               allout-auto-activation
+               use-layout
+               (and (not (eq allout-auto-activation 'activate))
+                    (if (eq allout-auto-activation 'ask)
+                        (if (y-or-n-p (format "Expose %s with layout '%s'? "
+                                              (buffer-name)
+                                              use-layout))
+                            t
+                          (message "Skipped %s layout." (buffer-name))
+                          nil)
+                      t)))
+          (save-excursion
+            (message "Adjusting '%s' exposure..." (buffer-name))
+            (goto-char 0)
+            (allout-this-or-next-heading)
+            (condition-case err
+                (progn
+                  (apply 'allout-expose-topic (list use-layout))
+                  (message "Adjusting '%s' exposure... done." (buffer-name)))
+              ;; Problem applying exposure - notify user, but don't
+              ;; interrupt, eg, file visit:
+              (error (message "%s" (car (cdr err)))
+                     (sit-for 1))))))
     allout-mode
     )					; let*
   )  					; defun
@@ -1660,7 +1724,7 @@
             (if (not
                  (yes-or-no-p
                   (substitute-command-keys
-                   (concat "Modify this concealed text?  (\"no\" aborts,"
+                   (concat "Modify concealed text?  (\"no\" just aborts,"
                            " \\[keyboard-quit] also reconceals) "))))
                 (progn (goto-char start)
                        (error "Concealed-text change refused.")))
@@ -1676,7 +1740,7 @@
 
 This before-change handler is used only where modification-hooks
 overlay property is not supported."
-  (if (not allout-mode)
+  (if (not (allout-mode-p))
       nil
     (allout-overlay-interior-modification-handler nil nil beg end nil)))
 ;;;_  > allout-isearch-end-handler (&optional overlay)
@@ -2561,7 +2625,6 @@
 return to regular interpretation of self-insert characters."
 
   (if (not (allout-mode-p))
-      ;; Shouldn't be invoked if not in allout-mode, but just in case:
       nil
     ;; Hot-spot navigation provisions:
     (if (and (eq this-command 'self-insert-command)
@@ -2595,7 +2658,7 @@
 		      this-command mapped-binding)))))))
 ;;;_   > allout-find-file-hook ()
 (defun allout-find-file-hook ()
-  "Activate `allout-mode' when `allout-auto-activation', `allout-layout' non-nil.
+  "Activate `allout-mode' on non-nil `allout-auto-activation', `allout-layout'.
 
 See `allout-init' for setup instructions."
   (if (and allout-auto-activation
@@ -3415,7 +3478,7 @@
   (if (or (not (allout-mode-p))
           (not (bolp))
           (not (looking-at allout-regexp)))
-      ;; Above conditions do not obtain - just do a regular kill:
+      ;; Just do a regular kill:
       (kill-line arg)
     ;; Ah, have to watch out for adjustments:
     (let* ((beg (point))
@@ -3889,7 +3952,7 @@
 topics \(which intrinsically can be considered both collapsed and
 not\), as collapsed.  Otherwise they are considered uncollapsed."
   (save-excursion
-      (and 
+      (and
        (= (progn (allout-back-to-current-heading)
                  (move-end-of-line 1)
                  (point))
@@ -5068,7 +5131,7 @@
   )
 ;;;_  > allout-obtain-passphrase (for-key cache-id prompt-id key-type
 ;;;                                       allout-buffer retried fetch-pass)
-(defun allout-obtain-passphrase (for-key cache-id prompt-id key-type 
+(defun allout-obtain-passphrase (for-key cache-id prompt-id key-type
                                          allout-buffer retried fetch-pass)
   "Obtain passphrase for a key from the cache or else from the user.
 
@@ -5242,7 +5305,7 @@
                            nil nil 0 passphrase))
   )
 ;;;_  > allout-update-passphrase-mnemonic-aids (for-key passphrase
-;;;                                                     outline-buffer) 
+;;;                                                     outline-buffer)
 (defun allout-update-passphrase-mnemonic-aids (for-key passphrase
                                                        outline-buffer)
   "Update passphrase verifier and hint strings if necessary.
@@ -5298,7 +5361,7 @@
 (defun allout-get-encryption-passphrase-verifier ()
   "Return text of the encrypt passphrase verifier, unmassaged, or nil if none.
 
-Derived from value of `allout-file-passphrase-verifier-string'."
+Derived from value of `allout-passphrase-verifier-string'."
 
   (let ((verifier-string (and (boundp 'allout-passphrase-verifier-string)
                               allout-passphrase-verifier-string)))
@@ -5457,7 +5520,7 @@
       (insert (concat "Dummy outline topic header - see"
                       "`allout-mode' docstring: `^Hm'."))
       (allout-adjust-file-variable
-       "allout-layout" (format "%s" (or allout-layout '(-1 : 0)))))))
+       "allout-layout" (or allout-layout '(-1 : 0))))))
 ;;;_  > allout-file-vars-section-data ()
 (defun allout-file-vars-section-data ()
   "Return data identifying the file-vars section, or nil if none.
@@ -5708,13 +5771,7 @@
 
 With argument ARG not nil or 1, move forward ARG - 1 lines first.
 If point reaches the beginning or end of buffer, it stops there.
-To ignore intangibility, bind `inhibit-point-motion-hooks' to t.
-
-This function does not move point across a field boundary unless that
-would move point to a different line than the original, unconstrained
-result.  If N is nil or 1, and a front-sticky field starts at point,
-the point does not move.  To ignore field boundaries bind
-`inhibit-field-text-motion' to t."
+To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
       (interactive "p")
       (or arg (setq arg 1))
       (if (/= arg 1)
@@ -5730,7 +5787,7 @@
           (skip-chars-backward "^\n"))
         (vertical-motion 0)
         (if (/= orig (point))
-            (goto-char (constrain-to-field (point) orig (/= arg 1) t nil)))))
+            (goto-char orig))))
 )
 ;;;_  > move-end-of-line if necessary - older emacs, xemacs
 (if (not (fboundp 'move-end-of-line))
@@ -5741,13 +5798,7 @@
 
 With argument ARG not nil or 1, move forward ARG - 1 lines first.
 If point reaches the beginning or end of buffer, it stops there.
-To ignore intangibility, bind `inhibit-point-motion-hooks' to t.
-
-This function does not move point across a field boundary unless that
-would move point to a different line than the original, unconstrained
-result.  If N is nil or 1, and a rear-sticky field ends at point,
-the point does not move.  To ignore field boundaries bind
-`inhibit-field-text-motion' to t."
+To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
       (interactive "p")
       (or arg (setq arg 1))
       (let ((orig (point))
@@ -5777,8 +5828,7 @@
                   (setq arg 1)
                 (setq done t)))))
         (if (/= orig (point))
-            (goto-char (constrain-to-field (point) orig (/= arg 1) t
-                                           nil)))))
+            (goto-char orig))))
   )
 ;;;_  > line-move-invisible-p if necessary
 (if (not (fboundp 'line-move-invisible-p))
--- a/lisp/cus-edit.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/cus-edit.el	Sun Mar 19 19:43:57 2006 +0000
@@ -1092,7 +1092,11 @@
 With argument SINCE-VERSION (a string), customize all settings
 that were added or redefined since that version."
 
-  (interactive "sCustomize options changed, since version (default all versions): ")
+  (interactive
+   (list
+    (read-from-minibuffer
+     (format "Customize options changed, since version (default %s): "
+	     customize-changed-options-previous-release))))
   (if (equal since-version "")
       (setq since-version nil)
     (unless (condition-case nil
--- a/lisp/font-core.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/font-core.el	Sun Mar 19 19:43:57 2006 +0000
@@ -83,6 +83,34 @@
 settings.  See the variable `font-lock-defaults', which takes precedence.")
 (make-obsolete-variable 'font-lock-defaults-alist 'font-lock-defaults)
 
+(defvar font-lock-extend-region-function nil
+  "A function that determines the region to fontify after a change.
+
+This buffer-local variable is either nil, or is a function that determines the
+region to fontify.  It is usually set by the major mode.  The currently active
+font-lock after-change function calls this function after each buffer change.
+
+The function is given three parameters, the standard BEG, END, and OLD-LEN
+from after-change-functions.  It should return either a cons of the beginning
+and end buffer positions \(in that order) of the region to fontify, or nil
+\(which directs the caller to fontify a default region).  This function need
+not preserve point or the match-data, but must preserve the current
+restriction.  The region it returns may start or end in the middle of a
+line.")
+(make-variable-buffer-local 'font-lock-extend-region-function)
+
+(defun font-lock-extend-region (beg end old-len)
+  "Determine the region to fontify after a buffer change.
+
+BEG END and OLD-LEN are the standard parameters from after-change-functions.
+The return value is either nil \(which directs the caller to chose the region
+itself), or a cons of the beginning and end \(in that order) of the region.
+The region returned may start or end in the middle of a line."
+  (if font-lock-extend-region-function
+      (save-match-data
+	(save-excursion
+	  (funcall font-lock-extend-region-function beg end old-len)))))
+
 (defvar font-lock-function 'font-lock-default-function
   "A function which is called when `font-lock-mode' is toggled.
 It will be passed one argument, which is the current value of
--- a/lisp/font-lock.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/font-lock.el	Sun Mar 19 19:43:57 2006 +0000
@@ -281,12 +281,6 @@
 		 (other :tag "always" t)
 		 (integer :tag "size"))
   :group 'font-lock)
-
-(defcustom font-lock-lines-before 0
-  "*Number of lines before the changed text to include in refontification."
-  :type 'integer
-  :group 'font-lock
-  :version "22.1")
 
 
 ;; Originally these variable values were face names such as `bold' etc.
@@ -1039,7 +1033,7 @@
 	  (when font-lock-syntax-table
 	    (set-syntax-table font-lock-syntax-table))
           (goto-char beg)
-          (setq beg (line-beginning-position (- 1 font-lock-lines-before)))
+	  (setq beg (line-beginning-position))
 	  ;; check to see if we should expand the beg/end area for
 	  ;; proper multiline matches
 	  (when (and (> beg (point-min))
@@ -1090,13 +1084,17 @@
 ;; Called when any modification is made to buffer text.
 (defun font-lock-after-change-function (beg end old-len)
   (let ((inhibit-point-motion-hooks t)
-	(inhibit-quit t))
+	(inhibit-quit t)
+	(region (font-lock-extend-region beg end old-len)))
     (save-excursion
       (save-match-data
-	;; Rescan between start of lines enclosing the region.
-	(font-lock-fontify-region
-	 (progn (goto-char beg) (forward-line 0) (point))
-	 (progn (goto-char end) (forward-line 1) (point)))))))
+	(if region
+	    ;; Fontify the region the major mode has specified.
+	    (setq beg (car region) end (cdr region))
+	  ;; Fontify the whole lines which enclose the region.
+	  (setq beg (progn (goto-char beg) (line-beginning-position))
+		end (progn (goto-char end) (line-beginning-position 2))))
+	(font-lock-fontify-region beg end)))))
 
 (defun font-lock-fontify-block (&optional arg)
   "Fontify some lines the way `font-lock-fontify-buffer' would.
--- a/lisp/gnus/ChangeLog	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/gnus/ChangeLog	Sun Mar 19 19:43:57 2006 +0000
@@ -1,3 +1,38 @@
+2006-03-17  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* mm-decode.el (mm-with-part): New macro.
+	(mm-get-part): Use it; work with message/external-body as well.
+	(mm-save-part): Treat name and filename equally.
+
+	* mm-extern.el (mm-extern-cache-contents): New function.
+	(mm-inline-external-body): Use it; force the part to be displayed;
+	move undisplayer added to the cached handle to the parent.
+
+	* gnus-art.el (gnus-mime-save-part-and-strip): Add name parameter.
+	(gnus-mime-view-part-as-type): Work with message/external-body.
+
+	* gnus-util.el (gnus-tool-bar-update): Bind tool-bar-mode.
+
+2006-03-15  Andreas Seltenreich  <uwi7@rz.uni-karlsruhe.de>
+
+	* gnus-art.el (gnus-article-only-boring-p): Bind
+	inhibit-point-motion-hooks to avoid infinite loop when entering
+	intangible text.  Reported by Ralf Wachinger
+	<rwnewsmampfer@geekmail.de>.
+
+2006-03-14  Simon Josefsson  <jas@extundo.com>
+
+	* message.el (message-unique-id): Don't use message-number-base36
+	if (user-uid) is a float.  Reported by Bjorn Solberg
+	<bjorn_ding1@hekneby.org>.
+
+2006-03-13  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* mm-uu.el (mm-uu-dissect): Dissect all parts correctly.
+
+	* gnus-art.el (gnus-mime-display-single): Make sure there is an
+	empty line between a part and a message part.
+
 2006-03-10  Reiner Steib  <Reiner.Steib@gmx.de>
 
 	* smiley.el: Add more test smileys.
--- a/lisp/gnus/gnus-art.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/gnus/gnus-art.el	Sun Mar 19 19:43:57 2006 +0000
@@ -49,6 +49,7 @@
 (autoload 'gnus-button-mailto "gnus-msg")
 (autoload 'gnus-button-reply "gnus-msg" nil t)
 (autoload 'parse-time-string "parse-time" nil nil)
+(autoload 'mm-extern-cache-contents "mm-extern")
 
 (defgroup gnus-article nil
   "Article display."
@@ -4151,6 +4152,9 @@
 	  (insert "Content-Type: " (mm-handle-media-type data))
 	  (mml-insert-parameter-string (cdr (mm-handle-type data))
 				       '(charset))
+	  ;; Add a filename for the sake of saving the part again.
+	  (mml-insert-parameter
+	   (mail-header-encode-parameter "name" (file-name-nondirectory file)))
 	  (insert "\n")
 	  (insert "Content-ID: " (message-make-message-id) "\n")
 	  (insert "Content-Transfer-Encoding: binary\n")
@@ -4330,6 +4334,10 @@
   (gnus-article-check-buffer)
   (let ((handle (get-text-property (point) 'gnus-data)))
     (when handle
+      (when (equal (mm-handle-media-type handle) "message/external-body")
+	(unless (mm-handle-cache handle)
+	  (mm-extern-cache-contents handle))
+	(setq handle (mm-handle-cache handle)))
       (setq handle
 	    (mm-make-handle (mm-handle-buffer handle)
 			    (cons mime-type (cdr (mm-handle-type handle)))
@@ -4889,13 +4897,18 @@
 	(let ((id (1+ (length gnus-article-mime-handle-alist)))
 	      beg)
 	  (push (cons id handle) gnus-article-mime-handle-alist)
+	  (when (and display
+		     (equal (mm-handle-media-supertype handle) "message"))
+	    (insert-char
+	     ?\n
+	     (cond ((not (bolp)) 2)
+		   ((or (bobp) (eq (char-before (1- (point))) ?\n)) 0)
+		   (t 1))))
 	  (when (or (not display)
 		    (not (gnus-unbuttonized-mime-type-p type)))
-	    ;(gnus-article-insert-newline)
 	    (gnus-insert-mime-button
 	     handle id (list (or display (and not-attachment text))))
 	    (gnus-article-insert-newline)
-	    ;(gnus-article-insert-newline)
 	    ;; Remember modify the number of forward lines.
 	    (setq move t))
 	  (setq beg (point))
@@ -5313,14 +5326,15 @@
 	     (boundp 'gnus-article-boring-faces)
 	     (symbol-value 'gnus-article-boring-faces))
     (save-excursion
-      (catch 'only-boring
-	(while (re-search-forward "\\b\\w\\w" nil t)
-	  (forward-char -1)
-	  (when (not (gnus-intersection
-		      (gnus-faces-at (point))
-		      (symbol-value 'gnus-article-boring-faces)))
-	    (throw 'only-boring nil)))
-	(throw 'only-boring t)))))
+      (let ((inhibit-point-motion-hooks t))
+	(catch 'only-boring
+	  (while (re-search-forward "\\b\\w\\w" nil t)
+	    (forward-char -1)
+	    (when (not (gnus-intersection
+			(gnus-faces-at (point))
+			(symbol-value 'gnus-article-boring-faces)))
+	      (throw 'only-boring nil)))
+	  (throw 'only-boring t))))))
 
 (defun gnus-article-refer-article ()
   "Read article specified by message-id around point."
--- a/lisp/gnus/gnus-util.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/gnus/gnus-util.el	Sun Mar 19 19:43:57 2006 +0000
@@ -1459,6 +1459,9 @@
 				 display))
 	      display)))))
 
+(eval-when-compile
+  (defvar tool-bar-mode))
+
 (defun gnus-tool-bar-update (&rest ignore)
   "Update the tool bar."
   (when (and (boundp 'tool-bar-mode)
--- a/lisp/gnus/message.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/gnus/message.el	Sun Mar 19 19:43:57 2006 +0000
@@ -4671,7 +4671,9 @@
 	   (* 25 25)))
   (let ((tm (current-time)))
     (concat
-     (if (memq system-type '(ms-dos emx vax-vms))
+     (if (or (memq system-type '(ms-dos emx vax-vms))
+	     ;; message-number-base36 doesn't handle bigints.
+	     (floatp (user-uid)))
 	 (let ((user (downcase (user-login-name))))
 	   (while (string-match "[^a-z0-9_]" user)
 	     (aset user (match-beginning 0) ?_))
--- a/lisp/gnus/mm-decode.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/gnus/mm-decode.el	Sun Mar 19 19:43:57 2006 +0000
@@ -36,6 +36,7 @@
   (autoload 'executable-find "executable")
   (autoload 'mm-inline-partial "mm-partial")
   (autoload 'mm-inline-external-body "mm-extern")
+  (autoload 'mm-extern-cache-contents "mm-extern")
   (autoload 'mm-insert-inline "mm-view"))
 
 (defvar gnus-current-window-configuration)
@@ -1082,17 +1083,35 @@
 ;;; Functions for outputting parts
 ;;;
 
+(defmacro mm-with-part (handle &rest forms)
+  "Run FORMS in the temp buffer containing the contents of HANDLE."
+  `(let* ((handle ,handle)
+	  ;; The multibyteness of the temp buffer should be turned on
+	  ;; if inserting a multibyte string.  Contrarily, the buffer's
+	  ;; multibyteness should be off if inserting a unibyte string,
+	  ;; especially if a string contains 8bit data.
+	  (default-enable-multibyte-characters
+	    (with-current-buffer (mm-handle-buffer handle)
+	      (mm-multibyte-p))))
+     (with-temp-buffer
+       (insert-buffer-substring (mm-handle-buffer handle))
+       (mm-disable-multibyte)
+       (mm-decode-content-transfer-encoding
+	(mm-handle-encoding handle)
+	(mm-handle-media-type handle))
+       ,@forms)))
+(put 'mm-with-part 'lisp-indent-function 1)
+(put 'mm-with-part 'edebug-form-spec '(body))
+
 (defun mm-get-part (handle)
   "Return the contents of HANDLE as a string."
-  (let ((default-enable-multibyte-characters
-	  (with-current-buffer (mm-handle-buffer handle)
-	    (mm-multibyte-p))))
-    (with-temp-buffer
-      (insert-buffer-substring (mm-handle-buffer handle))
-      (mm-disable-multibyte)
-      (mm-decode-content-transfer-encoding
-       (mm-handle-encoding handle)
-       (mm-handle-media-type handle))
+  (if (equal (mm-handle-media-type handle) "message/external-body")
+      (progn
+	(unless (mm-handle-cache handle)
+	  (mm-extern-cache-contents handle))
+	(with-current-buffer (mm-handle-buffer (mm-handle-cache handle))
+	  (buffer-string)))
+    (mm-with-part handle
       (buffer-string))))
 
 (defun mm-insert-part (handle)
@@ -1148,18 +1167,19 @@
 
 (defun mm-save-part (handle)
   "Write HANDLE to a file."
-  (let* ((name (mail-content-type-get (mm-handle-type handle) 'name))
-	 (filename (mail-content-type-get
-		    (mm-handle-disposition handle) 'filename))
-	 file)
+  (let ((filename (or (mail-content-type-get
+		       (mm-handle-disposition handle) 'filename)
+		      (mail-content-type-get
+		       (mm-handle-type handle) 'name)))
+	file)
     (when filename
       (setq filename (gnus-map-function mm-file-name-rewrite-functions
 					(file-name-nondirectory filename))))
     (setq file
 	  (mm-with-multibyte
-	    (read-file-name "Save MIME part to: "
-			    (or mm-default-directory default-directory)
-			    nil nil (or filename name ""))))
+	   (read-file-name "Save MIME part to: "
+			   (or mm-default-directory default-directory)
+			   nil nil (or filename ""))))
     (setq mm-default-directory (file-name-directory file))
     (and (or (not (file-exists-p file))
 	     (yes-or-no-p (format "File %s already exists; overwrite? "
--- a/lisp/gnus/mm-extern.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/gnus/mm-extern.el	Sun Mar 19 19:43:57 2006 +0000
@@ -112,11 +112,8 @@
     (insert "[" info "]\n\n")))
 
 ;;;###autoload
-(defun mm-inline-external-body (handle &optional no-display)
-  "Show the external-body part of HANDLE.
-This function replaces the buffer of HANDLE with a buffer contains
-the entire message.
-If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing."
+(defun mm-extern-cache-contents (handle)
+  "Put the external-body part of HANDLE into its cache."
   (let* ((access-type (cdr (assq 'access-type
 				 (cdr (mm-handle-type handle)))))
 	 (func (cdr (assq (intern
@@ -124,48 +121,61 @@
 			    (or access-type
 				(error "Couldn't find access type"))))
 			  mm-extern-function-alist)))
-	 gnus-displaying-mime buf
-	 handles)
-    (unless (mm-handle-cache handle)
-      (unless func
-	(error "Access type (%s) is not supported" access-type))
-      (with-temp-buffer
-	(mm-insert-part handle)
-	(goto-char (point-max))
-	(insert "\n\n")
-	(setq handles (mm-dissect-buffer t)))
-      (unless (bufferp (car handles))
-	(mm-destroy-parts handles)
-	(error "Multipart external body is not supported"))
-      (save-excursion ;; single part
-	(set-buffer (setq buf (mm-handle-buffer handles)))
-	(let (good)
-	  (unwind-protect
-	      (progn
-		(funcall func handle)
-		(setq good t))
-	    (unless good
-	      (mm-destroy-parts handles))))
-	(mm-handle-set-cache handle handles))
-      (setq gnus-article-mime-handles
-	    (mm-merge-handles gnus-article-mime-handles handles)))
-    (unless no-display
-      (save-excursion
-	(save-restriction
-	  (narrow-to-region (point) (point))
-	  (gnus-display-mime (mm-handle-cache handle))
-	  (mm-handle-set-undisplayer
-	   handle
-	   `(lambda ()
-	      (let (buffer-read-only)
-		(condition-case nil
-		    ;; This is only valid on XEmacs.
-		    (mapcar (lambda (prop)
-			    (remove-specifier
-			     (face-property 'default prop) (current-buffer)))
-			    '(background background-pixmap foreground))
-		  (error nil))
-		(delete-region ,(point-min-marker) ,(point-max-marker))))))))))
+	 buf handles)
+    (unless func
+      (error "Access type (%s) is not supported" access-type))
+    (mm-with-part handle
+      (goto-char (point-max))
+      (insert "\n\n")
+      ;; It should be just a single MIME handle.
+      (setq handles (mm-dissect-buffer t)))
+    (unless (bufferp (car handles))
+      (mm-destroy-parts handles)
+      (error "Multipart external body is not supported"))
+    (save-excursion
+      (set-buffer (setq buf (mm-handle-buffer handles)))
+      (let (good)
+	(unwind-protect
+	    (progn
+	      (funcall func handle)
+	      (setq good t))
+	  (unless good
+	    (mm-destroy-parts handles))))
+      (mm-handle-set-cache handle handles))
+    (setq gnus-article-mime-handles
+	  (mm-merge-handles gnus-article-mime-handles handles))))
+
+;;;###autoload
+(defun mm-inline-external-body (handle &optional no-display)
+  "Show the external-body part of HANDLE.
+This function replaces the buffer of HANDLE with a buffer contains
+the entire message.
+If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing."
+  (unless (mm-handle-cache handle)
+    (mm-extern-cache-contents handle))
+  (unless no-display
+    (save-excursion
+      (save-restriction
+	(narrow-to-region (point) (point))
+	(let* ((type (regexp-quote
+		      (mm-handle-media-type (mm-handle-cache handle))))
+	       ;; Force the part to be displayed (but if there is no
+	       ;; method to display, a user will be prompted to save).
+	       ;; See `gnus-mime-display-single'.
+	       (mm-inline-override-types nil)
+	       (mm-attachment-override-types
+		(cons type mm-attachment-override-types))
+	       (mm-automatic-display (cons type mm-automatic-display))
+	       (mm-automatic-external-display
+		(cons type mm-automatic-external-display))
+	       ;; Suppress adding of button to the cached part.
+	       (gnus-inhibit-mime-unbuttonizing nil))
+	  (gnus-display-mime (mm-handle-cache handle)))
+	;; Move undisplayer added to the cached handle to the parent.
+	(mm-handle-set-undisplayer
+	 handle
+	 (mm-handle-undisplayer (mm-handle-cache handle)))
+	(mm-handle-set-undisplayer (mm-handle-cache handle) nil)))))
 
 (provide 'mm-extern)
 
--- a/lisp/gnus/mm-uu.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/gnus/mm-uu.el	Sun Mar 19 19:43:57 2006 +0000
@@ -464,7 +464,8 @@
        (t (goto-char (point-max))))
       (setq text-start (point))
       (while (re-search-forward mm-uu-beginning-regexp nil t)
-	(setq start-point (match-beginning 0))
+	(setq start-point (match-beginning 0)
+	      entry nil)
 	(let ((alist mm-uu-type-alist)
 	      (beginning-regexp (match-string 0)))
 	  (while (not entry)
--- a/lisp/ido.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/ido.el	Sun Mar 19 19:43:57 2006 +0000
@@ -613,6 +613,7 @@
 
 (defcustom ido-cache-ftp-work-directory-time 1.0
   "*Maximum time to cache contents of an ftp directory (in hours).
+Use C-l in prompt to refresh list.
 If zero, ftp directories are not cached."
   :type 'number
   :group 'ido)
@@ -629,6 +630,18 @@
   :type '(repeat regexp)
   :group 'ido)
 
+(defcustom ido-unc-hosts nil
+  "*List of known UNC host names to complete after initial //."
+  :type '(repeat string)
+  :group 'ido)
+
+(defcustom ido-cache-unc-host-shares-time 8.0
+  "*Maximum time to cache shares of an UNC host (in hours).
+Use C-l in prompt to refresh list.
+If zero, unc host shares are not cached."
+  :type 'number
+  :group 'ido)
+
 (defcustom ido-max-work-file-list 10
   "*Maximum number of names of recently opened files to record.
 This is the list the file names (sans directory) which have most recently
@@ -1103,6 +1116,16 @@
        (string-match "\\`/[^/]+[@:]\\'"
 		     (or dir ido-current-directory))))
 
+(defun ido-is-unc-root (&optional dir)
+  (and ido-unc-hosts
+       (string-equal "//"
+		     (or dir ido-current-directory))))
+
+(defun ido-is-unc-host (&optional dir)
+  (and ido-unc-hosts
+       (string-match "\\`//[^/]+/\\'"
+		     (or dir ido-current-directory))))
+
 (defun ido-is-root-directory (&optional dir)
   (setq dir (or dir ido-current-directory))
   (or
@@ -1148,6 +1171,12 @@
        (or (not time)
 	   (< (- (ido-time-stamp) time) ido-cache-ftp-work-directory-time))))
 
+(defun ido-cache-unc-valid (&optional time)
+  (and (numberp ido-cache-unc-host-shares-time)
+       (> ido-cache-unc-host-shares-time 0)
+       (or (not time)
+	   (< (- (ido-time-stamp) time) ido-cache-unc-host-shares-time))))
+
 (defun ido-may-cache-directory (&optional dir)
   (setq dir (or dir ido-current-directory))
   (cond
@@ -1157,10 +1186,11 @@
 	 (or ido-enable-tramp-completion
 	     (memq system-type '(windows-nt ms-dos))))
     nil)
-   ((not (ido-is-ftp-directory dir))
-    t)
-   ((ido-cache-ftp-valid)
-    t)))
+   ((ido-is-unc-host dir)
+    (ido-cache-unc-valid))
+   ((ido-is-ftp-directory dir)
+    (ido-cache-ftp-valid))
+   (t t)))
 
 (defun ido-pp (list &optional sep)
   (let ((print-level nil) (eval-expression-print-level nil)
@@ -1262,15 +1292,21 @@
 			    (and
 			     (stringp dir)
 			     (consp time)
-			     (if (integerp (car time))
-				 (and (/= (car time) 0)
-				      (integerp (car (cdr time)))
-				      (/= (car (cdr time)) 0)
-				      (ido-may-cache-directory dir))
-			       (and (eq (car time) 'ftp)
-				    (numberp (cdr time))
+			     (cond
+			      ((integerp (car time))
+			       (and (/= (car time) 0)
+				    (integerp (car (cdr time)))
+				    (/= (car (cdr time)) 0)
+				    (ido-may-cache-directory dir)))
+			      ((eq (car time) 'ftp)
+			       (and (numberp (cdr time))
 				    (ido-is-ftp-directory dir)
 				    (ido-cache-ftp-valid (cdr time))))
+			      ((eq (car time) 'unc)
+			       (and (numberp (cdr time))
+				    (ido-is-unc-host dir)
+				    (ido-cache-unc-valid (cdr time))))
+			      (t nil))
 			     (let ((s files) (ok t))
 			       (while s
 				 (if (stringp (car s))
@@ -1535,6 +1571,7 @@
   ;; connect on incomplete tramp paths (after entring just method:).
   (let ((ido-enable-tramp-completion nil))
     (and (ido-final-slash dir)
+	 (not (ido-is-unc-host dir))
 	 (file-directory-p dir)
 	 (not (file-readable-p dir)))))
 
@@ -1545,6 +1582,7 @@
   (let ((ido-enable-tramp-completion nil))
     (and (numberp ido-max-directory-size)
 	 (ido-final-slash dir)
+	 (not (ido-is-unc-host dir))
 	 (file-directory-p dir)
 	 (> (nth 7 (file-attributes dir)) ido-max-directory-size))))
 
@@ -1560,8 +1598,18 @@
     (unless (and ido-enable-tramp-completion
 		 (string-match "\\`/[^/]*@\\'" dir))
       (setq dir (ido-final-slash dir t))))
-  (if (equal dir ido-current-directory)
-      nil
+  (if (get-buffer ido-completion-buffer)
+      (kill-buffer ido-completion-buffer))
+  (cond
+   ((equal dir ido-current-directory)
+    nil)
+   ((ido-is-unc-root dir)
+    (ido-trace "unc" dir)
+    (setq ido-current-directory dir)
+    (setq ido-directory-nonreadable nil)
+    (setq ido-directory-too-big nil)
+    t)
+   (t
     (ido-trace "cd" dir)
     (setq ido-current-directory dir)
     (if (get-buffer ido-completion-buffer)
@@ -1569,7 +1617,7 @@
     (setq ido-directory-nonreadable (ido-nonreadable-directory-p dir))
     (setq ido-directory-too-big (and (not ido-directory-nonreadable)
 				     (ido-directory-too-big-p dir)))
-    t))
+    t)))
 
 (defun ido-set-current-home (&optional dir)
   ;; Set ido's current directory to user's home directory
@@ -1940,6 +1988,7 @@
 	      (setq ido-exit 'fallback
 		    done t)
 	    (setq ido-set-default-item t)))
+
 	 ((or (string-match "[/\\][^/\\]" ido-selected)
 	      (and (memq system-type '(windows-nt ms-dos))
 		   (string-match "\\`.:" ido-selected)))
@@ -1973,7 +2022,7 @@
 (defun ido-edit-input ()
   "Edit absolute file name entered so far with ido; terminate by RET."
   (interactive)
-  (setq ido-text-init ido-text)
+  (setq ido-text-init (if ido-matches (car ido-matches) ido-text))
   (setq ido-exit 'edit)
   (exit-minibuffer))
 
@@ -3184,36 +3233,52 @@
 (defun ido-file-name-all-completions (dir)
   ;; Return name of all files in DIR
   ;; Uses and updates ido-dir-file-cache
-  (if (and (numberp ido-max-dir-file-cache) (> ido-max-dir-file-cache 0)
-	   (stringp dir) (> (length dir) 0)
-	   (ido-may-cache-directory dir))
-      (let* ((cached (assoc dir ido-dir-file-cache))
+  (cond
+   ((ido-is-unc-root dir)
+    (mapcar
+     (lambda (host)
+       (if (string-match "/\\'" host) host (concat host "/")))
+     ido-unc-hosts))
+   ((and (numberp ido-max-dir-file-cache) (> ido-max-dir-file-cache 0)
+	 (stringp dir) (> (length dir) 0)
+	 (ido-may-cache-directory dir))
+    (let* ((cached (assoc dir ido-dir-file-cache))
 	     (ctime (nth 1 cached))
 	     (ftp (ido-is-ftp-directory dir))
-	     (attr (if ftp nil (file-attributes dir)))
+	     (unc (ido-is-unc-host dir))
+	     (attr (if (or ftp unc) nil (file-attributes dir)))
 	     (mtime (nth 5 attr))
 	     valid)
 	(when cached 	    ; should we use the cached entry ?
-	  (if ftp
-	      (setq valid (and (eq (car ctime) 'ftp)
-			       (ido-cache-ftp-valid (cdr ctime))))
+	  (cond
+	   (ftp
+	    (setq valid (and (eq (car ctime) 'ftp)
+			     (ido-cache-ftp-valid (cdr ctime)))))
+	   (unc
+	    (setq valid (and (eq (car ctime) 'unc)
+			     (ido-cache-unc-valid (cdr ctime)))))
+	   (t
 	    (if attr
 		(setq valid (and (= (car ctime) (car mtime))
-				 (= (car (cdr ctime)) (car (cdr mtime)))))))
-	  (if (not valid)
-	      (setq ido-dir-file-cache (delq cached ido-dir-file-cache)
-		    cached nil)))
+				 (= (car (cdr ctime)) (car (cdr mtime))))))))
+	  (unless valid
+	    (setq ido-dir-file-cache (delq cached ido-dir-file-cache)
+		  cached nil)))
 	(unless cached
-	  (if (and ftp (file-readable-p dir))
-	      (setq mtime (cons 'ftp (ido-time-stamp))))
+	  (cond
+	   (unc
+	    (setq mtime (cons 'unc (ido-time-stamp))))
+	   ((and ftp (file-readable-p dir))
+	    (setq mtime (cons 'ftp (ido-time-stamp)))))
 	  (if mtime
 	      (setq cached (cons dir (cons mtime (ido-file-name-all-completions-1 dir)))
 		    ido-dir-file-cache (cons cached ido-dir-file-cache)))
 	  (if (> (length ido-dir-file-cache) ido-max-dir-file-cache)
 	      (setcdr (nthcdr (1- ido-max-dir-file-cache) ido-dir-file-cache) nil)))
 	(and cached
-	     (cdr (cdr cached))))
-    (ido-file-name-all-completions-1 dir)))
+	     (cdr (cdr cached)))))
+   (t
+    (ido-file-name-all-completions-1 dir))))
 
 (defun ido-remove-cached-dir (dir)
   ;; Remove dir from ido-dir-file-cache
@@ -3227,7 +3292,8 @@
 (defun ido-make-file-list-1 (dir &optional merged)
   ;; Return list of non-ignored files in DIR
   ;; If MERGED is non-nil, each file is cons'ed with DIR
-  (and (or (ido-is-tramp-root dir) (file-directory-p dir))
+  (and (or (ido-is-tramp-root dir) (ido-is-unc-root dir)
+	   (file-directory-p dir))
        (delq nil
 	     (mapcar
 	      (lambda (name)
@@ -3956,10 +4022,16 @@
 	  )
 
 	 ((= (length contents) 1)
-	  (when (and (ido-is-tramp-root) (string-equal contents "/"))
+	  (cond
+	   ((and (ido-is-tramp-root) (string-equal contents "/"))
 	    (ido-set-current-directory ido-current-directory contents)
 	    (setq refresh t))
-	  )
+	   ((and ido-unc-hosts (string-equal contents "/")
+		 (let ((ido-enable-tramp-completion nil))
+		   (ido-is-root-directory)))
+	    (ido-set-current-directory "//")
+	    (setq refresh t))
+	  ))
 
 	 ((and (string-match (if ido-enable-tramp-completion "..[:@]\\'" "..:\\'") contents)
 	       (ido-is-root-directory)) ;; Ange-ftp or tramp
--- a/lisp/image.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/image.el	Sun Mar 19 19:43:57 2006 +0000
@@ -77,34 +77,69 @@
        (list (file-name-as-directory (expand-file-name "images" data-directory))
 	     'data-directory 'load-path)))
 
+
 (defun image-load-path-for-library (library image &optional path no-error)
-  "Return a suitable search path for images relative to LIBRARY.
-
-Images for LIBRARY are searched for in \"../../etc/images\" and
-\"../etc/images\" relative to the files in \"lisp/LIBRARY\" as
-well as in `image-load-path' and `load-path'.
+  "Return a suitable search path for images used by the Lisp package LIBRARY.
 
-This function returns the value of `load-path' augmented with the
-directory containing IMAGE. If PATH is given, it is used instead
-of `load-path'. If PATH is t, just return the directory that
-contains IMAGE.
+It searches for IMAGE in `image-load-path' (excluding
+\"`data-directory'/images\") and `load-path', followed by a path
+suitable for LIBRARY, which includes \"../../etc/images\" and
+\"../etc/images\" relative to the library file itself, and then
+in \"`data-directory'/images\".
 
-If NO-ERROR is non-nil, return nil if a suitable path can't be
-found rather than signaling an error.
+Then this function returns a list of directories which contains
+first the directory in which IMAGE was found, followed by the
+value of `load-path'. If PATH is given, it is used instead of
+`load-path'.
+
+If NO-ERROR is non-nil and a suitable path can't be found, don't
+signal an error. Instead, return a list of directories as before,
+except that nil appears in place of the image directory.
 
 Here is an example that uses a common idiom to provide
 compatibility with versions of Emacs that lack the variable
 `image-load-path':
 
-  (let ((load-path
-         (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\"))
-        (image-load-path
-         (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\" 'image-load-path)))
-    (mh-tool-bar-folder-buttons-init))"
+    ;; Shush compiler.
+    (defvar image-load-path)
+
+    (let* ((load-path (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\"))
+           (image-load-path (cons (car load-path)
+                                  (when (boundp 'image-load-path)
+                                    image-load-path))))
+      (mh-tool-bar-folder-buttons-init))"
   (unless library (error "No library specified"))
   (unless image   (error "No image specified"))
-  (let ((image-directory))
+  (let (image-directory image-directory-load-path)
+    ;; Check for images in image-load-path or load-path.
+    (let ((img image)
+          (dir (or
+                ;; Images in image-load-path.
+                (image-search-load-path image)
+                ;; Images in load-path.
+                (locate-library image)))
+          parent)
+      ;; Since the image might be in a nested directory (for
+      ;; example, mail/attach.pbm), adjust `image-directory'
+      ;; accordingly.
+      (when dir
+        (setq dir (file-name-directory dir))
+        (while (setq parent (file-name-directory img))
+          (setq img (directory-file-name parent)
+                dir (expand-file-name "../" dir))))
+      (setq image-directory-load-path dir))
+
+    ;; If `image-directory-load-path' isn't Emacs' image directory,
+    ;; it's probably a user preference, so use it. Then use a
+    ;; relative setting if possible; otherwise, use
+    ;; `image-directory-load-path'.
     (cond
+     ;; User-modified image-load-path?
+     ((and image-directory-load-path
+           (not (equal image-directory-load-path
+                       (file-name-as-directory
+                        (expand-file-name "images" data-directory)))))
+      (setq image-directory image-directory-load-path))
      ;; Try relative setting.
      ((let (library-name d1ei d2ei)
         ;; First, find library in the load-path.
@@ -114,54 +149,29 @@
         ;; And then set image-directory relative to that.
         (setq
          ;; Go down 2 levels.
-         d2ei (expand-file-name
-               (concat (file-name-directory library-name) "../../etc/images"))
+         d2ei (file-name-as-directory
+               (expand-file-name
+                (concat (file-name-directory library-name) "../../etc/images")))
          ;; Go down 1 level.
-         d1ei (expand-file-name
-               (concat (file-name-directory library-name) "../etc/images")))
+         d1ei (file-name-as-directory
+               (expand-file-name
+                (concat (file-name-directory library-name) "../etc/images"))))
         (setq image-directory
               ;; Set it to nil if image is not found.
               (cond ((file-exists-p (expand-file-name image d2ei)) d2ei)
                     ((file-exists-p (expand-file-name image d1ei)) d1ei)))))
-     ;; Check for images in image-load-path or load-path.
-     ((let ((img image)
-            (dir (or
-                  ;; Images in image-load-path.
-                  (image-search-load-path image)
-                  ;; Images in load-path.
-                  (locate-library image)))
-            parent)
-        ;; Since the image might be in a nested directory (for
-        ;; example, mail/attach.pbm), adjust `image-directory'
-        ;; accordingly.
-        (and dir
-             (setq dir (file-name-directory dir))
-             (progn
-               (while (setq parent (file-name-directory img))
-                 (setq img (directory-file-name parent)
-                       dir (expand-file-name "../" dir)))
-               (setq image-directory dir)))))
+     ;; Use Emacs' image directory.
+     (image-directory-load-path
+      (setq image-directory image-directory-load-path))
      (no-error
-      ;; In this case we will return nil.
       (message "Could not find image %s for library %s" image library))
      (t
       (error "Could not find image %s for library %s" image library)))
 
-    ;; Return the directory, nil if no-error was non-nil and a
-    ;; suitable path could not be found, or an augmented
-    ;; `image-load-path' or `load-path'.
-    (cond ((or (null image-directory)
-               (eq path t))
-           image-directory)
-          ((and path (symbolp path))
-           (nconc (list image-directory)
-                  (delete image-directory
-                          (if (boundp path)
-                              (copy-sequence (symbol-value path))
-                            nil))))
-          (t
-           (nconc (list image-directory)
-                  (delete image-directory (copy-sequence load-path)))))))
+    ;; Return an augmented `path' or `load-path'.
+    (nconc (list image-directory)
+           (delete image-directory (copy-sequence (or path load-path))))))
+
 
 (defun image-jpeg-p (data)
   "Value is non-nil if DATA, a string, consists of JFIF image data.
--- a/lisp/international/mule.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/international/mule.el	Sun Mar 19 19:43:57 2006 +0000
@@ -1580,6 +1580,9 @@
 
 (defcustom auto-coding-regexp-alist
   '(("^BABYL OPTIONS:[ \t]*-\\*-[ \t]*rmail[ \t]*-\\*-" . no-conversion)
+    ("\\`\xFE\xFF" . utf-16be-with-signature)
+    ("\\`\xFF\xFE" . utf-16le-with-signature)
+    ("\\`\xEF\xBB\xBF" . utf-8)
     ("\\`;ELC\024\0\0\0" . emacs-mule))	; Emacs 20-compiled
   "Alist of patterns vs corresponding coding systems.
 Each element looks like (REGEXP . CODING-SYSTEM).
--- a/lisp/isearch.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/isearch.el	Sun Mar 19 19:43:57 2006 +0000
@@ -1692,12 +1692,15 @@
 	     (and (integerp main-event)
 		  (memq 'shift mods)
 		  (memq 'control mods)
-		  (lookup-key isearch-mode-map
-			      (let ((copy (copy-sequence key)))
-				(aset copy 0
-				      (- main-event (- ?\C-\S-a ?\C-a)))
-				copy)
-			      nil)))
+		  (not (memq (lookup-key isearch-mode-map
+					 (let ((copy (copy-sequence key)))
+					   (aset copy 0
+						 (- main-event
+						    (- ?\C-\S-a ?\C-a)))
+					   copy)
+					 nil)
+			     '(nil
+			       isearch-other-control-char)))))
 	   (setcar keylist (- main-event (- ?\C-\S-a ?\C-a)))
 	   (cancel-kbd-macro-events)
 	   (apply 'isearch-unread keylist))
--- a/lisp/iswitchb.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/iswitchb.el	Sun Mar 19 19:43:57 2006 +0000
@@ -6,7 +6,6 @@
 ;; Author: Stephen Eglen <stephen@gnu.org>
 ;; Maintainer: Stephen Eglen <stephen@gnu.org>
 ;; Keywords: completion convenience
-;; location: http://www.anc.ed.ac.uk/~stephen/emacs/
 
 ;; This file is part of GNU Emacs.
 
--- a/lisp/jit-lock.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/jit-lock.el	Sun Mar 19 19:43:57 2006 +0000
@@ -557,36 +557,44 @@
 in case the syntax of those lines has changed.  Refontification
 will take place when text is fontified stealthily."
   (when (and jit-lock-mode (not memory-full))
-    (save-excursion
-      (with-buffer-prepared-for-jit-lock
-       ;; It's important that the `fontified' property be set from the
-       ;; beginning of the line, else font-lock will properly change the
-       ;; text's face, but the display will have been done already and will
-       ;; be inconsistent with the buffer's content.
-       (goto-char start)
-       (setq start (line-beginning-position))
+    (let ((region (font-lock-extend-region start end old-len)))
+      (save-excursion
+	(with-buffer-prepared-for-jit-lock
+	 ;; It's important that the `fontified' property be set from the
+	 ;; beginning of the line, else font-lock will properly change the
+	 ;; text's face, but the display will have been done already and will
+	 ;; be inconsistent with the buffer's content.
+	 ;; 
+	 ;; FIXME!!! (Alan Mackenzie, 2006-03-14): If start isn't at a BOL,
+	 ;; expanding the region to BOL might mis-fontify, should the BOL not
+	 ;; be at a "safe" position.
+	 (setq start (if region
+			 (car region)
+		       (goto-char start)
+		       (line-beginning-position)))
 
-       ;; If we're in text that matches a multi-line font-lock pattern,
-       ;; make sure the whole text will be redisplayed.
-       ;; I'm not sure this is ever necessary and/or sufficient.  -stef
-       (when (get-text-property start 'font-lock-multiline)
-	 (setq start (or (previous-single-property-change
-			  start 'font-lock-multiline)
-			 (point-min))))
+	 ;; If we're in text that matches a multi-line font-lock pattern,
+	 ;; make sure the whole text will be redisplayed.
+	 ;; I'm not sure this is ever necessary and/or sufficient.  -stef
+	 (when (get-text-property start 'font-lock-multiline)
+	   (setq start (or (previous-single-property-change
+			    start 'font-lock-multiline)
+			   (point-min))))
 
-       ;; Make sure we change at least one char (in case of deletions).
-       (setq end (min (max end (1+ start)) (point-max)))
-       ;; Request refontification.
-       (put-text-property start end 'fontified nil))
-      ;; Mark the change for deferred contextual refontification.
-      (when jit-lock-context-unfontify-pos
-	(setq jit-lock-context-unfontify-pos
-              ;; Here we use `start' because nothing guarantees that the
-              ;; text between start and end will be otherwise refontified:
-              ;; usually it will be refontified by virtue of being
-              ;; displayed, but if it's outside of any displayed area in the
-              ;; buffer, only jit-lock-context-* will re-fontify it.
-	      (min jit-lock-context-unfontify-pos start))))))
+	 (if region (setq end (cdr region)))
+	 ;; Make sure we change at least one char (in case of deletions).
+	 (setq end (min (max end (1+ start)) (point-max)))
+	 ;; Request refontification.
+	 (put-text-property start end 'fontified nil))
+	;; Mark the change for deferred contextual refontification.
+	(when jit-lock-context-unfontify-pos
+	  (setq jit-lock-context-unfontify-pos
+		;; Here we use `start' because nothing guarantees that the
+		;; text between start and end will be otherwise refontified:
+		;; usually it will be refontified by virtue of being
+		;; displayed, but if it's outside of any displayed area in the
+		;; buffer, only jit-lock-context-* will re-fontify it.
+		(min jit-lock-context-unfontify-pos start)))))))
 
 (provide 'jit-lock)
 
--- a/lisp/locate.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/locate.el	Sun Mar 19 19:43:57 2006 +0000
@@ -122,7 +122,26 @@
   :group 'external)
 
 (defcustom locate-command "locate"
-  "*The executable program used to search a database of files."
+  "Executable program for searching a database of files.
+The Emacs commands `locate' and `locate-with-filter' use this.
+The value should be a program that can be called from a shell
+with one argument, SEARCH-STRING.  The program determines which
+database it searches.  The output of the program should consist
+of those file names in the database that match SEARCH-STRING,
+listed one per line, possibly with leading or trailing
+whitespace.  If the output is in another form, you may have to
+redefine the function `locate-get-file-positions'.
+
+The program may interpret SEARCH-STRING as a literal string, a
+shell pattern or a regular expression.  The exact rules of what
+constitutes a match may also depend on the program.
+
+The standard value of this variable is \"locate\".
+This program normally searches a database of all files on your
+system, or of all files that you have access to.  Consult the
+documentation of that program for the details about how it determines
+which file names match SEARCH-STRING.  (Those details vary highly with
+the version.)"
   :type 'string
   :group 'locate)
 
@@ -133,22 +152,34 @@
   "The history list used by the \\[locate-with-filter] command.")
 
 (defcustom locate-make-command-line 'locate-default-make-command-line
-  "*Function used to create the locate command line."
+  "Function used to create the locate command line.
+The Emacs commands `locate' and `locate-with-filter' use this.
+This function should take one argument, a string (the name to find)
+and return a list of strings.  The first element of the list should be
+the name of a command to be executed by a shell, the remaining elements
+should be the arguments to that command (including the name to find)."
   :type 'function
   :group 'locate)
 
 (defcustom locate-buffer-name "*Locate*"
-  "*Name of the buffer to show results from the \\[locate] command."
+  "Name of the buffer to show results from the \\[locate] command."
   :type 'string
   :group 'locate)
 
 (defcustom locate-fcodes-file nil
-  "*File name for the database of file names."
+  "File name for the database of file names used by `locate'.
+If non-nil, `locate' uses this name in the header of the `*Locate*'
+buffer.  If nil, it mentions no file name in that header.
+
+Just setting this variable does not actually change the database
+that `locate' searches.  The executive program that the Emacs
+function `locate' uses, as given by the variables `locate-command'
+or `locate-make-command-line', determines the database."
   :type '(choice (const :tag "None" nil) file)
   :group 'locate)
 
 (defcustom locate-header-face nil
-  "*Face used to highlight the locate header."
+  "Face used to highlight the locate header."
   :type '(choice (const :tag "None" nil) face)
   :group 'locate)
 
@@ -161,12 +192,12 @@
   :version "22.1")
 
 (defcustom locate-update-command "updatedb"
-  "The command used to update the locate database."
+  "The executable program used to update the locate database."
   :type 'string
   :group 'locate)
 
 (defcustom locate-prompt-for-command nil
-  "If non-nil, the locate command prompts for a command to run.
+  "If non-nil, the `locate' command prompts for a command to run.
 Otherwise, that behavior is invoked via a prefix argument."
   :group 'locate
   :type 'boolean
@@ -191,7 +222,22 @@
 ;;;###autoload
 (defun locate (search-string &optional filter)
   "Run the program `locate', putting results in `*Locate*' buffer.
-With prefix arg, prompt for the locate command to run."
+Pass it SEARCH-STRING as argument.  Interactively, prompt for SEARCH-STRING.
+With prefix arg, prompt for the exact shell command to run instead.
+
+This program searches for those file names in a database that match
+SEARCH-STRING and normally outputs all matching absolute file names,
+one per line.  The database normally consists of all files on your
+system, or of all files that you have access to.  Consult the
+documentation of the program for the details about how it determines
+which file names match SEARCH-STRING.  (Those details vary highly with
+the version.)
+
+You can specify another program for this command to run by customizing
+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."
   (interactive
       (list
        (if (or (and current-prefix-arg
@@ -255,10 +301,17 @@
 
 ;;;###autoload
 (defun locate-with-filter (search-string filter)
-  "Run the locate command with a filter.
+  "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
+prompts for both SEARCH-STRING and FILTER.  It passes SEARCH-STRING
+to the locate executable program.  It produces a `*Locate*' buffer
+that lists only those lines in the output of the locate program that
+contain a match for the regular expression FILTER; this is often useful
+to constrain a big search.
 
-The filter is a regular expression. Only results matching the filter are
-shown; this is often useful to constrain a big search."
+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)
@@ -269,7 +322,7 @@
 (defun locate-filter-output (filter)
   "Filter output from the locate command."
   (goto-char (point-min))
-  (delete-non-matching-lines filter))
+  (keep-lines filter))
 
 (defvar locate-mode-map nil
   "Local keymap for Locate mode buffers.")
@@ -303,6 +356,15 @@
   "The amount of indentation for each file.")
 
 (defun locate-get-file-positions ()
+  "Return list of start and end of the file name on the current line.
+This is a list of two buffer positions.
+
+You should only call this function on lines that contain a file name
+listed by the locate program.  Inside inserted subdirectories, or if
+there is no file name on the current line, the return value is
+meaningless.  You can check whether the current line contains a file
+listed by the locate program, using the function
+`locate-main-listing-line-p'."
   (save-excursion
     (end-of-line)
     (let ((eol (point)))
@@ -320,6 +382,12 @@
 	 1
        0)))
 
+;; You should only call this function on lines that contain a file name
+;; listed by the locate program.  Inside inserted subdirectories, or if
+;; there is no file name on the current line, the return value is
+;; meaningless.  You can check whether the current line contains a file
+;; listed by the locate program, using the function
+;; `locate-main-listing-line-p'.
 (defun locate-get-filename ()
   (let ((pos    (locate-get-file-positions))
 	(lineno (locate-current-line-number)))
@@ -516,8 +584,16 @@
 (defun locate-find-directory-other-window ()
   "Visit the directory of the file named on this line in other window."
   (interactive)
-  (find-file-other-window (locate-get-dirname)))
+  (if (locate-main-listing-line-p)
+      (find-file-other-window (locate-get-dirname))
+    (message "This command only works inside main listing.")))
 
+;; You should only call this function on lines that contain a file name
+;; listed by the locate program.  Inside inserted subdirectories, or if
+;; there is no file name on the current line, the return value is
+;; meaningless.  You can check whether the current line contains a file
+;; listed by the locate program, using the function
+;; `locate-main-listing-line-p'.
 (defun locate-get-dirname ()
   "Return the directory name of the file mentioned on this line."
   (let (file (filepos (locate-get-file-positions)))
--- a/lisp/mail/rmail.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/mail/rmail.el	Sun Mar 19 19:43:57 2006 +0000
@@ -453,10 +453,10 @@
   "String to prepend to Subject line when replying to a message.")
 
 ;; Some mailers use "Re(2):" or "Re^2:" or "Re: Re:" or "Re[2]:".
-;; This pattern should catch all the common variants.  The pattern
-;; also ignores mailing list identifiers sometimes added in square
-;; brackets at the beginning of subject lines.
-(defvar rmail-reply-regexp "\\`\\(\\[.+?\\] \\)?\\(Re\\(([0-9]+)\\|\\[[0-9]+\\]\\|\\^[0-9]+\\)?: *\\)*"
+;; This pattern should catch all the common variants.
+;; rms: I deleted the change to delete tags in square brackets
+;; because they mess up RT tags.
+(defvar rmail-reply-regexp "\\`\\(Re\\(([0-9]+)\\|\\[[0-9]+\\]\\|\\^[0-9]+\\)?: *\\)*"
   "Regexp to delete from Subject line before inserting `rmail-reply-prefix'.")
 
 (defcustom rmail-display-summary nil
--- a/lisp/mh-e/ChangeLog	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/mh-e/ChangeLog	Sun Mar 19 19:43:57 2006 +0000
@@ -1,3 +1,53 @@
+2006-03-17  Bill Wohler  <wohler@newt.com>
+
+	* mh-compat.el (mh-image-load-path-for-library): Minor docstring
+	fix.
+
+2006-03-16  Bill Wohler  <wohler@newt.com>
+
+	* mh-comp.el (mh-send-letter): Use split-string to break up
+	mh-send-args (closes SF #1448604).
+	(mh-compose-and-send-mail): Use run-hook-with-args for
+	mh-compose-letter-function.
+
+	* mh-e.el (mh-list-to-string-1): Use dolist.
+
+	* mh-compat.el (mh-image-load-path-for-library): Prefer user's
+	images.
+
+2006-03-15  Bill Wohler  <wohler@newt.com>
+
+	* mh-compat.el (mh-image-load-path-for-library): Fix example by
+	not recommending that one binds image-load-path. Just defvar it to
+	placate compiler and only use it if previously defined.
+
+	* mh-e.el (image-load-path): Don't bind!
+
+	* mh-folder.el (mh-folder-mode): Only use image-load-path if
+	previously defined.
+
+	* mh-letter.el (mh-letter-mode): Ditto.
+
+	* mh-utils.el (mh-logo-display): Ditto.
+
+2006-03-14  Bill Wohler  <wohler@newt.com>
+
+	* mh-compat.el (mh-image-load-path-for-library): Incorporate
+	changes from image-load-path-for-library, which are:
+	(image-load-path-for-library): Pass value of path rather than
+	symbol. Always return list of directories. Guarantee that image
+	directory comes first.
+
+	* mh-e.el (image-load-path): Define on those Emacsen that lack it
+	to avoid compile and run-time errors.	
+
+	* mh-folder.el (mh-folder-mode): Use new idiom for setting
+	image-load-path.
+
+	* mh-letter.el (mh-letter-mode): Ditto. 
+
+	* mh-utils.el (mh-logo-display): Ditto.
+
 2006-03-12  Bill Wohler  <wohler@newt.com>
 
 	* mh-utils.el (mh-folder-list): Fix docstring (closes SF
--- a/lisp/mh-e/mh-comp.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/mh-e/mh-comp.el	Sun Mar 19 19:43:57 2006 +0000
@@ -287,7 +287,7 @@
            (set-buffer draft-buffer))   ; for annotation below
           (t
            (mh-exec-cmd-daemon mh-send-prog nil "-nodraftfolder" "-noverbose"
-                               mh-send-args file-name)))
+                               (split-string mh-send-args) file-name)))
     (if mh-annotate-char
         (mh-annotate-msg mh-sent-from-msg
                          mh-sent-from-folder
@@ -895,15 +895,7 @@
   (mh-logo-display)
   (mh-make-local-hook 'kill-buffer-hook)
   (add-hook 'kill-buffer-hook 'mh-tidy-draft-buffer nil t)
-  (if (and (boundp 'mh-compose-letter-function)
-           mh-compose-letter-function)
-      ;; run-hooks will not pass arguments.
-      (let ((value mh-compose-letter-function))
-        (if (and (listp value) (not (eq (car value) 'lambda)))
-            (while value
-              (funcall (car value) to subject cc)
-              (setq value (cdr value)))
-          (funcall mh-compose-letter-function to subject cc)))))
+  (run-hook-with-args 'mh-compose-letter-function to subject cc))
 
 (defun mh-insert-x-mailer ()
   "Append an X-Mailer field to the header.
--- a/lisp/mh-e/mh-compat.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/mh-e/mh-compat.el	Sun Mar 19 19:43:57 2006 +0000
@@ -117,36 +117,67 @@
 
 (mh-defun-compat mh-image-load-path-for-library
   image-load-path-for-library (library image &optional path no-error)
-  "Return a suitable search path for images relative to LIBRARY.
+  "Return a suitable search path for images used by the Lisp package LIBRARY.
 
-Images for LIBRARY are searched for in \"../../etc/images\" and
-\"../etc/images\" relative to the files in \"lisp/LIBRARY\" as
-well as in `image-load-path' and `load-path'.
+It searches for IMAGE in `image-load-path' (excluding
+\"`data-directory'/images\") and `load-path', followed by a path
+suitable for LIBRARY, which includes \"../../etc/images\" and
+\"../etc/images\" relative to the library file itself, and then
+in \"`data-directory'/images\".
 
-This function returns the value of `load-path' augmented with the
-directory containing IMAGE. If PATH is given, it is used instead
-of `load-path'. If PATH is t, just return the directory that
-contains IMAGE.
+Then this function returns a list of directories which contains
+first the directory in which IMAGE was found, followed by the
+value of `load-path'. If PATH is given, it is used instead of
+`load-path'.
 
-If NO-ERROR is non-nil, return nil if a suitable path can't be
-found rather than signaling an error.
+If NO-ERROR is non-nil and a suitable path can't be found, don't
+signal an error. Instead, return a list of directories as before,
+except that nil appears in place of the image directory.
 
 Here is an example that uses a common idiom to provide
 compatibility with versions of Emacs that lack the variable
 `image-load-path':
 
-  (let ((load-path
-         (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\"))
-        (image-load-path
-         (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\" 'image-load-path)))
-    (mh-tool-bar-folder-buttons-init))
+    ;; Shush compiler.
+    (defvar image-load-path)
 
-This function is used by Emacs versions that don't have
-`image-load-path-for-library'."
+    (let* ((load-path (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\"))
+           (image-load-path (cons (car load-path)
+                                  (when (boundp 'image-load-path)
+                                    image-load-path))))
+      (mh-tool-bar-folder-buttons-init))"
   (unless library (error "No library specified"))
   (unless image   (error "No image specified"))
-  (let ((image-directory))
+  (let (image-directory image-directory-load-path)
+    ;; Check for images in image-load-path or load-path.
+    (let ((img image)
+          (dir (or
+                ;; Images in image-load-path.
+                (mh-image-search-load-path image)
+                ;; Images in load-path.
+                (locate-library image)))
+          parent)
+      ;; Since the image might be in a nested directory (for
+      ;; example, mail/attach.pbm), adjust `image-directory'
+      ;; accordingly.
+      (when dir
+        (setq dir (file-name-directory dir))
+        (while (setq parent (file-name-directory img))
+          (setq img (directory-file-name parent)
+                dir (expand-file-name "../" dir))))
+      (setq image-directory-load-path dir))
+
+    ;; If `image-directory-load-path' isn't Emacs' image directory,
+    ;; it's probably a user preference, so use it. Then use a
+    ;; relative setting if possible; otherwise, use
+    ;; `image-directory-load-path'.
     (cond
+     ;; User-modified image-load-path?
+     ((and image-directory-load-path
+           (not (equal image-directory-load-path
+                       (file-name-as-directory
+                        (expand-file-name "images" data-directory)))))
+      (setq image-directory image-directory-load-path))
      ;; Try relative setting.
      ((let (library-name d1ei d2ei)
         ;; First, find library in the load-path.
@@ -156,54 +187,28 @@
         ;; And then set image-directory relative to that.
         (setq
          ;; Go down 2 levels.
-         d2ei (expand-file-name
-               (concat (file-name-directory library-name) "../../etc/images"))
+         d2ei (file-name-as-directory
+               (expand-file-name
+                (concat (file-name-directory library-name) "../../etc/images")))
          ;; Go down 1 level.
-         d1ei (expand-file-name
-               (concat (file-name-directory library-name) "../etc/images")))
+         d1ei (file-name-as-directory
+               (expand-file-name
+                (concat (file-name-directory library-name) "../etc/images"))))
         (setq image-directory
               ;; Set it to nil if image is not found.
               (cond ((file-exists-p (expand-file-name image d2ei)) d2ei)
                     ((file-exists-p (expand-file-name image d1ei)) d1ei)))))
-     ;; Check for images in image-load-path or load-path.
-     ((let ((img image)
-            (dir (or
-                  ;; Images in image-load-path.
-                  (mh-image-search-load-path image)
-                  ;; Images in load-path.
-                  (locate-library image)))
-            parent)
-        ;; Since the image might be in a nested directory (for
-        ;; example, mail/attach.pbm), adjust `image-directory'
-        ;; accordingly.
-        (and dir
-             (setq dir (file-name-directory dir))
-             (progn
-               (while (setq parent (file-name-directory img))
-                 (setq img (directory-file-name parent)
-                       dir (expand-file-name "../" dir)))
-               (setq image-directory dir)))))
+     ;; Use Emacs' image directory.
+     (image-directory-load-path
+      (setq image-directory image-directory-load-path))
      (no-error
-      ;; In this case we will return nil.
       (message "Could not find image %s for library %s" image library))
      (t
       (error "Could not find image %s for library %s" image library)))
 
-    ;; Return the directory, nil if no-error was non-nil and a
-    ;; suitable path could not be found, or an augmented
-    ;; `image-load-path' or `load-path'.
-    (cond ((or (null image-directory)
-               (eq path t))
-           image-directory)
-          ((and path (symbolp path))
-           (nconc (list image-directory)
-                  (delete image-directory
-                          (if (boundp path)
-                              (copy-sequence (symbol-value path))
-                            nil))))
-          (t
-           (nconc (list image-directory)
-                  (delete image-directory (copy-sequence load-path)))))))
+    ;; Return an augmented `path' or `load-path'.
+    (nconc (list image-directory)
+           (delete image-directory (copy-sequence (or path load-path))))))
 
 (mh-defun-compat mh-image-search-load-path
   image-search-load-path (file &optional path)
--- a/lisp/mh-e/mh-e.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/mh-e/mh-e.el	Sun Mar 19 19:43:57 2006 +0000
@@ -427,20 +427,20 @@
 
 (defun mh-list-to-string-1 (l)
   "Flatten the list L and make every element of the new list into a string."
-  (let ((new-list nil))
-    (while l
-      (cond ((null (car l)))
-            ((symbolp (car l))
-             (setq new-list (cons (symbol-name (car l)) new-list)))
-            ((numberp (car l))
-             (setq new-list (cons (int-to-string (car l)) new-list)))
-            ((equal (car l) ""))
-            ((stringp (car l)) (setq new-list (cons (car l) new-list)))
-            ((listp (car l))
-             (setq new-list (nconc (mh-list-to-string-1 (car l))
-                                   new-list)))
-            (t (error "Bad element in `mh-list-to-string': %s" (car l))))
-      (setq l (cdr l)))
+  (let (new-list)
+    (dolist (element l)
+      (cond ((null element))
+            ((symbolp element)
+             (push (symbol-name element) new-list))
+            ((numberp element)
+             (push (int-to-string element) new-list))
+            ((equal element ""))
+            ((stringp element)
+             (push element new-list))
+            ((listp element)
+             (setq new-list (nconc (mh-list-to-string-1 element) new-list)))
+            (t
+             (error "Bad element: %s" element))))
     new-list))
 
 
--- a/lisp/mh-e/mh-folder.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/mh-e/mh-folder.el	Sun Mar 19 19:43:57 2006 +0000
@@ -525,6 +525,7 @@
 (eval-when-compile
   (defvar desktop-save-buffer)
   (defvar font-lock-auto-fontify)
+  (defvar image-load-path)
   (mh-do-in-xemacs (defvar font-lock-defaults)))
 
 (defvar mh-folder-buttons-init-flag nil)
@@ -591,9 +592,10 @@
 \\{mh-folder-mode-map}"
   (mh-do-in-gnu-emacs
     (unless mh-folder-buttons-init-flag
-      (let ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
-            (image-load-path (mh-image-load-path-for-library
-                              "mh-e" "mh-logo.xpm" 'image-load-path)))
+      (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
+             (image-load-path (cons (car load-path)
+                                    (when (boundp 'image-load-path)
+                                      image-load-path))))
         (mh-tool-bar-folder-buttons-init)
         (setq mh-folder-buttons-init-flag t)))
     (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map))
--- a/lisp/mh-e/mh-letter.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/mh-e/mh-letter.el	Sun Mar 19 19:43:57 2006 +0000
@@ -278,7 +278,9 @@
 (defvar mh-letter-buttons-init-flag nil)
 
 ;; Shush compiler.
-(eval-when-compile (mh-do-in-xemacs (defvar font-lock-defaults)))
+(eval-when-compile
+  (defvar image-load-path)
+  (mh-do-in-xemacs (defvar font-lock-defaults)))
 
 ;; Ensure new buffers won't get this mode if default-major-mode is nil.
 (put 'mh-letter-mode 'mode-class 'special)
@@ -313,9 +315,10 @@
   (make-local-variable 'mh-sent-from-msg)
   (mh-do-in-gnu-emacs
     (unless mh-letter-buttons-init-flag
-      (let ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
-            (image-load-path (mh-image-load-path-for-library
-                              "mh-e" "mh-logo.xpm" 'image-load-path)))
+      (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
+             (image-load-path (cons (car load-path)
+                                    (when (boundp 'image-load-path)
+                                      image-load-path))))
         (mh-tool-bar-letter-buttons-init)
         (setq mh-letter-buttons-init-flag t)))
     (set (make-local-variable 'tool-bar-map) mh-letter-tool-bar-map))
--- a/lisp/mh-e/mh-utils.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/mh-e/mh-utils.el	Sun Mar 19 19:43:57 2006 +0000
@@ -127,13 +127,17 @@
 
 (defvar mh-logo-cache nil)
 
+;; Shush compiler.
+(defvar image-load-path)
+
 ;;;###mh-autoload
 (defun mh-logo-display ()
   "Modify mode line to display MH-E logo."
   (mh-do-in-gnu-emacs
-    (let ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
-          (image-load-path (mh-image-load-path-for-library
-                            "mh-e" "mh-logo.xpm" 'image-load-path)))
+    (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
+           (image-load-path (cons (car load-path)
+                                  (when (boundp 'image-load-path)
+                                    image-load-path))))
       (add-text-properties
        0 2
        `(display ,(or mh-logo-cache
--- a/lisp/mouse.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/mouse.el	Sun Mar 19 19:43:57 2006 +0000
@@ -538,19 +538,20 @@
 	 (echo-keystrokes 0)
 	 (start-event-frame (window-frame (car (car (cdr start-event)))))
 	 (start-event-window (car (car (cdr start-event))))
-	 (start-nwindows (count-windows t))
 	 event mouse x left right edges wconfig growth
 	 (which-side
 	  (or (cdr (assq 'vertical-scroll-bars (frame-parameters start-event-frame)))
 	      'right)))
-    (if (one-window-p t)
-	(error "Attempt to resize sole ordinary window"))
-    (if (eq which-side 'right)
-	(if (= (nth 2 (window-edges start-event-window))
-	       (frame-width start-event-frame))
-	    (error "Attempt to drag rightmost scrollbar"))
-      (if (= (nth 0 (window-edges start-event-window)) 0)
-	  (error "Attempt to drag leftmost scrollbar")))
+    (cond
+     ((one-window-p t)
+      (error "Attempt to resize sole ordinary window"))
+     ((and (eq which-side 'right)
+	   (>= (nth 2 (window-inside-edges start-event-window))
+	       (frame-width start-event-frame)))
+      (error "Attempt to drag rightmost scrollbar"))
+     ((and (eq which-side 'left)
+	   (= (nth 0 (window-inside-edges start-event-window)) 0))
+      (error "Attempt to drag leftmost scrollbar")))
     (track-mouse
       (progn
 	;; enlarge-window only works on the selected window, so
--- a/lisp/progmodes/gdb-ui.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/progmodes/gdb-ui.el	Sun Mar 19 19:43:57 2006 +0000
@@ -81,7 +81,7 @@
 
 ;; 1) They go out of scope when the inferior is re-run.
 ;; 2) -stack-list-locals has a type field but also prints type in values field.
-;; 3) VARNUM increments even when vairable object is not created (maybe trivial).
+;; 3) VARNUM increments even when variable object is not created (maybe trivial).
 
 ;;; TODO:
 
@@ -107,7 +107,7 @@
 (defvar gdb-current-language nil)
 (defvar gdb-var-list nil
  "List of variables in watch window.
-Each element has the form (EXPRESSION VARNUM NUMCHILD TYPE VALUE STATUS) where
+Each element has the form (VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS) where
 STATUS is nil (unchanged), `changed' or `out-of-scope'.")
 (defvar gdb-force-update t
  "Non-nil means that view of watch expressions will be updated in the speedbar.")
@@ -125,6 +125,7 @@
 (defvar gdb-buffer-fringe-width nil)
 (defvar gdb-signalled nil)
 (defvar gdb-source-window nil)
+(defvar gdb-inferior-status nil)
 
 (defvar gdb-buffer-type nil
   "One of the symbols bound in `gdb-buffer-rules'.")
@@ -317,6 +318,16 @@
   :group 'gud
   :version "22.1")
 
+(defun gdb-force-mode-line-update (status)
+  (let ((buffer gud-comint-buffer))
+    (if (and buffer (buffer-name buffer))
+	(with-current-buffer buffer
+	  (setq mode-line-process
+		(format ":%s [%s]"
+			(process-status (get-buffer-process buffer)) status))
+	  ;; Force mode line redisplay soon.
+	  (force-mode-line-update)))))
+    
 (defun gdb-many-windows (arg)
   "Toggle the number of windows in the basic arrangement.
 With arg, display additional buffers iff arg is positive."
@@ -417,12 +428,20 @@
 
 (defun gdb-find-watch-expression ()
   (let* ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list))
-	 (varno (nth 1 var)) (expr))
-    (string-match "\\(var[0-9]+\\)\\.\\(.*\\)" varno)
-    (dolist (var1 gdb-var-list)
-      (if (string-equal (nth 1 var1) (match-string 1 varno))
-	  (setq expr (concat (car var1) "." (match-string 2 varno)))))
-    expr))
+	 (varnum (car var)) expr array)
+    (string-match "\\(var[0-9]+\\)\\.\\(.*\\)" varnum)
+    (let ((var1 (assoc (match-string 1 varnum) gdb-var-list)) var2 varnumlet
+	  (component-list (split-string (match-string 2 varnum) "\\." t)))
+      (setq expr (nth 1 var1))
+      (setq varnumlet (car var1))
+      (dolist (component component-list)
+	(setq var2 (assoc varnumlet gdb-var-list))
+	(setq expr (concat expr
+			   (if (string-match ".*\\[[0-9]+\\]$" (nth 3 var2))
+			       (concat "[" component "]")
+			     (concat "." component))))
+	(setq varnumlet (concat varnumlet "." component)))
+      expr)))
 
 (defun gdb-init-1 ()
   (set (make-local-variable 'gud-minor-mode) 'gdba)
@@ -516,7 +535,9 @@
 	gdb-buffer-fringe-width (car (window-fringes))
 	gdb-debug-ring nil
 	gdb-signalled nil
-	gdb-source-window nil)
+	gdb-source-window nil
+	gdb-inferior-status nil
+	gdb-continuation nil)
 
   (setq gdb-buffer-type 'gdba)
 
@@ -648,24 +669,37 @@
   :group 'gud
   :version "22.1")
 
-(defun gud-watch (&optional event)
-  "Watch expression at point."
-  (interactive (list last-input-event))
-  (if event (posn-set-point (event-end event)))
-  (require 'tooltip)
-  (save-selected-window
-    (let ((expr (tooltip-identifier-from-point (point))))
-      (catch 'already-watched
-	(dolist (var gdb-var-list)
-	  (unless (string-match "\\." (nth 1 var))
-	    (if (string-equal expr (car var)) (throw 'already-watched nil))))
-	(set-text-properties 0 (length expr) nil expr)
-	(gdb-enqueue-input
-	 (list
-	  (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
-	      (concat "server interpreter mi \"-var-create - * "  expr "\"\n")
-	    (concat"-var-create - * "  expr "\n"))
-	  `(lambda () (gdb-var-create-handler ,expr))))))))
+(define-key gud-minor-mode-map "\C-c\C-w" 'gud-watch)
+(define-key global-map (concat gud-key-prefix "\C-w") 'gud-watch)
+
+(defun gud-watch (&optional arg event)
+  "Watch expression at point.
+With arg, enter name of variable to be watched in the minibuffer."
+  (interactive (list current-prefix-arg last-input-event))
+  (let ((minor-mode (buffer-local-value 'gud-minor-mode gud-comint-buffer)))
+    (if (memq minor-mode '(gdbmi gdba))
+	(progn
+	  (if event (posn-set-point (event-end event)))
+	  (require 'tooltip)
+	  (save-selected-window
+	    (let ((expr (if arg
+			    (completing-read "Name of variable: "
+					     'gud-gdb-complete-command)
+			  (tooltip-identifier-from-point (point)))))
+	      (catch 'already-watched
+		(dolist (var gdb-var-list)
+		  (unless (string-match "\\." (car var))
+		    (if (string-equal expr (nth 1 var))
+			(throw 'already-watched nil))))
+		(set-text-properties 0 (length expr) nil expr)
+		(gdb-enqueue-input
+		 (list
+		  (if (eq minor-mode 'gdba)
+		      (concat
+		       "server interpreter mi \"-var-create - * "  expr "\"\n")
+		    (concat"-var-create - * "  expr "\n"))
+		  `(lambda () (gdb-var-create-handler ,expr))))))))
+      (message "gud-watch is a no-op in this mode."))))
 
 (defconst gdb-var-create-regexp
   "name=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\",type=\"\\(.*?\\)\"")
@@ -674,11 +708,11 @@
   (goto-char (point-min))
   (if (re-search-forward gdb-var-create-regexp nil t)
       (let ((var (list
+		  (match-string 1)
 		  (if (and (string-equal gdb-current-language "c")
 			   gdb-use-colon-colon-notation gdb-selected-frame)
 		      (setq expr (concat gdb-selected-frame "::" expr))
 		    expr)
-		  (match-string 1)
 		  (match-string 2)
 		  (match-string 3)
 		  nil nil)))
@@ -691,10 +725,10 @@
 	 (list
 	  (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
 	      (concat "server interpreter mi \"-var-evaluate-expression "
-		      (nth 1 var) "\"\n")
-	    (concat "-var-evaluate-expression " (nth 1 var) "\n"))
+		      (car var) "\"\n")
+	    (concat "-var-evaluate-expression " (car var) "\n"))
 	  `(lambda () (gdb-var-evaluate-expression-handler
-		       ,(nth 1 var) nil)))))
+		       ,(car var) nil)))))
     (if (search-forward "Undefined command" nil t)
 	(message-box "Watching expressions requires gdb 6.0 onwards")
       (message-box "No symbol \"%s\" in current context." expr))))
@@ -702,12 +736,10 @@
 (defun gdb-var-evaluate-expression-handler (varnum changed)
   (goto-char (point-min))
   (re-search-forward ".*value=\\(\".*\"\\)" nil t)
-  (catch 'var-found
-    (dolist (var gdb-var-list)
-      (when (string-equal varnum (cadr var))
-	(if changed (setcar (nthcdr 5 var) 'changed))
-	(setcar (nthcdr 4 var) (read (match-string 1)))
-	(throw 'var-found nil)))))
+  (let ((var (assoc varnum gdb-var-list)))
+    (when var
+      (if changed (setcar (nthcdr 5 var) 'changed))
+      (setcar (nthcdr 4 var) (read (match-string 1))))))
 
 (defun gdb-var-list-children (varnum)
   (gdb-enqueue-input
@@ -723,26 +755,25 @@
   (let ((var-list nil))
     (catch 'child-already-watched
       (dolist (var gdb-var-list)
-	(if (string-equal varnum (cadr var))
+	(if (string-equal varnum (car var))
 	    (progn
 	      (push var var-list)
 	      (while (re-search-forward gdb-var-list-children-regexp nil t)
-		(let ((varchild (list (match-string 2)
-				      (match-string 1)
+		(let ((varchild (list (match-string 1)
+				      (match-string 2)
 				      (match-string 3)
 				      (match-string 4)
 				      nil nil)))
-		  (dolist (var1 gdb-var-list)
-		    (if (string-equal (cadr var1) (cadr varchild))
-			(throw 'child-already-watched nil)))
+		  (if (assoc (car varchild) gdb-var-list)
+		      (throw 'child-already-watched nil))
 		  (push varchild var-list)
 		  (gdb-enqueue-input
 		   (list
 		    (concat
 		     "server interpreter mi \"-var-evaluate-expression "
-		     (nth 1 varchild) "\"\n")
+		     (car varchild) "\"\n")
 		    `(lambda () (gdb-var-evaluate-expression-handler
-				 ,(nth 1 varchild) nil)))))))
+				 ,(car varchild) nil)))))))
 	  (push var var-list)))
       (setq gdb-var-list (nreverse var-list)))))
 
@@ -762,11 +793,8 @@
   (while (re-search-forward gdb-var-update-regexp nil t)
     (let ((varnum (match-string 1)))
       (if  (string-equal (match-string 2) "false")
-	  (catch 'var-found
-	    (dolist (var gdb-var-list)
-	      (when (string-equal varnum (cadr var))
-		(setcar (nthcdr 5 var) 'out-of-scope)
-		(throw 'var-found nil))))
+	  (let ((var (assoc varnum gdb-var-list)))
+	    (if var (setcar (nthcdr 5 var) 'out-of-scope)))
 	(gdb-enqueue-input
 	 (list
 	  (concat "server interpreter mi \"-var-evaluate-expression "
@@ -796,10 +824,14 @@
 	    '(gdbmi gdba))
       (let ((text (speedbar-line-text)))
 	(string-match "\\(\\S-+\\)" text)
-	(let* ((expr (match-string 1 text))
-	       (var (assoc expr gdb-var-list))
-	       (varnum (cadr var)))
-	  (unless (string-match "\\." varnum)
+	(let ((expr (match-string 1 text)) var varnum)
+	  (catch 'expr-found
+	    (dolist (var1 gdb-var-list)
+	      (when (string-equal expr (nth 1 var1))
+		(setq var var1)
+		(setq varnum (car var1))
+		(throw 'expr-found nil))))
+	  (unless (string-match "\\." (car var))
 	    (gdb-enqueue-input
 	     (list
 	      (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
@@ -809,13 +841,13 @@
 		   'ignore))
 	    (setq gdb-var-list (delq var gdb-var-list))
 	    (dolist (varchild gdb-var-list)
-	      (if (string-match (concat (nth 1 var) "\\.") (nth 1 varchild))
+	      (if (string-match (concat (car var) "\\.") (car varchild))
 		  (setq gdb-var-list (delq varchild gdb-var-list)))))))))
 
 (defun gdb-edit-value (text token indent)
   "Assign a value to a variable displayed in the speedbar."
   (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list))
-	 (varnum (cadr var)) (value))
+	 (varnum (car var)) (value))
     (setq value (read-string "New value: "))
     (gdb-enqueue-input
      (list
@@ -851,7 +883,7 @@
 	   (gdb-var-list-children-1 token)))
 	((string-match "-" text)	;contract this node
 	 (dolist (var gdb-var-list)
-	   (if (string-match (concat token "\\.") (nth 1 var))
+	   (if (string-match (concat token "\\.") (car var))
 	       (setq gdb-var-list (delq var gdb-var-list))))
 	 (speedbar-change-expand-button-char ?+)
 	 (speedbar-delete-subblock indent))
@@ -1046,6 +1078,7 @@
 ;;
 ;; These lists are consumed tail first.
 ;;
+(defvar gdb-continuation nil)
 
 (defun gdb-send (proc string)
   "A comint send filter for gdb.
@@ -1053,12 +1086,15 @@
   (with-current-buffer gud-comint-buffer
     (let ((inhibit-read-only t))
       (remove-text-properties (point-min) (point-max) '(face))))
-  (let ((item (concat string "\n")))
-    (if gud-running
-      (progn
-	(if gdb-enable-debug (push (cons 'send item) gdb-debug-ring))
-	(process-send-string proc item))
-      (gdb-enqueue-input item))))
+  (if (string-match "\\\\$" string)
+      (setq gdb-continuation (concat gdb-continuation string "\n"))
+    (let ((item (concat gdb-continuation string "\n")))
+      (if gud-running
+	  (progn
+	    (if gdb-enable-debug (push (cons 'send item) gdb-debug-ring))
+	    (process-send-string proc item))
+	(gdb-enqueue-input item)))
+    (setq gdb-continuation nil)))
 
 ;; Note: Stuff enqueued here will be sent to the next prompt, even if it
 ;; is a query, or other non-top-level prompt.
@@ -1134,7 +1170,7 @@
     ("starting" gdb-starting)
     ("exited" gdb-exited)
     ("signalled" gdb-signalled)
-    ("signal" gdb-stopping)
+    ("signal" gdb-signal)
     ("breakpoint" gdb-stopping)
     ("watchpoint" gdb-stopping)
     ("frame-begin" gdb-frame-begin)
@@ -1146,6 +1182,7 @@
 (defun gdb-resync()
   (setq gdb-flush-pending-output t)
   (setq gud-running nil)
+  (gdb-force-mode-line-update "stopped")
   (setq gdb-output-sink 'user)
   (setq gdb-input-queue nil)
   (setq gdb-pending-triggers nil)
@@ -1220,13 +1257,22 @@
      ((eq sink 'user)
       (progn
 	(setq gud-running t)
+	(setq gdb-inferior-status "running")
+	(gdb-force-mode-line-update gdb-inferior-status)
 	(gdb-remove-text-properties)
+	(setq gud-overlay-arrow-position nil)
+	(setq gdb-overlay-arrow-position nil)
 	(if gdb-use-separate-io-buffer
 	    (setq gdb-output-sink 'inferior))))
      (t
       (gdb-resync)
       (error "Unexpected `starting' annotation")))))
 
+(defun gdb-signal (ignored)
+  (setq gdb-inferior-status "signal")
+  (gdb-force-mode-line-update gdb-inferior-status)
+  (gdb-stopping ignored))
+
 (defun gdb-stopping (ignored)
   "An annotation handler for `breakpoint' and other annotations.
 They say that I/O for the subprocess is now GDB, not the program
@@ -1249,6 +1295,8 @@
   (setq gdb-active-process nil)
   (setq gud-overlay-arrow-position nil)
   (setq gdb-overlay-arrow-position nil)
+  (setq gdb-inferior-status "exited")
+  (gdb-force-mode-line-update gdb-inferior-status)
   (gdb-stopping ignored))
 
 (defun gdb-signalled (ignored)
@@ -1270,6 +1318,9 @@
 It is just like `gdb-stopping', except that if we already set the output
 sink to `user' in `gdb-stopping', that is fine."
   (setq gud-running nil)
+  (unless (member gdb-inferior-status '("exited" "signal"))
+    (setq gdb-inferior-status "stopped")
+    (gdb-force-mode-line-update gdb-inferior-status))
   (let ((sink gdb-output-sink))
     (cond
      ((eq sink 'inferior)
@@ -3117,19 +3168,18 @@
   (let ((var-list nil))
     (catch 'child-already-watched
       (dolist (var gdb-var-list)
-	(if (string-equal varnum (cadr var))
+	(if (string-equal varnum (car var))
 	    (progn
 	      (push var var-list)
 	      (while (re-search-forward gdb-var-list-children-regexp-1 nil t)
-		(let ((varchild (list (match-string 2)
-				      (match-string 1)
+		(let ((varchild (list (match-string 1)
+				      (match-string 2)
 				      (match-string 3)
 				      (match-string 5)
 				      (read (match-string 4))
 				      nil)))
-		  (dolist (var1 gdb-var-list)
-		    (if (string-equal (cadr var1) (cadr varchild))
-			(throw 'child-already-watched nil)))
+		  (if (assoc (car varchild) gdb-var-list)
+		      (throw 'child-already-watched nil))
 		  (push varchild var-list))))
 	  (push var var-list)))
       (setq gdb-var-list (nreverse var-list)))))
@@ -3154,16 +3204,14 @@
     (setcar (nthcdr 5 var) nil))
   (goto-char (point-min))
   (while (re-search-forward gdb-var-update-regexp-1 nil t)
-    (let ((varnum (match-string 1)))
-      (catch 'var-found
-	(dolist (var gdb-var-list)
-	  (when (string-equal varnum (cadr var))
-	    (if (string-equal (match-string 3) "false")
-		(setcar (nthcdr 5 var) 'out-of-scope)
-	      (setcar (nthcdr 5 var) 'changed)
-	      (setcar (nthcdr 4 var)
-		      (read (match-string 2))))
-	    (throw 'var-found nil))))))
+    (let* ((varnum (match-string 1))
+	   (var (assoc varnum gdb-var-list)))
+      (when var
+	(if (string-equal (match-string 3) "false")
+	    (setcar (nthcdr 5 var) 'out-of-scope)
+	  (setcar (nthcdr 5 var) 'changed)
+	  (setcar (nthcdr 4 var)
+		  (read (match-string 2)))))))
   (setq gdb-pending-triggers
    (delq 'gdb-var-update gdb-pending-triggers))
   (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
--- a/lisp/progmodes/grep.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/progmodes/grep.el	Sun Mar 19 19:43:57 2006 +0000
@@ -33,8 +33,6 @@
 
 (require 'compile)
 
-(defvar font-lock-lines-before)
-
 
 (defgroup grep nil
   "Run compiler as inferior of Emacs, parse error messages."
@@ -536,10 +534,7 @@
        grep-regexp-alist)
   (set (make-local-variable 'compilation-process-setup-function)
        'grep-process-setup)
-  (set (make-local-variable 'compilation-disable-input) t)
-  ;; Set `font-lock-lines-before' to 0 to not refontify the previous
-  ;; line where grep markers may be already removed.
-  (set (make-local-variable 'font-lock-lines-before) 0))
+  (set (make-local-variable 'compilation-disable-input) t))
 
 ;;;###autoload
 (defun grep-find (command-args)
--- a/lisp/progmodes/gud.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/progmodes/gud.el	Sun Mar 19 19:43:57 2006 +0000
@@ -174,7 +174,7 @@
 		  :enable (and (not gud-running)
 			       (memq gud-minor-mode
 				     '(gdbmi gdba gdb dbx xdb jdb pdb bashdb))))
-    ([pp]	menu-item "Print the emacs s-expression" gud-pp
+    ([pp]	menu-item "Print S-expression" gud-pp
                   :enable (and (not gud-running)
 				  gdb-active-process)
 		  :visible (and (string-equal
@@ -234,9 +234,6 @@
 		     (gud-run . "gud/run")
 		     (gud-go . "gud/go")
 		     (gud-stop-subjob . "gud/stop")
-		     ;; gud-s, gud-si etc. instead of gud-step,
-		     ;; gud-stepi, to avoid file-name clashes on DOS
-		     ;; 8+3 filesystems.
 		     (gud-cont . "gud/cont")
 		     (gud-until . "gud/until")
 		     (gud-next . "gud/next")
@@ -455,7 +452,7 @@
 	  (let ((var-list gdb-var-list) parent)
 	    (while var-list
 	      (let* (char (depth 0) (start 0) (var (car var-list))
-			  (expr (car var)) (varnum (nth 1 var))
+			  (varnum (car var)) (expr (nth 1 var))
 			  (type (nth 3 var)) (value (nth 4 var))
 			  (status (nth 5 var)))
 		(put-text-property
@@ -483,9 +480,9 @@
 		       t)
 		     depth)
 		  (if (eq status 'out-of-scope) (setq parent 'shadow))
-		  (if (and (cadr var-list)
+		  (if (and (nth 1 var-list)
 			   (string-match (concat varnum "\\.")
-					 (cadr (cadr var-list))))
+					 (car (nth 1 var-list))))
 		      (setq char ?-)
 		    (setq char ?+))
 		  (if (string-match "\\*$" type)
@@ -743,14 +740,18 @@
 
 (defvar gud-comint-buffer nil)
 
-(defun gud-gdb-complete-command ()
+(defun gud-gdb-complete-command (&optional command a b)
   "Perform completion on the GDB command preceding point.
 This is implemented using the GDB `complete' command which isn't
 available with older versions of GDB."
   (interactive)
-  (let* ((end (point))
-	 (command (buffer-substring (comint-line-beginning-position) end))
-	 (command-word
+  (if command
+      ;; Used by gud-watch in mini-buffer.
+      (setq command (concat "p " command))
+    ;; Used in GUD buffer.
+    (let ((end (point)))
+      (setq command (buffer-substring (comint-line-beginning-position) end))))
+  (let* ((command-word
 	  ;; Find the word break.  This match will always succeed.
 	  (and (string-match "\\(\\`\\| \\)\\([^ ]*\\)\\'" command)
 	       (substring command (match-beginning 2))))
@@ -869,13 +870,14 @@
 
 (defun gud-gdb-run-command-fetch-lines (command buffer &optional skip)
   "Run COMMAND, and return the list of lines it outputs.
-BUFFER is the GUD buffer in which to run the command.
+BUFFER is the current buffer which may be the GUD buffer in which to run.
 SKIP is the number of chars to skip on each lines, it defaults to 0."
-  (with-current-buffer buffer
-    (if (save-excursion
-	  (goto-char (point-max))
-	  (forward-line 0)
-	  (not (looking-at comint-prompt-regexp)))
+  (with-current-buffer gud-comint-buffer
+    (if (and (eq gud-comint-buffer buffer)
+	     (save-excursion
+	       (goto-char (point-max))
+	       (forward-line 0)
+	       (not (looking-at comint-prompt-regexp))))
 	nil
       ;; Much of this copied from GDB complete, but I'm grabbing the stack
       ;; frame instead.
@@ -884,12 +886,13 @@
 	    (gud-gdb-fetch-lines-string nil)
 	    (gud-gdb-fetch-lines-break (or skip 0))
 	    (gud-marker-filter
-	     `(lambda (string) (gud-gdb-fetch-lines-filter string ',gud-marker-filter))))
+	     `(lambda (string)
+		(gud-gdb-fetch-lines-filter string ',gud-marker-filter))))
 	;; Issue the command to GDB.
 	(gud-basic-call command)
 	;; Slurp the output.
 	(while gud-gdb-fetch-lines-in-progress
-	  (accept-process-output (get-buffer-process buffer)))
+	  (accept-process-output (get-buffer-process gud-comint-buffer)))
 	(nreverse gud-gdb-fetched-lines)))))
 
 
@@ -3273,11 +3276,10 @@
     (remove-hook 'tooltip-hook 'gud-tooltip-tips)
     (define-key global-map [mouse-movement] 'ignore)))
   (gud-tooltip-activate-mouse-motions-if-enabled)
-  (if (and
-       gud-comint-buffer
-       (buffer-name gud-comint-buffer); gud-comint-buffer might be killed
-       (with-current-buffer gud-comint-buffer
-	(memq gud-minor-mode '(gdbmi gdba))))
+  (if (and gud-comint-buffer
+	   (buffer-name gud-comint-buffer); gud-comint-buffer might be killed
+	   (memq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
+		 '(gdbmi gdba)))
       (if gud-tooltip-mode
 	  (progn
 	    (dolist (buffer (buffer-list))
--- a/lisp/sort.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/sort.el	Sun Mar 19 19:43:57 2006 +0000
@@ -121,6 +121,9 @@
 (defun sort-build-lists (nextrecfun endrecfun startkeyfun endkeyfun)
   (let ((sort-lists ())
 	(start-rec nil)
+	;; To avoid such functins as `end-of-line' being affected by
+	;; fields.
+	(inhibit-field-text-motion t)
 	done key)
     ;; Loop over sort records.
     ;(goto-char (point-min)) -- it is the caller's responsibility to
--- a/lisp/term/w32-win.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/term/w32-win.el	Sun Mar 19 19:43:57 2006 +0000
@@ -1198,11 +1198,15 @@
 ;; (set-fontset-font nil (make-char 'japanese-jisx0208-1978) '("*" . "JISX0208-SJIS"))
 
 (defun mouse-set-font (&rest fonts)
-  "Select a font.
+  "Select an Emacs font from a list of known good fonts and fontsets.
+
 If `w32-use-w32-font-dialog' is non-nil (the default), use the Windows
-font dialog to get the matching FONTS. Otherwise use a pop-up menu
-\(like Emacs on other platforms) initialized with the fonts in
-`w32-fixed-font-alist'."
+font dialog to display the list of possible fonts.  Otherwise use a
+pop-up menu (like Emacs does on other platforms) initialized with
+the fonts in `w32-fixed-font-alist'.
+If `w32-list-proportional-fonts' is non-nil, add proportional fonts
+to the list in the font selection dialog (the fonts listed by the
+pop-up menu are unaffected by `w32-list-proportional-fonts')."
   (interactive
    (if w32-use-w32-font-dialog
        (let ((chosen-font (w32-select-font (selected-frame)
--- a/lisp/textmodes/ispell.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/textmodes/ispell.el	Sun Mar 19 19:43:57 2006 +0000
@@ -1295,9 +1295,10 @@
     ("^%!PS-Adobe-[123].0"	 . "\n%%EOF\n")
     ("^---* \\(Start of \\)?[Ff]orwarded [Mm]essage"
      . "^---* End of [Ff]orwarded [Mm]essage")
-    ;; Matches e-mail addresses, file names, http addresses, etc.  The `-+'
-    ;; pattern necessary for performance reasons when `-' part of word syntax.
-    ("\\(--+\\|\\(/\\w\\|\\(\\(\\w\\|[-_]\\)+[.:@]\\)\\)\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_~=?&]\\)+\\)+\\)")
+    ;; Matches e-mail addresses, file names, http addresses, etc.  The
+    ;; `-+' `_+' patterns are necessary for performance reasons when
+    ;; `-' or `_' part of word syntax.
+    ("\\(--+\\|_+\\|\\(/\\w\\|\\(\\(\\w\\|[-_]\\)+[.:@]\\)\\)\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_~=?&]\\)+\\)+\\)")
     ;; above checks /.\w sequences
     ;;("\\(--+\\|\\(/\\|\\(\\(\\w\\|[-_]\\)+[.:@]\\)\\)\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_~=?&]\\)+\\)+\\)")
     ;; This is a pretty complex regexp.  It can be simplified to the following:
--- a/lisp/textmodes/org.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/textmodes/org.el	Sun Mar 19 19:43:57 2006 +0000
@@ -5,7 +5,7 @@
 ;; Author: Carsten Dominik <dominik at science dot uva dot nl>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
-;; Version: 4.09
+;; Version: 4.10
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -81,6 +81,9 @@
 ;;
 ;; Changes since version 4.00:
 ;; ---------------------------
+;; Version 4.10
+;;    - Bug fixes.
+;;
 ;; Version 4.09
 ;;    - Bug fixes.
 ;;    - Small improvements to font-lock support.
@@ -145,7 +148,7 @@
 
 ;;; Customization variables
 
-(defvar org-version "4.09"
+(defvar org-version "4.10"
   "The version number of the file org.el.")
 (defun org-version ()
   (interactive)
@@ -445,7 +448,7 @@
 minibuffer will also be active, and you can simply enter the date as well.
 When nil, only the minibuffer will be available."
   :group 'org-time
-  :type 'number)
+  :type 'boolean)
 
 (defcustom org-calendar-follow-timestamp-change t
   "Non-nil means, make the calendar window follow timestamp changes.
@@ -1739,7 +1742,8 @@
   :type 'boolean)
 
 (defface org-hide
-  '((((type tty) (class color)) (:foreground "blue" :weight bold))
+  '(
+    (((type tty) (class color)) (:foreground "white"))
     (((class color) (background light)) (:foreground "white"))
     (((class color) (background dark)) (:foreground "black"))
 ;    (((class color) (background light)) (:foreground "grey90"))
@@ -2589,6 +2593,7 @@
 (define-key org-goto-map [(?q)]     'org-goto-quit)
 (define-key org-goto-map [(control ?g)] 'org-goto-quit)
 (define-key org-goto-map "\C-i" 'org-cycle)
+(define-key org-goto-map [(tab)] 'org-cycle)
 (define-key org-goto-map [(down)] 'outline-next-visible-heading)
 (define-key org-goto-map [(up)] 'outline-previous-visible-heading)
 (define-key org-goto-map "n" 'outline-next-visible-heading)
@@ -4001,8 +4006,8 @@
 		month (string-to-number (match-string 3 ans))
 		day (string-to-number (match-string 4 ans)))
 	  (if (< year 100) (setq year (+ 2000 year)))
-	  (setq ans (replace-match (format "%04d-%02d-%02d" year month day)
-				   t t ans))))
+	  (setq ans (replace-match (format "%04d-%02d-%02d\\5" year month day)
+				   t nil ans))))
     (setq tl (parse-time-string ans)
 	  year (or (nth 5 tl) (string-to-number (format-time-string "%Y")))
 	  month (or (nth 4 tl) (string-to-number (format-time-string "%m")))
@@ -4377,6 +4382,7 @@
    (list 'org-agenda-mode-hook)))
 
 (define-key org-agenda-mode-map "\C-i"     'org-agenda-goto)
+(define-key org-agenda-mode-map [(tab)]    'org-agenda-goto)
 (define-key org-agenda-mode-map "\C-m"     'org-agenda-switch-to)
 (define-key org-agenda-mode-map " "        'org-agenda-show)
 (define-key org-agenda-mode-map "\C-c\C-t" 'org-agenda-todo)
@@ -10801,11 +10807,11 @@
 
 (defun org-insert-centered (s &optional underline)
   "Insert the string S centered and underline it with character UNDERLINE."
-  (let ((ind (max (/ (- 80 (length s)) 2) 0)))
+  (let ((ind (max (/ (- 80 (string-width s)) 2) 0)))
     (insert (make-string ind ?\ ) s "\n")
     (if underline
 	(insert (make-string ind ?\ )
-		(make-string (length s) underline)
+		(make-string (string-width s) underline)
 		"\n"))))
 
 (defun org-ascii-level-start (level title umax)
@@ -11915,6 +11921,7 @@
 
 ;; TAB key with modifiers
 (define-key org-mode-map "\C-i"       'org-cycle)
+(define-key org-mode-map [(tab)]      'org-cycle)
 (define-key org-mode-map [(meta tab)] 'org-complete)
 (define-key org-mode-map "\M-\C-i"    'org-complete)            ; for tty emacs
 ;; The following line is necessary under Suse GNU/Linux
@@ -12925,4 +12932,3 @@
 
 ;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd
 ;;; org.el ends here
-
--- a/lisp/tree-widget.el	Tue Mar 14 12:15:08 2006 +0000
+++ b/lisp/tree-widget.el	Sun Mar 19 19:43:57 2006 +0000
@@ -140,10 +140,9 @@
                  data-directory)))
       (and dir (list dir (expand-file-name "images" dir))))
     )
-  "List of locations where to search for the themes sub-directory.
-Each element is an expression that will be evaluated to return a
-single directory or a list of directories to search.
-
+  "List of locations in which to search for the themes sub-directory.
+Each element is an expression that will be recursively evaluated until
+it returns a single directory or a list of directories.
 The default is to search in the `load-path' first, then in the
 \"images\" sub directory in the data directory, then in the data
 directory.
@@ -152,23 +151,22 @@
 XEmacs.")
 
 (defcustom tree-widget-themes-directory "tree-widget"
-  "*Name of the directory where to look up for image themes.
+  "*Name of the directory in which to look for an image theme.
 When nil use the directory where the tree-widget library is located.
-When a relative name is specified, search in all occurrences of that
-sub directory found in the locations specified in
-`tree-widget-themes-load-path'.
+When it is a relative name, search in all occurrences of that sub
+directory in the path specified by `tree-widget-themes-load-path'.
 The default is to use the \"tree-widget\" relative name."
   :type '(choice (const :tag "Default" "tree-widget")
-                 (const :tag "With the library" nil)
+                 (const :tag "Where is this library" nil)
                  (directory :format "%{%t%}:\n%v"))
   :group 'tree-widget)
 
 (defcustom tree-widget-theme nil
-  "*Name of the theme where to look up for images.
-It must be a sub directory in the directories specified in variable
-`tree-widget-themes-directory'.  The default theme is \"default\".
-When an image is not found in a theme, it is searched in the parent
-theme.
+  "*Name of the theme in which to look for images.
+This is a sub directory of the themes directory specified by the
+`tree-widget-themes-directory' option.
+The default theme is \"default\".  When an image is not found in a
+theme, it is searched in its parent theme.
 
 A complete theme must at least contain images with these file names
 with a supported extension (see also `tree-widget-image-formats'):
--- a/lispref/ChangeLog	Tue Mar 14 12:15:08 2006 +0000
+++ b/lispref/ChangeLog	Sun Mar 19 19:43:57 2006 +0000
@@ -1,3 +1,41 @@
+2006-03-16  Richard Stallman  <rms@gnu.org>
+
+	* display.texi (Defining Images): Minor cleanup.
+
+2006-03-16  Bill Wohler  <wohler@newt.com>
+
+	* display.texi (Defining Images): In image-load-path-for-library,
+	prefer user's images.
+
+2006-03-15  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* modes.texi (Region to Fontify): Remove font-lock-lines-before.
+
+2006-03-15  Bill Wohler  <wohler@newt.com>
+
+	* display.texi (Defining Images): Fix example in
+	image-load-path-for-library by not recommending that one binds
+	image-load-path. Just defvar it to placate compiler and only use
+	it if previously defined.
+
+2006-03-14  Bill Wohler  <wohler@newt.com>
+
+	* display.texi (Defining Images): In image-load-path-for-library,
+	always return list of directories.  Update example.
+
+2006-03-14  Alan Mackenzie  <acm@muc.de>
+
+	* modes.texi: New node, "Region to Fontify" (for Font Lock).
+	This describes font-lock-extend-region-function.
+	("Other Font Lock Variables"): Move "font-lock-lines-before" to
+	the new node "Region to Fontify".
+
+2006-03-13  Richard Stallman  <rms@gnu.org>
+
+	* display.texi (Invisible Text): The impossible position is
+	now before the invisible text, not after.
+	(Defining Images): Clean up last change.
+
 2006-03-11  Bill Wohler  <wohler@newt.com>
 
 	* display.texi (Defining Images): Add image-load-path-for-library.
@@ -86,9 +124,9 @@
 
 2006-02-16  Johan Bockg,Ae(Brd  <bojohan@dd.chalmers.se>
 
-	* display.texi (Other Display Specs, Image Descriptors): Revert
-	erroneous changes.  The previous description of image-descriptors
-	as `(image . PROPS)' was correct.
+	* display.texi (Other Display Specs, Image Descriptors):
+	Revert erroneous changes.  The previous description of
+	image-descriptors as `(image . PROPS)' was correct.
 
 2006-02-14  Richard M. Stallman  <rms@gnu.org>
 
@@ -139,8 +177,8 @@
 
 2006-01-29  Chong Yidong  <cyd@stupidchicken.com>
 
-	* display.texi (Other Display Specs, Image Descriptors): Image
-	description is a list, not a cons cell.
+	* display.texi (Other Display Specs, Image Descriptors):
+	Image description is a list, not a cons cell.
 
 2006-01-28  Luc Teirlinck  <teirllm@auburn.edu>
 
--- a/lispref/display.texi	Tue Mar 14 12:15:08 2006 +0000
+++ b/lispref/display.texi	Sun Mar 19 19:43:57 2006 +0000
@@ -800,15 +800,15 @@
 @code{line-move-ignore-invisible} is non-@code{nil} (the default), but
 only because they are explicitly programmed to do so.
 
-  However, if a command ends with point inside or immediately after
+  However, if a command ends with point inside or immediately before
 invisible text, the main editing loop moves point further forward or
 further backward (in the same direction that the command already moved
 it) until that condition is no longer true.  Thus, if the command
 moved point back into an invisible range, Emacs moves point back to
-the beginning of that range, following the previous visible character.
-If the command moved point forward into an invisible range, Emacs
-moves point forward past the first visible character that follows the
-invisible text.
+the beginning of that range, and then back one more character.  If the
+command moved point forward into an invisible range, Emacs moves point
+forward up to the first visible character that follows the invisible
+text.
 
   Incremental search can make invisible overlays visible temporarily
 and/or permanently when a match includes invisible text.  To enable
@@ -4127,30 +4127,35 @@
 
 @defun image-load-path-for-library library image &optional path no-error
 @tindex image-load-path-for-library
-Return a suitable search path for images relative to @var{library}.
-
-Images for @var{library} are searched for in @file{../../etc/images}
-and @file{../etc/images} relative to the files in
-@file{lisp/@var{library}} as well as in @code{image-load-path} and
-@var{load-path}.
-
-This function returns the value of @code{load-path} augmented with the
-directory containing @var{image}. If @var{path} is given, it is used
-instead of @code{load-path}. If @code{path} is @code{t}, just return
-the directory that contains @var{image}.
-
-If @var{no-error} is non-nil, this function returns @code{nil} if a
-suitable path can't be found rather than signaling an error.
+This function returns a suitable search path for images used by the
+Lisp package @var{library}.
+
+It searches for @var{image} in @code{image-load-path} (excluding
+@file{@code{data-directory}/images}) and @code{load-path}, followed by
+a path suitable for @var{library}, which includes
+@file{../../etc/images} and @file{../etc/images} relative to the
+library file itself, and then in @file{@code{data-directory}/images}.
+
+Then this function returns a list of directories which contains first
+the directory in which @var{image} was found, followed by the value of
+@code{load-path}.  If @var{path} is given, it is used instead of
+@code{load-path}.
+
+If @var{no-error} is non-@code{nil} and a suitable path can't be
+found, don't signal an error.  Instead, return a list of directories as
+before, except that @code{nil} appears in place of the image directory.
 
 Here is an example that uses a common idiom to provide compatibility
 with versions of Emacs that lack the variable @code{image-load-path}:
 
 @example
-(let ((load-path
-       (image-load-path-for-library "mh-e" "mh-logo.xpm"))
-      (image-load-path
-       (image-load-path-for-library "mh-e" "mh-logo.xpm"
-                                    'image-load-path)))
+;; Shush compiler.
+(defvar image-load-path)
+
+(let* ((load-path (image-load-path-for-library "mh-e" "mh-logo.xpm"))
+       (image-load-path (cons (car load-path)
+                              (when (boundp 'image-load-path)
+                                image-load-path))))
   (mh-tool-bar-folder-buttons-init))
 @end example
 @end defun
--- a/lispref/modes.texi	Tue Mar 14 12:15:08 2006 +0000
+++ b/lispref/modes.texi	Sun Mar 19 19:43:57 2006 +0000
@@ -2337,6 +2337,8 @@
 * Font Lock Basics::            Overview of customizing Font Lock.
 * Search-based Fontification::  Fontification based on regexps.
 * Customizing Keywords::        Customizing search-based fontification.
+* Region to Fontify::           Controlling which region gets refontified
+                                  after a buffer change.
 * Other Font Lock Variables::   Additional customization facilities.
 * Levels of Font Lock::         Each mode can define alternative levels
                                   so that the user can select more or less.
@@ -2717,6 +2719,36 @@
       font-lock-keyword-face)))))
 @end smallexample
 
+@node Region to Fontify
+@subsection Region to Fontify after a Buffer Change
+
+  When a buffer is changed, the region that Font Lock refontifies is by
+default the smallest sequence of whole lines that spans the change.
+While this works well most of the time, sometimes it doesn't---for
+example, when a buffer change has changed the syntactic meaning of text
+on an earlier line.
+
+You can enlarge (or even reduce) the region to fontify by setting either
+of the following variables:
+
+@defvar font-lock-extend-region-function
+This buffer-local variable is either @code{nil} or is a function that
+determines the region to fontify, which Emacs then calls after each
+buffer change.
+
+The function is given three parameters, the standard @var{beg},
+@var{end}, and @var{old-len} from after-change-functions (@pxref{Change
+Hooks}).  It should return either a cons of the beginning and end buffer
+positions (in that order) of the region to fontify, or @code{nil} (which
+directs the caller to fontify the default region).  This function need
+not preserve point or the match-data, but must preserve the current
+restriction.  The region it returns may start or end in the middle of a
+line.
+
+Since this function is called after every buffer change, it should be
+reasonably fast.
+@end defvar
+
 @node Other Font Lock Variables
 @subsection Other Font Lock Variables
 
@@ -2772,14 +2804,6 @@
 @code{font-lock-default-unfontify-region}.
 @end defvar
 
-@defvar font-lock-lines-before
-This variable specifies the number of extra lines to consider when
-refontifying the buffer after each text change.  Font lock begins
-refontifying from that number of lines before the changed region.  The
-default is 0, but using a larger value can be useful for coping with
-multi-line patterns.
-@end defvar
-
 @ignore
 @defvar font-lock-inhibit-thing-lock
 List of Font Lock mode related modes that should not be turned on.
--- a/man/ChangeLog	Tue Mar 14 12:15:08 2006 +0000
+++ b/man/ChangeLog	Sun Mar 19 19:43:57 2006 +0000
@@ -1,3 +1,56 @@
+2006-03-17  Bill Wohler  <wohler@newt.com>
+
+	* mh-e.texi: Use smallexample and smalllisp consistenly.
+	(Sending Mail Tour): Update method of entering
+	addresses and subject.
+	(Sending Mail Tour, Reading Mail Tour, Processing Mail Tour)
+	(Adding Attachments, Searching): Update screenshots for Emacs 22.
+
+2006-03-16  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* emacs-xtra.texi (Top): Avoid ugly continuation line in
+	menu in the standalone Info reader.
+
+2006-03-15  Chong Yidong  <cyd@stupidchicken.com>
+
+	* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
+	moved here from Emacs manual.
+
+	* programs.texi (Fortran): Section moved to emacs-xtra.
+	(Program Modes): Xref to Fortran in emacs-xtra.
+
+	* maintaining.texi (Emerge): Moved to emacs-xtra.
+	* files.texi (Comparing Files): Xref to Emerge in emacs-xtra.
+
+	* picture.texi: File deleted.
+	* Makefile.in:
+	* makefile.w32-in: Remove picture.texi.
+
+	* text.texi (Text): Xref to Picture Mode in emacs-xtra.
+	* abbrevs.texi (Abbrevs):
+	* sending.texi (Sending Mail): Picture node removed.
+
+	* emacs.texi (Top): Update node listings.
+
+2006-03-15  Carsten Dominik  <dominik@science.uva.nl>
+
+	* org.texi: Version number change only.
+
+2006-03-14  Bill Wohler  <wohler@newt.com>
+
+	* mh-e.texi: Add index entries around each paragraph rather than
+	depend on entries from beginning of node. Doing so ensures that
+	index entries are less likely to be forgotten if text is cut and
+	pasted, and are necessary anyway if the references are on a
+	separate page. It seems that makeinfo is now (v. 4.8) only
+	producing one index entry per node, so there is no longer any
+	excuse not to. Use subheading instead of heading. The incorrect
+	use of heading produced very large fonts in Info--as large as the
+	main heading.
+	(From Bill Wohler): MH-E never did appear in Emacs 21--MH-E
+	versions 6 and 7 appeared *around* the time of these Emacs
+	releases.
+
 2006-03-13  Carsten Dominik  <dominik@science.uva.nl>
 
 	* org.texi (Clean view): Document new startup options.
--- a/man/Makefile.in	Tue Mar 14 12:15:08 2006 +0000
+++ b/man/Makefile.in	Sun Mar 19 19:43:57 2006 +0000
@@ -89,7 +89,6 @@
 	${srcdir}/building.texi \
 	${srcdir}/maintaining.texi \
 	${srcdir}/abbrevs.texi \
-	${srcdir}/picture.texi \
 	${srcdir}/sending.texi \
 	${srcdir}/rmail.texi \
 	${srcdir}/dired.texi \
--- a/man/abbrevs.texi	Tue Mar 14 12:15:08 2006 +0000
+++ b/man/abbrevs.texi	Sun Mar 19 19:43:57 2006 +0000
@@ -2,7 +2,7 @@
 @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2002, 2003,
 @c   2004, 2005, 2006 Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
-@node Abbrevs, Picture, Maintaining, Top
+@node Abbrevs, Sending Mail, Maintaining, Top
 @chapter Abbrevs
 @cindex abbrevs
 @cindex expansion (of abbrevs)
--- a/man/emacs-xtra.texi	Tue Mar 14 12:15:08 2006 +0000
+++ b/man/emacs-xtra.texi	Sun Mar 19 19:43:57 2006 +0000
@@ -59,6 +59,11 @@
 * Autorevert::                    Auto Reverting non-file buffers.
 * Subdir switches::               Subdirectory switches in Dired.
 * Advanced Calendar/Diary Usage:: Advanced Calendar/Diary customization.
+* Emerge::                        A convenient way of merging two versions
+                                    of a program.
+* Picture Mode::                  Editing pictures made up of characters
+                                    using the quarter-plane screen model.
+* Fortran::                       Fortran mode and its special features.
 * Index::
 @end menu
 
@@ -1222,6 +1227,1184 @@
 If one of these functions decides that it applies to a certain date,
 it returns a value that contains @var{mark}.
 
+@node Emerge
+@chapter Merging Files with Emerge
+@cindex Emerge
+@cindex merging files
+
+  It's not unusual for programmers to get their signals crossed and
+modify the same program in two different directions.  To recover from
+this confusion, you need to merge the two versions.  Emerge makes this
+easier.  For other ways to compare files, see @ref{Comparing Files,,,
+emacs, the Emacs Manual} and @ref{Top, Ediff,, ediff, The Ediff
+Manual}.
+
+@menu
+* Overview of Emerge::	How to start Emerge.  Basic concepts.
+* Submodes of Emerge::	Fast mode vs. Edit mode.
+			  Skip Prefers mode and Auto Advance mode.
+* State of Difference::	You do the merge by specifying state A or B
+			  for each difference.
+* Merge Commands::	Commands for selecting a difference,
+			  changing states of differences, etc.
+* Exiting Emerge::	What to do when you've finished the merge.
+* Combining in Emerge::	    How to keep both alternatives for a difference.
+* Fine Points of Emerge::   Misc.
+@end menu
+
+@node Overview of Emerge
+@section Overview of Emerge
+
+  To start Emerge, run one of these four commands:
+
+@table @kbd
+@item M-x emerge-files
+@findex emerge-files
+Merge two specified files.
+
+@item M-x emerge-files-with-ancestor
+@findex emerge-files-with-ancestor
+Merge two specified files, with reference to a common ancestor.
+
+@item M-x emerge-buffers
+@findex emerge-buffers
+Merge two buffers.
+
+@item M-x emerge-buffers-with-ancestor
+@findex emerge-buffers-with-ancestor
+Merge two buffers with reference to a common ancestor in a third
+buffer.
+@end table
+
+@cindex merge buffer (Emerge)
+@cindex A and B buffers (Emerge)
+  The Emerge commands compare two files or buffers, and display the
+comparison in three buffers: one for each input text (the @dfn{A buffer}
+and the @dfn{B buffer}), and one (the @dfn{merge buffer}) where merging
+takes place.  The merge buffer shows the full merged text, not just the
+differences.  Wherever the two input texts differ, you can choose which
+one of them to include in the merge buffer.
+
+  The Emerge commands that take input from existing buffers use only
+the accessible portions of those buffers, if they are narrowed.
+@xref{Narrowing,,, emacs, the Emacs Manual}.
+
+
+  If a common ancestor version is available, from which the two texts to
+be merged were both derived, Emerge can use it to guess which
+alternative is right.  Wherever one current version agrees with the
+ancestor, Emerge presumes that the other current version is a deliberate
+change which should be kept in the merged version.  Use the
+@samp{with-ancestor} commands if you want to specify a common ancestor
+text.  These commands read three file or buffer names---variant A,
+variant B, and the common ancestor.
+
+  After the comparison is done and the buffers are prepared, the
+interactive merging starts.  You control the merging by typing special
+@dfn{merge commands} in the merge buffer (@pxref{Merge Commands}).
+For each run of differences between the input texts, you can choose
+which one of them to keep, or edit them both together.
+
+  The merge buffer uses a special major mode, Emerge mode, with commands
+for making these choices.  But you can also edit the buffer with
+ordinary Emacs commands.
+
+  At any given time, the attention of Emerge is focused on one
+particular difference, called the @dfn{selected} difference.  This
+difference is marked off in the three buffers like this:
+
+@example
+vvvvvvvvvvvvvvvvvvvv
+@var{text that differs}
+^^^^^^^^^^^^^^^^^^^^
+@end example
+
+@noindent
+Emerge numbers all the differences sequentially and the mode
+line always shows the number of the selected difference.
+
+  Normally, the merge buffer starts out with the A version of the text.
+But when the A version of a difference agrees with the common ancestor,
+then the B version is initially preferred for that difference.
+
+  Emerge leaves the merged text in the merge buffer when you exit.  At
+that point, you can save it in a file with @kbd{C-x C-w}.  If you give a
+numeric argument to @code{emerge-files} or
+@code{emerge-files-with-ancestor}, it reads the name of the output file
+using the minibuffer.  (This is the last file name those commands read.)
+Then exiting from Emerge saves the merged text in the output file.
+
+  Normally, Emerge commands save the output buffer in its file when you
+exit.  If you abort Emerge with @kbd{C-]}, the Emerge command does not
+save the output buffer, but you can save it yourself if you wish.
+
+@node Submodes of Emerge
+@section Submodes of Emerge
+
+  You can choose between two modes for giving merge commands: Fast mode
+and Edit mode.  In Fast mode, basic merge commands are single
+characters, but ordinary Emacs commands are disabled.  This is
+convenient if you use only merge commands.  In Edit mode, all merge
+commands start with the prefix key @kbd{C-c C-c}, and the normal Emacs
+commands are also available.  This allows editing the merge buffer, but
+slows down Emerge operations.
+
+  Use @kbd{e} to switch to Edit mode, and @kbd{C-c C-c f} to switch to
+Fast mode.  The mode line indicates Edit and Fast modes with @samp{E}
+and @samp{F}.
+
+  Emerge has two additional submodes that affect how particular merge
+commands work: Auto Advance mode and Skip Prefers mode.
+
+  If Auto Advance mode is in effect, the @kbd{a} and @kbd{b} commands
+advance to the next difference.  This lets you go through the merge
+faster as long as you simply choose one of the alternatives from the
+input.  The mode line indicates Auto Advance mode with @samp{A}.
+
+  If Skip Prefers mode is in effect, the @kbd{n} and @kbd{p} commands
+skip over differences in states prefer-A and prefer-B (@pxref{State of
+Difference}).  Thus you see only differences for which neither version
+is presumed ``correct.''  The mode line indicates Skip Prefers mode with
+@samp{S}.
+
+@findex emerge-auto-advance-mode
+@findex emerge-skip-prefers-mode
+  Use the command @kbd{s a} (@code{emerge-auto-advance-mode}) to set or
+clear Auto Advance mode.  Use @kbd{s s}
+(@code{emerge-skip-prefers-mode}) to set or clear Skip Prefers mode.
+These commands turn on the mode with a positive argument, turns it off
+with a negative or zero argument, and toggle the mode with no argument.
+
+@node State of Difference
+@section State of a Difference
+
+  In the merge buffer, a difference is marked with lines of @samp{v} and
+@samp{^} characters.  Each difference has one of these seven states:
+
+@table @asis
+@item A
+The difference is showing the A version.  The @kbd{a} command always
+produces this state; the mode line indicates it with @samp{A}.
+
+@item B
+The difference is showing the B version.  The @kbd{b} command always
+produces this state; the mode line indicates it with @samp{B}.
+
+@item default-A
+@itemx default-B
+The difference is showing the A or the B state by default, because you
+haven't made a choice.  All differences start in the default-A state
+(and thus the merge buffer is a copy of the A buffer), except those for
+which one alternative is ``preferred'' (see below).
+
+When you select a difference, its state changes from default-A or
+default-B to plain A or B.  Thus, the selected difference never has
+state default-A or default-B, and these states are never displayed in
+the mode line.
+
+The command @kbd{d a} chooses default-A as the default state, and @kbd{d
+b} chooses default-B.  This chosen default applies to all differences
+which you haven't ever selected and for which no alternative is preferred.
+If you are moving through the merge sequentially, the differences you
+haven't selected are those following the selected one.  Thus, while
+moving sequentially, you can effectively make the A version the default
+for some sections of the merge buffer and the B version the default for
+others by using @kbd{d a} and @kbd{d b} between sections.
+
+@item prefer-A
+@itemx prefer-B
+The difference is showing the A or B state because it is
+@dfn{preferred}.  This means that you haven't made an explicit choice,
+but one alternative seems likely to be right because the other
+alternative agrees with the common ancestor.  Thus, where the A buffer
+agrees with the common ancestor, the B version is preferred, because
+chances are it is the one that was actually changed.
+
+These two states are displayed in the mode line as @samp{A*} and @samp{B*}.
+
+@item combined
+The difference is showing a combination of the A and B states, as a
+result of the @kbd{x c} or @kbd{x C} commands.
+
+Once a difference is in this state, the @kbd{a} and @kbd{b} commands
+don't do anything to it unless you give them a numeric argument.
+
+The mode line displays this state as @samp{comb}.
+@end table
+
+@node Merge Commands
+@section Merge Commands
+
+  Here are the Merge commands for Fast mode; in Edit mode, precede them
+with @kbd{C-c C-c}:
+
+@table @kbd
+@item p
+Select the previous difference.
+
+@item n
+Select the next difference.
+
+@item a
+Choose the A version of this difference.
+
+@item b
+Choose the B version of this difference.
+
+@item C-u @var{n} j
+Select difference number @var{n}.
+
+@item .
+Select the difference containing point.  You can use this command in the
+merge buffer or in the A or B buffer.
+
+@item q
+Quit---finish the merge.
+
+@item C-]
+Abort---exit merging and do not save the output.
+
+@item f
+Go into Fast mode.  (In Edit mode, this is actually @kbd{C-c C-c f}.)
+
+@item e
+Go into Edit mode.
+
+@item l
+Recenter (like @kbd{C-l}) all three windows.
+
+@item -
+Specify part of a prefix numeric argument.
+
+@item @var{digit}
+Also specify part of a prefix numeric argument.
+
+@item d a
+Choose the A version as the default from here down in
+the merge buffer.
+
+@item d b
+Choose the B version as the default from here down in
+the merge buffer.
+
+@item c a
+Copy the A version of this difference into the kill ring.
+
+@item c b
+Copy the B version of this difference into the kill ring.
+
+@item i a
+Insert the A version of this difference at point.
+
+@item i b
+Insert the B version of this difference at point.
+
+@item m
+Put point and mark around the difference.
+
+@item ^
+Scroll all three windows down (like @kbd{M-v}).
+
+@item v
+Scroll all three windows up (like @kbd{C-v}).
+
+@item <
+Scroll all three windows left (like @kbd{C-x <}).
+
+@item >
+Scroll all three windows right (like @kbd{C-x >}).
+
+@item |
+Reset horizontal scroll on all three windows.
+
+@item x 1
+Shrink the merge window to one line.  (Use @kbd{C-u l} to restore it
+to full size.)
+
+@item x c
+Combine the two versions of this difference (@pxref{Combining in
+Emerge}).
+
+@item x f
+Show the names of the files/buffers Emerge is operating on, in a Help
+window.  (Use @kbd{C-u l} to restore windows.)
+
+@item x j
+Join this difference with the following one.
+(@kbd{C-u x j} joins this difference with the previous one.)
+
+@item x s
+Split this difference into two differences.  Before you use this
+command, position point in each of the three buffers at the place where
+you want to split the difference.
+
+@item x t
+Trim identical lines off the top and bottom of the difference.
+Such lines occur when the A and B versions are
+identical but differ from the ancestor version.
+@end table
+
+@node Exiting Emerge
+@section Exiting Emerge
+
+  The @kbd{q} command (@code{emerge-quit}) finishes the merge, storing
+the results into the output file if you specified one.  It restores the
+A and B buffers to their proper contents, or kills them if they were
+created by Emerge and you haven't changed them.  It also disables the
+Emerge commands in the merge buffer, since executing them later could
+damage the contents of the various buffers.
+
+  @kbd{C-]} aborts the merge.  This means exiting without writing the
+output file.  If you didn't specify an output file, then there is no
+real difference between aborting and finishing the merge.
+
+  If the Emerge command was called from another Lisp program, then its
+return value is @code{t} for successful completion, or @code{nil} if you
+abort.
+
+@node Combining in Emerge
+@section Combining the Two Versions
+
+  Sometimes you want to keep @emph{both} alternatives for a particular
+difference.  To do this, use @kbd{x c}, which edits the merge buffer
+like this:
+
+@example
+@group
+#ifdef NEW
+@var{version from A buffer}
+#else /* not NEW */
+@var{version from B buffer}
+#endif /* not NEW */
+@end group
+@end example
+
+@noindent
+@vindex emerge-combine-versions-template
+While this example shows C preprocessor conditionals delimiting the two
+alternative versions, you can specify the strings to use by setting
+the variable @code{emerge-combine-versions-template} to a string of your
+choice.  In the string, @samp{%a} says where to put version A, and
+@samp{%b} says where to put version B.  The default setting, which
+produces the results shown above, looks like this:
+
+@example
+@group
+"#ifdef NEW\n%a#else /* not NEW */\n%b#endif /* not NEW */\n"
+@end group
+@end example
+
+@node Fine Points of Emerge
+@section Fine Points of Emerge
+
+  During the merge, you mustn't try to edit the A and B buffers yourself.
+Emerge modifies them temporarily, but ultimately puts them back the way
+they were.
+
+  You can have any number of merges going at once---just don't use any one
+buffer as input to more than one merge at once, since the temporary
+changes made in these buffers would get in each other's way.
+
+  Starting Emerge can take a long time because it needs to compare the
+files fully.  Emacs can't do anything else until @code{diff} finishes.
+Perhaps in the future someone will change Emerge to do the comparison in
+the background when the input files are large---then you could keep on
+doing other things with Emacs until Emerge is ready to accept
+commands.
+
+@vindex emerge-startup-hook
+  After setting up the merge, Emerge runs the hook
+@code{emerge-startup-hook}.  @xref{Hooks,,, emacs, the Emacs Manual}.
+
+@node Picture Mode
+@chapter Editing Pictures
+@cindex pictures
+@cindex making pictures out of text characters
+@findex edit-picture
+
+  To edit a picture made out of text characters (for example, a picture
+of the division of a register into fields, as a comment in a program),
+use the command @kbd{M-x edit-picture} to enter Picture mode.
+
+  In Picture mode, editing is based on the @dfn{quarter-plane} model of
+text, according to which the text characters lie studded on an area that
+stretches infinitely far to the right and downward.  The concept of the end
+of a line does not exist in this model; the most you can say is where the
+last nonblank character on the line is found.
+
+  Of course, Emacs really always considers text as a sequence of
+characters, and lines really do have ends.  But Picture mode replaces
+the most frequently-used commands with variants that simulate the
+quarter-plane model of text.  They do this by inserting spaces or by
+converting tabs to spaces.
+
+  Most of the basic editing commands of Emacs are redefined by Picture mode
+to do essentially the same thing but in a quarter-plane way.  In addition,
+Picture mode defines various keys starting with the @kbd{C-c} prefix to
+run special picture editing commands.
+
+  One of these keys, @kbd{C-c C-c}, is particularly important.  Often a
+picture is part of a larger file that is usually edited in some other
+major mode.  @kbd{M-x edit-picture} records the name of the previous
+major mode so you can use the @kbd{C-c C-c} command
+(@code{picture-mode-exit}) later to go back to that mode.  @kbd{C-c C-c}
+also deletes spaces from the ends of lines, unless given a numeric
+argument.
+
+  The special commands of Picture mode all work in other modes (provided
+the @file{picture} library is loaded), but are not bound to keys except
+in Picture mode.  The descriptions below talk of moving ``one column''
+and so on, but all the picture mode commands handle numeric arguments as
+their normal equivalents do.
+
+@vindex picture-mode-hook
+  Turning on Picture mode runs the hook @code{picture-mode-hook}.
+Additional extensions to Picture mode can be found in
+@file{artist.el}.
+
+@menu
+* Basic Picture::         Basic concepts and simple commands of Picture Mode.
+* Insert in Picture::     Controlling direction of cursor motion
+                            after "self-inserting" characters.
+* Tabs in Picture::       Various features for tab stops and indentation.
+* Rectangles in Picture:: Clearing and superimposing rectangles.
+@end menu
+
+@node Basic Picture
+@section Basic Editing in Picture Mode
+
+@findex picture-forward-column
+@findex picture-backward-column
+@findex picture-move-down
+@findex picture-move-up
+@cindex editing in Picture mode
+
+  Most keys do the same thing in Picture mode that they usually do, but
+do it in a quarter-plane style.  For example, @kbd{C-f} is rebound to
+run @code{picture-forward-column}, a command which moves point one
+column to the right, inserting a space if necessary so that the actual
+end of the line makes no difference.  @kbd{C-b} is rebound to run
+@code{picture-backward-column}, which always moves point left one
+column, converting a tab to multiple spaces if necessary.  @kbd{C-n} and
+@kbd{C-p} are rebound to run @code{picture-move-down} and
+@code{picture-move-up}, which can either insert spaces or convert tabs
+as necessary to make sure that point stays in exactly the same column.
+@kbd{C-e} runs @code{picture-end-of-line}, which moves to after the last
+nonblank character on the line.  There is no need to change @kbd{C-a},
+as the choice of screen model does not affect beginnings of
+lines.
+
+@findex picture-newline
+  Insertion of text is adapted to the quarter-plane screen model
+through the use of Overwrite mode (@pxref{Minor Modes,,, emacs, the
+Emacs Manual}.)  Self-inserting characters replace existing text,
+column by column, rather than pushing existing text to the right.
+@key{RET} runs @code{picture-newline}, which just moves to the
+beginning of the following line so that new text will replace that
+line.
+
+@findex picture-backward-clear-column
+@findex picture-clear-column
+@findex picture-clear-line
+  In Picture mode, the commands that normally delete or kill text,
+instead erase text (replacing it with spaces).  @key{DEL}
+(@code{picture-backward-clear-column}) replaces the preceding
+character with a space rather than removing it; this moves point
+backwards.  @kbd{C-d} (@code{picture-clear-column}) replaces the next
+character or characters with spaces, but does not move point.  (If you
+want to clear characters to spaces and move forward over them, use
+@key{SPC}.)  @kbd{C-k} (@code{picture-clear-line}) really kills the
+contents of lines, but does not delete the newlines from the buffer.
+
+@findex picture-open-line
+  To do actual insertion, you must use special commands.  @kbd{C-o}
+(@code{picture-open-line}) creates a blank line after the current
+line; it never splits a line.  @kbd{C-M-o} (@code{split-line}) makes
+sense in Picture mode, so it is not changed.  @kbd{C-j}
+(@code{picture-duplicate-line}) inserts another line with the same
+contents below the current line.
+
+@kindex C-c C-d @r{(Picture mode)}
+   To do actual deletion in Picture mode, use @kbd{C-w}, @kbd{C-c C-d}
+(which is defined as @code{delete-char}, as @kbd{C-d} is in other
+modes), or one of the picture rectangle commands (@pxref{Rectangles in
+Picture}).
+
+@node Insert in Picture
+@section Controlling Motion after Insert
+
+@findex picture-movement-up
+@findex picture-movement-down
+@findex picture-movement-left
+@findex picture-movement-right
+@findex picture-movement-nw
+@findex picture-movement-ne
+@findex picture-movement-sw
+@findex picture-movement-se
+@kindex C-c < @r{(Picture mode)}
+@kindex C-c > @r{(Picture mode)}
+@kindex C-c ^ @r{(Picture mode)}
+@kindex C-c . @r{(Picture mode)}
+@kindex C-c ` @r{(Picture mode)}
+@kindex C-c ' @r{(Picture mode)}
+@kindex C-c / @r{(Picture mode)}
+@kindex C-c \ @r{(Picture mode)}
+  Since ``self-inserting'' characters in Picture mode overwrite and move
+point, there is no essential restriction on how point should be moved.
+Normally point moves right, but you can specify any of the eight
+orthogonal or diagonal directions for motion after a ``self-inserting''
+character.  This is useful for drawing lines in the buffer.
+
+@table @kbd
+@item C-c <
+@itemx C-c @key{LEFT}
+Move left after insertion (@code{picture-movement-left}).
+@item C-c >
+@itemx C-c @key{RIGHT}
+Move right after insertion (@code{picture-movement-right}).
+@item C-c ^
+@itemx C-c @key{UP}
+Move up after insertion (@code{picture-movement-up}).
+@item C-c .
+@itemx C-c @key{DOWN}
+Move down after insertion (@code{picture-movement-down}).
+@item C-c `
+@itemx C-c @key{HOME}
+Move up and left (``northwest'') after insertion (@code{picture-movement-nw}).
+@item C-c '
+@itemx C-c @key{PAGEUP}
+Move up and right (``northeast'') after insertion
+(@code{picture-movement-ne}).
+@item C-c /
+@itemx C-c @key{END}
+Move down and left (``southwest'') after insertion
+@*(@code{picture-movement-sw}).
+@item C-c \
+@itemx C-c @key{PAGEDOWN}
+Move down and right (``southeast'') after insertion
+@*(@code{picture-movement-se}).
+@end table
+
+@kindex C-c C-f @r{(Picture mode)}
+@kindex C-c C-b @r{(Picture mode)}
+@findex picture-motion
+@findex picture-motion-reverse
+  Two motion commands move based on the current Picture insertion
+direction.  The command @kbd{C-c C-f} (@code{picture-motion}) moves in the
+same direction as motion after ``insertion'' currently does, while @kbd{C-c
+C-b} (@code{picture-motion-reverse}) moves in the opposite direction.
+
+@node Tabs in Picture
+@section Picture Mode Tabs
+
+@kindex M-TAB @r{(Picture mode)}
+@findex picture-tab-search
+@vindex picture-tab-chars
+  Two kinds of tab-like action are provided in Picture mode.  Use
+@kbd{M-@key{TAB}} (@code{picture-tab-search}) for context-based tabbing.
+With no argument, it moves to a point underneath the next
+``interesting'' character that follows whitespace in the previous
+nonblank line.  ``Next'' here means ``appearing at a horizontal position
+greater than the one point starts out at.''  With an argument, as in
+@kbd{C-u M-@key{TAB}}, this command moves to the next such interesting
+character in the current line.  @kbd{M-@key{TAB}} does not change the
+text; it only moves point.  ``Interesting'' characters are defined by
+the variable @code{picture-tab-chars}, which should define a set of
+characters.  The syntax for this variable is like the syntax used inside
+of @samp{[@dots{}]} in a regular expression---but without the @samp{[}
+and the @samp{]}.  Its default value is @code{"!-~"}.
+
+@findex picture-tab
+  @key{TAB} itself runs @code{picture-tab}, which operates based on the
+current tab stop settings; it is the Picture mode equivalent of
+@code{tab-to-tab-stop}.  Normally it just moves point, but with a numeric
+argument it clears the text that it moves over.
+
+@kindex C-c TAB @r{(Picture mode)}
+@findex picture-set-tab-stops
+  The context-based and tab-stop-based forms of tabbing are brought
+together by the command @kbd{C-c @key{TAB}} (@code{picture-set-tab-stops}).
+This command sets the tab stops to the positions which @kbd{M-@key{TAB}}
+would consider significant in the current line.  The use of this command,
+together with @key{TAB}, can get the effect of context-based tabbing.  But
+@kbd{M-@key{TAB}} is more convenient in the cases where it is sufficient.
+
+  It may be convenient to prevent use of actual tab characters in
+pictures.  For example, this prevents @kbd{C-x @key{TAB}} from messing
+up the picture.  You can do this by setting the variable
+@code{indent-tabs-mode} to @code{nil}.
+
+@node Rectangles in Picture
+@section Picture Mode Rectangle Commands
+@cindex rectangles and Picture mode
+@cindex Picture mode and rectangles
+
+  Picture mode defines commands for working on rectangular pieces of
+the text in ways that fit with the quarter-plane model.  The standard
+rectangle commands may also be useful.  @xref{Rectangles,,, emacs, the
+Emacs Manual}.
+
+@table @kbd
+@item C-c C-k
+Clear out the region-rectangle with spaces
+(@code{picture-clear-rectangle}).  With argument, delete the text.
+@item C-c C-w @var{r}
+Similar, but save rectangle contents in register @var{r} first
+(@code{picture-clear-rectangle-to-register}).
+@item C-c C-y
+Copy last killed rectangle into the buffer by overwriting, with upper
+left corner at point (@code{picture-yank-rectangle}).  With argument,
+insert instead.
+@item C-c C-x @var{r}
+Similar, but use the rectangle in register @var{r}
+(@code{picture-yank-rectangle-from-register}).
+@end table
+
+@kindex C-c C-k @r{(Picture mode)}
+@kindex C-c C-w @r{(Picture mode)}
+@findex picture-clear-rectangle
+@findex picture-clear-rectangle-to-register
+  The picture rectangle commands @kbd{C-c C-k}
+(@code{picture-clear-rectangle}) and @kbd{C-c C-w}
+(@code{picture-clear-rectangle-to-register}) differ from the standard
+rectangle commands in that they normally clear the rectangle instead of
+deleting it; this is analogous with the way @kbd{C-d} is changed in Picture
+mode.
+
+  However, deletion of rectangles can be useful in Picture mode, so
+these commands delete the rectangle if given a numeric argument.
+@kbd{C-c C-k} either with or without a numeric argument saves the
+rectangle for @kbd{C-c C-y}.
+
+@kindex C-c C-y @r{(Picture mode)}
+@kindex C-c C-x @r{(Picture mode)}
+@findex picture-yank-rectangle
+@findex picture-yank-rectangle-from-register
+  The Picture mode commands for yanking rectangles differ from the
+standard ones in that they overwrite instead of inserting.  This is
+the same way that Picture mode insertion of other text differs from
+other modes.  @kbd{C-c C-y} (@code{picture-yank-rectangle}) inserts
+(by overwriting) the rectangle that was most recently killed, while
+@kbd{C-c C-x} (@code{picture-yank-rectangle-from-register}) does
+likewise for the rectangle found in a specified register.
+
+@node Fortran
+@chapter Fortran Mode
+@cindex Fortran mode
+@cindex mode, Fortran
+
+  Fortran mode provides special motion commands for Fortran statements
+and subprograms, and indentation commands that understand Fortran
+conventions of nesting, line numbers and continuation statements.
+Fortran mode has support for Auto Fill mode that breaks long lines into
+proper Fortran continuation lines.
+
+  Special commands for comments are provided because Fortran comments
+are unlike those of other languages.  Built-in abbrevs optionally save
+typing when you insert Fortran keywords.
+
+  Use @kbd{M-x fortran-mode} to switch to this major mode.  This
+command runs the hook @code{fortran-mode-hook}.  @xref{Hooks,,, emacs,
+the Emacs Manual}.
+
+@cindex Fortran77 and Fortran90
+@findex f90-mode
+@findex fortran-mode
+  Fortran mode is meant for editing Fortran77 ``fixed format'' (and also
+``tab format'') source code.  For editing the modern Fortran90 or
+Fortran95 ``free format'' source code, use F90 mode (@code{f90-mode}).
+Emacs normally uses Fortran mode for files with extension @samp{.f},
+@samp{.F} or @samp{.for}, and F90 mode for the extension @samp{.f90} and
+@samp{.f95}.  GNU Fortran supports both kinds of format.
+
+@menu
+* Motion: Fortran Motion.	 Moving point by statements or subprograms.
+* Indent: Fortran Indent.	 Indentation commands for Fortran.
+* Comments: Fortran Comments.	 Inserting and aligning comments.
+* Autofill: Fortran Autofill.	 Auto fill support for Fortran.
+* Columns: Fortran Columns.	 Measuring columns for valid Fortran.
+* Abbrev: Fortran Abbrev.	 Built-in abbrevs for Fortran keywords.
+@end menu
+
+@node Fortran Motion
+@section Motion Commands
+
+  In addition to the normal commands for moving by and operating on
+``defuns'' (Fortran subprograms---functions and subroutines, as well as
+modules for F90 mode), Fortran mode provides special commands to move by
+statements and other program units.
+
+@table @kbd
+@kindex C-c C-n @r{(Fortran mode)}
+@findex fortran-next-statement
+@findex f90-next-statement
+@item C-c C-n
+Move to the beginning of the next statement
+(@code{fortran-next-statement}/@code{f90-next-statement}).
+
+@kindex C-c C-p @r{(Fortran mode)}
+@findex fortran-previous-statement
+@findex f90-previous-statement
+@item C-c C-p
+Move to the beginning of the previous statement
+(@code{fortran-previous-statement}/@code{f90-previous-statement}).
+If there is no previous statement (i.e. if called from the first
+statement in the buffer), move to the start of the buffer.
+
+@kindex C-c C-e @r{(F90 mode)}
+@findex f90-next-block
+@item C-c C-e
+Move point forward to the start of the next code block
+(@code{f90-next-block}).  A code block is a subroutine,
+@code{if}--@code{endif} statement, and so forth.  This command exists
+for F90 mode only, not Fortran mode.  With a numeric argument, this
+moves forward that many blocks.
+
+@kindex C-c C-a @r{(F90 mode)}
+@findex f90-previous-block
+@item C-c C-a
+Move point backward to the previous code block
+(@code{f90-previous-block}).  This is like @code{f90-next-block}, but
+moves backwards.
+
+@kindex C-M-n @r{(Fortran mode)}
+@findex fortran-end-of-block
+@findex f90-end-of-block
+@item C-M-n
+Move to the end of the current code block
+(@code{fortran-end-of-block}/@code{f90-end-of-block}).  With a numeric
+agument, move forward that number of blocks.  The mark is set before
+moving point.  The F90 mode version of this command checks for
+consistency of block types and labels (if present), but it does not
+check the outermost block since that may be incomplete.
+
+@kindex C-M-p @r{(Fortran mode)}
+@findex fortran-beginning-of-block
+@findex f90-beginning-of-block
+@item C-M-p
+Move to the start of the current code block
+(@code{fortran-beginning-of-block}/@code{f90-beginning-of-block}). This
+is like @code{fortran-end-of-block}, but moves backwards.
+@end table
+
+@node Fortran Indent
+@section Fortran Indentation
+
+  Special commands and features are needed for indenting Fortran code in
+order to make sure various syntactic entities (line numbers, comment line
+indicators and continuation line flags) appear in the columns that are
+required for standard, fixed (or tab) format Fortran.
+
+@menu
+* Commands: ForIndent Commands.  Commands for indenting and filling Fortran.
+* Contline: ForIndent Cont.      How continuation lines indent.
+* Numbers:  ForIndent Num.       How line numbers auto-indent.
+* Conv:     ForIndent Conv.      Conventions you must obey to avoid trouble.
+* Vars:     ForIndent Vars.      Variables controlling Fortran indent style.
+@end menu
+
+@node ForIndent Commands
+@subsection Fortran Indentation and Filling Commands
+
+@table @kbd
+@item C-M-j
+Break the current line at point and set up a continuation line
+(@code{fortran-split-line}).
+@item M-^
+Join this line to the previous line (@code{fortran-join-line}).
+@item C-M-q
+Indent all the lines of the subprogram point is in
+(@code{fortran-indent-subprogram}).
+@item M-q
+Fill a comment block or statement.
+@end table
+
+@kindex C-M-q @r{(Fortran mode)}
+@findex fortran-indent-subprogram
+  The key @kbd{C-M-q} runs @code{fortran-indent-subprogram}, a command
+to reindent all the lines of the Fortran subprogram (function or
+subroutine) containing point.
+
+@kindex C-M-j @r{(Fortran mode)}
+@findex fortran-split-line
+  The key @kbd{C-M-j} runs @code{fortran-split-line}, which splits
+a line in the appropriate fashion for Fortran.  In a non-comment line,
+the second half becomes a continuation line and is indented
+accordingly.  In a comment line, both halves become separate comment
+lines.
+
+@kindex M-^ @r{(Fortran mode)}
+@kindex C-c C-d @r{(Fortran mode)}
+@findex fortran-join-line
+  @kbd{M-^} or @kbd{C-c C-d} runs the command @code{fortran-join-line},
+which joins a continuation line back to the previous line, roughly as
+the inverse of @code{fortran-split-line}.  The point must be on a
+continuation line when this command is invoked.
+
+@kindex M-q @r{(Fortran mode)}
+@kbd{M-q} in Fortran mode fills the comment block or statement that
+point is in.  This removes any excess statement continuations.
+
+@node ForIndent Cont
+@subsection Continuation Lines
+@cindex Fortran continuation lines
+
+@vindex fortran-continuation-string
+  Most Fortran77 compilers allow two ways of writing continuation lines.
+If the first non-space character on a line is in column 5, then that
+line is a continuation of the previous line.  We call this @dfn{fixed
+format}.  (In GNU Emacs we always count columns from 0; but note that
+the Fortran standard counts from 1.)  The variable
+@code{fortran-continuation-string} specifies what character to put in
+column 5.  A line that starts with a tab character followed by any digit
+except @samp{0} is also a continuation line.  We call this style of
+continuation @dfn{tab format}.  (Fortran90 introduced ``free format'',
+with another style of continuation lines).
+
+@vindex indent-tabs-mode @r{(Fortran mode)}
+@vindex fortran-analyze-depth
+@vindex fortran-tab-mode-default
+  Fortran mode can use either style of continuation line.  When you
+enter Fortran mode, it tries to deduce the proper continuation style
+automatically from the buffer contents.  It does this by scanning up to
+@code{fortran-analyze-depth} (default 100) lines from the start of the
+buffer.  The first line that begins with either a tab character or six
+spaces determines the choice.  If the scan fails (for example, if the
+buffer is new and therefore empty), the value of
+@code{fortran-tab-mode-default} (@code{nil} for fixed format, and
+non-@code{nil} for tab format) is used.  @samp{/t} in the mode line
+indicates tab format is selected.  Fortran mode sets the value of
+@code{indent-tabs-mode} accordingly.
+
+  If the text on a line starts with the Fortran continuation marker
+@samp{$}, or if it begins with any non-whitespace character in column
+5, Fortran mode treats it as a continuation line.  When you indent a
+continuation line with @key{TAB}, it converts the line to the current
+continuation style.  When you split a Fortran statement with
+@kbd{C-M-j}, the continuation marker on the newline is created according
+to the continuation style.
+
+  The setting of continuation style affects several other aspects of
+editing in Fortran mode.  In fixed format mode, the minimum column
+number for the body of a statement is 6.  Lines inside of Fortran
+blocks that are indented to larger column numbers always use only the
+space character for whitespace.  In tab format mode, the minimum
+column number for the statement body is 8, and the whitespace before
+column 8 must always consist of one tab character.
+
+@node ForIndent Num
+@subsection Line Numbers
+
+  If a number is the first non-whitespace in the line, Fortran
+indentation assumes it is a line number and moves it to columns 0
+through 4.  (Columns always count from 0 in GNU Emacs.)
+
+@vindex fortran-line-number-indent
+  Line numbers of four digits or less are normally indented one space.
+The variable @code{fortran-line-number-indent} controls this; it
+specifies the maximum indentation a line number can have.  The default
+value of the variable is 1.  Fortran mode tries to prevent line number
+digits passing column 4, reducing the indentation below the specified
+maximum if necessary.  If @code{fortran-line-number-indent} has the
+value 5, line numbers are right-justified to end in column 4.
+
+@vindex fortran-electric-line-number
+  Simply inserting a line number is enough to indent it according to
+these rules.  As each digit is inserted, the indentation is recomputed.
+To turn off this feature, set the variable
+@code{fortran-electric-line-number} to @code{nil}.
+
+
+@node ForIndent Conv
+@subsection Syntactic Conventions
+
+  Fortran mode assumes that you follow certain conventions that simplify
+the task of understanding a Fortran program well enough to indent it
+properly:
+
+@itemize @bullet
+@item
+Two nested @samp{do} loops never share a @samp{continue} statement.
+
+@item
+Fortran keywords such as @samp{if}, @samp{else}, @samp{then}, @samp{do}
+and others are written without embedded whitespace or line breaks.
+
+Fortran compilers generally ignore whitespace outside of string
+constants, but Fortran mode does not recognize these keywords if they
+are not contiguous.  Constructs such as @samp{else if} or @samp{end do}
+are acceptable, but the second word should be on the same line as the
+first and not on a continuation line.
+@end itemize
+
+@noindent
+If you fail to follow these conventions, the indentation commands may
+indent some lines unaesthetically.  However, a correct Fortran program
+retains its meaning when reindented even if the conventions are not
+followed.
+
+@node ForIndent Vars
+@subsection Variables for Fortran Indentation
+
+@vindex fortran-do-indent
+@vindex fortran-if-indent
+@vindex fortran-structure-indent
+@vindex fortran-continuation-indent
+@vindex fortran-check-all-num@dots{}
+@vindex fortran-minimum-statement-indent@dots{}
+  Several additional variables control how Fortran indentation works:
+
+@table @code
+@item fortran-do-indent
+Extra indentation within each level of @samp{do} statement (default 3).
+
+@item fortran-if-indent
+Extra indentation within each level of @samp{if}, @samp{select case}, or
+@samp{where} statements (default 3).
+
+@item fortran-structure-indent
+Extra indentation within each level of @samp{structure}, @samp{union},
+@samp{map}, or @samp{interface} statements (default 3).
+
+@item fortran-continuation-indent
+Extra indentation for bodies of continuation lines (default 5).
+
+@item fortran-check-all-num-for-matching-do
+In Fortran77, a numbered @samp{do} statement is ended by any statement
+with a matching line number.  It is common (but not compulsory) to use a
+@samp{continue} statement for this purpose.  If this variable has a
+non-@code{nil} value, indenting any numbered statement must check for a
+@samp{do} that ends there.  If you always end @samp{do} statements with
+a @samp{continue} line (or if you use the more modern @samp{enddo}),
+then you can speed up indentation by setting this variable to
+@code{nil}.  The default is @code{nil}.
+
+@item fortran-blink-matching-if
+If this is @code{t}, indenting an @samp{endif} (or @samp{enddo}
+statement moves the cursor momentarily to the matching @samp{if} (or
+@samp{do}) statement to show where it is.  The default is @code{nil}.
+
+@item fortran-minimum-statement-indent-fixed
+Minimum indentation for Fortran statements when using fixed format
+continuation line style.  Statement bodies are never indented less than
+this much.  The default is 6.
+
+@item fortran-minimum-statement-indent-tab
+Minimum indentation for Fortran statements for tab format continuation line
+style.  Statement bodies are never indented less than this much.  The
+default is 8.
+@end table
+
+The variables controlling the indentation of comments are described in
+the following section.
+
+@node Fortran Comments
+@section Fortran Comments
+
+  The usual Emacs comment commands assume that a comment can follow a
+line of code.  In Fortran77, the standard comment syntax requires an
+entire line to be just a comment.  Therefore, Fortran mode replaces the
+standard Emacs comment commands and defines some new variables.
+
+@vindex fortran-comment-line-start
+  Fortran mode can also handle the Fortran90 comment syntax where comments
+start with @samp{!} and can follow other text.  Because only some Fortran77
+compilers accept this syntax, Fortran mode will not insert such comments
+unless you have said in advance to do so.  To do this, set the variable
+@code{fortran-comment-line-start} to @samp{"!"}.
+
+@table @kbd
+@item M-;
+Align comment or insert new comment (@code{fortran-indent-comment}).
+
+@item C-x ;
+Applies to nonstandard @samp{!} comments only.
+
+@item C-c ;
+Turn all lines of the region into comments, or (with argument) turn them back
+into real code (@code{fortran-comment-region}).
+@end table
+
+@findex fortran-indent-comment
+  @kbd{M-;} in Fortran mode is redefined as the command
+@code{fortran-indent-comment}.  Like the usual @kbd{M-;} command, this
+recognizes any kind of existing comment and aligns its text appropriately;
+if there is no existing comment, a comment is inserted and aligned.  But
+inserting and aligning comments are not the same in Fortran mode as in
+other modes.
+
+  When a new comment must be inserted, if the current line is blank, a
+full-line comment is inserted.  On a non-blank line, a nonstandard @samp{!}
+comment is inserted if you have said you want to use them.  Otherwise a
+full-line comment is inserted on a new line before the current line.
+
+  Nonstandard @samp{!} comments are aligned like comments in other
+languages, but full-line comments are different.  In a standard full-line
+comment, the comment delimiter itself must always appear in column zero.
+What can be aligned is the text within the comment.  You can choose from
+three styles of alignment by setting the variable
+@code{fortran-comment-indent-style} to one of these values:
+
+@vindex fortran-comment-indent-style
+@vindex fortran-comment-line-extra-indent
+@table @code
+@item fixed
+Align the text at a fixed column, which is the sum of
+@code{fortran-comment-line-extra-indent} and the minimum statement
+indentation.  This is the default.
+
+The minimum statement indentation is
+@code{fortran-minimum-statement-indent-fixed} for fixed format
+continuation line style and @code{fortran-minimum-statement-indent-tab}
+for tab format style.
+
+@item relative
+Align the text as if it were a line of code, but with an additional
+@code{fortran-comment-line-extra-indent} columns of indentation.
+
+@item nil
+Don't move text in full-line comments automatically.
+@end table
+
+@vindex fortran-comment-indent-char
+  In addition, you can specify the character to be used to indent within
+full-line comments by setting the variable
+@code{fortran-comment-indent-char} to the single-character string you want
+to use.
+
+@vindex fortran-directive-re
+  Compiler directive lines, or preprocessor lines, have much the same
+appearance as comment lines.  It is important, though, that such lines
+never be indented at all, no matter what the value of
+@code{fortran-comment-indent-style}.  The variable
+@code{fortran-directive-re} is a regular expression that specifies which
+lines are directives.  Matching lines are never indented, and receive
+distinctive font-locking.
+
+  The normal Emacs comment command @kbd{C-x ;} has not been redefined.  If
+you use @samp{!} comments, this command can be used with them.  Otherwise
+it is useless in Fortran mode.
+
+@kindex C-c ; @r{(Fortran mode)}
+@findex fortran-comment-region
+@vindex fortran-comment-region
+  The command @kbd{C-c ;} (@code{fortran-comment-region}) turns all the
+lines of the region into comments by inserting the string @samp{C$$$} at
+the front of each one.  With a numeric argument, it turns the region
+back into live code by deleting @samp{C$$$} from the front of each line
+in it.  The string used for these comments can be controlled by setting
+the variable @code{fortran-comment-region}.  Note that here we have an
+example of a command and a variable with the same name; these two uses
+of the name never conflict because in Lisp and in Emacs it is always
+clear from the context which one is meant.
+
+@node Fortran Autofill
+@section Auto Fill in Fortran Mode
+
+  Fortran mode has specialized support for Auto Fill mode, which is a
+minor mode that automatically splits statements as you insert them
+when they become too wide.  Splitting a statement involves making
+continuation lines using @code{fortran-continuation-string}
+(@pxref{ForIndent Cont}).  This splitting happens when you type
+@key{SPC}, @key{RET}, or @key{TAB}, and also in the Fortran
+indentation commands.  You activate Auto Fill in Fortran mode in the
+normal way.  @xref{Auto Fill,,, emacs, the Emacs Manual}.
+
+@vindex fortran-break-before-delimiters
+   Auto Fill breaks lines at spaces or delimiters when the lines get
+longer than the desired width (the value of @code{fill-column}).  The
+delimiters (besides whitespace) that Auto Fill can break at are
+@samp{+}, @samp{-}, @samp{/}, @samp{*}, @samp{=}, @samp{<}, @samp{>},
+and @samp{,}.  The line break comes after the delimiter if the
+variable @code{fortran-break-before-delimiters} is @code{nil}.
+Otherwise (and by default), the break comes before the delimiter.
+
+  To enable Auto Fill in all Fortran buffers, add
+@code{turn-on-auto-fill} to @code{fortran-mode-hook}.  @xref{Hooks,,,
+emacs, the Emacs Manual}.
+
+@node Fortran Columns
+@section Checking Columns in Fortran
+
+@table @kbd
+@item C-c C-r
+Display a ``column ruler'' momentarily above the current line
+(@code{fortran-column-ruler}).
+@item C-c C-w
+Split the current window horizontally temporarily so that it is 72
+columns wide (@code{fortran-window-create-momentarily}).  This may
+help you avoid making lines longer than the 72-character limit that
+some Fortran compilers impose.
+@item C-u C-c C-w
+Split the current window horizontally so that it is 72 columns wide
+(@code{fortran-window-create}).  You can then continue editing.
+@item M-x fortran-strip-sequence-nos
+Delete all text in column 72 and beyond.
+@end table
+
+@kindex C-c C-r @r{(Fortran mode)}
+@findex fortran-column-ruler
+  The command @kbd{C-c C-r} (@code{fortran-column-ruler}) shows a column
+ruler momentarily above the current line.  The comment ruler is two lines
+of text that show you the locations of columns with special significance in
+Fortran programs.  Square brackets show the limits of the columns for line
+numbers, and curly brackets show the limits of the columns for the
+statement body.  Column numbers appear above them.
+
+  Note that the column numbers count from zero, as always in GNU Emacs.
+As a result, the numbers may be one less than those you are familiar
+with; but the positions they indicate in the line are standard for
+Fortran.
+
+@vindex fortran-column-ruler-fixed
+@vindex fortran-column-ruler-tabs
+  The text used to display the column ruler depends on the value of the
+variable @code{indent-tabs-mode}.  If @code{indent-tabs-mode} is
+@code{nil}, then the value of the variable
+@code{fortran-column-ruler-fixed} is used as the column ruler.
+Otherwise, the value of the variable @code{fortran-column-ruler-tab} is
+displayed.  By changing these variables, you can change the column ruler
+display.
+
+@kindex C-c C-w @r{(Fortran mode)}
+@findex fortran-window-create-momentarily
+  @kbd{C-c C-w} (@code{fortran-window-create-momentarily}) temporarily
+splits the current window horizontally, making a window 72 columns
+wide, so you can see any lines that are too long.  Type a space to
+restore the normal width.
+
+@kindex C-u C-c C-w @r{(Fortran mode)}
+@findex fortran-window-create
+  You can also split the window horizontally and continue editing with
+the split in place.  To do this, use @kbd{C-u C-c C-w} (@code{M-x
+fortran-window-create}).  By editing in this window you can
+immediately see when you make a line too wide to be correct Fortran.
+
+@findex fortran-strip-sequence-nos
+  The command @kbd{M-x fortran-strip-sequence-nos} deletes all text in
+column 72 and beyond, on all lines in the current buffer.  This is the
+easiest way to get rid of old sequence numbers.
+
+@node Fortran Abbrev
+@section Fortran Keyword Abbrevs
+
+  Fortran mode provides many built-in abbrevs for common keywords and
+declarations.  These are the same sort of abbrev that you can define
+yourself.  To use them, you must turn on Abbrev mode.
+@xref{Abbrevs,,, emacs, the Emacs Manual}.
+
+  The built-in abbrevs are unusual in one way: they all start with a
+semicolon.  You cannot normally use semicolon in an abbrev, but Fortran
+mode makes this possible by changing the syntax of semicolon to ``word
+constituent.''
+
+  For example, one built-in Fortran abbrev is @samp{;c} for
+@samp{continue}.  If you insert @samp{;c} and then insert a punctuation
+character such as a space or a newline, the @samp{;c} expands automatically
+to @samp{continue}, provided Abbrev mode is enabled.@refill
+
+  Type @samp{;?} or @samp{;C-h} to display a list of all the built-in
+Fortran abbrevs and what they stand for.
 
 @node Index
 @unnumbered Index
--- a/man/emacs.texi	Tue Mar 14 12:15:08 2006 +0000
+++ b/man/emacs.texi	Sun Mar 19 19:43:57 2006 +0000
@@ -103,8 +103,6 @@
 Outline Mode
 @TeX{} Mode
 Formatted Text
-Fortran Mode
-Fortran Indentation
 Shell Command History
 
 The ones for Dired and Rmail have had the items turned into :: items
@@ -182,8 +180,6 @@
 * Maintaining::         Features for maintaining large programs.
 * Abbrevs::	        How to define text abbreviations to reduce
 			  the number of characters you must type.
-* Picture::	        Editing pictures made up of characters
-			  using the quarter-plane screen model.
 * Sending Mail::        Sending mail in Emacs.
 * Rmail::	        Reading mail in Emacs.
 * Dired::	        You can ``edit'' a directory to manage files in it.
@@ -525,7 +521,6 @@
 * Misc for Programs::   Other Emacs features useful for editing programs.
 * C Modes::             Special commands of C, C++, Objective-C,
                           Java, and Pike modes.
-* Fortran::             Fortran mode and its special features.
 * Asm Mode::            Asm mode and its special features.
 
 Top-Level Definitions, or Defuns
@@ -572,15 +567,6 @@
 * Other C Commands::    Filling comments, viewing expansion of macros,
                           and other neat features.
 
-Fortran Mode
-
-* Fortran Motion::	Moving point by statements or subprograms.
-* Fortran Indent::	Indentation commands for Fortran.
-* Fortran Comments::	Inserting and aligning comments.
-* Fortran Autofill::	Auto fill minor mode for Fortran.
-* Fortran Columns::	Measuring columns for valid Fortran.
-* Fortran Abbrev::	Built-in abbrevs for Fortran keywords.
-
 Compiling and Testing Programs
 
 * Compilation::		Compiling programs in languages other
@@ -615,7 +601,6 @@
 * Format of ChangeLog:: What the change log file looks like.
 * Tags::	        Go direct to any function in your program in one
 			  command.  Tags remembers which file it is in.
-* Emerge::	        A convenient way of merging two versions of a program.
 
 Tags Tables
 
@@ -627,19 +612,6 @@
 * Tags Search::		Using a tags table for searching and replacing.
 * List Tags::		Listing and finding tags defined in a file.
 
-Merging Files with Emerge
-
-* Overview of Emerge::	How to start Emerge.  Basic concepts.
-* Submodes of Emerge::	Fast mode vs. Edit mode.
-			  Skip Prefers mode and Auto Advance mode.
-* State of Difference::	You do the merge by specifying state A or B
-			  for each difference.
-* Merge Commands::	Commands for selecting a difference,
-			  changing states of differences, etc.
-* Exiting Emerge::	What to do when you've finished the merge.
-* Combining in Emerge::	    How to keep both alternatives for a difference.
-* Fine Points of Emerge::   Misc.
-
 Abbrevs
 
 * Abbrev Concepts::     Fundamentals of defined abbrevs.
@@ -650,14 +622,6 @@
 * Dynamic Abbrevs::     Abbreviations for words already in the buffer.
 * Dabbrev Customization:: What is a word, for dynamic abbrevs.  Case handling.
 
-Editing Pictures
-
-* Basic Picture::	Basic concepts and simple commands of Picture Mode.
-* Insert in Picture::	Controlling direction of cursor motion
-			  after "self-inserting" characters.
-* Tabs in Picture::	Various features for tab stops and indentation.
-* Rectangles in Picture:: Clearing and superimposing rectangles.
-
 Sending Mail
 
 * Mail Format:: 	Format of the mail being composed.
@@ -1179,7 +1143,6 @@
 @include building.texi
 @include maintaining.texi
 @include abbrevs.texi
-@include picture.texi
 @include sending.texi
 @include rmail.texi
 @include dired.texi
--- a/man/files.texi	Tue Mar 14 12:15:08 2006 +0000
+++ b/man/files.texi	Sun Mar 19 19:43:57 2006 +0000
@@ -3037,8 +3037,8 @@
 mode provides commands to resolve conflicts by selecting specific
 changes.
 
-  See also @ref{Emerge}, and @ref{Top,,, ediff, The Ediff Manual}, for
-convenient facilities for merging two similar files.
+  @inforef{Emerge,, emacs-xtra} for the Emerge facility, which
+provides a powerful interface for merging files.
 
 @node Misc File Ops
 @section Miscellaneous File Operations
--- a/man/maintaining.texi	Tue Mar 14 12:15:08 2006 +0000
+++ b/man/maintaining.texi	Sun Mar 19 19:43:57 2006 +0000
@@ -14,7 +14,6 @@
 * Format of ChangeLog:: What the change log file looks like.
 * Tags::	        Go direct to any function in your program in one
 			  command.  Tags remembers which file it is in.
-* Emerge::	        A convenient way of merging two versions of a program.
 @end menu
 
 @node Change Log
@@ -846,393 +845,6 @@
   You can also use the collection of tag names to complete a symbol
 name in the buffer.  @xref{Symbol Completion}.
 
-@node Emerge
-@section Merging Files with Emerge
-@cindex Emerge
-@cindex merging files
-
-  It's not unusual for programmers to get their signals crossed and
-modify the same program in two different directions.  To recover from
-this confusion, you need to merge the two versions.  Emerge makes this
-easier.  See also @ref{Comparing Files}, for other ways to compare
-files, and @ref{Top, Ediff,, ediff, The Ediff Manual}.
-
-@menu
-* Overview of Emerge::	How to start Emerge.  Basic concepts.
-* Submodes of Emerge::	Fast mode vs. Edit mode.
-			  Skip Prefers mode and Auto Advance mode.
-* State of Difference::	You do the merge by specifying state A or B
-			  for each difference.
-* Merge Commands::	Commands for selecting a difference,
-			  changing states of differences, etc.
-* Exiting Emerge::	What to do when you've finished the merge.
-* Combining in Emerge::	    How to keep both alternatives for a difference.
-* Fine Points of Emerge::   Misc.
-@end menu
-
-@node Overview of Emerge
-@subsection Overview of Emerge
-
-  To start Emerge, run one of these four commands:
-
-@table @kbd
-@item M-x emerge-files
-@findex emerge-files
-Merge two specified files.
-
-@item M-x emerge-files-with-ancestor
-@findex emerge-files-with-ancestor
-Merge two specified files, with reference to a common ancestor.
-
-@item M-x emerge-buffers
-@findex emerge-buffers
-Merge two buffers.
-
-@item M-x emerge-buffers-with-ancestor
-@findex emerge-buffers-with-ancestor
-Merge two buffers with reference to a common ancestor in a third
-buffer.
-@end table
-
-@cindex merge buffer (Emerge)
-@cindex A and B buffers (Emerge)
-  The Emerge commands compare two files or buffers, and display the
-comparison in three buffers: one for each input text (the @dfn{A buffer}
-and the @dfn{B buffer}), and one (the @dfn{merge buffer}) where merging
-takes place.  The merge buffer shows the full merged text, not just the
-differences.  Wherever the two input texts differ, you can choose which
-one of them to include in the merge buffer.
-
-  The Emerge commands that take input from existing buffers use only the
-accessible portions of those buffers, if they are narrowed
-(@pxref{Narrowing}).
-
-  If a common ancestor version is available, from which the two texts to
-be merged were both derived, Emerge can use it to guess which
-alternative is right.  Wherever one current version agrees with the
-ancestor, Emerge presumes that the other current version is a deliberate
-change which should be kept in the merged version.  Use the
-@samp{with-ancestor} commands if you want to specify a common ancestor
-text.  These commands read three file or buffer names---variant A,
-variant B, and the common ancestor.
-
-  After the comparison is done and the buffers are prepared, the
-interactive merging starts.  You control the merging by typing special
-@dfn{merge commands} in the merge buffer (@pxref{Merge Commands}).
-For each run of differences between the input texts, you can choose
-which one of them to keep, or edit them both together.
-
-  The merge buffer uses a special major mode, Emerge mode, with commands
-for making these choices.  But you can also edit the buffer with
-ordinary Emacs commands.
-
-  At any given time, the attention of Emerge is focused on one
-particular difference, called the @dfn{selected} difference.  This
-difference is marked off in the three buffers like this:
-
-@example
-vvvvvvvvvvvvvvvvvvvv
-@var{text that differs}
-^^^^^^^^^^^^^^^^^^^^
-@end example
-
-@noindent
-Emerge numbers all the differences sequentially and the mode
-line always shows the number of the selected difference.
-
-  Normally, the merge buffer starts out with the A version of the text.
-But when the A version of a difference agrees with the common ancestor,
-then the B version is initially preferred for that difference.
-
-  Emerge leaves the merged text in the merge buffer when you exit.  At
-that point, you can save it in a file with @kbd{C-x C-w}.  If you give a
-numeric argument to @code{emerge-files} or
-@code{emerge-files-with-ancestor}, it reads the name of the output file
-using the minibuffer.  (This is the last file name those commands read.)
-Then exiting from Emerge saves the merged text in the output file.
-
-  Normally, Emerge commands save the output buffer in its file when you
-exit.  If you abort Emerge with @kbd{C-]}, the Emerge command does not
-save the output buffer, but you can save it yourself if you wish.
-
-@node Submodes of Emerge
-@subsection Submodes of Emerge
-
-  You can choose between two modes for giving merge commands: Fast mode
-and Edit mode.  In Fast mode, basic merge commands are single
-characters, but ordinary Emacs commands are disabled.  This is
-convenient if you use only merge commands.  In Edit mode, all merge
-commands start with the prefix key @kbd{C-c C-c}, and the normal Emacs
-commands are also available.  This allows editing the merge buffer, but
-slows down Emerge operations.
-
-  Use @kbd{e} to switch to Edit mode, and @kbd{C-c C-c f} to switch to
-Fast mode.  The mode line indicates Edit and Fast modes with @samp{E}
-and @samp{F}.
-
-  Emerge has two additional submodes that affect how particular merge
-commands work: Auto Advance mode and Skip Prefers mode.
-
-  If Auto Advance mode is in effect, the @kbd{a} and @kbd{b} commands
-advance to the next difference.  This lets you go through the merge
-faster as long as you simply choose one of the alternatives from the
-input.  The mode line indicates Auto Advance mode with @samp{A}.
-
-  If Skip Prefers mode is in effect, the @kbd{n} and @kbd{p} commands
-skip over differences in states prefer-A and prefer-B (@pxref{State of
-Difference}).  Thus you see only differences for which neither version
-is presumed ``correct.''  The mode line indicates Skip Prefers mode with
-@samp{S}.
-
-@findex emerge-auto-advance-mode
-@findex emerge-skip-prefers-mode
-  Use the command @kbd{s a} (@code{emerge-auto-advance-mode}) to set or
-clear Auto Advance mode.  Use @kbd{s s}
-(@code{emerge-skip-prefers-mode}) to set or clear Skip Prefers mode.
-These commands turn on the mode with a positive argument, turns it off
-with a negative or zero argument, and toggle the mode with no argument.
-
-@node State of Difference
-@subsection State of a Difference
-
-  In the merge buffer, a difference is marked with lines of @samp{v} and
-@samp{^} characters.  Each difference has one of these seven states:
-
-@table @asis
-@item A
-The difference is showing the A version.  The @kbd{a} command always
-produces this state; the mode line indicates it with @samp{A}.
-
-@item B
-The difference is showing the B version.  The @kbd{b} command always
-produces this state; the mode line indicates it with @samp{B}.
-
-@item default-A
-@itemx default-B
-The difference is showing the A or the B state by default, because you
-haven't made a choice.  All differences start in the default-A state
-(and thus the merge buffer is a copy of the A buffer), except those for
-which one alternative is ``preferred'' (see below).
-
-When you select a difference, its state changes from default-A or
-default-B to plain A or B.  Thus, the selected difference never has
-state default-A or default-B, and these states are never displayed in
-the mode line.
-
-The command @kbd{d a} chooses default-A as the default state, and @kbd{d
-b} chooses default-B.  This chosen default applies to all differences
-which you haven't ever selected and for which no alternative is preferred.
-If you are moving through the merge sequentially, the differences you
-haven't selected are those following the selected one.  Thus, while
-moving sequentially, you can effectively make the A version the default
-for some sections of the merge buffer and the B version the default for
-others by using @kbd{d a} and @kbd{d b} between sections.
-
-@item prefer-A
-@itemx prefer-B
-The difference is showing the A or B state because it is
-@dfn{preferred}.  This means that you haven't made an explicit choice,
-but one alternative seems likely to be right because the other
-alternative agrees with the common ancestor.  Thus, where the A buffer
-agrees with the common ancestor, the B version is preferred, because
-chances are it is the one that was actually changed.
-
-These two states are displayed in the mode line as @samp{A*} and @samp{B*}.
-
-@item combined
-The difference is showing a combination of the A and B states, as a
-result of the @kbd{x c} or @kbd{x C} commands.
-
-Once a difference is in this state, the @kbd{a} and @kbd{b} commands
-don't do anything to it unless you give them a numeric argument.
-
-The mode line displays this state as @samp{comb}.
-@end table
-
-@node Merge Commands
-@subsection Merge Commands
-
-  Here are the Merge commands for Fast mode; in Edit mode, precede them
-with @kbd{C-c C-c}:
-
-@table @kbd
-@item p
-Select the previous difference.
-
-@item n
-Select the next difference.
-
-@item a
-Choose the A version of this difference.
-
-@item b
-Choose the B version of this difference.
-
-@item C-u @var{n} j
-Select difference number @var{n}.
-
-@item .
-Select the difference containing point.  You can use this command in the
-merge buffer or in the A or B buffer.
-
-@item q
-Quit---finish the merge.
-
-@item C-]
-Abort---exit merging and do not save the output.
-
-@item f
-Go into Fast mode.  (In Edit mode, this is actually @kbd{C-c C-c f}.)
-
-@item e
-Go into Edit mode.
-
-@item l
-Recenter (like @kbd{C-l}) all three windows.
-
-@item -
-Specify part of a prefix numeric argument.
-
-@item @var{digit}
-Also specify part of a prefix numeric argument.
-
-@item d a
-Choose the A version as the default from here down in
-the merge buffer.
-
-@item d b
-Choose the B version as the default from here down in
-the merge buffer.
-
-@item c a
-Copy the A version of this difference into the kill ring.
-
-@item c b
-Copy the B version of this difference into the kill ring.
-
-@item i a
-Insert the A version of this difference at point.
-
-@item i b
-Insert the B version of this difference at point.
-
-@item m
-Put point and mark around the difference.
-
-@item ^
-Scroll all three windows down (like @kbd{M-v}).
-
-@item v
-Scroll all three windows up (like @kbd{C-v}).
-
-@item <
-Scroll all three windows left (like @kbd{C-x <}).
-
-@item >
-Scroll all three windows right (like @kbd{C-x >}).
-
-@item |
-Reset horizontal scroll on all three windows.
-
-@item x 1
-Shrink the merge window to one line.  (Use @kbd{C-u l} to restore it
-to full size.)
-
-@item x c
-Combine the two versions of this difference (@pxref{Combining in
-Emerge}).
-
-@item x f
-Show the names of the files/buffers Emerge is operating on, in a Help
-window.  (Use @kbd{C-u l} to restore windows.)
-
-@item x j
-Join this difference with the following one.
-(@kbd{C-u x j} joins this difference with the previous one.)
-
-@item x s
-Split this difference into two differences.  Before you use this
-command, position point in each of the three buffers at the place where
-you want to split the difference.
-
-@item x t
-Trim identical lines off the top and bottom of the difference.
-Such lines occur when the A and B versions are
-identical but differ from the ancestor version.
-@end table
-
-@node Exiting Emerge
-@subsection Exiting Emerge
-
-  The @kbd{q} command (@code{emerge-quit}) finishes the merge, storing
-the results into the output file if you specified one.  It restores the
-A and B buffers to their proper contents, or kills them if they were
-created by Emerge and you haven't changed them.  It also disables the
-Emerge commands in the merge buffer, since executing them later could
-damage the contents of the various buffers.
-
-  @kbd{C-]} aborts the merge.  This means exiting without writing the
-output file.  If you didn't specify an output file, then there is no
-real difference between aborting and finishing the merge.
-
-  If the Emerge command was called from another Lisp program, then its
-return value is @code{t} for successful completion, or @code{nil} if you
-abort.
-
-@node Combining in Emerge
-@subsection Combining the Two Versions
-
-  Sometimes you want to keep @emph{both} alternatives for a particular
-difference.  To do this, use @kbd{x c}, which edits the merge buffer
-like this:
-
-@example
-@group
-#ifdef NEW
-@var{version from A buffer}
-#else /* not NEW */
-@var{version from B buffer}
-#endif /* not NEW */
-@end group
-@end example
-
-@noindent
-@vindex emerge-combine-versions-template
-While this example shows C preprocessor conditionals delimiting the two
-alternative versions, you can specify the strings to use by setting
-the variable @code{emerge-combine-versions-template} to a string of your
-choice.  In the string, @samp{%a} says where to put version A, and
-@samp{%b} says where to put version B.  The default setting, which
-produces the results shown above, looks like this:
-
-@example
-@group
-"#ifdef NEW\n%a#else /* not NEW */\n%b#endif /* not NEW */\n"
-@end group
-@end example
-
-@node Fine Points of Emerge
-@subsection Fine Points of Emerge
-
-  During the merge, you mustn't try to edit the A and B buffers yourself.
-Emerge modifies them temporarily, but ultimately puts them back the way
-they were.
-
-  You can have any number of merges going at once---just don't use any one
-buffer as input to more than one merge at once, since the temporary
-changes made in these buffers would get in each other's way.
-
-  Starting Emerge can take a long time because it needs to compare the
-files fully.  Emacs can't do anything else until @code{diff} finishes.
-Perhaps in the future someone will change Emerge to do the comparison in
-the background when the input files are large---then you could keep on
-doing other things with Emacs until Emerge is ready to accept
-commands.
-
-@vindex emerge-startup-hook
-  After setting up the merge, Emerge runs the hook
-@code{emerge-startup-hook} (@pxref{Hooks}).
-
 @ignore
    arch-tag: b9d83dfb-82ea-4ff6-bab5-05a3617091fb
 @end ignore
--- a/man/makefile.w32-in	Tue Mar 14 12:15:08 2006 +0000
+++ b/man/makefile.w32-in	Sun Mar 19 19:43:57 2006 +0000
@@ -90,7 +90,6 @@
 	$(srcdir)/building.texi \
 	$(srcdir)/maintaining.texi \
 	$(srcdir)/abbrevs.texi \
-	$(srcdir)/picture.texi \
 	$(srcdir)/sending.texi \
 	$(srcdir)/rmail.texi \
 	$(srcdir)/dired.texi \
--- a/man/mh-e.texi	Tue Mar 14 12:15:08 2006 +0000
+++ b/man/mh-e.texi	Sun Mar 19 19:43:57 2006 +0000
@@ -8,11 +8,11 @@
 @c %**end of header
 
 @c Version of the software and manual.
-@set VERSION 7.93+cvs
-@c EDITION of the manual. It is either empty for the first edition or
+@set VERSION 7.93
+@c Edition of the manual. It is either empty for the first edition or
 @c has the form ", nth Edition" (without the quotes).
-@set EDITION
-@set UPDATED 2006-03-11
+@set EDITION , 4th Edition
+@set UPDATED 2006-03-17
 @set UPDATE-MONTH March, 2006
 
 @c Other variables.
@@ -203,6 +203,7 @@
 
 @cindex Emacs
 @cindex Unix commands, Emacs
+@cindex preface
 
 This manual introduces another interface to the MH mail system that is
 accessible through the GNU Emacs editor, namely, @emph{MH-E}. MH-E is
@@ -221,6 +222,9 @@
 MH-E version @value{VERSION}. To help you decide which version you
 have, see @ref{Getting Started}.
 
+@findex help-with-tutorial
+@kindex C-h t
+
 If you don't already use GNU Emacs but want to learn more, you can
 read an online tutorial by starting GNU Emacs and typing @kbd{C-h t}
 (@code{help-with-tutorial}). (To learn about this notation, see
@@ -241,10 +245,13 @@
 the individual MH commands. When the name is not obvious, I'll guide
 you to a relevant MH manual page that describes the action more fully.
 
+@cindex info
+@kindex C-h i
+
 This manual is available in both Info and online formats. The Info
 version is distributed with Emacs and can be accessed with the
-@command{info} command (@samp{info mh-e}) or within Emacs (@kbd{M-x
-info @key{RET} m mh-e @key{RET}}). The online version is available at
+@command{info} command (@samp{info mh-e}) or within Emacs (@kbd{C-h i
+m mh-e @key{RET}}). The online version is available at
 @uref{http://mh-e.sourceforge.net/manual/, SourceForge}. Another great
 online resource is the book @uref{http://www.ics.uci.edu/~mh/book/,
 @cite{MH & nmh: Email for Users & Programmers}} (also known as
@@ -265,8 +272,11 @@
 @chapter GNU Emacs Terms and Conventions
 
 @cindex Emacs
-@cindex Emacs, terms and conventions
+@cindex Emacs, conventions
+@cindex Emacs, terms
 @cindex Unix commands, Emacs
+@cindex conventions, Emacs
+@cindex terms, Emacs
 
 If you're an experienced Emacs user, you can skip the following
 conventions and definition of terms and go directly to the next
@@ -325,6 +335,7 @@
 
 @cindex Emacs, prefix argument
 @cindex prefix argument
+@kindex C-u
 
 A @dfn{prefix argument} allows you to pass an argument to any Emacs
 function. To pass an argument, type @kbd{C-u} before the Emacs command
@@ -348,8 +359,11 @@
 @end quotation
 @sp 1
  
+@cindex @file{.emacs}
 @cindex Emacs, variables
+@cindex files, @file{.emacs}
 @cindex variables
+@findex setq
 
 Emacs uses @dfn{variables} to hold values. These can be changed via
 calls to the function @code{setq} in @file{~/.emacs}.
@@ -392,9 +406,11 @@
 Face Customization} in @cite{The GNU Emacs Manual}.
 @end ifhtml
 
+@cindex abnormal hooks
 @cindex hooks
 @cindex normal hooks
-@cindex abnormal hooks
+@findex add-hook
+@findex customize-option
 
 Commands often offer @dfn{hooks} which enable you to extend or modify
 the way a command works. 
@@ -409,10 +425,11 @@
 @end ifhtml
 for a description about @dfn{normal hooks} and @dfn{abnormal hooks}.
 MH-E uses normal hooks in nearly all cases, so you can assume that we
-are talking about normal hooks unless we explicitly mention that a hook
-is abnormal. We also follow the conventions described in that section:
-the name of the abnormal hooks end in @code{-hooks} and all the rest
-of the MH-E hooks end in @code{-hook}.
+are talking about normal hooks unless we explicitly mention that a
+hook is abnormal. We also follow the conventions described in that
+section: the name of the abnormal hooks end in @code{-hooks} and all
+the rest of the MH-E hooks end in @code{-hook}. You can add hooks with
+either @code{customize-option} or @code{add-hook}.
 
 @cindex Emacs, mark
 @cindex Emacs, point
@@ -420,6 +437,8 @@
 @cindex mark
 @cindex point
 @cindex region
+@kindex C-@@
+@kindex C-@key{SPC}
 
 There are several other terms that are used in Emacs that you should
 know. The @dfn{point} is where the cursor currently is. You can save
@@ -430,14 +449,16 @@
 filling paragraphs. A mark can be set with @kbd{C-@@} (or
 @kbd{C-@key{SPC}}).
 
+@cindex completion
 @cindex Emacs, completion
 @cindex Emacs, file completion
 @cindex Emacs, folder completion
 @cindex Emacs, minibuffer
-@cindex completion
 @cindex file completion
 @cindex folder completion
 @cindex minibuffer
+@kindex SPC
+@kindex TAB
 
 The @dfn{minibuffer} is the bottom line of the Emacs window, where all
 prompting and multiple-character input is directed. You can use
@@ -456,6 +477,10 @@
 Note that @key{SPC} cannot be used for completing filenames and
 folders.
 
+@findex help-with-tutorial
+@kindex C-h t
+@kindex M-x
+
 The minibuffer is also where you enter Emacs function names after
 typing @kbd{M-x}. For example, in the preface, I mentioned that you
 could obtain help with @kbd{C-h t} (@code{help-with-tutorial}). What
@@ -518,6 +543,14 @@
 MH-E, and you may need to install MH too. However, newer versions of
 MH-E are better at finding MH if it is on your system.}.
 
+@cindex @command{mhparam}
+@cindex MH commands, @command{mhparam}
+@vindex exec-path
+@vindex mh-path
+@vindex mh-sys-path
+@vindex mh-variant
+@vindex mh-variant-in-use
+
 The option @code{mh-variant} specifies the variant used by MH-E
 (@pxref{Options}). The default setting of this option is
 @samp{Auto-detect} which means that MH-E will automatically choose the
@@ -525,15 +558,23 @@
 listed in @code{mh-path} (which you can customize),
 @code{mh-sys-path}, and @code{exec-path}. If MH-E can't find MH at
 all, you may have to customize @code{mh-path} and add the directory in
-which the command @code{mhparam} is located. If, on the other hand,
+which the command @command{mhparam} is located. If, on the other hand,
 you have both nmh and mailutils installed (for example) and
 @code{mh-variant-in-use} was initialized to nmh but you want to use
 mailutils, then you can set @code{mh-variant} to @samp{mailutils}.
 
+@vindex mh-flists-present-flag
+@vindex mh-lib
+@vindex mh-lib-progs
+@vindex mh-progs
+
 When @code{mh-variant} is changed, MH-E resets @code{mh-progs},
 @code{mh-lib}, @code{mh-lib-progs}, @code{mh-flists-present-flag}, and
 @code{mh-variant-in-use} accordingly.
 
+@cindex @file{.emacs}
+@cindex files, @file{.emacs}
+
 @sp 1
 @center @strong{NOTE}
 
@@ -565,14 +606,14 @@
 component contains the path to your mail directory, which is
 @file{~/Mail} by default.
 
+@cindex MH profile component, @samp{Draft-Folder:}
+@cindex MH profile component, @samp{Path:}
+@cindex MH profile component, @samp{Previous-Sequence:}
+@cindex MH profile component, @samp{Unseen-Sequence:}
 @cindex @samp{Draft-Folder:} MH profile component
 @cindex @samp{Path:} MH profile component
 @cindex @samp{Previous-Sequence:} MH profile component
 @cindex @samp{Unseen-Sequence:} MH profile component
-@cindex MH profile component, @samp{Draft-Folder:}
-@cindex MH profile component, @samp{Path:}
-@cindex MH profile component, @samp{Previous-Sequence:}
-@cindex MH profile component, @samp{Unseen-Sequence:}
 @findex mh-find-path
 @vindex mh-draft-folder
 @vindex mh-find-path-hook
@@ -597,6 +638,10 @@
 @node Tour Through MH-E, Using This Manual, Getting Started, Top
 @chapter Tour Through MH-E
 
+@cindex introduction
+@cindex tour
+@cindex tutorial
+
 This chapter introduces some of the terms you'll need to know and then
 takes you on a tour of MH-E@footnote{The keys mentioned in these
 chapters refer to the default key bindings. If you've changed the
@@ -619,29 +664,29 @@
 @node Sending Mail Tour, Reading Mail Tour, Tour Through MH-E, Tour Through MH-E
 @section Sending Mail
 
+@cindex MH-Letter mode
+@cindex mode
+@cindex modes, MH-Letter
 @cindex sending mail
 @findex mh-smail
+@kindex M-x mh-smail
 
 Let's start our tour by sending ourselves a message which we can later
 read and process. Enter @kbd{M-x mh-smail} to invoke the MH-E program
-to send messages. You will be prompted in the minibuffer by
-@samp{To:}. Enter your login name. The next prompt is @samp{Cc:}. Hit
-@key{RET} to indicate that no carbon copies are to be sent. At the
-@samp{Subject:} prompt, enter @kbd{Test} or anything else that comes
-to mind.
-
-@cindex MH-Letter mode
-@cindex modes, MH-Letter
-@cindex mode
-
-Once you've specified the recipients and subject, your message appears
-in an Emacs buffer whose mode@footnote{A @dfn{mode} changes Emacs to
-make it easier to edit a particular type of text.} is MH-Letter. Enter
-some text in the body of the message, using normal Emacs commands. You
-should now have something like this@footnote{If you're running Emacs
-under the X Window System, then you would also see a menu bar. Under
-Emacs 21, you would also see a tool bar. I've left out the menu bar and
-tool bar in all of the example screens.}:
+to send messages. Your message appears in an Emacs buffer whose
+mode@footnote{A @dfn{mode} changes Emacs to make it easier to edit a
+particular type of text.} is MH-Letter.
+
+Enter your login name in the @samp{To:} header field. Press the
+@key{TAB} twice to move the cursor past the @samp{Cc:} field, since no
+carbon copies are to be sent, and on to the @samp{Subject:} field.
+Enter @kbd{Test} or anything else that comes to mind.
+
+Press @key{TAB} again to move the cursor to the body of the message.
+Enter some text, using normal Emacs commands. You should now have
+something like this@footnote{If you're running Emacs under the X
+Window System, then you would also see a menu bar and a tool bar. I've
+left out the menu bar and tool bar in all of the example screens.}:
 
 @cartouche
 @smallexample
@@ -651,16 +696,17 @@
 
 
 
---:--  *scratch*   (Lisp Interaction)--L1--All-------------------------
+--:--  *scratch*   All L1     (Lisp Interaction)-------------------------
 To: wohler
 cc:
 Subject: Test
+X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
 --------
 This is a test message to get the wheels churning...#
 
 
---:** @{draft@}   (MH-Letter)--L5--All-----------------------------------
-
+--:**  @{draft@}   All L5     (MH-Letter)----------------------------------
+Type C-c C-c to send message, C-C ? for help
 @end smallexample
 @end cartouche
 @i{MH-E message composition window}
@@ -671,7 +717,10 @@
 the header.
 
 @cindex help
+@findex describe-mode
+@kindex C-c ?
 @kindex C-c C-c
+@kindex C-h m
 
 There are several commands specific to MH-Letter mode@footnote{You can
 get quick help for the commands used most often with @kbd{C-c ?} or
@@ -690,6 +739,7 @@
 @cindex modes, MH-Folder
 @cindex reading mail
 @findex mh-rmail
+@kindex M-x mh-rmail
 
 To read the mail you've just sent yourself, enter @kbd{M-x mh-rmail}.
 This incorporates the new mail and puts the output from
@@ -702,10 +752,15 @@
 summary of each message) into a buffer called @samp{+inbox} whose
 major mode is MH-Folder.
 
+@findex mh-rmail
+@kindex F r
+@kindex M-x mh-rmail
+
 @sp 1
 @center @strong{NOTE}
 
 @quotation
+
 The @kbd{M-x mh-rmail} command will show you only new mail, not mail
 you have already read. If you were to run this tour again, you would
 use @kbd{F r} to pull all your messages into MH-E.
@@ -725,19 +780,18 @@
   3 t08/24 root       received fax files on Wed Aug 24 11:00:13 PDT 1
 # 4+t08/24 To:wohler  Test<<This is a test message to get the wheels
 
--:%%  @{+inbox@} 4 msgs (1-4)   (MH-Folder Show)--L4--Bot--------------
+-:%%  @{+inbox/select@} 4 msgs (1-4)   Bot L4     (MH-Folder Show)---------
 To: wohler
 Subject: Test
-Date: Wed, 24 Aug 1994 13:01:13 -0700
+X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
+Date: Fri, 17 Mar 2006 10:49:11 -0800
 From: Bill Wohler <wohler@@stop.mail-abuse.org>
 
 This is a test message to get the wheels churning...
 
 
 
-
-
---:--  @{show-+inbox@} 4   (MH-Show)--L1--All---------------------------
+--:--  @{show-+inbox@} 4   All L1     (MH-Show)----------------------------
 
 @end smallexample
 @end cartouche
@@ -753,6 +807,7 @@
 @section Processing Mail
 
 @cindex processing mail
+@kindex @key{RET}
 @kindex r
 
 The first thing we want to do is reply to the message that we sent
@@ -760,37 +815,52 @@
 test message and type @kbd{r}. You are prompted in the minibuffer with
 @samp{Reply to whom:}. Here MH-E is asking whether you'd like to reply
 to the original sender only, to the sender and primary recipients, or
-to the sender and all recipients. If you simply hit @key{RET}, you'll
-reply only to the sender. Hit @key{RET} now.
+to the sender and all recipients. You can press @key{TAB} to see these
+choices. If you simply press @key{RET}, you'll reply only to the
+sender. Press @key{RET} now.
 
 You'll find yourself in an Emacs buffer similar to that when you were
 sending the original message, like this:
 
 @cartouche
 @smallexample
-To: wohler
-Subject: Re: Test
-In-reply-to: Bill Wohler's message of Wed, 24 Aug 1994 13:01:13 -0700
-             <199408242001.NAA00505@@stop.mail-abuse.org>
+To: 
+cc: 
+Subject: Re: Test 
+In-reply-to: <31054.1142621351@@stop.mail-abuse.org> 
+References: <31054.1142621351@@stop.mail-abuse.org>
+Comments: In-reply-to Bill Wohler <wohler@@stop.mail-abuse.org>
+   message dated "Fri, 17 Mar 2006 10:49:11 -0800."
+X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
 --------
 #
 
---:--  @{draft@}   (MH-Letter)--L11--Bot---------------------------------
+--:--  @{draft@}  All L10     (MH-Letter)----------------------------------
 To: wohler
 Subject: Test
-Date: Wed, 24 Aug 1994 13:01:13 -0700
+X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
+Date: Fri, 17 Mar 2006 10:49:11 -0800
 From: Bill Wohler <wohler@@stop.mail-abuse.org>
 
 This is a test message to get the wheels churning...
 
---:--  @{show-+inbox@} 4   (MH-Show)--L1--All----------------------------
-Composing a reply...done
+--:--  @{show-+inbox@} 4   All L1     (MH-Show)----------------------------
+Type C-c C-c to send message, C-c ? for help
 @end smallexample
 @end cartouche
 @i{Composition window during reply}
 
+@findex backward-char
+@findex forward-char
+@findex next-line
+@findex previous-line
+@kindex C-b
 @kindex C-c C-c
 @kindex C-c C-f C-t
+@kindex C-f
+@kindex C-n
+@kindex C-p
+@kindex @key{BS}
 
 By default, MH will not add you to the address list of your replies,
 so if you find that the @samp{To:} header field is missing, don't
@@ -802,7 +872,10 @@
 delete the previous character with @key{BS}. When you're finished
 editing your message, send it with @kbd{C-c C-c} as before.
 
+@cindex @command{refile}
+@cindex MH commands, @command{refile}
 @cindex folders
+@kindex @key{SPC}
 @kindex o
 
 You'll often want to save messages that were sent to you in an
@@ -820,9 +893,11 @@
 
 @cindex MH-Folder mode
 @cindex modes, MH-Folder
-@kindex @key{RET}
 @kindex d
 @kindex i
+@kindex @key{RET}
+@kindex n
+@kindex p
 @kindex x
 
 Your previous reply is now waiting in the system mailbox. You
@@ -837,6 +912,7 @@
 
 @findex mh-smail
 @kindex m
+@kindex M-x mh-smail
 
 If you want to send another message you can use @kbd{m} instead of
 @kbd{M-x mh-smail}. So go ahead, send some mail to your friends!
@@ -846,6 +922,7 @@
 @findex describe-mode
 @kindex ?
 @kindex C-h m
+@kindex F ?
 
 You can get a quick reminder about these commands by typing @kbd{?}.
 This lists several @dfn{prefix characters}. To list the commands
@@ -858,6 +935,8 @@
 
 @cindex Emacs, quitting
 @cindex quitting
+@kindex C-x C-c
+@kindex x
 
 You may now wish to exit @command{emacs} entirely. Use @kbd{C-x C-c}
 to exit @command{emacs}. If you exited without running @kbd{x} in the
@@ -866,6 +945,9 @@
 perform any refiles and deletes that you did there.
 
 @findex mh-rmail
+@kindex C-x b
+@kindex C-x k
+@kindex M-x mh-rmail
 @kindex q
 
 If you don't want to leave Emacs, you can type @kbd{q} to bury (hide)
@@ -968,6 +1050,10 @@
 @findex mh-help
 @kindex ?
 @kindex C-c ?
+@kindex C-h C-h
+@kindex C-h C-k i
+@kindex C-h i
+@kindex C-h m
 
 There are many commands, but don't get intimidated. There are command
 summaries at the beginning of each chapter. In case you have or would
@@ -998,7 +1084,8 @@
 GNU Emacs. Note that MH-E does not provide hooks for customizations
 that can be done in MH; this omission is intentional.
 
-@cindex Emacs, Emacs Lisp manual
+@cindex Emacs Lisp Manual
+@cindex Emacs, Emacs Lisp Manual
 @cindex Emacs, info
 @cindex Emacs, online help
 @cindex info
@@ -1080,6 +1167,12 @@
 Sessions}. To read more about @code{mh-lpr-command-format}, see
 @ref{Printing}.
 
+@cindex nil
+@cindex off, option
+@cindex on, option
+@cindex option, turning on and off
+@cindex t
+@findex customize-option
 @vindex mh-bury-show-buffer-flag, example
 
 Options can also hold boolean values. In Emacs Lisp, the boolean
@@ -1095,14 +1188,16 @@
 default, which places the MH-Show buffer at the bottom of the buffer
 stack.
 
+@vindex mh-mhl-format-file, example
+
 The text usually says to turn on an option by setting it to a
 @emph{non-@code{nil}} value, because sometimes values other than
 @samp{on} are meaningful. An example of this is the variable
 @code{mh-mhl-format-file} (@pxref{Viewing}). Other options, such as
 hooks, involve a little more Emacs Lisp programming expertise.
 
+@cindex customization group, @samp{mh}
 @cindex @samp{mh} customization group
-@cindex customization group, @samp{mh}
 @findex customize-group
 @findex mh-customize
 
@@ -1117,14 +1212,16 @@
 
 @c Sync with mh-folder-mode docstring.
 
-@cindex ranges
 @cindex message abbreviations
 @cindex message ranges
+@cindex ranges
 
 Many commands that operate on individual messages, such as
 @code{mh-forward} or @code{mh-refile-msg} take a @code{RANGE}
 argument. This argument can be used in several ways.
 
+@kindex C-u, with ranges
+
 If you provide the prefix argument @kbd{C-u} to these commands, then
 you will be prompted for the message range. This can be any valid MH
 range which can include messages, sequences (@pxref{Sequences}), and
@@ -1156,9 +1253,9 @@
 
 @vindex transient-mark-mode
 
-If the option @code{transient-mark-mode} is set to @code{t} and you
-set a region in the MH-Folder buffer, then the MH-E command will
-perform the operation on all messages in that region.
+If the option @code{transient-mark-mode} is turned on and you set a
+region in the MH-Folder buffer, then the MH-E command will perform the
+operation on all messages in that region.
 
 @cindex @samp{mh-range} customization group
 @cindex customization group, @samp{mh-range}
@@ -1171,6 +1268,8 @@
 On means interpret a number as a range (default: @samp{on}).
 @end vtable
 
+@vindex mh-interpret-number-as-range-flag
+
 Since one of the most frequent ranges used is @samp{last:N}, MH-E will
 interpret input such as @samp{200} as @samp{last:200} if the
 @code{mh-interpret-number-as-range-flag} option is on (which is the
@@ -1180,6 +1279,8 @@
 @node Folder Selection,  , Ranges, Using This Manual
 @section Folder Selection
 
+@cindex completion, folders
+@cindex folders, completion
 @cindex folders, selecting
 
 When you choose a folder in MH-E via a command such as @kbd{o}
@@ -1195,8 +1296,8 @@
 In addition, MH-E has several ways of choosing a suitable default so
 that the folder can often be selected with a single @key{RET} key.
 
+@cindex customization group, @samp{mh-folder-selection}
 @cindex @samp{mh-folder-selection} customization group
-@cindex customization group, @samp{mh-folder-selection}
 
 The @samp{mh-folder-selection} customization group contains some
 options which are used to help with this.
@@ -1217,6 +1318,8 @@
 Prefix used for folder names generated from aliases (default: @code{""}).
 @end vtable
 
+@vindex mh-default-folder-for-message-function
+
 You can set the option @code{mh-default-folder-for-message-function}
 to a function that provides a default folder for the message to be
 refiled. When this function is called, the current buffer contains the
@@ -1230,6 +1333,7 @@
 sender as follows:
 
 @enumerate
+@vindex mh-default-folder-list
 @item
 The folder name associated with the first address found in the list
 @code{mh-default-folder-list} is used. Each element in this list
@@ -1237,12 +1341,15 @@
 then the address is checked against the recipient instead of the
 sender. This is useful for mailing lists.
 @c -------------------------
+@vindex mh-default-folder-prefix
 @item
 An alias prefixed by @code{mh-default-folder-prefix} corresponding to
 the address is used. The prefix is used to prevent clutter in your
 mail directory. @xref{Aliases}.
 @end enumerate
 
+@vindex mh-default-folder-must-exist-flag
+
 If the derived folder does not exist, and
 @code{mh-default-folder-must-exist-flag} is @code{t}, then the last
 folder name used is suggested. This is useful if you get mail from
@@ -1252,7 +1359,9 @@
 @node Incorporating Mail, Reading Mail, Using This Manual, Top
 @chapter Incorporating Your Mail
 
+@cindex @samp{Folder} menu
 @cindex incorporating
+@cindex menu, @samp{Folder}
 
 This chapter talks about getting mail from your system mailbox into
 your MH @samp{+inbox} folder. The following command accomplishes that
@@ -1284,11 +1393,16 @@
 The following hook is available.
 
 @vtable @code
+@findex mh-inc-folder
 @item mh-inc-folder-hook
-Hook run by @samp{mh-inc-folder} after incorporating mail into a
+Hook run by @code{mh-inc-folder} after incorporating mail into a
 folder (default: @code{nil}).
 @end vtable
 
+@cindex @samp{+inbox}
+@findex mh-inc-folder
+@kindex i
+
 If at any time you receive new mail, incorporate the new mail into
 your @samp{+inbox} buffer with @kbd{i} (@code{mh-inc-folder}). Note
 that @kbd{i} will display the @samp{+inbox} buffer, even if there
@@ -1305,17 +1419,18 @@
 
 Emacs can notify you when you have new mail by displaying @samp{Mail}
 in the mode line. To enable this behavior, and to have a clock in the
-mode line besides, add the following to @file{~/.emacs}:
+mode line as well, add the following to @file{~/.emacs}:
 
 @findex display-time
 
-@lisp
+@smalllisp
 (display-time)
-@end lisp
+@end smalllisp
 
 @cindex @command{inc}
+@cindex incorporating
 @cindex MH commands, @command{inc}
-@cindex incorporating
+@vindex mh-inc-prog
 @vindex mh-progs
 
 The name of the program that incorporates new mail is stored in
@@ -1330,6 +1445,8 @@
 the MH book). You'll then need to modify several variables
 appropriately (@pxref{Scan Line Formats}).
 
+@vindex mh-inc-spool-list
+
 You can use the @code{mh-inc-spool-list} variable to direct MH-E to
 retrieve mail from arbitrary spool files other than your system
 mailbox, file it in folders other than your @samp{+inbox}, and assign
@@ -1351,6 +1468,9 @@
 mh-e
 @end smallexample
 
+@findex mh-inc-spool-*
+@kindex I *
+
 In order to incorporate @file{~/mail/mh-e} into @samp{+mh-e} with an
 @kbd{I m} (@code{mh-inc-spool-mh-e}) command, customize this option,
 and click on the @samp{INS} button. Enter a @samp{Spool File} of
@@ -1380,6 +1500,10 @@
 In XEmacs, the command @command{gnuclient} is used in a similar
 fashion.
 
+@findex mh-inc-folder
+@kindex i
+@vindex mh-inc-folder-hook
+
 You can set the hook @code{mh-inc-folder-hook}, which is called after
 new mail is incorporated by the @kbd{i} (@code{mh-inc-folder})
 command. A good use of this hook is to rescan the whole folder either
@@ -1410,13 +1534,16 @@
 @node Reading Mail, Folders, Incorporating Mail, Top
 @chapter Reading Your Mail
 
+@cindex @samp{+inbox}
 @cindex MH-Folder mode
 @cindex MH-Show mode
 @cindex modes, MH-Folder
 @cindex modes, MH-Show
 @cindex reading mail
-@cindex scan lines
 @findex mh-rmail
+@kindex M-x mh-rmail
+@kindex F r
+@kindex F v
 
 The MH-E entry point for reading mail is @kbd{M-x mh-rmail}. This
 command incorporates your mail and creates a buffer called
@@ -1427,6 +1554,12 @@
 prompt you for folder to visit like @kbd{F v} (for example, @kbd{C-u
 M-x mh-rmail @key{RET} bob @key{RET}}). @xref{Folders}.}.
 
+@cindex @command{scan}
+@cindex @samp{Message} menu
+@cindex MH commands, @command{scan}
+@cindex menu, @samp{Message}
+@cindex scan lines
+
 The @samp{+inbox} buffer contains @dfn{scan lines}, which are one-line
 summaries of each incorporated message. You can perform most MH
 commands on these messages via one- or two-letter commands in either
@@ -1880,6 +2013,8 @@
 all of them, use the command @kbd{,} (comma;
 @code{mh-header-display}).
 
+@vindex mh-show-maximum-size
+
 The option @code{mh-show-maximum-size} provides an opportunity to skip
 over large messages which may be slow to load. The default value of 0
 means that all message are shown regardless of size.
@@ -1901,8 +2036,8 @@
 
 @cindex regular expressions, @code{mh-invisible-header-fields}
 @vindex mh-clean-message-header-flag
+@vindex mh-invisible-header-fields
 @vindex mh-invisible-header-fields-default
-@vindex mh-invisible-header-fields
 
 Normally messages are delivered with a handful of uninteresting header
 fields. These are hidden by turning on the option
@@ -1918,12 +2053,12 @@
 header field should be generally ignored, report a bug (@pxref{Bug
 Reports}).
 
+@cindex header field, @samp{Face:}
+@cindex header field, @samp{X-Face:}
+@cindex header field, @samp{X-Image-URL:}
 @cindex @samp{Face:} header field
 @cindex @samp{X-Face:} header field
 @cindex @samp{X-Image-URL:} header field
-@cindex header field, @samp{Face:}
-@cindex header field, @samp{X-Face:}
-@cindex header field, @samp{X-Image-URL:}
 @vindex mh-show-use-xface-flag
 
 MH-E can display the content of @samp{Face:}, @samp{X-Face:}, and
@@ -2022,9 +2157,9 @@
 and forwarding; in this case, the value of @code{mh-mhl-format-file}
 is consulted if you have specified a format file.
 
-@vindex mh-highlight-citation-style
 @cindex citations, highlighting
 @cindex highlighting citations
+@vindex mh-highlight-citation-style
 
 If the sender of the message has cited other messages in his message,
 then MH-E will highlight these citations to emphasize the sender's
@@ -2047,9 +2182,9 @@
 Email addresses and URLs in the message are highlighted if the option
 @code{goto-address-highlight-p} is on, which it is by default. To view
 the web page for a highlighted URL or to send a message using a
-highlighted email address, use @kbd{Mouse-2} or @kbd{C-c @key{RET}}.
-See @ref{Sending Mail}, to see how to configure Emacs to send the
-message using MH-E.
+highlighted email address, use @kbd{Mouse-2} or @kbd{C-c @key{RET}}
+(@code{goto-address-at-point}). @xref{Sending Mail}, to see how to
+configure Emacs to send the message using MH-E.
 
 @cindex boldface, showing
 @cindex emphasis
@@ -2106,9 +2241,9 @@
 behavior of MH-E in general or when @code{mh-show-mode-hook} is too
 early.
 
-@vindex mh-show-buffer-mode-line-buffer-id
 @cindex MH-Show mode
 @cindex modes, MH-Show
+@vindex mh-show-buffer-mode-line-buffer-id
 
 For those who like to modify their mode lines, use
 @code{mh-show-buffer-mode-line-buffer-id} to modify the mode line in
@@ -2124,13 +2259,13 @@
 @node Viewing Attachments, HTML, Viewing, Reading Mail
 @section Viewing Attachments
 
+@cindex attachments
+@cindex body parts
 @cindex @command{mhshow}
 @cindex @command{show}
 @cindex MH commands, @command{mhshow}
 @cindex MH commands, @command{show}
 @cindex MIME
-@cindex attachments
-@cindex body parts
 @cindex multimedia mail
 
 MH has the ability to display @dfn{@sc{mime}} (Multipurpose Internet
@@ -2164,20 +2299,21 @@
 other graphical widgets. @xref{Viewing}.
 
 @cindex buttons
+
+Attachments in MH-E are indicated by @dfn{buttons} like this:
+
+@smallexample
+[1. image/jpeg; foo.jpg]...
+@end smallexample
+
+@findex mh-next-button
+@findex mh-press-button
+@findex mh-prev-button
+@kindex @key{RET}
+@kindex K @key{TAB}
+@kindex K S-@key{TAB}
 @kindex Mouse-1
 @kindex Mouse-2
-@kindex @key{RET}
-@findex mh-press-button
-@findex mh-next-button
-@findex mh-prev-button
-@kindex K @key{TAB}
-@kindex K S-@key{TAB}
-
-Attachments in MH-E are indicated by buttons like this:
-
-@example
-[1. image/jpeg; foo.jpg]...
-@end example
 
 To view the contents of the button, use either @kbd{Mouse-1} or
 @kbd{Mouse-2} on the button or @key{RET} (@code{mh-press-button}) when
@@ -2231,7 +2367,6 @@
 
 @cindex attachments, saving
 @cindex saving attachments
-
 @findex mh-folder-save-mime-part
 @kindex K o
 
@@ -2261,6 +2396,8 @@
 components, since this function calls on @command{mhstore}
 (@command{mhn}) to do the work.
 
+@vindex mh-mime-save-parts-default-directory
+
 The default value for the option
 @code{mh-mime-save-parts-default-directory} is @samp{Prompt Always} so
 that you are always prompted for the directory in which to save the
@@ -2292,9 +2429,9 @@
 MH-E cannot display all attachments inline however. It can display
 text (including @sc{html}) and images.
 
-@cindex @samp{Content-Disposition:} header field
 @cindex header field, @samp{Content-Disposition:}
 @cindex inline images
+@cindex @samp{Content-Disposition:} header field
 @vindex mh-max-inline-image-height
 @vindex mh-max-inline-image-width
 
@@ -2348,7 +2485,6 @@
 
 @cindex HTML
 @cindex Gnus
-@vindex mm-text-html-renderer
 
 MH-E can display messages that have been sent in HTML@footnote{This
 feature depends on a version of Gnus that is at least 5.10.}. The
@@ -2357,13 +2493,15 @@
 part. However, if there is an HTML body part that is an attachment,
 then you'll see a button like this:
 
-@example
+@smallexample
 [1. text/html; foo.html]...
-@end example
+@end smallexample
 
 To see how to read the contents of this body part, see @ref{Viewing
 Attachments}.
 
+@vindex mm-text-html-renderer
+
 The browser that MH-E uses is determined by the option
 @code{mm-text-html-renderer}. The default setting is set automatically
 based upon the presence of a known browser on your system. If you wish
@@ -2373,12 +2511,17 @@
 images as this can tip off spammers that the email address they have
 used is valid.
 
+@vindex mm-text-html-renderer
+
 If you're confused about which @code{mm-text-html-renderer} to use,
 here's a brief description of each, sorted by popularity, that
 includes the results of a quick poll of MH-E users from 2005-12-23.
 
 @table @asis
-
+@cindex browser, @samp{w3m}
+@cindex @samp{w3m}
+@kindex Mouse-2
+@kindex S-Mouse-2
 @item @samp{w3m} 7
 The @samp{w3m} browser requires an external program. It's quick,
 produces pretty nice output, and best of all, it's the only browser
@@ -2389,6 +2532,8 @@
 (which can cause text to wrap if the author didn't anticipate that the
 page would be viewed in Emacs).
 @c -------------------------
+@cindex browser, @samp{w3m-standalone}
+@cindex @samp{w3m-standalone}
 @item @samp{w3m-standalone} 3
 This browser, along with @samp{nil} for the external browser, are the
 only choices that work without having to download a separate lisp
@@ -2398,6 +2543,8 @@
 handle the escape @samp{&ndash;} (it printed a @samp{?}), but it did
 render @samp{&reg;}.
 @c -------------------------
+@cindex browser, @samp{links}
+@cindex @samp{links}
 @item @samp{links} 1
 The @samp{links} browser requires an external program. It's quick, and
 produces nicer output than @samp{lynx} on single column mails in
@@ -2406,6 +2553,8 @@
 columns and thus seems better than @samp{w3} and
 @samp{w3m-standalone}. Converts escapes such as @samp{&reg;} to (R).
 @c -------------------------
+@cindex browser, @samp{lynx}
+@cindex @samp{lynx}
 @item @samp{lynx} 1
 The @samp{lynx} browser requires an external program. It's quick and
 produces pretty decent output but it doesn't show links. It doesn't
@@ -2419,6 +2568,8 @@
 HTML messages have a button for the body part which you can view with
 @kbd{K v} (@code{mh-folder-toggle-mime-part}).
 @c -------------------------
+@cindex browser, @samp{w3}
+@cindex @samp{w3}
 @item @samp{w3} 0
 This choice does not require an external program as all of the
 rendering is done in lisp. You do need to get the package separately.
@@ -2431,6 +2582,8 @@
 highlighted. Performs well on single-column tables and handles escapes
 such as @samp{&reg;}.
 @c -------------------------
+@cindex browser, @samp{html2text}
+@cindex @samp{html2text}
 @item @samp{html2text} 0
 The @samp{html2text} browser requires an external program. I noticed
 that it can do some nasty things with simple HTML mails (like filling
@@ -2439,6 +2592,8 @@
 reason.
 @end table
 
+@vindex mm-text-html-renderer
+
 For a couple more sources of information about
 @code{mm-text-html-renderer},
 @ifinfo
@@ -2459,10 +2614,10 @@
 @cindex digests
 @findex mh-page-digest
 @findex mh-page-digest-backwards
+@kindex D @key{BS}
+@kindex D @key{SPC}
 @kindex @key{BS}
 @kindex @key{SPC}
-@kindex D @key{BS}
-@kindex D @key{SPC}
 
 A digest is a message that contains other messages. Special MH-E
 commands let you read digests conveniently. You can use @key{SPC} and
@@ -2476,8 +2631,8 @@
 @cindex MH-Folder Show mode
 @cindex modes, MH-Folder Show
 @findex mh-burst-digest
+@kindex d
 @kindex D b
-@kindex d
 @kindex t
 
 Another handy command is @kbd{D b} (@code{mh-burst-digest}). This
@@ -2639,6 +2794,8 @@
 @findex mh-ps-print-msg-file
 @kindex P f
 @kindex P p
+@vindex mh-lpr-command-format
+@vindex mh-print-background-flag
 
 To print messages in MH-E, use the command @kbd{P p}
 (@code{mh-ps-print-msg}). You can print all the messages in a range
@@ -2694,6 +2851,9 @@
 @uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in the MH
 book.} and printed with the @command{lpr} command.
 
+@kindex P f
+@kindex P l
+@kindex P p
 @vindex mh-lpr-command-format
 @vindex mh-print-background-flag
 
@@ -2716,11 +2876,10 @@
 
 @cindex files
 @cindex pipes
-
 @findex mh-refile-or-write-again
 @findex mh-write-msg-to-file
+@kindex >
 @kindex !
-@kindex >
 
 MH-E does offer a couple of commands that are not a part of MH@. The
 first one, @kbd{>} (@code{mh-write-msg-to-file}), writes a message to
@@ -2733,6 +2892,7 @@
 
 @findex mh-pipe-msg
 @kindex |
+@kindex l
 
 You can also pipe the message through a Unix shell command with the
 command @kbd{|} (@code{mh-pipe-msg}). You are prompted for the Unix
@@ -2761,6 +2921,8 @@
 directory for storing the content of these messages.
 
 @findex mh-store-buffer
+@kindex @key{RET}
+@kindex X s
 
 By the way, @kbd{X s} calls the Emacs Lisp function
 @code{mh-store-buffer}. I mention this because you can use it directly
@@ -2781,11 +2943,11 @@
 @findex mh-next-unread-msg
 @findex mh-previous-undeleted-msg
 @findex mh-previous-unread-msg
+@kindex g
 @kindex M-<
 @kindex M->
 @kindex M-n
 @kindex M-p
-@kindex g
 @kindex n
 @kindex p
 
@@ -2809,6 +2971,7 @@
 @findex previous-line
 @kindex C-n
 @kindex C-p
+@kindex @key{RET}
 
 You can also use the Emacs commands @kbd{C-p} (@code{previous-line})
 and @kbd{C-n} (@code{next-line}) to move up and down the scan lines in
@@ -2818,6 +2981,8 @@
 @cindex deleting messages
 @findex mh-delete-msg
 @kindex d
+@kindex n
+@kindex p
 
 To mark a message for deletion, use the command @kbd{d}
 (@code{mh-delete-msg}). A @samp{D} is placed by the message in the
@@ -2839,7 +3004,11 @@
 
 @findex mh-delete-subject
 @findex mh-delete-subject-or-thread
+@findex mh-thread-delete
+@findex mh-undo
 @kindex k
+@kindex T d
+@kindex u
 
 And to delete more messages faster, you can use @kbd{k}
 (@code{mh-delete-subject-or-thread}) to delete all the messages with
@@ -2878,6 +3047,8 @@
 an editable buffer. When you are done editing, save and kill the
 buffer as you would any other.
 
+@findex mh-kill-folder
+@findex mh-pack-folder
 @vindex mh-do-not-confirm-flag
 
 Commands such as @code{mh-pack-folder} prompt to confirm whether to
@@ -2977,7 +3148,11 @@
 @node Folders, Sending Mail, Reading Mail, Top
 @chapter Organizing Your Mail with Folders
 
+@cindex @samp{Folder} menu
+@cindex @samp{Message} menu
 @cindex folders
+@cindex menu, @samp{Folder}
+@cindex menu, @samp{Message}
 @cindex using folders
 
 This chapter discusses the things you can do with folders within MH-E.
@@ -3231,6 +3406,8 @@
 @samp{To:} face.
 @end vtable
 
+@vindex mh-folder-mode-hook
+
 The hook @code{mh-folder-mode-hook} is called when visiting a new
 folder in MH-Folder mode. This could be used to set your own key
 bindings, for example:
@@ -3285,6 +3462,9 @@
 be prompted to create it. The hook @code{mh-refile-msg-hook} is called
 after a message is marked to be refiled.
 
+@findex mh-write-msg-to-file
+@kindex !
+
 If you are refiling several messages into the same folder, you can use
 the command @kbd{!} (@code{mh-refile-or-write-again}) to repeat the
 last refile or write (for the description of @kbd{>}
@@ -3294,6 +3474,8 @@
 
 @cindex expunging refiles and deletes
 @cindex undoing refiles and deletes
+@findex mh-undo
+@kindex u
 
 If you've deleted a message or refiled it, but changed your mind, you
 can cancel the action before you've executed it. Use @kbd{u}
@@ -3301,9 +3483,15 @@
 You can also undo refiles and deletes for messages that are found in a
 given range (@pxref{Ranges}).
 
+@findex mh-undo-folder
+@kindex F u
+
 Alternatively, you can use @kbd{F u} (@code{mh-undo-folder}) to undo
 all refiles and deletes in the current folder.
 
+@findex mh-execute-commands
+@kindex x
+
 If you've marked messages to be deleted or refiled and you want to go
 ahead and delete or refile the messages, use @kbd{x}
 (@code{mh-execute-commands}). Many MH-E commands that may affect the
@@ -3312,6 +3500,10 @@
 @kbd{x} for you or undo the pending refiles and deletes, which are
 lost.
 
+@kindex x
+@vindex mh-after-commands-processed-hook
+@vindex mh-before-commands-processed-hook
+
 The command @kbd{x} runs @code{mh-before-commands-processed-hook}
 before the commands are processed and
 @code{mh-after-commands-processed-hook} after the commands are
@@ -3323,6 +3515,10 @@
 affected by deletes and refiles. This list will always include the
 current folder @code{mh-current-folder}.
 
+@findex mh-copy-msg
+@kindex c
+@kindex o
+
 If you wish to copy a message to another folder, you can use the
 command @kbd{c} (@code{mh-copy-msg}) (see the @option{-link} argument
 to @command{refile}(1)). Like the command @kbd{o}, this command
@@ -3331,12 +3527,14 @@
 takes place immediately. The original copy remains in the current
 folder.
 
-@cindex MH-Folder Show mode
+@cindex junk mail
 @cindex MH-Folder mode
-@cindex junk mail
+@cindex MH-Folder Show mode
 @cindex modes, MH-Folder
 @cindex modes, MH-Folder Show
 @cindex spam
+@findex mh-toggle-showing
+@kindex t
 
 The command @kbd{t} (@code{mh-toggle-showing}) switches between
 MH-Folder mode and MH-Folder Show mode@footnote{For you Emacs wizards,
@@ -3351,6 +3549,7 @@
 @cindex modes, MH-Folder
 @cindex modes, MH-Show
 @cindex moving between messages
+@kindex t
 @vindex mh-recenter-summary-flag
 
 When you use @kbd{t} to toggle between show mode and scan mode, the
@@ -3360,6 +3559,10 @@
 cursor at the middle. The effect of @code{mh-recenter-summary-flag} is
 rather useful, but it can be annoying on a slow network connection.
 
+@findex mh-visit-folder
+@kindex F v
+@vindex mh-large-folder
+
 When you want to read the messages that you have refiled into folders,
 use the command @kbd{F v} (@code{mh-visit-folder}) to visit the
 folder. You are prompted for the folder name. The folder buffer will
@@ -3373,15 +3576,18 @@
 this command can also be used to create folders. If you specify a
 folder that does not exist, you will be prompted to create it.
 
+@findex mh-search
+@kindex F s
+
 If you forget where you've refiled your messages, you can find them
 using @kbd{F s} (@code{mh-search}). @xref{Searching}.
 
 @cindex @command{procmail}
 @cindex @command{rcvstore}
+@cindex MH commands, @command{rcvstore}
 @cindex @samp{unseen} sequence
-@cindex MH commands, @command{rcvstore}
+@cindex sequence, @samp{unseen}
 @cindex Unix commands, @command{procmail}
-@cindex sequence, @samp{unseen}
 @cindex unseen messages, viewing
 @findex mh-index-new-messages
 @kindex F n
@@ -3399,6 +3605,9 @@
 @cindex @samp{tick} sequence
 @cindex sequence, @samp{tick}
 @cindex ticked messages, viewing
+@findex mh-index-ticked-messages
+@kindex F '
+@vindex mh-ticked-messages-folders
 
 If you have ticked messages (@pxref{Sequences}), you can display them
 using the command @kbd{F '} (@code{mh-index-ticked-messages}). All
@@ -3417,14 +3626,28 @@
 With a prefix argument, enter a space-separated list of folders at the
 prompt, or nothing to search all folders.
 
+@vindex mh-new-messages-folders
+@vindex mh-recursive-folders-flag
+@vindex mh-ticked-messages-folders
+
 Set the options @code{mh-new-messages-folders} and
 @code{mh-ticked-messages-folders} to @samp{Inbox} to search the
 @samp{+inbox} folder or @samp{All} to search all of the top level
 folders. Otherwise, list the folders that should be searched with the
 @samp{Choose Folders} menu item. See @code{mh-recursive-folders-flag}.
 
+@cindex buffers, @samp{*MH-E Folders*}
 @cindex @samp{*MH-E Folders*}
-@cindex buffers, @samp{*MH-E Folders*}
+@findex mh-kill-folder
+@findex mh-list-folders
+@findex mh-pack-folder
+@findex mh-rescan-folder
+@findex mh-sort-folder
+@kindex F k
+@kindex F l
+@kindex F p
+@kindex F r
+@kindex F S
 
 Other commands you can perform on folders include: @kbd{F l}
 (@code{mh-list-folders}), to place a listing of all the folders in
@@ -3439,11 +3662,16 @@
 you don't want to rescan the entire folder, the commands @kbd{F r} or
 @kbd{F p} will accept a range (@pxref{Ranges}).
 
+@kindex @key{TAB}
+@vindex mh-recursive-folders-flag
+
 By default, operations on folders work only one level at a time. Set
 @code{mh-recursive-folders-flag} to non-@code{nil} to operate on all
 folders. This mostly means that you'll be able to see all your folders
 when you press @key{TAB} when prompted for a folder name.
 
+@findex mh-search-p
+@kindex k
 @vindex mh-kill-folder-suppress-prompt-hooks
 
 The hook @code{mh-kill-folder-suppress-prompt-hooks} is an abnormal
@@ -3459,17 +3687,19 @@
 
 @quotation
 Use this hook with care. If there is a bug in your hook which returns
-@code{t} on @samp{+inbox} and you hit @kbd{k} by accident in the
+@code{t} on @samp{+inbox} and you press @kbd{k} by accident in the
 @code{+inbox} folder, you will not be happy.
 @end quotation
 @sp 1
 
 @cindex @command{sortm}
 @cindex @file{.mh_profile}
-@cindex @samp{sortm:} MH profile component
+@cindex files, @file{.mh_profile}
 @cindex MH commands, @command{sortm}
 @cindex MH profile component, @samp{sortm:}
-@cindex files, @file{.mh_profile}
+@cindex @samp{sortm:} MH profile component
+@kindex F S
+@vindex mh-sortm-args
 
 The option @code{mh-sortm-args} holds extra arguments to pass on to
 the command @command{sortm}@footnote{See the section
@@ -3481,7 +3711,8 @@
 
 @cindex exiting
 @cindex quitting
-@findex mh-rmail
+@findex mh-quit
+@kindex q
 
 When you want to quit using MH-E and go back to editing, you can use
 the @kbd{q} (@code{mh-quit}) command. This buries the buffers of the
@@ -3492,18 +3723,20 @@
 selecting the @samp{+inbox} buffer or by running @kbd{M-x mh-rmail}
 again.
 
+@findex mh-execute-commands
+@kindex q
 @vindex mh-before-quit-hook
 @vindex mh-quit-hook
 
 The two hooks @code{mh-before-quit-hook} and @code{mh-quit-hook} are
-called by @kbd{q} (@code{mh-quit}). The former one is called before
-the quit occurs, so you might use it to perform any MH-E operations;
-you could perform some query and abort the quit or call
-@code{mh-execute-commands}, for example. The latter is not run in an
-MH-E context, so you might use it to modify the window setup. For
-example, if the window configuration was saved as in the example in
-@ref{Miscellaneous Commands and Options}, you would also want to set
-@code{mh-quit-hook} to the following:
+called by @kbd{q}. The former one is called before the quit occurs, so
+you might use it to perform any MH-E operations; you could perform
+some query and abort the quit or call @code{mh-execute-commands}, for
+example. The latter is not run in an MH-E context, so you might use it
+to modify the window setup. For example, if the window configuration
+was saved as in the example in @ref{Miscellaneous Commands and
+Options}, you would also want to set @code{mh-quit-hook} to the
+following:
 
 @c XXX Replace this with my example for killing the mail buffers.
 
@@ -3525,8 +3758,8 @@
 
 @cindex folders, renaming
 @cindex renaming folders
+@findex dired
 @findex dired-do-rename
-@kindex R
 
 You can use dired to manipulate the folders themselves. For example, I
 renamed my @samp{+out} folder to the more common @samp{+outbox} by
@@ -3539,15 +3772,16 @@
 
 @cindex sending mail
 @findex mh-smail
+@kindex M-x mh-smail
 
 You can send a mail message in several ways. You can call @kbd{M-x
 mh-smail} directly, or from the command line like this:
 
 @cindex starting from command line
 
-@example
+@smallexample
 $ @kbd{emacs -f mh-smail}
-@end example
+@end smallexample
 
 @findex goto-address-at-point
 @vindex mail-user-agent
@@ -3557,6 +3791,9 @@
 commands use MH-E by setting the option @code{mail-user-agent} to
 @samp{Emacs interface to MH}.
 
+@cindex @samp{Message} menu
+@cindex menu, @samp{Message}
+
 From within MH-E's MH-Folder mode, other methods of sending mail are
 available as well. These can also be found in the @samp{Message} menu.
 
@@ -3688,6 +3925,8 @@
 @cindex sending mail
 @findex mh-smail
 @findex mh-smail-other-window
+@kindex M-x mh-smail
+@kindex M-x mh-smail-other-window
 
 Outside of an MH-Folder buffer, you must call either @kbd{M-x
 mh-smail} or @kbd{M-x mh-smail-other-window} to compose a new message.
@@ -3701,8 +3940,8 @@
 (global-set-key "\C-x4m" 'mh-smail-other-window)
 @end smalllisp
 
+@cindex draft folder
 @cindex MH-Letter mode
-@cindex draft folder
 @cindex modes, MH-Letter
 @findex mh-send
 @kindex m
@@ -3726,8 +3965,8 @@
 before the MH-Letter buffer appears, turn on the option
 @code{mh-compose-prompt-flag}.
 
+@cindex header field, @samp{X-Mailer:}
 @cindex @samp{X-Mailer:} header field
-@cindex header field, @samp{X-Mailer:}
 @vindex mh-insert-x-mailer-flag
 
 MH-E adds an @samp{X-Mailer:} header field to the header that includes
@@ -3738,8 +3977,10 @@
 @cindex @command{repl}
 @cindex @file{components}
 @cindex MH commands, @command{repl}
+@cindex MH-Letter mode
 @cindex Mail mode
 @cindex files, @file{components}
+@cindex modes, MH-Letter
 @cindex modes, Mail
 @vindex mail-mode-hook
 @vindex mh-letter-mode-hook
@@ -3754,9 +3995,7 @@
 to modify the header after @command{repl} has done its work, or you
 may have a complicated @file{components} file and need to tell MH-E
 where the cursor should go. Here's an example of how you would use
-this hook. You can add the hook using @code{add-hook} or by running
-@kbd{M-x customize-option @key{RET} mh-letter-mode-hook
-@key{RET}}---all of the other hooks are set in a similar fashion.
+this hook.
 
 @findex mh-insert-signature, example
 
@@ -3780,8 +4019,6 @@
     (goto-char (point-max))             ; @r{go to end of message to}
     (mh-insert-signature)))             ;   @r{insert signature}
 
-(add-hook 'mh-letter-mode-hook 'my-mh-letter-mode-hook)
-
 @i{Prepare draft for editing via mh-letter-mode-hook}
 
 @end group
@@ -3791,6 +4028,7 @@
 @ref{Adding Attachments}.
 
 @vindex mh-compose-letter-function
+@vindex mh-letter-mode-hook
 
 The second hook, a function really, is
 @code{mh-compose-letter-function}. Like @code{mh-letter-mode-hook}, it
@@ -3869,6 +4107,8 @@
 Another way to include the message automatically in your draft is to
 use @samp{repl: -filter repl.filter} in your MH profile.
 
+@vindex mh-reply-show-message-flag
+
 If you include the message automatically, you can hide the MH-Show
 buffer by turning off the option @code{mh-reply-show-message-flag}.
 
@@ -3888,9 +4128,9 @@
 @section Forwarding Mail
 
 @cindex @command{forw}
-@cindex MH commands, @command{forw}
 @cindex draft
 @cindex forwarding
+@cindex MH commands, @command{forw}
 @findex mh-forward
 @kindex f
 @vindex mh-forward-hook
@@ -3906,9 +4146,9 @@
 hook @code{mh-forward-hook} is called on the draft.
 
 @cindex @file{.mh_profile}
-@cindex @samp{forw:} MH profile component
+@cindex files, @file{.mh_profile}
 @cindex MH profile component, @samp{forw:}
-@cindex files, @file{.mh_profile}
+@cindex @samp{forw:} MH profile component
 @vindex mh-compose-forward-as-mime-flag
 
 By default, the option @code{mh-compose-forward-as-mime-flag} is on
@@ -3959,6 +4199,9 @@
 the recipient as if the message had come from the original sender.
 When you run this command, you are prompted for the recipients.
 
+@findex mh-edit-again
+@kindex e
+
 For more information on redistributing messages, see
 @command{dist}(1). Also investigate the command @kbd{e}
 (@code{mh-edit-again}) for another way to redistribute messages
@@ -3985,7 +4228,9 @@
 @cindex files, @file{draft}
 @cindex re-editing drafts
 @findex mh-edit-again
+@kindex F v drafts
 @kindex e
+@kindex n
 
 If you don't complete a draft for one reason or another, and if the
 draft buffer is no longer available, you can pick your draft up again
@@ -3995,11 +4240,14 @@
 @key{RET}}, use @kbd{n} to move to the appropriate message, and then
 use @kbd{e} to prepare the message for editing.
 
+@kindex e
+
 The @kbd{e} command can also be used to take messages that were sent
 to you and to send them to more people.
 
 @cindex Mailer-Daemon
 @findex mh-extract-rejected-mail
+@kindex C-c C-c
 @kindex E
 
 Don't use @kbd{e} to re-edit a message from a @i{Mailer-Daemon} who
@@ -4012,9 +4260,11 @@
 @node Editing Drafts, Aliases, Sending Mail, Top
 @chapter Editing a Draft
 
+@cindex @samp{Letter} menu
 @cindex MH-Letter mode
 @cindex draft
 @cindex editing draft
+@cindex menu, @samp{Letter}
 @cindex modes, MH-Letter
 
 When you edit a message that you want to send (called a @dfn{draft} in
@@ -4449,8 +4699,8 @@
 @findex indent-relative
 @findex mh-letter-next-header-field-or-indent
 @findex mh-letter-previous-header-field
+@kindex @key{TAB}
 @kindex S-@key{TAB}
-@kindex @key{TAB}
 @vindex mh-compose-skipped-header-fields
 @vindex mh-letter-header-field
 
@@ -4476,8 +4726,10 @@
 @findex mh-letter-complete-or-space
 @findex mh-letter-confirm-address
 @kindex , (comma)
+@kindex @key{SPC}
 @kindex M-@key{TAB}
-@kindex @key{SPC}
+@vindex mh-alias-flash-on-comma
+@vindex mh-compose-space-does-completion-flag
 @vindex mh-letter-complete-function
 
 If the field contains addresses (for example, @samp{To:} or
@@ -4496,10 +4748,11 @@
 the alias expansion in the minibuffer if
 @code{mh-alias-flash-on-comma} is turned on.
 
-@kindex C-c C-t
-@findex mh-letter-toggle-header-field-display
 @c XXX Document the replacement for the inaccessible 'long argument.
  
+@findex mh-letter-toggle-header-field-display
+@kindex C-c C-t
+
 Use the command @kbd{C-c C-t}
 @code{mh-letter-toggle-header-field-display} to display truncated
 header fields. This command is a toggle so entering it again will hide
@@ -4533,23 +4786,23 @@
 Letter}). For example, let's assume you have the following in your
 draft:
 
-@example
+@smallexample
 @group
 > Hopefully this gives you an idea of what I'm currently doing. I'm \
 not sure yet whether I'm completely satisfied with my setup, but    \
 it's worked okay for me so far.
 @end group
-@end example
+@end smallexample
 
 Running @kbd{M-q} on this paragraph produces:
 
-@example
+@smallexample
 @group
 > Hopefully this gives you an idea of what I'm currently doing. I'm not
 > sure yet whether I'm completely satisfied with my setup, but it's
 > worked okay for me so far.
 @end group
-@end example
+@end smallexample
 
 @findex mh-open-line
 @findex open-line
@@ -4564,7 +4817,7 @@
 replies. For example, if this command was used when point was after
 the first period in the paragraph above, the result would be this:
 
-@example
+@smallexample
 @group
 > Hopefully this gives you an idea of what I'm currently doing.
 
@@ -4572,7 +4825,7 @@
 > sure yet whether I'm completely satisfied with my setup, but it's
 > worked okay for me so far.
 @end group
-@end example
+@end smallexample
 
 @node Inserting Letter, Inserting Messages, Editing Message, Editing Drafts
 @section Inserting Letter to Which You're Replying
@@ -4582,6 +4835,7 @@
 @cindex yanking messages
 @findex mh-yank-cur-msg
 @kindex C-c C-y
+@vindex mh-ins-buf-prefix
 
 It is often useful to insert a snippet of text from a letter that
 someone mailed to provide some context for your reply. The command
@@ -4590,7 +4844,7 @@
 you're replying, and inserting @code{mh-ins-buf-prefix} (@samp{> })
 before each line.
 
-@example
+@smallexample
 @group
 Michael W Thelen <thelenm@@stop.mail-abuse.org> wrote:
 
@@ -4598,7 +4852,7 @@
 > sure yet whether I'm completely satisfied with my setup, but it's
 > worked okay for me so far.
 @end group
-@end example
+@end smallexample
 
 @vindex mh-extract-from-attribution-verb
 
@@ -4608,7 +4862,9 @@
 @samp{wrote:}, @samp{a écrit:}, and @samp{schrieb:}. You can also use
 the @samp{Custom String} menu item to enter your own verb.
 
+@vindex mail-citation-hook
 @vindex mh-ins-buf-prefix
+@vindex mh-yank-behavior
 
 The prefix @code{"> "} is the default setting for the option
 @code{mh-ins-buf-prefix}. I suggest that you not modify this option
@@ -4624,9 +4880,11 @@
 option to delete the window containing the original message after
 yanking it to make more room on your screen for your reply.
 
-@vindex mh-yank-behavior
 @cindex Emacs, packages, supercite
 @cindex supercite package
+@kindex r
+@vindex mail-citation-hook
+@vindex mh-yank-behavior
 
 You can control how the message to which you are replying is yanked
 into your reply using @code{mh-yank-behavior}. To include the entire
@@ -4644,11 +4902,16 @@
 full-bodied, full-featured, citation package that comes standard with
 Emacs.} to pass the entire message and header through supercite.
 
+@vindex mh-extract-from-attribution-verb
+
 If the @samp{Body With Attribution} setting is used, then the message
 minus the header is yanked and a simple attribution line is added at
 the top using the value of the option
 @code{mh-extract-from-attribution-verb}. This is the default.
 
+@kindex C-c C-y
+@vindex mh-delete-yanked-msg-window-flag
+
 If the @samp{Invoke supercite} or @samp{Body With Attribution}
 settings are used, the @samp{-noformat} argument is passed to the
 @command{repl} program to override a @samp{-filter} or @samp{-format}
@@ -4660,12 +4923,16 @@
 @code{mh-delete-yanked-msg-window-flag} as well so that the show
 window is never displayed.
 
+@vindex mh-yank-behavior
+
 If the show buffer has a region, the option @code{mh-yank-behavior} is
 ignored unless its value is one of @samp{Attribution} variants in
 which case the attribution is added to the yanked region.
 
 @findex trivial-cite
 @vindex mail-citation-hook
+@vindex mh-ins-buf-prefix
+@vindex mh-yank-behavior
 
 If this isn't enough, you can gain full control over the appearance of
 the included text by setting @code{mail-citation-hook} to a function
@@ -4677,6 +4944,10 @@
 for the next hook function. The standard prefix
 @code{mh-ins-buf-prefix} is not added if this hook is set.
 
+@cindex Emacs, packages, trivial-cite
+@cindex trivial-cite package
+@vindex mh-yank-behavior
+
 For example, if you use the hook function
 @uref{http://shasta.cs.uiuc.edu/~lrclause/tc.html,
 @code{trivial-cite}} (which is NOT part of Emacs), set
@@ -4691,6 +4962,7 @@
 @kindex C-c C-i
 @vindex mh-ins-buf-prefix
 @vindex mh-invisible-header-fields-compiled
+@vindex mh-yank-behavior
 
 Messages can be inserted with @kbd{C-c C-i} (@code{mh-insert-letter}).
 This command prompts you for the folder and message number, which
@@ -4717,8 +4989,8 @@
 You can insert your signature at the current cursor location with the
 command @kbd{C-c C-s} (@code{mh-insert-signature}).
 
+@cindex files, @file{.signature}
 @cindex @file{.signature}
-@cindex files, @file{.signature}
 @cindex vCard
 @vindex mh-signature-file-name
 
@@ -4728,6 +5000,7 @@
 @dfn{vCard} in which case an attachment is added with the vCard.
 
 @findex mh-signature-separator-p
+@vindex mh-signature-file-name
 @vindex mh-signature-separator
 @vindex mh-signature-separator-regexp
 
@@ -4751,6 +5024,7 @@
 yanking a letter into a draft.
 
 @vindex mh-insert-signature-hook
+@vindex mh-signature-file-name
 
 The hook @code{mh-insert-signature-hook} is run after the signature is
 inserted. Hook functions may access the actual name of the file or the
@@ -4802,6 +5076,8 @@
 The URL of any image can be used for the @samp{X-Image-URL:} field and
 no processing of the image is required.
 
+@vindex mh-x-face-file
+
 To prevent the setting of any of these header fields, either set
 @code{mh-x-face-file} to @code{nil}, or simply ensure that the file
 defined by this option doesn't exist.
@@ -4826,6 +5102,8 @@
 binary files, and even commands that fetch a file with @samp{ftp} when
 your recipient reads the message!
 
+@kindex C-c C-m
+
 If you were to create a multimedia message with plain MH commands, you
 would insert @command{mhbuild} or @command{mhn} directives (henceforth
 called @dfn{MH-style directives} into your draft and use the
@@ -4871,8 +5149,8 @@
 
 @cindex @command{file}
 @cindex @file{/etc/mime.types}
+@cindex files, @file{/etc/mime.types}
 @cindex Unix commands, @command{file}
-@cindex files, @file{/etc/mime.types}
 @findex mailcap-mime-types
 
 In the cases where MH-E can do so, it will determine the media type
@@ -4952,16 +5230,17 @@
 
 @subheading Including Files
 
+@cindex attachments, inserting
+@cindex images
 @cindex MIME, images
 @cindex MIME, sound
 @cindex MIME, video
-@cindex attachments, inserting
-@cindex images
 @cindex sound
 @cindex video
 @findex mh-compose-insertion
 @kindex C-c C-m C-i
 @kindex C-c C-m i
+@vindex mh-compose-insertion
 
 Binaries, images, sound, and video can be inserted in your message
 with the command @kbd{C-c C-m C-i} (@code{mh-compose-insertion}). You
@@ -5004,7 +5283,9 @@
 @cindex MIME, @command{tar}
 @cindex Unix commands, @command{ftp}
 @cindex Unix commands, @command{tar}
+@findex mh-mh-compose-anon-ftp
 @findex mh-mh-compose-external-compressed-tar
+@kindex C-c C-m C-g
 @kindex C-c C-m C-t
 @kindex C-c C-m t
 
@@ -5042,7 +5323,7 @@
 
 
 
---:%%  @{+inbox@} 4 msgs (1-4)   (MH-Folder Show)--L4--Bot---------------
+--:%%  @{+inbox@} 4 msgs (1-4)   Bot L4     (MH-Folder Show)---------------
 To: wohler
 cc:
 Subject: Test of MIME
@@ -5052,7 +5333,7 @@
 <#part type="image/x-xpm" filename="~/lib/images/setiathome.xpm"
 disposition=inline description="SETI@@home logo">
 <#/part>
---:**  @{draft@}   (MH-Letter)--L8--All----------------------------------
+--:**  @{draft@}   All L8     (MH-Letter)----------------------------------
 
 @end smallexample
 @end cartouche
@@ -5065,6 +5346,9 @@
 Typically, you send a message with attachments just like any other
 message (@pxref{Sending Message}).
 
+@findex mh-mml-to-mime
+@kindex C-c C-m C-m
+
 However, you may take a sneak preview of the @sc{mime} encoding if you
 wish by running the command @kbd{C-c C-m C-m} (@code{mh-mml-to-mime}).
 The following screen shows the @sc{mime} encoding specified by the
@@ -5076,6 +5360,7 @@
 To: wohler
 cc:
 Subject: Test of MIME
+X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
 MIME-Version: 1.0
 Content-Type: multipart/mixed; boundary="=-=-="
 --------
@@ -5090,22 +5375,26 @@
 Content-Transfer-Encoding: base64
 Content-Description: SETI@@home logo
 
-LyogWFBNICovCnN0YXRpYyBjaGFyICogc2V0aWF0aG9tZV94cG1bXSA9IHsKIjQ1IDQ1IDc2NCAy
---:--  @{draft@}   (MH-Letter)--L2--Top----------------------------------
+LyogWFBNICovCnN0YXRpYyBjaGFyICogc2V0aWF0aG9tZV94cG1bXSA9IHsKIjQ1IDQ1IDc2N
+--:--  @{draft@}   Top L1     (MH-Letter)----------------------------------
 
 @end smallexample
 @end cartouche
 @i{MH-E @sc{mime} draft ready to send}
 
+@cindex undo effects of mh-mml-to-mime
+
 This action can be undone by running @kbd{C-_} (@code{undo}).
 
 @cindex @command{mhbuild}
 @cindex @command{mhn}
 @cindex MH commands, @command{mhbuild}
 @cindex MH commands, @command{mhn}
+@cindex undo effects of mh-mh-to-mime
 @findex mh-mh-to-mime
 @findex mh-mh-to-mime-undo
 @kindex C-c C-e
+@kindex C-c C-m C-m
 @kindex C-c C-m C-u
 @kindex C-c C-m u
 
@@ -5120,6 +5409,7 @@
 confirmation by adding an argument (for example, @kbd{C-u C-c C-m
 C-u}).
 
+@kindex C-c C-e
 @vindex mh-mh-to-mime-args
 
 If you wish to pass additional arguments to @command{mhbuild}
@@ -5129,13 +5419,14 @@
 @samp{-check}. The recipient of your message can then run
 @samp{mhbuild -check} on the message---@command{mhbuild}
 (@command{mhn}) will complain if the message has been corrupted on the
-way. The command @kbd{C-c C-e} (@code{mh-mh-to-mime}) only consults
-this option when given a prefix argument (as in @kbd{C-u C-c C-e}).
-
+way. The command @kbd{C-c C-e} only consults this option when given a
+prefix argument (as in @kbd{C-u C-c C-e}).
+
+@kindex C-c C-e
 @vindex mh-mh-to-mime-hook
 
 The hook @code{mh-mh-to-mime-hook} is called after the message has
-been formatted by @kbd{C-c C-e} (@code{mh-mh-to-mime})
+been formatted by @kbd{C-c C-e}.
 
 @node Sending PGP, Checking Recipients, Adding Attachments, Editing Drafts
 @section Signing and Encrypting Messages
@@ -5162,29 +5453,30 @@
 The command @kbd{C-c C-m C-s} (@code{mh-mml-secure-message-sign})
 inserts the following tag:
 
-@example
+@smallexample
 <#secure method=pgpmime mode=sign>
-@end example
+@end smallexample
 
 This is used to sign your message digitally. Likewise, the command
 @kbd{C-c C-m C-e} (@code{mh-mml-secure-message-encrypt}) inserts the
 following tag:
 
-@example
+@smallexample
 <#secure method=pgpmime mode=encrypt>
-@end example
+@end smallexample
 
 This is used to encrypt your message. Finally, the command @kbd{C-c
 C-m s e} (@code{mh-mml-secure-message-signencrypt}) inserts the
 following tag:
 
-@example
+@smallexample
 <#secure method=pgpmime mode=signencrypt>
-@end example
+@end smallexample
 
 @findex mh-mml-unsecure-message
 @kindex C-c C-m C-n
 @kindex C-c C-m n
+@vindex mh-mml-method-default
 
 This is used to sign and encrypt your message. In each of these cases,
 a proper multipart message is created for you when you send the
@@ -5218,8 +5510,8 @@
 @cite{The PGG Manual}}.
 @end ifhtml
 
+@cindex header field, @samp{Fcc:}
 @cindex @samp{Fcc:} header field
-@cindex header field, @samp{Fcc:}
 @vindex pgg-encrypt-for-me
 
 In particular, I turn on the option @code{pgg-encrypt-for-me} so that
@@ -5249,8 +5541,8 @@
 @node Sending Message, Killing Draft, Checking Recipients, Editing Drafts
 @section Sending a Message
 
+@cindex buffers, @samp{*MH-E Mail Delivery*}
 @cindex @samp{*MH-E Mail Delivery*}
-@cindex buffers, @samp{*MH-E Mail Delivery*}
 @cindex sending mail
 @findex mh-send-letter
 @kindex C-c C-c
@@ -5263,6 +5555,8 @@
 
 @cindex sending mail
 @cindex spell check
+@findex ispell-message
+@kindex C-c C-c
 @vindex mh-before-send-letter-hook
 
 The hook @code{mh-before-send-letter-hook} is run at the beginning of
@@ -5381,12 +5675,14 @@
 @code{nil}).
 @end vtable
 
-@heading Adding Addresses to Draft
+@subheading Adding Addresses to Draft
 
 You can use aliases when you are adding recipients to a message.
 
 @findex minibuffer-complete
 @kindex @key{TAB}
+@vindex mh-alias-expand-aliases-flag
+@vindex mh-compose-prompt-flag
 
 In order to use minibuffer prompting for recipients and the subject
 line in the minibuffer, turn on the option
@@ -5396,20 +5692,27 @@
 on the option @code{mh-alias-expand-aliases-flag} if you want these
 aliases to be expanded to their respective addresses in the draft.
 
+@findex mh-letter-complete
+@findex mh-letter-complete-or-space
+@kindex @key{SPC}
+@kindex M-@key{TAB}
+
 Otherwise, you can complete aliases in the header of the draft with
 @kbd{M-@key{TAB}} (@code{mh-letter-complete}) or @key{SPC}
 (@code{mh-letter-complete-or-space}).
 
+@vindex mh-alias-completion-ignore-case-flag
+
 As MH ignores case in the aliases, so too does MH-E. However, you may
 turn off the option @code{mh-alias-completion-ignore-case-flag} to
 make case significant which can be used to segregate completion of
 your aliases. You might use uppercase for mailing lists and lowercase
 for people. For example, you might have:
 
-@example
+@smallexample
 mark.baushke: Mark Baushke <mdb@@stop.mail-abuse.org>
 MH-E: MH-E Mailing List <mh-e-devel@@stop.mail-abuse.org>
-@end example
+@end smallexample
 
 When this option is turned off, if you were to type @kbd{M} in the
 @samp{To:} field and then @kbd{M-@key{TAB}}, then you'd get the list;
@@ -5418,6 +5721,11 @@
 only. If you were to enter @kbd{Mark.Baushke}, it would still be
 identified with your @samp{mark.baushke} alias.
 
+@findex mh-alias-minibuffer-confirm-address
+@findex mh-letter-confirm-address
+@vindex mh-alias-flash-on-comma
+@vindex mh-compose-prompt-flag
+
 To verify that the alias you've entered is valid, the alias will be
 displayed in the minibuffer when you type a comma
 (@code{mh-letter-confirm-address} or
@@ -5431,7 +5739,7 @@
 For another way to verify the alias expansion, see @ref{Checking
 Recipients}.
 
-@heading Loading Aliases
+@subheading Loading Aliases
 
 @cindex @command{ali}
 @cindex @file{/etc/nmh/MailAliases}
@@ -5457,15 +5765,19 @@
 name is present in the password file. Otherwise, the alias will have
 the form @samp{local.@var{login}}.
 
+@vindex mh-alias-local-users-prefix
+
 The prefix @samp{local.} can be modified via the option
 @code{mh-alias-local-users-prefix}. This option can also be set to
 @samp{Use Login}.
 
 For example, consider the following password file entry:
 
-@example
+@smallexample
 psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh
-@end example
+@end smallexample
+
+@vindex mh-alias-local-users-prefix
 
 The following settings of option @code{mh-alias-local-users-prefix}
 will produce the associated aliases:
@@ -5481,6 +5793,8 @@
 psg
 @end table
 
+@vindex mh-alias-passwd-gecos-comma-separator-flag
+
 In the example above, commas are used to separate different values
 within the so-called GECOS field. This is a fairly common usage.
 However, in the rare case that the GECOS field in your password file
@@ -5488,8 +5802,9 @@
 can turn the option @code{mh-alias-passwd-gecos-comma-separator-flag}
 off.
 
+@cindex NIS, obtaining local aliases from
 @cindex @samp{ypcat passwd}
-@cindex NIS, obtaining local aliases from
+@vindex mh-alias-local-users
 
 If you're on a system with thousands of users you don't know, and the
 loading of local aliases slows MH-E down noticeably, then the local
@@ -5498,18 +5813,25 @@
 executed to generate the password file. For example, use @samp{ypcat
 passwd} to obtain the NIS password file.
 
+@findex mh-alias-reload
+@kindex M-x mh-alias-reload
+@vindex mh-alias-reloaded-hook
+
 Since aliases are updated frequently, MH-E reloads aliases
 automatically whenever an alias lookup occurs if an alias source has
 changed. However, you can reload your aliases manually by calling the
 command @kbd{M-x mh-alias-reload} directly. This command runs
 @code{mh-alias-reloaded-hook} after the aliases have been loaded.
 
-@heading Adding Aliases
+@subheading Adding Aliases
 
 In the past, you have manually added aliases to your alias file(s)
 listed in your @samp{Aliasfile:} profile component. MH-E provides
 other methods for maintaining your alias file(s).
 
+@findex mh-alias-add-alias
+@kindex M-x mh-alias-add-alias
+
 You can use the @kbd{M-x mh-alias-add-alias} command which will prompt
 you for the alias and address that you would like to add. If the alias
 exists already, you will have the choice of inserting the new alias
@@ -5523,7 +5845,8 @@
 might use prefixes for locales, jobs, or activities. For example, I
 have:
 
-@example
+@smallexample
+@group
 ; Work
 attensity.don.mitchell: Don Mitchell <dmitchell@@stop.mail-abuse.com>
 isharp.don.mitchell: Don Mitchell <donaldsmitchell@@stop.mail-abuse.com>
@@ -5535,12 +5858,16 @@
 ; Personal
 ariane.kolkmann: Ariane Kolkmann <ArianeKolkmann@@stop.mail-abuse.com>
 ...
-@end example
+@end group
+@end smallexample
 
 Using prefixes instead of postfixes helps you explore aliases during
 completion. If you forget the name of an old dive buddy, you can enter
 @samp{div} and then @key{SPC} to get a listing of all your dive buddies.
 
+@kindex M-x mh-alias-add-address-under-point
+@kindex M-x mh-alias-grab-from-field
+
 An alias for the sender of the current message is added automatically
 by clicking on the @samp{Grab From alias} tool bar button or by running
 the @kbd{M-x mh-alias-grab-from-field} command. Aliases for other
@@ -5548,24 +5875,33 @@
 over the desired recipient and giving the @kbd{M-x
 mh-alias-add-address-under-point} command.
 
+@vindex mh-alias-insert-file
+@vindex mh-alias-insertion-location
+
 The options @code{mh-alias-insert-file} and
 @code{mh-alias-insertion-location} controls how and where these aliases
 are inserted.
 
-The default setting of this option is @samp{Use Aliasfile Profile
-Component}. This option can also hold the name of a file or a list a
-file names. If this option is set to a list of file names, or the
-@samp{Aliasfile:} profile component contains more than one file name,
-MH-E will prompt for one of them.
+@vindex mh-alias-insert-file
+
+The default setting of option @code{mh-alias-insert-file} is @samp{Use
+Aliasfile Profile Component}. This option can also hold the name of a
+file or a list a file names. If this option is set to a list of file
+names, or the @samp{Aliasfile:} profile component contains more than
+one file name, MH-E will prompt for one of them.
+
+@vindex mh-alias-insertion-location
 
 The option @code{mh-alias-insertion-location} is set to
 @samp{Alphabetical} by default. If you organize your alias file in
 other ways, then the settings @samp{Top} and @samp{Bottom} might be
 more appropriate.
 
-@heading Querying Aliases
+@subheading Querying Aliases
 
 @cindex regular expressions, @code{mh-alias-apropos}
+@findex mh-alias-apropos
+@kindex M-x mh-alias-apropos
 
 If you can't quite remember an alias, you can use @kbd{M-x
 mh-alias-apropos} to show all aliases or addresses that match a
@@ -5591,6 +5927,9 @@
 This means that you can easily have a different header and signature
 at home and at work.
 
+@cindex @samp{Identity} menu
+@cindex menu, @samp{Identity}
+
 A couple of commands are used to insert identities in MH-Letter mode
 which are also found in the @samp{Identity} menu.
 
@@ -5639,6 +5978,8 @@
 context are the @samp{From:} and @samp{Organization:} fields, as well
 as the signature.
 
+@vindex mh-identity-list
+
 This is done by customizing the option @code{mh-identity-list}. In the
 customization buffer for this option, click on the @samp{INS} button
 and enter a label such as @samp{Home} or @samp{Work}. Then click on
@@ -5682,18 +6023,21 @@
 
 @cindex Identity menu
 @cindex menu, Identity
+@findex mh-insert-identity
+@kindex C-c C-d
 
 You can select the identities you have added via the menu called
 @samp{Identity} in the MH-Letter buffer. You can also use @kbd{C-c
 C-d} (@code{mh-insert-identity}). To clear the fields and signature
 added by the identity, select the @samp{None} identity.
 
-@cindex @samp{Identity > Save as Default} menu item
+@cindex menu item, @samp{Identity > Customize Identities}
 @cindex menu item, @samp{Identity > Save as Default}
-@cindex @samp{Identity > Set Default for Session} menu item
 @cindex menu item, @samp{Identity > Set Default for Session}
 @cindex @samp{Identity > Customize Identities} menu item
-@cindex menu item, @samp{Identity > Customize Identities}
+@cindex @samp{Identity > Save as Default} menu item
+@cindex @samp{Identity > Set Default for Session} menu item
+@vindex mh-identity-default
 
 The @samp{Identity} menu contains two other items to save you from
 having to set the identity on every message. The menu item @samp{Set
@@ -5706,6 +6050,7 @@
 Identities} is available for your convenience.
 
 @cindex regular expressions, @code{mh-auto-fields-list}
+@vindex mh-auto-fields-list
 
 The option @code{mh-auto-fields-list} can also be used to set the
 identity depending on the recipient to provide even more control. To
@@ -5754,6 +6099,10 @@
 Other header fields may be added using this menu item. 
 @end table
 
+@findex mh-insert-auto-fields
+@kindex C-c M-d
+@vindex mh-auto-fields-prompt-flag
+
 These fields can only be added after the recipient is known. Because
 you can continue to add recipients as you edit the draft, MH-E waits
 until the message is sent to perform the auto-insertions. This seems
@@ -5770,10 +6119,16 @@
 manually. However, if you use this command, the automatic insertion
 when the message is sent is disabled.
 
+@vindex mh-auto-fields-list
+@vindex mh-identity-list
+
 You should avoid using the same header field in
 @code{mh-auto-fields-list} and @code{mh-identity-list} definitions
 that may apply to the same message as the result is undefined.
 
+@vindex mh-identity-handlers
+@vindex mh-identity-list
+
 The option @code{mh-identity-handlers} is used to change the way that
 fields, signatures, and attributions in @code{mh-identity-list} are
 added. To customize @code{mh-identity-handlers}, replace the name of
@@ -5782,6 +6137,8 @@
 click on an @samp{INS} button and insert a field of your choice and
 the name of the function you have written to handle it. 
 
+@vindex mh-identity-list
+
 The @samp{Field} field can be any field that you've used in your
 @code{mh-identity-list}. The special fields @samp{:attribution-verb},
 @samp{:signature}, or @samp{:pgg-default-user-id} are used for the
@@ -5802,6 +6159,10 @@
 
 @cindex folder navigation
 @cindex speedbar
+@findex mh-visit-folder
+@kindex F v
+@kindex M-x speedbar
+@kindex Mouse-2
 
 You can also use the speedbar 
 @ifnothtml
@@ -5848,6 +6209,10 @@
 count before the next automatic update (@code{mh-speed-refresh}).
 @end table
 
+@findex delete-frame
+@kindex C-x 5 0
+@kindex Mouse-3
+
 You can click on @kbd{Mouse-3} to bring up a context menu that
 contains these items. Dismiss the speedbar with @kbd{C-x 5 0}
 (@code{delete-frame}).
@@ -5890,8 +6255,12 @@
 @node Menu Bar, Tool Bar, Speedbar, Top
 @chapter The Menu Bar
 
-@cindex menu bar
-
+@cindex @samp{Folder} menu
+@cindex @samp{Identity} menu
+@cindex @samp{Letter} menu
+@cindex @samp{Message} menu
+@cindex @samp{Search} menu
+@cindex @samp{Sequence} menu
 @cindex Folder menu
 @cindex Identity menu
 @cindex Letter menu
@@ -5901,12 +6270,19 @@
 @cindex Message menu
 @cindex Search menu
 @cindex Sequence menu
+@cindex menu bar
 @cindex menu, Folder
 @cindex menu, Identity
 @cindex menu, Letter
 @cindex menu, Message
 @cindex menu, Search
 @cindex menu, Sequence
+@cindex menu, @samp{Folder}
+@cindex menu, @samp{Identity}
+@cindex menu, @samp{Letter}
+@cindex menu, @samp{Message}
+@cindex menu, @samp{Search}
+@cindex menu, @samp{Sequence}
 @cindex modes, MH-Folder
 @cindex modes, MH-Letter
 @cindex modes, MH-Search
@@ -5940,8 +6316,6 @@
 @chapter The Tool Bar
 
 @cindex tool bar
-@cindex @samp{mh-tool-bar} customization group
-@cindex customization group, @samp{mh-tool-bar}
 
 Emacs also provides a graphical tool bar. For a description of the
 tool bar, please
@@ -5954,6 +6328,9 @@
 Tool Bars} in @cite{The GNU Emacs Manual}.
 @end ifhtml
 
+@cindex @samp{mh-tool-bar} customization group
+@cindex customization group, @samp{mh-tool-bar}
+
 MH-E adds several icons to this tool bar; you can modify the MH-E
 aspects of the tool bar via the @samp{mh-tool-bar} customization group.
 
@@ -5981,6 +6358,9 @@
 bar. In XEmacs, you have the opportunity to create a separate tool bar for
 the MH-E icons.
 
+@vindex mh-tool-bar-folder-buttons
+@vindex mh-tool-bar-letter-buttons
+
 In either case, you can select which of these functions you'd like to
 see by customizing the options @code{mh-tool-bar-folder-buttons} and
 @code{mh-tool-bar-letter-buttons}. As you probably guessed, the former
@@ -5989,18 +6369,25 @@
 check the functions whose icons you want to see and clear the check
 boxes for those you don't.
 
+@findex mh-search
+@vindex mh-tool-bar-search-function
+
 The function associated with the searching icon can be set via the
 option @code{mh-tool-bar-search-function}. By default, this is set to
 @code{mh-search}. @xref{Searching}. You can also choose @samp{Other
 Function} from the @samp{Value Menu} and enter a function of your own
 choosing.
 
+@vindex mh-xemacs-use-tool-bar-flag
+
 XEmacs provides a couple of extra options. The first,
 @code{mh-xemacs-use-tool-bar-flag}, controls whether to show the MH-E
 icons at all. By default, this option is turned on if the window
 system supports tool bars. If your system doesn't support tool bars,
 then you won't be able to turn on this option.
 
+@vindex mh-xemacs-tool-bar-position
+
 The second extra option is @code{mh-xemacs-tool-bar-position} which
 controls the placement of the tool bar along the four edges of the
 frame. You can choose from one of @samp{Same As Default Tool Bar},
@@ -6012,8 +6399,9 @@
 @node Searching, Threading, Tool Bar, Top
 @chapter Searching Through Messages
 
+@cindex @samp{Search} menu
+@cindex menu, @samp{Search}
 @cindex searching
-
 @findex mh-search
 @kindex F s
 
@@ -6157,12 +6545,18 @@
 Folder heading face in MH-Folder buffers created by searches.
 @end vtable
 
+@findex mh-search-folder
+@kindex F s
+
 The command @kbd{F s} (@code{mh-search-folder}) helps you find
 messages in your entire corpus of mail. You can search for messages to
 or from a particular person or about a particular subject. In fact,
 you can also search for messages containing selected strings in any
 arbitrary header field or any string found within the messages.
 
+@cindex @command{pick}
+@cindex MH commands, @command{pick}
+
 Out of the box, MH-E uses @command{pick} to find messages. With a
 little extra effort, you can set an indexing program which rewards you
 with extremely quick results. The drawback is that sometimes the index
@@ -6180,23 +6574,23 @@
 
 @cartouche
 @smallexample
-From: #
+From:
 To:
 Cc:
 Date:
 Subject:
 --------
-
-
-
-
-
-
-
-
-
---:**  search-pattern   (MH-Search)--L1--All-----------------------------
-
+#
+
+
+
+
+
+
+
+
+--:**  search-pattern   All L7     (MH-Search)---------------------------
+Type C-c C-c to search messages, C-c C-p to use pick, C-c ? for help
 @end smallexample
 @end cartouche
 @i{Search window}
@@ -6229,26 +6623,25 @@
 @end group
 @end smallexample
 
+@findex mh-to-field
+@kindex C-c C-f C-t
+
 As with MH-Letter mode, MH-Search provides commands like @kbd{C-c C-f
 C-t} (@code{mh-to-field}) to help you fill in the blanks.
 @xref{Editing Message}.
 
+@kindex F s
+@vindex mh-search-mode-hook
+
 If you find that you do the same thing over and over when editing the
 search template, you may wish to bind some shortcuts to keys. This can
 be done with the variable @code{mh-search-mode-hook}, which is called
 when @kbd{F s} is run on a new pattern.
 
-@cindex @samp{+mhe-index}
-@cindex folders, @samp{+mhe-index}
 @findex mh-index-do-search
-@findex mh-index-next-folder
-@findex mh-index-previous-folder
 @findex mh-pick-do-search
-@kindex @key{TAB}
 @kindex C-c C-c
-@kindex F s
-@kindex S-@key{TAB}
-@vindex mh-search-folder
+@kindex C-c C-p
 
 To perform the search, type @kbd{C-c C-c} (@code{mh-index-do-search}).
 Sometimes you're searching for text that is either not indexed, or
@@ -6256,6 +6649,14 @@
 method with the pick method by running the command @kbd{C-c C-p}
 (@code{mh-pick-do-search}).
 
+@cindex folders, @samp{+mhe-index}
+@cindex @samp{+mhe-index}
+@findex mh-index-next-folder
+@findex mh-index-previous-folder
+@kindex @key{TAB}
+@kindex S-@key{TAB}
+@vindex mh-search-folder
+
 The messages that are found are put in a temporary sub-folder of
 @samp{+mhe-index} and are displayed in an MH-Folder buffer. This
 buffer is special because it displays messages from multiple folders;
@@ -6266,6 +6667,11 @@
 (@code{mh-index-next-folder}) and @kbd{S-@key{TAB}}
 (@code{mh-index-previous-folder}).
 
+@findex mh-index-visit-folder
+@findex mh-rescan-folder
+@kindex F r
+@kindex v
+
 In addition, the command @kbd{v} (@code{mh-index-visit-folder}) can be
 used to visit the folder of the message at point. Initially, only the
 messages that matched the search criteria are displayed in the folder.
@@ -6275,10 +6681,15 @@
 interesting message, or to view surrounding messages with the command
 @kbd{F r} @code{mh-rescan-folder}. @xref{Folders}.
 
+@findex mh-kill-folder
+@kindex F k
+
 Because this folder is temporary, you'll probably get in the habit of
 killing it when you're done with @kbd{F k} (@code{mh-kill-folder}).
 @xref{Folders}.
 
+@kindex F s
+
 You can regenerate the results by running @kbd{F s} with a prefix
 argument.
 
@@ -6434,7 +6845,7 @@
 daily from cron:
 
 @smallexample
-    swish-e -c /home/user/Mail/.swish/config
+swish-e -c /home/user/Mail/.swish/config
 @end smallexample
 
 @subsection mairix
@@ -6536,6 +6947,10 @@
 limiting (@pxref{Limits}) or using full-text indexed searches
 (@pxref{Searching}).
 
+@cindex root, in threads
+@cindex siblings, in threads
+@cindex ancestor, in threads
+
 A thread begins with a single message called a @dfn{root}. All replies
 to the same message are @dfn{siblings} of each other. Any message that
 has replies to it is an @dfn{ancestor} of those replies.
@@ -6581,6 +6996,9 @@
 Display ancestor of current message (@code{mh-thread-ancestor}).
 @end table
 
+@cindex @samp{mh-thread} customization group
+@cindex customization group, @samp{mh-thread}
+
 The @samp{mh-thread} customization group contains one option.
 
 @vtable @code
@@ -6588,6 +7006,11 @@
 On means new folders start in threaded mode (default: @samp{off}).
 @end vtable
 
+@findex mh-toggle-threads
+@kindex T t
+@vindex mh-large-folder
+@vindex mh-show-threads-flag
+
 Threading large number of messages can be time consuming so the option
 @code{mh-show-threads-flag} is turned off by default. If you turn on
 this option, then threading will be done only if the number of
@@ -6595,6 +7018,13 @@
 event, threading can be turned on (and off) with the command @kbd{T t}
 (@code{mh-toggle-threads}).
 
+@findex mh-thread-ancestor
+@findex mh-thread-next-sibling
+@findex mh-thread-previous-sibling
+@kindex T n
+@kindex T p
+@kindex T u
+
 There are a few commands to help you navigate threads. If you do not
 care for the way a particular thread has turned, you can move up the
 chain of messages with the command @kbd{T u}
@@ -6604,6 +7034,13 @@
 sibling, skipping the sub-threads. The command @kbd{T u} can also take
 a prefix argument to jump to the message that started everything.
 
+@findex mh-delete-subject-or-thread
+@findex mh-thread-delete
+@findex mh-thread-refile
+@kindex k
+@kindex T d
+@kindex T o
+
 There are threaded equivalents for the commands that delete and refile
 messages. For example, @kbd{T o} (@code{mh-thread-refile}) refiles the
 current message and all its children. Similarly, the command @kbd{T d}
@@ -6612,11 +7049,13 @@
 @xref{Navigating}, for a description of the similar command @kbd{k}
 (@code{mh-delete-subject-or-thread}).
 
+@vindex mh-large-folder
+
 If you find that threading is too slow, it may be that you have
-@code{mh-large-folder} set too high. Threading is one of the few
+@code{mh-large-folder} set too high. Also, threading is one of the few
 features of MH-E that really benefits from compiling. If you haven't
-compiled MH-E, I encourage you to do so@footnote{If you're not sure
-if MH-E has been byte-compiled, you could try running @samp{locate
+compiled MH-E, I encourage you to do so@footnote{If you're not sure if
+MH-E has been byte-compiled, you could try running @samp{locate
 mh-thread.elc} or otherwise find MH-E on your system and ensure that
 @file{mh-thread.elc} exists. If you have multiple versions and you
 find that one is compiled but the other is not, then go into your
@@ -6695,18 +7134,32 @@
 
 @cindex @command{pick}
 @cindex MH commands, @command{pick}
-
-The commands @kbd{/ c}, @code{/ m}, @code{/ s}, and @code{/ t}
-restrict the display to messages matching the content of the
-respective field in the current message. However, you can give any of
-these a prefix argument to edit the @command{pick} expression used to
-narrow the view@footnote{See @command{pick}(1) or the section
+@findex mh-narrow-to-cc
+@findex mh-narrow-to-from
+@findex mh-narrow-to-subject
+@findex mh-narrow-to-to
+@kindex / c
+@kindex / m
+@kindex / s
+@kindex / t
+
+The commands @kbd{/ c} (@code{mh-narrow-to-cc}), @kbd{/ m}
+(@code{mh-narrow-to-from}), @kbd{/ s} (@code{mh-narrow-to-subject}),
+and @kbd{/ t} (@code{mh-narrow-to-to}) restrict the display to
+messages matching the content of the respective field in the current
+message. However, you can give any of these a prefix argument to edit
+the @command{pick} expression used to narrow the view@footnote{See
+@command{pick}(1) or the section
 @uref{@value{MH-BOOK-HOME}/finpic.htm, Finding Messages with pick} in
 the MH book.}.
 
 @cindex @samp{tick} sequence
 @cindex sequence, @samp{tick}
 @cindex ticked messages, viewing
+@findex mh-narrow-to-range
+@findex mh-narrow-to-tick
+@kindex / '
+@kindex / g
 
 You can also limit the display to messages in the @samp{tick} sequence
 with the command @kbd{/ '} (@code{mh-narrow-to-tick}).
@@ -6714,12 +7167,17 @@
 @samp{tick} sequence. Use the @kbd{/ g} (@code{mh-narrow-to-range})
 command to limit the display to messages in a range (@pxref{Ranges}).
 
+@findex mh-widen
+@kindex / w
+
 Each limit can be undone in turn with the @kbd{/ w} (@code{mh-widen})
 command. Give this command a prefix argument to remove all limits.
 
 @node Sequences, Junk, Limits, Top
 @chapter Using Sequences
 
+@cindex @samp{Sequence} menu
+@cindex menu, @samp{Sequence}
 @cindex sequences
 
 For the whole scoop on MH sequences, refer to
@@ -6835,6 +7293,8 @@
 
 @cindex @command{pick}
 @cindex MH commands, @command{pick}
+@findex mh-put-msg-in-seq
+@kindex S p
 
 To place a message in a sequence, use @kbd{S p}
 (@code{mh-put-msg-in-seq}). Give @kbd{S p} a range and you can add all
@@ -6844,11 +7304,18 @@
 @cindex @samp{tick} sequence
 @cindex sequence, @samp{tick}
 @cindex ticking messages
+@findex mh-index-ticked-messages
+@findex mh-toggle-tick
+@kindex '
+@kindex F '
+@kindex S p
 
 One specific use of the @kbd{S p} command is @kbd{'}
 (@code{mh-toggle-tick}) which adds messages to the @samp{tick}
-sequence. This sequence can be viewed later with the @kbd{F '} command
-(@pxref{Folders}).
+sequence. This sequence can be viewed later with the @kbd{F '}
+(@code{mh-index-ticked-messages}) command (@pxref{Folders}).
+
+@vindex mh-tick-seq
 
 You can customize the option @code{mh-tick-seq} if you already use the
 @samp{tick} sequence for your own use. You can also disable all of the
@@ -6857,6 +7324,12 @@
 
 @cindex MH-Folder mode
 @cindex modes, MH-Folder
+@findex mh-narrow-to-seq
+@findex mh-narrow-to-tick
+@findex mh-widen
+@kindex S '
+@kindex S n
+@kindex S w
 
 Once you've placed some messages in a sequence, you may wish to narrow
 the field of view to just those messages in the sequence you've
@@ -6869,8 +7342,12 @@
 widen the view to all your messages again, use @kbd{S w}
 (@code{mh-widen}).
 
+@cindex buffers, @samp{*MH-E Sequences*}
 @cindex @samp{*MH-E Sequences*}
-@cindex buffers, @samp{*MH-E Sequences*}
+@findex mh-list-sequences
+@findex mh-msg-is-in-seq
+@kindex S l
+@kindex S s
 
 You can see which sequences in which a message appears with the
 command @kbd{S s} (@code{mh-msg-is-in-seq}). Use a prefix argument to
@@ -6880,11 +7357,12 @@
 (@code{mh-list-sequences}). The list appears in a buffer named
 @samp{*MH-E Sequences*} (@pxref{Miscellaneous}).
 
-@cindex @samp{Previous-Sequence:} MH profile component
+@cindex MH profile component, @samp{Previous-Sequence:}
 @cindex @samp{cur} sequence
-@cindex MH profile component, @samp{Previous-Sequence:}
+@cindex @samp{Previous-Sequence:} MH profile component
+@cindex sequence, @samp{cur}
 @cindex sequence, @samp{Previous-Sequence}
-@cindex sequence, @samp{cur}
+@vindex mh-refile-preserves-sequences-flag
 
 If a message is in any sequence (except
 @samp{Previous-Sequence:}@footnote{See @samp{mh-profile}(5)).} and
@@ -6892,6 +7370,12 @@
 sequences in the destination folder. If this behavior is not desired,
 then turn off the option @code{mh-refile-preserves-sequences-flag}.
 
+@findex mh-delete-msg-from-seq
+@findex mh-delete-seq
+@kindex d
+@kindex S d
+@kindex S k
+
 If you want to remove a message (or range, @pxref{Ranges}) from a
 sequence, use @kbd{S d} (@code{mh-delete-msg-from-seq}). If you want
 to delete an entire sequence, use @kbd{S k} (@code{mh-delete-seq}). In
@@ -6901,8 +7385,18 @@
 Mail}).
 
 @cindex @samp{Unseen-Sequence:} MH profile component
+@cindex @samp{cur} sequence
+@cindex @samp{tick} sequence
 @cindex MH profile component, @samp{Unseen-Sequence:}
 @cindex sequence, @samp{Unseen-Sequence}
+@cindex sequence, @samp{cur}
+@cindex sequence, @samp{tick}
+@findex mh-update-sequences
+@kindex M-x mh-update-sequences
+@kindex q
+@kindex x
+@vindex mh-tick-seq
+@vindex mh-update-sequences-after-mh-show-flag
 
 Three sequences are maintained internally by MH-E and pushed out to MH
 when a message is shown. They include the sequence specified by your
@@ -6923,6 +7417,8 @@
 
 @cindex @command{mark}
 @cindex MH commands, @command{mark}
+@kindex S n
+@kindex S w
 
 With the exceptions of @kbd{S n} and @kbd{S w}, the underlying MH
 command dealing with sequences is @command{mark}@footnote{See the
@@ -7005,6 +7501,8 @@
 to work well with MH-E and how to use MH-E's interface that provides
 continuing education for these programs.
 
+@vindex mh-junk-program
+
 The default setting of the option @code{mh-junk-program} is
 @samp{Auto-detect} which means that MH-E will automatically choose one
 of SpamAssassin, bogofilter, or SpamProbe in that order. If, for
@@ -7012,6 +7510,10 @@
 want to use bogofilter, then you can set this option to
 @samp{Bogofilter}.
 
+@findex mh-junk-blacklist
+@kindex J b
+@vindex mh-junk-disposition
+
 The command @kbd{J b} (@code{mh-junk-blacklist}) trains the spam
 program in use with the content of the range (@pxref{Ranges}) and then
 handles the message(s) as specified by the option
@@ -7019,11 +7521,16 @@
 @samp{Delete Spam} but you can also specify the name of the folder
 which is useful for building a corpus of spam for training purposes.
 
+@findex mh-junk-whitelist
+@kindex J w
+
 In contrast, the command @kbd{J w} (@code{mh-junk-whitelist})
 reclassifies a range of messages (@pxref{Ranges}) as ham if it were
 incorrectly classified as spam. It then refiles the message into the
 @file{+inbox} folder.
 
+@vindex mh-junk-background
+
 By default, the programs are run in the foreground, but this can be
 slow when junking large numbers of messages. If you have enough memory
 or don't junk that many messages at the same time, you might try
@@ -7035,7 +7542,10 @@
 @cindex @file{.procmailrc}
 @cindex files, @file{.procmailrc}
 
-@heading SpamAssassin
+@subheading SpamAssassin
+
+@cindex Spamassassin
+@cindex spam filters, Spamassassin
 
 SpamAssassin is one of the more popular spam filtering programs. Get
 it from your local distribution or from the
@@ -7088,6 +7598,11 @@
 rules-based filters is a plethora of false positives so it is
 worthwhile to check.
 
+@findex mh-junk-blacklist
+@findex mh-junk-whitelist
+@kindex J b
+@kindex J w
+
 If SpamAssassin classifies a message incorrectly, or is unsure, you can
 use the MH-E commands @kbd{J b} (@code{mh-junk-blacklist}) and
 @kbd{J w} (@code{mh-junk-whitelist}).
@@ -7133,7 +7648,10 @@
 0 * * * *	sa-learn --rebuild > /dev/null 2>&1
 @end smallexample
 
-@heading Bogofilter
+@subheading Bogofilter
+
+@cindex bogofilter
+@cindex spam filters, bogofilter
 
 Bogofilter is a Bayesian spam filtering program. Get it from your
 local distribution or from the
@@ -7179,6 +7697,11 @@
 spam/unsure/.
 @end smallexample
 
+@findex mh-junk-blacklist
+@findex mh-junk-whitelist
+@kindex J b
+@kindex J w
+
 If bogofilter classifies a message incorrectly, or is unsure, you can
 use the MH-E commands @kbd{J b} (@code{mh-junk-blacklist}) and @kbd{J
 w} (@code{mh-junk-whitelist}) to update bogofilter's training.
@@ -7195,7 +7718,10 @@
 The @cite{Bogofilter tuning HOWTO} describes how you can fine-tune
 bogofilter.
 
-@heading SpamProbe
+@subheading SpamProbe
+
+@cindex SpamProbe
+@cindex spam filters, SpamProbe
 
 SpamProbe is a Bayesian spam filtering program. Get it from your local
 distribution or from the @uref{http://spamprobe.sourceforge.net,
@@ -7222,11 +7748,16 @@
 spam/.
 @end smallexample
 
+@findex mh-junk-blacklist
+@findex mh-junk-whitelist
+@kindex J b
+@kindex J w
+
 If SpamProbe classifies a message incorrectly, you can use the MH-E
 commands @kbd{J b} (@code{mh-junk-blacklist}) and @kbd{J w}
 (@code{mh-junk-whitelist}) to update SpamProbe's training.
 
-@heading Other Things You Can Do
+@subheading Other Things You Can Do
 
 There are a couple of things that you can add to @file{~/.procmailrc}
 in order to filter out a lot of spam and viruses. The first is to
@@ -7286,10 +7817,11 @@
 system.
 @end ftable
 
-@cindex @samp{*MH-E Info*}
+@cindex buffers, @samp{*MH-E Info*}
 @cindex MH-E version
-@cindex buffers, @samp{*MH-E Info*}
+@cindex @samp{*MH-E Info*}
 @cindex version
+@kindex M-x mh-version
 
 One command worth noting is @kbd{M-x mh-version}. You can compare the
 version this command prints to the latest release (@pxref{Getting
@@ -7297,7 +7829,7 @@
 @samp{*MH-E Info*}, should usually be included with any bug report you
 submit (@pxref{Bug Reports}).
 
-@heading MH-E Buffers
+@subheading MH-E Buffers
 
 Besides the MH-Folder, MH-Show, and MH-Letter buffers, MH-E creates
 several other buffers. They are:
@@ -7354,7 +7886,7 @@
 @c -------------------------
 @cindex @samp{*mh-temp*}
 @cindex buffers, @samp{*mh-temp*}
-@item *mh-temp
+@item *mh-temp*
 This is a scratch, ephemeral, buffer used by MH-E functions. Note that
 it is hidden because the first character in the name is a space.
 You'll generally not have any need for this buffer.
@@ -7389,9 +7921,7 @@
 Program used to scan messages (default: @code{"scan"}).
 @end vtable
 
-@findex mh-set-cmd-note
 @vindex mh-adaptive-cmd-note-flag
-@vindex mh-scan-format-file
 
 There are a couple of caveats when creating your own scan format file.
 First, MH-E will not work if your scan lines do not include message
@@ -7401,6 +7931,9 @@
 (@pxref{Threading}).
 
 @cindex message numbers
+@findex mh-set-cmd-note
+@vindex mh-adaptive-cmd-note-flag
+@vindex mh-scan-format-file
 
 If you've created your own format to handle long message numbers,
 you'll be pleased to know you no longer need it since MH-E adapts its
@@ -7411,8 +7944,10 @@
 format file (see @code{mh-scan-format-file}). For example, the default
 width is 4, so you would use @samp{(mh-set-cmd-note 4)}.
 
+@vindex mh-adaptive-cmd-note-flag
+@vindex mh-scan-format-file
+@vindex mh-scan-format-mh
 @vindex mh-scan-format-nmh
-@vindex mh-scan-format-mh
 
 The default setting for @code{mh-scan-format-file} is @samp{Use MH-E
 scan Format}. This means that the format string will be taken from the
@@ -7425,6 +7960,10 @@
 you can set this option to @samp{Specify a scan Format File} and enter
 the name of your format file.
 
+@vindex mh-scan-format-file
+@vindex mh-scan-format-mh
+@vindex mh-scan-format-nmh
+
 The scan format that MH-E uses when @code{mh-scan-format-file} is set
 to its default of @samp{Use MH-E scan Format} is held in the variables
 @code{mh-scan-format-nmh} and @code{mh-scan-format-mh} depending on
@@ -7448,8 +7987,9 @@
  "%(decode@{subject@})%<@{body@}<<%@{body@}%>")
 @end smallexample
 
+@cindex decoding RFC 2047
 @cindex RFC 2047, decoding
-@cindex decoding RFC 2047
+@vindex mh-scan-format-mh
 
 The setting for @code{mh-scan-format-mh} is similar, except that MH
 doesn't have the function @code{decode} (which is used to decode RFC
@@ -7484,6 +8024,8 @@
 pick Ranges Sequences} in the MH book.}.
 
 @cindex regular expressions, scan line formats
+@findex mh-set-cmd-note
+@findex setq
 
 If you change the format of the scan lines you'll need to tell MH-E
 how to parse the new format. As you will see, quite a lot of variables
@@ -7521,8 +8063,6 @@
 
 Next, many variables control how the scan lines are parsed.
 
-@vindex mh-folder-font-lock-keywords
-
 @vtable @code
 @vindex mh-folder-body
 @vindex mh-folder-font-lock-keywords
@@ -7693,6 +8233,8 @@
 the scan lines.
 
 @vtable @code
+@findex mh-set-cmd-note
+@vindex mh-adaptive-cmd-note-flag
 @item mh-cmd-note
 Column for notations (default: 4). This variable should be set with
 the function @code{mh-set-cmd-note}. This variable may be updated
@@ -7704,10 +8246,12 @@
 Messages that have been copied are marked by this character (default:
 @code{?C}).
 @c -------------------------
+@vindex mh-scan-cur-msg-number-regexp
 @item mh-note-cur
 The current message (in MH, not in MH-E) is marked by this character
 (default: @code{?+}). See also @code{mh-scan-cur-msg-number-regexp}.
 @c -------------------------
+@vindex mh-scan-deleted-msg-regexp
 @item mh-note-deleted
 Messages that have been deleted are marked by this character (default:
 @code{?D}). See also @code{mh-scan-deleted-msg-regexp}.
@@ -7724,6 +8268,7 @@
 Messages that have been printed are marked by this character (default:
 @code{?P}).
 @c -------------------------
+@vindex mh-scan-refiled-msg-regexp
 @item mh-note-refiled
 Messages that have been refiled are marked by this character (default:
 @code{?^}). See also @code{mh-scan-refiled-msg-regexp}.
@@ -7743,10 +8288,12 @@
 format places a @samp{+} after the message number for the current
 message according to MH; it also uses that column for notations.
 
-@example
+@smallexample
 %20(decode(friendly@{from@})) %50(decode@{subject@})  %4(msg)%<(cur)+%| %>
-@end example
-
+@end smallexample
+
+@vindex mh-adaptive-cmd-note-flag
+@vindex mh-scan-format-file
 @vindex mh-scan-format-file, example
 
 The first thing you have to do is tell MH-E to use this file.
@@ -7759,9 +8306,9 @@
 
 @vindex mh-scan-valid-regexp, example
 
-@lisp
+@smalllisp
 (setq mh-scan-valid-regexp "[0-9]+[+D^ ]$")
-@end lisp
+@end smalllisp
 
 Now, in order to get rid of the @samp{Cursor not pointing to message}
 message, you need to tell MH-E how to access the message number. You
@@ -7771,18 +8318,18 @@
 @vindex mh-scan-msg-number-regexp, example
 @vindex mh-scan-msg-search-regexp, example
 
-@lisp
+@smalllisp
 (setq mh-scan-msg-number-regexp "^.* \\([0-9]+\\)[+D^ ]$")
 (setq mh-scan-msg-search-regexp " %d[+D^ ]$")
-@end lisp
+@end smalllisp
 
 In order to get the next and previous commands working, add this.
 
 @vindex mh-scan-good-msg-regexp, example
 
-@lisp
+@smalllisp
 (setq mh-scan-good-msg-regexp "^.* \\([0-9]+\\)[+D^ ]$")
-@end lisp
+@end smalllisp
 
 Note that the current message isn't marked with a @samp{+} when moving
 between the next and previous messages. Here is the code required to
@@ -7791,20 +8338,20 @@
 @vindex set-mh-cmd-note, example
 @vindex mh-scan-cur-msg-number-regexp, example
 
-@lisp
+@smalllisp
 (set-mh-cmd-note 76)
 (setq mh-scan-cur-msg-number-regexp "^.* \\([0-9]+\\)\\+$")
-@end lisp
+@end smalllisp
 
 Finally, add the following to delete and refile messages.
 
 @vindex mh-scan-deleted-msg-regexp, example
 @vindex mh-scan-refiled-msg-regexp, example
 
-@lisp
+@smalllisp
 (setq mh-scan-deleted-msg-regexp "^.* \\([0-9]+\\)D$")
 (setq mh-scan-refiled-msg-regexp "^.* \\([0-9]+\\)\\^$")
-@end lisp
+@end smalllisp
 
 This is just a bare minimum; it's best to adjust all of the regular
 expressions to ensure that MH-E and highlighting perform well.
@@ -7900,9 +8447,9 @@
 @samp{unseen} sequence by default, add the following line to your MH
 profile:
 
-@example
+@smallexample
 Unseen-Sequence: unseen
-@end example
+@end smallexample
 
 Now view your new messages with the speedbar (@pxref{Speedbar}) or with
 @kbd{F n} (@code{mh-index-new-messages}). @xref{Folders}.
@@ -7931,9 +8478,10 @@
 @samp{Path} box and enter @file{~/Mail} to tell Gnus where to find
 your mail.
 @c -------------------------
+@vindex mail-user-agent
 @item message-mail-user-agent
 In order to send mail within Gnus using MH-E, set this option to
-@samp{mail-user-agent} and set the @samp{mail-user-agent} option to
+@samp{mail-user-agent} and set the @code{mail-user-agent} option to
 @samp{Emacs interface to MH}.
 @c -------------------------
 @item nnmail-keep-last-article
@@ -7949,14 +8497,14 @@
 to the GnuCash mailing list, substitute one to which you are
 subscribed.
 
-@example
+@smallexample
 MAILDIR=$HOME/`mhparam Path`
 # Place mail sent to the GnuCash mailing list in gnucash.spool, where
 # Gnus will pick it up.
 :0:
 * ^TO.*gnucash.*@.*gnucash.org
 gnucash.spool
-@end example
+@end smallexample
 
 Wait for some messages to appear in @file{gnucash.spool} and run Gnus
 with @kbd{M-x gnus @key{RET}}. To view the folder created in the
@@ -7981,8 +8529,9 @@
 @node Bug Reports, Mailing Lists, Odds and Ends, Odds and Ends
 @appendixsec Bug Reports
 
+@cindex bugs
 @cindex SourceForge
-@cindex bugs
+@kindex M-x mh-version
 
 Bug reports should be filed at
 @uref{https://sourceforge.net/bugs/?group_id=13357, SourceForge}. You
@@ -8040,7 +8589,6 @@
 @cindex change log
 @cindex release notes
 
-@c intentionally wordy to avoid overfull hbox
 New MH-E releases are always available for downloading at
 @uref{https://sourceforge.net/project/showfiles.php?group_id=13357,
 SourceForge} before they appear in an Emacs release. You can read the
@@ -8050,11 +8598,12 @@
 MH-E has to offer (although we have no doubt that you will be
 extremely interested in all new releases).
 
-@cindex @samp{MH-E-NEWS}
-@cindex @samp{README}
 @cindex files, @samp{MH-E-NEWS}
 @cindex files, @samp{README}
 @cindex news
+@cindex @samp{MH-E-NEWS}
+@cindex @samp{README}
+@kindex M-x mh-version
 
 After you download and extract the MH-E tarball, read the
 @file{README} file and @file{MH-E-NEWS}. These correspond to the
@@ -8247,20 +8796,24 @@
 After a long break, Stephen handed the reins over to me in 2000. I
 moved the project to a new site called SourceForge and organized a
 great team of developers. Our first release in late 2001 was version
-6. It appeared in Emacs 21.2 and had menus and tool bar buttons.
+6. It appeared around the time of Emacs 21.2 and had menus and tool
+bar buttons.
 
 Then, indexed searches, improved MIME handling, a speedbar, multiple
 identities, alias completion, an index view of unseen messages, spam
 software support, Face and X-Image-URL header field support, Fcc
 completion, arbitrary range handling, and draft form editing were
-introduced in the version 7 series in Emacs 21.4 (2004).
+introduced in the version 7 series around the time of Emacs 21.4
+(2004). Still, Emacs itself contained version 5 of MH-E released back
+in 1994.
 
 Version 8 development was mostly driven by the rewrite of the manual.
 It also brought mailutils support, S/MIME support, picon support, and
 an improved interface for hiding header fields. The CVS repository was
 migrated from SourceForge to Savannah (only for those files that were
 already part of Emacs) and the software was completely reorganized to
-push back two decades of entropy. It appeared in Emacs 22.1 (2006).
+push back two decades of entropy. Version 8 will appear in Emacs 22.1,
+expected to be released in 2006.
 
 Bill Wohler, February 2006
 
--- a/man/org.texi	Tue Mar 14 12:15:08 2006 +0000
+++ b/man/org.texi	Sun Mar 19 19:43:57 2006 +0000
@@ -4,7 +4,7 @@
 @setfilename ../info/org
 @settitle Org Mode Manual
 
-@set VERSION 4.09
+@set VERSION 4.10
 @set DATE March 2006
 
 @dircategory Emacs
--- a/man/picture.texi	Tue Mar 14 12:15:08 2006 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,277 +0,0 @@
-@c This is part of the Emacs manual.
-@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2002, 2003,
-@c   2004, 2005, 2006 Free Software Foundation, Inc.
-@c See file emacs.texi for copying conditions.
-@node Picture, Sending Mail, Abbrevs, Top
-@chapter Editing Pictures
-@cindex pictures
-@cindex making pictures out of text characters
-@findex edit-picture
-
-  To edit a picture made out of text characters (for example, a picture
-of the division of a register into fields, as a comment in a program),
-use the command @kbd{M-x edit-picture} to enter Picture mode.
-
-  In Picture mode, editing is based on the @dfn{quarter-plane} model of
-text, according to which the text characters lie studded on an area that
-stretches infinitely far to the right and downward.  The concept of the end
-of a line does not exist in this model; the most you can say is where the
-last nonblank character on the line is found.
-
-  Of course, Emacs really always considers text as a sequence of
-characters, and lines really do have ends.  But Picture mode replaces
-the most frequently-used commands with variants that simulate the
-quarter-plane model of text.  They do this by inserting spaces or by
-converting tabs to spaces.
-
-  Most of the basic editing commands of Emacs are redefined by Picture mode
-to do essentially the same thing but in a quarter-plane way.  In addition,
-Picture mode defines various keys starting with the @kbd{C-c} prefix to
-run special picture editing commands.
-
-  One of these keys, @kbd{C-c C-c}, is particularly important.  Often a
-picture is part of a larger file that is usually edited in some other
-major mode.  @kbd{M-x edit-picture} records the name of the previous
-major mode so you can use the @kbd{C-c C-c} command
-(@code{picture-mode-exit}) later to go back to that mode.  @kbd{C-c C-c}
-also deletes spaces from the ends of lines, unless given a numeric
-argument.
-
-  The special commands of Picture mode all work in other modes (provided
-the @file{picture} library is loaded), but are not bound to keys except
-in Picture mode.  The descriptions below talk of moving ``one column''
-and so on, but all the picture mode commands handle numeric arguments as
-their normal equivalents do.
-
-@vindex picture-mode-hook
-  Turning on Picture mode runs the hook @code{picture-mode-hook}
-(@pxref{Hooks}).  Additional extensions to Picture mode can be found
-in @file{artist.el}.
-
-@menu
-* Basic Picture::         Basic concepts and simple commands of Picture Mode.
-* Insert in Picture::     Controlling direction of cursor motion
-                            after "self-inserting" characters.
-* Tabs in Picture::       Various features for tab stops and indentation.
-* Rectangles in Picture:: Clearing and superimposing rectangles.
-@end menu
-
-@node Basic Picture, Insert in Picture, Picture, Picture
-@section Basic Editing in Picture Mode
-
-@findex picture-forward-column
-@findex picture-backward-column
-@findex picture-move-down
-@findex picture-move-up
-@cindex editing in Picture mode
-
-  Most keys do the same thing in Picture mode that they usually do, but
-do it in a quarter-plane style.  For example, @kbd{C-f} is rebound to
-run @code{picture-forward-column}, a command which moves point one
-column to the right, inserting a space if necessary so that the actual
-end of the line makes no difference.  @kbd{C-b} is rebound to run
-@code{picture-backward-column}, which always moves point left one
-column, converting a tab to multiple spaces if necessary.  @kbd{C-n} and
-@kbd{C-p} are rebound to run @code{picture-move-down} and
-@code{picture-move-up}, which can either insert spaces or convert tabs
-as necessary to make sure that point stays in exactly the same column.
-@kbd{C-e} runs @code{picture-end-of-line}, which moves to after the last
-nonblank character on the line.  There is no need to change @kbd{C-a},
-as the choice of screen model does not affect beginnings of
-lines.
-
-@findex picture-newline
-  Insertion of text is adapted to the quarter-plane screen model through
-the use of Overwrite mode (@pxref{Minor Modes}).  Self-inserting characters
-replace existing text, column by column, rather than pushing existing text
-to the right.  @key{RET} runs @code{picture-newline}, which just moves to
-the beginning of the following line so that new text will replace that
-line.
-
-@findex picture-backward-clear-column
-@findex picture-clear-column
-@findex picture-clear-line
-  In Picture mode, the commands that normally delete or kill text,
-instead erase text (replacing it with spaces).  @key{DEL}
-(@code{picture-backward-clear-column}) replaces the preceding
-character with a space rather than removing it; this moves point
-backwards.  @kbd{C-d} (@code{picture-clear-column}) replaces the next
-character or characters with spaces, but does not move point.  (If you
-want to clear characters to spaces and move forward over them, use
-@key{SPC}.)  @kbd{C-k} (@code{picture-clear-line}) really kills the
-contents of lines, but does not delete the newlines from the buffer.
-
-@findex picture-open-line
-  To do actual insertion, you must use special commands.  @kbd{C-o}
-(@code{picture-open-line}) creates a blank line after the current
-line; it never splits a line.  @kbd{C-M-o} (@code{split-line}) makes
-sense in Picture mode, so it is not changed.  @kbd{C-j}
-(@code{picture-duplicate-line}) inserts another line with the same
-contents below the current line.
-
-@kindex C-c C-d @r{(Picture mode)}
-   To do actual deletion in Picture mode, use @kbd{C-w}, @kbd{C-c C-d}
-(which is defined as @code{delete-char}, as @kbd{C-d} is in other
-modes), or one of the picture rectangle commands (@pxref{Rectangles in
-Picture}).
-
-@node Insert in Picture, Tabs in Picture, Basic Picture, Picture
-@section Controlling Motion after Insert
-
-@findex picture-movement-up
-@findex picture-movement-down
-@findex picture-movement-left
-@findex picture-movement-right
-@findex picture-movement-nw
-@findex picture-movement-ne
-@findex picture-movement-sw
-@findex picture-movement-se
-@kindex C-c < @r{(Picture mode)}
-@kindex C-c > @r{(Picture mode)}
-@kindex C-c ^ @r{(Picture mode)}
-@kindex C-c . @r{(Picture mode)}
-@kindex C-c ` @r{(Picture mode)}
-@kindex C-c ' @r{(Picture mode)}
-@kindex C-c / @r{(Picture mode)}
-@kindex C-c \ @r{(Picture mode)}
-  Since ``self-inserting'' characters in Picture mode overwrite and move
-point, there is no essential restriction on how point should be moved.
-Normally point moves right, but you can specify any of the eight
-orthogonal or diagonal directions for motion after a ``self-inserting''
-character.  This is useful for drawing lines in the buffer.
-
-@table @kbd
-@item C-c <
-@itemx C-c @key{LEFT}
-Move left after insertion (@code{picture-movement-left}).
-@item C-c >
-@itemx C-c @key{RIGHT}
-Move right after insertion (@code{picture-movement-right}).
-@item C-c ^
-@itemx C-c @key{UP}
-Move up after insertion (@code{picture-movement-up}).
-@item C-c .
-@itemx C-c @key{DOWN}
-Move down after insertion (@code{picture-movement-down}).
-@item C-c `
-@itemx C-c @key{HOME}
-Move up and left (``northwest'') after insertion (@code{picture-movement-nw}).
-@item C-c '
-@itemx C-c @key{PAGEUP}
-Move up and right (``northeast'') after insertion
-(@code{picture-movement-ne}).
-@item C-c /
-@itemx C-c @key{END}
-Move down and left (``southwest'') after insertion
-@*(@code{picture-movement-sw}).
-@item C-c \
-@itemx C-c @key{PAGEDOWN}
-Move down and right (``southeast'') after insertion
-@*(@code{picture-movement-se}).
-@end table
-
-@kindex C-c C-f @r{(Picture mode)}
-@kindex C-c C-b @r{(Picture mode)}
-@findex picture-motion
-@findex picture-motion-reverse
-  Two motion commands move based on the current Picture insertion
-direction.  The command @kbd{C-c C-f} (@code{picture-motion}) moves in the
-same direction as motion after ``insertion'' currently does, while @kbd{C-c
-C-b} (@code{picture-motion-reverse}) moves in the opposite direction.
-
-@node Tabs in Picture, Rectangles in Picture, Insert in Picture, Picture
-@section Picture Mode Tabs
-
-@kindex M-TAB @r{(Picture mode)}
-@findex picture-tab-search
-@vindex picture-tab-chars
-  Two kinds of tab-like action are provided in Picture mode.  Use
-@kbd{M-@key{TAB}} (@code{picture-tab-search}) for context-based tabbing.
-With no argument, it moves to a point underneath the next
-``interesting'' character that follows whitespace in the previous
-nonblank line.  ``Next'' here means ``appearing at a horizontal position
-greater than the one point starts out at.''  With an argument, as in
-@kbd{C-u M-@key{TAB}}, this command moves to the next such interesting
-character in the current line.  @kbd{M-@key{TAB}} does not change the
-text; it only moves point.  ``Interesting'' characters are defined by
-the variable @code{picture-tab-chars}, which should define a set of
-characters.  The syntax for this variable is like the syntax used inside
-of @samp{[@dots{}]} in a regular expression---but without the @samp{[}
-and the @samp{]}.  Its default value is @code{"!-~"}.
-
-@findex picture-tab
-  @key{TAB} itself runs @code{picture-tab}, which operates based on the
-current tab stop settings; it is the Picture mode equivalent of
-@code{tab-to-tab-stop}.  Normally it just moves point, but with a numeric
-argument it clears the text that it moves over.
-
-@kindex C-c TAB @r{(Picture mode)}
-@findex picture-set-tab-stops
-  The context-based and tab-stop-based forms of tabbing are brought
-together by the command @kbd{C-c @key{TAB}} (@code{picture-set-tab-stops}).
-This command sets the tab stops to the positions which @kbd{M-@key{TAB}}
-would consider significant in the current line.  The use of this command,
-together with @key{TAB}, can get the effect of context-based tabbing.  But
-@kbd{M-@key{TAB}} is more convenient in the cases where it is sufficient.
-
-  It may be convenient to prevent use of actual tab characters in
-pictures.  For example, this prevents @kbd{C-x @key{TAB}} from messing
-up the picture.  You can do this by setting the variable
-@code{indent-tabs-mode} to @code{nil}.  @xref{Just Spaces}.
-
-@node Rectangles in Picture,, Tabs in Picture, Picture
-@section Picture Mode Rectangle Commands
-@cindex rectangles and Picture mode
-@cindex Picture mode and rectangles
-
-  Picture mode defines commands for working on rectangular pieces of the
-text in ways that fit with the quarter-plane model.  The standard rectangle
-commands may also be useful (@pxref{Rectangles}).
-
-@table @kbd
-@item C-c C-k
-Clear out the region-rectangle with spaces
-(@code{picture-clear-rectangle}).  With argument, delete the text.
-@item C-c C-w @var{r}
-Similar, but save rectangle contents in register @var{r} first
-(@code{picture-clear-rectangle-to-register}).
-@item C-c C-y
-Copy last killed rectangle into the buffer by overwriting, with upper
-left corner at point (@code{picture-yank-rectangle}).  With argument,
-insert instead.
-@item C-c C-x @var{r}
-Similar, but use the rectangle in register @var{r}
-(@code{picture-yank-rectangle-from-register}).
-@end table
-
-@kindex C-c C-k @r{(Picture mode)}
-@kindex C-c C-w @r{(Picture mode)}
-@findex picture-clear-rectangle
-@findex picture-clear-rectangle-to-register
-  The picture rectangle commands @kbd{C-c C-k}
-(@code{picture-clear-rectangle}) and @kbd{C-c C-w}
-(@code{picture-clear-rectangle-to-register}) differ from the standard
-rectangle commands in that they normally clear the rectangle instead of
-deleting it; this is analogous with the way @kbd{C-d} is changed in Picture
-mode.
-
-  However, deletion of rectangles can be useful in Picture mode, so
-these commands delete the rectangle if given a numeric argument.
-@kbd{C-c C-k} either with or without a numeric argument saves the
-rectangle for @kbd{C-c C-y}.
-
-@kindex C-c C-y @r{(Picture mode)}
-@kindex C-c C-x @r{(Picture mode)}
-@findex picture-yank-rectangle
-@findex picture-yank-rectangle-from-register
-  The Picture mode commands for yanking rectangles differ from the
-standard ones in that they overwrite instead of inserting.  This is
-the same way that Picture mode insertion of other text differs from
-other modes.  @kbd{C-c C-y} (@code{picture-yank-rectangle}) inserts
-(by overwriting) the rectangle that was most recently killed, while
-@kbd{C-c C-x} (@code{picture-yank-rectangle-from-register}) does
-likewise for the rectangle found in a specified register.
-
-@ignore
-   arch-tag: b7589747-683c-4f40-aed8-1b10403cb666
-@end ignore
--- a/man/programs.texi	Tue Mar 14 12:15:08 2006 +0000
+++ b/man/programs.texi	Sun Mar 19 19:43:57 2006 +0000
@@ -41,7 +41,6 @@
 * Misc for Programs::   Other Emacs features useful for editing programs.
 * C Modes::             Special commands of C, C++, Objective-C,
                           Java, and Pike modes.
-* Fortran::             Fortran mode and its special features.
 * Asm Mode::            Asm mode and its special features.
 @end menu
 
@@ -109,7 +108,8 @@
   Separate manuals are available for the modes for Ada (@pxref{Top, , Ada
 Mode, ada-mode, Ada Mode}), C/C++/Objective C/Java/Corba IDL/Pike/AWK
 (@pxref{Top, , CC Mode, ccmode, CC Mode}) and the IDLWAVE modes
-(@pxref{Top, , IDLWAVE, idlwave, IDLWAVE User Manual}).
+(@pxref{Top, , IDLWAVE, idlwave, IDLWAVE User Manual}).  For Fortran
+mode, @inforef{Fortran,, emacs-xtra}.
 
 @cindex mode hook
 @vindex c-mode-hook
@@ -1715,521 +1715,6 @@
 names.
 @end table
 
-@node Fortran
-@section Fortran Mode
-@cindex Fortran mode
-@cindex mode, Fortran
-
-  Fortran mode provides special motion commands for Fortran statements
-and subprograms, and indentation commands that understand Fortran
-conventions of nesting, line numbers and continuation statements.
-Fortran mode has support for Auto Fill mode that breaks long lines into
-proper Fortran continuation lines.
-
-  Special commands for comments are provided because Fortran comments
-are unlike those of other languages.  Built-in abbrevs optionally save
-typing when you insert Fortran keywords.
-
-  Use @kbd{M-x fortran-mode} to switch to this major mode.  This command
-runs the hook @code{fortran-mode-hook} (@pxref{Hooks}).
-
-@cindex Fortran77 and Fortran90
-@findex f90-mode
-@findex fortran-mode
-  Fortran mode is meant for editing Fortran77 ``fixed format'' (and also
-``tab format'') source code.  For editing the modern Fortran90 or
-Fortran95 ``free format'' source code, use F90 mode (@code{f90-mode}).
-Emacs normally uses Fortran mode for files with extension @samp{.f},
-@samp{.F} or @samp{.for}, and F90 mode for the extension @samp{.f90} and
-@samp{.f95}.  GNU Fortran supports both kinds of format.
-
-@menu
-* Motion: Fortran Motion.	 Moving point by statements or subprograms.
-* Indent: Fortran Indent.	 Indentation commands for Fortran.
-* Comments: Fortran Comments.	 Inserting and aligning comments.
-* Autofill: Fortran Autofill.	 Auto fill support for Fortran.
-* Columns: Fortran Columns.	 Measuring columns for valid Fortran.
-* Abbrev: Fortran Abbrev.	 Built-in abbrevs for Fortran keywords.
-@end menu
-
-@node Fortran Motion
-@subsection Motion Commands
-
-  In addition to the normal commands for moving by and operating on
-``defuns'' (Fortran subprograms---functions and subroutines, as well as
-modules for F90 mode), Fortran mode provides special commands to move by
-statements and other program units.
-
-@table @kbd
-@kindex C-c C-n @r{(Fortran mode)}
-@findex fortran-next-statement
-@findex f90-next-statement
-@item C-c C-n
-Move to the beginning of the next statement
-(@code{fortran-next-statement}/@code{f90-next-statement}).
-
-@kindex C-c C-p @r{(Fortran mode)}
-@findex fortran-previous-statement
-@findex f90-previous-statement
-@item C-c C-p
-Move to the beginning of the previous statement
-(@code{fortran-previous-statement}/@code{f90-previous-statement}).
-If there is no previous statement (i.e. if called from the first
-statement in the buffer), move to the start of the buffer.
-
-@kindex C-c C-e @r{(F90 mode)}
-@findex f90-next-block
-@item C-c C-e
-Move point forward to the start of the next code block
-(@code{f90-next-block}).  A code block is a subroutine,
-@code{if}--@code{endif} statement, and so forth.  This command exists
-for F90 mode only, not Fortran mode.  With a numeric argument, this
-moves forward that many blocks.
-
-@kindex C-c C-a @r{(F90 mode)}
-@findex f90-previous-block
-@item C-c C-a
-Move point backward to the previous code block
-(@code{f90-previous-block}).  This is like @code{f90-next-block}, but
-moves backwards.
-
-@kindex C-M-n @r{(Fortran mode)}
-@findex fortran-end-of-block
-@findex f90-end-of-block
-@item C-M-n
-Move to the end of the current code block
-(@code{fortran-end-of-block}/@code{f90-end-of-block}).  With a numeric
-agument, move forward that number of blocks.  The mark is set before
-moving point.  The F90 mode version of this command checks for
-consistency of block types and labels (if present), but it does not
-check the outermost block since that may be incomplete.
-
-@kindex C-M-p @r{(Fortran mode)}
-@findex fortran-beginning-of-block
-@findex f90-beginning-of-block
-@item C-M-p
-Move to the start of the current code block
-(@code{fortran-beginning-of-block}/@code{f90-beginning-of-block}). This
-is like @code{fortran-end-of-block}, but moves backwards.
-@end table
-
-@node Fortran Indent
-@subsection Fortran Indentation
-
-  Special commands and features are needed for indenting Fortran code in
-order to make sure various syntactic entities (line numbers, comment line
-indicators and continuation line flags) appear in the columns that are
-required for standard, fixed (or tab) format Fortran.
-
-@menu
-* Commands: ForIndent Commands.  Commands for indenting and filling Fortran.
-* Contline: ForIndent Cont.      How continuation lines indent.
-* Numbers:  ForIndent Num.       How line numbers auto-indent.
-* Conv:     ForIndent Conv.      Conventions you must obey to avoid trouble.
-* Vars:     ForIndent Vars.      Variables controlling Fortran indent style.
-@end menu
-
-@node ForIndent Commands
-@subsubsection Fortran Indentation and Filling Commands
-
-@table @kbd
-@item C-M-j
-Break the current line at point and set up a continuation line
-(@code{fortran-split-line}).
-@item M-^
-Join this line to the previous line (@code{fortran-join-line}).
-@item C-M-q
-Indent all the lines of the subprogram point is in
-(@code{fortran-indent-subprogram}).
-@item M-q
-Fill a comment block or statement.
-@end table
-
-@kindex C-M-q @r{(Fortran mode)}
-@findex fortran-indent-subprogram
-  The key @kbd{C-M-q} runs @code{fortran-indent-subprogram}, a command
-to reindent all the lines of the Fortran subprogram (function or
-subroutine) containing point.
-
-@kindex C-M-j @r{(Fortran mode)}
-@findex fortran-split-line
-  The key @kbd{C-M-j} runs @code{fortran-split-line}, which splits
-a line in the appropriate fashion for Fortran.  In a non-comment line,
-the second half becomes a continuation line and is indented
-accordingly.  In a comment line, both halves become separate comment
-lines.
-
-@kindex M-^ @r{(Fortran mode)}
-@kindex C-c C-d @r{(Fortran mode)}
-@findex fortran-join-line
-  @kbd{M-^} or @kbd{C-c C-d} runs the command @code{fortran-join-line},
-which joins a continuation line back to the previous line, roughly as
-the inverse of @code{fortran-split-line}.  The point must be on a
-continuation line when this command is invoked.
-
-@kindex M-q @r{(Fortran mode)}
-@kbd{M-q} in Fortran mode fills the comment block or statement that
-point is in.  This removes any excess statement continuations.
-
-@node ForIndent Cont
-@subsubsection Continuation Lines
-@cindex Fortran continuation lines
-
-@vindex fortran-continuation-string
-  Most Fortran77 compilers allow two ways of writing continuation lines.
-If the first non-space character on a line is in column 5, then that
-line is a continuation of the previous line.  We call this @dfn{fixed
-format}.  (In GNU Emacs we always count columns from 0; but note that
-the Fortran standard counts from 1.)  The variable
-@code{fortran-continuation-string} specifies what character to put in
-column 5.  A line that starts with a tab character followed by any digit
-except @samp{0} is also a continuation line.  We call this style of
-continuation @dfn{tab format}.  (Fortran90 introduced ``free format'',
-with another style of continuation lines).
-
-@vindex indent-tabs-mode @r{(Fortran mode)}
-@vindex fortran-analyze-depth
-@vindex fortran-tab-mode-default
-  Fortran mode can use either style of continuation line.  When you
-enter Fortran mode, it tries to deduce the proper continuation style
-automatically from the buffer contents.  It does this by scanning up to
-@code{fortran-analyze-depth} (default 100) lines from the start of the
-buffer.  The first line that begins with either a tab character or six
-spaces determines the choice.  If the scan fails (for example, if the
-buffer is new and therefore empty), the value of
-@code{fortran-tab-mode-default} (@code{nil} for fixed format, and
-non-@code{nil} for tab format) is used.  @samp{/t} in the mode line
-indicates tab format is selected.  Fortran mode sets the value of
-@code{indent-tabs-mode} accordingly (@pxref{Just Spaces}).
-
-  If the text on a line starts with the Fortran continuation marker
-@samp{$}, or if it begins with any non-whitespace character in column
-5, Fortran mode treats it as a continuation line.  When you indent a
-continuation line with @key{TAB}, it converts the line to the current
-continuation style.  When you split a Fortran statement with
-@kbd{C-M-j}, the continuation marker on the newline is created according
-to the continuation style.
-
-  The setting of continuation style affects several other aspects of
-editing in Fortran mode.  In fixed format mode, the minimum column
-number for the body of a statement is 6.  Lines inside of Fortran
-blocks that are indented to larger column numbers always use only the
-space character for whitespace.  In tab format mode, the minimum
-column number for the statement body is 8, and the whitespace before
-column 8 must always consist of one tab character.
-
-@node ForIndent Num
-@subsubsection Line Numbers
-
-  If a number is the first non-whitespace in the line, Fortran
-indentation assumes it is a line number and moves it to columns 0
-through 4.  (Columns always count from 0 in GNU Emacs.)
-
-@vindex fortran-line-number-indent
-  Line numbers of four digits or less are normally indented one space.
-The variable @code{fortran-line-number-indent} controls this; it
-specifies the maximum indentation a line number can have.  The default
-value of the variable is 1.  Fortran mode tries to prevent line number
-digits passing column 4, reducing the indentation below the specified
-maximum if necessary.  If @code{fortran-line-number-indent} has the
-value 5, line numbers are right-justified to end in column 4.
-
-@vindex fortran-electric-line-number
-  Simply inserting a line number is enough to indent it according to
-these rules.  As each digit is inserted, the indentation is recomputed.
-To turn off this feature, set the variable
-@code{fortran-electric-line-number} to @code{nil}.
-
-
-@node ForIndent Conv
-@subsubsection Syntactic Conventions
-
-  Fortran mode assumes that you follow certain conventions that simplify
-the task of understanding a Fortran program well enough to indent it
-properly:
-
-@itemize @bullet
-@item
-Two nested @samp{do} loops never share a @samp{continue} statement.
-
-@item
-Fortran keywords such as @samp{if}, @samp{else}, @samp{then}, @samp{do}
-and others are written without embedded whitespace or line breaks.
-
-Fortran compilers generally ignore whitespace outside of string
-constants, but Fortran mode does not recognize these keywords if they
-are not contiguous.  Constructs such as @samp{else if} or @samp{end do}
-are acceptable, but the second word should be on the same line as the
-first and not on a continuation line.
-@end itemize
-
-@noindent
-If you fail to follow these conventions, the indentation commands may
-indent some lines unaesthetically.  However, a correct Fortran program
-retains its meaning when reindented even if the conventions are not
-followed.
-
-@node ForIndent Vars
-@subsubsection Variables for Fortran Indentation
-
-@vindex fortran-do-indent
-@vindex fortran-if-indent
-@vindex fortran-structure-indent
-@vindex fortran-continuation-indent
-@vindex fortran-check-all-num@dots{}
-@vindex fortran-minimum-statement-indent@dots{}
-  Several additional variables control how Fortran indentation works:
-
-@table @code
-@item fortran-do-indent
-Extra indentation within each level of @samp{do} statement (default 3).
-
-@item fortran-if-indent
-Extra indentation within each level of @samp{if}, @samp{select case}, or
-@samp{where} statements (default 3).
-
-@item fortran-structure-indent
-Extra indentation within each level of @samp{structure}, @samp{union},
-@samp{map}, or @samp{interface} statements (default 3).
-
-@item fortran-continuation-indent
-Extra indentation for bodies of continuation lines (default 5).
-
-@item fortran-check-all-num-for-matching-do
-In Fortran77, a numbered @samp{do} statement is ended by any statement
-with a matching line number.  It is common (but not compulsory) to use a
-@samp{continue} statement for this purpose.  If this variable has a
-non-@code{nil} value, indenting any numbered statement must check for a
-@samp{do} that ends there.  If you always end @samp{do} statements with
-a @samp{continue} line (or if you use the more modern @samp{enddo}),
-then you can speed up indentation by setting this variable to
-@code{nil}.  The default is @code{nil}.
-
-@item fortran-blink-matching-if
-If this is @code{t}, indenting an @samp{endif} (or @samp{enddo}
-statement moves the cursor momentarily to the matching @samp{if} (or
-@samp{do}) statement to show where it is.  The default is @code{nil}.
-
-@item fortran-minimum-statement-indent-fixed
-Minimum indentation for Fortran statements when using fixed format
-continuation line style.  Statement bodies are never indented less than
-this much.  The default is 6.
-
-@item fortran-minimum-statement-indent-tab
-Minimum indentation for Fortran statements for tab format continuation line
-style.  Statement bodies are never indented less than this much.  The
-default is 8.
-@end table
-
-The variables controlling the indentation of comments are described in
-the following section.
-
-@node Fortran Comments
-@subsection Fortran Comments
-
-  The usual Emacs comment commands assume that a comment can follow a
-line of code.  In Fortran77, the standard comment syntax requires an
-entire line to be just a comment.  Therefore, Fortran mode replaces the
-standard Emacs comment commands and defines some new variables.
-
-@vindex fortran-comment-line-start
-  Fortran mode can also handle the Fortran90 comment syntax where comments
-start with @samp{!} and can follow other text.  Because only some Fortran77
-compilers accept this syntax, Fortran mode will not insert such comments
-unless you have said in advance to do so.  To do this, set the variable
-@code{fortran-comment-line-start} to @samp{"!"}.
-
-@table @kbd
-@item M-;
-Align comment or insert new comment (@code{fortran-indent-comment}).
-
-@item C-x ;
-Applies to nonstandard @samp{!} comments only.
-
-@item C-c ;
-Turn all lines of the region into comments, or (with argument) turn them back
-into real code (@code{fortran-comment-region}).
-@end table
-
-@findex fortran-indent-comment
-  @kbd{M-;} in Fortran mode is redefined as the command
-@code{fortran-indent-comment}.  Like the usual @kbd{M-;} command, this
-recognizes any kind of existing comment and aligns its text appropriately;
-if there is no existing comment, a comment is inserted and aligned.  But
-inserting and aligning comments are not the same in Fortran mode as in
-other modes.
-
-  When a new comment must be inserted, if the current line is blank, a
-full-line comment is inserted.  On a non-blank line, a nonstandard @samp{!}
-comment is inserted if you have said you want to use them.  Otherwise a
-full-line comment is inserted on a new line before the current line.
-
-  Nonstandard @samp{!} comments are aligned like comments in other
-languages, but full-line comments are different.  In a standard full-line
-comment, the comment delimiter itself must always appear in column zero.
-What can be aligned is the text within the comment.  You can choose from
-three styles of alignment by setting the variable
-@code{fortran-comment-indent-style} to one of these values:
-
-@vindex fortran-comment-indent-style
-@vindex fortran-comment-line-extra-indent
-@table @code
-@item fixed
-Align the text at a fixed column, which is the sum of
-@code{fortran-comment-line-extra-indent} and the minimum statement
-indentation.  This is the default.
-
-The minimum statement indentation is
-@code{fortran-minimum-statement-indent-fixed} for fixed format
-continuation line style and @code{fortran-minimum-statement-indent-tab}
-for tab format style.
-
-@item relative
-Align the text as if it were a line of code, but with an additional
-@code{fortran-comment-line-extra-indent} columns of indentation.
-
-@item nil
-Don't move text in full-line comments automatically.
-@end table
-
-@vindex fortran-comment-indent-char
-  In addition, you can specify the character to be used to indent within
-full-line comments by setting the variable
-@code{fortran-comment-indent-char} to the single-character string you want
-to use.
-
-@vindex fortran-directive-re
-  Compiler directive lines, or preprocessor lines, have much the same
-appearance as comment lines.  It is important, though, that such lines
-never be indented at all, no matter what the value of
-@code{fortran-comment-indent-style}.  The variable
-@code{fortran-directive-re} is a regular expression that specifies which
-lines are directives.  Matching lines are never indented, and receive
-distinctive font-locking.
-
-  The normal Emacs comment command @kbd{C-x ;} has not been redefined.  If
-you use @samp{!} comments, this command can be used with them.  Otherwise
-it is useless in Fortran mode.
-
-@kindex C-c ; @r{(Fortran mode)}
-@findex fortran-comment-region
-@vindex fortran-comment-region
-  The command @kbd{C-c ;} (@code{fortran-comment-region}) turns all the
-lines of the region into comments by inserting the string @samp{C$$$} at
-the front of each one.  With a numeric argument, it turns the region
-back into live code by deleting @samp{C$$$} from the front of each line
-in it.  The string used for these comments can be controlled by setting
-the variable @code{fortran-comment-region}.  Note that here we have an
-example of a command and a variable with the same name; these two uses
-of the name never conflict because in Lisp and in Emacs it is always
-clear from the context which one is meant.
-
-@node Fortran Autofill
-@subsection Auto Fill in Fortran Mode
-
-  Fortran mode has specialized support for Auto Fill mode, which is a
-minor mode that automatically splits statements as you insert them when
-they become too wide.  Splitting a statement involves making
-continuation lines using @code{fortran-continuation-string}
-(@pxref{ForIndent Cont}).  This splitting happens when you type
-@key{SPC}, @key{RET}, or @key{TAB}, and also in the Fortran indentation
-commands.  You activate Auto Fill in Fortran mode in the normal way
-(@pxref{Auto Fill}).
-
-@vindex fortran-break-before-delimiters
-   Auto Fill breaks lines at spaces or delimiters when the lines get
-longer than the desired width (the value of @code{fill-column}).  The
-delimiters (besides whitespace) that Auto Fill can break at are
-@samp{+}, @samp{-}, @samp{/}, @samp{*}, @samp{=}, @samp{<}, @samp{>},
-and @samp{,}.  The line break comes after the delimiter if the
-variable @code{fortran-break-before-delimiters} is @code{nil}.
-Otherwise (and by default), the break comes before the delimiter.
-
-  To enable Auto Fill in all Fortran buffers, add
-@code{turn-on-auto-fill} to @code{fortran-mode-hook}.  @xref{Hooks}.
-
-@node Fortran Columns
-@subsection Checking Columns in Fortran
-
-@table @kbd
-@item C-c C-r
-Display a ``column ruler'' momentarily above the current line
-(@code{fortran-column-ruler}).
-@item C-c C-w
-Split the current window horizontally temporarily so that it is 72
-columns wide (@code{fortran-window-create-momentarily}).  This may
-help you avoid making lines longer than the 72-character limit that
-some Fortran compilers impose.
-@item C-u C-c C-w
-Split the current window horizontally so that it is 72 columns wide
-(@code{fortran-window-create}).  You can then continue editing.
-@item M-x fortran-strip-sequence-nos
-Delete all text in column 72 and beyond.
-@end table
-
-@kindex C-c C-r @r{(Fortran mode)}
-@findex fortran-column-ruler
-  The command @kbd{C-c C-r} (@code{fortran-column-ruler}) shows a column
-ruler momentarily above the current line.  The comment ruler is two lines
-of text that show you the locations of columns with special significance in
-Fortran programs.  Square brackets show the limits of the columns for line
-numbers, and curly brackets show the limits of the columns for the
-statement body.  Column numbers appear above them.
-
-  Note that the column numbers count from zero, as always in GNU Emacs.
-As a result, the numbers may be one less than those you are familiar
-with; but the positions they indicate in the line are standard for
-Fortran.
-
-@vindex fortran-column-ruler-fixed
-@vindex fortran-column-ruler-tabs
-  The text used to display the column ruler depends on the value of the
-variable @code{indent-tabs-mode}.  If @code{indent-tabs-mode} is
-@code{nil}, then the value of the variable
-@code{fortran-column-ruler-fixed} is used as the column ruler.
-Otherwise, the value of the variable @code{fortran-column-ruler-tab} is
-displayed.  By changing these variables, you can change the column ruler
-display.
-
-@kindex C-c C-w @r{(Fortran mode)}
-@findex fortran-window-create-momentarily
-  @kbd{C-c C-w} (@code{fortran-window-create-momentarily}) temporarily
-splits the current window horizontally, making a window 72 columns
-wide, so you can see any lines that are too long.  Type a space to
-restore the normal width.
-
-@kindex C-u C-c C-w @r{(Fortran mode)}
-@findex fortran-window-create
-  You can also split the window horizontally and continue editing with
-the split in place.  To do this, use @kbd{C-u C-c C-w} (@code{M-x
-fortran-window-create}).  By editing in this window you can
-immediately see when you make a line too wide to be correct Fortran.
-
-@findex fortran-strip-sequence-nos
-  The command @kbd{M-x fortran-strip-sequence-nos} deletes all text in
-column 72 and beyond, on all lines in the current buffer.  This is the
-easiest way to get rid of old sequence numbers.
-
-@node Fortran Abbrev
-@subsection Fortran Keyword Abbrevs
-
-  Fortran mode provides many built-in abbrevs for common keywords and
-declarations.  These are the same sort of abbrev that you can define
-yourself.  To use them, you must turn on Abbrev mode.  @xref{Abbrevs}.
-
-  The built-in abbrevs are unusual in one way: they all start with a
-semicolon.  You cannot normally use semicolon in an abbrev, but Fortran
-mode makes this possible by changing the syntax of semicolon to ``word
-constituent.''
-
-  For example, one built-in Fortran abbrev is @samp{;c} for
-@samp{continue}.  If you insert @samp{;c} and then insert a punctuation
-character such as a space or a newline, the @samp{;c} expands automatically
-to @samp{continue}, provided Abbrev mode is enabled.@refill
-
-  Type @samp{;?} or @samp{;C-h} to display a list of all the built-in
-Fortran abbrevs and what they stand for.
-
 @node Asm Mode
 @section Asm Mode
 
--- a/man/sending.texi	Tue Mar 14 12:15:08 2006 +0000
+++ b/man/sending.texi	Sun Mar 19 19:43:57 2006 +0000
@@ -2,7 +2,7 @@
 @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001, 2002,
 @c   2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
-@node Sending Mail, Rmail, Picture, Top
+@node Sending Mail, Rmail, Abbrevs, Top
 @chapter Sending Mail
 @cindex sending mail
 @cindex mail
--- a/man/text.texi	Tue Mar 14 12:15:08 2006 +0000
+++ b/man/text.texi	Sun Mar 19 19:43:57 2006 +0000
@@ -51,6 +51,12 @@
 @xref{Formatted Text}.
 @end iftex
 
+@cindex ASCII art
+  If you need to edit pictures made out of text characters (commonly
+referred to as ``ASCII art''), use @kbd{M-x edit-picture} to enter
+Picture mode, a special major mode for editing such pictures.
+@inforef{Picture Mode,, emacs-xtra}.
+
 @cindex skeletons
 @cindex templates
 @cindex autotyping
--- a/nt/INSTALL	Tue Mar 14 12:15:08 2006 +0000
+++ b/nt/INSTALL	Sun Mar 19 19:43:57 2006 +0000
@@ -1,10 +1,64 @@
 		      Building and Installing Emacs
 		on Windows NT/2K/XP and Windows 95/98/ME
 
-  Copyright (C) 2001, 2002, 2003, 2004, 2005,
-     2006 Free Software Foundation, Inc.
+  Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
+    Free Software Foundation, Inc.
   See the end of the file for copying permissions.
 
+* For the impatient
+
+  Here are the concise instructions for configuring and building the
+  native Win32 binary of Emacs on Windows, for those who want to skip
+  the complex explanations and ``just do it'':
+
+  1. Change to the `nt' directory (the directory of this file):
+
+       cd nt
+
+  2. Run configure.bat.  From the COMMAND.COM/CMD.EXE command prompt:
+
+       configure
+
+     from a Unixy shell prompt:
+
+       cmd /c configure.bat
+     or
+       command.com /c configure.bat
+
+  3. Run the Make utility suitable for your environment.  If you build
+     with the Microsoft's Visual C compiler:
+
+       nmake
+
+     For the development environments based on GNU GCC (MinGW, MSYS,
+     Cygwin), depending on how Make is called, it could be:
+
+       make
+     or
+       gnumake
+     or
+       gmake
+
+     (If you are building from CVS, say "make bootstrap" or "nmake
+     bootstrap" instead.)
+
+  4. Generate the Info manuals (only if you are building out of CVS):
+
+     make info
+
+     (change "make" to "nmake" if you use MSVC).
+
+  5. Install the produced binaries:
+
+     make install
+
+  That's it!
+
+  If these short instructions somehow fail, read the rest of this
+  file.
+
+* Preliminaries
+
   If you used WinZip to unpack the distribution, we suggest to
   remove the files and unpack again with a different program!
   WinZip is known to create some subtle and hard to debug problems,
@@ -28,6 +82,8 @@
   "touch.exe" in your path, and that it will create files that do not
   yet exist.
 
+* Supported development environments
+
   To compile Emacs, you will need either Microsoft Visual C++ 2.0 or
   later and nmake, or a Windows port of GCC 2.95 or later with MinGW
   and W32 API support and a port of GNU Make.  You can use the Cygwin
@@ -35,6 +91,11 @@
   build (latest versions of the Cygwin toolkit, at least since v1.3.3,
   include the MinGW headers and libraries as an integral part).
 
+  The rest of this file assumes you have a working development
+  environment.  If you just installed  such an environment, try
+  building a trivial C "Hello world" program, and see if it works.  If
+  it doesn't work, resolve that problem first!
+
   If you use the MinGW port of GCC and GNU Make to build Emacs, there
   are some compatibility issues wrt Make and the shell that is run by
   Make, either the standard COMMAND.COM/CMD.EXE supplied with Windows
@@ -90,33 +151,38 @@
   and other useful Posix utilities can be obtained from one of several
   projects:
 
+  * http://gnuwin32.sourceforge.net/              ( GnuWin32 )
   * http://www.mingw.org/                         ( MinGW    )
   * http://www.cygwin.com/                        ( Cygwin   )
   * http://unxutils.sourceforge.net/              ( UnxUtils )
-  * http://gnuwin32.sourceforge.net/              ( GnuWin32 )
 
   If you build Emacs on Windows 9X or ME, not on Windows 2K/XP or
-  Windows NT, we suggest to install the Cygwin port of Bash.
+  Windows NT, we suggest to install the Cygwin port of Bash.  That is
+  because the native Windows shell COMMAND.COM is too limited; the
+  Emacs build procedure tries very hard to support even such limited
+  shells, but as none of the Windows developers of Emacs work on
+  Windows 9x, we cannot guarantee that it works without a more
+  powerful shell.
 
   Additional instructions and help for building Emacs on Windows can be
   found at the Emacs Wiki:
 
-  http://www.emacswiki.org/cgi-bin/wiki/WThirtyTwoInstallationKit
+    http://www.emacswiki.org/cgi-bin/wiki/WThirtyTwoInstallationKit
 
   and at this URL:
 
-  http://ourcomments.org/Emacs/w32-build-emacs.html
+    http://ourcomments.org/Emacs/w32-build-emacs.html
 
 * Configuring
 
   Configuration of Emacs is now handled by running configure.bat in the
-  nt subdirectory.  It will detect which compiler you have available,
+  `nt' subdirectory.  It will detect which compiler you have available,
   and generate makefiles accordingly.  You can override the compiler
   detection, and control optimization and debug settings, by specifying
   options on the command line when invoking configure.
 
   To configure Emacs to build with GCC or MSVC, whichever is available,
-  simply change to the nt subdirectory and run `configure' with no
+  simply change to the `nt' subdirectory and run `configure.bat' with no
   options.  To see what options are available, run `configure --help'.
 
   N.B.  It is normal to see a few error messages output while configure
@@ -169,7 +235,8 @@
 
   After running configure, simply run the appropriate `make' program for
   your compiler to build Emacs.  For MSVC, this is nmake; for GCC, it is
-  GNU make.
+  GNU make.  (If you are building out of CVS, say "make bootstrap" or
+  "nmake bootstrap" instead.)
 
   As the files are compiled, you will see some warning messages
   declaring that some functions don't return a value, or that some data
@@ -177,6 +244,13 @@
   The warnings may be fixed in the main FSF source at some point, but
   until then we will just live with them.
 
+  If you are building from CVS, the following commands will produce
+  the Info manuals (which are not part of the CVS repository):
+
+    make info
+  or
+    nmake info
+
 * Installing
 
   To install Emacs after it has compiled, simply run `nmake install'
--- a/src/ChangeLog	Tue Mar 14 12:15:08 2006 +0000
+++ b/src/ChangeLog	Sun Mar 19 19:43:57 2006 +0000
@@ -1,7 +1,96 @@
+2006-03-18  Chong Yidong  <cyd@stupidchicken.com>
+
+	* xterm.c (x_display_ok): Fix minor bug and compilation warnings.
+
+2006-03-18  Nozomu Ando  <nand@mac.com>
+
+	* m/pmax.h (BROKEN_NOCOMBRELOC) [__NetBSD__]: Define.
+	(LIB_STANDARD, START_FILES) [__NetBSD__]: Don't define.
+	(START_FILES, RUN_TIME_REMAP, UNEXEC) [__NetBSD__, __OpenBSD__]:
+	Don't redefine.
+
+	* m/mips.h: Don't use unexmips on NetBSD.
+	(LIBS_MACHINE): Move definition lower, so it doesn't use
+	LD_SWITCH_MACHINE, START_FILES, LIB_STANDARD, LIBS_TERMCAP,
+	C_SWITCH_MACHINE, and C_DEBUG_SWITCH.
+
+	* unexelf.c [BROKEN_NOCOMBRELOC]: Include assert.h.
+	(unexec) [BROKEN_NOCOMBRELOC]: Handle platforms whose nocombreloc
+	option is broken (e.g., MIPS/NetBSD).
+
+2006-03-18  Craig McDaniel  <craigmcd@gmail.com>  (tiny change)
+
+	* sheap.c (STATIC_HEAP_SIZE): Enlarge STATIC_HEAP_SIZE to 12MB.
+	Remove the HAVE_X_WINDOWS conditional.
+
+2006-03-18  Vivek Dasmohapatra  <vivek@etla.org>  (tiny change)
+
+	* emacs.c (main): If user asks for a display that is unavailable,
+	simulate -nw.
+
+	* xterm.c (x_display_ok): New function.
+
+	* xterm.h: Add prototype for x_display_ok.
+
+2006-03-18  Eli Zaretskii  <eliz@gnu.org>
+
+	* w32fns.c (Fw32_select_font): Doc fix.
+
+2006-03-16  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* image.c [MAC_OS] (XPutPixel, XGetPixel)
+	[!WORDS_BIG_ENDIAN && USE_CG_DRAWING]: Don't use specialized
+	version when depth is 32.
+	(mac_create_cg_image_from_image) [MAC_OS && USE_CG_DRAWING]: New
+	function.
+	(prepare_image_for_display) [MAC_OS && USE_CG_DRAWING]: Use it.
+	(x_clear_image_1) [MAC_OS && USE_CG_DRAWING]: Release CGImage.
+
+	* macterm.c (XCreatePixmap) [!WORDS_BIG_ENDIAN && USE_CG_DRAWING]:
+	Create GWorld in ARGB pixel format.
+	(mac_copy_area, mac_copy_area_with_mask) [USE_CG_DRAWING]: Remove
+	functions.
+	(x_draw_image_foreground) [USE_CG_DRAWING]: Use mac_draw_cg_image
+	instead of mac_copy_area/mac_copy_area_with_mask.
+
+2006-03-15  Kim F. Storm  <storm@cua.dk>
+
+	* xdisp.c (extend_face_to_end_of_line): Always add space glyph to
+	empty row.  Fixes memory corruption revealed by 2006-03-02 change.
+	(display_tool_bar_line): Skip empty tool-bar line if HEIGHT < 0.
+	(tool_bar_lines_needed): Fix tool-bar display in case the tool-bar
+	width is exactly the same as the window width.  Don't count a final
+	empty tool-bar line (pass HEIGHT = -1 to display_tool_bar_line).
+
+2006-03-15  Juanma Barranquero  <lekktu@gmail.com>
+
+	* fringe.c (w32_init_fringe, w32_reset_fringes): Revert to being
+	conditional on HAVE_NTGUI, not WINDOWS_NT.
+
+2006-03-15  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* dispextern.h (mac_init_fringe) [MAC_OS]: Add prototype.
+
+	* fringe.c (mac_init_fringe) [MAC_OS]: New function.
+
+	* macterm.c (mac_initialize) [USE_CG_DRAWING]: Call mac_init_fringe.
+	(max_fringe_bmp, fringe_bmp) [USE_CG_DRAWING]: New variables.
+	(mac_define_fringe_bitmap, mac_destroy_fringe_bitmap)
+	(mac_draw_cg_image) [USE_CG_DRAWING]: New functions.
+	(mac_draw_bitmap) [USE_CG_DRAWING]: Remove function.
+	(x_draw_fringe_bitmap) [USE_CG_DRAWING]: Use mac_draw_cg_image
+	instead of mac_draw_bitmap.
+	(x_redisplay_interface) [USE_CG_DRAWING]: Set handlers for
+	define_fringe_bitmap and destroy_fringe_bitmap.
+
+2006-03-14  Chong Yidong  <cyd@stupidchicken.com>
+
+	* xterm.c (x_uncatch_errors): Block input for entire function.
+
 2006-03-12  Jason Rumney  <jasonr@gnu.org>
 
 	* w32fns.c (Fx_create_frame): Remove call to
-	Qface_set_after_frame_default. (from xfns.c 2003-05-26)
+	Qface_set_after_frame_default (from xfns.c 2003-05-26).
 
 	* w32menu.c (Fx_popup_menu): Call w32_free_menu_strings when
 	finished with the menu.
@@ -11,7 +100,7 @@
 	(note_mouse_movement): Say mouse moved if current frame differs
 	from last_mouse_glyph_frame, and update last_mouse_glyph_frame.
 	(w32_mouse_position): Set last_mouse_glyph_frame.
-	 Remove OLD_REDISPLAY_CODE block.
+	Remove OLD_REDISPLAY_CODE block.
 
 2006-03-12  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
@@ -189,7 +278,7 @@
 
 	* xdisp.c: Minimize the unpleasent visual impact of the requirement
 	that non-toolkit tool-bars must occupy an integral number of screen
-	lines, by distributing the rows evenly over the tool-bar screen	area.
+	lines, by distributing the rows evenly over the tool-bar screen area.
 	(Vtool_bar_border): New variable.
 	(syms_of_xdisp): DEFVAR_LISP it.
 	(display_tool_bar_line): Add HEIGHT arg for desired row height.
@@ -223,9 +312,9 @@
 
 	* xterm.h, xterm.c (x_uncatch_errors): Delete unneccessary argument.
 
-	* xterm.c: (x_load_font, x_term_init, XTmouse_position)
-	(handle_one_xevent, x_connection_closed, x_list_fonts): No arg for
-	x_uncatch_errors.
+	* xterm.c (x_load_font, x_term_init, XTmouse_position)
+	(handle_one_xevent, x_connection_closed, x_list_fonts):
+	No arg for x_uncatch_errors.
 
 	* xselect.c (x_own_selection, x_decline_selection_request)
 	(x_reply_selection_request, x_get_foreign_selection)
@@ -353,7 +442,7 @@
 
 	* fringe.c (syms_of_fringe) <fringe-bitmaps>: Doc fix.
 
-2006-02-21  Zhang Wei <brep@newsmth.org>
+2006-02-21  Zhang Wei  <brep@newsmth.org>
 
 	* xfns.c (Fx_file_dialog, Motif and GTK): DECODE_FILE before
 	returning it.
@@ -422,7 +511,7 @@
 	(draw_fringe_bitmap_1): Make static.
 	(get_logical_cursor_bitmap, get_logical_fringe_bitmap): New functions
 	to map from logical cursors and indicators to physical bitmaps.
-	(draw_fringe_bitmap): Resolve fringe cursor and	overlay-arrow
+	(draw_fringe_bitmap): Resolve fringe cursor and overlay-arrow
 	bitmaps using symbol names instead of bitmap numbers.
 	(update_window_fringes): Use logical indicator symbol names
 	instead of bitmap numbers for logical.  Add bitmap cache.
--- a/src/dispextern.h	Tue Mar 14 12:15:08 2006 +0000
+++ b/src/dispextern.h	Sun Mar 19 19:43:57 2006 +0000
@@ -2729,6 +2729,9 @@
 void w32_init_fringe P_ ((void));
 void w32_reset_fringes P_ ((void));
 #endif
+#ifdef MAC_OS
+void mac_init_fringe P_ ((void));
+#endif
 
 /* Defined in image.c */
 
--- a/src/emacs.c	Tue Mar 14 12:15:08 2006 +0000
+++ b/src/emacs.c	Sun Mar 19 19:43:57 2006 +0000
@@ -53,6 +53,10 @@
 #include "buffer.h"
 #include "window.h"
 
+#ifdef HAVE_X_WINDOWS
+#include "xterm.h"
+#endif
+
 #include "systty.h"
 #include "blockinput.h"
 #include "syssignal.h"
@@ -1486,6 +1490,14 @@
 
     /* Don't actually discard this arg.  */
     skip_args = count_before;
+
+    /* Do not be lenient if the user explicitly asked for a named display.  */
+    if (display_arg != 1 && !x_display_ok (displayname))
+      {
+	fprintf (stderr, "Display %s unavailable, simulating -nw\n",
+		 displayname);
+	inhibit_window_system = 1;
+      }
   }
 #endif
 
--- a/src/fringe.c	Tue Mar 14 12:15:08 2006 +0000
+++ b/src/fringe.c	Sun Mar 19 19:43:57 2006 +0000
@@ -1689,10 +1689,14 @@
     }
 }
 
-#ifdef HAVE_NTGUI
+#if defined (HAVE_NTGUI) || defined (MAC_OS)
 
 void
+#ifdef HAVE_NTGUI
 w32_init_fringe ()
+#else  /* MAC_OS */
+mac_init_fringe ()
+#endif
 {
   int bt;
 
@@ -1705,7 +1709,9 @@
       rif->define_fringe_bitmap (bt, fb->bits, fb->height, fb->width);
     }
 }
+#endif
 
+#ifdef HAVE_NTGUI
 void
 w32_reset_fringes ()
 {
--- a/src/image.c	Tue Mar 14 12:15:08 2006 +0000
+++ b/src/image.c	Sun Mar 19 19:43:57 2006 +0000
@@ -189,6 +189,7 @@
   PixMapHandle pixmap = GetGWorldPixMap (ximage);
   short depth = GetPixDepth (pixmap);
 
+#if defined (WORDS_BIG_ENDIAN) || !USE_CG_DRAWING
   if (depth == 32)
     {
       char *base_addr = GetPixBaseAddr (pixmap);
@@ -196,7 +197,9 @@
 
       ((unsigned long *) (base_addr + y * row_bytes))[x] = 0xff000000 | pixel;
     }
-  else if (depth == 1)
+  else
+#endif
+ if (depth == 1)
     {
       char *base_addr = GetPixBaseAddr (pixmap);
       short row_bytes = GetPixRowBytes (pixmap);
@@ -233,6 +236,7 @@
   PixMapHandle pixmap = GetGWorldPixMap (ximage);
   short depth = GetPixDepth (pixmap);
 
+#if defined (WORDS_BIG_ENDIAN) || !USE_CG_DRAWING
   if (depth == 32)
     {
       char *base_addr = GetPixBaseAddr (pixmap);
@@ -240,7 +244,9 @@
 
       return ((unsigned long *) (base_addr + y * row_bytes))[x] & 0x00ffffff;
     }
-  else if (depth == 1)
+  else
+#endif
+  if (depth == 1)
     {
       char *base_addr = GetPixBaseAddr (pixmap);
       short row_bytes = GetPixRowBytes (pixmap);
@@ -272,6 +278,49 @@
 {
   UnlockPixels (GetGWorldPixMap (ximg));
 }
+
+#if USE_CG_DRAWING
+static CGImageRef
+mac_create_cg_image_from_image (f, img)
+     struct frame *f;
+     struct image *img;
+{
+  Pixmap mask;
+  CGImageRef result = NULL;
+
+  BLOCK_INPUT;
+  if (img->mask)
+    mask = img->mask;
+  else
+    {
+      mask = XCreatePixmap (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+			    img->width, img->height, 1);
+      if (mask)
+	{
+	  CGrafPtr old_port;
+	  GDHandle old_gdh;
+	  Rect r;
+
+	  GetGWorld (&old_port, &old_gdh);
+	  SetGWorld (mask, NULL);
+	  BackColor (blackColor); /* Don't mask.  */
+	  SetRect (&r, 0, 0, img->width, img->height);
+	  EraseRect (&r);
+	  SetGWorld (old_port, old_gdh);
+	}
+    }
+  if (mask)
+    {
+      CreateCGImageFromPixMaps (GetGWorldPixMap (img->pixmap),
+				GetGWorldPixMap (mask), &result);
+      if (mask != img->mask)
+	XFreePixmap (FRAME_X_DISPLAY (f), mask);
+    }
+  UNBLOCK_INPUT;
+
+  return result;
+}
+#endif /* USE_CG_DRAWING */
 #endif /* MAC_OS */
 
 
@@ -1206,6 +1255,18 @@
      type dependent loader function.  */
   if (img->pixmap == NO_PIXMAP && !img->load_failed_p)
     img->load_failed_p = img->type->load (f, img) == 0;
+
+#if defined (MAC_OS) && USE_CG_DRAWING
+  if (!img->load_failed_p && img->data.ptr_val == NULL)
+    {
+      img->data.ptr_val = mac_create_cg_image_from_image (f, img);
+      if (img->data.ptr_val == NULL)
+	{
+	  img->load_failed_p = 1;
+	  img->type->free (f, img);
+	}
+    }
+#endif
 }
 
 
@@ -1452,6 +1513,14 @@
       img->colors = NULL;
       img->ncolors = 0;
     }
+
+#if defined (MAC_OS) && USE_CG_DRAWING
+  if (img->data.ptr_val)
+    {
+      CGImageRelease (img->data.ptr_val);
+      img->data.ptr_val = NULL;
+    }
+#endif
 }
 
 /* Free X resources of image IMG which is used on frame F.  */
--- a/src/m/mips.h	Tue Mar 14 12:15:08 2006 +0000
+++ b/src/m/mips.h	Sun Mar 19 19:43:57 2006 +0000
@@ -112,10 +112,10 @@
 /* This machine requires completely different unexec code
    which lives in a separate file.  Specify the file name.  */
 
-#ifndef __linux__
+#if !defined(__linux__) && !defined(__NetBSD__)
 #undef UNEXEC
 #define UNEXEC unexmips.o
-#endif /* not __linux__ */
+#endif /* not __linux__ && not __NetBSD__ */
 
 /* Describe layout of the address space in an executing process.  */
 
@@ -142,6 +142,15 @@
 #if defined (__NetBSD__) || defined (__OpenBSD__)
 #else  /* bsd with elf */
 #define LINKER /bsd43/bin/ld
+
+#define LD_SWITCH_MACHINE -D 800000 -g3
+#define START_FILES pre-crt0.o /usr/lib/crt1.o
+#define LIB_STANDARD -lbsd -lc /usr/lib/crtn.o
+#define LIBS_TERMCAP -lcurses
+
+#define C_SWITCH_MACHINE -I/usr/include/bsd
+#define C_DEBUG_SWITCH -O -g3
+
 #endif /* bsd with elf */
 #else /* not BSD_SYSTEM */
 
@@ -151,14 +160,6 @@
 #define LIBS_MACHINE -lmld
 #endif
 
-#define LD_SWITCH_MACHINE -D 800000 -g3
-#define START_FILES pre-crt0.o /usr/lib/crt1.o
-#define LIB_STANDARD -lbsd -lc /usr/lib/crtn.o
-#define LIBS_TERMCAP -lcurses
-
-#define C_SWITCH_MACHINE -I/usr/include/bsd
-#define C_DEBUG_SWITCH -O -g3
-
 #endif /* not BSD_SYSTEM */
 #endif /* not NEWSOS5 && not __linux__ */
 
--- a/src/m/pmax.h	Tue Mar 14 12:15:08 2006 +0000
+++ b/src/m/pmax.h	Sun Mar 19 19:43:57 2006 +0000
@@ -13,8 +13,12 @@
 #ifndef __MIPSEB__
 #undef WORDS_BIG_ENDIAN
 #endif
+#if defined (__NetBSD__)
+#define BROKEN_NOCOMBRELOC
+#else
 #undef LIB_STANDARD
 #undef START_FILES
+#endif
 #undef COFF
 #undef TERMINFO
 #define MAIL_USE_FLOCK
@@ -24,18 +28,12 @@
 #ifdef MACH
 #define START_FILES pre-crt0.o /usr/lib/crt0.o
 #else
+#if !defined (__NetBSD__)
 /* This line starts being needed with ultrix 4.0.  */
 /* You must delete it for version 3.1.  */
 #define START_FILES pre-crt0.o /usr/lib/cmplrs/cc/crt0.o
 #endif
-
-#if defined (__NetBSD__) || defined (__OpenBSD__)
-#undef START_FILES
-#define START_FILES pre-crt0.o /usr/lib/crt0.o
-#undef RUN_TIME_REMAP
-#undef UNEXEC
-#define UNEXEC unexelf.o
-#endif /* NetBSD || OpenBSD */
+#endif
 
 /* Supposedly the following will overcome a kernel bug.  */
 #undef LD_SWITCH_MACHINE
--- a/src/macterm.c	Tue Mar 14 12:15:08 2006 +0000
+++ b/src/macterm.c	Sun Mar 19 19:43:57 2006 +0000
@@ -283,6 +283,11 @@
 #if USE_CG_DRAWING
 #define FRAME_CG_CONTEXT(f)	((f)->output_data.mac->cg_context)
 
+/* Fringe bitmaps.  */
+
+static int max_fringe_bmp = 0;
+static CGImageRef *fringe_bmp = 0;
+
 static CGContextRef
 mac_begin_cg_clip (f, gc)
      struct frame *f;
@@ -511,6 +516,44 @@
 
 /* Mac replacement for XCopyArea.  */
 
+#if USE_CG_DRAWING
+static void
+mac_draw_cg_image (image, f, gc, src_x, src_y, width, height,
+		   dest_x, dest_y, overlay_p)
+     CGImageRef image;
+     struct frame *f;
+     GC gc;
+     int src_x, src_y;
+     unsigned int width, height;
+     int dest_x, dest_y, overlay_p;
+{
+  CGContextRef context;
+  float port_height = FRAME_PIXEL_HEIGHT (f);
+  CGRect dest_rect = CGRectMake (dest_x, dest_y, width, height);
+
+  context = mac_begin_cg_clip (f, gc);
+  if (!overlay_p)
+    {
+      CG_SET_FILL_COLOR (context, gc->xgcv.background);
+      CGContextFillRect (context, dest_rect);
+    }
+  CGContextClipToRect (context, dest_rect);
+  CGContextScaleCTM (context, 1, -1);
+  CGContextTranslateCTM (context, 0, -port_height);
+  if (CGImageIsMask (image))
+    CG_SET_FILL_COLOR (context, gc->xgcv.foreground);
+  CGContextDrawImage (context,
+		      CGRectMake (dest_x - src_x,
+				  port_height - (dest_y - src_y
+						 + CGImageGetHeight (image)),
+				  CGImageGetWidth (image),
+				  CGImageGetHeight (image)),
+		      image);
+  mac_end_cg_clip (f);
+}
+
+#else  /* !USE_CG_DRAWING */
+
 static void
 mac_draw_bitmap (f, gc, x, y, width, height, bits, overlay_p)
      struct frame *f;
@@ -526,9 +569,6 @@
   bitmap.baseAddr = (char *)bits;
   SetRect (&(bitmap.bounds), 0, 0, width, height);
 
-#if USE_CG_DRAWING
-  mac_prepare_for_quickdraw (f);
-#endif
   SetPortWindowPort (FRAME_MAC_WINDOW (f));
 
   RGBForeColor (GC_FORE_COLOR (gc));
@@ -554,6 +594,7 @@
 
   RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f)));
 }
+#endif	/* !USE_CG_DRAWING */
 
 
 /* Mac replacement for XCreateBitmapFromBitmapData.  */
@@ -614,7 +655,15 @@
   SetPortWindowPort (w);
 
   SetRect (&r, 0, 0, width, height);
-  err = NewGWorld (&pixmap, depth, &r, NULL, NULL, 0);
+#if !defined (WORDS_BIG_ENDIAN) && USE_CG_DRAWING
+  if (depth == 1)
+#endif
+    err = NewGWorld (&pixmap, depth, &r, NULL, NULL, 0);
+#if !defined (WORDS_BIG_ENDIAN) && USE_CG_DRAWING
+  else
+    /* CreateCGImageFromPixMaps requires ARGB format.  */
+    err = QTNewGWorld (&pixmap, k32ARGBPixelFormat, &r, NULL, NULL, 0);
+#endif
   if (err != noErr)
     return NULL;
   return pixmap;
@@ -1297,6 +1346,7 @@
 #endif
 
 
+#if !USE_CG_DRAWING
 /* Mac replacement for XCopyArea: dest must be window.  */
 
 static void
@@ -1310,9 +1360,6 @@
 {
   Rect src_r, dest_r;
 
-#if USE_CG_DRAWING
-  mac_prepare_for_quickdraw (f);
-#endif
   SetPortWindowPort (FRAME_MAC_WINDOW (f));
 
   SetRect (&src_r, src_x, src_y, src_x + width, src_y + height);
@@ -1357,9 +1404,6 @@
 {
   Rect src_r, dest_r;
 
-#if USE_CG_DRAWING
-  mac_prepare_for_quickdraw (f);
-#endif
   SetPortWindowPort (FRAME_MAC_WINDOW (f));
 
   SetRect (&src_r, src_x, src_y, src_x + width, src_y + height);
@@ -1392,6 +1436,7 @@
 
   RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f)));
 }
+#endif	/* !USE_CG_DRAWING */
 
 
 /* Mac replacement for XCopyArea: used only for scrolling.  */
@@ -2003,9 +2048,12 @@
 #endif
     }
 
-  if (p->which)
-    {
-      unsigned short *bits = p->bits + p->dh;
+  if (p->which
+#if USE_CG_DRAWING
+      && p->which < max_fringe_bmp
+#endif
+      )
+    {
       XGCValues gcv;
 
       XGetGCValues (display, face->gc, GCForeground, &gcv);
@@ -2014,14 +2062,64 @@
 		       ? (p->overlay_p ? face->background
 			  : f->output_data.mac->cursor_pixel)
 		       : face->foreground));
+#if USE_CG_DRAWING
+      mac_draw_cg_image (fringe_bmp[p->which], f, face->gc, 0, p->dh,
+			 p->wd, p->h, p->x, p->y, p->overlay_p);
+#else
       mac_draw_bitmap (f, face->gc, p->x, p->y,
-		       p->wd, p->h, bits, p->overlay_p);
+		       p->wd, p->h, p->bits + p->dh, p->overlay_p);
+#endif
       XSetForeground (display, face->gc, gcv.foreground);
     }
 
   mac_reset_clip_rectangles (display, face->gc);
 }
 
+#if USE_CG_DRAWING
+static void
+mac_define_fringe_bitmap (which, bits, h, wd)
+     int which;
+     unsigned short *bits;
+     int h, wd;
+{
+  unsigned short *mask_bits;
+  int i;
+  CGDataProviderRef provider;
+
+  if (which >= max_fringe_bmp)
+    {
+      i = max_fringe_bmp;
+      max_fringe_bmp = which + 20;
+      fringe_bmp = (CGImageRef *) xrealloc (fringe_bmp, max_fringe_bmp * sizeof (CGImageRef));
+      while (i < max_fringe_bmp)
+	fringe_bmp[i++] = 0;
+    }
+
+  for (i = 0; i < h; i++)
+    bits[i] = ~bits[i];
+  provider = CGDataProviderCreateWithData (NULL, bits,
+					   sizeof (unsigned short) * h, NULL);
+  if (provider)
+    {
+      fringe_bmp[which] = CGImageMaskCreate (wd, h, 1, 1,
+					     sizeof (unsigned short),
+					     provider, NULL, 0);
+      CGDataProviderRelease (provider);
+    }
+}
+
+static void
+mac_destroy_fringe_bitmap (which)
+     int which;
+{
+  if (which >= max_fringe_bmp)
+    return;
+
+  if (fringe_bmp[which])
+    CGImageRelease (fringe_bmp[which]);
+  fringe_bmp[which] = 0;
+}
+#endif
 
 
 /* This is called when starting Emacs and when restarting after
@@ -3193,15 +3291,26 @@
     {
       x_set_glyph_string_clipping (s);
 
+#if USE_CG_DRAWING
+      mac_draw_cg_image (s->img->data.ptr_val,
+			 s->f, s->gc, s->slice.x, s->slice.y,
+			 s->slice.width, s->slice.height, x, y, 1);
+#endif
       if (s->img->mask)
+#if !USE_CG_DRAWING
 	mac_copy_area_with_mask (s->img->pixmap, s->img->mask,
 				 s->f, s->gc, s->slice.x, s->slice.y,
 				 s->slice.width, s->slice.height, x, y);
+#else
+	;
+#endif
       else
 	{
+#if !USE_CG_DRAWING
 	  mac_copy_area (s->img->pixmap,
 			 s->f, s->gc, s->slice.x, s->slice.y,
 			 s->slice.width, s->slice.height, x, y);
+#endif
 
 	  /* When the image has a mask, we can expect that at
 	     least part of a mouse highlight or a block cursor will
@@ -10913,8 +11022,13 @@
   x_get_glyph_overhangs,
   x_fix_overlapping_area,
   x_draw_fringe_bitmap,
+#if USE_CG_DRAWING
+  mac_define_fringe_bitmap,
+  mac_destroy_fringe_bitmap,
+#else
   0, /* define_fringe_bitmap */
   0, /* destroy_fringe_bitmap */
+#endif
   mac_per_char_metric,
   mac_encode_char,
   mac_compute_glyph_string_overhangs,
@@ -10990,6 +11104,11 @@
     MakeMeTheFrontProcess ();
 #endif
 #endif
+
+#if USE_CG_DRAWING
+  mac_init_fringe ();
+#endif
+
   UNBLOCK_INPUT;
 }
 
--- a/src/sheap.c	Tue Mar 14 12:15:08 2006 +0000
+++ b/src/sheap.c	Sun Mar 19 19:43:57 2006 +0000
@@ -26,11 +26,7 @@
 
 #include <unistd.h>
 
-#ifdef HAVE_X_WINDOWS
-#define STATIC_HEAP_SIZE	(8 * 1024 * 1024)
-#else
-#define STATIC_HEAP_SIZE	(8 * 1024 * 1024)
-#endif
+#define STATIC_HEAP_SIZE	(12 * 1024 * 1024)
 
 int debug_sheap = 0;
 
--- a/src/unexelf.c	Tue Mar 14 12:15:08 2006 +0000
+++ b/src/unexelf.c	Sun Mar 19 19:43:57 2006 +0000
@@ -433,6 +433,9 @@
 #if __sgi
 #include <syms.h> /* for HDRR declaration */
 #endif /* __sgi */
+#ifdef BROKEN_NOCOMBRELOC
+#include <assert.h>
+#endif
 
 #ifndef MAP_ANON
 #ifdef MAP_ANONYMOUS
@@ -687,6 +690,9 @@
   int old_mdebug_index;
   struct stat stat_buf;
   int old_file_size;
+#ifdef BROKEN_NOCOMBRELOC
+  int unreloc_sections[10], n_unreloc_sections;
+#endif
 
   /* Open the old file, allocate a buffer of the right size, and read
      in the file contents.  */
@@ -1218,6 +1224,7 @@
 
   /* This loop seeks out relocation sections for the data section, so
      that it can undo relocations performed by the runtime linker.  */
+#ifndef BROKEN_NOCOMBRELOC
   for (n = new_file_h->e_shnum - 1; n; n--)
     {
       ElfW(Shdr) section = NEW_SECTION_H (n);
@@ -1272,6 +1279,81 @@
 	  break;
 	}
     }
+#else /* BROKEN_NOCOMBRELOC */
+  for (n = 1, n_unreloc_sections = 0; n < new_file_h->e_shnum; n++)
+    if (!strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".data")
+	|| !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".sdata")
+	|| !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".lit4")
+	|| !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".lit8")
+#ifdef IRIX6_5			/* see above */
+	|| !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".got")
+#endif
+	|| !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".sdata1")
+	|| !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".data1"))
+      {
+	assert (n_unreloc_sections
+		< (sizeof (unreloc_sections) / sizeof (unreloc_sections[0])));
+	unreloc_sections[n_unreloc_sections++] = n;
+#ifdef DEBUG
+	fprintf (stderr, "section %d: %s\n", n,
+		 old_section_names + NEW_SECTION_H (n).sh_name);
+#endif
+      }
+
+  for (n = new_file_h->e_shnum - 1; n; n--)
+    {
+      ElfW(Shdr) section = NEW_SECTION_H (n);
+      caddr_t reloc, end;
+      ElfW(Addr) addr, offset;
+      int target;
+
+      switch (section.sh_type)
+	{
+	default:
+	  break;
+	case SHT_REL:
+	case SHT_RELA:
+	  /* This code handles two different size structs, but there should
+	     be no harm in that provided that r_offset is always the first
+	     member.  */
+	  for (reloc = old_base + section.sh_offset,
+		 end = reloc + section.sh_size;
+	       reloc < end;
+	       reloc += section.sh_entsize)
+	    {
+	      addr = ((ElfW(Rel) *) reloc)->r_offset;
+#ifdef __alpha__
+	      /* The Alpha ELF binutils currently have a bug that
+		 sometimes results in relocs that contain all
+		 zeroes.  Work around this for now...  */
+	      if (addr == 0)
+		continue;
+#endif
+	      for (nn = 0; nn < n_unreloc_sections; nn++)
+		{
+		  target = unreloc_sections[nn];
+		  if (NEW_SECTION_H (target).sh_addr <= addr
+		      && addr < (NEW_SECTION_H (target).sh_addr +
+				 NEW_SECTION_H (target).sh_size))
+		    {
+		      offset = (NEW_SECTION_H (target).sh_addr -
+				NEW_SECTION_H (target).sh_offset);
+		      memcpy (new_base + addr - offset,
+			      old_base + addr - offset,
+			      sizeof (ElfW(Addr)));
+#ifdef DEBUG
+		      fprintf (stderr, "unrelocate: [%08lx] <= %08lx\n",
+			       (long) addr,
+			       (long) *((long *) (new_base + addr - offset)));
+#endif
+		      break;
+		    }
+		}
+	    }
+	  break;
+	}
+    }
+#endif	/* BROKEN_NOCOMBRELOC */
 
   /* Write out new_file, and free the buffers.  */
 
--- a/src/w32fns.c	Tue Mar 14 12:15:08 2006 +0000
+++ b/src/w32fns.c	Sun Mar 19 19:43:57 2006 +0000
@@ -7999,8 +7999,12 @@
  ***********************************************************************/
 
 DEFUN ("w32-select-font", Fw32_select_font, Sw32_select_font, 0, 2, 0,
-       doc: /* Select a font using the W32 font dialog.
-Returns an X font string corresponding to the selection.  */)
+       doc: /* Select a font for the named FRAME using the W32 font dialog.
+Returns an X-style font string corresponding to the selection.
+
+If FRAME is omitted or nil, it defaults to the selected frame.
+If INCLUDE-PROPORTIONAL is non-nil, include proportional fonts
+in the font selection dialog. */)
   (frame, include_proportional)
      Lisp_Object frame, include_proportional;
 {
--- a/src/xdisp.c	Tue Mar 14 12:15:08 2006 +0000
+++ b/src/xdisp.c	Sun Mar 19 19:43:57 2006 +0000
@@ -9544,7 +9544,12 @@
    HEIGHT specifies the desired height of the tool-bar line.
    If the actual height of the glyph row is less than HEIGHT, the
    row's height is increased to HEIGHT, and the icons are centered
-   vertically in the new height.  */
+   vertically in the new height.
+
+   If HEIGHT is -1, we are counting needed tool-bar lines, so don't
+   count a final empty row in case the tool-bar width exactly matches
+   the window width.
+*/
 
 static void
 display_tool_bar_line (it, height)
@@ -9568,7 +9573,12 @@
 
       /* Get the next display element.  */
       if (!get_next_display_element (it))
-	break;
+	{
+	  /* Don't count empty row if we are counting needed tool-bar lines.  */
+	  if (height < 0 && !it->hpos)
+	    return;
+	  break;
+	}
 
       /* Produce glyphs.  */
       x_before = it->current_x;
@@ -9666,11 +9676,12 @@
     {
       it.glyph_row = w->desired_matrix->rows;
       clear_glyph_row (it.glyph_row);
-      display_tool_bar_line (&it, 0);
-    }
-
+      display_tool_bar_line (&it, -1);
+    }
+
+  /* f->n_tool_bar_rows == 0 means "unknown"; -1 means no tool-bar.  */
   if (n_rows)
-    *n_rows = it.vpos;
+    *n_rows = it.vpos > 0 ? it.vpos : -1;
 
   return (it.current_y + FRAME_LINE_HEIGHT (f) - 1) / FRAME_LINE_HEIGHT (f);
 }
@@ -9746,11 +9757,7 @@
   reseat_to_string (&it, NULL, f->desired_tool_bar_string, 0, 0, 0, -1);
 
   if (f->n_tool_bar_rows == 0)
-    {
-      (void)tool_bar_lines_needed (f, &f->n_tool_bar_rows);
-      if (f->n_tool_bar_rows == 0)
-	f->n_tool_bar_rows = -1;
-    }
+    (void)tool_bar_lines_needed (f, &f->n_tool_bar_rows);
 
   /* Display as many lines as needed to display all tool-bar items.  */
 
@@ -15453,6 +15460,7 @@
     face = FACE_FROM_ID (f, it->face_id);
 
   if (FRAME_WINDOW_P (f)
+      && it->glyph_row->displays_text_p
       && face->box == FACE_NO_BOX
       && face->background == FRAME_BACKGROUND_PIXEL (f)
       && !face->stipple)
--- a/src/xterm.c	Tue Mar 14 12:15:08 2006 +0000
+++ b/src/xterm.c	Sun Mar 19 19:43:57 2006 +0000
@@ -7589,18 +7589,17 @@
 {
   struct x_error_message_stack *tmp;
 
+  BLOCK_INPUT;
+
   /* The display may have been closed before this function is called.
      Check if it is still open before calling XSync.  */
   if (x_display_info_for_display (x_error_message->dpy) != 0)
-    {
-      BLOCK_INPUT;
-      XSync (x_error_message->dpy, False);
-      UNBLOCK_INPUT;
-    }
+    XSync (x_error_message->dpy, False);
 
   tmp = x_error_message;
   x_error_message = x_error_message->prev;
   xfree (tmp);
+  UNBLOCK_INPUT;
 }
 
 /* If any X protocol errors have arrived since the last call to
@@ -10345,6 +10344,25 @@
   *bits = nr;
 }
 
+int
+x_display_ok (display)
+    const char * display;
+{
+    int dpy_ok = 1;
+    Display *dpy;
+
+    if (!display)
+      display = getenv("DISPLAY");
+    if (!display)
+      return 0;
+
+    if ((dpy = XOpenDisplay (display)))
+      XCloseDisplay (dpy);
+    else
+      dpy_ok = 0;
+    return dpy_ok;
+}
+
 struct x_display_info *
 x_term_init (display_name, xrm_option, resource_name)
      Lisp_Object display_name;
--- a/src/xterm.h	Tue Mar 14 12:15:08 2006 +0000
+++ b/src/xterm.h	Sun Mar 19 19:43:57 2006 +0000
@@ -423,6 +423,7 @@
 extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object));
 
 extern struct x_display_info *x_term_init P_ ((Lisp_Object, char *, char *));
+extern int x_display_ok  P_ ((const char *));
 
 extern Lisp_Object x_list_fonts P_ ((struct frame *, Lisp_Object, int, int));
 extern void select_visual P_ ((struct x_display_info *));