changeset 83494:b901f4f12f33

Merged from emacs@sv.gnu.org Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-160 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-161 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-162 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-163 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-164 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-165 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-166 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-167 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-168 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-169 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-170 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-171 Update from CVS: man/mh-e.texi (Folders): Various edits. * emacs@sv.gnu.org/emacs--devo--0--patch-172 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-58 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-59 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-60 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-61 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-62 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-63 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-64 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-534
author Karoly Lorentey <lorentey@elte.hu>
date Wed, 22 Mar 2006 15:16:06 +0000
parents 1bf2ca323037 (current diff) e628ada14872 (diff)
children 989dc6aa2eb2
files ChangeLog lib-src/vcdiff lisp/ChangeLog lisp/files.el lisp/font-lock.el lisp/international/mule.el lisp/isearch.el lisp/mh-e/ChangeLog lisp/progmodes/gdb-ui.el lisp/simple.el lispref/ChangeLog man/ChangeLog man/emacs.texi man/mh-e.texi man/picture.texi src/dispextern.h src/dispnew.c src/fileio.c src/fringe.c src/image.c src/keymap.c src/macterm.c src/window.c src/xdisp.c src/xfns.c src/xterm.c src/xterm.h
diffstat 93 files changed, 3705 insertions(+), 2316 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Mar 21 22:32:30 2006 +0000
+++ b/ChangeLog	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/Makefile.in	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/etc/ChangeLog	Wed Mar 22 15:16:06 2006 +0000
@@ -1,3 +1,7 @@
+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.
--- a/etc/DEBUG	Tue Mar 21 22:32:30 2006 +0000
+++ b/etc/DEBUG	Wed Mar 22 15:16:06 2006 +0000
@@ -506,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 21 22:32:30 2006 +0000
+++ b/etc/NEWS	Wed Mar 22 15:16:06 2006 +0000
@@ -159,6 +159,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
@@ -320,6 +324,11 @@
 converts whitespace around point to N spaces.
 
 ---
+** C-x 5 C-o displays a specified buffer in another frame
+but does not switch to that frame.  It's the multi-frame
+analogue of C-x 4 C-o.
+
+---
 ** New commands to operate on pairs of open and close characters:
 `insert-pair', `delete-pair', `raise-sexp'.
 
@@ -873,11 +882,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
@@ -2597,6 +2601,12 @@
 bibtex-autokey-expand-strings control the expansion of strings when
 extracting the content of a BibTeX field.
 
+*** The variables `bibtex-autokey-name-case-convert' and
+`bibtex-autokey-titleword-case-convert' have been renamed to
+`bibtex-autokey-name-case-convert-function' and
+`bibtex-autokey-titleword-case-convert-function'. The old names are
+still available as aliases.
+
 +++
 ** In Enriched mode, `set-left-margin' and `set-right-margin' are now
 by default bound to `C-c [' and `C-c ]' instead of the former `C-c C-l'
--- a/etc/orgcard.tex	Tue Mar 21 22:32:30 2006 +0000
+++ b/etc/orgcard.tex	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/lib-src/ChangeLog	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/lib-src/vcdiff	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/lisp/ChangeLog	Wed Mar 22 15:16:06 2006 +0000
@@ -1,3 +1,239 @@
+2006-03-21  Chong Yidong  <cyd@stupidchicken.com>
+
+	* cus-edit.el (custom-face-set): Call custom-push-theme before
+	face-spec set so that `changed' theme is correctly saved.
+	(custom-face-reset-standard): Reset to recalculated face rather
+	than defface spec.
+
+	* custom.el (custom-push-theme): Only save `changed' theme if the
+	current face does not match the defface specs.
+
+2006-03-21  Simon Josefsson  <jas@extundo.com>
+
+	* pgg-gpg.el: Ideas below based on patch from Sascha Wilde
+	<wilde@sha-bang.de>.
+	(pgg-gpg-use-agent): New variable.
+	(pgg-gpg-process-region): Use it.
+	(pgg-gpg-encrypt-region): Likewise.
+	(pgg-gpg-encrypt-symmetric-region): Likewise.
+	(pgg-gpg-decrypt-region): Likewise.
+	(pgg-gpg-sign-region): Likewise.
+	(pgg-gpg-possibly-cache-passphrase): Don't cache a nil password.
+
+2006-03-21  Carsten Dominik  <dominik@science.uva.nl>
+
+	* textmodes/org.el: (org-open-at-point): Fixed bug in wiki-style
+	bracket links.
+
+2006-03-21  Kim F. Storm  <storm@cua.dk>
+
+	* progmodes/gdb-ui.el (gdb-reset): Set buffer local value of
+	fringe-indicator-alist instead of modifying global value.
+	(gdb-frame-handler): Likewise.
+
+2006-03-21  Nick Roberts  <nickrob@snap.net.nz>
+
+	* diff-mode.el (diff-function): Make it inherit from diff-header
+	instead of diff-context.
+
+	* progmodes/gdb-ui.el (hollow-right-triangle): Define as fringe
+	bitmap.
+	(gdb-info-stack-custom): Rename from gdb-info-frames-custom and
+	change names in macro above for consistency.
+	(gdb-frame-handler): Use hollow-right-triangle for all selected
+	frames which except the innermost (where execution has stopped).
+	(gdb-reset): Reset buffer-local values of overlay-arrow.
+
+2006-03-20  Richard Stallman  <rms@gnu.org>
+
+	* simple.el (set-mark-command): Doc fix.
+
+	* files.el (display-buffer-other-frame): New command.
+	(ctl-x-4-map): Bind C-x 5 C-o to it.
+
+2006-03-20  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* jit-lock.el (jit-lock-function): Check for the actual defer-timer
+	rather than just defer-time, in case defer-time has been changed but
+	the timer isn't running yet.
+	(jit-lock-deferred-fontify): Correspondingly let-bind defer-timer.
+
+2006-03-19  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* help-mode.el (help-follow-symbol): New function.
+	Essentially identical to the old `help-follow', but do not let
+	`push-button' do the work when on an xref.
+	(help-mode-map): Bind `help-follow-symbol' to "C-c C-c".
+
+2006-03-19  Richard Stallman  <rms@gnu.org>
+
+	* help-mode.el (help-xref-symbol-regexp): Make no xref for symbol
+	preceded by the word `program'.
+	(help-follow-mouse, help-follow): Throw error if not on xref.
+	Delete no longer used args.
+
+2006-03-20  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gdb-ui.el (gdb-stopped): Even when there is no source
+	annotation ensure gud-overlay-arrow-position is redisplayed.
+
+2006-03-19  Roland Winkler  <Roland.Winkler@physik.uni-erlangen.de>
+
+	* textmodes/bibtex.el (bibtex-include-OPTkey)
+	(bibtex-entry-field-alist, bibtex-generate-url-list): Mark as risky.
+	(bibtex-autokey-name-case-convert)
+	(bibtex-autokey-titleword-case-convert): Make these the aliases
+	for the following two variables.
+	(bibtex-autokey-name-case-convert-function)
+	(bibtex-autokey-titleword-case-convert-function): Make these the
+	real names.
+	(bibtex-font-lock-keywords): Make bibtex-font-lock-url and
+	bibtex-font-lock-crossref sublists.
+	(bibtex-mode): Revert 2005-12-30 change (which made
+	completion-ignore-case buffer-local).
+	(bibtex-url): Simplify.
+
+2006-03-19  Kim F. Storm  <storm@cua.dk>
+
+	* emulation/cua-rect.el (cua--highlight-rectangle): Set overlay
+	cursor property value to 2 (to align with C level change).
+
+2006-03-19  Bill Wohler  <wohler@newt.com>
+
+	* image.el (image-load-path-for-library): Shorten first line in
+	docstring.
+
+2006-03-18  Richard Stallman  <rms@gnu.org>
+
+	* mail/rmail.el (rmail-reply-regexp): Undo previous change.
+
+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.
@@ -28,8 +264,8 @@
 
 	* 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.
+	(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)
@@ -37,8 +273,7 @@
 	(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.
+	(gdb-starting): Don't show the overlay arrows when program is running.
 
 	* progmodes/gud.el (gud-speedbar-buttons): Follow change to
 	gdb-var-list.
@@ -46,27 +281,32 @@
 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.
+	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-core.el (font-lock-extend-region\(-function\)?.):
+	New function/variable.
+
+	* 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.
+	* 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  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* pcvs-util.el (cvs-insert-strings): Fix bug with strings longer than
+	wwidth.
+
 2006-03-13  Ryan Yeske  <rcyeske@gmail.com>
 
 	* net/rcirc.el (rcirc) <defgroup>: Add link to manual.
@@ -87,18 +327,18 @@
 	themes sub-directory found in tree-widget-themes-load-path.
 	(tree-widget-themes-directory, tree-widget-theme): Doc fix.
 	(tree-widget--locate-sub-directory): Return all occurrences.
-	(tree-widget-themes-path): New function.  Replace
-	tree-widget-themes-directory, and return a list of directories.
+	(tree-widget-themes-path): New function.
+	Replace tree-widget-themes-directory, and return a list of directories.
 	(tree-widget-set-parent-theme)
 	(tree-widget-lookup-image): Use it.
 
 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.
@@ -169,8 +409,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>
 
@@ -208,7 +448,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.
@@ -233,8 +473,8 @@
 
 2006-03-07  Chong Yidong  <cyd@stupidchicken.com>
 
-	* files.el (hack-local-variables-confirm): Set
-	coding-system-for-read to nil before writing to .emacs.
+	* files.el (hack-local-variables-confirm):
+	Set coding-system-for-read to nil before writing to .emacs.
 
 	* arc-mode.el (archive-extract): Check if an existing buffer name
 	comes from a different archive.
@@ -256,8 +496,8 @@
 
 2006-03-07  Carsten Dominik  <dominik@science.uva.nl>
 
-	* textmodes/org.el: Move defvars out of eval-when-compile.  Use
-	buffer-file-name variable.
+	* textmodes/org.el: Move defvars out of eval-when-compile.
+	Use buffer-file-name variable.
 	(org-agenda-file-to-end, org-agenda-file-to-front): Remove unused
 	arg `file'.
 	(org-level-faces): Remove startup dependency.
@@ -272,8 +512,7 @@
 	(org-tag): New face.
 	(org-get-level-face): New function.
 	(org-set-font-lock-defaults): Simplify setup for headlines.
-	(org-complete): Pass common substring to
-	`display-completion-list'.
+	(org-complete): Pass common substring to `display-completion-list'.
 
 2006-03-06  David Ponce  <david@dponce.com>
 
@@ -445,9 +684,8 @@
 
 	* t-mouse.el: New file.
 	(t-mouse-tty): Use with-temp-buffer.  Add more terminal types.
-	(t-mouse-lispy-buffer-posn-from-coords): Remove.  Use the C
-	primitive...
-	(t-mouse-make-event-element): ...posn-at-x-y instead.
+	(t-mouse-lispy-buffer-posn-from-coords): Remove.
+	(t-mouse-make-event-element): Use posn-at-x-y instead.
 	(t-mouse-make-event): Deal with Fedora Core 3.
 	(t-mouse-make-event): Don't sink the `stupid text mode menubar'.
 	(t-mouse-mouse-position-function): New function.  Use it instead
@@ -480,8 +718,7 @@
 	* textmodes/reftex-index.el (reftex-index-map): Add `follow-mouse'
 	binding.
 
-	* textmodes/reftex-toc.el (reftex-toc-map): Add `follow-mouse'
-	binding.
+	* textmodes/reftex-toc.el (reftex-toc-map): Add `follow-mouse' binding.
 
 	* textmodes/reftex-sel.el (reftex-select-label-map)
 	(reftex-select-bib-map): Add `follow-mouse' binding.
@@ -4059,20 +4296,20 @@
 	CC Mode update to 5.31.
 
 	* progmodes/cc-subword.el: Add a dummy `c-subword-mode' for
-	Emacsen which lack `define-minor-mode'.  (Currently Emacs <21.  We
-	might do this function properly in the future).
-
-	* progmodes/cc-cmds.el, cc-defs.el, cc-styles.el, cc-vars.el: New
-	macros c-sentence-end and c-default-value-sentence end, to cope
+	Emacsen which lack `define-minor-mode'.  (Currently Emacs <21.
+	We might do this function properly in the future).
+
+	* progmodes/cc-cmds.el, cc-defs.el, cc-styles.el, cc-vars.el:
+	New macros c-sentence-end and c-default-value-sentence end, to cope
 	with Emacs 22's new function `sentence-end'.
 
 2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
 
-	* progmodes/cc-cmds.el (c-show-syntactic-information): Solved the
+	* progmodes/cc-cmds.el (c-show-syntactic-information): Solve the
 	compat issue using `c-put-overlay' and `c-delete-overlay'.
 
-	* progmodes/cc-defs.el (c-put-overlay, c-delete-overlay): New
-	compat macros to handle overlays/extents.
+	* progmodes/cc-defs.el (c-put-overlay, c-delete-overlay):
+	New compat macros to handle overlays/extents.
 
 2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
 
@@ -4093,20 +4330,19 @@
 
 2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
 
-	* progmodes/cc-fonts.el (c-make-syntactic-matcher): New internal
-	helper.
+	* progmodes/cc-fonts.el (c-make-syntactic-matcher):
+	New internal helper.
 
 	(c-cpp-matchers, c-basic-matchers-before): Use the `eval'
 	construct to make the indirect face lookup work in XEmacs.
 
 	(c-cpp-matchers): Append the negation char face to the existing
-	fontification, so that the cpp face doesn't disappear.  Use
-	`c-make-syntactic-matcher' to avoid negation chars in comments and
-	strings.
+	fontification, so that the cpp face doesn't disappear.
+	Use `c-make-syntactic-matcher' to avoid negation chars in comments
+	and strings.
 
 	* progmodes/cc-fonts.el (c-negation-char-face-name): New variable
-	to map to `font-lock-negation-char-face' in emacsen where it
-	exists.
+	to map to `font-lock-negation-char-face' in emacsen where it exists.
 
 2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
 
@@ -4129,18 +4365,17 @@
 	(i) Insert a binding for C-c C-backspace into
 	c-bind-special-erase-keys which works in TTYs.
 	(ii) Make sure that when file styles are used, any explicitly
-	given style variables take priority over those in the style.  Do
-	this by calling `hack-local-variables' a second time.
+	given style variables take priority over those in the style.
+	Do this by calling `hack-local-variables' a second time.
 
 	* progmodes/cc-vars.el: Add language specific customization
 	widgets for AWK to c-doc-comment-style, c-require-final-newline
-	and c-default-style.  Add a defcustom for awk-mode-hook.  Give
-	c-syntactic-element and c-syntactic-context doc-strings by
-	directly setting their `variable-documentation' propery.  This
-	allows Emacs 22.1 to read these with C-h v.
-
-	* progmodes/cc-awk.el: Apply a tidy-up patch (from Stefan
-	Monnier).
+	and c-default-style.  Add a defcustom for awk-mode-hook.
+	Give c-syntactic-element and c-syntactic-context doc-strings by
+	directly setting their `variable-documentation' propery.
+	This allows Emacs 22.1 to read these with C-h v.
+
+	* progmodes/cc-awk.el: Apply a tidy-up patch (from Stefan Monnier).
 
 2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
 
@@ -4166,8 +4401,8 @@
 	* progmodes/cc-mode.el: Give c-hungry-backspace and
 	c-hungry-delete-forward permanent key bindings.
 
-	* progmodes/cc-cmds.el (c-electric-semi&comma): Bind
-	c-syntactic-context for calls to "criteria functions", for
+	* progmodes/cc-cmds.el (c-electric-semi&comma):
+	Bind c-syntactic-context for calls to "criteria functions", for
 	consistency with other calls to user functions.
 
 	* progmodes/cc-cmds.el (c-indent-command): Expunge use of
@@ -4181,7 +4416,7 @@
 
 2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
 
-	* progmodes/cc-engine.el (c-on-identifier): Fixed bug when at the
+	* progmodes/cc-engine.el (c-on-identifier): Fix bug when at the
 	first char of an identifier.
 
 	* progmodes/cc-engine.el (c-on-identifier): Handle the "operator
@@ -4206,14 +4441,14 @@
 2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
 
 	* progmodes/cc-fonts.el (c-cpp-matchers, c-basic-matchers-before):
-	Incorporated the patterns added in the Emacs development branch
+	Incorporate the patterns added in the Emacs development branch
 	for the new Emacs 22 face `font-lock-negation-char-face'.
 
 	* progmodes/cc-fonts.el (c-invalid-face-name): Use "red1" instead
 	of "red" since it stands out better in xterms and DOS terminals.
 
-	* progmodes/cc-engine.el (c-literal-faces): Added
-	`font-lock-comment-delimiter-face' which is new in Emacs 22.
+	* progmodes/cc-engine.el (c-literal-faces):
+	Add `font-lock-comment-delimiter-face' which is new in Emacs 22.
 
 2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
 
@@ -4221,14 +4456,13 @@
 	forcibly enable c-electric-flag.
 
 	* progmodes/cc-vars.el, cc-cmds.el: New clean-up
-	`comment-close-slash' on c-electric-slash: if enabled, typing `/'
-	just after the comment-prefix of a C-style comment will close that
-	comment.
+	`comment-close-slash' on c-electric-slash: if enabled, typing `/' just
+	after the comment-prefix of a C-style comment will close that comment.
 
 2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
 
 	* progmodes/cc-fonts.el (c-basic-matchers-before)
-	(c-complex-decl-matchers): Fixed the "not-arrow-prefix" regexp used
+	(c-complex-decl-matchers): Fix the "not-arrow-prefix" regexp used
 	in Pike.
 
 	* progmodes/cc-langs.el (c-other-op-syntax-tokens): Only C++ has
@@ -4237,10 +4471,10 @@
 	* progmodes/cc-fonts.el, cc-langs.el, cc-engine.el
 	(c-cpp-message-directives, c-cpp-include-directives)
 	(c-opt-cpp-macro-define, c-opt-cpp-macro-define-start)
-	(c-cpp-expr-directives): Introduced new language constants to
+	(c-cpp-expr-directives): Introduce new language constants to
 	control cpp syntax in a cleaner way.
 
-	(c-cpp-expr-functions): Renamed from c-cpp-defined-fns.
+	(c-cpp-expr-functions): Rename from c-cpp-defined-fns.
 
 	(c-cpp-matchers, c-forward-to-cpp-define-body): Use them.
 
@@ -4272,22 +4506,21 @@
 	(c-guess-basic-syntax): Handle C++ operator identifiers in
 	declarations.
 
-	* progmodes/cc-langs.el (c-assignment-operators): Added the
+	* progmodes/cc-langs.el (c-assignment-operators): Add the
 	trigraph version of ^= too.
 
-	* progmodes/cc-langs.el (c-assignment-operators): Added the
+	* progmodes/cc-langs.el (c-assignment-operators): Add the
 	trigraph version of |= in C++.
 
-	* progmodes/cc-fonts.el (c-font-lock-declarators): Handle
-	`c-decl-hangon-kwds' after the identifier name.
+	* progmodes/cc-fonts.el (c-font-lock-declarators):
+	Handle `c-decl-hangon-kwds' after the identifier name.
 
 	* progmodes/cc-engine.el (c-guess-basic-syntax): When deciding
 	whether an arglist is "nonempty", ignore a comment after the open
-	paren if it isn't followed by a non-comment token on the same
-	line.
-
-	* progmodes/cc-engine.el (c-guess-basic-syntax): Case 4: Enable
-	heuristics below the point to cope with classes inside special
+	paren if it isn't followed by a non-comment token on the same line.
+
+	* progmodes/cc-engine.el (c-guess-basic-syntax): Case 4:
+	Enable heuristics below the point to cope with classes inside special
 	brace lists in Pike.
 
 2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
@@ -4326,12 +4559,11 @@
 	* progmodes/cc-cmds.el: Add `c-bytecomp-defun's for
 	c-\(forward\|backward\)-subword.
 	(c-update-modeline): Add the new modeline flag `l' for
-	`c-electric-flag'.  Make the auto-newline flag `a' dependent on
-	`l'.
-	(c-toggle-auto-state): Rename it to `c-toggle-auto-newline'.  Make
-	the old name an alias of the new name.
+	`c-electric-flag'.  Make the auto-newline flag `a' dependent on `l'.
+	(c-toggle-auto-state): Rename it to `c-toggle-auto-newline'.
+	Make the old name an alias of the new name.
 	(c-toggle-electric-state): New function.
-	c-electric-\(pound\|brace\|slash\|star\|semi&comma\|colon\|lt-gt\|paren\|continued-statement\):
+	(c-electric-\(pound\|brace\|slash\|star\|semi&comma\|colon\|lt-gt\|paren\|continued-statement\)):
 	Adapt these functions to do electric things only when
 	c-electric-flag is non-nil.
 	(c-point-syntax, c-brace-newlines, c-try-oneliner): Extract these
@@ -4347,18 +4579,17 @@
 2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
 
 	* progmodes/cc-cmds.el (c-show-syntactic-information): Show the
-	anchor position(s) using faces.  Thanks to Masatake YAMATO for the
-	idea.
+	anchor position(s) using faces.  Thanks to Masatake YAMATO for the idea.
 
 	* progmodes/cc-mode.el, cc-cmds.el, cc-defs.el, cc-engine.el
-	(c-submode-indicators): Changed name from `c-auto-hungry-string'
+	(c-submode-indicators): Change name from `c-auto-hungry-string'
 	since it's now used to track another submode.
 
-	(c-update-modeline): Converted to function and extended to check
+	(c-update-modeline): Convert to function and extended to check
 	`c-subword-move-mode'.
 
 	(c-forward-into-nomenclature, c-backward-into-nomenclature):
-	Converted to compat aliases for `c-forward-subword' and
+	Convert to compat aliases for `c-forward-subword' and
 	`c-backward-subword'.
 
 	* progmodes/cc-subword.el: New functions and minor mode to handle
@@ -4401,10 +4632,10 @@
 
 2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
 
-	* progmodes/cc-engine.el (c-forward-label): Fixed fontification of
+	* progmodes/cc-engine.el (c-forward-label): Fix fontification of
 	macros inside labels.
 
-	* progmodes/cc-engine.el (c-looking-at-bos): Obsoleted in favor of
+	* progmodes/cc-engine.el (c-looking-at-bos): Obsolete in favor of
 	`c-at-statement-start-p' and `c-at-expression-start-p'.
 
 	* progmodes/cc-defs.el (c-tnt-chng-record-state): Don't signal an
@@ -4418,9 +4649,8 @@
 	like `c-at-statement-start-p' that additionally recognizes commas
 	and expression parentheses as delimiters.
 
-	* progmodes/cc-engine.el (c-looking-at-inexpr-block): Added flag
+	* progmodes/cc-engine.el (c-looking-at-inexpr-block): Add flag
 	to avoid heuristics that doesn't work for unclosed blocks.
-
 	(c-at-statement-start-p): New function.
 
 	* progmodes/cc-engine.el, cc-fonts.el: Fixes in handling of
@@ -4435,54 +4665,53 @@
 	(c-just-after-func-arglist-p, c-guess-basic-syntax)
 	(c-basic-matchers-before): Use it.
 
-	(c-font-lock-objc-iip-decl): Removed.
+	(c-font-lock-objc-iip-decl): Remove.
 
 	* progmodes/cc-engine.el (c-guess-basic-syntax): Some improvement
 	in the template arglist recognition.
 
-	* progmodes/cc-styles.el (c-style-alist): Fixed several
+	* progmodes/cc-styles.el (c-style-alist): Fix several
 	inconsistencies in the Whitesmith style.
 
 	* progmodes/cc-align.el (c-lineup-after-whitesmith-blocks):
 	New lineup function to get lines after Whitesmith style blocks
 	correctly indented.
 
-	(c-lineup-whitesmith-in-block): Backed out the compensation for
+	(c-lineup-whitesmith-in-block): Back out the compensation for
 	opening parens since it's done using `add' lists in the style
 	definition instead.  Don't use the anchor position since it varies
 	too much between the syntactic symbols. :P
 
-	* progmodes/cc-vars.el (c-valid-offset): Updated.
-
-	* progmodes/cc-engine.el (c-evaluate-offset): Extended to handle
+	* progmodes/cc-vars.el (c-valid-offset): Update.
+
+	* progmodes/cc-engine.el (c-evaluate-offset): Extend to handle
 	lists where the offsets are combined according to several
-	different methods: `first', `min', `max', and `add'.  Report
-	offset evaluation errors with `c-benign-error' so that some kind
+	different methods: `first', `min', `max', and `add'.
+	Report offset evaluation errors with `c-benign-error' so that some kind
 	of reindentation still is done.
 
-	* progmodes/cc-engine.el (c-guess-basic-syntax): Anchor
-	`arglist-intro' the same way as `arglist-cont-nonempty' and
+	* progmodes/cc-engine.el (c-guess-basic-syntax):
+	Anchor `arglist-intro' the same way as `arglist-cont-nonempty' and
 	`arglist-close'.
 
-	* progmodes/cc-engine.el (c-guess-basic-syntax): Fixed similar
+	* progmodes/cc-engine.el (c-guess-basic-syntax): Fix similar
 	situations for `arglist-cont-nonempty' and `arglist-close'.
 
-	* progmodes/cc-langs.el (c-opt-identifier-concat-key-depth): New
-	constant.
+	* progmodes/cc-langs.el (c-opt-identifier-concat-key-depth): New const.
 
 	* progmodes/cc-defs.el: Use `cc-bytecomp-fboundp' and
 	cc-bytecomp-boundp' in a number of places.
 
-	* progmodes/cc-engine.el (c-beginning-of-statement-1): Fixed a
+	* progmodes/cc-engine.el (c-beginning-of-statement-1): Fix a
 	macro related issue.
 
 2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
 
 	* progmodes/cc-awk.el: Change the terminology of regexps: A char
-	list is now [asdf], a char class [:alpha:].  Include code for char
-	classes.  Set c-awk-NL-prop on lines ending in open strings.  (Bug
-	fix.)  Add character classes (e.g. "[:alpha:]") into AWK Mode's
-	regexps.
+	list is now [asdf], a char class [:alpha:].
+	Include code for char classes.
+	Set c-awk-NL-prop on lines ending in open strings.  (Bug fix.)
+	Add character classes (e.g. "[:alpha:]") into AWK Mode's regexps.
 
 	Remove (nearly all of) the cruft associated with AWK Mode's former
 	concept of "virtual semicolons":
@@ -4521,15 +4750,14 @@
 
 2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
 
-	* progmodes/cc-awk.el: Regexps for analysing AWK code have been
-	moved to near the start of the file.  ^L now separate sections of
-	the file.  New defconsts: c-awk-non-eol-esc-pair-re,
-	c-awk-blank-or-comment-line-re,
-	c-awk-one-line-possibly-open-string-re,
-	c-awk-regexp-one-line-possibly-open-char-class-re,
-	c-awk-one-line-possibly-open-regexp-re,
-	c-awk-one-line-non-syn-ws*-re.  New functions: c-awk-at-vsemi-p,
-	c-awk-vsemi-status-unknown-p.
+	* progmodes/cc-awk.el: Move regexps for analysing AWK code to near the
+	start of the file.  ^L now separate sections of the file.
+	(c-awk-non-eol-esc-pair-re,	c-awk-blank-or-comment-line-re)
+	(c-awk-one-line-possibly-open-string-re)
+	(c-awk-regexp-one-line-possibly-open-char-class-re)
+	(c-awk-one-line-possibly-open-regexp-re)
+	(c-awk-one-line-non-syn-ws*-re): New defonsts.
+	(c-awk-at-vsemi-p, c-awk-vsemi-status-unknown-p): New functions.
 
 	Amend the concept of "virtual semicolons" (in the indentation
 	engine) for languages like AWK, such that they are now
@@ -4537,12 +4765,12 @@
 	the end of the line.  (In AWK Mode, however, the pertinent text
 	property is still physically set on the EOL.)  Remove the specific
 	tests for awk-mode, thus facilitating the introduction of other
-	language modes where EOLs can end statements.  (Note: The
-	funtionality in cc-cmds.el, specifically
+	language modes where EOLs can end statements.
+	(Note: The funtionality in cc-cmds.el, specifically
 	c-beginning/end-of-statement has yet to be amended.)
 
-	* progmodes/cc-defs.el: New macros c-at-vsemi-p,
-	c-vsemi-status-unknown-p.
+	* progmodes/cc-defs.el (c-at-vsemi-p, c-vsemi-status-unknown-p):
+	New macros.
 
 	* progmodes/cc-langs.el: Added `#' into AWK Mode's value of
 	c-stmt-delim-chars.  New c-lang-defvars: c-at-vsemi-p-fn,
@@ -4552,25 +4780,21 @@
 	c-crosses-statement-barrier-p, c-guess-basic-syntax, replace
 	numerous awkward forms like
 	(if (c-major-mode-is 'awk-mode) (c-awk-prev-line-incomplete-p))
-	with
-	(c-at-vsemi-p).  Fix a few typos.  In c-guess-basic-syntax, new
-	variable before-ws-ip, the place just after char-before-ip
-	appears.
+	with (c-at-vsemi-p).  Fix a few typos.  In c-guess-basic-syntax, new
+	variable before-ws-ip, the place just after char-before-ip appears.
 
 	* progmodes/cc-mode.el: Fix what's almost a semantic ambiguity in
 	a comment.
 
 2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
 
-	* progmodes/cc-cmds.el (c-electric-brace): Cleaned up using
+	* progmodes/cc-cmds.el (c-electric-brace): Clean up using
 	`c-tentative-buffer-changes'.
 
-	* progmodes/cc-defs.el (c-region-is-active-p): Simplified and
-	converted to macro to choose between Emacs and XEmacs at compile
-	time.
-
-	(c-set-region-active): New set counterpart to
-	`c-region-is-active-p'.
+	* progmodes/cc-defs.el (c-region-is-active-p): Simplify and
+	convert to macro to choose between Emacs and XEmacs at compile time.
+
+	(c-set-region-active): New set counterpart to `c-region-is-active-p'.
 
 	(c-tentative-buffer-changes): New macro to handle temporary buffer
 	changes in a convenient way.
@@ -4578,7 +4802,7 @@
 	(c-tnt-chng-record-state, c-tnt-chng-cleanup): Internal helpers
 	for `c-tentative-buffer-changes'.
 
-	* progmodes/cc-engine.el (c-looking-at-inexpr-block): Tightened up
+	* progmodes/cc-engine.el (c-looking-at-inexpr-block): Tighten up
 	the checks for paren sexps between the point and the keyword, to
 	avoid some false alarms.
 
@@ -4587,23 +4811,22 @@
 	parens.  Changed to make use of c-keyword-member' to avoid some
 	repeated regexp matches.
 
-	(c-opt-lambda-key, c-opt-inexpr-block-key,
-	c-opt-inexpr-class-key): These language variable are no longer
-	necessary.
+	(c-opt-lambda-key, c-opt-inexpr-block-key, c-opt-inexpr-class-key):
+	These language variable are no longer necessary.
 
 	(c-block-stmt-kwds): New language constant used by
 	c-looking-at-inexpr-block'.
 
-	(c-guess-basic-syntax): Removed an optional check that looked at
+	(c-guess-basic-syntax): Remove an optional check that looked at
 	the existence of the now removed language variables.
 
-	* progmodes/cc-engine.el (c-fdoc-shift-type-backward,
-	c-forward-decl-or-cast-1): Fixed invalid recognition of C++ style
+	* progmodes/cc-engine.el (c-fdoc-shift-type-backward)
+	(c-forward-decl-or-cast-1): Fix invalid recognition of C++ style
 	object instantiation expressions as declarations in some contexts.
 	This bug only affected languages where the declarator can't be
 	enclosed in parentheses.
 
-	* progmodes/cc-styles.el (c-style-alist): Fixed the GNU style to
+	* progmodes/cc-styles.el (c-style-alist): Fix the GNU style to
 	insert newlines before and after substatement braces.
 
 	* progmodes/cc-engine.el: Improved the heuristics for recognizing
@@ -4613,15 +4836,14 @@
 	(c-just-after-func-arglist-p): Rewritten to use
 	`c-forward-decl-or-cast-1'.  Now behaves a bit differently too.
 
-	(c-beginning-of-member-init-list): Removed since it isn't used
-	anymore.
-
-	(c-guess-basic-syntax): Case 5B adapted for the new
-	`c-just-after-func-arglist-p'.  Cases 5B.1 and 5B.3 merged.  Cases
-	5D.1 and 5D.2 removed since they aren't trigged anymore (case 5B.1
+	(c-beginning-of-member-init-list): Remove since it isn't used anymore.
+
+	(c-guess-basic-syntax): Adapt case 5B for the new
+	`c-just-after-func-arglist-p'.  Merge cases 5B.1 and 5B.3.
+	Remove cases 5D.1 and 5D.2 since they aren't trigged anymore (case 5B.1
 	covers all cases now).
 
-	* progmodes/cc-defs.el (c-point): Added `bosws' and `eosws'.
+	* progmodes/cc-defs.el (c-point): Add `bosws' and `eosws'.
 
 2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
 
@@ -4644,15 +4866,15 @@
 	(c-search-uplist-for-classkey): The old one.  It's now a wrapper
 	for compatibility.
 
-	(c-add-class-syntax, c-guess-continued-construct,
-	c-guess-basic-syntax): Adapted for `c-looking-at-decl-block'.
-
-	(c-decl-block-key): Changed to tell apart ambiguous and
+	(c-add-class-syntax, c-guess-continued-construct)
+	(c-guess-basic-syntax): Adapt for `c-looking-at-decl-block'.
+
+	(c-decl-block-key): Change to tell apart ambiguous and
 	unambiguous keywords.  Pike specials are now handled directly in
 	the code instead.
 
-	(c-block-prefix-disallowed-chars, c-block-prefix-charset): New
-	language constants and variables to make the backward skip in
+	(c-block-prefix-disallowed-chars, c-block-prefix-charset):
+	New language constants and variables to make the backward skip in
 	`c-looking-at-decl-block' as tight as possible.
 
 	(c-nonsymbol-token-char-list): New language constant.
@@ -4663,7 +4885,7 @@
 	* progmodes/cc-defs.el (c-make-bare-char-alt): New helper for
 	making char classes for `c-syntactic-skip-backward'.
 
-	* progmodes/cc-engine.el (c-guess-basic-syntax): Simplified case
+	* progmodes/cc-engine.el (c-guess-basic-syntax): Simplify case
 	16D - can't be a class-close at that point.
 
 	* progmodes/cc-engine.el (c-guess-basic-syntax)
@@ -4674,17 +4896,16 @@
 	`c-guess-basic-syntax' never will look at things outside the
 	current narrowment now.  The anchor position for `topmost-intro'
 	is affected by this, but it was so bogus it was basically useless
-	before, and now it's equally bogus but in a slightly different
-	way.
+	before, and now it's equally bogus but in a slightly different way.
 
 	(c-narrow-out-enclosing-class): Gone.
 
 	(c-most-enclosing-brace, c-least-enclosing-brace): Don't filter to
 	the narrowed region.
 
-	(c-least-enclosing-brace): Removed silly optional argument.
-
-	* progmodes/cc-engine.el (c-beginning-of-decl-1): Fixed bug where
+	(c-least-enclosing-brace): Remove silly optional argument.
+
+	* progmodes/cc-engine.el (c-beginning-of-decl-1): Fix bug where
 	the point could be left directly after an open paren when finding
 	the beginning of the first decl in the block.
 
@@ -4709,13 +4930,11 @@
 	(c-identifier-start, c-identifier-key): Now completely calculated
 	from other constants.
 
-	(c-identifier-last-sym-match): Decommissioned since it's no longer
-	used.
-
-	(c-operators): Use `c-identifier-ops'.  Documented
-	`postfix-if-paren'.
-
-	* progmodes/cc-engine.el (c-forward-name): Removed the
+	(c-identifier-last-sym-match): Decommission since it's no longer used.
+
+	(c-operators): Use `c-identifier-ops'.  Document `postfix-if-paren'.
+
+	* progmodes/cc-engine.el (c-forward-name): Remove the
 	optimization when c-identifier-key is equal to c-symbol-key since
 	it doesn't work in byte compiled files.  Don't record empty
 	regions as identifiers.
@@ -4731,13 +4950,13 @@
 	* progmodes/cc-defs.el (c-lang-const): Fixes to allow use without
 	an explicit language in functions.
 
-	* progmodes/cc-defs.el (c-make-keywords-re): Added an appendable
+	* progmodes/cc-defs.el (c-make-keywords-re): Add an appendable
 	variant of adornment.
 
-	* progmodes/cc-langs.el (c-any-class-key): Removed unused language
+	* progmodes/cc-langs.el (c-any-class-key): Remove unused language
 	variable.
 
-	(c-type-decl-prefix-key): Removed some now unnecessary cruft from
+	(c-type-decl-prefix-key): Remove some now unnecessary cruft from
 	the Pike value.
 
 	* progmodes/cc-engine.el (c-on-identifier)
@@ -4745,7 +4964,7 @@
 	correctly in `skip-chars-backward'.  Affected the operator lfun
 	syntax in Pike.
 
-	* progmodes/cc-langs.el (c-make-init-lang-vars-fun): Disabled the
+	* progmodes/cc-langs.el (c-make-init-lang-vars-fun): Disable the
 	diagnostic message about precompiled language vars not being used.
 
 	* progmodes/cc-langs.el (c-paren-nontype-kwds): The GCC keyword
@@ -4755,9 +4974,9 @@
 	(c-specifier-key, c-not-decl-init-keywords): Some cleanup using new
 	language constants `c-type-start-kwds' and `c-prefix-spec-kwds'.
 
-	* progmodes/cc-fonts.el, cc-langs.el, cc-engine.el: Internal
-	cleanups to properly detect the declared identifiers in various
-	declarations.
+	* progmodes/cc-fonts.el, cc-langs.el, cc-engine.el:
+	Internal cleanups to properly detect the declared identifiers in
+	various declarations.
 
 	(c-decl-start-kwds): New language constant to recognize
 	declarations that can start anywhere.  Used for class declarations
@@ -4768,7 +4987,7 @@
 	(c-find-decl-spots): Implement `c-decl-start-kwds'.
 
 	(c-other-decl-kwds, c-postfix-decl-spec-kwds, c-decl-hangon-kwds)
-	(c-decl-hangon-key, c-forward-decl-or-cast-1): Separated the
+	(c-decl-hangon-key, c-forward-decl-or-cast-1): Separate the
 	handling of the compiler specific extension keywords into a new
 	language constant `c-decl-hangon-kwds' that defines keyword
 	clauses to be ignored in declarations.
@@ -4784,9 +5003,8 @@
 	(c-forward-decl-or-cast-1): Recognize the declared identifier in
 	class and enum declarations as such and not as part of the type.
 
-	(c-forward-decl-or-cast-1, c-forward-label): Relaxed the
-	interpretation of PRECEDING-TOKEN-END when there's no preceding
-	token.
+	(c-forward-decl-or-cast-1, c-forward-label): Relax the
+	interpretation of PRECEDING-TOKEN-END when there's no preceding token.
 
 	(c-forward-decl-or-cast-1): Don't disregard sure signs of
 	declarations when there's some syntax error later on.
@@ -4799,7 +5017,7 @@
 
 	* progmodes/cc-engine.el, cc-fonts.el, cc-langs.el, cc-menus.el
 	* cc-mode.el, cc-styles.el, cc-vars.el, cc-align.el, cc-awk.el
-	* cc-cmds.el, cc-defs.el: Changed the policy for marking up
+	* cc-cmds.el, cc-defs.el: Change the policy for marking up
 	functions that might do hidden buffer changes: All such internal
 	functions are now marked instead of those that don't.
 
@@ -4814,10 +5032,10 @@
 	(c-electric-semi&comma, c-electric-colon, c-electric-lt-gt)
 	(c-electric-paren, c-electric-continued-statement, c-indent-command)
 	(c-indent-region, c-mask-paragraph, c-indent-new-comment-line)
-	(c-context-line-break): Added `c-save-buffer-state' calls to comply
+	(c-context-line-break): Add `c-save-buffer-state' calls to comply
 	with the changed semantics of the functions above.
 
-	* progmodes/cc-engine.el (c-beginning-of-statement-1): Fixed a bug
+	* progmodes/cc-engine.el (c-beginning-of-statement-1): Fix a bug
 	when macros occur in obscure places.  Optimized the sexp movement
 	a bit.
 
@@ -4849,13 +5067,13 @@
 	* progmodes/cc-engine.el, cc-fonts.el, cc-langs.el: Cleaned up the
 	label handling.  Labels are now recognized in a uniform and more
 	robust way, regardless of context.  Text properties are put on all
-	labels to recognize the following declarations better.  Multiword
-	labels are handled both in indentation and fontification for the
-	benefit of language extensions like Qt.  For consistency, keywords
-	in labels are now fontified with the label face instead.  That
-	also applies to "case" and "default".
-
-	(c-beginning-of-statement-1): Fixed some bugs in the label
+	labels to recognize the following declarations better.
+	Multiword labels are handled both in indentation and fontification for
+	the benefit of language extensions like Qt.  For consistency, keywords
+	in labels are now fontified with the label face instead.
+	That also applies to "case" and "default".
+
+	(c-beginning-of-statement-1): Fix some bugs in the label
 	handling.  Disregard `c-nonlabel-token-key' in labels that begin
 	with `c-label-kwds'.
 
@@ -4867,70 +5085,68 @@
 
 	(c-forward-label): New function to recognize labels.
 
-	(c-guess-basic-syntax): Replaced uses of `c-label-key' with
+	(c-guess-basic-syntax): Replace uses of `c-label-key' with
 	`c-forward-label'.  Moved the label recognition cases (14 and 15)
 	earlier since they aren't so context sensitive now.  Handle labels
 	on the top level gracefully.  Moved access label recognition to
 	the generic label case (CASE 15) - removed CASE 5E.
 
-	(c-font-lock-declarations): Added recognition of labels in the
+	(c-font-lock-declarations): Add recognition of labels in the
 	same round since we need to handle labels in parallell with other
 	declarations to recognize both accurately.  It should also improve
 	speed.
 
-	(c-simple-decl-matchers, c-basic-matchers-after): Moved
-	`c-font-lock-labels' so that it only is used on decoration level 2
+	(c-simple-decl-matchers, c-basic-matchers-after):
+	Move `c-font-lock-labels' so that it only is used on decoration level 2
 	since `c-font-lock-declarations' handles it otherwise.
 
-	(c-complex-decl-matchers): Removed the simplistic recognition of
+	(c-complex-decl-matchers): Remove the simplistic recognition of
 	access labels.
 
-	(c-decl-prefix-re): Removed the kludges that was necessary to cope
+	(c-decl-prefix-re): Remove the kludges that was necessary to cope
 	with labels earlier.
 
 	(c-decl-start-re): New language variable to make
 	`c-font-lock-declarations' stop for the special protection labels
 	in Objective-C that start with `@'.
 
-	(c-label-key): Removed since it's no longer used.
+	(c-label-key): Remove since it's no longer used.
 
 	(c-recognize-colon-labels, c-label-prefix-re): New language
-	constants to support recognition of generic colon-terminated
-	labels.
+	constants to support recognition of generic colon-terminated labels.
 
 	(c-type-decl-end-used): `c-decl-end' is now used whenever there
 	are colon terminated labels.
 
-	* progmodes/cc-align.el (c-lineup-arglist): Fixed bug when the
+	* progmodes/cc-align.el (c-lineup-arglist): Fix bug when the
 	first argument starts with a special brace list.
 
 	* progmodes/cc-engine.el, cc-fonts.el (c-forward-decl-or-cast-1)
-	(c-font-lock-declarations): Broke out the declaration and cast
+	(c-font-lock-declarations): Break out the declaration and cast
 	recognition from `c-font-lock-declarations' to a new function, so
 	that it can be used in the indentation engine.
 
-	* progmodes/cc-engine.el (c-find-decl-spots): Fixed bug in backing
+	* progmodes/cc-engine.el (c-find-decl-spots): Fix bug in backing
 	up to the start of the literal.  Fixed bug with the point on the
 	wrong side of the search limit that could happen when the start
 	position is inside a literal.
 
 	* progmodes/cc-engine.el (c-parse-state)
-	(c-invalidate-state-cache): Modified the use of `c-state-cache-end'
+	(c-invalidate-state-cache): Modify the use of `c-state-cache-end'
 	so that it's kept a little bit back to increase the hit rate.
 
-	(c-parse-state): Changed the macro handling and fixed some
+	(c-parse-state): Change the macro handling and fixed some
 	glitches.  Macro context is checked more often than necessary now,
 	but otoh less garbage conses are generated.
 
 	* progmodes/cc-engine.el (c-parse-state)
 	(c-invalidate-state-cache): Cache the last position where
 	`c-state-cache' applies.  This can speed up refontification quite
-	a bit in blocks where there are many non-brace parens before the
-	point.
+	a bit in blocks where there are many non-brace parens before the point.
 
 	(c-state-cache-end): New variable for this.
 
-	(c-guess-basic-syntax, c-debug-parse-state): Adapted for the new
+	(c-guess-basic-syntax, c-debug-parse-state): Adapt for the new
 	cache variable.
 
 	* progmodes/cc-engine.el (c-find-decl-spots): Take more care to
@@ -4941,39 +5157,39 @@
 	region is a single line inside a literal or macro (typically when
 	the current line is refontified).
 
-	* progmodes/cc-engine.el (c-guess-basic-syntax): Simplified calls
+	* progmodes/cc-engine.el (c-guess-basic-syntax): Simplify calls
 	to `c-add-stmt-syntax' - there's no need to explicitly whack off
 	entries from the paren state.
 
-	* progmodes/cc-engine.el (c-add-stmt-syntax): Narrowed down the
+	* progmodes/cc-engine.el (c-add-stmt-syntax): Narrow down the
 	special case for "else if" clauses.
 
 	* progmodes/cc-engine.el (c-looking-at-inexpr-block)
 	(c-add-stmt-syntax): Use `c-recognize-paren-inexpr-blocks'.
 
-	* progmodes/cc-langs.el (c-recognize-paren-inexpr-blocks): New
-	language variable to recognize the gcc extension with statement
+	* progmodes/cc-langs.el (c-recognize-paren-inexpr-blocks):
+	New language variable to recognize the gcc extension with statement
 	blocks inside expressions.
 
-	* progmodes/cc-engine.el (c-add-stmt-syntax): Restructured to make
+	* progmodes/cc-engine.el (c-add-stmt-syntax): Restructure to make
 	it somewhat more comprehensible.  The argument AT-BLOCK-START is
 	no longer used and hence removed.
 
-	(c-guess-continued-construct, c-guess-basic-syntax): Updated calls
+	(c-guess-continued-construct, c-guess-basic-syntax): Update calls
 	to `c-add-stmt-syntax'.
 
-	* progmodes/cc-engine.el (c-backward-to-decl-anchor): Use
-	`c-beginning-of-statement-1' instead of duplicating parts of it.
+	* progmodes/cc-engine.el (c-backward-to-decl-anchor):
+	Use `c-beginning-of-statement-1' instead of duplicating parts of it.
 	This fixes bogus label recognition.
 
 	* progmodes/cc-engine.el (c-add-type, c-check-type)
-	(c-forward-name, c-forward-type): Improved storage of template
+	(c-forward-name, c-forward-type): Improve storage of template
 	types in `c-found-types' so that they can be recognized better.
 
-	(c-syntactic-content): Added option to skip past nested parens.
-
-	* progmodes/cc-engine.el (c-forward-name): Set
-	`c-last-identifier-range' all the time.  It's less work that way.
+	(c-syntactic-content): Add option to skip past nested parens.
+
+	* progmodes/cc-engine.el (c-forward-name):
+	Set `c-last-identifier-range' all the time.  It's less work that way.
 	Handle that there might not be an identifier to store in
 	`c-last-identifier-range'.
 
@@ -4981,7 +5197,7 @@
 	nil from `c-forward-name'.
 
 	* progmodes/cc-defs.el (c-safe-scan-lists)
-	(c-(go-)?(up|down)-list-(forward|backward)): Added limit arguments.
+	(c-(go-)?(up|down)-list-(forward|backward)): Add limit arguments.
 
 	* progmodes/cc-defs.el (c-save-buffer-state): Use `unwind-protect'
 	to work even if the form fails.
@@ -4989,14 +5205,13 @@
 	* progmodes/cc-engine.el (c-parse-state): Speedup when moving far
 	down in a large file in one go.
 
-	(c-get-fallback-start-pos): New helper function for
-	`c-parse-state'.
+	(c-get-fallback-start-pos): New helper function for `c-parse-state'.
 
 	* progmodes/cc-align.el (c-lineup-assignments): New lineup
 	function which is like `c-lineup-math' but returns nil instead of
 	`c-basic-offset' when it doesn't match.
 
-	(c-lineup-math): Changed to use `c-lineup-assignments'.
+	(c-lineup-math): Change to use `c-lineup-assignments'.
 
 2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
 
@@ -5011,7 +5226,7 @@
 	places to use skip by syntax instead of skip by char class.
 
 	* progmodes/cc-langs.el (c-unterminated-block-comment-regexp):
-	Fixed a bug in the regexp that caused extreme backtracking.
+	Fix a bug in the regexp that caused extreme backtracking.
 
 	* progmodes/cc-langs.el (c-block-comment-starter)
 	(c-block-comment-ender): New language constants to specify in a
@@ -5030,18 +5245,16 @@
 
 	(c-simple-ws): New language constant for simple whitespace.
 
-	* progmodes/cc-defs.el (c-concat-separated): New convenience
-	function.
-
-	* progmodes/cc-defs.el (c-make-keywords-re): Added kludge for bug
+	* progmodes/cc-defs.el (c-concat-separated): New convenience function.
+
+	* progmodes/cc-defs.el (c-make-keywords-re): Add kludge for bug
 	in `regexp-opt' in Emacs 20 and XEmacs when strings contain
 	newlines.  Allow and ignore nil elements in the list.
 
 2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
 
 	* progmodes/cc-cmds.el: Comment out a (n almost certainly
-	superfluous) check, (eq here (point-max)) in
-	c-beginning-of-statement.
+	superfluous) check, (eq here (point-max)) in c-beginning-of-statement.
 
 	* progmodes/cc-cmds.el: Tidy up the comments in
 	c-beginning-of-statement and subfunctions.
@@ -5050,8 +5263,7 @@
 	more flexible c-put-char-property and c-clear-char-properties.
 	Add the author's email address.
 
-	* progmodes/cc-langs.el: New variable,
-	c-block-comment-start-regexp.
+	* progmodes/cc-langs.el (c-block-comment-start-regexp): New variable.
 
 	* progmodes/cc-cmds.el: Fix bug with M-e, when point is inside the
 	closing "*/" of a block comment.
@@ -5075,11 +5287,11 @@
 	* progmodes/cc-fonts.el (c-font-lock-invalid-string): Fix when
 	there are several strings on the same line.
 
-	* progmodes/cc-engine.el (c-literal-limits): Removed the
+	* progmodes/cc-engine.el (c-literal-limits): Remove the
 	compatibility function for older emacsen.  `c-literal-limits-fast'
 	has now taken the place of this function.
 
-	* progmodes/cc-vars.el (c-emacs-features): Removed compatibility
+	* progmodes/cc-vars.el (c-emacs-features): Remove compatibility
 	with older emacsen: We now require `pps-extended-state'.
 
 2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
@@ -5095,19 +5307,18 @@
 	eachother.  Correct a few incidental bugs.
 
 	* progmodes/cc-cmds.el: Restructure c-beginning-of-statement:
-	Improve its doc-string.  Improve the handling of certain specific
-	cases.
+	Improve its doc-string.  Improve the handling of certain specific cases.
 
 2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
 
 	* progmodes/cc-engine.el, cc-fonts.el, cc-langs.el
-	(c-guess-basic-syntax): Changed the way class-level labels are
+	(c-guess-basic-syntax): Change the way class-level labels are
 	recognized; they can now contain essentially any symbols.
 
 	(c-opt-extra-label-key): New language variable to cope with the
 	special protection label syntax in Objective-C.
 
-	(c-opt-access-key): Removed; this is now handled better by
+	(c-opt-access-key): Remove; this is now handled better by
 	`c-nonlabel-token-key' and `c-opt-extra-label-key'.
 
 	(c-complex-decl-matchers): Update to handle that
@@ -5120,11 +5331,11 @@
 	Recognize bitfields better.
 
 	* progmodes/cc-engine.el (c-beginning-of-inheritance-list):
-	Removed some cruft and fixed a bug that could cause it to go to a
+	Remove some cruft and fixed a bug that could cause it to go to a
 	position further down.
 
 	* progmodes/cc-langs.el, cc-engine.el
-	(c-beginning-of-statement-1): Improved detection of labels in
+	(c-beginning-of-statement-1): Improve detection of labels in
 	declaration contexts.
 
 	(c-beginning-of-decl-1): Use it.
@@ -5132,11 +5343,11 @@
 	(c-nonlabel-token-key): New language constant and variable needed
 	by `c-beginning-of-statement-1'.
 
-	* progmodes/cc-engine.el (c-guess-basic-syntax): Fixed bug that
+	* progmodes/cc-engine.el (c-guess-basic-syntax): Fix bug that
 	manifested itself due to the correction in `c-forward-sexp'.
 
-	* progmodes/cc-defs.el (c-forward-sexp, c-backward-sexp): Made
-	these behave as documented when used at the buffer limits.
+	* progmodes/cc-defs.el (c-forward-sexp, c-backward-sexp):
+	Make these behave as documented when used at the buffer limits.
 
 	* progmodes/cc-mode.el, cc-engine.el, cc-langs.el
 	(c-type-decl-end-used): Made this a language variable.
@@ -5145,20 +5356,20 @@
 	correctly when `combine-after-change-calls' is used together with
 	temporary narrowings.
 
-	* progmodes/cc-engine.el (c-beginning-of-statement-1): Report
-	labels correctly when the start point is immediately after the
+	* progmodes/cc-engine.el (c-beginning-of-statement-1):
+	Report labels correctly when the start point is immediately after the
 	colon.
 
-	* progmodes/cc-defs.el (c-parse-sexp-lookup-properties): Removed
-	since it isn't used anymore.
+	* progmodes/cc-defs.el (c-parse-sexp-lookup-properties):
+	Remove since it isn't used anymore.
 
 	* progmodes/cc-cmds.el (c-electric-lt-gt): Detect and mark angle
 	bracket arglists such as template parens in C++.
 
-	* progmodes/cc-engine.el (c-syntactic-skip-backward): Fixed a bug
+	* progmodes/cc-engine.el (c-syntactic-skip-backward): Fix a bug
 	in the last check-in.  Some optimization.
 
-	* progmodes/cc-engine.el (c-syntactic-skip-backward): Fixed bug
+	* progmodes/cc-engine.el (c-syntactic-skip-backward): Fix bug
 	where it could stop at the same level in a preceding sexp when
 	PAREN-LEVEL is set.
 
@@ -5166,7 +5377,7 @@
 	text property lookup only when it's needed.
 
 	* progmodes/cc-langs.el, cc-engine.el, cc-fonts.el, cc-mode.el:
-	Changed the policy for paren marked angle brackets to be more
+	Change the policy for paren marked angle brackets to be more
 	persistent; once marked they remain marked even when they're found
 	to be unbalanced in the searched region.  This should keep the
 	paren syntax around even when individual lines are refontified in
@@ -5180,7 +5391,7 @@
 	(c-forward-<>-arglist, c-forward-<>-arglist-recur): The reparse
 	argument has become `c-parse-and-markup-<>-arglists'.
 
-	(c-remove-<>-arglist-properties): Removed - no longer used.
+	(c-remove-<>-arglist-properties): Remove - no longer used.
 
 	(c-after-change-check-<>-operators): New function used on
 	`after-change-functions' to avoid that "<" and ">" characters that
@@ -5192,28 +5403,26 @@
 	(c-after-change): Call `c-after-change-check-<>-operators'.
 
 	(c-font-lock-<>-arglists): Use the context properties set by
-	`c-font-lock-declarations' to set
-	`c-disallow-comma-in-<>-arglists' correctly to avoid doing invalid
-	markup.
-
-	(c-font-lock-declarations): Removed code that undoes the invalid
+	`c-font-lock-declarations' to set `c-disallow-comma-in-<>-arglists'
+	correctly to avoid doing invalid markup.
+
+	(c-font-lock-declarations): Remove code that undoes the invalid
 	markup done by `c-font-lock-<>-arglists'.
 
 	(c-complex-decl-matchers): `c-font-lock-<>-arglists' now runs
 	after `c-font-lock-declarations'.
 
-	* progmodes/cc-engine.el (c-syntactic-skip-backward): Added
-	paren-level feature.
-
-	(c-guess-basic-syntax): Improved the anchor position for
+	* progmodes/cc-engine.el (c-syntactic-skip-backward):
+	Add paren-level feature.
+
+	(c-guess-basic-syntax): Improve the anchor position for
 	`template-args-cont' in nested template arglists.  There's still
 	much to be desired in this area, though.
 
 2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
 
 	* progmodes/cc-cmds.el, cc-engine.el, cc-langs.el, cc-vars.el:
-	Make the "Text Filling and Line Breaking" commands work for AWK
-	buffers.
+	Make the "Text Filling and Line Breaking" commands work for AWK buffers.
 
 2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
 
@@ -5252,7 +5461,7 @@
 
 2005-12-08  Kim F. Storm  <storm@cua.dk>
 
-	* emulation/cua-base.el (cua-use-hyper-key): Replaced by ...
+	* emulation/cua-base.el (cua-use-hyper-key): Replace by ...
 	(cua-rectangle-modifier-key): ... this.  New defcustom.  Can now
 	select either meta, hyper, or super modifier for rectangle commands.
 	(cua--rectangle-modifier-key): New defvar.
@@ -5261,8 +5470,8 @@
 	on X, to meta otherwise.  Always bind C-return to toggle
 	rectangle.  Pass ?\s instead of `space' to cua--M/H-key.
 
-	* emulation/cua-rect.el (cua-help-for-rectangle): Use
-	cua--rectangle-modifier-key.  Handle super modifier too.
+	* emulation/cua-rect.el (cua-help-for-rectangle):
+	Use cua--rectangle-modifier-key.  Handle super modifier too.
 	(cua--init-rectangles): Always bind C-return to toggle rectangle.
 	Pass ?\s instead of `space' to cua--M/H-key and cua--rect-M/H-key.
 
@@ -5273,8 +5482,8 @@
 	keymap if cua--prefix-override-timer is `shift'.
 	(cua--shift-control-prefix): New function; emulate "type prefix
 	key twice" functionality to handle shifted prefix key override.
-	(cua--shift-control-c-prefix, cua--shift-control-x-prefix): New
-	commands.
+	(cua--shift-control-c-prefix, cua--shift-control-x-prefix):
+	New commands.
 	(cua--init-keymaps): Bind them to S-C-c and S-C-x.
 
 2005-12-08  Carsten Dominik  <dominik@science.uva.nl>
--- a/lisp/cus-edit.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/cus-edit.el	Wed Mar 22 15:16:06 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
@@ -3408,12 +3412,12 @@
       ;; Make the comment invisible by hand if it's empty
       (custom-comment-hide comment-widget))
     (put symbol 'customized-face value)
+    (custom-push-theme 'theme-face symbol 'user 'set value)
     (if (face-spec-choose value)
 	(face-spec-set symbol value)
       ;; face-set-spec ignores empty attribute lists, so just give it
       ;; something harmless instead.
       (face-spec-set symbol '((t :foreground unspecified))))
-    (custom-push-theme 'theme-face symbol 'user 'set value)
     (put symbol 'customized-face-comment comment)
     (put symbol 'face-comment comment)
     (custom-face-state-set widget)
@@ -3486,13 +3490,17 @@
     (put symbol 'customized-face nil)
     (put symbol 'customized-face-comment nil)
     (custom-push-theme 'theme-face symbol 'user 'reset)
+    (face-spec-set symbol value)
     (custom-theme-recalc-face symbol)
     (when (or (get symbol 'saved-face) (get symbol 'saved-face-comment))
       (put symbol 'saved-face nil)
       (put symbol 'saved-face-comment nil)
       (custom-save-all))
     (put symbol 'face-comment nil)
-    (widget-value-set child value)
+    (widget-value-set child
+		      (custom-pre-filter-face-spec
+		       (list (list t (custom-face-attributes-get
+				      symbol nil)))))
     ;; This call manages the comment visibility
     (widget-value-set comment-widget "")
     (custom-face-state-set widget)
--- a/lisp/custom.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/custom.el	Wed Mar 22 15:16:06 2006 +0000
@@ -819,7 +819,8 @@
 			 (not (equal (eval (car (get symbol 'standard-value)))
 				     (symbol-value symbol)))))
 		(setq old (list (list 'changed (symbol-value symbol))))
-	      (if (facep symbol)
+	      (if (and (facep symbol)
+		       (not (face-spec-match-p symbol (get symbol 'face-defface-spec))))
 		  (setq old (list (list 'changed (list
 		    (append '(t) (custom-face-attributes-get symbol nil)))))))))
 	(put symbol prop (cons (list theme value) old))
--- a/lisp/diff-mode.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/diff-mode.el	Wed Mar 22 15:16:06 2006 +0000
@@ -274,7 +274,7 @@
 (defvar diff-indicator-changed-face 'diff-indicator-changed)
 
 (defface diff-function
-  '((t :inherit diff-context))
+  '((t :inherit diff-header))
   "`diff-mode' face used to highlight function names produced by \"diff -p\"."
   :group 'diff-mode)
 ;; backward-compatibility alias
--- a/lisp/emulation/cua-rect.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/emulation/cua-rect.el	Wed Mar 22 15:16:06 2006 +0000
@@ -799,8 +799,8 @@
 				(if cua--virtual-edges-debug ?, ?\s))
 			       'face rface))
 		     (if (cua--rectangle-right-side)
-			 (put-text-property (1- (length ms)) (length ms) 'cursor t ms)
-		       (put-text-property 0 1 'cursor t ms))
+			 (put-text-property (1- (length ms)) (length ms) 'cursor 2 ms)
+		       (put-text-property 0 1 'cursor 2 ms))
 		     (setq bs (concat bs ms))
 		     (setq rface nil))
  		    (t
@@ -810,8 +810,8 @@
 				(if cua--virtual-edges-debug ?~ ?\s))
 			       'face rface))
 		     (if (cua--rectangle-right-side)
-			 (put-text-property (1- (length as)) (length as) 'cursor t as)
-		       (put-text-property 0 1 'cursor t as))
+			 (put-text-property (1- (length as)) (length as) 'cursor 2 as)
+		       (put-text-property 0 1 'cursor 2 as))
 		     (if (/= pr le)
 			 (setq e (1- e))))))))
 	     ;; Trim old leading overlays.
--- a/lisp/files.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/files.el	Wed Mar 22 15:16:06 2006 +0000
@@ -990,6 +990,20 @@
     (pop-to-buffer buffer t norecord)
     (raise-frame (window-frame (selected-window)))))
 
+(defun display-buffer-other-frame (buffer)
+  "Switch to buffer BUFFER in another frame.
+This uses the function `display-buffer' as a subroutine; see its
+documentation for additional customization information."
+  (interactive "BDisplay buffer in other frame: ")
+  (let ((pop-up-frames t)
+	same-window-buffer-names same-window-regexps
+        (old-window (selected-window))
+	new-window)
+    (setq new-window (display-buffer buffer t))
+    (lower-frame (window-frame new-window))
+    (make-frame-invisible (window-frame old-window))
+    (make-frame-visible (window-frame old-window))))
+
 (defvar find-file-default nil
   "Used within `find-file-read-args'.")
 
@@ -5154,6 +5168,7 @@
 (define-key ctl-x-5-map "f" 'find-file-other-frame)
 (define-key ctl-x-5-map "\C-f" 'find-file-other-frame)
 (define-key ctl-x-5-map "r" 'find-file-read-only-other-frame)
+(define-key ctl-x-4-map "\C-o" 'display-buffer-other-frame)
 
 ;; arch-tag: bc68d3ea-19ca-468b-aac6-3a4a7766101f
 ;;; files.el ends here
--- a/lisp/font-lock.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/font-lock.el	Wed Mar 22 15:16:06 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.
@@ -1098,9 +1092,8 @@
 	    ;; 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)
-			   (forward-line (- font-lock-lines-before)))
-		end (progn (goto-char end) (forward-line 1) (point))))
+	  (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)
--- a/lisp/gnus/ChangeLog	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/gnus/ChangeLog	Wed Mar 22 15:16:06 2006 +0000
@@ -1,3 +1,65 @@
+2006-03-21  Daniel Pittman <daniel@rimspace.net>
+
+	* nnimap.el (nnimap-request-update-info-internal): Optimize.
+	Don't `gnus-uncompress-range' to avoid excessive memory usage.
+
+2006-03-21  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* gnus-agent.el (gnus-agent-queue-mail): Fix custom tag for `t'.
+
+	* spam.el (spam-mark-new-messages-in-spam-group-as-spam): Add
+	comment on version.
+
+2006-03-20  Teodor Zlatanov  <tzz@lifelogs.com>
+
+	* spam.el (spam-mark-new-messages-in-spam-group-as-spam): New
+	variable.
+	(spam-mark-junk-as-spam-routine): Use it.  Allow to disable
+	assigning the spam-mark to new messages.
+
+2006-03-20  Adam Sj,Ax(Bgren  <asjo@koldfront.dk>  (tiny change)
+
+	(spam-ham-copy-or-move-routine): Don't declare `todo' twice.
+
+2006-03-20  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* smiley.el: Add missing test smiley.
+
+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-agent.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/gnus/gnus-agent.el	Wed Mar 22 15:16:06 2006 +0000
@@ -204,7 +204,7 @@
   :group 'gnus-agent
   :type '(radio (const :format "Always" always)
 		(const :format "Never" nil)
-		(const :format "When plugged" t)))
+		(const :format "When unplugged" t)))
 
 (defcustom gnus-agent-prompt-send-queue nil
   "If non-nil, `gnus-group-send-queue' will prompt if called when
--- a/lisp/gnus/gnus-art.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/gnus/gnus-art.el	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/lisp/gnus/gnus-util.el	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/lisp/gnus/message.el	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/lisp/gnus/mm-decode.el	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/lisp/gnus/mm-extern.el	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/lisp/gnus/mm-uu.el	Wed Mar 22 15:16:06 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/gnus/nnimap.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/gnus/nnimap.el	Wed Mar 22 15:16:06 2006 +0000
@@ -1127,18 +1127,12 @@
 	  (let (seen unseen)
 	    ;; read info could contain articles marked unread by other
 	    ;; imap clients!  we correct this
-	    (setq seen (gnus-uncompress-range (gnus-info-read info))
-		  unseen (imap-search "UNSEEN UNDELETED")
-		  seen (gnus-set-difference seen unseen)
-		  ;; seen might lack articles marked as read by other
-		  ;; imap clients! we correct this
-		  seen (append seen (imap-search "SEEN"))
-		  ;; remove dupes
-		  seen (sort seen '<)
-		  seen (gnus-compress-sequence seen t)
-		  ;; we can't return '(1) since this isn't a "list of ranges",
-		  ;; and we can't return '((1)) since g-list-of-unread-articles
-		  ;; is buggy so we return '((1 . 1)).
+	    (setq unseen (gnus-compress-sequence
+			  (imap-search "UNSEEN UNDELETED"))
+		  seen (gnus-range-difference (gnus-info-read info) unseen)
+		  seen (gnus-range-add seen
+				       (gnus-compress-sequence
+					(imap-search "SEEN")))
 		  seen (if (and (integerp (car seen))
 				(null (cdr seen)))
 			   (list (cons (car seen) (car seen)))
--- a/lisp/gnus/smiley.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/gnus/smiley.el	Wed Mar 22 15:16:06 2006 +0000
@@ -42,6 +42,7 @@
 ;; indifferent       :-|
 ;; wry               :-/  :-\
 ;; sad               :-(
+;; frown             :-{
 ;; evil              >:-)
 ;; cry               ;-(
 ;; dead              X-)
--- a/lisp/gnus/spam.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/gnus/spam.el	Wed Mar 22 15:16:06 2006 +0000
@@ -100,6 +100,12 @@
   :type 'boolean
   :group 'spam)
 
+(defcustom spam-mark-new-messages-in-spam-group-as-spam t
+  "Whether new messages in a spam group should get the spam-mark."
+  :type 'boolean
+  ;; :version "22.1" ;; Gnus 5.10.8 / No Gnus 0.3
+  :group 'spam)
+
 (defcustom spam-log-to-registry nil
   "Whether spam/ham processing should be logged in the registry."
   :type 'boolean
@@ -676,15 +682,17 @@
   ;; check the global list of group names spam-junk-mailgroups and the
   ;; group parameters
   (when (spam-group-spam-contents-p gnus-newsgroup-name)
-    (gnus-message 5 "Marking %s articles as spam"
+    (gnus-message 6 "Marking %s articles as spam"
 		  (if spam-mark-only-unseen-as-spam
 		      "unseen"
 		    "unread"))
     (let ((articles (if spam-mark-only-unseen-as-spam
 			gnus-newsgroup-unseen
 		      gnus-newsgroup-unreads)))
-      (dolist (article articles)
-	(gnus-summary-mark-article article gnus-spam-mark)))))
+      (if spam-mark-new-messages-in-spam-group-as-spam
+	  (dolist (article articles)
+	    (gnus-summary-mark-article article gnus-spam-mark))
+	(gnus-message 9 "Did not mark new messages as spam.")))))
 
 (defun spam-mark-spam-as-expired-and-move-routine (&rest groups)
   (if (and (car-safe groups) (listp (car-safe groups)))
@@ -732,7 +740,7 @@
 	 (gnus-check-backend-function
 	  'request-move-article gnus-newsgroup-name))
 	(respool-method (gnus-find-method-for-group gnus-newsgroup-name))
-	article mark todo deletep respool)
+	article mark deletep respool)
 
     (when (member 'respool groups)
       (setq respool t)			; boolean for later
--- a/lisp/help-mode.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/help-mode.el	Wed Mar 22 15:16:06 2006 +0000
@@ -40,7 +40,7 @@
 
 (define-key help-mode-map [mouse-2] 'help-follow-mouse)
 (define-key help-mode-map "\C-c\C-b" 'help-go-back)
-(define-key help-mode-map "\C-c\C-c" 'help-follow)
+(define-key help-mode-map "\C-c\C-c" 'help-follow-symbol)
 ;; Documentation only, since we use minor-mode-overriding-map-alist.
 (define-key help-mode-map "\r" 'help-follow)
 
@@ -233,10 +233,10 @@
   "Label to use by `help-make-xrefs' for the go-back reference.")
 
 (defconst help-xref-symbol-regexp
-  (purecopy (concat "\\(\\<\\(\\(variable\\|option\\)\\|"
-		    "\\(function\\|command\\)\\|"
-		    "\\(face\\)\\|"
-		    "\\(symbol\\)\\|"
+  (purecopy (concat "\\(\\<\\(\\(variable\\|option\\)\\|"  ; Link to var
+		    "\\(function\\|command\\)\\|"          ; Link to function
+		    "\\(face\\)\\|"			   ; Link to face
+		    "\\(symbol\\|program\\)\\|"		   ; Don't link
 		    "\\(source \\(?:code \\)?\\(?:of\\|for\\)\\)\\)"
 		    "[ \t\n]+\\)?"
 		    ;; Note starting with word-syntax character:
@@ -584,15 +584,6 @@
 
 ;; Navigation/hyperlinking with xrefs
 
-(defun help-follow-mouse (click)
-  "Follow the cross-reference that you CLICK on."
-  (interactive "e")
-  (let* ((start (event-start click))
-	 (window (car start))
-	 (pos (car (cdr start))))
-    (with-current-buffer (window-buffer window)
-      (help-follow pos))))
-
 (defun help-xref-go-back (buffer)
   "From BUFFER, go back to previous help buffer text using `help-xref-stack'."
   (let (item position method args)
@@ -627,26 +618,38 @@
   (let ((help-xref-following t))
     (apply function args)))
 
-(defun help-follow (&optional pos)
-  "Follow cross-reference at POS, defaulting to point.
+;; The doc string is meant to explain what buttons do.
+(defun help-follow-mouse ()
+  "Follow the cross-reference that you click on."
+  (interactive)
+  (error "No cross-reference here"))
+
+;; The doc string is meant to explain what buttons do.
+(defun help-follow ()
+  "Follow cross-reference at point.
 
 For the cross-reference format, see `help-make-xrefs'."
+  (interactive)
+  (error "No cross-reference here"))
+
+(defun help-follow-symbol (&optional pos)
+  "In help buffer, show docs for symbol at POS, defaulting to point.
+Show all docs for that symbol as either a variable, function or face."
   (interactive "d")
   (unless pos
     (setq pos (point)))
-  (unless (push-button pos)
-    ;; check if the symbol under point is a function or variable
-    (let ((sym
-	   (intern
-	    (save-excursion
-	      (goto-char pos) (skip-syntax-backward "w_")
-	      (buffer-substring (point)
-				(progn (skip-syntax-forward "w_")
-				       (point)))))))
-      (when (or (boundp sym)
-		(get sym 'variable-documentation)
-		(fboundp sym) (facep sym))
-	(help-do-xref pos #'help-xref-interned (list sym))))))
+  ;; check if the symbol under point is a function, variable or face
+  (let ((sym
+	 (intern
+	  (save-excursion
+	    (goto-char pos) (skip-syntax-backward "w_")
+	    (buffer-substring (point)
+			      (progn (skip-syntax-forward "w_")
+				     (point)))))))
+    (when (or (boundp sym)
+	      (get sym 'variable-documentation)
+	      (fboundp sym) (facep sym))
+      (help-do-xref pos #'help-xref-interned (list sym)))))
 
 (defun help-insert-string (string)
   "Insert STRING to the help buffer and install xref info for it.
--- a/lisp/ido.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/ido.el	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/lisp/image.el	Wed Mar 22 15:16:06 2006 +0000
@@ -79,12 +79,13 @@
 
 
 (defun 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 LIBRARY.
 
-First it searches for IMAGE in a path suitable for LIBRARY, which
-includes \"../../etc/images\" and \"../etc/images\" relative to
-the library file itself, followed by `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\".
 
 Then this function returns a list of directories which contains
 first the directory in which IMAGE was found, followed by the
@@ -99,16 +100,46 @@
 compatibility with versions of Emacs that lack the variable
 `image-load-path':
 
-    ;; Avoid errors on Emacsen without `image-load-path'.
-    (if (not (boundp 'image-load-path)) (defvar image-load-path nil))
+    ;; 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) image-load-path)))
+           (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.
@@ -118,33 +149,20 @@
         ;; 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
       (message "Could not find image %s for library %s" image library))
      (t
--- a/lisp/international/mule.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/international/mule.el	Wed Mar 22 15:16:06 2006 +0000
@@ -1593,7 +1593,10 @@
 		       (symbol :tag "Coding system"))))
 
 (defcustom auto-coding-regexp-alist
-  '(("^BABYL OPTIONS:[ \t]*-\\*-[ \t]*rmail[ \t]*-\\*-" . no-conversion))
+  '(("^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))
   "Alist of patterns vs corresponding coding systems.
 Each element looks like (REGEXP . CODING-SYSTEM).
 A file whose first bytes match REGEXP is decoded by CODING-SYSTEM on reading.
--- a/lisp/isearch.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/isearch.el	Wed Mar 22 15:16:06 2006 +0000
@@ -1696,12 +1696,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 21 22:32:30 2006 +0000
+++ b/lisp/iswitchb.el	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/lisp/jit-lock.el	Wed Mar 22 15:16:06 2006 +0000
@@ -301,7 +301,7 @@
 This function is added to `fontification-functions' when `jit-lock-mode'
 is active."
   (when (and jit-lock-mode (not memory-full))
-    (if (null jit-lock-defer-time)
+    (if (null jit-lock-defer-timer)
 	;; No deferral.
 	(jit-lock-fontify-now start (+ start jit-lock-chunk-size))
       ;; Record the buffer for later fontification.
@@ -510,7 +510,7 @@
 		   (setq pos (next-single-property-change pos 'fontified)))))))))
     (setq jit-lock-defer-buffers nil)
     ;; Force fontification of the visible parts.
-    (let ((jit-lock-defer-time nil))
+    (let ((jit-lock-defer-timer nil))
       ;; (message "Jit-Defer Now")
       (sit-for 0)
       ;; (message "Jit-Defer Done")
@@ -571,7 +571,7 @@
 	 (setq start (if region
 			 (car region)
 		       (goto-char start)
-		       (line-beginning-position (- 1 font-lock-lines-before))))
+		       (line-beginning-position)))
 
 	 ;; If we're in text that matches a multi-line font-lock pattern,
 	 ;; make sure the whole text will be redisplayed.
--- a/lisp/locate.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/locate.el	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/lisp/mail/rmail.el	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/lisp/mh-e/ChangeLog	Wed Mar 22 15:16:06 2006 +0000
@@ -1,3 +1,42 @@
+2006-03-19  Bill Wohler  <wohler@newt.com>
+
+	* mh-comp.el (mh-reply): Sync docstring with manual.
+
+	* mh-compat.el (mh-image-load-path-for-library): Shorten first line in
+	docstring.
+
+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
--- a/lisp/mh-e/mh-comp.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/mh-e/mh-comp.el	Wed Mar 22 15:16:06 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
@@ -580,14 +580,16 @@
 
      Response     Reply Goes To
 
-     from         The person who sent the message.  This is the
+     from         The person who sent the message. This is the
                   default, so <RET> is sufficient.
 
      to           Replies to the sender, plus all recipients in the
                   \"To:\" header field.
 
-     all
-     cc           Forms a reply to the sender, plus all recipients.
+     all cc       Forms a reply to the addresses in the
+                  \"Mail-Followup-To:\" header field if one
+                  exists; otherwise forms a reply to the sender,
+                  plus all recipients.
 
 Depending on your answer, \"repl\" is given a different argument
 to form your reply. Specifically, a choice of \"from\" or none at
@@ -597,7 +599,11 @@
 
 Two windows are then created. One window contains the message to
 which you are replying in an MH-Show buffer. Your draft, in
-MH-Letter mode (see `mh-letter-mode'), is in the other window.
+MH-Letter mode (*note `mh-letter-mode'), is in the other window.
+If the reply draft was not one that you expected, check the
+things that affect the behavior of \"repl\" which include the
+\"repl:\" profile component and the \"replcomps\" and
+\"replgroupcomps\" files.
 
 If you supply a prefix argument INCLUDEP, the message you are
 replying to is inserted in your reply after having first been run
@@ -895,15 +901,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 21 22:32:30 2006 +0000
+++ b/lisp/mh-e/mh-compat.el	Wed Mar 22 15:16:06 2006 +0000
@@ -117,12 +117,13 @@
 
 (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 LIBRARY.
 
-First it searches for IMAGE in a path suitable for LIBRARY, which
-includes \"../../etc/images\" and \"../etc/images\" relative to
-the library file itself, followed by `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\".
 
 Then this function returns a list of directories which contains
 first the directory in which IMAGE was found, followed by the
@@ -137,16 +138,46 @@
 compatibility with versions of Emacs that lack the variable
 `image-load-path':
 
-    ;; Avoid errors on Emacsen without `image-load-path'.
-    (if (not (boundp 'image-load-path)) (defvar image-load-path nil))
+    ;; 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) image-load-path)))
+           (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,33 +187,20 @@
         ;; 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
       (message "Could not find image %s for library %s" image library))
      (t
--- a/lisp/mh-e/mh-e.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/mh-e/mh-e.el	Wed Mar 22 15:16:06 2006 +0000
@@ -325,9 +325,6 @@
 
 ;; Etc. (alphabetical)
 
-;; Avoid errors on Emacsen without image-load-path.
-(if (not (boundp 'image-load-path)) (defvar image-load-path nil))
-
 (defvar mh-flists-present-flag nil
   "Non-nil means that we have \"flists\".")
 
@@ -430,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 21 22:32:30 2006 +0000
+++ b/lisp/mh-e/mh-folder.el	Wed Mar 22 15:16:06 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)
@@ -592,7 +593,9 @@
   (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 (cons (car load-path) image-load-path)))
+             (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 21 22:32:30 2006 +0000
+++ b/lisp/mh-e/mh-letter.el	Wed Mar 22 15:16:06 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)
@@ -314,7 +316,9 @@
   (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 (cons (car load-path) image-load-path)))
+             (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 21 22:32:30 2006 +0000
+++ b/lisp/mh-e/mh-utils.el	Wed Mar 22 15:16:06 2006 +0000
@@ -127,12 +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 (cons (car load-path) image-load-path)))
+           (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 21 22:32:30 2006 +0000
+++ b/lisp/mouse.el	Wed Mar 22 15:16:06 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/pgg-gpg.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/pgg-gpg.el	Wed Mar 22 15:16:06 2006 +0000
@@ -51,6 +51,13 @@
   :type '(choice (const :tag "New `--recipient' option" "--recipient")
 		 (const :tag "Old `--remote-user' option" "--remote-user")))
 
+(defcustom pgg-gpg-use-agent (if (getenv "GPG_AGENT_INFO") t nil)
+  "Whether to use gnupg agent for key caching.
+By default, it will be enabled iff the environment variable
+\"GPG_AGENT_INFO\" is set."
+  :group 'pgg-gpg
+  :type 'boolean)
+
 (defvar pgg-gpg-user-id nil
   "GnuPG ID of your default identity.")
 
@@ -58,7 +65,8 @@
   (let* ((output-file-name (pgg-make-temp-file "pgg-output"))
 	 (args
 	  `("--status-fd" "2"
-	    ,@(if passphrase '("--passphrase-fd" "0"))
+	    ,@(if pgg-gpg-use-agent '("--use-agent")
+		(if passphrase '("--passphrase-fd" "0")))
 	    "--yes" ; overwrite
 	    "--output" ,output-file-name
 	    ,@pgg-gpg-extra-args ,@args))
@@ -100,7 +108,8 @@
       (set-default-file-modes orig-mode))))
 
 (defun pgg-gpg-possibly-cache-passphrase (passphrase &optional key notruncate)
-  (if (and pgg-cache-passphrase
+  (if (and passphrase
+	   pgg-cache-passphrase
 	   (progn
 	     (goto-char (point-min))
 	     (re-search-forward "^\\[GNUPG:] \\(GOOD_PASSPHRASE\\>\\)\\|\\(SIG_CREATED\\)" nil t)))
@@ -154,24 +163,22 @@
   (let ((args (list "--with-colons" "--no-greeting" "--batch"
 		    (if all "--list-secret-keys" "--list-keys")
 		    string))
-        (key-regexp (concat "^\\(sec\\|pub\\)"
-                            ":[^:]*:[^:]*:[^:]*:\\([^:]*\\):[^:]*"
-                            ":[^:]*:[^:]*:[^:]*:\\([^:]*\\):"))
-        )
+	(key-regexp (concat "^\\(sec\\|pub\\)"
+			    ":[^:]*:[^:]*:[^:]*:\\([^:]*\\):[^:]*"
+			    ":[^:]*:[^:]*:[^:]*:\\([^:]*\\):")))
     (with-temp-buffer
       (apply #'call-process pgg-gpg-program nil t nil args)
       (goto-char (point-min))
       (if (re-search-forward key-regexp
-                             nil t)
-          (match-string 3)))))
+			     nil t)
+	  (match-string 3)))))
 
 (defun pgg-gpg-key-id-from-key-owner (key-owner)
   (cond ((not key-owner) nil)
-        ;; Extract bare key id from outermost paired angle brackets, if any:
-        ((string-match "[^<]*<\\(.+\\)>[^>]*" key-owner)
-         (substring key-owner (match-beginning 1)(match-end 1)))
-        (key-owner))
-  )
+	;; Extract bare key id from outermost paired angle brackets, if any:
+	((string-match "[^<]*<\\(.+\\)>[^>]*" key-owner)
+	 (substring key-owner (match-beginning 1)(match-end 1)))
+	(key-owner)))
 
 (defun pgg-gpg-encrypt-region (start end recipients &optional sign passphrase)
   "Encrypt the current region between START and END.
@@ -182,11 +189,11 @@
 passphrase cache or user."
   (let* ((pgg-gpg-user-id (or pgg-gpg-user-id pgg-default-user-id))
 	 (passphrase (or passphrase
-                         (when sign
-                           (pgg-read-passphrase
-                            (format "GnuPG passphrase for %s: "
-                                    pgg-gpg-user-id)
-                            pgg-gpg-user-id))))
+			 (when (and sign (not pgg-gpg-use-agent))
+			   (pgg-read-passphrase
+			    (format "GnuPG passphrase for %s: "
+				    pgg-gpg-user-id)
+			    pgg-gpg-user-id))))
 	 (args
 	  (append
 	   (list "--batch" "--armor" "--always-trust" "--encrypt")
@@ -214,8 +221,9 @@
 If optional PASSPHRASE is not specified, it will be obtained from the
 passphrase cache or user."
   (let* ((passphrase (or passphrase
-                         (pgg-read-passphrase
-                          "GnuPG passphrase for symmetric encryption: ")))
+			 (when (not pgg-gpg-use-agent)
+			   (pgg-read-passphrase
+			    "GnuPG passphrase for symmetric encryption: "))))
 	 (args
 	  (append (list "--batch" "--armor" "--symmetric" )
 		  (if pgg-text-mode (list "--textmode")))))
@@ -232,22 +240,23 @@
 			 (insert-buffer-substring current-buffer)
 			 (pgg-decode-armor-region (point-min) (point-max))))
 	 (secret-keys (pgg-gpg-lookup-all-secret-keys))
-         ;; XXX the user is stuck if they need to use the passphrase for
-         ;;     any but the first secret key for which the message is
-         ;;     encrypted.  ideally, we would incrementally give them a
-         ;;     chance with subsequent keys each time they fail with one.
+	 ;; XXX the user is stuck if they need to use the passphrase for
+	 ;;     any but the first secret key for which the message is
+	 ;;     encrypted.  ideally, we would incrementally give them a
+	 ;;     chance with subsequent keys each time they fail with one.
 	 (key (pgg-gpg-select-matching-key message-keys secret-keys))
-         (key-owner (and key (pgg-gpg-lookup-key-owner key t)))
+	 (key-owner (and key (pgg-gpg-lookup-key-owner key t)))
 	 (key-id (pgg-gpg-key-id-from-key-owner key-owner))
 	 (pgg-gpg-user-id (or key-id key
-	                      pgg-gpg-user-id pgg-default-user-id))
+			      pgg-gpg-user-id pgg-default-user-id))
 	 (passphrase (or passphrase
-                         (pgg-read-passphrase
-                          (format (if (pgg-gpg-symmetric-key-p message-keys)
-                                      "Passphrase for symmetric decryption: "
-                                    "GnuPG passphrase for %s: ")
-                                  (or key-owner "??"))
-                          pgg-gpg-user-id)))
+			 (when (not pgg-gpg-use-agent)
+			   (pgg-read-passphrase
+			    (format (if (pgg-gpg-symmetric-key-p message-keys)
+					"Passphrase for symmetric decryption: "
+				      "GnuPG passphrase for %s: ")
+				    (or key-owner "??"))
+			    pgg-gpg-user-id))))
 	 (args '("--batch" "--decrypt")))
     (pgg-gpg-process-region start end passphrase pgg-gpg-program args)
     (with-current-buffer pgg-errors-buffer
@@ -269,7 +278,7 @@
   (loop for message-key in message-keys
 	for message-key-id = (and (equal (car message-key) 1)
 				  (cdr (assq 'key-identifier
-                                             (cdr message-key))))
+					     (cdr message-key))))
 	for key = (and message-key-id (pgg-lookup-key message-key-id 'encrypt))
 	when (and key (member key secret-keys)) return key))
 
@@ -277,9 +286,11 @@
   "Make detached signature from text between START and END."
   (let* ((pgg-gpg-user-id (or pgg-gpg-user-id pgg-default-user-id))
 	 (passphrase (or passphrase
-                         (pgg-read-passphrase
-                          (format "GnuPG passphrase for %s: " pgg-gpg-user-id)
-                          pgg-gpg-user-id)))
+			 (when (not pgg-gpg-use-agent)
+			   (pgg-read-passphrase
+			    (format "GnuPG passphrase for %s: "
+				    pgg-gpg-user-id)
+			    pgg-gpg-user-id))))
 	 (args
 	  (append (list (if cleartext "--clearsign" "--detach-sign")
 			"--armor" "--batch" "--verbose"
--- a/lisp/progmodes/gdb-ui.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/progmodes/gdb-ui.el	Wed Mar 22 15:16:06 2006 +0000
@@ -4,7 +4,7 @@
 ;; Maintainer: FSF
 ;; Keywords: unix, tools
 
-;; Copyright (C) 2002, 2003, 2004, 2005, 2006 
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006
 ;; Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
@@ -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."
@@ -524,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)
 
@@ -670,7 +683,8 @@
 	  (require 'tooltip)
 	  (save-selected-window
 	    (let ((expr (if arg
-			    (read-string "Name of variable: ")
+			    (completing-read "Name of variable: "
+					     'gud-gdb-complete-command)
 			  (tooltip-identifier-from-point (point)))))
 	      (catch 'already-watched
 		(dolist (var gdb-var-list)
@@ -1064,6 +1078,7 @@
 ;;
 ;; These lists are consumed tail first.
 ;;
+(defvar gdb-continuation nil)
 
 (defun gdb-send (proc string)
   "A comint send filter for gdb.
@@ -1071,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.
@@ -1152,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)
@@ -1164,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)
@@ -1238,6 +1257,8 @@
      ((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)
@@ -1247,6 +1268,11 @@
       (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
@@ -1269,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)
@@ -1290,6 +1318,11 @@
 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 (or gud-overlay-arrow-position gud-last-frame)
+    (gud-display-line (car gud-last-last-frame) (cdr gud-last-last-frame)))
+  (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)
@@ -1628,10 +1661,13 @@
 (defvar breakpoint-disabled-icon nil
   "Icon for disabled breakpoint in display margin.")
 
-;; Bitmap for breakpoint in fringe
 (and (display-images-p)
+     ;; Bitmap for breakpoint in fringe
      (define-fringe-bitmap 'breakpoint
-       "\x3c\x7e\xff\xff\xff\xff\x7e\x3c"))
+       "\x3c\x7e\xff\xff\xff\xff\x7e\x3c")
+     ;; Bitmap for gud-overlay-arrow in fringe
+     (define-fringe-bitmap 'hollow-right-triangle
+       "\xe0\x90\x88\x84\x84\x88\x90\xe0"))
 
 (defface breakpoint-enabled
   '((t
@@ -1887,11 +1923,11 @@
 
 (def-gdb-auto-updated-buffer gdb-stack-buffer
   gdb-invalidate-frames
-  "server where\n"
-  gdb-info-frames-handler
-  gdb-info-frames-custom)
-
-(defun gdb-info-frames-custom ()
+  "server info stack\n"
+  gdb-info-stack-handler
+  gdb-info-stack-custom)
+
+(defun gdb-info-stack-custom ()
   (with-current-buffer (gdb-get-buffer 'gdb-stack-buffer)
     (save-excursion
       (let ((buffer-read-only nil)
@@ -1952,7 +1988,7 @@
     map))
 
 (defun gdb-frames-mode ()
-  "Major mode for gdb frames.
+  "Major mode for gdb call stack.
 
 \\{gdb-frames-mode-map}"
   (kill-all-local-variables)
@@ -2033,15 +2069,13 @@
     map))
 
 (defvar gdb-threads-font-lock-keywords
-  '(
-    (") +\\([^ ]+\\) ("  (1 font-lock-function-name-face))
+  '((") +\\([^ ]+\\) ("  (1 font-lock-function-name-face))
     ("in \\([^ ]+\\) ("  (1 font-lock-function-name-face))
-    ("\\(\\(\\sw\\|[_.]\\)+\\)="  (1 font-lock-variable-name-face))
-    )
+    ("\\(\\(\\sw\\|[_.]\\)+\\)="  (1 font-lock-variable-name-face)))
   "Font lock keywords used in `gdb-threads-mode'.")
 
 (defun gdb-threads-mode ()
-  "Major mode for gdb frames.
+  "Major mode for gdb threads.
 
 \\{gdb-threads-mode-map}"
   (kill-all-local-variables)
@@ -2101,7 +2135,7 @@
 	    (unless (string-equal (match-string 0) "The")
 	      (put-text-property start (match-end 0)
 				 'face font-lock-variable-name-face)
-	      (add-text-properties start end 
+	      (add-text-properties start end
 		                   '(help-echo "mouse-2: edit value"
 				     mouse-face highlight))))
 	  (forward-line 1))))))
@@ -2754,6 +2788,7 @@
     (setq gdb-overlay-arrow-position nil))
   (setq overlay-arrow-variable-list
 	(delq 'gdb-overlay-arrow-position overlay-arrow-variable-list))
+  (setq fringe-indicator-alist '((overlay-arrow . right-triangle)))
   (if (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
       (speedbar-refresh))
   (setq gud-running nil)
@@ -3079,6 +3114,17 @@
   (goto-char (point-min))
   (if (re-search-forward  "Stack level \\([0-9]+\\)" nil t)
       (setq gdb-frame-number (match-string 1)))
+  (if gud-overlay-arrow-position
+      (let ((buffer (marker-buffer gud-overlay-arrow-position))
+	    (position (marker-position gud-overlay-arrow-position)))
+	(when buffer
+	  (with-current-buffer buffer
+	    (setq fringe-indicator-alist
+		  (if (string-equal gdb-frame-number "0")
+		      nil
+		    '((overlay-arrow . hollow-right-triangle))))
+	    (setq gud-overlay-arrow-position (make-marker))
+	    (set-marker gud-overlay-arrow-position position)))))
   (goto-char (point-min))
   (if (re-search-forward
        ".*=\\s-+0x0*\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*?\\);? " nil t)
@@ -3123,7 +3169,7 @@
   (gdb-enqueue-input
    (list
     (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
-	(concat "server interpreter mi \"-var-list-children --all-values "  
+	(concat "server interpreter mi \"-var-list-children --all-values "
 		varnum "\"\n")
       (concat "-var-list-children --all-values " varnum "\n"))
     `(lambda () (gdb-var-list-children-handler-1 ,varnum)))))
@@ -3252,7 +3298,7 @@
 	    (unless (string-equal (match-string 0) "No registers.")
 	      (put-text-property start (match-end 0)
 				 'face font-lock-variable-name-face)
-	      (add-text-properties start end 
+	      (add-text-properties start end
 		                   '(help-echo "mouse-2: edit value"
 				     mouse-face highlight))))
 	  (forward-line 1))))))
@@ -3334,7 +3380,7 @@
 			      help-echo "mouse-2: create watch expression"
 			      local-map ,gdb-locals-watch-map-1)
 			    name))
-		       (insert 
+		       (insert
 			(concat name "\t" (nth 1 local)
 				"\t" (nth 2 local) "\n")))
 		   (set-window-start window start)
--- a/lisp/progmodes/grep.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/progmodes/grep.el	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/lisp/progmodes/gud.el	Wed Mar 22 15:16:06 2006 +0000
@@ -740,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))))
@@ -866,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.
@@ -881,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)))))
 
 
@@ -3270,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/simple.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/simple.el	Wed Mar 22 15:16:06 2006 +0000
@@ -3188,6 +3188,9 @@
 \\[universal-argument] \\[set-mark-command], unconditionally
 set mark where point is.
 
+Setting the mark also sets the \"region\", which is the closest
+equivalent in Emacs to what some editors call the \"selection\".
+
 Novice Emacs Lisp programmers often try to use the mark for the wrong
 purposes.  See the documentation of `set-mark' for more information."
   (interactive "P")
--- a/lisp/sort.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/sort.el	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/lisp/term/w32-win.el	Wed Mar 22 15:16:06 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/bibtex.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/textmodes/bibtex.el	Wed Mar 22 15:16:06 2006 +0000
@@ -88,6 +88,7 @@
                  (string :tag "Initial text")
                  (function :tag "Initialize Function" :value fun)
                  (other :tag "Default" t)))
+(put 'bibtex-include-OPTkey 'risky-local-variable t)
 
 (defcustom bibtex-user-optional-fields
   '(("annote" "Personal annotation (ignored)"))
@@ -437,6 +438,7 @@
 of the field, and ALTERNATIVE-FLAG (either nil or t) marks if the
 field is an alternative.  ALTERNATIVE-FLAG may be t only in the
 REQUIRED or CROSSREF-REQUIRED lists.")
+(put 'bibtex-entry-field-alist 'risky-local-variable t)
 
 (defcustom bibtex-comment-start "@Comment"
   "String starting a BibTeX comment."
@@ -595,7 +597,7 @@
   :type '(repeat (cons (regexp :tag "Old")
                        (string :tag "New"))))
 
-(defcustom bibtex-autokey-name-case-convert 'downcase
+(defcustom bibtex-autokey-name-case-convert-function 'downcase
   "Function called for each name to perform case conversion.
 See `bibtex-generate-autokey' for details."
   :group 'bibtex-autokey
@@ -604,6 +606,8 @@
                  (const :tag "Capitalize" capitalize)
                  (const :tag "Upcase" upcase)
                  (function :tag "Conversion function")))
+(defvaralias 'bibtex-autokey-name-case-convert
+  'bibtex-autokey-name-case-convert-function)
 
 (defcustom bibtex-autokey-name-length 'infty
   "Number of characters from name to incorporate into key.
@@ -666,7 +670,7 @@
   :group 'bibtex-autokey
   :type '(repeat regexp))
 
-(defcustom bibtex-autokey-titleword-case-convert 'downcase
+(defcustom bibtex-autokey-titleword-case-convert-function 'downcase
   "Function called for each titleword to perform case conversion.
 See `bibtex-generate-autokey' for details."
   :group 'bibtex-autokey
@@ -675,6 +679,8 @@
                  (const :tag "Capitalize" capitalize)
                  (const :tag "Upcase" upcase)
                  (function :tag "Conversion function")))
+(defvaralias 'bibtex-autokey-titleword-case-convert
+  'bibtex-autokey-titleword-case-convert-function)
 
 (defcustom bibtex-autokey-titleword-abbrevs nil
   "Determines exceptions to the usual abbreviation mechanism.
@@ -847,6 +853,7 @@
                                (choice (string :tag "Replacement")
 				       (integer :tag "Sub-match")
 				       (function :tag "Filter"))))))))
+(put 'bibtex-generate-url-list 'risky-local-variable t)
 
 (defcustom bibtex-expand-strings nil
   "If non-nil, expand strings when extracting the content of a BibTeX field."
@@ -1164,7 +1171,7 @@
     (,(concat "^[ \t]*\\(" bibtex-field-name "\\)[ \t]*=")
      1 font-lock-variable-name-face)
     ;; url
-    bibtex-font-lock-url bibtex-font-lock-crossref)
+    (bibtex-font-lock-url) (bibtex-font-lock-crossref))
   "*Default expressions to highlight in BibTeX mode.")
 
 (defvar bibtex-font-lock-url-regexp
@@ -2085,7 +2092,7 @@
                       ;; --> take the last token
                       (match-string 1 fullname))
                      (t (error "Name `%s' is incorrectly formed" fullname)))))
-    (funcall bibtex-autokey-name-case-convert
+    (funcall bibtex-autokey-name-case-convert-function
              (bibtex-autokey-abbrev name bibtex-autokey-name-length))))
 
 (defun bibtex-autokey-get-year ()
@@ -2147,7 +2154,7 @@
       (setq alist (cdr alist)))
     (if alist
         (cdar alist)
-      (funcall bibtex-autokey-titleword-case-convert
+      (funcall bibtex-autokey-titleword-case-convert-function
                (bibtex-autokey-abbrev titleword bibtex-autokey-titleword-length)))))
 
 (defun bibtex-generate-autokey ()
@@ -2167,7 +2174,7 @@
     take at least `bibtex-autokey-name-length' characters (truncate only
     after a consonant or at a word end).
  5. Convert all last names using the function
-    `bibtex-autokey-name-case-convert'.
+    `bibtex-autokey-name-case-convert-function'.
  6. Build the name part of the key by concatenating all abbreviated last
     names with the string `bibtex-autokey-name-separator' between any two.
     If there are more names in the name field than names used in the name
@@ -2199,7 +2206,7 @@
     `bibtex-autokey-titleword-length' characters (truncate only after
     a consonant or at a word end).
  5. Convert all title words using the function
-    `bibtex-autokey-titleword-case-convert'.
+    `bibtex-autokey-titleword-case-convert-function'.
  6. Build the title part by concatenating all abbreviated title words with
     the string `bibtex-autokey-titleword-separator' between any two.
 
@@ -2531,7 +2538,7 @@
 Used as default value of `bibtex-summary-function'."
   ;; It would be neat to customize this function.  How?
   (if (looking-at bibtex-entry-maybe-empty-head)
-      (let* ((bibtex-autokey-name-case-convert 'identity)
+      (let* ((bibtex-autokey-name-case-convert-function 'identity)
              (bibtex-autokey-name-length 'infty)
              (bibtex-autokey-names 1)
              (bibtex-autokey-names-stretch 0)
@@ -2542,7 +2549,7 @@
              (year (bibtex-autokey-get-year))
              (bibtex-autokey-titlewords 5)
              (bibtex-autokey-titlewords-stretch 2)
-             (bibtex-autokey-titleword-case-convert 'identity)
+             (bibtex-autokey-titleword-case-convert-function 'identity)
              (bibtex-autokey-titleword-length 5)
              (bibtex-autokey-titleword-separator " ")
              (title (bibtex-autokey-get-title))
@@ -2785,7 +2792,6 @@
         (list (list nil bibtex-entry-head bibtex-key-in-head))
         imenu-case-fold-search t)
   (make-local-variable 'choose-completion-string-functions)
-  (make-local-variable 'completion-ignore-case)
   ;; XEmacs needs easy-menu-add, Emacs does not care
   (easy-menu-add bibtex-edit-menu)
   (easy-menu-add bibtex-entry-menu)
@@ -4155,9 +4161,9 @@
 
     (cond ((eq compl 'key)
            ;; key completion: no cleanup needed
-           (setq choose-completion-string-functions nil
-                 completion-ignore-case nil)
-           (bibtex-complete-internal (bibtex-global-key-alist)))
+           (setq choose-completion-string-functions nil)
+           (let (completion-ignore-case)
+             (bibtex-complete-internal (bibtex-global-key-alist))))
 
           ((eq compl 'crossref-key)
            ;; crossref key completion
@@ -4167,40 +4173,35 @@
            ;; non-nil. Therefore, `choose-completion-string-functions' is
            ;; always set (either to non-nil or nil) when a new completion
            ;; is requested.
-           ;; Also, `choose-completion-delete-max-match' requires
-           ;; that we set `completion-ignore-case' (i.e., binding via `let'
-           ;; is not sufficient).
-           (setq completion-ignore-case nil
-                 choose-completion-string-functions
-                 (lambda (choice buffer mini-p base-size)
-                   (setq choose-completion-string-functions nil)
-                   (choose-completion-string choice buffer base-size)
-                   (bibtex-complete-crossref-cleanup choice)
-                   t)) ; needed by choose-completion-string-functions
-
-           (bibtex-complete-crossref-cleanup (bibtex-complete-internal
-                                              (bibtex-global-key-alist))))
+           (let (completion-ignore-case)
+             (setq choose-completion-string-functions
+                   (lambda (choice buffer mini-p base-size)
+                     (setq choose-completion-string-functions nil)
+                     (choose-completion-string choice buffer base-size)
+                     (bibtex-complete-crossref-cleanup choice)
+                     t)) ; needed by choose-completion-string-functions
+             (bibtex-complete-crossref-cleanup
+              (bibtex-complete-internal (bibtex-global-key-alist)))))
 
           ((eq compl 'string)
            ;; string key completion: no cleanup needed
-           (setq choose-completion-string-functions nil
-                 completion-ignore-case t)
-           (bibtex-complete-internal bibtex-strings))
+           (setq choose-completion-string-functions nil)
+           (let ((completion-ignore-case t))
+             (bibtex-complete-internal bibtex-strings)))
 
           (compl
            ;; string completion
-           (setq completion-ignore-case t
-                 choose-completion-string-functions
-                 `(lambda (choice buffer mini-p base-size)
-                    (setq choose-completion-string-functions nil)
-                    (choose-completion-string choice buffer base-size)
-                    (bibtex-complete-string-cleanup choice ',compl)
-                    t)) ; needed by choose-completion-string-functions
-           (bibtex-complete-string-cleanup (bibtex-complete-internal compl)
-                                             compl))
-
-          (t (setq choose-completion-string-functions nil
-                   completion-ignore-case nil) ; default
+           (let ((completion-ignore-case t))
+             (setq choose-completion-string-functions
+                   `(lambda (choice buffer mini-p base-size)
+                      (setq choose-completion-string-functions nil)
+                      (choose-completion-string choice buffer base-size)
+                      (bibtex-complete-string-cleanup choice ',compl)
+                      t)) ; needed by choose-completion-string-functions
+             (bibtex-complete-string-cleanup (bibtex-complete-internal compl)
+                                             compl)))
+
+          (t (setq choose-completion-string-functions nil)
              (error "Point outside key or BibTeX field")))))
 
 (defun bibtex-Article ()
@@ -4334,16 +4335,16 @@
                       (dolist (step scheme)
                         (setq field (cdr (assoc-string (car step) fields-alist t)))
                         (if (string-match (nth 1 step) field)
-                            (setq field (cond ((functionp (nth 2 step))
-                                               (funcall (nth 2 step) field))
-                                              ((numberp (nth 2 step))
-                                               (match-string (nth 2 step) field))
-                                              (t
-                                               (replace-match (nth 2 step) t nil field))))
+                            (push (cond ((functionp (nth 2 step))
+                                         (funcall (nth 2 step) field))
+                                        ((numberp (nth 2 step))
+                                         (match-string (nth 2 step) field))
+                                        (t
+                                         (replace-match (nth 2 step) t nil field)))
+                                  obj)
                           ;; If the scheme is set up correctly,
                           ;; we should never reach this point
-                          (error "Match failed: %s" field))
-                        (push field obj))
+                          (error "Match failed: %s" field)))
                       (if fmt (apply 'format fmt (nreverse obj))
                         (apply 'concat (nreverse obj)))))
           (browse-url (message "%s" url))))
--- a/lisp/textmodes/ispell.el	Tue Mar 21 22:32:30 2006 +0000
+++ b/lisp/textmodes/ispell.el	Wed Mar 22 15:16:06 2006 +0000
@@ -1325,9 +1325,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 21 22:32:30 2006 +0000
+++ b/lisp/textmodes/org.el	Wed Mar 22 15:16:06 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)
@@ -6827,8 +6833,8 @@
 	    (while (string-match " *\n *" link)
 	      (setq link (replace-match " " t t link)))
 	    (if (string-match org-link-regexp link)
-		(setq type (match-string 1)
-		      path (match-string 2))
+		(setq type (match-string 1 link)
+		      path (match-string 2 link))
 	      (setq type "thisfile"
 		    path link))
 	    (throw 'match t)))
@@ -6887,6 +6893,10 @@
 
       (cond
 
+       ((member type '("http" "https" "ftp" "mailto" "news"))
+	;; give these to some browser
+	(browse-url (concat type ":" path)))
+
        ((string= type "tags")
 	(org-tags-view in-emacs path))
        ((or (string= type "camel")
@@ -10801,11 +10811,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 +11925,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 +12936,3 @@
 
 ;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd
 ;;; org.el ends here
-
--- a/lispref/ChangeLog	Tue Mar 21 22:32:30 2006 +0000
+++ b/lispref/ChangeLog	Wed Mar 22 15:16:06 2006 +0000
@@ -1,3 +1,38 @@
+2006-03-21  Nick Roberts  <nickrob@snap.net.nz>
+
+	* display.texi (Fringe Indicators): Fix typos.
+
+2006-03-19  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* tips.texi (Documentation Tips): One can now also write `program'
+	in front of a quoted symbol in a docstring to prevent making a
+	hyperlink.
+
+2006-03-19  Alan Mackenzie  <acm@muc.de>
+
+	* text.texi (Special Properties): Clarify the definition of
+	'fontified.
+
+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,
@@ -7,7 +42,7 @@
 
 	* 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
+	("Other Font Lock Variables"): Move "font-lock-lines-before" to
 	the new node "Region to Fontify".
 
 2006-03-13  Richard Stallman  <rms@gnu.org>
@@ -104,9 +139,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>
 
@@ -157,8 +192,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 21 22:32:30 2006 +0000
+++ b/lispref/display.texi	Wed Mar 22 15:16:06 2006 +0000
@@ -2876,12 +2876,12 @@
 When @code{fringe-indicator-alist} has a buffer-local value, and there
 is no bitmap defined for a logical indicator, or the bitmap is
 @code{t}, the corresponding value from the (non-local)
-@code{default-fringes-indicator-alist} is used.
+@code{default-fringe-indicator-alist} is used.
 
 To completely hide a specific indicator, set the bitmap to @code{nil}.
 @end defvar
 
-@defvar default-fringes-indicator-alist
+@defvar default-fringe-indicator-alist
 The value of this variable is the default value for
 @code{fringe-indicator-alist} in buffers that do not override it.
 @end defvar
@@ -2891,7 +2891,7 @@
 @code{left-arrow}, @code{right-arrow}, @code{up-arrow}, @code{down-arrow},
 @code{left-curly-arrow}, @code{right-curly-arrow},
 @code{left-triangle}, @code{right-triangle},
-@code{top-left-angle}, @code{ top-right-angle},
+@code{top-left-angle}, @code{top-right-angle},
 @code{bottom-left-angle}, @code{bottom-right-angle},
 @code{left-bracket}, @code{right-bracket},
 @code{filled-rectangle}, @code{hollow-rectangle},
@@ -4127,13 +4127,14 @@
 
 @defun image-load-path-for-library library image &optional path no-error
 @tindex image-load-path-for-library
-This function returns a suitable search path for images relative to
-@var{library}.
-
-First it searches for @var{image} in a path suitable for
-@var{library}, which includes @file{../../etc/images} and
-@file{../etc/images} relative to the library file itself, followed by
-@code{image-load-path} and @code{load-path}.
+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
@@ -4148,11 +4149,13 @@
 with versions of Emacs that lack the variable @code{image-load-path}:
 
 @example
-;; Avoid errors on Emacsen without `image-load-path'.
-(if (not (boundp 'image-load-path)) (defvar image-load-path nil))
+;; 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) image-load-path)))
+       (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 21 22:32:30 2006 +0000
+++ b/lispref/modes.texi	Wed Mar 22 15:16:06 2006 +0000
@@ -2731,16 +2731,6 @@
 You can enlarge (or even reduce) the region to fontify by setting either
 of the following variables:
 
-@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.  This variable is ignored whenever
-@code{font-lock-extend-region-function} is set and returns a
-non-@code{nil} value.
-@end defvar
-
 @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
--- a/lispref/text.texi	Tue Mar 21 22:32:30 2006 +0000
+++ b/lispref/text.texi	Wed Mar 22 15:16:06 2006 +0000
@@ -2994,9 +2994,25 @@
 
 @item fontified
 @kindex fontified @r{(text property)}
-This property, if non-@code{nil}, says that text in the buffer has
-had faces assigned automatically by a feature such as Font-Lock mode.
-@xref{Auto Faces}.
+This property says whether the text has had faces assigned to it by
+font locking.  The display engine tests it to decide whether a buffer
+portion needs refontifying before display.  @xref{Auto Faces}.  It
+takes one of these three values---other values are invalid:
+
+@table @asis
+@item @code{nil}
+Font locking is disabled, or the @code{face} properties on the text,
+if any, are invalid.
+
+@item The symbol @code{defer}
+This value states that the text's @code{face} properties are invalid
+and marks it for deferred fontification.  It is used only when ``just
+in time'' font locking is enabled.
+
+@item @code{t}
+The @code{face} properties, or lack of them, on the text are currently
+valid.
+@end table
 
 @item display
 @kindex display @r{(text property)}
--- a/lispref/tips.texi	Tue Mar 21 22:32:30 2006 +0000
+++ b/lispref/tips.texi	Wed Mar 22 15:16:06 2006 +0000
@@ -741,8 +741,8 @@
 
 If a symbol has a function definition and/or a variable definition, but
 those are irrelevant to the use of the symbol that you are documenting,
-you can write the word @samp{symbol} before the symbol name to prevent
-making any hyperlink.  For example,
+you can write the words @samp{symbol} or @samp{program} before the
+symbol name to prevent making any hyperlink.  For example,
 
 @example
 If the argument KIND-OF-RESULT is the symbol `list',
--- a/man/ChangeLog	Tue Mar 21 22:32:30 2006 +0000
+++ b/man/ChangeLog	Wed Mar 22 15:16:06 2006 +0000
@@ -1,12 +1,78 @@
+2006-03-21  Bill Wohler  <wohler@newt.com>
+
+	* mh-e.texi (Folders): Various edits.
+
+2006-03-20  Romain Francoise  <romain@orebokech.com>
+
+	* gnus.texi (Mail Folders): Grammar fix.
+
+2006-03-21  Juanma Barranquero  <lekktu@gmail.com>
+
+	* files.texi (VC Dired Mode): Remove misplaced brackets.
+
+2006-03-21  Andre Spiegel  <spiegel@gnu.org>
+
+	* files.texi: Various updates and clarifications in the VC
+	chapter.
+
+2006-03-19  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* help.texi (Help Mode): Document "C-c C-c".
+
+2006-03-19  Bill Wohler  <wohler@newt.com>
+
+	* mh-e.texi (Replying): Document Mail-Followup-To.  Change
+	manually-formatted table to multitable.  Add debugging info.
+	Move description of mh-reply-default-reply-to into paragraph
+	that describes its values.
+
+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
+	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
+	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
+	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
@@ -73,9 +139,10 @@
 
 2006-03-06  Bill Wohler  <wohler@newt.com>
 
-	* mh-e.texi: Move from SourceForge repository to Savannah. This is
-	version 7.93, which is a total rewrite from the previous edition
-	1.3 for MH-E version 5.0.2, and corresponds to MH-E version 7.93.
+	* mh-e.texi: Move from SourceForge repository to Savannah.
+	This is version 7.93, which is a total rewrite from the previous
+	edition 1.3 for MH-E version 5.0.2, and corresponds to MH-E
+	version 7.93.
 
 2006-03-03  Reiner Steib  <Reiner.Steib@gmx.de>
 
@@ -83,12 +150,12 @@
 
 2006-03-01  Carsten Dominik  <dominik@science.uva.nl>
 
-	* org.texi: (Interaction): Added item about `org-mouse.el' by
+	* org.texi (Interaction): Add item about `org-mouse.el' by
 	Piotr Zielinski.
-	(Managing links): Documented that also mouse-1 can be used to
+	(Managing links): Document that also mouse-1 can be used to
 	activate a link.
-	(Headlines, FAQ): Added entry about hiding leading stars.
-	(Miscellaneous): Resorted the sections in this chapter to a more
+	(Headlines, FAQ): Add entry about hiding leading stars.
+	(Miscellaneous): Resort the sections in this chapter to a more
 	logical sequence.
 
 2006-02-28  Andre Spiegel  <spiegel@gnu.org>
@@ -154,7 +221,7 @@
 
 	* reftex.texi: Version number and date change only.
 
-	* org.texi: (Internal Links): Rewritten to cover the modified
+	* org.texi (Internal Links): Rewrite to cover the modified
 	linking system.
 
 2006-02-21  Nick Roberts  <nickrob@snap.net.nz>
@@ -935,7 +1002,7 @@
 	prefix keys even when mark is active.  Decribe that RET moves
 	cursor to next corner in rectangle; clarify insert around rectangle.
 
-2005-12-08  Alan Mackenzie <bug-cc-mode@gnu.org>
+2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
 
 	* cc-mode.texi: The manual has been extensively revised: the
 	information about using CC Mode has been separated from the larger
--- a/man/Makefile.in	Tue Mar 21 22:32:30 2006 +0000
+++ b/man/Makefile.in	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/man/abbrevs.texi	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/man/emacs-xtra.texi	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/man/emacs.texi	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/man/files.texi	Wed Mar 22 15:16:06 2006 +0000
@@ -1290,7 +1290,7 @@
 VC compensates for certain features missing in SCCS (snapshots, for
 example) by implementing them itself, but some other VC features, such
 as multiple branches, are not available with SCCS.  Since SCCS is
-non-free, not respecting its users freedom,d, you should not use it;
+non-free, not respecting its users freedom, you should not use it;
 use its free replacement CSSC instead.  But you should use CSSC only
 if for some reason you cannot use RCS, or one of the higher-level
 systems such as CVS or GNU Arch.
@@ -1611,8 +1611,8 @@
 own.
 
 @item C-x v =
-Compare the current buffer contents with the latest checked-in version
-of the file.
+Compare the current buffer contents with the master version from which
+you started editing.
 
 @item C-u C-x v = @var{file} @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET}
 Compare the specified two versions of @var{file}.
@@ -1635,10 +1635,11 @@
   It is usually more convenient to compare two versions of the file,
 with the command @kbd{C-x v =} (@code{vc-diff}).  Plain @kbd{C-x v =}
 compares the current buffer contents (saving them in the file if
-necessary) with the last checked-in version of the file.  @kbd{C-u C-x
-v =}, with a numeric argument, reads a file name and two version
-numbers, then compares those versions of the specified file.  Both
-forms display the output in a special buffer in another window.
+necessary) with the master version from which you started editing the
+file (this is not necessarily the latest version of the file).
+@kbd{C-u C-x v =}, with a numeric argument, reads a file name and two
+version numbers, then compares those versions of the specified file.
+Both forms display the output in a special buffer in another window.
 
   You can specify a checked-in version by its number; an empty input
 specifies the current contents of the work file (which may be different
@@ -1669,7 +1670,7 @@
 
 @findex vc-annotate
 @kindex C-x v g
-  For some backends, you can display the file @dfn{annotated} with
+  For some back ends, you can display the file @dfn{annotated} with
 per-line version information and using colors to enhance the visual
 appearance, with the command @kbd{M-x vc-annotate}.
 It creates a new buffer (the ``annotate buffer'') displaying the
@@ -1720,7 +1721,7 @@
 @item W
 Annotate the workfile version--the one you are editing.  If you used
 @kbd{P} and @kbd{N} to browse to other revisions, use this key to
-return to the latest version.
+return to your current version.
 @end table
 
 @node Secondary VC Commands
@@ -1840,7 +1841,8 @@
 
 @table @kbd
 @item C-x v u
-Revert the buffer and the file to the last checked-in version.
+Revert the buffer and the file to the version from which you started
+editing the file.
 
 @item C-x v c
 Remove the last-entered change from the master for the visited file.
@@ -1850,11 +1852,11 @@
 @kindex C-x v u
 @findex vc-revert-buffer
   If you want to discard your current set of changes and revert to the
-last version checked in, use @kbd{C-x v u} (@code{vc-revert-buffer}).
-This leaves the file unlocked; if locking is in use, you must first lock
-the file again before you change it again.  @kbd{C-x v u} requires
-confirmation, unless it sees that you haven't made any changes since the
-last checked-in version.
+version from which you started editing the file, use @kbd{C-x v u}
+(@code{vc-revert-buffer}).  This leaves the file unlocked; if locking
+is in use, you must first lock the file again before you change it
+again.  @kbd{C-x v u} requires confirmation, unless it sees that you
+haven't made any changes with respect to the master version.
 
   @kbd{C-x v u} is also the command to unlock a file if you lock it and
 then decide not to change it.
@@ -1863,9 +1865,11 @@
 @findex vc-cancel-version
   To cancel a change that you already checked in, use @kbd{C-x v c}
 (@code{vc-cancel-version}).  This command discards all record of the
-most recent checked-in version.  @kbd{C-x v c} also offers to revert
-your work file and buffer to the previous version (the one that precedes
-the version that is deleted).
+most recent checked-in version, but only if your work file corresponds
+to that version---you cannot use @kbd{C-x v c} to cancel a version
+that is not the latest on its branch.  @kbd{C-x v c} also offers to
+revert your work file and buffer to the previous version (the one that
+precedes the version that is deleted).
 
   If you answer @kbd{no}, VC keeps your changes in the buffer, and locks
 the file.  The no-revert option is useful when you have checked in a
@@ -1963,6 +1967,24 @@
 have also been checked in to the repository---you need to merge them
 with the work file before you can check it in.
 
+@vindex vc-stay-local
+@vindex vc-cvs-stay-local
+  In the above, if the repository were on a remote machine, VC would
+only contact it when the variable @code{vc-stay-local} (or
+@code{vc-cvs-stay-local}) is nil (@pxref{CVS Options}).  This is
+because access to the repository may be slow, or you may be working
+offline and not have access to the repository at all.  As a
+consequence, VC would not be able to tell you that @samp{file3.c} is
+in the ``merge'' state; you would learn that only when you try to
+check-in your modified copy of the file, or use a command such as
+@kbd{C-x v m}.
+
+  In practice, this is not a problem because CVS handles this case
+consistently whenever it arises.  In VC, you'll simply get prompted to
+merge the remote changes into your work file first.  The benefits of
+less network communication usually outweigh the disadvantage of not
+seeing remote changes immediately.
+
 @vindex vc-directory-exclusion-list
   When VC Dired displays subdirectories (in the ``full'' display mode),
 it omits some that should never contain any files under version control.
@@ -2420,12 +2442,16 @@
 support.  They use RCS's native facilities for this, so
 snapshots made using RCS through VC are visible even when you bypass VC.
 
+  With CVS, Meta-CVS, and Subversion, VC also uses the native
+mechanism provided by that back end to make snapshots and retrieve them
+(@dfn{tags} for CVS and Meta-CVS, @dfn{copies} for Subversion).
+
 @c worded verbosely to avoid overfull hbox.
   For SCCS, VC implements snapshots itself.  The files it uses contain
 name/file/version-number triples.  These snapshots are visible only
 through VC.
 
-@c ??? What about CVS?
+  There is no support for VC snapshots using GNU Arch yet.
 
   A snapshot is a set of checked-in versions.  So make sure that all the
 files are checked in and not locked when you make a snapshot.
@@ -2479,9 +2505,8 @@
 most recent entry in the change log file.
 (@code{vc-update-change-log}).
 
-This command works with RCS or CVS only, not with SCCS.
-
-@c ??? What about other back ends?
+This command works with RCS or CVS only, not with any of the other
+back ends.
 
 @item C-u C-x v a
 As above, but only find entries for the current buffer's file.
@@ -2620,7 +2645,7 @@
 snapshot thus modified may not completely work (@pxref{Snapshot
 Caveats}).
 
-  Some backends do not provide an explicit rename operation to their
+  Some back ends do not provide an explicit rename operation to their
 repositories.  After issuing @code{vc-rename-file}, use @kbd{C-x v v}
 on the original and renamed buffers and provide the necessary edit
 log.
@@ -2634,22 +2659,26 @@
    Sometimes it is convenient to put version identification strings
 directly into working files.  Certain special strings called
 @dfn{version headers} are replaced in each successive version by the
-number of that version.
-
-@c ??? How does this relate to CVS?
-
-  If you are using RCS, and version headers are present in your working
-files, Emacs can use them to determine the current version and the
-locking state of the files.  This is more reliable than referring to the
-master files, which is done when there are no version headers.  Note
-that in a multi-branch environment, version headers are necessary to
-make VC behave correctly (@pxref{Multi-User Branching}).
-
-  Searching for version headers is controlled by the variable
+number of that version, the name of the user who created it, and other
+relevant information.  All of the back ends that VC supports have such
+a mechanism, except GNU Arch.
+
+  VC does not normally use the information contained in these headers.
+The exception is RCS---with RCS, version headers are sometimes more
+reliable than the master file to determine which version of the file
+you are editing.  Note that in a multi-branch environment, version
+headers are necessary to make VC behave correctly (@pxref{Multi-User
+Branching}).
+
+  Searching for RCS version headers is controlled by the variable
 @code{vc-consult-headers}.  If it is non-@code{nil} (the default),
 Emacs searches for headers to determine the version number you are
 editing.  Setting it to @code{nil} disables this feature.
 
+  Note that although CVS uses the same kind of version headers as RCS
+does, VC never searches for these headers if you are using CVS,
+regardless of the above setting.
+
 @kindex C-x v h
 @findex vc-insert-headers
   You can use the @kbd{C-x v h} command (@code{vc-insert-headers}) to
@@ -2872,23 +2901,25 @@
 intend to change the file.  See the CVS documentation for details on
 using the watch feature.
 
+@vindex vc-stay-local
 @vindex vc-cvs-stay-local
 @cindex remote repositories (CVS)
   When a file's repository is on a remote machine, VC tries to keep
 network interactions to a minimum.  This is controlled by the variable
-@code{vc-cvs-stay-local}.  If it is @code{t} (the default), then VC uses
+@code{vc-cvs-stay-local}.  There is another variable,
+@code{vc-stay-local}, which enables the feature also for other back
+ends that support it, including CVS.  In the following, we will talk
+only about @code{vc-cvs-stay-local}, but everything applies to
+@code{vc-stay-local} as well.
+
+If @code{vc-cvs-stay-local} is @code{t} (the default), then VC uses
 only the entry in the local CVS subdirectory to determine the file's
-state (and possibly information returned by previous CVS commands).  One
-consequence of this is that when you have modified a file, and somebody
-else has already checked in other changes to the file, you are not
-notified of it until you actually try to commit.  (But you can try to
-pick up any recent changes from the repository first, using @kbd{C-x v m
-@key{RET}}, @pxref{Merging}).
-
-@vindex vc-cvs-global-switches
-  The variable @code{vc-cvs-global-switches}, if non-@code{nil},
-should be a string specifying switches to pass to CVS for all CVS
-operations.
+state (and possibly information returned by previous CVS commands).
+One consequence of this is that when you have modified a file, and
+somebody else has already checked in other changes to the file, you
+are not notified of it until you actually try to commit.  (But you can
+try to pick up any recent changes from the repository first, using
+@kbd{C-x v m @key{RET}}, @pxref{Merging}).
 
   When @code{vc-cvs-stay-local} is @code{t}, VC also makes local
 version backups, so that simple diff and revert operations are
@@ -2903,6 +2934,12 @@
 that is matched against the repository host name; VC then stays local
 only for repositories from hosts that match the pattern.
 
+@vindex vc-cvs-global-switches
+  You can specify additional command line options to pass to all CVS
+operations in the variable @code{vc-cvs-global-switches}.  These
+switches are inserted immediately after the @code{cvs} command, before
+the name of the operation to invoke.
+
 @node Directories
 @section File Directories
 
@@ -3037,8 +3074,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/gnus.texi	Tue Mar 21 22:32:30 2006 +0000
+++ b/man/gnus.texi	Wed Mar 22 15:16:06 2006 +0000
@@ -15293,7 +15293,7 @@
 servers have the property that you may backup them using @code{tar} or
 similar, and later be able to restore them into Gnus (by adding the
 proper @code{nnfolder} server) and have all your marks be preserved.
-Marks for a group is usually stored in a file named as the mbox file
+Marks for a group are usually stored in a file named as the mbox file
 with @code{.mrk} concatenated to it (but see
 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder}
 directory.  Individual @code{nnfolder} groups are also possible to
--- a/man/help.texi	Tue Mar 21 22:32:30 2006 +0000
+++ b/man/help.texi	Wed Mar 22 15:16:06 2006 +0000
@@ -482,14 +482,16 @@
 @item Mouse-1
 @itemx Mouse-2
 Follow a cross reference that you click on.
+@item C-c C-c
+Show all documentation about the symbol at point.
 @end table
 
-  When a function name (@pxref{M-x,, Running Commands by Name}) or
-variable name (@pxref{Variables}) appears in the documentation, it
-normally appears inside paired single-quotes.  You can click on the
-name with @kbd{Mouse-1} or @kbd{Mouse-2}, or move point there and type
-@key{RET}, to view the documentation of that command or variable.  Use
-@kbd{C-c C-b} to retrace your steps.
+  When a function name (@pxref{M-x,, Running Commands by Name}),
+variable name (@pxref{Variables}), or face name (@pxref{Faces}) appears
+in the documentation, it normally appears inside paired single-quotes.
+You can click on the name with @kbd{Mouse-1} or @kbd{Mouse-2}, or move
+point there and type @key{RET}, to view the documentation of that
+command, variable or face.  Use @kbd{C-c C-b} to retrace your steps.
 
 @cindex URL, viewing in help
 @cindex help, viewing web pages
@@ -510,6 +512,12 @@
 next cross reference.  Use @kbd{S-@key{TAB}} to move point up to the
 previous cross reference (@code{help-previous-ref}).
 
+To view all documentation about a symbol, whether quoted or not, move
+point over the symbol and type @kbd{C-c C-c}
+(@code{help-follow-symbol}).  This shows all available documentation
+about the symbol as a variable, function or face.  Just like for
+quoted cross references, you can use @kbd{C-c C-b} to retrace your steps.
+
 @node Misc Help
 @section Other Help Commands
 
--- a/man/maintaining.texi	Tue Mar 21 22:32:30 2006 +0000
+++ b/man/maintaining.texi	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/man/makefile.w32-in	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/man/mh-e.texi	Wed Mar 22 15:16:06 2006 +0000
@@ -11,8 +11,8 @@
 @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 , 3rd Edition
-@set UPDATED 2006-03-14
+@set EDITION , 5th Edition
+@set UPDATED 2006-03-19
 @set UPDATE-MONTH March, 2006
 
 @c Other variables.
@@ -22,7 +22,7 @@
 @c Copyright
 @copying
 This is version @value{VERSION}@value{EDITION} of @cite{The MH-E
-Manual}, last updated @value{UPDATED}
+Manual}, last updated @value{UPDATED}.
 
 Copyright @copyright{} 1995,
   2001, 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
@@ -664,30 +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
@@ -697,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}
@@ -780,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
@@ -816,31 +815,37 @@
 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}
@@ -1418,9 +1423,9 @@
 
 @findex display-time
 
-@lisp
+@smalllisp
 (display-time)
-@end lisp
+@end smalllisp
 
 @cindex @command{inc}
 @cindex incorporating
@@ -2297,9 +2302,9 @@
 
 Attachments in MH-E are indicated by @dfn{buttons} like this:
 
-@example
+@smallexample
 [1. image/jpeg; foo.jpg]...
-@end example
+@end smallexample
 
 @findex mh-next-button
 @findex mh-press-button
@@ -2488,9 +2493,9 @@
 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}.
@@ -3492,8 +3497,7 @@
 (@code{mh-execute-commands}). Many MH-E commands that may affect the
 numbering of the messages (such as @kbd{F r} or @kbd{F p}) will ask if
 you want to process refiles or deletes first and then either run
-@kbd{x} for you or undo the pending refiles and deletes, which are
-lost.
+@kbd{x} for you or undo the pending refiles and deletes.
 
 @kindex x
 @vindex mh-after-commands-processed-hook
@@ -3547,12 +3551,13 @@
 @kindex t
 @vindex mh-recenter-summary-flag
 
-When you use @kbd{t} to toggle between show mode and scan mode, the
-MH-Show buffer is hidden and the MH-Folder buffer is left alone.
-Setting @code{mh-recenter-summary-flag} to a non-@code{nil} value
-causes the toggle to display as many scan lines as possible, with the
-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.
+When you use @kbd{t} to toggle from MH-Folder Show mode to MH-Folder
+mode, the MH-Show buffer is hidden and the MH-Folder buffer is left
+alone. Setting @code{mh-recenter-summary-flag} to a non-@code{nil}
+value causes the toggle to display as many scan lines as possible,
+with the 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
@@ -3578,8 +3583,6 @@
 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 sequence, @samp{unseen}
 @cindex Unix commands, @command{procmail}
@@ -3588,14 +3591,14 @@
 @kindex F n
 @vindex mh-new-messages-folders
 
-If you use a program such as @command{procmail} to use
-@command{rcvstore} to file your incoming mail automatically, you can
-display new, unseen, messages using the command @kbd{F n}
-(@code{mh-index-new-messages}). All messages in the @samp{unseen}
-sequence from the folders in @code{mh-new-messages-folders} are
-listed. However, this list of folders can be overridden with a prefix
-argument: with a prefix argument, enter a space-separated list of
-folders, or nothing to search all folders.
+If you use a program such as @command{procmail} to file your incoming
+mail automatically, you can display new, unseen, messages using the
+command @kbd{F n} (@code{mh-index-new-messages}). All messages in the
+@samp{unseen} sequence from the folders in
+@code{mh-new-messages-folders} are listed. However, this list of
+folders can be overridden with a prefix argument: with a prefix
+argument, enter a space-separated list of folders, or nothing to
+search all folders.
 
 @cindex @samp{tick} sequence
 @cindex sequence, @samp{tick}
@@ -3682,7 +3685,7 @@
 
 @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
@@ -3774,9 +3777,9 @@
 
 @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
@@ -4050,31 +4053,47 @@
 When you reply to a message, you are first prompted with @samp{Reply
 to whom?}. You have several choices here.
 
-@smallexample
-@group
-@b{Response}     @b{Reply Goes To}
-
-@kbd{from}         @r{The person who sent the message.  This is the default,}
-             @r{so @key{RET} is sufficient.}
-
-@kbd{to}           @r{Replies to the sender, plus all recipients in the}
-             @r{@samp{To:} header field.}
-
-@kbd{all}
-@kbd{cc}           @r{Forms a reply to the sender, plus all recipients.}
-@end group
-@end smallexample
+@quotation
+@multitable @columnfractions .20 .80
+@c @headitem Response @tab Reply Goes To
+@c XXX @headitem not yet supported by SourceForge's texi2pdf.
+@item @b{Response} @tab @b{Reply Goes To}
+@c -------------------------
+@item @kbd{from}
+@tab
+The person who sent the message. This is the default, so @key{RET} is
+sufficient.
+@c -------------------------
+@item @kbd{to}
+@tab
+Replies to the sender, plus all recipients in the @samp{To:} header field.
+@c -------------------------
+@item @kbd{cc}@*@kbd{all}
+@tab
+Forms a reply to the addresses in the @samp{Mail-Followup-To:} header
+field if one exists; otherwise forms a reply to the sender, plus all
+recipients.
+@end multitable
+@end quotation
 
 @cindex @command{repl}
 @cindex MH commands, @command{repl}
+@vindex mh-reply-default-reply-to
 
 Depending on your answer, @command{repl}@footnote{See the section
 @uref{@value{MH-BOOK-HOME}/reprep.htm, Replying to Messages: repl} in
 the MH book.} is given a different argument to form your reply.
 Specifically, a choice of @kbd{from} or none at all runs @samp{repl
 -nocc all}, and a choice of @kbd{to} runs @samp{repl -cc to}. Finally,
-either @kbd{cc} or @kbd{all} runs @samp{repl -cc all -nocc me}.
-
+either @kbd{cc} or @kbd{all} runs @samp{repl -cc all -nocc me}. If you
+find that most of the time you specify one of these choices when you
+reply to a message, you can change the option
+@code{mh-reply-default-reply-to} from its default value of
+@samp{Prompt} to one of the choices listed above. You can always edit
+the recipients in the draft.
+
+@cindex @samp{repl:} MH profile component
+@cindex MH profile component, @samp{repl:}
 @cindex MH-Letter mode
 @cindex MH-Show mode
 @cindex draft
@@ -4083,7 +4102,10 @@
 
 Two windows are then created. One window contains the message to which
 you are replying in an MH-Show buffer. Your draft, in MH-Letter mode
-(@pxref{Editing Drafts}), is in the other window.
+(@pxref{Editing Drafts}), is in the other window. If the reply draft
+was not one that you expected, check the things that affect the
+behavior of @command{repl} which include the @samp{repl:} profile
+component and the @file{replcomps} and @file{replgroupcomps} files.
 
 If you supply a prefix argument (as in @kbd{C-u r}), the message you
 are replying to is inserted in your reply after having first been run
@@ -4110,15 +4132,6 @@
 If you wish to customize the header or other parts of the reply draft,
 please see @command{repl}(1) and @code{mh-format}(5).
 
-@vindex mh-reply-default-reply-to
-
-The @code{mh-reply-default-reply-to} option is set to @samp{Prompt} by
-default so that you are prompted for the recipient of a reply. If you
-find that most of the time that you specify @kbd{cc} when you reply to
-a message, set this option to @samp{cc}. Other choices include
-@samp{from}, @samp{to}, or @samp{all}. You can always edit the
-recipients in the draft.
-
 @node Forwarding, Redistributing, Replying, Sending Mail
 @section Forwarding Mail
 
@@ -4781,23 +4794,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
@@ -4812,7 +4825,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.
 
@@ -4820,7 +4833,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
@@ -4839,7 +4852,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:
 
@@ -4847,7 +4860,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
 
@@ -5318,7 +5331,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
@@ -5328,7 +5341,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
@@ -5355,6 +5368,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="=-=-="
 --------
@@ -5369,8 +5383,8 @@
 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
@@ -5447,25 +5461,25 @@
 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
@@ -5703,10 +5717,10 @@
 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;
@@ -5767,9 +5781,9 @@
 
 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
 
@@ -5839,7 +5853,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>
@@ -5851,7 +5866,8 @@
 ; 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
@@ -6566,23 +6582,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}
@@ -8280,9 +8296,9 @@
 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
@@ -8298,9 +8314,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
@@ -8310,18 +8326,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
@@ -8330,20 +8346,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.
@@ -8439,9 +8455,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}.
@@ -8489,14 +8505,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
--- a/man/org.texi	Tue Mar 21 22:32:30 2006 +0000
+++ b/man/org.texi	Wed Mar 22 15:16:06 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 21 22:32:30 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 21 22:32:30 2006 +0000
+++ b/man/programs.texi	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/man/sending.texi	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/man/text.texi	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/nt/INSTALL	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/src/ChangeLog	Wed Mar 22 15:16:06 2006 +0000
@@ -1,3 +1,141 @@
+2006-03-21  Ken Raeburn  <raeburn@raeburn.org>
+
+	* xdisp.c (store_next_glyph): Renamed from append_glyph.
+	(generate_stretch_glyph): Renamed from produce_stretch_glyph.
+	All callers changed accordingly.
+
+2006-03-21  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
+
+	* xterm.c: x_session_initialized new variable.
+	(x_term_init): Use x_session_initialized to check if
+	x_session_initialize should be called.
+	(x_initialize): Initialize x_session_initialized.
+
+2006-03-21  Kim F. Storm  <storm@cua.dk>
+
+	* fringe.c (draw_fringe_bitmap): Don't calculate default overlay arrow
+	bitmap here, but ...
+	(update_window_fringes): ... here, so we can test if it has changed.
+
+2006-03-20  Andreas Schwab  <schwab@suse.de>
+
+	* dispnew.c (init_display): Check DISPLAY here.
+
+	* emacs.c (main): Don't check here.
+
+	* xterm.c (x_display_ok): Don't use DISPLAY env var.
+
+2006-03-20  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* window.c (window_scroll_pixel_based): Yet another int/Lisp_Object
+	mixup (YAILOM).
+
+2006-03-20  Eli Zaretskii  <eliz@gnu.org>
+
+	* emacs.c (main): Fix last change.
+
+2006-03-20  Kenichi Handa  <handa@m17n.org>
+
+	* fileio.c (Fwrite_region): Set visit_file to Qnil before GCPRO it.
+
+	* keymap.c (map_keymap): Set tail to Qnil before GCPRO it.
+
+	* xfns.c (xg_set_icon): Remove unnecessary GCPRO.
+
+	* xterm.c (x_term_init): Remove unnecessary GCPRO.
+
+2006-03-19  Kim F. Storm  <storm@cua.dk>
+
+	* xdisp.c (set_cursor_from_row): Fix cursor property on overlay	string,
+	so it doesn't associate overlay string with following glyph by default.
+	Allow integer property value to specify explicit number of buffer
+	positions associate with overlay string.
+
+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.
@@ -5,7 +143,7 @@
 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.
@@ -15,7 +153,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>
 
@@ -68,8 +206,7 @@
 
 2006-03-11  David Ponce  <david@dponce.com>
 
-	* xfns.c (x_create_tip_frame): Preserve received parms by copying
-	them.
+	* xfns.c (x_create_tip_frame): Preserve received parms by copying them.
 
 2006-03-11  Eli Zaretskii  <eliz@gnu.org>
 
@@ -90,14 +227,14 @@
 	* keymap.c (describe_map): Shorten string to indicate shadowed binding.
 
 	* vm-limit.c (get_lim_data, lim_data, data_space_start):
-	Moved from mem-limits.h.
+	Move from mem-limits.h.
 	(enum warnlevel): New data type.
 	(check_memory_limits): Rewrite the logic about warnings.
 	Use standard `struct rlimit'.  Check return values for nonsense.
 	(memory_warnings): Always clear lim_data.
 
 	* mem-limits.h (get_lim_data, lim_data, data_space_start):
-	Moved to vm-limit.c.
+	Move to vm-limit.c.
 
 	* xterm.c (x_fully_uncatch_errors, x_catching_errors): New functions.
 
@@ -193,7 +330,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.
@@ -227,9 +364,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)
@@ -357,7 +494,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.
@@ -426,7 +563,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 21 22:32:30 2006 +0000
+++ b/src/dispextern.h	Wed Mar 22 15:16:06 2006 +0000
@@ -2722,6 +2722,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/dispnew.c	Tue Mar 21 22:32:30 2006 +0000
+++ b/src/dispnew.c	Wed Mar 22 15:16:06 2006 +0000
@@ -6705,6 +6705,13 @@
 #endif
 
       display_arg = (display != 0 && *display != 0);
+
+      if (display_arg && !x_display_ok (display))
+	{
+	  fprintf (stderr, "Display %s unavailable, simulating -nw\n",
+		   display);
+	  inhibit_window_system = 1;
+	}
     }
 
   if (!inhibit_window_system && display_arg
--- a/src/fileio.c	Tue Mar 21 22:32:30 2006 +0000
+++ b/src/fileio.c	Wed Mar 22 15:16:06 2006 +0000
@@ -5011,6 +5011,7 @@
   if (!NILP (start) && !STRINGP (start))
     validate_region (&start, &end);
 
+  visit_file = Qnil;
   GCPRO5 (start, filename, visit, visit_file, lockname);
 
   filename = Fexpand_file_name (filename, Qnil);
--- a/src/fringe.c	Tue Mar 21 22:32:30 2006 +0000
+++ b/src/fringe.c	Wed Mar 22 15:16:06 2006 +0000
@@ -867,10 +867,7 @@
   draw_fringe_bitmap_1 (w, row, left_p, overlay, NO_FRINGE_BITMAP);
 
   if (left_p && row->overlay_arrow_bitmap != NO_FRINGE_BITMAP)
-    draw_fringe_bitmap_1 (w, row, 1, 1,
-			  (row->overlay_arrow_bitmap < 0
-			   ? get_logical_fringe_bitmap (w, Qoverlay_arrow, 0, 0)
-			   : row->overlay_arrow_bitmap));
+    draw_fringe_bitmap_1 (w, row, 1, 1, row->overlay_arrow_bitmap);
 }
 
 
@@ -1152,6 +1149,9 @@
 	    }
 	}
 
+      if (row->overlay_arrow_bitmap < 0)
+	row->overlay_arrow_bitmap = get_logical_fringe_bitmap (w, Qoverlay_arrow, 0, 0);
+
       if (row->overlay_arrow_bitmap != cur->overlay_arrow_bitmap)
 	{
 	  redraw_p = row->redraw_fringe_bitmaps_p = cur->redraw_fringe_bitmaps_p = 1;
@@ -1695,10 +1695,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;
 
@@ -1711,7 +1715,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 21 22:32:30 2006 +0000
+++ b/src/image.c	Wed Mar 22 15:16:06 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/keymap.c	Tue Mar 21 22:32:30 2006 +0000
+++ b/src/keymap.c	Wed Mar 22 15:16:06 2006 +0000
@@ -692,6 +692,7 @@
   struct gcpro gcpro1, gcpro2, gcpro3;
   Lisp_Object tail;
 
+  tail = Qnil;
   GCPRO3 (map, args, tail);
   map = get_keymap (map, 1, autoload);
   for (tail = (CONSP (map) && EQ (Qkeymap, XCAR (map))) ? XCDR (map) : map;
--- a/src/m/mips.h	Tue Mar 21 22:32:30 2006 +0000
+++ b/src/m/mips.h	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/src/m/pmax.h	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/src/macterm.c	Wed Mar 22 15:16:06 2006 +0000
@@ -281,6 +281,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;
@@ -509,6 +514,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;
@@ -524,9 +567,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));
@@ -552,6 +592,7 @@
 
   RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f)));
 }
+#endif	/* !USE_CG_DRAWING */
 
 
 /* Mac replacement for XCreateBitmapFromBitmapData.  */
@@ -612,7 +653,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;
@@ -1295,6 +1344,7 @@
 #endif
 
 
+#if !USE_CG_DRAWING
 /* Mac replacement for XCopyArea: dest must be window.  */
 
 static void
@@ -1308,9 +1358,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);
@@ -1355,9 +1402,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);
@@ -1390,6 +1434,7 @@
 
   RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f)));
 }
+#endif	/* !USE_CG_DRAWING */
 
 
 /* Mac replacement for XCopyArea: used only for scrolling.  */
@@ -2001,9 +2046,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);
@@ -2012,14 +2060,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
@@ -3191,15 +3289,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
@@ -10892,8 +11001,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,
@@ -10970,6 +11084,11 @@
     MakeMeTheFrontProcess ();
 #endif
 #endif
+
+#if USE_CG_DRAWING
+  mac_init_fringe ();
+#endif
+
   UNBLOCK_INPUT;
 }
 
--- a/src/sheap.c	Tue Mar 21 22:32:30 2006 +0000
+++ b/src/sheap.c	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/src/unexelf.c	Wed Mar 22 15:16:06 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 21 22:32:30 2006 +0000
+++ b/src/w32fns.c	Wed Mar 22 15:16:06 2006 +0000
@@ -7937,8 +7937,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/window.c	Tue Mar 21 22:32:30 2006 +0000
+++ b/src/window.c	Wed Mar 22 15:16:06 2006 +0000
@@ -4798,8 +4798,8 @@
 	 possibility of point becoming "stuck" on a tall line when
 	 scrolling by one line.  */
       if (window_scroll_pixel_based_preserve_y < 0
-	  || (current_kboard->Vlast_command != Qscroll_up
-	      && current_kboard->Vlast_command != Qscroll_down))
+	  || (!EQ (current_kboard->Vlast_command, Qscroll_up)
+	      && !EQ (current_kboard->Vlast_command, Qscroll_down)))
 	{
 	  start_display (&it, w, start);
 	  move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
--- a/src/xdisp.c	Tue Mar 21 22:32:30 2006 +0000
+++ b/src/xdisp.c	Wed Mar 22 15:16:06 2006 +0000
@@ -9443,7 +9443,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)
@@ -9467,7 +9472,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;
@@ -9565,11 +9575,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);
 }
@@ -9645,11 +9656,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.  */
 
@@ -11607,7 +11614,7 @@
 	  x += glyph->pixel_width;
 	  ++glyph;
 	  if (cursor_from_overlay_pos
-	      && last_pos > cursor_from_overlay_pos)
+	      && last_pos >= cursor_from_overlay_pos)
 	    {
 	      cursor_from_overlay_pos = 0;
 	      cursor = 0;
@@ -11621,10 +11628,12 @@
 	  /* Skip all glyphs from string.  */
 	  do
 	    {
+	      Lisp_Object cprop;
 	      int pos;
 	      if ((cursor == NULL || glyph > cursor)
-		  && !NILP (Fget_char_property (make_number ((glyph)->charpos),
-						Qcursor, (glyph)->object))
+		  && (cprop = Fget_char_property (make_number ((glyph)->charpos),
+						  Qcursor, (glyph)->object),
+		      !NILP (cprop))
 		  && (pos = string_buffer_position (w, glyph->object,
 						    string_before_pos),
 		      (pos == 0	  /* From overlay */
@@ -11635,14 +11644,15 @@
 		     Add 1 to last_pos so that if point corresponds to the
 		     glyph right after the overlay, we still use a 'cursor'
 		     property found in that overlay.  */
-		  cursor_from_overlay_pos = pos == 0 ? last_pos+1 : 0;
+		  cursor_from_overlay_pos = (pos ? 0 : last_pos
+					     + (INTEGERP (cprop) ? XINT (cprop) : 0));
 		  cursor = glyph;
 		  cursor_x = x;
 		}
 	      x += glyph->pixel_width;
 	      ++glyph;
 	    }
-	  while (glyph < end && STRINGP (glyph->object));
+	  while (glyph < end && EQ (glyph->object, string_start->object));
 	}
     }
 
@@ -15373,6 +15383,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)
@@ -19390,7 +19401,7 @@
    Called from x_produce_glyphs when IT->glyph_row is non-null.  */
 
 static INLINE void
-append_glyph (it)
+store_next_glyph (it)
      struct it *it;
 {
   struct glyph *glyph;
@@ -19714,7 +19725,7 @@
    ASCENT must be in the range 0 <= ASCENT <= 100.  */
 
 static void
-produce_stretch_glyph (it)
+generate_stretch_glyph (it)
      struct it *it;
 {
   /* (space :width WIDTH :height HEIGHT ...)  */
@@ -20140,7 +20151,7 @@
 					it->ascent + it->descent, ascent);
 		}
 	      else
-		append_glyph (it);
+		store_next_glyph (it);
 
 	      /* If characters with lbearing or rbearing are displayed
 		 in this line, record that fact in a flag of the
@@ -20322,7 +20333,7 @@
 	  take_vertical_position_into_account (it);
 
 	  if (it->glyph_row)
-	    append_glyph (it);
+	    store_next_glyph (it);
 	}
       it->multibyte_p = saved_multibyte_p;
     }
@@ -20602,7 +20613,7 @@
   else if (it->what == IT_IMAGE)
     produce_image_glyph (it);
   else if (it->what == IT_STRETCH)
-    produce_stretch_glyph (it);
+    generate_stretch_glyph (it);
 
   /* Accumulate dimensions.  Note: can't assume that it->descent > 0
      because this isn't true for images with `:ascent 100'.  */
--- a/src/xfns.c	Tue Mar 21 22:32:30 2006 +0000
+++ b/src/xfns.c	Wed Mar 22 15:16:06 2006 +0000
@@ -799,12 +799,9 @@
     FRAME_PTR f;
     Lisp_Object file;
 {
-  struct gcpro gcpro1;
   int result = 0;
   Lisp_Object found;
 
-  GCPRO1 (found);
-
   found = x_find_image_file (file);
 
   if (! NILP (found))
--- a/src/xterm.c	Tue Mar 21 22:32:30 2006 +0000
+++ b/src/xterm.c	Wed Mar 22 15:16:06 2006 +0000
@@ -10074,6 +10074,10 @@
 
 static int x_initialized;
 
+#ifdef HAVE_X_SM
+static int x_session_initialized;
+#endif
+
 #ifdef MULTI_KBOARD
 /* Test whether two display-name strings agree up to the dot that separates
    the screen number from the server number.  */
@@ -10151,6 +10155,21 @@
   *bits = nr;
 }
 
+int
+x_display_ok (display)
+    const char * display;
+{
+    int dpy_ok = 1;
+    Display *dpy;
+
+    dpy = XOpenDisplay (display);
+    if (dpy)
+      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;
@@ -10233,11 +10252,9 @@
 
         /* Load our own gtkrc if it exists.  */
         {
-          struct gcpro gcpro1, gcpro2;
           char *file = "~/.emacs.d/gtkrc";
           Lisp_Object s, abs_file;
 
-          GCPRO2 (s, abs_file);
           s = make_string (file, strlen (file));
           abs_file = Fexpand_file_name (s, Qnil);
 
@@ -10899,6 +10916,9 @@
   last_tool_bar_item = -1;
   any_help_event_p = 0;
   ignore_next_mouse_click_timeout = 0;
+#ifdef HAVE_X_SM
+  x_session_initialized = 0;
+#endif
 
 #ifdef USE_GTK
   current_count = -1;
--- a/src/xterm.h	Tue Mar 21 22:32:30 2006 +0000
+++ b/src/xterm.h	Wed Mar 22 15:16:06 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 *));