changeset 90103:3ebd9bdb4fe5

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-13 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-83 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-89 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-90 Update from CVS: man/calc.texi: Add macro for LaTeX for info output. * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-91 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-94 Update from CVS
author Miles Bader <miles@gnu.org>
date Sun, 13 Feb 2005 07:19:08 +0000
parents 9b4f359c4117 (current diff) 681d4e4ca613 (diff)
children a01e7a9f1659
files ChangeLog admin/FOR-RELEASE admin/make-tarball.txt etc/ChangeLog etc/DEBUG etc/MACHINES etc/MH-E-NEWS etc/NEWS etc/PROBLEMS etc/TUTORIAL lisp/ChangeLog lisp/ChangeLog.10 lisp/add-log.el lisp/allout.el lisp/apropos.el lisp/autorevert.el lisp/calc/calc-lang.el lisp/calc/calc-prog.el lisp/calc/calccomp.el lisp/calendar/appt.el lisp/calendar/diary-lib.el lisp/comint.el lisp/cus-edit.el lisp/cus-start.el lisp/custom.el lisp/dabbrev.el lisp/descr-text.el lisp/desktop.el lisp/dired.el lisp/emacs-lisp/bytecomp.el lisp/emacs-lisp/derived.el lisp/emacs-lisp/find-func.el lisp/emacs-lisp/lisp.el lisp/emacs-lisp/timer.el lisp/emacs-lisp/warnings.el lisp/emulation/cua-base.el lisp/emulation/cua-rect.el lisp/emulation/keypad.el lisp/faces.el lisp/files.el lisp/filesets.el lisp/find-dired.el lisp/font-core.el lisp/frame.el lisp/fringe.el lisp/gnus/ChangeLog lisp/gnus/binhex.el lisp/gnus/flow-fill.el lisp/gnus/gnus-agent.el lisp/gnus/gnus-art.el lisp/gnus/gnus-cite.el lisp/gnus/gnus-group.el lisp/gnus/gnus-int.el lisp/gnus/gnus-msg.el lisp/gnus/gnus-score.el lisp/gnus/gnus-spec.el lisp/gnus/gnus-srvr.el lisp/gnus/gnus-start.el lisp/gnus/gnus-sum.el lisp/gnus/gnus-util.el lisp/gnus/gnus-win.el lisp/gnus/gnus.el lisp/gnus/imap.el lisp/gnus/mail-source.el lisp/gnus/message.el lisp/gnus/mm-decode.el lisp/gnus/mm-uu.el lisp/gnus/mml.el lisp/gnus/nnimap.el lisp/gnus/nnmail.el lisp/gnus/pop3.el lisp/gnus/starttls.el lisp/gnus/utf7.el lisp/gnus/uudecode.el lisp/help-at-pt.el lisp/help.el lisp/hl-line.el lisp/ibuffer.el lisp/ido.el lisp/ielm.el lisp/imenu.el lisp/info.el lisp/international/latin1-disp.el lisp/international/mule-util.el lisp/international/mule.el lisp/kmacro.el lisp/ldefs-boot.el lisp/locate.el lisp/log-edit.el lisp/mail/footnote.el lisp/mail/mail-extr.el lisp/mail/rmail.el lisp/mail/sendmail.el lisp/mail/smtpmail.el lisp/mouse.el lisp/net/ange-ftp.el lisp/net/ldap.el lisp/net/tls.el lisp/net/tramp-smb.el lisp/net/tramp-util.el lisp/net/tramp-vc.el lisp/net/tramp.el lisp/novice.el lisp/progmodes/asm-mode.el lisp/progmodes/cfengine.el lisp/progmodes/compile.el lisp/progmodes/fortran.el lisp/progmodes/gdb-ui.el lisp/progmodes/grep.el lisp/progmodes/python.el lisp/progmodes/sql.el lisp/recentf.el lisp/replace.el lisp/ruler-mode.el lisp/server.el lisp/simple.el lisp/speedbar.el lisp/startup.el lisp/subr.el lisp/textmodes/sgml-mode.el lisp/textmodes/table.el lisp/textmodes/tex-mode.el lisp/thumbs.el lisp/time.el lisp/vc-cvs.el lisp/vc-hooks.el lisp/vc-mcvs.el lisp/vc-svn.el lisp/vc.el lisp/w32-vars.el lisp/x-dnd.el lispref/ChangeLog lispref/modes.texi lispref/objects.texi lispref/positions.texi lispref/processes.texi lispref/strings.texi lispref/text.texi man/ChangeLog man/abbrevs.texi man/basic.texi man/calc.texi man/cc-mode.texi man/cmdargs.texi man/custom.texi man/emacs.texi man/entering.texi man/faq.texi man/killing.texi man/regs.texi man/texinfo.tex man/tramp.texi src/ChangeLog src/eval.c src/keyboard.c src/undo.c src/xdisp.c src/xfns.c src/xselect.c
diffstat 182 files changed, 2819 insertions(+), 1784 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Feb 13 00:40:20 2005 +0000
+++ b/ChangeLog	Sun Feb 13 07:19:08 2005 +0000
@@ -1,3 +1,8 @@
+2005-02-09  Kim F. Storm  <storm@cua.dk>
+
+	Change release version from 21.4 to 22.1 throughout.
+	Change development version from 21.3.50 to 22.0.50.
+
 2005-01-19  Steven Tamm  <steventamm@mac.com>
 
 	* configure.in: Check for <sys/utsname.h>.
--- a/README	Sun Feb 13 00:40:20 2005 +0000
+++ b/README	Sun Feb 13 07:19:08 2005 +0000
@@ -1,4 +1,4 @@
-This directory tree holds version 21.3.50 of GNU Emacs, the extensible,
+This directory tree holds version 22.0.50 of GNU Emacs, the extensible,
 customizable, self-documenting real-time display editor.
 
 You may encounter bugs in this release.  If you do, please report
--- a/admin/FOR-RELEASE	Sun Feb 13 00:40:20 2005 +0000
+++ b/admin/FOR-RELEASE	Sun Feb 13 07:19:08 2005 +0000
@@ -65,6 +65,41 @@
 I think in the near future we will see more of this problem, so it might be
 time to make anfe-ftp more intelligent.
 
+** pcvs bug:
+
+In a CVS mode buffer created using the `cvs-examine' command, if I
+commit a file in a subdirectory, after committing the line is not
+updated with the version of the new revision.  Instead, a line is added
+in the buffer in the top directory listing.
+
+Example: I start with this:
+
+,----
+| In directory .:
+|               Unknown                 .htaccess
+|               Unknown                 404.php
+|               Unknown                 rain.jpg
+| In directory include:
+|               Modified                include/foo.include
+`----
+
+I commit the file include/foo.include using `c' on the corresponding
+line.  I get:
+
+,----
+| In directory .:
+|               Unknown                 .htaccess
+|               Unknown                 404.php
+| committed     Up-To-Date  1.13        foo.include
+|               Unknown                 rain.jpg
+| In directory include:
+|               Modified                include/foo.include
+`----
+
+There is no file named foo.include in the top directory. This bug
+appeared sometime before October 2004 and now.
+
+
 
 * GTK RELATED BUGS
 
@@ -178,26 +213,26 @@
 
 SECTION             READERS
 -----------------------------
-man/abbrevs.texi
+man/abbrevs.texi    Chong Yidong
 man/anti.texi
-man/basic.texi      "Luc Teirlinck"
+man/basic.texi      "Luc Teirlinck"  Chong Yidong
 man/buffers.texi    "Luc Teirlinck"  Chong Yidong
 man/building.texi   "Ted Zlatanov" <tzz@lifelogs.com>
 man/calendar.texi    Joakim Verona <joakim@verona.se>
-man/cmdargs.texi
+man/cmdargs.texi    Chong Yidong
 man/commands.texi   "Luc Teirlinck"
-man/custom.texi
+man/custom.texi     Chong Yidong
 man/dired.texi
 man/display.texi    "Luc Teirlinck"
 man/emacs.texi      "Luc Teirlinck"
-man/entering.texi   "Luc Teirlinck"
+man/entering.texi   "Luc Teirlinck"  Chong Yidong
 man/files.texi      "Luc Teirlinck"  Chong Yidong
 man/fixit.texi      "Luc Teirlinck"
 man/frames.texi     "Luc Teirlinck"  Chong Yidong
 man/glossary.texi
 man/help.texi       "Luc Teirlinck"
 man/indent.texi     "Luc Teirlinck"
-man/killing.texi    "Luc Teirlinck"
+man/killing.texi    "Luc Teirlinck"  Chong Yidong
 man/kmacro.texi     "Luc Teirlinck"
 man/macos.texi
 man/maintaining.texi
@@ -210,7 +245,7 @@
 man/m-x.texi        "Luc Teirlinck"
 man/picture.texi    Joakim Verona <joakim@verona.se>
 man/programs.texi   "Stephen Eglen"
-man/regs.texi       "Luc Teirlinck"
+man/regs.texi       "Luc Teirlinck"   Chong Yidong
 man/rmail.texi
 man/screen.texi     "Luc Teirlinck"
 man/search.texi     "Luc Teirlinck"
@@ -261,17 +296,17 @@
 lispref/maps.texi
 lispref/markers.texi     "Luc Teirlinck"
 lispref/minibuf.texi     "Luc Teirlinck"
-lispref/modes.texi
+lispref/modes.texi	 Chong Yidong
 lispref/nonascii.texi    "Luc Teirlinck"
 lispref/numbers.texi	 "Luc Teirlinck"
 lispref/objects.texi	 "Luc Teirlinck"
 lispref/os.texi		 "Luc Teirlinck"
-lispref/positions.texi	 "Luc Teirlinck"
+lispref/positions.texi	 "Luc Teirlinck"   Chong Yidong
 lispref/processes.texi
 lispref/searching.texi	 "Luc Teirlinck"
 lispref/sequences.texi	 "Luc Teirlinck"
 lispref/streams.texi	 "Luc Teirlinck"
-lispref/strings.texi	 "Luc Teirlinck"
+lispref/strings.texi	 "Luc Teirlinck"   Chong Yidong
 lispref/symbols.texi	 "Luc Teirlinck"
 lispref/syntax.texi	 "Luc Teirlinck"
 lispref/text.texi        Chong Yidong
--- a/admin/make-tarball.txt	Sun Feb 13 00:40:20 2005 +0000
+++ b/admin/make-tarball.txt	Sun Feb 13 07:19:08 2005 +0000
@@ -4,7 +4,7 @@
 
 For each step, check for possible errors.
 
-1.  cvs -q update -Pd
+1.   cvs -q update -Pd
 
 2.  Bootstrap to make 100% sure all elc files are up-to-date, and to
     make sure that the later tagged version will bootstrap, should it be
@@ -19,51 +19,52 @@
     M-x set-version RET).  For a release, add released change log
     entries (M-x add-release-logs RET).
 
-5.  rm configure; make bootstrap
+5.   rm configure; make bootstrap
 
 6.  Commit configure, README, AUTHORS, lisp/loaddefs.el,
     lisp/cus-load.el, lisp/finder-inf.el, lisp/version.el,
     man/emacs.texi.  For a release, also commit the ChangeLog files in
     all directories.
 
-7.  make-dist --snapshot.  Check the contents of the new tar with
-    admin/diff-tar-files against an older tar file.  Some old pretest
+7.   make-dist --snapshot.  Check the contents of the new tar with
+     admin/diff-tar-files against an older tar file.  Some old pretest
     tarballs are kept under fencepost.gnu.org:~pot/emacs-pretest/, while
     old emacs tarballs are at <ftp://ftp.gnu.org/pub/gnu/emacs/>.
 
-8.  xdelta delta emacs-OLD.tar.gz emacs-NEW.tar.gz emacs-OLD-NEW.xdelta
+8.   xdelta delta emacs-OLD.tar.gz emacs-NEW.tar.gz emacs-OLD-NEW.xdelta
 
-9.  tar -zxf emacs-NEW.tar.gz; cd emacs-NEW
-    configure && make && make -n install
+9.   tar -zxf emacs-NEW.tar.gz; cd emacs-NEW
+     configure && make && make -n install
     Use `script' or M-x compile to save the compilation log in
     compile-NEW.log and compare it against an old one.  The easiest way
     to do that is to visit the old log in Emacs, change the version
     number of the old Emacs to __, do the same with the new log and do
     M-x ediff. Especially check that Info files aren't built.
 
-10. cd EMACS_ROOT_DIR; cvs tag TAG
+10.  cd EMACS_ROOT_DIR; cvs tag TAG
     TAG is EMACS_PRETEST_XX_YY_ZZZ for a pretest, EMACS_XX_YY for a
     release.
 
-11. admin/make-announcement OLD NEW
+11.  admin/make-announcement OLD NEW
     This creates an announcement for pretests.  OLD is the version used
-    to make deltas with respect to NEW.  Anouncements for pretests need
-    to be crafted by hand.  Use an older announcement to start with.
+    to make deltas with respect to NEW.  Announcements for releases need
+    to be crafted by hand.  Use an older announcement to start with:
+    look in ssh://fencepost.gnu.org/~pot/emacs-tarballs/.
 
-12. For the moment, put the tarballs on a public site and send a GPG
-    signed email to <maintainers@gnu.org> with the URLs of the tarballs
-    and their md5sum signatures.  As of 2003-10, the GNU maintainers are
-    working on a better procedure.  For reference, here are the previous
-    instructions, which are no more valid after the break-in of 2003-08:
-     ====
-    For a pretest, do:
-    rsync -aP emacs-NEW.tar.gz emacs-OLD-NEW.xdelta compile-NEW.log \
-    emacs-NEW.announce alpha.gnu.org:/home/alpha/gnu/emacs/pretest/.
-    For a release, do:
-    rsync -aP emacs-NEW.tar.gz emacs-OLD-NEW.xdelta \
-    alpha.gnu.org:/home/ftp/gnu/emacs/.
+12. Now you should upload the files to the GNU ftp server.  In order to
+    do that, you must be registered as an Emacs maintainer and have your
+    GPG key acknowledged by the ftp people.  Mail <ftp-upload@gnu.org>
+    for instructions.  Once you are there, for each file FILE to be
+    released, create a detached GPG binary signature and a clearsigned
+    directive file like this:
+     gpg -b FILE
+     echo directory: emacs/pretest > FILE.directive      (for a pretest)
+     echo directory: emacs > FILE.directive              (for a release)
+     gpg --clearsign FILE.directive
+    Upload by anonymous ftp to ftp://ftp-upload.gnu.org/incoming/ftp/
+    the files FILE, FILE.sig, FILE.directive.asc
 
-13. Verify that the files are visible at
+13. After five minutes, verify that the files are visible at
     ftp://alpha.gnu.org/gnu/emacs/pretest/ for a pretest, at
     ftp://ftp.gnu.org/gnu/emacs/ for a release.
 
--- a/etc/ChangeLog	Sun Feb 13 00:40:20 2005 +0000
+++ b/etc/ChangeLog	Sun Feb 13 07:19:08 2005 +0000
@@ -1,3 +1,14 @@
+2005-02-08  Lute Kamstra  <lute@gnu.org>
+
+	* TUTORIAL: Remove some uses of the term "buffer" before it is
+	properly introduced.  Update the description of the mode line.
+	Consistently use "<ESC>" to denote the ESC key and "<SPC>" to
+	denote the Space bar.  Capitalize all command descriptions.
+
+2005-02-06  Richard M. Stallman  <rms@gnu.org>
+
+	* DEBUG: Minor clarification.
+
 2005-02-05  Frederik Fouvry  <fouvry@CoLi.Uni-SB.DE>
 
 	* emacs.bash: Update the name of the socket of the Emacs server.
--- a/etc/DEBUG	Sun Feb 13 00:40:20 2005 +0000
+++ b/etc/DEBUG	Sun Feb 13 07:19:08 2005 +0000
@@ -17,8 +17,8 @@
 document.]
 
 ** When you debug Emacs with GDB, you should start it in the directory
-where you built Emacs.  That directory has a .gdbinit file that defines
-various "user-defined" commands for debugging Emacs.
+where the executable was made.  That directory has a .gdbinit file
+that defines various "user-defined" commands for debugging Emacs.
 
 ** It is a good idea to run Emacs under GDB (or some other suitable
 debugger) *all the time*.  Then, when Emacs crashes, you will be able
--- a/etc/MACHINES	Sun Feb 13 00:40:20 2005 +0000
+++ b/etc/MACHINES	Sun Feb 13 07:19:08 2005 +0000
@@ -651,7 +651,7 @@
 	i386-unknown-isc3.0 as your configuration name.
   Use i386-*-esix for Esix; Emacs runs as of version 19.6.
   Use i386-*-linux-gnu for GNU/Linux systems; Emacs runs as of version 19.26.
-  Use i386-*-cygwin for Cygwin; Emacs builds as of version 21.4, in both X11
+  Use i386-*-cygwin for Cygwin; Emacs builds as of version 22.1, in both X11
   and non-X11 modes.  (The Cygwin site has source and binaries for 21.2.)
   Use i386-intsys-sysv for Integrated Solutions 386 machines.
   It may also be correct for Microport systems.
--- a/etc/MH-E-NEWS	Sun Feb 13 00:40:20 2005 +0000
+++ b/etc/MH-E-NEWS	Sun Feb 13 07:19:08 2005 +0000
@@ -1,7 +1,7 @@
 * COPYRIGHT
 
 Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-	
+
 Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
 notice and this notice are preserved.
@@ -392,7 +392,7 @@
 * Changes in MH-E 7.4.4
 
 Version 7.4.4 addresses programmatic issues from the FSF and prepares
-MH-E for inclusion into an impending GNU Emacs release (21.4). There
+MH-E for inclusion into an impending GNU Emacs release (22.1). There
 are no user-visible changes (unless you are using XEmacs on DOS or
 don't have the cl package installed). Filenames are now unique in
 their first 8 characters (DOS 8.3 requirement). The runtime dependency
--- a/etc/NEWS	Sun Feb 13 00:40:20 2005 +0000
+++ b/etc/NEWS	Sun Feb 13 07:19:08 2005 +0000
@@ -90,7 +90,7 @@
 eight-bit-control/eight-bit-graphic charsets aren't now in the range
 128-255.
 
-* Installation Changes in Emacs 21.4
+* Installation Changes in Emacs 22.1
 
 ** Emacs includes now support for loading image libraries on demand.
 (Currently this feature is only used on MS Windows.)  You can configure
@@ -172,7 +172,7 @@
 types any more.  Add -DUSE_LISP_UNION_TYPE if you want union types.
 
 
-* Changes in Emacs 21.4
+* Changes in Emacs 22.1
 
 ** Emacs now responds to mouse-clicks on the mode-line, header-line and
 display margin, when run in an xterm.
@@ -214,7 +214,7 @@
 more than just follow a link, so the new Mouse-1 behavior is only
 activated for modes which explicitly mark a clickable text as a "link"
 (see the new function `mouse-on-link-p' for details).  The Lisp
-packages that are included in release 21.4 have been adapted to do
+packages that are included in release 22.1 have been adapted to do
 this, but external packages may not yet support this.  However, there
 is no risk in using such packages, as the worst thing that could
 happen is that you get the original Mouse-1 behavior when you click
@@ -2116,8 +2116,11 @@
 
 +++
 ** You can now customize fill-nobreak-predicate to control where
-filling can break lines.  We provide two sample predicates,
-fill-single-word-nobreak-p and fill-french-nobreak-p.
+filling can break lines.  The value is now normally a list of
+functions, but it can also be a single function, for compatibility.
+
+We provide two sample predicates, fill-single-word-nobreak-p and
+fill-french-nobreak-p, for use in the value of fill-nobreak-predicate.
 
 +++
 ** New user option `add-log-always-start-new-record'.
@@ -2304,7 +2307,7 @@
 coding system.
 
 
-* New modes and packages in Emacs 21.4
+* New modes and packages in Emacs 22.1
 
 ** The new package conf-mode.el handles thousands of configuration files, with
 varying syntaxes for comments (;, #, //, /* */ or !), assignment (var = value,
@@ -2548,7 +2551,7 @@
 ** `cfengine-mode' is a major mode for editing GNU Cfengine
 configuration files.
 
-* Incompatible Lisp Changes in Emacs 21.4
+* Incompatible Lisp Changes in Emacs 22.1
 
 +++
 ** `suppress-keymap' now works by remapping `self-insert-command' to
@@ -2561,7 +2564,7 @@
 :propertize and :eval forms in the value of a variable whose
 `risky-local-variable' property is nil.
 
-* Lisp Changes in Emacs 21.4
+* Lisp Changes in Emacs 22.1
 
 ** An element of buffer-undo-list can now have the form (FUNNAME .
 ARGS), where FUNNAME is a symbol other than t or nil.  That stands for
--- a/etc/PROBLEMS	Sun Feb 13 00:40:20 2005 +0000
+++ b/etc/PROBLEMS	Sun Feb 13 07:19:08 2005 +0000
@@ -735,7 +735,7 @@
 through the buffer, especially scrolling backwards, and also jumping
 to the end of a very large buffer.
 
-Beginning with version 21.4, a parenthesis or a brace in column zero
+Beginning with version 22.1, a parenthesis or a brace in column zero
 is highlighted in bold-red face if it is inside a string or a comment,
 to indicate that it could interfere with Font Lock (and also with
 indentation) and should be moved or escaped with a backslash.
@@ -1553,7 +1553,7 @@
 `xterm-color' might activate the color support on an xterm-compatible
 emulator.
 
-Beginning with version 21.4, Emacs supports the --color command-line
+Beginning with version 22.1, Emacs supports the --color command-line
 option which may be used to force Emacs to use one of a few popular
 modes for getting colors on a tty.  For example, --color=ansi8 sets up
 for using the ANSI-standard escape sequences that support 8 colors.
@@ -2873,7 +2873,7 @@
 
 *** HP/UX versions before 11.0
 
-HP/UX 9 was end-of-lifed in December 1998.  
+HP/UX 9 was end-of-lifed in December 1998.
 HP/UX 10 was end-of-lifed in May 1999.
 
 **** HP/UX 9: Emacs crashes with SIGBUS or SIGSEGV after you delete a frame.
@@ -2951,7 +2951,7 @@
 
 *** Irix 5 and earlier
 
-Exactly when Irix-5 end-of-lifed is obscure.  But since Irix 6.0 
+Exactly when Irix-5 end-of-lifed is obscure.  But since Irix 6.0
 shipped in 1994, it has been some years.
 
 **** Irix 5.2: unexelfsgi.c can't find cmplrs/stsupport.h.
--- a/etc/TUTORIAL	Sun Feb 13 00:40:20 2005 +0000
+++ b/etc/TUTORIAL	Sun Feb 13 07:19:08 2005 +0000
@@ -1,5 +1,5 @@
 You are looking at the Emacs tutorial.  See end for copying conditions.
-Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software Foundation.
+Copyright (c) 1985, 1996, 1998, 2001, 2002, 2005 Free Software Foundation.
 
 Emacs commands generally involve the CONTROL key (sometimes labeled
 CTRL or CTL) or the META key (sometimes labeled EDIT or ALT).  Rather than
@@ -259,9 +259,9 @@
 saying what the command was, and asking you whether you want to go
 ahead and execute the command.
 
-If you really want to try the command, type Space in answer to the
-question.  Normally, if you do not want to execute the disabled
-command, answer the question with "n".
+If you really want to try the command, type <SPC> (the Space bar) in
+answer to the question.  Normally, if you do not want to execute the
+disabled command, answer the question with "n".
 
 >> Type C-x C-l (which is a disabled command),
    then type n to answer the question.
@@ -352,27 +352,27 @@
 Emacs and correcting errors.  You can delete by words or lines
 as well.  Here is a summary of the delete operations:
 
-	<Delback>    delete the character just before the cursor
-	C-d   	     delete the next character after the cursor
+	<Delback>    Delete the character just before the cursor
+	C-d   	     Delete the next character after the cursor
 
-	M-<Delback>  kill the word immediately before the cursor
-	M-d	     kill the next word after the cursor
+	M-<Delback>  Kill the word immediately before the cursor
+	M-d	     Kill the next word after the cursor
 
-	C-k	     kill from the cursor position to end of line
-	M-k	     kill to the end of the current sentence
+	C-k	     Kill from the cursor position to end of line
+	M-k	     Kill to the end of the current sentence
 
 Notice that <Delback> and C-d vs M-<Delback> and M-d extend the parallel
 started by C-f and M-f (well, <Delback> is not really a control
 character, but let's not worry about that).  C-k and M-k are like C-e
 and M-e, sort of, in that lines are opposite sentences.
 
-You can also kill any part of the buffer with one uniform method.
-Move to one end of that part, and type C-@ or C-SPC (either one).
-(SPC is the Space bar.)  Move to the other end of that part, and type
-C-w.  That kills all the text between the two positions.
+You can also kill any part of the text with one uniform method.  Move
+to one end of that part, and type C-@ or C-<SPC> (either one).  (<SPC>
+is the Space bar.)  Move to the other end of that part, and type C-w.
+That kills all the text between the two positions.
 
 >> Move the cursor to the Y at the start of the previous paragraph.
->> Type C-SPC.  Emacs should display a message "Mark set"
+>> Type C-<SPC>.  Emacs should display a message "Mark set"
    at the bottom of the screen.
 >> Move the cursor to the n in "end", on the second line of the
    paragraph.
@@ -401,9 +401,9 @@
 Bringing back killed text is called "yanking".  (Think of it as
 yanking back, or pulling back, some text that was taken away.)  You
 can yank the killed text either at the same place where it was killed,
-or at some other place in the buffer, or even in a different file.
-You can yank the same text several times; that makes multiple copies
-of it.
+or at some other place in the text you are editing, or even in a
+different file.  You can yank the same text several times; that makes
+multiple copies of it.
 
 The command for yanking is C-y.  It reinserts the last killed text,
 at the current cursor position.
@@ -638,11 +638,12 @@
 	M-x	Named command eXtend.  Followed by a long name.
 
 These are commands that are generally useful but used less than the
-commands you have already learned about.  You have already seen two of
-them: the file commands C-x C-f to Find and C-x C-s to Save.  Another
-example is the command to end the Emacs session--this is the command
-C-x C-c.  (Do not worry about losing changes you have made; C-x C-c
-offers to save each changed file before it kills the Emacs.)
+commands you have already learned about.  You have already seen a few
+of them: the file commands C-x C-f to Find and C-x C-s to Save, for
+example.  Another example is the command to end the Emacs
+session--this is the command C-x C-c.  (Do not worry about losing
+changes you have made; C-x C-c offers to save each changed file before
+it kills the Emacs.)
 
 C-z is the command to exit Emacs *temporarily*--so that you can go
 back to the same Emacs session afterward.
@@ -666,12 +667,14 @@
 
 There are many C-x commands.  Here is a list of the ones you have learned:
 
-	C-x C-f		Find file.
-	C-x C-s		Save file.
-	C-x C-b		List buffers.
-	C-x C-c		Quit Emacs.
-	C-x 1		Delete all but one window.
-	C-x u		Undo.
+	C-x C-f		Find file
+	C-x C-s		Save file
+	C-x s		Save some buffers
+	C-x C-b		List buffers
+	C-x b		Switch buffer
+	C-x C-c		Quit Emacs
+	C-x 1		Delete all but one window
+	C-x u		Undo
 
 Named eXtended commands are commands which are used even less
 frequently, or commands which are used only in certain modes.  An
@@ -727,18 +730,18 @@
 The line immediately above the echo area is called the "mode line".
 The mode line says something like this:
 
---:**  TUTORIAL          (Fundamental)--L670--58%----------------
+--:**  TUTORIAL       63% L749    (Fundamental)-----------------------
 
 This line gives useful information about the status of Emacs and
 the text you are editing.
 
 You already know what the filename means--it is the file you have
-found.  -NN%-- indicates your current position in the text; it means
-that NN percent of the text is above the top of the screen.  If the
-top of the file is on the screen, it will say --Top-- instead of
---00%--.  If the bottom of the text is on the screen, it will say
---Bot--.  If you are looking at text so small that all of it fits on
-the screen, the mode line says --All--.
+found.  NN% indicates your current position in the text; it means that
+NN percent of the text is above the top of the screen.  If the top of
+the file is on the screen, it will say "Top" instead of " 0%".  If the
+bottom of the text is on the screen, it will say "Bot".  If you are
+looking at text so small that all of it fits on the screen, the mode
+line says "All".
 
 The L and digits indicate position in another way: they give the
 current line number of point.
@@ -767,6 +770,7 @@
 
 If you are going to be editing human-language text, such as this file, you
 should probably use Text Mode.
+
 >> Type M-x text mode<Return>.
 
 Don't worry, none of the  Emacs commands you have learned changes in
@@ -897,7 +901,7 @@
    Both windows display this tutorial.  The cursor stays in the top window.
 
 >> Type C-M-v to scroll the bottom window.
-   (If you do not have a real META key, type ESC C-v.)
+   (If you do not have a real META key, type <ESC> C-v.)
 
 >> Type C-x o ("o" for "other") to move the cursor to the bottom window.
 >> Use C-v and M-v in the bottom window to scroll it.
@@ -921,10 +925,10 @@
 typing v.  It does not matter whether CONTROL or META "comes first,"
 because both of these keys act by modifying the characters you type.
 
-If you do not have a real META key, and you use ESC instead, the order
-does matter: you must type ESC followed by CONTROL-v, because
-CONTROL-ESC v will not work.  This is because ESC is a character in
-its own right, not a modifier key.
+If you do not have a real META key, and you use <ESC> instead, the
+order does matter: you must type <ESC> followed by CONTROL-v, because
+CONTROL-<ESC> v will not work.  This is because <ESC> is a character
+in its own right, not a modifier key.
 
 >> Type C-x 1 (in the top window) to get rid of the bottom window.
 
@@ -955,11 +959,12 @@
 surrounding the parentheses around the major mode name.  For
 example, you might see [(Fundamental)] instead of (Fundamental).
 
-To get out of the recursive editing level, type ESC ESC ESC.  That is
-an all-purpose "get out" command.  You can also use it for eliminating
-extra windows, and getting out of the minibuffer.
+To get out of the recursive editing level, type <ESC> <ESC> <ESC>.
+That is an all-purpose "get out" command.  You can also use it for
+eliminating extra windows, and getting out of the minibuffer.
 
->> Type M-x to get into a minibuffer; then type ESC ESC ESC to get out.
+>> Type M-x to get into a minibuffer; then type <ESC> <ESC> <ESC> to
+   get out.
 
 You cannot use C-g to get out of a recursive editing level.  This is
 because C-g is used for canceling commands and arguments WITHIN the
@@ -1099,7 +1104,7 @@
 This version of the tutorial, like GNU Emacs, is copyrighted, and
 comes with permission to distribute copies on certain conditions:
 
-Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software Foundation
+Copyright (c) 1985, 1996, 1998, 2001, 2002, 2005 Free Software Foundation
 
    Permission is granted to anyone to make or distribute verbatim copies
    of this document as received, in any medium, provided that the
--- a/lisp/ChangeLog	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/ChangeLog	Sun Feb 13 07:19:08 2005 +0000
@@ -1,3 +1,128 @@
+2005-02-12  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* custom.el (custom-theme-set-variables): Handle variable aliases.
+
+	* frame.el (blink-cursor-timer): Doc fix.
+	(blink-cursor): Make it an alias for `blink-cursor-mode' and
+	declare obsolete.
+	(blink-cursor-mode): Define with defcustom and use correct
+	standard expression in that defcustom.
+	* startup.el (command-line): Adapt to above changes in frame.el.
+
+2005-02-11  Lute Kamstra  <lute@gnu.org>
+
+	* apropos.el (apropos-score-doc): Prevent division by zero.
+
+2005-02-11  Ulf Jasper  <ulf.jasper@web.de>
+
+	* calendar/icalendar.el (icalendar--get-event-property): Doc fix.
+	(icalendar--get-event-property-attributes)
+	(icalendar--get-event-properties)
+	(icalendar--datetime-to-diary-date): New functions.
+	(icalendar--split-value): Doc fix.
+	(icalendar--datetime-to-noneuropean-date)
+	(icalendar--datetime-to-european-date): New optional argument
+	SEPARATOR.  Return result as a string instead of a list.
+	(icalendar--get-weekday-number): Check if ABBREVWEEKDAY is nil.
+	(icalendar--convert-string-for-export): Rename arg S to STRING.
+	(icalendar-export-region): Doc fix.  Change name of error buffer.
+	Save output buffer.
+	(icalendar-import-file): Add blank at end of prompt.
+	(icalendar-import-buffer): Doc fix.  Do not switch to error
+	buffer.  Indicate status in return value.
+	(icalendar--convert-ical-to-diary): Doc fix.  Change name of error
+	buffer.  Save output buffer.  Handle exception from recurrence
+	rules (EXDATE, EXRULE).  Handle start- and end-date of recurring
+	events.  Fix problems with weekly all-day events.
+
+2005-02-10  Richard M. Stallman  <rms@gnu.org>
+
+	* simple.el (eval-expression-print-format):
+	Avoid warning about edebug-active.
+
+	* help.el (help-for-help-internal): Renamed from help-for-help.
+	(help-for-help): Define with defalias.
+
+	* font-core.el (font-lock-default-function): Use with-no-warnings.
+
+	* cus-edit.el (custom-buffer-create-internal): Improve help-echo.
+
+	* custom.el (defface): Doc fix.
+
+2005-02-10  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gdb-ui.el (gdb-ann3): Re-instate GDB command "set
+	width 0" to prevent word wrapping problems.
+
+2005-02-09  Kim F. Storm  <storm@cua.dk>
+
+	* ido.el (ido-file-extensions-order): New defcustom.
+	(ido-file-extension-lessp, ido-file-extension-aux)
+	(ido-file-extension-order): New advanced file ordering.
+	(ido-file-lessp): New simple file ordering.
+	(ido-sort-list): Remove.
+	(ido-make-file-list): Use ido-file-lessp or ido-file-extension-lessp.
+	(ido-make-dir-list, ido-completion-help): Use ido-file-lessp.
+
+2005-02-08  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* progmodes/grep.el (grep-regexp-alist): Match an optional ^[[K
+	that some versions of grep produce.
+	(grep-mode-font-lock-keywords): Likewise.
+
+2005-02-09  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gdb-ui.el (gdb-location-list): New variable.
+	(gdb-cdir): Delete
+	(gdb-info-breakpoints-custom, gdb-goto-breakpoint)
+	(gdb-source-info): Treat case when source file is in another
+	directory properly.
+	(gdb-get-location): New function.
+
+2005-02-07  Jay Belanger  <belanger@truman.edu>
+
+	* calc/calc-prog.el (calc-write-parse-table-part)
+	(calc-fix-token-name): Fix a check for language type.
+
+	* calc/calccomp.el (math-compose-expr): Fix a check for language
+	type.
+
+2005-02-07  Andre Spiegel  <spiegel@gnu.org>
+
+	* vc-hooks.el (vc-make-version-backup): Ignore file-errors such
+	as directory not writable.
+
+2005-02-07  Kim F. Storm  <storm@cua.dk>
+
+	* emulation/cua-base.el (cua-max-undo, cua-undo): Remove.
+	(cua--standard-movement-commands): Remove list.
+	Instead, set CUA property value to move for movement commands.
+	(cua-movement-commands): Remove.  Users must set CUA prop instead.
+	(cua--pre-command-handler): Check CUA property.
+	(cua--init-keymaps): Don't remap undo commands.
+	(cua-mode): Don't call cua--rectangle-on-off.
+
+	* emulation/cua-rect.el (cua--undo-list, cua--tidy-undo-counter)
+	(cua--rect-undo, cua--tidy-undo-lists, cua--rectangle-on-off): Remove.
+	(cua--rect-undo-set-point): New var.
+	(cua--rectangle-undo-boundary): Setup undo apply entry.
+	(cua--rect-undo-handler): New function for rectangle undo.
+	(cua--rect-start-position, cua--rect-end-position): Add.
+	(cua--rectangle-post-command): Call cua--rectangle-set-corners
+	for restored rectangle.  Set point if cua--rect-undo-set-point.
+
+2005-02-06  Jay Belanger  <belanger@truman.edu>
+
+	* calc/calc-lang.el (calc-tex-language): Display more information
+	in messages.
+
+	* calc/calccomp.el (math-compose-expr): Allow multiline matrices
+	in TeX mode.
+
+2005-02-06  Richard M. Stallman  <rms@gnu.org>
+
+	* emacs-lisp/lisp.el (buffer-end): Doc fix.
+
 2005-02-05  Arne_J,Ax(Brgensen  <arne@arnested.dk>  (tiny change)
 
 	* net/ldap.el (ldap-search-internal): Support attributes with
@@ -6625,7 +6750,7 @@
 	(tramp-multi-action-process-alive): New defun.
 	(tramp-multi-actions): Use it.
 	(tramp-handle-find-backup-file-name): `copy-tree' is available
-	since Emacs 21.4 only (XEmacs has it).  Implementation rewritten
+	since Emacs 22.1 only (XEmacs has it).  Implementation rewritten
 	in order to avoid this function.
 	(tramp-handle-write-region): Set current buffer.  If connection
 	wasn't open, `file-modes' has changed it accidently.  Reported by
@@ -11256,7 +11381,7 @@
 	(tramp-async-proc): New variable.
 	(tramp-handle-shell-command): Adding asynchronous processes.
 	They are far from being perfect, but it works at least for
-	`find-grep-dired' and `find-name-dired' in Emacs 21.4.
+	`find-grep-dired' and `find-name-dired' in Emacs 22.1.
 	(top-level): Require password.el if visible.  Should be mandatory
 	once No Gnus has found its way into (X)Emacs.
 	(tramp-read-passwd): Invoke `password-read' if available,
@@ -12867,7 +12992,7 @@
 	Apply `file-attributes' instead of `tramp-handle-file-attributes' in
 	order to make the function more general.
 	(tramp-handle-file-attributes): Replace proprietary optional
-	parameter NONNUMERIC by the recently (Emacs 21.4) introduced ID-FORMAT.
+	parameter NONNUMERIC by the recently (Emacs 22.1) introduced ID-FORMAT.
 	(tramp-handle-file-attributes-with-perl): Handle parameter
 	NONNUMERIC if set.  This wasn't done in the past.
 	(tramp-post-connection): Apply second parameter "$2" if
@@ -12876,7 +13001,7 @@
 	* net/tramp-smb.el (tramp-smb-handle-delete-file):
 	Correct cut'n'waste error (`filename' instead of `directory').
 	(tramp-smb-handle-directory-files-and-attributes)
-	(tramp-smb-handle-file-attributes): Add recently (Emacs 21.4)
+	(tramp-smb-handle-file-attributes): Add recently (Emacs 22.1)
 	introduced parameter ID-FORMAT.
 	(tramp-smb-handle-make-directory-internal): Correct cut'n'waste
 	error (`directory' instead of `ldir').
--- a/lisp/ChangeLog.10	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/ChangeLog.10	Sun Feb 13 07:19:08 2005 +0000
@@ -9439,7 +9439,7 @@
 
 	* progmodes/ada-stmt.el (ada-stmt-add-to-ada-menu): Handle the
 	menu pseudo-keys generated by easymenu which are lowercase in
-	Emacs 21.4.
+	Emacs 22.1.
 
 	* progmodes/ada-xref.el
 	(ada-xref-update-project-menu,ada-add-ada-menu): Ditto.
--- a/lisp/add-log.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/add-log.el	Sun Feb 13 07:19:08 2005 +0000
@@ -126,7 +126,7 @@
 
 (defcustom add-log-always-start-new-record nil
   "*If non-nil, `add-change-log-entry' will always start a new record."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'change-log)
 
@@ -790,7 +790,7 @@
 		   ;; between that end and the desired position.
 		   (when (save-excursion
 			   (and (> location (point))
-				(re-search-forward "^DEFUN" 
+				(re-search-forward "^DEFUN"
 						   (save-excursion
 						     (goto-char location)
 						     (line-end-position))
--- a/lisp/allout.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/allout.el	Sun Feb 13 07:19:08 2005 +0000
@@ -69,7 +69,7 @@
   "Extensive outline mode for use alone and with other modes."
   :prefix "allout-"
   :group 'editing
-  :version "21.4")
+  :version "22.1")
 
 ;;;_ + Layout, Mode, and Topic Header Configuration
 
--- a/lisp/apropos.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/apropos.el	Sun Feb 13 07:19:08 2005 +0000
@@ -1,6 +1,6 @@
 ;;; apropos.el --- apropos commands for users and programmers
 
-;; Copyright (C) 1989,94,1995,2001,02,03,2004  Free Software Foundation, Inc.
+;; Copyright (C) 1989,94,1995,2001,02,03,04,2005  Free Software Foundation, Inc.
 
 ;; Author: Joe Wells <jbw@bigbird.bu.edu>
 ;; Rewritten: Daniel Pfeiffer <occitan@esperanto.org>
@@ -322,13 +322,13 @@
 
 (defun apropos-score-doc (doc)
   "Return apropos score for documentation string DOC."
-  (if doc
-      (let ((score 0)
-	    (l (length doc))
-	    i)
-	(dolist (s (apropos-calc-scores doc apropos-all-words) score)
-	  (setq score (+ score 50 (/ (* (- l s) 50) l)))))
-      0))
+  (let ((l (length doc)))
+    (if (> l 0)
+	(let ((score 0)
+	      i)
+	  (dolist (s (apropos-calc-scores doc apropos-all-words) score)
+	    (setq score (+ score 50 (/ (* (- l s) 50) l)))))
+      0)))
 
 (defun apropos-score-symbol (symbol &optional weight)
   "Return apropos score for SYMBOL."
--- a/lisp/autorevert.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/autorevert.el	Sun Feb 13 07:19:08 2005 +0000
@@ -174,7 +174,7 @@
 \(When the string is not empty, make sure that it has a leading space.)"
   :group 'auto-revert
   :type 'string
-  :version "21.4")
+  :version "22.1")
 
 (defcustom auto-revert-mode-hook nil
   "Functions to run when Auto-Revert Mode is activated."
@@ -243,7 +243,7 @@
 buffers.  CPU usage depends on the version control system"
   :group 'auto-revert
   :type 'boolean
-  :version "21.4")
+  :version "22.1")
 
 (defvar global-auto-revert-ignore-buffer nil
   "*When non-nil, Global Auto-Revert Mode will not revert this buffer.
--- a/lisp/calc/calc-lang.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/calc/calc-lang.el	Sun Feb 13 07:19:08 2005 +0000
@@ -291,11 +291,20 @@
   (calc-wrapper
    (and n (setq n (prefix-numeric-value n)))
    (calc-set-language 'tex n)
-   (message (if (and n (/= n 0))
-		(if (> n 0)
-		    "TeX language mode with \\hbox{func}(\\hbox{var})"
-		  "TeX language mode with \\func{\\hbox{var}}")
-	      "TeX language mode"))))
+   (cond ((not n)
+          (message "TeX language mode"))
+         ((= n 0)
+          (message "TeX language mode with multiline matrices"))
+         ((= n 1)
+          (message "TeX language mode with \\hbox{func}(\\hbox{var})"))
+         ((> n 1)
+          (message 
+           "TeX language mode with \\hbox{func}(\\hbox{var}) and multiline matrices"))
+         ((= n -1)
+          (message "TeX language mode with \\func(\\hbox{var})"))
+         ((< n -1)
+          (message 
+           "TeX language mode with \\func(\\hbox{var}) and multiline matrices")))))
 
 (defun calc-latex-language (n)
   (interactive "P")
--- a/lisp/calc/calc-prog.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/calc/calc-prog.el	Sun Feb 13 07:19:08 2005 +0000
@@ -520,7 +520,7 @@
     (cond ((stringp (car p))
 	   (let ((s (car p)))
 	     (if (and (string-match "\\`\\\\dots\\>" s)
-		      (not (eq calc-lang '(tex latex))))
+		      (not (memq calc-lang '(tex latex))))
 		 (setq s (concat ".." (substring s 5))))
 	     (if (or (and (string-match
 			   "[a-zA-Z0-9\"{}]\\|\\`:=\\'\\|\\`#\\|\\`%%" s)
@@ -587,7 +587,7 @@
 	 "(")
 	((and (equal name "}") (memq calc-lang '(tex latex eqn)))
 	 ")")
-	((and (equal name "&") (eq calc-lang '(tex latex)))
+	((and (equal name "&") (memq calc-lang '(tex latex)))
 	 ",")
 	((equal name "#")
 	 (search-backward "#")
--- a/lisp/calc/calccomp.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/calc/calccomp.el	Sun Feb 13 07:19:08 2005 +0000
@@ -266,12 +266,22 @@
 	      (if (or calc-full-vectors (< (length a) 7))
 		  (if (and (eq calc-language 'tex)
 			   (math-matrixp a))
-		      (append '(horiz "\\matrix{ ")
-			      (math-compose-tex-matrix (cdr a))
-			      '(" }"))
+                      (if (and (integerp calc-language-option)
+                               (or (= calc-language-option 0)
+                                   (> calc-language-option 1)
+                                   (< calc-language-option -1)))
+                          (append '(vleft 0 "\\matrix{")
+                                  (math-compose-tex-matrix (cdr a))
+                                  '("}"))
+                        (append '(horiz "\\matrix{ ")
+                                (math-compose-tex-matrix (cdr a))
+                                '(" }")))
                     (if (and (eq calc-language 'latex)
                              (math-matrixp a))
-                        (if (memq calc-language-option '(-2 0 2))
+                        (if (and (integerp calc-language-option)
+                                 (or (= calc-language-option 0)
+                                     (> calc-language-option 1)
+                                     (< calc-language-option -1)))
                             (append '(vleft 0 "\\begin{pmatrix}")
                                     (math-compose-tex-matrix (cdr a))
                                     '("\\end{pmatrix}"))
@@ -898,7 +908,7 @@
 		       (setq func (substring func 0 (- n)))
 		       (while (>= (setq n (1- n)) 0)
 			 (setq func (concat func " prime")))))
-		 (cond ((and (eq calc-language '(tex latex))
+		 (cond ((and (memq calc-language '(tex latex))
 			     (or (> (length a) 2)
 				 (not (math-tex-expr-is-flat (nth 1 a)))))
 			(setq left "\\left( "
--- a/lisp/calendar/appt.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/calendar/appt.el	Sun Feb 13 07:19:08 2005 +0000
@@ -88,7 +88,7 @@
 
 (make-obsolete-variable 'appt-issue-message
                         "use the function `appt-activate', and the \
-variable `appt-display-format' instead." "21.4")
+variable `appt-display-format' instead." "22.1")
 
 ;;;###autoload
 (defcustom appt-message-warning-time 12
@@ -109,7 +109,7 @@
   :type 'boolean
   :group 'appt)
 
-(make-obsolete-variable 'appt-visible 'appt-display-format "21.4")
+(make-obsolete-variable 'appt-visible 'appt-display-format "22.1")
 
 ;;;###autoload
 (defcustom appt-msg-window t
@@ -118,7 +118,7 @@
   :type 'boolean
   :group 'appt)
 
-(make-obsolete-variable 'appt-msg-window 'appt-display-format "21.4")
+(make-obsolete-variable 'appt-msg-window 'appt-display-format "22.1")
 
 ;; TODO - add popup.
 (defcustom appt-display-format 'ignore
@@ -136,7 +136,7 @@
           (const :tag "Echo-area" echo)
           (const :tag "No visible display" nil))
   :group 'appt
-  :version "21.4")
+  :version "22.1")
 
 ;;;###autoload
 (defcustom appt-display-mode-line t
--- a/lisp/calendar/diary-lib.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/calendar/diary-lib.el	Sun Feb 13 07:19:08 2005 +0000
@@ -282,7 +282,7 @@
 The format of the header is specified by `diary-header-line-format'."
   :group   'diary
   :type    'boolean
-  :version "21.4")
+  :version "22.1")
 
 (defcustom diary-header-line-format
   '(:eval (calendar-string-spread
@@ -295,7 +295,7 @@
 Only used if `diary-header-line-flag' is non-nil."
   :group   'diary
   :type    'sexp
-  :version "21.4")
+  :version "22.1")
 
 (defvar diary-saved-point)		; internal
 
@@ -546,7 +546,7 @@
 (defface diary-button-face '((((type pc) (class color))
 		   (:foreground "lightblue")))
   "Default face used for buttons."
-  :version "21.4"
+  :version "22.1"
   :group 'diary)
 
 (define-button-type 'diary-entry
@@ -1938,7 +1938,7 @@
 		:value-type (choice
 			     (string :tag "Template for entry")
 			     (function :tag "Unary function providing template")))
-  :version "21.4"
+  :version "22.1"
   :group 'diary)
 
 
--- a/lisp/calendar/icalendar.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/calendar/icalendar.el	Sun Feb 13 07:19:08 2005 +0000
@@ -1,6 +1,6 @@
 ;;; icalendar.el --- iCalendar implementation -*-coding: utf-8 -*-
 
-;; Copyright (C) 2002, 2003, 2004  Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005  Free Software Foundation, Inc.
 
 ;; Author:         Ulf Jasper <ulf.jasper@web.de>
 ;; Created:        August 2002
@@ -90,7 +90,7 @@
 
 ;;; Code:
 
-(defconst icalendar-version 0.08
+(defconst icalendar-version 0.09
   "Version number of icalendar.el.")
 
 ;; ======================================================================
@@ -268,7 +268,7 @@
 ;;  (car (cddr event)))
 
 (defun icalendar--get-event-property (event prop)
-  "For the given EVENT return the value of the property PROP."
+  "For the given EVENT return the value of the first occurence of PROP."
   (catch 'found
     (let ((props (car (cddr event))) pp)
       (while props
@@ -278,6 +278,27 @@
         (setq props (cdr props))))
     nil))
 
+(defun icalendar--get-event-property-attributes (event prop)
+  "For the given EVENT return attributes of the first occurence of PROP."
+  (catch 'found
+    (let ((props (car (cddr event))) pp)
+      (while props
+        (setq pp (car props))
+        (if (eq (car pp) prop)
+            (throw 'found (cadr pp)))
+        (setq props (cdr props))))
+    nil))
+
+(defun icalendar--get-event-properties (event prop)
+  "For the given EVENT return a list of all values of the property PROP."
+  (let ((props (car (cddr event))) pp result)
+    (while props
+      (setq pp (car props))
+      (if (eq (car pp) prop)
+          (setq result (cons (car (cddr pp)) result)))
+      (setq props (cdr props)))
+    result))
+
 ;; (defun icalendar--set-event-property (event prop new-value)
 ;;   "For the given EVENT set the property PROP to the value NEW-VALUE."
 ;;   (catch 'found
@@ -319,7 +340,7 @@
   (icalendar--get-children (car icalendar) 'VEVENT))
 
 (defun icalendar--split-value (value-string)
-  "Splits VALUE-STRING at ';='."
+  "Split VALUE-STRING at ';='."
   (let ((result '())
         param-name param-value)
     (when value-string
@@ -424,13 +445,11 @@
             (if (match-beginning 11)
                 (setq seconds (read (substring isodurationstring
                                                (match-beginning 12)
-                                               (match-end 12)))))
-            )
+                                               (match-end 12))))))
            ((match-beginning 13)        ;weeks only
             (setq days (* 7 (read (substring isodurationstring
                                              (match-beginning 14)
-                                             (match-end 14))))))
-           )
+                                             (match-end 14)))))))
           (list seconds minutes hours days months years)))
     ;; isodatetimestring == nil
     nil))
@@ -452,27 +471,45 @@
                 ;;(or (nth 6 time1) (nth 6 time2)) ;; FIXME?
                 )))
 
-(defun icalendar--datetime-to-noneuropean-date (datetime)
+(defun icalendar--datetime-to-noneuropean-date (datetime &optional separator)
   "Convert the decoded DATETIME to non-european-style format.
-Non-European format: (month day year)."
+Optional argument SEPARATOR gives the separator between month,
+day, and year.  If nil a blank character is used as separator.
+Non-European format: \"month day year\"."
   (if datetime
-      (list (nth 4 datetime)            ;month
-            (nth 3 datetime)            ;day
-            (nth 5 datetime))           ;year
+      (format "%d%s%d%s%d" (nth 4 datetime) ;month
+              (or separator " ")
+              (nth 3 datetime)          ;day
+              (or separator " ")
+              (nth 5 datetime))         ;year
     ;; datetime == nil
     nil))
 
-(defun icalendar--datetime-to-european-date (datetime)
+(defun icalendar--datetime-to-european-date (datetime &optional separator)
   "Convert the decoded DATETIME to European format.
+Optional argument SEPARATOR gives the separator between month,
+day, and year.  If nil a blank character is used as separator.
 European format: (day month year).
 FIXME"
   (if datetime
-      (format "%d %d %d" (nth 3 datetime) ; day
+      (format "%d%s%d%s%d" (nth 3 datetime) ;day
+              (or separator " ")
               (nth 4 datetime)            ;month
+              (or separator " ")
               (nth 5 datetime))           ;year
     ;; datetime == nil
     nil))
 
+(defun icalendar--datetime-to-diary-date (datetime &optional separator)
+  "Convert the decoded DATETIME to diary format.
+Optional argument SEPARATOR gives the separator between month,
+day, and year.  If nil a blank character is used as separator.
+Call icalendar--datetime-to-(non)-european-date according to
+value of `european-calendar-style'."
+  (if european-calendar-style
+      (icalendar--datetime-to-european-date datetime separator)
+    (icalendar--datetime-to-noneuropean-date datetime separator)))
+
 (defun icalendar--datetime-to-colontime (datetime)
   "Extract the time part of a decoded DATETIME into 24-hour format.
 Note that this silently ignores seconds."
@@ -495,15 +532,16 @@
 
 (defun icalendar--get-weekday-number (abbrevweekday)
   "Return the number for the ABBREVWEEKDAY."
-  (catch 'found
-    (let ((num 0)
-          (aw (downcase abbrevweekday)))
-      (mapc (lambda (day)
-              (let ((d (downcase day)))
-                (if (string-equal d aw)
-                    (throw 'found num))
-                (setq num (1+ num))))
-            icalendar--weekday-array))
+  (if abbrevweekday
+      (catch 'found
+        (let ((num 0)
+              (aw (downcase abbrevweekday)))
+          (mapc (lambda (day)
+                  (let ((d (downcase day)))
+                    (if (string-equal d aw)
+                        (throw 'found num))
+                    (setq num (1+ num))))
+                icalendar--weekday-array)))
     ;; Error:
     -1))
 
@@ -605,9 +643,9 @@
         (format "T%04d00" starttimenum))
     nil))
 
-(defun icalendar--convert-string-for-export (s)
-  "Escape comma and other critical characters in string S."
-  (icalendar--rris "," "\\\\," s))
+(defun icalendar--convert-string-for-export (string)
+  "Escape comma and other critical characters in STRING."
+  (icalendar--rris "," "\\\\," string))
 
 (defun icalendar--convert-string-for-import (string)
   "Remove escape chars for comma, semicolon etc. from STRING."
@@ -641,9 +679,9 @@
 All diary entries in the region from MIN to MAX in the current buffer are
 converted to iCalendar format.  The result is appended to the file
 ICAL-FILENAME.
-
-Returns non-nil if an error occurred.  In this case an error message is
-written to the buffer ` *icalendar-errors*'."
+This function attempts to return t if something goes wrong.  In this
+case an error string which describes all the errors and problems is
+written into the buffer `*icalendar-errors*'."
   (interactive "r
 FExport diary data into iCalendar file: ")
   (let ((result "")
@@ -659,6 +697,7 @@
     (save-current-buffer
       (set-buffer (get-buffer-create " *icalendar-errors*"))
       (erase-buffer))
+
     ;; here we go
     (save-excursion
       (goto-char min)
@@ -699,13 +738,15 @@
                                 ;; but korganizer seems to expect this... ;(
                                 ;; and evolution doesn't understand it... :(
                                 ;; so... who is wrong?!
-                                ";BYMONTH=" (substring startisostring 4 6)
-                                ";BYMONTHDAY=" (substring startisostring 6 8)
-                                )))
+                                ";BYMONTH="
+                                (substring startisostring 4 6)
+                                ";BYMONTHDAY="
+                                (substring startisostring 6 8))))
                 (unless (string= entry-rest "")
-                  (setq contents (concat contents "\nDESCRIPTION:"
-                                         (icalendar--convert-string-for-export
-                                          entry-rest)))))
+                  (setq contents
+                        (concat contents "\nDESCRIPTION:"
+                                (icalendar--convert-string-for-export
+                                 entry-rest)))))
                ;; cyclic events
                ;; %%(diary-cyclic )
                ((string-match
@@ -734,9 +775,10 @@
                                 ;; BYSOMETHING here...
                                 )))
                 (unless (string= entry-rest "")
-                  (setq contents (concat contents "\nDESCRIPTION:"
-                                         (icalendar--convert-string-for-export
-                                          entry-rest)))))
+                  (setq contents
+                        (concat contents "\nDESCRIPTION:"
+                                (icalendar--convert-string-for-export
+                                 entry-rest)))))
                ;; diary-date -- FIXME
                ((string-match
                  (concat nonmarker
@@ -754,13 +796,16 @@
                ;; block events
                ((string-match
                  (concat nonmarker
-                         "%%(diary-block \\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\) +"
-                         "\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\))\\s-*\\(.*\\)")
+                         "%%(diary-block \\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\)"
+                         " +\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\))\\s-*"
+                         "\\(.*\\)")
                  entry-main)
                 (icalendar--dmsg "diary-block %s" entry-main)
-                (let* ((startstring (substring entry-main (match-beginning 1)
+                (let* ((startstring (substring entry-main
+                                               (match-beginning 1)
                                                (match-end 1)))
-                       (endstring (substring entry-main (match-beginning 2)
+                       (endstring (substring entry-main
+                                             (match-beginning 2)
                                              (match-end 2)))
                        (summary (icalendar--convert-string-for-export
                                  (substring entry-main (match-beginning 3)
@@ -772,12 +817,12 @@
                   (setq contents
                         (concat "\nDTSTART;VALUE=DATE:" startisostring
                                 "\nDTEND;VALUE=DATE:" endisostring
-                                "\nSUMMARY:" summary
-                                ))
+                                "\nSUMMARY:" summary))
                   (unless (string= entry-rest "")
-                    (setq contents (concat contents "\nDESCRIPTION:"
-                                           (icalendar--convert-string-for-export
-                                            entry-rest))))))
+                    (setq contents
+                          (concat contents "\nDESCRIPTION:"
+                                  (icalendar--convert-string-for-export
+                                   entry-rest))))))
                ;; other sexp diary entries -- FIXME
                ((string-match
                  (concat nonmarker
@@ -790,14 +835,17 @@
                ((and (string-match
                       (concat nonmarker
                               "\\([a-z]+\\)\\s-+"
-                              "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?"
+                              "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)"
+                              "\\([ap]m\\)?"
                               "\\(-0?"
-                              "\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?"
+                              "\\([1-9][0-9]?:[0-9][0-9]\\)"
+                              "\\([ap]m\\)?\\)?"
                               "\\)?"
                               "\\s-*\\(.*\\)$")
                       entry-main)
                      (icalendar--get-weekday-abbrev
-                      (substring entry-main (match-beginning 1) (match-end 1))))
+                      (substring entry-main (match-beginning 1)
+                                 (match-end 1))))
                 (icalendar--dmsg "weekly %s" entry-main)
                 (let* ((day (icalendar--get-weekday-abbrev
                              (substring entry-main (match-beginning 1)
@@ -829,9 +877,11 @@
                                             (match-end 8)))))
                   (when starttimestring
                     (unless endtimestring
-                      (let ((time (read (icalendar--rris "^T0?" ""
-                                                         starttimestring))))
-                        (setq endtimestring (format "T%06d" (+ 10000 time))))))
+                      (let ((time (read
+                                   (icalendar--rris "^T0?" ""
+                                                    starttimestring))))
+                        (setq endtimestring (format "T%06d"
+                                                    (+ 10000 time))))))
                   (setq contents
                         (concat "\nDTSTART;"
                                 (if starttimestring
@@ -854,12 +904,13 @@
                                     (if endtimestring 2 3)))
                                 (or endtimestring "")
                                 "\nSUMMARY:" summary
-                                "\nRRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=" day
-                                )))
+                                "\nRRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY="
+                                day)))
                 (unless (string= entry-rest "")
-                  (setq contents (concat contents "\nDESCRIPTION:"
-                                         (icalendar--convert-string-for-export
-                                          entry-rest)))))
+                  (setq contents
+                        (concat contents "\nDESCRIPTION:"
+                                (icalendar--convert-string-for-export
+                                 entry-rest)))))
                ;; yearly by day
                ;; 1 May Tag der Arbeit
                ((string-match
@@ -878,10 +929,12 @@
                 (icalendar--dmsg "yearly %s" entry-main)
                 (let* ((daypos (if european-calendar-style 1 2))
                        (monpos (if european-calendar-style 2 1))
-                       (day (read (substring entry-main (match-beginning daypos)
+                       (day (read (substring entry-main
+                                             (match-beginning daypos)
                                              (match-end daypos))))
                        (month (icalendar--get-month-number
-                               (substring entry-main (match-beginning monpos)
+                               (substring entry-main
+                                          (match-beginning monpos)
                                           (match-end monpos))))
                        (starttimestring (icalendar--diarytime-to-isotime
                                          (if (match-beginning 4)
@@ -910,9 +963,11 @@
                                             (match-end 9)))))
                   (when starttimestring
                     (unless endtimestring
-                      (let ((time (read (icalendar--rris "^T0?" ""
-                                                         starttimestring))))
-                        (setq endtimestring (format "T%06d" (+ 10000 time))))))
+                      (let ((time (read
+                                   (icalendar--rris "^T0?" ""
+                                                    starttimestring))))
+                        (setq endtimestring (format "T%06d"
+                                                    (+ 10000 time))))))
                   (setq contents
                         (concat "\nDTSTART;"
                                 (if starttimestring "VALUE=DATE-TIME:"
@@ -924,19 +979,20 @@
                                   "VALUE=DATE:")
                                 ;; end is not included! shift by one day
                                 (icalendar--date-to-isodate
-                                 (list month day 1900) (if endtimestring 0 1))
+                                 (list month day 1900)
+                                 (if endtimestring 0 1))
                                 (or endtimestring "")
                                 "\nSUMMARY:"
                                 summary
                                 "\nRRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH="
                                 (format "%2d" month)
                                 ";BYMONTHDAY="
-                                (format "%2d" day)
-                                )))
+                                (format "%2d" day))))
                 (unless (string= entry-rest "")
-                  (setq contents (concat contents "\nDESCRIPTION:"
-                                         (icalendar--convert-string-for-export
-                                          entry-rest)))))
+                  (setq contents
+                        (concat contents "\nDESCRIPTION:"
+                                (icalendar--convert-string-for-export
+                                 entry-rest)))))
                ;; "ordinary" events, start and end time given
                ;; 1 Feb 2003 Hs Hochzeitsfeier, Dreieich
                ((string-match
@@ -982,9 +1038,11 @@
                     (error "Could not parse date"))
                   (when starttimestring
                     (unless endtimestring
-                      (let ((time (read (icalendar--rris "^T0?" ""
-                                                         starttimestring))))
-                        (setq endtimestring (format "T%06d" (+ 10000 time))))))
+                      (let ((time
+                             (read (icalendar--rris "^T0?" ""
+                                                    starttimestring))))
+                        (setq endtimestring (format "T%06d"
+                                                    (+ 10000 time))))))
                   (setq contents (concat
                                   "\nDTSTART;"
                                   (if starttimestring "VALUE=DATE-TIME:"
@@ -1004,9 +1062,10 @@
                                   summary))
                   ;; could not parse the date
                   (unless (string= entry-rest "")
-                    (setq contents (concat contents "\nDESCRIPTION:"
-                                           (icalendar--convert-string-for-export
-                                            entry-rest))))))
+                    (setq contents
+                          (concat contents "\nDESCRIPTION:"
+                                  (icalendar--convert-string-for-export
+                                   entry-rest))))))
                ;; everything else
                (t
                 ;; Oops! what's that?
@@ -1023,14 +1082,17 @@
                              entry-main))))))
 
       ;; we're done, insert everything into the file
-      (let ((coding-system-for-write 'utf8))
-        (set-buffer (find-file ical-filename))
-        (goto-char (point-max))
-        (insert "BEGIN:VCALENDAR")
-        (insert "\nPRODID:-//Emacs//NONSGML icalendar.el//EN")
-        (insert "\nVERSION:2.0")
-        (insert result)
-        (insert "\nEND:VCALENDAR\n")))
+      (save-current-buffer
+        (let ((coding-system-for-write 'utf8))
+          (set-buffer (find-file ical-filename))
+          (goto-char (point-max))
+          (insert "BEGIN:VCALENDAR")
+          (insert "\nPRODID:-//Emacs//NONSGML icalendar.el//EN")
+          (insert "\nVERSION:2.0")
+          (insert result)
+          (insert "\nEND:VCALENDAR\n")
+          ;; save the diary file
+          (save-buffer))))
     found-error))
 
 ;; ======================================================================
@@ -1046,7 +1108,7 @@
 Optional argument NON-MARKING determines whether events are created as
 non-marking or not."
   (interactive "fImport iCalendar data from file: 
-Finto diary file:
+Finto diary file: 
 p")
   ;; clean up the diary file
   (save-current-buffer
@@ -1070,8 +1132,9 @@
 NON-MARKING determines whether diary events are created as
 non-marking.
 
-This function attempts to notify about problems that occur when
-reading, parsing, or converting iCalendar data!"
+Return code t means that importing worked well, return code nil
+means that an error has occured.  Error messages will be in the
+buffer `*icalendar-errors*'."
   (interactive)
   (save-current-buffer
     ;; prepare ical
@@ -1097,13 +1160,12 @@
               (set-buffer (find-buffer-visiting diary-file))
               (save-buffer)))
           (message "Converting icalendar...done")
-          (if (and ical-errors (y-or-n-p
-                                (concat "Something went wrong -- "
-                                        "do you want to see the "
-                                        "error log? ")))
-              (switch-to-buffer " *icalendar-errors*")))
+          ;; return t if no error occured
+          (not ical-errors))
       (message
-       "Current buffer does not contain icalendar contents!"))))
+       "Current buffer does not contain icalendar contents!")
+      ;; return nil, i.e. import did not work
+      nil)))
 
 (defalias 'icalendar-extract-ical-from-buffer 'icalendar-import-buffer)
 (make-obsolete 'icalendar-extract-ical-from-buffer 'icalendar-import-buffer)
@@ -1163,10 +1225,8 @@
       (condition-case error-val
           (let* ((dtstart (icalendar--decode-isodatetime
                            (icalendar--get-event-property e 'DTSTART)))
-                 (start-d (calendar-date-string
-                           (icalendar--datetime-to-noneuropean-date
-                            dtstart)
-                           t t))
+                 (start-d (icalendar--datetime-to-diary-date
+                           dtstart))
                  (start-t (icalendar--datetime-to-colontime dtstart))
                  (dtend (icalendar--decode-isodatetime
                          (icalendar--get-event-property e 'DTEND)))
@@ -1179,6 +1239,13 @@
                  (rdate (icalendar--get-event-property e 'RDATE))
                  (duration (icalendar--get-event-property e 'DURATION)))
             (icalendar--dmsg "%s: %s" start-d subject)
+            ;; check whether start-time is missing
+            (if  (and (icalendar--get-event-property-attributes
+                       e 'DTSTART)
+                      (string= (cadr (icalendar--get-event-property-attributes
+                                      e 'DTSTART))
+                               "DATE"))
+                (setq start-t nil))
             (when duration
               (let ((dtend2 (icalendar--add-decoded-times
                              dtstart
@@ -1188,10 +1255,7 @@
                              subject))
                 (setq dtend dtend2)))
             (setq end-d (if dtend
-                            (calendar-date-string
-                             (icalendar--datetime-to-noneuropean-date
-                              dtend)
-                             t t)
+                            (icalendar--datetime-to-diary-date dtend)
                           start-d))
             (setq end-t (if dtend
                             (icalendar--datetime-to-colontime dtend)
@@ -1202,51 +1266,96 @@
              (rrule
               (icalendar--dmsg "recurring event")
               (let* ((rrule-props (icalendar--split-value rrule))
-                     (frequency (car (cdr (assoc 'FREQ rrule-props))))
-                     (until (car (cdr (assoc 'UNTIL rrule-props))))
-                     (interval  (read (car (cdr (assoc 'INTERVAL
-                                                       rrule-props))))))
+                     (frequency (cadr (assoc 'FREQ rrule-props)))
+                     (until (cadr (assoc 'UNTIL rrule-props)))
+                     (interval (read (cadr (assoc 'INTERVAL rrule-props)))))
                 (cond ((string-equal frequency "WEEKLY")
                        (if (not start-t)
                            (progn
                              ;; weekly and all-day
                              (icalendar--dmsg "weekly all-day")
+                             (if until
+                                 (let ((fro
+                                        (icalendar--datetime-to-diary-date
+                                         (icalendar--decode-isodatetime
+                                          (icalendar--get-event-property
+                                           e
+                                           'DTSTART))))
+                                       (unt
+                                        (icalendar--datetime-to-diary-date
+                                         (icalendar--decode-isodatetime
+                                          until))))
                              (setq diary-string
                                    (format
-                                    "%%%%(diary-cyclic %d %s)"
+                                    (concat "%%%%(and "
+                                            "(diary-cyclic %d %s) "
+                                            "(diary-block %s %s))")
                                     (* interval 7)
-                                    (icalendar--datetime-to-european-date
-                                     dtstart))))
+                                    (icalendar--datetime-to-diary-date
+                                     dtstart)
+                                    (icalendar--datetime-to-diary-date
+                                     dtstart)
+                                    (icalendar--datetime-to-diary-date
+                                     (icalendar--decode-isodatetime
+                                      until)))))
+                               (setq diary-string
+                                     (format "%%%%(and (diary-cyclic %d %s))"
+                                             (* interval 7)
+                                             (icalendar--datetime-to-diary-date
+                                              dtstart))))
+                             (setq event-ok t))
                          ;; weekly and not all-day
                          (let* ((byday (cadr (assoc 'BYDAY rrule-props)))
                                 (weekday
                                  (icalendar--get-weekday-number byday)))
                            (icalendar--dmsg "weekly not-all-day")
-                           (if (> weekday -1)
-                               (setq diary-string
-                                     (format "%s %s%s%s"
-                                             (aref calendar-day-name-array
-                                                   weekday)
-                                             start-t (if end-t "-" "")
-                                             (or end-t "")))
+                           (if until
+                               (let ((fro
+                                      (icalendar--datetime-to-diary-date
+                                       (icalendar--decode-isodatetime
+                                        (icalendar--get-event-property
+                                         e
+                                         'DTSTART))))
+                                     (unt
+                                      (icalendar--datetime-to-diary-date
+                                       (icalendar--decode-isodatetime
+                                        until))))
+                                 (setq diary-string
+                                       (format
+                                        (concat "%%%%(and "
+                                                "(diary-cyclic %d %s) "
+                                                "(diary-block %s %s)) "
+                                                "%s%s%s")
+                                        (* interval 7)
+                                        (icalendar--datetime-to-diary-date
+                                         dtstart)
+                                        (icalendar--datetime-to-diary-date
+                                         dtstart)
+                                        (icalendar--datetime-to-diary-date
+                                         (icalendar--decode-isodatetime
+                                          until))
+                                        start-t
+                                        (if end-t "-" "") (or end-t ""))))
+                             ;; no limit
                              ;; FIXME!!!!
                              ;; DTSTART;VALUE=DATE-TIME:20030919T090000
                              ;; DTEND;VALUE=DATE-TIME:20030919T113000
                              (setq diary-string
                                    (format
-                                    "%%%%(diary-cyclic %s %s) %s%s%s"
+                                    "%%%%(and (diary-cyclic %s %s)) %s%s%s"
                                     (* interval 7)
-                                    (icalendar--datetime-to-european-date
+                                    (icalendar--datetime-to-diary-date
                                      dtstart)
-                                    start-t (if end-t "-" "") (or end-t ""))))
+                                    start-t
+                                    (if end-t "-" "") (or end-t ""))))
                            (setq event-ok t))))
                       ;; yearly
                       ((string-equal frequency "YEARLY")
                        (icalendar--dmsg "yearly")
                        (setq diary-string
                              (format
-                              "%%%%(diary-anniversary %s)"
-                              (icalendar--datetime-to-european-date dtstart)))
+                              "%%%%(and (diary-anniversary %s))"
+                              (icalendar--datetime-to-diary-date dtstart)))
                        (setq event-ok t))
                       ;; FIXME: war auskommentiert:
                       ((and (string-equal frequency "DAILY")
@@ -1254,20 +1363,40 @@
                             ;;(not start-t)
                             ;;(not end-t)
                             )
-                       (let ((ds (icalendar--datetime-to-noneuropean-date
+                       (let ((ds (icalendar--datetime-to-diary-date
                                   (icalendar--decode-isodatetime
-                                   (icalendar--get-event-property e
-                                                                  'DTSTART))))
-                             (de (icalendar--datetime-to-noneuropean-date
+                                   (icalendar--get-event-property
+                                    e 'DTSTART))))
+                             (de (icalendar--datetime-to-diary-date
                                   (icalendar--decode-isodatetime
                                    until))))
                          (setq diary-string
                                (format
-                                "%%%%(diary-block %d %d %d  %d %d %d)"
-                                (nth 1 ds) (nth 0 ds) (nth 2 ds)
-                                (nth 1 de) (nth 0 de) (nth 2 de))))
-                       (setq event-ok t)))
-                ))
+                                "%%%%(and (diary-block %s %s))"
+                                ds de)))
+                       (setq event-ok t))))
+              ;; Handle exceptions from recurrence rules
+              (let ((ex-dates (icalendar--get-event-properties e
+                                                               'EXDATE)))
+                (while ex-dates
+                  (let* ((ex-start (icalendar--decode-isodatetime
+                  (car ex-dates)))
+                         (ex-d (icalendar--datetime-to-diary-date
+                         ex-start)))
+                    (setq diary-string
+                          (icalendar--rris "^%%(\\(and \\)?"
+                                           (format
+                                           "%%%%(and (not (diary-date %s)) "
+                                           ex-d)
+                                           diary-string)))
+                  (setq ex-dates (cdr ex-dates))))
+              ;; FIXME: exception rules are not recognized
+              (if (icalendar--get-event-property e 'EXRULE)
+                  (setq diary-string
+                        (concat diary-string
+                                "\n Exception rules: "
+                                (icalendar--get-event-properties
+                                 e 'EXRULE)))))
              (rdate
               (icalendar--dmsg "rdate event")
               (setq diary-string "")
@@ -1280,28 +1409,34 @@
              ;; long event
              ((not (string= start-d end-d))
               (icalendar--dmsg "non-recurring event")
-              (let ((ds (icalendar--datetime-to-noneuropean-date dtstart))
-                    (de (icalendar--datetime-to-noneuropean-date dtend)))
+              (let ((ds (icalendar--datetime-to-diary-date dtstart))
+                    (de (icalendar--datetime-to-diary-date dtend)))
                 (setq diary-string
-                      (format "%%%%(diary-block %d %d %d   %d %d %d)"
-                              (nth 1 ds) (nth 0 ds) (nth 2 ds)
-                              (nth 1 de) (nth 0 de) (nth 2 de))))
+                      (format "%%%%(and (diary-block %s %s))"
+                              ds de)))
               (setq event-ok t))
              ;; not all-day
              ((and start-t (or (not end-t)
                                (not (string= start-t end-t))))
               (icalendar--dmsg "not all day event")
               (cond (end-t
-                     (setq diary-string (format "%s %s-%s" start-d
-                                                start-t end-t)))
+                     (setq diary-string
+                           (format "%s %s-%s"
+                                   (icalendar--datetime-to-diary-date
+                                    dtstart "/")
+                                   start-t end-t)))
                     (t
-                     (setq diary-string (format "%s %s" start-d
-                                                start-t))))
+                     (setq diary-string
+                           (format "%s %s"
+                                   (icalendar--datetime-to-diary-date
+                                    dtstart "/")
+                                   start-t))))
               (setq event-ok t))
              ;; all-day event
              (t
               (icalendar--dmsg "all day event")
-              (setq diary-string start-d)
+              (setq diary-string (icalendar--datetime-to-diary-date
+                                  dtstart "/"))
               (setq event-ok t)))
             ;; add all other elements unless the user doesn't want to have
             ;; them
@@ -1318,12 +1453,14 @@
               (setq error-string
                     (format "%s\nCannot handle this event:%s"
                             error-string e))))
+        ;; FIXME: inform user about ignored event properties
         ;; handle errors
         (error
          (message "Ignoring event \"%s\"" e)
          (setq found-error t)
-         (setq error-string (format "%s\nCannot handle this event: %s"
-                                    error-string e)))))
+         (setq error-string (format "%s\n%s\nCannot handle this event: %s"
+                                    error-val error-string e))
+         (message error-string))))
     (if found-error
         (save-current-buffer
           (set-buffer (get-buffer-create " *icalendar-errors*"))
@@ -1340,7 +1477,7 @@
 SUBJECT is not nil it must be a string that gives the subject of the
 entry.  In this case the user will be asked whether he wants to insert
 the entry."
-  (when (or (not subject)               ;
+  (when (or (not subject)
             (y-or-n-p (format "Add appointment for `%s' to diary? "
                               subject)))
     (when subject
--- a/lisp/comint.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/comint.el	Sun Feb 13 07:19:08 2005 +0000
@@ -194,7 +194,7 @@
 you might wish to use another binding for `comint-kill-whole-line'."
   :type 'boolean
   :group 'comint
-  :version "21.4")
+  :version "22.1")
 
 (defvar comint-delimiter-argument-list ()
   "List of characters to recognise as separate arguments in input.
@@ -809,7 +809,7 @@
       ;; Insert the input at point
       (insert (buffer-substring-no-properties
 	       (previous-single-char-property-change (1+ pos) 'field)
-	       (next-single-char-property-change pos 'field)))))) 
+	       (next-single-char-property-change pos 'field))))))
 
 
 ;; Input history processing in a buffer
--- a/lisp/cus-edit.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/cus-edit.el	Sun Feb 13 07:19:08 2005 +0000
@@ -34,6 +34,103 @@
 ;; that interferes with completion.  Use `customize-' for commands
 ;; that the user will run with M-x, and `Custom-' for interactive commands.
 
+;; The identity of a customize option is represented by a Lisp symbol.
+;; There is the following values associated with an option.  
+
+;; 0. The current value.
+
+;;    This is the value of the option as seen by "the rest of Emacs".
+
+;;    Usually extracted by 'default-value', but can be extracted with
+;;    different means if the option symbol has the 'custom-get'
+;;    property.  Similarly, set-default (or the 'custom-set' property)
+;;    can set it.
+
+;; 1. The widget value.
+
+;;    This is the value shown in the widget in a customize buffer.  
+
+;; 2. The customized value.
+
+;;    This is the last value given to the option through customize.
+
+;;    It is stored in the 'customized-value' property of the option, in a
+;;    cons-cell whose car evaluate to the customized value.   
+
+;; 3. The saved value.
+
+;;    This is last value saved from customize.
+
+;;    It is stored in the 'saved-value' property of the option, in a
+;;    cons-cell whose car evaluate to the saved value.   
+
+;; 4. The standard value.
+
+;;    This is the value given in the 'defcustom' declaration.
+
+;;    It is stored in the 'standard-value' property of the option, in a
+;;    cons-cell whose car evaluate to the standard value.   
+
+;; 5. The "think" value.
+   
+;;    This is what customize think the current value should be.
+   
+;;    This is the customize value, if any such value exists, otherwise
+;;    the saved value, if that exists, and as a last resort the standard
+;;    value. 
+
+;; The reason for storing values unevaluated: This is so you can have
+;; values that depend on the environment.  For example, you can have a
+;; valiable that has one value when Emacs is running under a window
+;; system, and another value on a tty.  Since the evaluation is only done
+;; when the variable is firsty initialized, this is only relevant for the
+;; saved (and standard) values, but affect others values for
+;; compatibility.
+
+;; You can see (and modify and save) this unevaluated value by selecting
+;; "Show initial Lisp expression" from the Lisp interface.  This will
+;; give you the unevaluated saved value, if any, otherwise the
+;; unevaluated standard value.
+
+;; The possible states for a customize widget are:
+
+;; 0. unknown
+
+;;    The state has not been determined yet.
+
+;; 1. modified
+
+;;    The widget value is different from the current value.
+
+;; 2. changed
+   
+;;    The current value is different from the "think" value.   
+
+;; 3. set
+
+;;    The "think" value is the customized value.
+
+;; 4. saved
+
+;;    The "think" value is the saved value.
+
+;; 5. standard
+
+;;    The "think" value is the standard value.
+
+;; 6. rogue
+
+;;    There are no standard value.
+
+;; 7. hidden
+
+;;    There is no widget value.
+
+;; 8. mismatch
+
+;;    The widget value is not valid member of the :type specified for the
+;;    option. 
+
 ;;; Code:
 
 (require 'cus-face)
@@ -1183,7 +1280,7 @@
 (defcustom custom-buffer-done-kill nil
   "*Non-nil means exiting a Custom buffer should kill it."
   :type 'boolean
-  :version "21.4"
+  :version "22.1"
   :group 'custom-buffer)
 
 (defcustom custom-buffer-indent 3
@@ -1299,7 +1396,8 @@
   (widget-create 'push-button
 		 :tag "Save for Future Sessions"
 		 :help-echo "\
-Make your editing in this buffer take effect for future Emacs sessions."
+Make your editing in this buffer take effect for future Emacs sessions.
+This updates your Emacs initialization file or creates a new one one."
 		 :action (lambda (widget &optional event)
 			   (Custom-save)))
   (if custom-reset-button-menu
--- a/lisp/cus-start.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/cus-start.el	Sun Feb 13 07:19:08 2005 +0000
@@ -51,7 +51,7 @@
 This should only be chosen under exceptional circumstances,
 since it could result in memory overflow and make Emacs crash."
 					      nil))
-			       "21.4")
+			       "22.1")
 	     (garbage-collection-messages alloc boolean)
 	     ;; buffer.c
 	     (mode-line-format modeline sexp) ;Hard to do right.
@@ -135,10 +135,10 @@
 				    (const :tag "always" t)))
 	     ;; fileio.c
 	     (insert-default-directory minibuffer boolean)
-	     (read-file-name-completion-ignore-case minibuffer boolean "21.4")
+	     (read-file-name-completion-ignore-case minibuffer boolean "22.1")
 	     ;; fns.c
 	     (use-dialog-box menu boolean "21.1")
-	     (use-file-dialog menu boolean "21.4")
+	     (use-file-dialog menu boolean "22.1")
 	     ;; frame.c
 	     (default-frame-alist frames
 	       (repeat (cons :format "%v"
@@ -280,13 +280,13 @@
 						     :format "%v")
 					    (other :tag "Unlimited" t)))
 	     (unibyte-display-via-language-environment mule boolean)
-	     (blink-cursor-alist cursor alist "21.4")
+	     (blink-cursor-alist cursor alist "22.1")
 	     ;; xfaces.c
 	     (scalable-fonts-allowed display boolean)
 	     ;; xfns.c
 	     (x-bitmap-file-path installation
 				 (repeat (directory :format "%v")))
-	     (x-use-old-gtk-file-dialog menu boolean "21.4")
+	     (x-use-old-gtk-file-dialog menu boolean "22.1")
 	     ;; xterm.c
              (mouse-autoselect-window display boolean "21.3")
 	     (x-use-underline-position-properties display boolean "21.3")
--- a/lisp/custom.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/custom.el	Sun Feb 13 07:19:08 2005 +0000
@@ -299,9 +299,10 @@
 `:foreground', `:background', `:stipple', `:inverse-video', and `:inherit'.
 
 DISPLAY can either be the symbol t, which will match all frames, or an
-alist of the form \((REQ ITEM...)...).  For the DISPLAY to match a
-FRAME, the REQ property of the frame must match one of the ITEM.  The
-following REQ are defined:
+alist of elements of the form \(REQ ITEM...).  For the DISPLAY to match a
+FRAME, each of these elements must be satisfied, meaning that the
+REQ property of the frame must match one of the corresponding ITEMs.
+These are the defined REQ values:
 
 `type' (the value of `window-system')
   Under X, in addition to the values `window-system' can take,
@@ -776,7 +777,7 @@
     (while args
       (let ((entry (car args)))
 	(if (listp entry)
-	    (let* ((symbol (nth 0 entry))
+	    (let* ((symbol (indirect-variable (nth 0 entry)))
 		   (value (nth 1 entry))
 		   (now (nth 2 entry))
 		   (requests (nth 3 entry))
@@ -808,7 +809,7 @@
 	  (message "Warning: old format `custom-set-variables'")
 	  (ding)
 	  (sit-for 2)
-	  (let ((symbol (nth 0 args))
+	  (let ((symbol (indirect-variable (nth 0 args)))
 		(value (nth 1 args)))
 	    (put symbol 'saved-value (list value))
             (custom-push-theme 'theme-value symbol theme 'set value))
--- a/lisp/dabbrev.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/dabbrev.el	Sun Feb 13 07:19:08 2005 +0000
@@ -168,7 +168,7 @@
 		 (const :tag "based on `case-replace'" case-replace)
 		 (other :tag "on" t))
   :group 'dabbrev
-  :version "21.4")
+  :version "22.1")
 
 (defcustom dabbrev-case-replace 'case-replace
   "*Whether dabbrev applies the abbreviations's case pattern to the expansion.
--- a/lisp/descr-text.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/descr-text.el	Sun Feb 13 07:19:08 2005 +0000
@@ -246,7 +246,7 @@
 the time of writing it is at
 <URL:http://www.unicode.org/Public/UNIDATA/UnicodeData.txt>."
   :group 'mule
-  :version "21.4"
+  :version "22.1"
   :type '(choice (const :tag "None" nil)
 		 file))
 
--- a/lisp/desktop.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/desktop.el	Sun Feb 13 07:19:08 2005 +0000
@@ -130,7 +130,7 @@
     (const :tag "Save if desktop file exists, else don't" if-exists)
     (const :tag "Never save" nil))
   :group 'desktop
-  :version "21.4")
+  :version "22.1")
 
 (defcustom desktop-base-file-name
   (convert-standard-filename ".emacs.desktop")
@@ -144,7 +144,7 @@
 The base name of the file is specified in `desktop-base-file-name'."
   :type '(repeat directory)
   :group 'desktop
-  :version "21.4")
+  :version "22.1")
 
 (defcustom desktop-missing-file-warning nil
   "*If non-nil then `desktop-read' asks if a non-existent file should be recreated.
@@ -154,21 +154,21 @@
 If nil, just print error messages in the message buffer."
   :type 'boolean
   :group 'desktop
-  :version "21.4")
+  :version "22.1")
 
 (defcustom desktop-no-desktop-file-hook nil
   "Normal hook run when `desktop-read' can't find a desktop file.
 May e.g. be used to show a dired buffer."
   :type 'hook
   :group 'desktop
-  :version "21.4")
+  :version "22.1")
 
 (defcustom desktop-after-read-hook nil
   "Normal hook run after a successful `desktop-read'.
 May e.g. be used to show a buffer list."
   :type 'hook
   :group 'desktop
-  :version "21.4")
+  :version "22.1")
 
 (defcustom desktop-save-hook nil
   "Normal hook run before the desktop is saved in a desktop file.
@@ -204,7 +204,7 @@
 to the value obtained by evaluateing FORM."
   :type '(repeat (restricted-sexp :match-alternatives (symbolp consp)))
   :group 'desktop
-  :version "21.4")
+  :version "22.1")
 
 (defcustom desktop-clear-preserve-buffers-regexp
   "^\\(\\*scratch\\*\\|\\*Messages\\*\\|\\*tramp/.+\\*\\)$"
@@ -212,7 +212,7 @@
 See also `desktop-clear-preserve-buffers'."
   :type 'regexp
   :group 'desktop
-  :version "21.4")
+  :version "22.1")
 
 (defcustom desktop-clear-preserve-buffers nil
   "*List of buffer names that `desktop-clear' should not delete.
@@ -265,7 +265,7 @@
    local    -- Relative to directory of desktop file."
   :type '(choice (const absolute) (const tilde) (const local))
   :group 'desktop
-  :version "21.4")
+  :version "22.1")
 
 (defcustom desktop-restore-eager t
   "Number of buffers to restore immediately.
@@ -273,20 +273,20 @@
 If value is t, all buffers are restored immediately."
   :type '(choice (const t) integer)
   :group 'desktop
-  :version "21.4")
+  :version "22.1")
 
 (defcustom desktop-lazy-verbose t
   "Verbose reporting of lazily created buffers."
   :type 'boolean
   :group 'desktop
-  :version "21.4")
+  :version "22.1")
 
 (defcustom desktop-lazy-idle-delay 5
   "Idle delay before starting to create buffers.
 See `desktop-restore-eager'."
   :type 'integer
   :group 'desktop
-  :version "21.4")
+  :version "22.1")
 
 ;;;###autoload
 (defvar desktop-save-buffer nil
@@ -795,7 +795,7 @@
   (desktop-kill)
   (desktop-clear)
   (desktop-read dirname))
-  
+
 ;; ----------------------------------------------------------------------------
 ;;;###autoload
 (defun desktop-save-in-desktop-dir ()
--- a/lisp/dired.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/dired.el	Sun Feb 13 07:19:08 2005 +0000
@@ -291,7 +291,7 @@
   '((t (:inherit font-lock-type-face)))
   "Face used for directory headers."
   :group 'dired-faces
-  :version "21.4")
+  :version "22.1")
 (defvar dired-header-face 'dired-header
   "Face name used for directory headers.")
 
@@ -299,7 +299,7 @@
   '((t (:inherit font-lock-constant-face)))
   "Face used for dired marks."
   :group 'dired-faces
-  :version "21.4")
+  :version "22.1")
 (defvar dired-mark-face 'dired-mark
   "Face name used for dired marks.")
 
@@ -307,7 +307,7 @@
   '((t (:inherit font-lock-warning-face)))
   "Face used for marked files."
   :group 'dired-faces
-  :version "21.4")
+  :version "22.1")
 (defvar dired-marked-face 'dired-marked
   "Face name used for marked files.")
 
@@ -315,7 +315,7 @@
   '((t (:inherit font-lock-warning-face)))
   "Face used for flagged files."
   :group 'dired-faces
-  :version "21.4")
+  :version "22.1")
 (defvar dired-flagged-face 'dired-flagged
   "Face name used for flagged files.")
 
@@ -323,7 +323,7 @@
   '((t (:inherit font-lock-comment-face)))
   "Face used to highlight a part of a buffer that needs user attention."
   :group 'dired-faces
-  :version "21.4")
+  :version "22.1")
 (defvar dired-warning-face 'dired-warning
   "Face name used for a part of a buffer that needs user attention.")
 
@@ -331,7 +331,7 @@
   '((t (:inherit font-lock-function-name-face)))
   "Face used for subdirectories."
   :group 'dired-faces
-  :version "21.4")
+  :version "22.1")
 (defvar dired-directory-face 'dired-directory
   "Face name used for subdirectories.")
 
@@ -339,7 +339,7 @@
   '((t (:inherit font-lock-keyword-face)))
   "Face used for symbolic links."
   :group 'dired-faces
-  :version "21.4")
+  :version "22.1")
 (defvar dired-symlink-face 'dired-symlink
   "Face name used for symbolic links.")
 
@@ -347,7 +347,7 @@
   '((t (:inherit font-lock-string-face)))
   "Face used for files suffixed with `completion-ignored-extensions'."
   :group 'dired-faces
-  :version "21.4")
+  :version "22.1")
 (defvar dired-ignored-face 'dired-ignored
   "Face name used for files suffixed with `completion-ignored-extensions'.")
 
--- a/lisp/emacs-lisp/bytecomp.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/emacs-lisp/bytecomp.el	Sun Feb 13 07:19:08 2005 +0000
@@ -1765,7 +1765,7 @@
 	(byte-compile-maxdepth 0)
 	(byte-compile-output nil)
 	;; This allows us to get the positions of symbols read; it's
-	;; new in Emacs 21.4.
+	;; new in Emacs 22.1.
 	(read-with-symbol-positions inbuffer)
 	(read-symbol-positions-list nil)
 	;;	  #### This is bound in b-c-close-variables.
--- a/lisp/emacs-lisp/derived.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/emacs-lisp/derived.el	Sun Feb 13 07:19:08 2005 +0000
@@ -249,7 +249,7 @@
   (while (get mode 'derived-mode-parent)
     (setq mode (get mode 'derived-mode-parent)))
   mode)
-(make-obsolete 'derived-mode-class 'derived-mode-p "21.4")
+(make-obsolete 'derived-mode-class 'derived-mode-p "22.1")
 
 
 ;;; PRIVATE
--- a/lisp/emacs-lisp/find-func.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/emacs-lisp/find-func.el	Sun Feb 13 07:19:08 2005 +0000
@@ -96,7 +96,7 @@
 Please send improvements and fixes to the maintainer."
   :type 'regexp
   :group 'find-function
-  :version "21.4")
+  :version "22.1")
 
 (defvar find-function-regexp-alist
   '((nil . find-function-regexp)
--- a/lisp/emacs-lisp/lisp.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/emacs-lisp/lisp.el	Sun Feb 13 07:19:08 2005 +0000
@@ -233,6 +233,9 @@
 normal method is not appropriate.")
 
 (defun buffer-end (arg)
+  "Return the \"far end\" position of the buffer, moving in direction ARG.
+If ARG is positive, that's the end of the buffer.
+Otherwise, that's the beginning of the buffer."
   (if (> arg 0) (point-max) (point-min)))
 
 (defun end-of-defun (&optional arg)
--- a/lisp/emacs-lisp/timer.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/emacs-lisp/timer.el	Sun Feb 13 07:19:08 2005 +0000
@@ -151,7 +151,7 @@
   timer)
 (make-obsolete 'timer-set-time-with-usecs
                "use `timer-set-time' and `timer-inc-time' instead."
-               "21.4")
+               "22.1")
 
 (defun timer-set-function (timer function &optional args)
   "Make TIMER call FUNCTION with optional ARGS when triggering."
--- a/lisp/emacs-lisp/warnings.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/emacs-lisp/warnings.el	Sun Feb 13 07:19:08 2005 +0000
@@ -31,7 +31,7 @@
 
 (defgroup warnings nil
   "Log and display warnings."
-  :version "21.4"
+  :version "22.1"
   :group 'lisp)
 
 (defvar warning-levels
@@ -77,7 +77,7 @@
 is not immediately displayed.  See also `warning-minimum-log-level'."
   :group 'warnings
   :type '(choice (const :emergency) (const :error) (const :warning))
-  :version "21.4")
+  :version "22.1")
 (defvaralias 'display-warning-minimum-level 'warning-minimum-level)
 
 (defcustom warning-minimum-log-level :warning
@@ -86,7 +86,7 @@
 the warning is completely ignored."
   :group 'warnings
   :type '(choice (const :emergency) (const :error) (const :warning))
-  :version "21.4")
+  :version "22.1")
 (defvaralias 'log-warning-minimum-level 'warning-minimum-log-level)
 
 (defcustom warning-suppress-log-types nil
@@ -100,7 +100,7 @@
 so only the element (FOO) will match it."
   :group 'warnings
   :type '(repeat (repeat symbol))
-  :version "21.4")
+  :version "22.1")
 
 (defcustom warning-suppress-types nil
   "List of warning types not to display immediately.
@@ -115,7 +115,7 @@
 See also `warning-suppress-log-types'."
   :group 'warnings
   :type '(repeat (repeat symbol))
-  :version "21.4")
+  :version "22.1")
 
 ;;; The autoload cookie is so that programs can bind this variable
 ;;; safely, testing the existing value, before they call one of the
--- a/lisp/emulation/cua-base.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/emulation/cua-base.el	Sun Feb 13 07:19:08 2005 +0000
@@ -1,6 +1,6 @@
 ;;; cua-base.el --- emulate CUA key bindings
 
-;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Kim F. Storm <storm@cua.dk>
@@ -267,7 +267,7 @@
   :group 'editing-basics
   :group 'convenience
   :group 'emulations
-  :version "21.4"
+  :version "22.1"
   :link '(emacs-commentary-link :tag "Commentary" "cua-base.el")
   :link '(emacs-library-link :tag "Lisp File" "cua-base.el"))
 
@@ -392,11 +392,6 @@
   "*Font used by CUA for highlighting the non-selected rectangle lines."
   :group 'cua)
 
-(defcustom cua-undo-max 64
-  "*Max no of undoable CUA rectangle changes (including undo)."
-  :type 'integer
-  :group 'cua)
-
 
 ;;; Global Mark Customization
 
@@ -739,15 +734,6 @@
 	     (+ arg ?0)))
   (if cua--register nil arg))
 
-;;; Enhanced undo - restore rectangle selections
-
-(defun cua-undo (&optional arg)
-  "Undo some previous changes.
-Knows about CUA rectangle highlighting in addition to standard undo."
-  (interactive "*P")
-  (if (fboundp 'cua--rectangle-undo)
-      (cua--rectangle-undo arg)
-    (undo arg)))
 
 ;;; Region specific commands
 
@@ -988,21 +974,6 @@
     (if cua-enable-region-auto-help
 	(cua-help-for-region t)))))
 
-(defvar cua--standard-movement-commands
-  '(forward-char backward-char
-    next-line previous-line
-    forward-word backward-word
-    end-of-line beginning-of-line
-    end-of-buffer beginning-of-buffer
-    scroll-up scroll-down cua-scroll-up cua-scroll-down
-    forward-sentence backward-sentence
-    forward-paragraph backward-paragraph)
-  "List of standard movement commands.
-Extra commands should be added to `cua-movement-commands'")
-
-(defvar cua-movement-commands nil
-  "User may add additional movement commands to this list.")
-
 ;;; Scrolling commands which does not signal errors at top/bottom
 ;;; of buffer at first key-press (instead moves to top/bottom
 ;;; of buffer).
@@ -1025,6 +996,8 @@
 	(scroll-up arg)
       (end-of-buffer (goto-char (point-max)))))))
 
+(put 'cua-scroll-up 'CUA 'move)
+
 (defun cua-scroll-down (&optional arg)
   "Scroll text of current window downward ARG lines; or near full screen if no ARG.
 If window cannot be scrolled further, move cursor to top line instead.
@@ -1043,6 +1016,8 @@
 	(scroll-down arg)
       (beginning-of-buffer (goto-char (point-min)))))))
 
+(put 'cua-scroll-up 'CUA 'move)
+
 ;;; Cursor indications
 
 (defun cua--update-indications ()
@@ -1073,8 +1048,7 @@
 
 (defun cua--pre-command-handler ()
   (condition-case nil
-      (let ((movement (or (memq this-command cua--standard-movement-commands)
-			  (memq this-command cua-movement-commands))))
+      (let ((movement (eq (get this-command 'CUA) 'move)))
 
 	;; Cancel prefix key timeout if user enters another key.
 	(when cua--prefix-override-timer
@@ -1251,9 +1225,6 @@
   (define-key cua-global-keymap [remap yank-pop]		'cua-paste-pop)
   ;; set mark
   (define-key cua-global-keymap [remap set-mark-command]	'cua-set-mark)
-  ;; undo
-  (define-key cua-global-keymap [remap undo]		'cua-undo)
-  (define-key cua-global-keymap [remap advertised-undo]	'cua-undo)
 
   ;; scrolling
   (define-key cua-global-keymap [remap scroll-up]	'cua-scroll-up)
@@ -1305,6 +1276,20 @@
   (define-key cua--region-keymap [remap keyboard-quit]		'cua-cancel)
   )
 
+
+;; Setup standard movement commands to be recognized by CUA.
+
+(dolist (cmd
+ '(forward-char backward-char
+   next-line previous-line
+   forward-word backward-word
+   end-of-line beginning-of-line
+   end-of-buffer beginning-of-buffer
+   scroll-up scroll-down
+   forward-sentence backward-sentence
+   forward-paragraph backward-paragraph))
+  (put cmd 'CUA 'move))
+
 ;; State prior to enabling cua-mode
 ;; Value is a list with the following elements:
 ;;   transient-mark-mode
@@ -1350,9 +1335,6 @@
     (add-to-list 'emulation-mode-map-alists 'cua--keymap-alist)
     (cua--select-keymaps))
 
-  (if (fboundp 'cua--rectangle-on-off)
-      (cua--rectangle-on-off cua-mode))
-
   (cond
    (cua-mode
     (setq cua--saved-state
@@ -1389,7 +1371,7 @@
   (setq cua--debug (not cua--debug)))
 
 ;; Install run-time check for older versions of CUA-mode which does not
-;; work with GNU Emacs version 21.4 and newer.
+;; work with GNU Emacs version 22.1 and newer.
 ;;
 ;; Except for version 1.2, all of the 1.x and 2.x version of cua-mode
 ;; provided the `CUA-mode' feature.  Since this is no longer true,
--- a/lisp/emulation/cua-rect.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/emulation/cua-rect.el	Sun Feb 13 07:19:08 2005 +0000
@@ -1,6 +1,6 @@
 ;;; cua-rect.el --- CUA unified rectangle support
 
-;; Copyright (C) 1997-2002, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2002, 2004, 2005 Free Software Foundation, Inc.
 
 ;; Author: Kim F. Storm <storm@cua.dk>
 ;; Keywords: keyboard emulations convenience CUA
@@ -71,71 +71,28 @@
 
 (defvar cua--virtual-edges-debug nil)
 
-;; Per-buffer CUA mode undo list.
-(defvar cua--undo-list nil)
-(make-variable-buffer-local 'cua--undo-list)
+;; Undo rectangle commands.
 
-;; Record undo boundary for rectangle undo.
+(defvar cua--rect-undo-set-point nil)
+
 (defun cua--rectangle-undo-boundary ()
   (when (listp buffer-undo-list)
-    (if (> (length cua--undo-list) cua-undo-max)
-        (setcdr (nthcdr (1- cua-undo-max) cua--undo-list) nil))
-    (undo-boundary)
-    (setq cua--undo-list
-          (cons (cons (cdr buffer-undo-list) (copy-sequence cua--rectangle)) cua--undo-list))))
-
-(defun cua--rectangle-undo (&optional arg)
-  "Undo some previous changes.
-Knows about CUA rectangle highlighting in addition to standard undo."
-  (interactive "*P")
-  (if cua--rectangle
-      (cua--rectangle-undo-boundary))
-  (undo arg)
-  (let ((l cua--undo-list))
-    (while l
-      (if (eq (car (car l)) pending-undo-list)
-          (setq cua--restored-rectangle
-                (and (vectorp (cdr (car l))) (cdr (car l)))
-                l nil)
-        (setq l (cdr l)))))
-  (setq cua--buffer-and-point-before-command nil))
-
-(defvar cua--tidy-undo-counter 0
-  "Number of times `cua--tidy-undo-lists' have run successfully.")
+    (let ((s (cua--rect-start-position))
+	  (e (cua--rect-end-position)))
+      (undo-boundary)
+      (push (list 'apply 0 s e
+		  'cua--rect-undo-handler
+		  (copy-sequence cua--rectangle) t s e)
+	  buffer-undo-list))))
 
-;; Clean out dangling entries from cua's undo list.
-;; Since this list contains pointers into the standard undo list,
-;; such references are only meningful as undo information if the
-;; corresponding entry is still on the standard undo list.
-
-(defun cua--tidy-undo-lists (&optional clean)
-  (let ((buffers (buffer-list)) (cnt cua--tidy-undo-counter))
-    (while (and buffers (or clean (not (input-pending-p))))
-      (with-current-buffer (car buffers)
-        (when (local-variable-p 'cua--undo-list)
-          (if (or clean (null cua--undo-list) (eq buffer-undo-list t))
-              (progn
-                (kill-local-variable 'cua--undo-list)
-                (setq cua--tidy-undo-counter (1+ cua--tidy-undo-counter)))
-            (let* ((bul buffer-undo-list)
-                   (cul (cons nil cua--undo-list))
-                   (cc (car (car (cdr cul)))))
-              (while (and bul cc)
-                (if (setq bul (memq cc bul))
-                    (setq cul (cdr cul)
-                          cc (and (cdr cul) (car (car (cdr cul)))))))
-              (when cc
-                (if cua--debug
-                    (setq cc (length (cdr cul))))
-                (if (eq (cdr cul) cua--undo-list)
-                    (setq cua--undo-list nil)
-                  (setcdr cul nil))
-                (setq cua--tidy-undo-counter (1+ cua--tidy-undo-counter))
-                (if cua--debug
-                    (message "Clean undo list in %s (%d)"
-                             (buffer-name) cc)))))))
-      (setq buffers (cdr buffers)))
-    (/= cnt cua--tidy-undo-counter)))
+(defun cua--rect-undo-handler (rect on s e)
+  (if (setq on (not on))
+      (setq cua--rect-undo-set-point s)
+    (setq cua--restored-rectangle (copy-sequence rect))
+    (setq cua--buffer-and-point-before-command nil))
+  (push (list 'apply 0 s (if on e s)
+	      'cua--rect-undo-handler rect on s e)
+	buffer-undo-list))
 
 ;;; Rectangle geometry
 
@@ -287,6 +244,27 @@
 	(backward-char 1))
     ))
 
+(defun cua--rect-start-position ()
+  ;; Return point of top left corner
+  (save-excursion
+    (goto-char (cua--rectangle-top))
+    (and (> (move-to-column (cua--rectangle-left))
+	    (cua--rectangle-left))
+	 (not (bolp))
+	 (backward-char 1))
+    (point)))
+
+(defun cua--rect-end-position ()
+  ;; Return point of bottom right cornet
+  (save-excursion
+    (goto-char (cua--rectangle-bot))
+    (and (= (move-to-column (cua--rectangle-right))
+	    (- (cua--rectangle-right) tab-width))
+	 (not (eolp))
+	 (not (bolp))
+	 (backward-char 1))
+    (point)))
+
 ;;; Rectangle resizing
 
 (defun cua--forward-line (n)
@@ -1394,10 +1372,12 @@
 
 (defun cua--rectangle-post-command ()
   (if cua--restored-rectangle
-      (setq cua--rectangle cua--restored-rectangle
-            cua--restored-rectangle nil
-            mark-active t
-            deactivate-mark nil)
+      (progn
+	(setq cua--rectangle cua--restored-rectangle
+	      cua--restored-rectangle nil
+	      mark-active t
+	      deactivate-mark nil)
+	(cua--rectangle-set-corners))
     (when (and cua--rectangle cua--buffer-and-point-before-command
                (equal (car cua--buffer-and-point-before-command) (current-buffer))
                (not (= (cdr cua--buffer-and-point-before-command) (point))))
@@ -1411,20 +1391,16 @@
       (if (and mark-active
                (not deactivate-mark))
           (cua--highlight-rectangle)
-        (cua--deactivate-rectangle))))
-
+        (cua--deactivate-rectangle)))
+  (when cua--rect-undo-set-point
+    (goto-char cua--rect-undo-set-point)
+    (setq cua--rect-undo-set-point nil)))
 
 ;;; Initialization
 
 (defun cua--rect-M/H-key (key cmd)
   (cua--M/H-key cua--rectangle-keymap key cmd))
 
-(defun cua--rectangle-on-off (on)
-  (cancel-function-timers 'cua--tidy-undo-lists)
-  (if on
-      (run-with-idle-timer 10 t 'cua--tidy-undo-lists)
-    (cua--tidy-undo-lists t)))
-
 (defun cua--init-rectangles ()
   (unless (face-background 'cua-rectangle-face)
     (copy-face 'region 'cua-rectangle-face)
--- a/lisp/emulation/keypad.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/emulation/keypad.el	Sun Feb 13 07:19:08 2005 +0000
@@ -108,7 +108,7 @@
 	     (keypad-setup value nil nil value)))
   :initialize 'custom-initialize-default
   :link '(emacs-commentary-link "keypad.el")
-  :version "21.4"
+  :version "22.1"
   :type '(choice (const :tag "Plain numeric keypad" numeric)
 		 (character :tag "Numeric Keypad with Decimal Key"
 			    :match (lambda (widget value) (integerp value))
@@ -131,7 +131,7 @@
 	     (keypad-setup value t nil value)))
   :initialize 'custom-initialize-default
   :link '(emacs-commentary-link "keypad.el")
-  :version "21.4"
+  :version "22.1"
   :type '(choice (const :tag "Plain numeric keypad" numeric)
 		 (character :tag "Numeric Keypad with Decimal Key"
 			    :match (lambda (widget value) (integerp value))
@@ -154,7 +154,7 @@
 	     (keypad-setup value nil t value)))
   :initialize 'custom-initialize-default
   :link '(emacs-commentary-link "keypad.el")
-  :version "21.4"
+  :version "22.1"
   :type '(choice (const :tag "Plain numeric keypad" numeric)
 		 (character :tag "Numeric Keypad with Decimal Key"
 			    :match (lambda (widget value) (integerp value))
@@ -177,7 +177,7 @@
 	     (keypad-setup value t t value)))
   :initialize 'custom-initialize-default
   :link '(emacs-commentary-link "keypad.el")
-  :version "21.4"
+  :version "22.1"
   :type '(choice (const :tag "Plain numeric keypad" numeric)
 		 (character :tag "Numeric Keypad with Decimal Key"
 			    :match (lambda (widget value) (integerp value))
--- a/lisp/faces.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/faces.el	Sun Feb 13 07:19:08 2005 +0000
@@ -1823,7 +1823,7 @@
      :box (:line-width -1 :color "grey40" :style nil)
      :foreground "grey80" :background "grey30"))
   "Basic mode line face for non-selected windows."
-  :version "21.4"
+  :version "22.1"
   :group 'modeline
   :group 'basic-faces)
 
@@ -1884,7 +1884,7 @@
 			     (((type pc)) :foreground "magenta")
 			     (t :foreground "dark blue"))
   "Face for minibuffer prompts."
-  :version "21.4"
+  :version "22.1"
   :group 'basic-faces)
 
 (setq minibuffer-prompt-properties
--- a/lisp/files.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/files.el	Sun Feb 13 07:19:08 2005 +0000
@@ -305,7 +305,7 @@
 		 (const :tag "When visiting or saving" visit-save)
 		 (other :tag "Ask" ask))
   :group 'editing-basics
-  :version "21.4")
+  :version "22.1")
 
 (defcustom auto-save-default t
   "*Non-nil says by default do auto-saving of every file-visiting buffer."
@@ -377,7 +377,7 @@
 The functions are called in the order given until one of them returns non-nil.")
 (defvaralias 'find-file-not-found-hooks 'find-file-not-found-functions)
 (make-obsolete-variable
- 'find-file-not-found-hooks 'find-file-not-found-functions "21.4")
+ 'find-file-not-found-hooks 'find-file-not-found-functions "22.1")
 
 ;;;It is not useful to make this a local variable.
 ;;;(put 'find-file-hooks 'permanent-local t)
@@ -388,9 +388,9 @@
   :group 'find-file
   :type 'hook
   :options '(auto-insert)
-  :version "21.4")
+  :version "22.1")
 (defvaralias 'find-file-hooks 'find-file-hook)
-(make-obsolete-variable 'find-file-hooks 'find-file-hook "21.4")
+(make-obsolete-variable 'find-file-hooks 'find-file-hook "22.1")
 
 (defvar write-file-functions nil
   "List of functions to be called before writing out a buffer to a file.
@@ -409,12 +409,12 @@
 updates before the buffer is saved, use `before-save-hook' .")
 (put 'write-file-functions 'permanent-local t)
 (defvaralias 'write-file-hooks 'write-file-functions)
-(make-obsolete-variable 'write-file-hooks 'write-file-functions "21.4")
+(make-obsolete-variable 'write-file-hooks 'write-file-functions "22.1")
 
 (defvar local-write-file-hooks nil)
 (make-variable-buffer-local 'local-write-file-hooks)
 (put 'local-write-file-hooks 'permanent-local t)
-(make-obsolete-variable 'local-write-file-hooks 'write-file-functions "21.4")
+(make-obsolete-variable 'local-write-file-hooks 'write-file-functions "22.1")
 
 (defvar write-contents-functions nil
   "List of functions to be called before writing out a buffer to a file.
@@ -434,7 +434,7 @@
 use `before-save-hook'.")
 (make-variable-buffer-local 'write-contents-functions)
 (defvaralias 'write-contents-hooks 'write-contents-functions)
-(make-obsolete-variable 'write-contents-hooks 'write-contents-functions "21.4")
+(make-obsolete-variable 'write-contents-hooks 'write-contents-functions "22.1")
 
 (defcustom enable-local-variables t
   "*Control use of local variables in files you visit.
@@ -1284,7 +1284,7 @@
 When nil, never request confirmation."
   :group 'files
   :group 'find-file
-  :version "21.4"
+  :version "22.1"
   :type '(choice integer (const :tag "Never request confirmation" nil)))
 
 (defun find-file-noselect (filename &optional nowarn rawfile wildcards)
@@ -2378,7 +2378,7 @@
 they appear in an `eval' local variable specification, without first
 asking you for confirmation."
   :group 'find-file
-  :version "21.4"
+  :version "22.1"
   :type '(repeat sexp))
 
 (put 'c-set-style 'safe-local-eval-function t)
@@ -3470,7 +3470,7 @@
 	     (buffer-list)
 	     '("buffer" "buffers" "save")
 	     save-some-buffers-action-alist))
-      ;; Maybe to save abbrevs, and record whether 
+      ;; Maybe to save abbrevs, and record whether
       ;; we either saved them or asked to.
       (and save-abbrevs abbrevs-changed
 	   (progn
--- a/lisp/filesets.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/filesets.el	Sun Feb 13 07:19:08 2005 +0000
@@ -296,7 +296,7 @@
   "The fileset swapper."
   :prefix "filesets-"
   :group 'convenience
-  :version "21.4")
+  :version "22.1")
 
 (defcustom filesets-menu-name "Filesets"
   "*Filesets' menu name."
--- a/lisp/find-dired.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/find-dired.el	Sun Feb 13 07:19:08 2005 +0000
@@ -62,7 +62,7 @@
 them for `find-ls-option'."
   :type 'string
   :group 'find-dired
-  :version "21.4")
+  :version "22.1")
 
 ;;;###autoload
 (defcustom find-grep-options
--- a/lisp/font-core.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/font-core.el	Sun Feb 13 07:19:08 2005 +0000
@@ -203,7 +203,8 @@
   ;; `font-lock-defaults'.
   (when (or font-lock-defaults
 	    (and (boundp 'font-lock-keywords) font-lock-keywords)
-	    (cdr (assq major-mode font-lock-defaults-alist)))
+	    (with-no-warnings
+	     (cdr (assq major-mode font-lock-defaults-alist))))
     (font-lock-mode-internal mode)))
 
 (defun turn-on-font-lock ()
--- a/lisp/frame.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/frame.el	Sun Feb 13 07:19:08 2005 +0000
@@ -135,7 +135,7 @@
 	   ;; (set-window-dedicated-p window t)
 	   window))
        ;; If no window yet, make one in a new frame.
-       (let ((frame 
+       (let ((frame
 	      (with-current-buffer buffer
 		(make-frame (append args special-display-frame-alist)))))
 	 (set-window-buffer (frame-selected-window frame) buffer)
@@ -593,7 +593,7 @@
 
 ;; Alias, kept temporarily.
 (defalias 'new-frame 'make-frame)
-(make-obsolete 'new-frame 'make-frame "21.4")
+(make-obsolete 'new-frame 'make-frame "22.1")
 
 (defun make-frame (&optional parameters)
   "Return a newly created frame displaying the current buffer.
@@ -1195,7 +1195,7 @@
 
 ;; miscellaneous obsolescence declarations
 (defvaralias 'delete-frame-hook 'delete-frame-functions)
-(make-obsolete-variable 'delete-frame-hook 'delete-frame-functions "21.4")
+(make-obsolete-variable 'delete-frame-hook 'delete-frame-functions "22.1")
 
 
 ;; Highlighting trailing whitespace.
@@ -1253,10 +1253,36 @@
 
 (defvar blink-cursor-timer nil
   "Timer started from `blink-cursor-start'.
-This timer calls `blink-cursor' every `blink-cursor-interval' seconds.")
+This timer calls `blink-cursor-timer-function' every
+`blink-cursor-interval' seconds.")
 
-(defvar blink-cursor-mode nil
-  "Non-nil means blinking cursor is active.")
+;; The strange sequence below is meant to set both the right temporary
+;; value and the right "standard expression" , according to Custom,
+;; for blink-cursor-mode.  We do not know the standard _evaluated_
+;; value yet, because the standard expression uses values that are not
+;; yet set.  Evaluating it now would yield an error, but we make sure
+;; that it is not evaluated, by ensuring that blink-cursor-mode is set
+;; before the defcustom is evaluated and by using the right :initialize
+;; function.  The correct evaluated standard value will be installed
+;; in startup.el using exactly the same expression as in the defcustom.
+(defvar blink-cursor-mode)
+(unless (boundp 'blink-cursor-mode) (setq blink-cursor-mode nil))
+(defcustom blink-cursor-mode
+  (not (or noninteractive
+	   emacs-quick-startup
+	   (eq system-type 'ms-dos)
+	   (not (memq window-system '(x w32)))))
+  "*Non-nil means Blinking Cursor mode is active."
+  :group 'cursor
+  :tag "Blinking cursor"
+  :type 'boolean
+  :initialize 'custom-initialize-set
+  :set #'(lambda (symbol value)
+	   (set-default symbol value)
+	   (blink-cursor-mode (or value 0))))
+
+(defvaralias 'blink-cursor 'blink-cursor-mode)
+(make-obsolete-variable 'blink-cursor 'blink-cursor-mode "22.1")
 
 (defun blink-cursor-mode (arg)
   "Toggle blinking cursor mode.
@@ -1289,18 +1315,6 @@
 	  (setq blink-cursor-mode t))
       (internal-show-cursor nil t))))
 
-;; Note that this is really initialized from startup.el before
-;; the init-file is read.
-
-(defcustom blink-cursor nil
-  "*Non-nil means blinking cursor mode is active."
-  :group 'cursor
-  :tag "Blinking cursor"
-  :type 'boolean
-  :set #'(lambda (symbol value)
-	   (set-default symbol value)
-	   (blink-cursor-mode (or value 0))))
-
 (defun blink-cursor-start ()
   "Timer function called from the timer `blink-cursor-idle-timer'.
 This starts the timer `blink-cursor-timer', which makes the cursor blink
--- a/lisp/fringe.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/fringe.el	Sun Feb 13 07:19:08 2005 +0000
@@ -37,7 +37,7 @@
 
 (defgroup fringe nil
   "Window fringes."
-  :version "21.4"
+  :version "22.1"
   :group 'frames)
 
 ;; Standard fringe bitmaps
--- a/lisp/gnus/ChangeLog	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/ChangeLog	Sun Feb 13 07:19:08 2005 +0000
@@ -1174,7 +1174,7 @@
 	* pgg-gpg.el (pgg-gpg-lookup-all-secret-keys)
 	(pgg-gpg-lookup-key): Use regexp match instead of
 	split-string (split-string is different between emacs 21.2 and
-	21.4).  Reported by ultrasoul@ultrasoul.com (David D. Smith).
+	22.1).  Reported by ultrasoul@ultrasoul.com (David D. Smith).
 
 2004-07-28  Simon Josefsson  <jas@extundo.com>
 
--- a/lisp/gnus/ChangeLog.2	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/ChangeLog.2	Sun Feb 13 07:19:08 2005 +0000
@@ -50,7 +50,7 @@
 	* gnus-sum.el (gnus-select-newsgroup): Use cat.
 
 	* gnus-agent.el (gnus-agent-cat-enable-undownloaded-faces): New
-	cat. 
+	cat.
 
 	* gnus.el (gnus-user-agent): Moved here.
 
@@ -108,7 +108,7 @@
 2003-12-31  Jeremy Maitin-Shepard  <jbms@attbi.com>
 
 	* mml.el (mml-generate-mime-1): Use mml-compute-boundary (tiny
-	change). 
+	change).
 
 2003-12-30  Reiner Steib  <Reiner.Steib@gmx.de>
 
@@ -391,7 +391,7 @@
 
 	* gnus-cus.el (gnus-agent-customize-category): Added missing
 	agent-disable-undownloaded-faces parameter.
-	
+
 	* gnus-start.el (gnus-activate-group): Backed out my 2003-11-29
 	patch as it was too late at adjusting the active range.
 	(gnus-get-unread-articles-in-group): Added call to new
@@ -401,7 +401,7 @@
 
 	* message.el (message-get-reply-headers): Narrow to headers.
 
-2003-12-10  Teodor Zlatanov  <tzz@lifelogs.com> 
+2003-12-10  Teodor Zlatanov  <tzz@lifelogs.com>
 
 	* spam.el (spam-disable-spam-split-during-ham-respool): new
 	variable.  From lorentey@elte.hu (L,Bu(Brentey K,Ba(Broly)
@@ -557,7 +557,7 @@
 
 2003-11-30  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-	* gnus-agent.el (gnus-agent-covered-methods): Remove nil methods. 
+	* gnus-agent.el (gnus-agent-covered-methods): Remove nil methods.
 
 2003-11-29  Kevin Greiner <kgreiner@xpediantsolutions.com>
 	* gnus-start.el (gnus-activate-group): The active range of the
@@ -813,16 +813,16 @@
 	nnmail-cache-insert
 
 	* nnmh.el (nnmh-request-accept-article): pass sender to
-	nnmail-cache-insert 
+	nnmail-cache-insert
 
 	* nnmbox.el (nnmbox-request-accept-article): pass sender to
-	nnmail-cache-insert 
+	nnmail-cache-insert
 
 	* nnfolder.el (nnfolder-request-accept-article): pass sender to
-	nnmail-cache-insert 
+	nnmail-cache-insert
 
 	* nnbabyl.el (nnbabyl-request-accept-article): pass sender to
-	nnmail-cache-insert 
+	nnmail-cache-insert
 
 	* nnmail.el (nnmail-cache-insert): accept sender parameter and
 	pass it to the nnmail-spool-hook
@@ -887,7 +887,7 @@
 	* gnus.el (gnus-group-guess-full-name-from-command-method): new	function
 
 	* gnus-registry.el (gnus-registry-fetch-group): use long names if
-	requested 
+	requested
 	(gnus-registry-split-fancy-with-parent): when long names are in
 	use, strip the name if we're in the native server, or else return nothing
 	(gnus-registry-spool-action, gnus-registry-action): use
@@ -990,7 +990,7 @@
 
 2003-10-27  Romain FRANCOISE  <romain@orebokech.com>
 
-	* gnus-art.el (gnus-article-goto-prev-page): Doc fix. 
+	* gnus-art.el (gnus-article-goto-prev-page): Doc fix.
 
 2003-10-27  Simon Josefsson  <jas@extundo.com>
 
@@ -1069,7 +1069,7 @@
 	building with XEmacs so byte-compile it.
 	(dgnushack-make-load): When building with XEmacs do nothing except
 	byte-compile the autoload file and create a dummy gnus-load.el
-	file. 
+	file.
 
 2003-10-23  Katsumi Yamaoka  <yamaoka@jpl.org>
 
@@ -1128,7 +1128,7 @@
 2003-10-21  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 	* gnus-picon.el (gnus-picon-transform-address): Protect against
-	errors. 
+	errors.
 
 2003-10-20  Katsumi Yamaoka  <yamaoka@jpl.org>
 
@@ -1140,12 +1140,12 @@
 2003-10-20  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 	* spam-report.el (spam-report-url-ping-plain): Include a
-	User-Agent. 
+	User-Agent.
 
 	* gnus-msg.el (gnus-extended-version): Use it.
 
 	* gnus-util.el (gnus-emacs-version): Separated out into own
-	function. 
+	function.
 
 2003-10-19  Reiner Steib  <Reiner.Steib@gmx.de>
 
@@ -1181,15 +1181,15 @@
 2003-10-18  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 	* pop3.el (pop3-read-response): Check whether the process is
-	alive. 
+	alive.
 
 	* gnus-sum.el (gnus-summary-refer-article): Strip spaces.
 
 	* rfc2047.el (rfc2047-encode-region): Do error out on invalid
-	strings. 
+	strings.
 
 	* nntp.el (nntp-retrieve-headers-with-xover): Get error messages
-	right. 
+	right.
 
 	* gnus-agent.el (gnus-agent-read-servers): Remove sit-for.
 
@@ -1198,14 +1198,14 @@
 	* message.el (message-field-value): New function.
 	(message-insert-disposition-notification-to): Use Reply-To, too.
 
-	* imap.el (imap-mailbox-status): Upcase STATUS commands. 
+	* imap.el (imap-mailbox-status): Upcase STATUS commands.
 
 	* gnus-sum.el (gnus-remove-odd-characters): New function.
 	(gnus-nov-parse-line): Use it.
 
 2003-10-18  Matt Swift  <swift@alum.mit.edu>
 
-	* mm-decode.el (mm-inline-media-tests): Recognize pjpeg as jpeg. 
+	* mm-decode.el (mm-inline-media-tests): Recognize pjpeg as jpeg.
 
 2003-10-18  Romain FRANCOISE  <romain@orebokech.com>
 
@@ -1269,14 +1269,14 @@
 2003-10-17  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 	* gnus-sum.el (gnus-summary-enter-digest-group): ogroup, nor
-	group. 
+	group.
 
 	* gnus-msg.el (gnus-inews-insert-archive-gcc): Use the parent
 	name for gcc-self.
 	(gnus-inews-insert-archive-gcc): Paren mistake.
 
 	* gnus-sum.el (gnus-summary-enter-digest-group): Add
-	parent-group. 
+	parent-group.
 
 	* gnus-art.el (gnus-ignored-headers): Add more headers.
 
@@ -1297,7 +1297,7 @@
 	(mail-source-fetch-imap): Use them.
 
 	* nndraft.el (nndraft-request-move-article): Fix infinite
-	recursion. 
+	recursion.
 
 	* gnus-group.el (gnus-group-mark-regexp): Jump to groups.
 
@@ -1310,7 +1310,7 @@
 
 	* message.el (message-inserted-headers): New variable.
 	(message-mode): Make local.
-	(message-mode): Set all the local action variables to nil.	
+	(message-mode): Set all the local action variables to nil.
 
 2003-10-16  Katsumi Yamaoka  <yamaoka@jpl.org>
 
@@ -1368,7 +1368,7 @@
 	found (idea from Adrian Lanz <lanz@fowi.ethz.ch>)
 	(spam-check-bogofilter-headers, spam-check-blackholes, spam-check-BBDB)
 	(spam-from-listed-p): use nnmail-fetch-field instead of message-fetch-field
-	
+
 
 2003-10-03  Katsumi Yamaoka  <yamaoka@jpl.org>
 
@@ -1439,7 +1439,7 @@
 	to MML.  MIME -> MML -> MIME does not work for PGP/MIME.
 
 	* message.el (message-bounce, message-forward-show-mml): do.
-	
+
 2003-09-13  Jesper Harder  <harder@ifa.au.dk>
 
 	* rfc2047.el (rfc2047-charset-encoding-alist): Add viscii.
@@ -1760,7 +1760,7 @@
 
 2003-07-25  Teodor Zlatanov  <tzz@lifelogs.com>
 
-	* spam.el (spam-use-regex-body, spam-regex-body-spam) 
+	* spam.el (spam-use-regex-body, spam-regex-body-spam)
 	(spam-regex-body-ham): new variables, default to nil/empty/empty
 	(spam-install-hooks): added spam-use-regex-body to list or
 	pre-install conditions
@@ -1947,7 +1947,7 @@
 2003-06-24  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 	* gnus-ems.el (gnus-put-image): Mark the right text segment with
-	gnus-image-category. 
+	gnus-image-category.
 
 	* gnus-srvr.el (gnus-browse-unsubscribe-group): Strip prefix from
 	native groups.
@@ -4809,7 +4809,7 @@
 2003-02-20  Jesper Harder  <harder@ifa.au.dk>
 
 	* gnus-spec.el (gnus-xmas-format): Use insert instead of
-	insert-string which is obsolete in Emacs 21.4.
+	insert-string which is obsolete in Emacs 22.1.
 
 	* message.el (message-cross-post-followup-to-header): do.
 
--- a/lisp/gnus/binhex.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/binhex.el	Sun Feb 13 07:19:08 2005 +0000
@@ -50,7 +50,7 @@
 (defcustom binhex-use-external
   (executable-find binhex-decoder-program)
   "*Use external binhex program."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-extract
   :type 'boolean)
 
--- a/lisp/gnus/deuglify.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/deuglify.el	Sun Feb 13 07:19:08 2005 +0000
@@ -146,7 +146,7 @@
 ;; Hey, John.  There's no in all your sentences!
 ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; 
+;;
 ;; Usage
 ;; -----
 ;;
@@ -231,59 +231,59 @@
 
 (defgroup gnus-outlook-deuglify nil
   "Deuglify articles generated by broken user agents like MS Outlook (Express)."
-  :version "21.4")
+  :version "22.1")
 
 ;;;###autoload
 (defcustom gnus-outlook-deuglify-unwrap-min 45
   "Minimum length of the cited line above the (possibly) wrapped line."
-  :version "21.4"
+  :version "22.1"
   :type 'integer
   :group 'gnus-outlook-deuglify)
 
 ;;;###autoload
 (defcustom gnus-outlook-deuglify-unwrap-max 95
   "Maximum length of the cited line after unwrapping."
-  :version "21.4"
+  :version "22.1"
   :type 'integer
   :group 'gnus-outlook-deuglify)
 
 (defcustom gnus-outlook-deuglify-cite-marks ">|#%"
   "Characters that indicate cited lines."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :group 'gnus-outlook-deuglify)
 
 (defcustom gnus-outlook-deuglify-unwrap-stop-chars nil ;; ".?!" or nil
   "Characters that inhibit unwrapping if they are the last one on the cited line above the possible wrapped line."
-  :version "21.4"
+  :version "22.1"
   :type '(radio (const :format "None  " nil)
 		(string :value ".?!"))
   :group 'gnus-outlook-deuglify)
 
 (defcustom gnus-outlook-deuglify-no-wrap-chars "`"
   "Characters that inhibit unwrapping if they are the first one in the possibly wrapped line."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :group 'gnus-outlook-deuglify)
 
 (defcustom  gnus-outlook-deuglify-attrib-cut-regexp
   "\\(On \\|Am \\)?\\(Mon\\|Tue\\|Wed\\|Thu\\|Fri\\|Sat\\|Sun\\),[^,]+, "
   "Regular expression matching the beginning of an attribution line that should be cut off."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :group 'gnus-outlook-deuglify)
 
 (defcustom gnus-outlook-deuglify-attrib-verb-regexp
   "wrote\\|writes\\|says\\|schrieb\\|schreibt\\|meinte\\|skrev\\|a écrit\\|schreef\\|escribió"
   "Regular expression matching the verb used in an attribution line."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :group 'gnus-outlook-deuglify)
 
 (defcustom  gnus-outlook-deuglify-attrib-end-regexp
   ": *\\|\\.\\.\\."
   "Regular expression matching the end of an attribution line."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :group 'gnus-outlook-deuglify)
 
@@ -291,7 +291,7 @@
 (defcustom gnus-outlook-display-hook nil
   "A hook called after an deuglified article has been prepared.
 It is run after `gnus-article-prepare-hook'."
-  :version "21.4"
+  :version "22.1"
   :type 'hook
   :group 'gnus-outlook-deuglify)
 
--- a/lisp/gnus/flow-fill.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/flow-fill.el	Sun Feb 13 07:19:08 2005 +0000
@@ -56,7 +56,7 @@
 (defcustom fill-flowed-display-column 'fill-column
   "Column beyond which format=flowed lines are wrapped, when displayed.
 This can be a Lisp expression or an integer."
-  :version "21.4"
+  :version "22.1"
   :group 'mime-display
   :type '(choice (const :tag "Standard `fill-column'" fill-column)
 		 (const :tag "Fit Window" (- (window-width) 5))
@@ -67,7 +67,7 @@
   "Column beyond which format=flowed lines are wrapped, in outgoing messages.
 This can be a Lisp expression or an integer.
 RFC 2646 suggests 66 characters for readability."
-  :version "21.4"
+  :version "22.1"
   :group 'mime-display
   :type '(choice (const :tag "Standard fill-column" fill-column)
 		 (const :tag "RFC 2646 default (66)" 66)
@@ -163,19 +163,19 @@
   '(
     ;; The syntax of each list element is:
     ;; (INPUT . EXPECTED-OUTPUT)
-    ("> Thou villainous ill-breeding spongy dizzy-eyed 
-> reeky elf-skinned pigeon-egg! 
->> Thou artless swag-bellied milk-livered 
+    ("> Thou villainous ill-breeding spongy dizzy-eyed
+> reeky elf-skinned pigeon-egg!
+>> Thou artless swag-bellied milk-livered
 >> dismal-dreaming idle-headed scut!
->>> Thou errant folly-fallen spleeny reeling-ripe 
+>>> Thou errant folly-fallen spleeny reeling-ripe
 >>> unmuzzled ratsbane!
->>>> Henceforth, the coding style is to be strictly 
+>>>> Henceforth, the coding style is to be strictly
 >>>> enforced, including the use of only upper case.
->>>>> I've noticed a lack of adherence to the coding 
+>>>>> I've noticed a lack of adherence to the coding
 >>>>> styles, of late.
 >>>>>> Any complaints?
 " . "> Thou villainous ill-breeding spongy dizzy-eyed reeky elf-skinned
-> pigeon-egg! 
+> pigeon-egg!
 >> Thou artless swag-bellied milk-livered dismal-dreaming idle-headed
 >> scut!
 >>> Thou errant folly-fallen spleeny reeling-ripe unmuzzled ratsbane!
@@ -186,8 +186,8 @@
 ")
 ;    ("
 ;> foo
-;> 
-;> 
+;>
+;>
 ;> bar
 ;" . "
 ;> foo bar
--- a/lisp/gnus/gnus-agent.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/gnus-agent.el	Sun Feb 13 07:19:08 2005 +0000
@@ -60,7 +60,7 @@
 
 (defcustom gnus-agent-fetched-hook nil
   "Hook run when finished fetching articles."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-agent
   :type 'hook)
 
@@ -152,7 +152,7 @@
 groups with large active ranges may open slower and you may also want
 to look into the agent expiry settings to block the expiration of
 read articles as they would just be downloaded again."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'gnus-agent)
 
@@ -160,7 +160,7 @@
   "Chunk size for `gnus-agent-fetch-session'.
 The function will split its article fetches into chunks smaller than
 this limit."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-agent
   :type 'integer)
 
@@ -171,7 +171,7 @@
 to disable expiration in specific categories, topics, and groups.  Of
 course, you could change gnus-agent-enable-expiration to DISABLE then
 enable expiration per categories, topics, and groups."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-agent
   :type '(radio (const :format "Enable " ENABLE)
                 (const :format "Disable " DISABLE)))
@@ -181,7 +181,7 @@
 Have gnus-agent-expire scan the directories under
 \(gnus-agent-directory) for groups that are no longer agentized.
 When found, offer to remove them."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'gnus-agent)
 
@@ -189,7 +189,7 @@
   "Initially, all servers from these methods are agentized.
 The user may remove or add servers using the Server buffer.
 See Info node `(gnus)Server Buffer'."
-  :version "21.4"
+  :version "22.1"
   :type '(repeat symbol)
   :group 'gnus-agent)
 
@@ -197,7 +197,7 @@
   "Whether and when outgoing mail should be queued by the agent.
 When `always', always queue outgoing mail.  When nil, never
 queue.  Otherwise, queue if and only if unplugged."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-agent
   :type '(radio (const :format "Always" always)
 		(const :format "Never" nil)
@@ -206,7 +206,7 @@
 (defcustom gnus-agent-prompt-send-queue nil
   "If non-nil, `gnus-group-send-queue' will prompt if called when
 unplugged."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-agent
   :type 'boolean)
 
@@ -215,13 +215,13 @@
 (defvar gnus-agent-history-buffers nil)
 (defvar gnus-agent-buffer-alist nil)
 (defvar gnus-agent-article-alist nil
-  "An assoc list identifying the articles whose headers have been fetched.  
+  "An assoc list identifying the articles whose headers have been fetched.
 If successfully fetched, these headers will be stored in the group's overview
 file.  The key of each assoc pair is the article ID, the value of each assoc
 pair is a flag indicating whether the identified article has been downloaded
 \(gnus-agent-fetch-articles sets the value to the day of the download).
 NOTES:
-1) The last element of this list can not be expired as some 
+1) The last element of this list can not be expired as some
    routines (for example, get-agent-fetch-headers) use the last
    value to track which articles have had their headers retrieved.
 2) The function `gnus-agent-regenerate' may destructively modify the value.")
@@ -821,11 +821,11 @@
       (erase-buffer)
       (nnheader-insert-file-contents (gnus-agent-lib-file "flags"))
       (cond ((null gnus-plugged)
-	     (gnus-message 
-	      1 "You must be plugged to synchronize flags with server %s" 
+	     (gnus-message
+	      1 "You must be plugged to synchronize flags with server %s"
 	      (nth 1 gnus-command-method)))
 	    ((null (gnus-check-server gnus-command-method))
-	     (gnus-message 
+	     (gnus-message
 	      1 "Couldn't open server %s" (nth 1 gnus-command-method)))
 	    (t
 	     (condition-case err
@@ -873,7 +873,7 @@
       (gnus-agent-save-group-info old-command-method old-real-group nil)
       (gnus-agent-save-group-info new-command-method new-real-group old-active)
 
-      (let ((old-local (gnus-agent-get-local old-group 
+      (let ((old-local (gnus-agent-get-local old-group
 					     old-real-group old-command-method)))
 	(gnus-agent-set-local old-group
 			      nil nil
@@ -896,7 +896,7 @@
     (let* ((real-group (gnus-group-real-name group)))
       (gnus-agent-save-group-info command-method real-group nil)
 
-      (let ((local (gnus-agent-get-local group 
+      (let ((local (gnus-agent-get-local group
 					 real-group command-method)))
 	(gnus-agent-set-local group
 			      nil nil
@@ -937,7 +937,7 @@
     (unless (member named-server gnus-agent-covered-methods)
       (error "Server not in the agent program"))
 
-    (setq gnus-agent-covered-methods 
+    (setq gnus-agent-covered-methods
           (delete named-server gnus-agent-covered-methods)
           gnus-agent-method-p-cache nil)
 
@@ -947,7 +947,7 @@
 
 (defun gnus-agent-read-servers ()
   "Read the alist of covered servers."
-  (setq gnus-agent-covered-methods 
+  (setq gnus-agent-covered-methods
         (gnus-agent-read-file
          (nnheader-concat gnus-agent-directory "lib/servers"))
         gnus-agent-method-p-cache nil)
@@ -1079,7 +1079,7 @@
                    ;; imply that this article isn't in the agent.
 		   (gnus-agent-append-to-list tail-undownloaded h)
 		   (gnus-agent-append-to-list tail-unfetched    h)
-                   (setq headers (cdr headers))) 
+                   (setq headers (cdr headers)))
 		  ((cdar alist)
 		   (setq alist (cdr alist))
 		   (setq headers (cdr headers))
@@ -1088,7 +1088,7 @@
 		  (t
 		   (setq alist (cdr alist))
 		   (setq headers (cdr headers))
-                   
+
                    ;; This article isn't in the agent.  Check to see
                    ;; if it is in the cache.  If it is, it's been
                    ;; downloaded.
@@ -1166,7 +1166,7 @@
                       gnus-newsgroup-name articles)))))
       (save-excursion
         (dolist (article articles)
-          (let ((was-marked-downloadable 
+          (let ((was-marked-downloadable
                  (memq article gnus-newsgroup-downloadable)))
             (cond (gnus-agent-mark-unread-after-downloaded
                    (setq gnus-newsgroup-downloadable
@@ -1206,8 +1206,8 @@
 	  ;; trying to call gnus-request-set-mark, I have to
 	  ;; reconstruct the original group name.
 	  (or (gnus-get-info group)
-	      (gnus-get-info 
-	       (setq group (gnus-group-full-name 
+	      (gnus-get-info
+	       (setq group (gnus-group-full-name
 			    group gnus-command-method))))))
     (gnus-request-set-mark group actions)
 
@@ -1218,14 +1218,14 @@
 	      (marks (nth 2 action)))
 	  (dolist (mark marks)
 	    (cond ((eq mark 'read)
-		   (gnus-info-set-read 
+		   (gnus-info-set-read
 		    info
 		    (funcall (if (eq what 'add)
 				 'gnus-range-add
 			       'gnus-remove-from-range)
 			     (gnus-info-read info)
 			     range))
-		   (gnus-get-unread-articles-in-group 
+		   (gnus-get-unread-articles-in-group
 		    info
 		    (gnus-active (gnus-info-group info))))
 		  ((memq mark '(tick))
@@ -1293,11 +1293,11 @@
           ;; file.
 
           (let ((read (gnus-info-read info)))
-            (gnus-info-set-read 
-             info 
-             (gnus-range-add 
-              read 
-              (list (cons (1+ agent-max) 
+            (gnus-info-set-read
+             info
+             (gnus-range-add
+              read
+              (list (cons (1+ agent-max)
                           (1- active-min))))))
 
           ;; Lie about the agent's local range for this group to
@@ -1370,7 +1370,7 @@
   (setq group
         (nnheader-translate-file-chars
          (nnheader-replace-duplicate-chars-in-string
-          (nnheader-replace-chars-in-string 
+          (nnheader-replace-chars-in-string
            (gnus-group-real-name group)
            ?/ ?_)
           ?. ?_)))
@@ -1451,7 +1451,7 @@
         (unless (and (eq article (caar alist))
                      (cdar alist))
           ;; Skip headers preceeding this article
-          (while (> article 
+          (while (> article
                     (setq header-number
                           (let* ((header (car headers)))
                             (if header
@@ -2017,8 +2017,8 @@
       (setq prev (cdr prev)))
     (setq gnus-agent-article-alist (cdr all))
 
-    (gnus-agent-set-local group 
-                          (caar gnus-agent-article-alist) 
+    (gnus-agent-set-local group
+                          (caar gnus-agent-article-alist)
                           (caar (last gnus-agent-article-alist)))
 
     (gnus-make-directory (gnus-agent-article-name "" group))
@@ -2073,7 +2073,7 @@
 
 (defun gnus-agent-read-local (file)
   "Load FILE and do a `read' there."
-  (let ((my-obarray (gnus-make-hashtable (count-lines (point-min) 
+  (let ((my-obarray (gnus-make-hashtable (count-lines (point-min)
                                                       (point-max))))
         (line 1))
     (with-temp-buffer
@@ -2090,7 +2090,7 @@
 
       (while (not (eobp))
         (condition-case err
-            (let (group 
+            (let (group
                   min
                   max
                   (cur (current-buffer)))
@@ -2108,7 +2108,7 @@
                          file line (error-message-string err))))
         (forward-line 1)
         (setq line (1+ line))))
-      
+
     (set (intern "+dirty" my-obarray) nil)
     (set (intern "+method" my-obarray) gnus-command-method)
     my-obarray))
@@ -2141,7 +2141,7 @@
 				   (princ (car range))
 				   (princ " ")
 				   (princ (cdr range))
-				   (princ "\n"))))) 
+				   (princ "\n")))))
 			my-obarray))))))))
 
 (defun gnus-agent-get-local (group &optional gmane method)
@@ -2160,7 +2160,7 @@
           (setq minmax
                 (cons (caar alist)
                       (caar (last alist))))
-          (gnus-agent-set-local group (car minmax) (cdr minmax) 
+          (gnus-agent-set-local group (car minmax) (cdr minmax)
                                 gmane gnus-command-method local))))
     minmax))
 
@@ -2170,7 +2170,7 @@
          (local (or local (gnus-agent-load-local)))
          (symb (intern gmane local))
          (minmax (and (boundp symb) (symbol-value symb))))
-    
+
     (if (cond ((and minmax
                     (or (not (eq min (car minmax)))
                         (not (eq max (cdr minmax)))))
@@ -2836,7 +2836,7 @@
 It is okay to miss some cases, but there must be no false positives.
 That is, if this predicate returns true, then indeed the predicate must
 return only unread articles."
-  (eq t (gnus-function-implies-unread-1 
+  (eq t (gnus-function-implies-unread-1
          (gnus-category-make-function-1 predicate))))
 
 (defun gnus-function-implies-unread-1 (function)
@@ -2957,12 +2957,12 @@
 
   (let ((dir (gnus-agent-group-pathname group)))
     (when (boundp 'gnus-agent-expire-current-dirs)
-      (set 'gnus-agent-expire-current-dirs 
-	   (cons dir 
+      (set 'gnus-agent-expire-current-dirs
+	   (cons dir
 		 (symbol-value 'gnus-agent-expire-current-dirs))))
 
     (if (and (not force)
-	     (eq 'DISABLE (gnus-agent-find-parameter group 
+	     (eq 'DISABLE (gnus-agent-find-parameter group
 						     'agent-enable-expiration)))
 	(gnus-message 5 "Expiry skipping over %s" group)
       (gnus-message 5 "Expiring articles in %s" group)
@@ -3299,7 +3299,7 @@
 Setting GROUP will limit expiration to that group.
 FORCE is equivalent to setting the expiration predicates to true."
   (interactive)
-  
+
   (if group
       (gnus-agent-expire-group group articles force)
     (if (or (not (eq articles t))
@@ -3328,7 +3328,7 @@
                                              gnus-command-method))
                       (let* ((active
                               (gnus-gethash-safe expiring-group orig)))
-                                        
+
                         (when active
                           (save-excursion
                             (gnus-agent-expire-group-1
@@ -3349,9 +3349,9 @@
                 units (cdr units)))
 
         (format "Expiry recovered %d NOV entries, deleted %d files,\
- and freed %f %s." 
-                (nth 0 stats) 
-                (nth 1 stats) 
+ and freed %f %s."
+                (nth 0 stats)
+                (nth 1 stats)
                 size (car units)))
     "Expiry...done"))
 
@@ -3379,9 +3379,9 @@
              (checker
               (function
                (lambda (d)
-                 "Given a directory, check it and its subdirectories for 
-              membership in the keep hash.  If it isn't found, add 
-              it to to-remove." 
+                 "Given a directory, check it and its subdirectories for
+              membership in the keep hash.  If it isn't found, add
+              it to to-remove."
                  (let ((files (directory-files d))
                        file)
                    (while (setq file (pop files))
@@ -3389,7 +3389,7 @@
                             nil)
                            ((equal file "..") ; Ignore parent
                             nil)
-                           ((equal file ".overview") 
+                           ((equal file ".overview")
                             ;; Directory must contain .overview to be
                             ;; agent's cache of a group.
                             (let ((d (file-name-as-directory d))
@@ -3402,7 +3402,7 @@
                                       d (directory-file-name d)))
                               ;; if ANY ancestor was NOT in keep hash and
                               ;; it it's already in to-remove, add it to
-                              ;; to-remove.                          
+                              ;; to-remove.
                               (if (and r
                                        (not (member r to-remove)))
                                   (push r to-remove))))
@@ -3854,7 +3854,7 @@
 
             (when regenerated
               (gnus-agent-save-alist group)
-       
+
               ;; I have to alter the group's active range NOW as
               ;; gnus-make-ascending-articles-unread will use it to
               ;; recalculate the number of unread articles in the group
--- a/lisp/gnus/gnus-art.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/gnus-art.el	Sun Feb 13 07:19:08 2005 +0000
@@ -213,7 +213,7 @@
 signatures, but will never scroll down to show you a page consisting
 only of boring text.  Boring text is controlled by
 `gnus-article-boring-faces'."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'gnus-article-hiding)
 
@@ -318,7 +318,7 @@
 		   (symbol :tag "Item in `gnus-article-banner-alist'" none)
 		   regexp
 		   (const :tag "None" nil))))
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-washing)
 
 (defmacro gnus-emphasis-custom-with-format (&rest body)
@@ -806,7 +806,7 @@
 To see e.g. security buttons you could set this to
 `(\"multipart/signed\")'.
 This variable is only used when `gnus-inhibit-mime-unbuttonizing' is nil."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-mime
   :type '(repeat regexp))
 
@@ -815,14 +815,14 @@
 When nil (the default value), then some MIME parts do not get buttons,
 as described by the variables `gnus-buttonized-mime-types' and
 `gnus-unbuttonized-mime-types'."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean)
 
 (defcustom gnus-body-boundary-delimiter "_"
   "String used to delimit header and body.
 This variable is used by `gnus-article-treat-body-boundary' which can
 be controlled by `gnus-treat-body-boundary'."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-various
   :type '(choice (item :tag "None" :value nil)
 		 string))
@@ -831,7 +831,7 @@
   "Defines the location of the faces database.
 For information on obtaining this database of pretty pictures, please
 see http://www.cs.indiana.edu/picons/ftp/index.html"
-  :version "21.4"
+  :version "22.1"
   :type '(repeat directory)
   :link '(url-link :tag "download"
 		   "http://www.cs.indiana.edu/picons/ftp/index.html")
@@ -972,7 +972,7 @@
   "Remove carriage returns.
 Valid values are nil, t, `head', `last', an integer or a predicate.
 See Info node `(gnus)Customizing Articles' for details."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-treat
   :link '(custom-manual "(gnus)Customizing Articles")
   :type gnus-article-treat-custom)
@@ -981,7 +981,7 @@
   "Remove newlines from within URLs.
 Valid values are nil, t, `head', `last', an integer or a predicate.
 See Info node `(gnus)Customizing Articles' for details."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-treat
   :link '(custom-manual "(gnus)Customizing Articles")
   :type gnus-article-treat-custom)
@@ -990,7 +990,7 @@
   "Remove leading whitespace in headers.
 Valid values are nil, t, `head', `last', an integer or a predicate.
 See Info node `(gnus)Customizing Articles' for details."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-treat
   :link '(custom-manual "(gnus)Customizing Articles")
   :type gnus-article-treat-custom)
@@ -1110,7 +1110,7 @@
   "Display the Date in a format that can be read aloud in English.
 Valid values are nil, t, `head', `last', an integer or a predicate.
 See Info node `(gnus)Customizing Articles' for details."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-treat
   :link '(custom-manual "(gnus)Customizing Articles")
   :type gnus-article-treat-head-custom)
@@ -1186,7 +1186,7 @@
   "Unfold folded header lines.
 Valid values are nil, t, `head', `last', an integer or a predicate.
 See Info node `(gnus)Customizing Articles' for details."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-treat
   :link '(custom-manual "(gnus)Customizing Articles")
   :type gnus-article-treat-custom)
@@ -1195,7 +1195,7 @@
   "Fold headers.
 Valid values are nil, t, `head', `last', an integer or a predicate.
 See Info node `(gnus)Customizing Articles' for details."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-treat
   :link '(custom-manual "(gnus)Customizing Articles")
   :type gnus-article-treat-custom)
@@ -1204,7 +1204,7 @@
   "Fold the Newsgroups and Followup-To headers.
 Valid values are nil, t, `head', `last', an integer or a predicate.
 See Info node `(gnus)Customizing Articles' for details."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-treat
   :link '(custom-manual "(gnus)Customizing Articles")
   :type gnus-article-treat-custom)
@@ -1270,7 +1270,7 @@
 See Info node `(gnus)Customizing Articles' and Info node
 `(gnus)X-Face' for details."
   :group 'gnus-article-treat
-  :version "21.4"
+  :version "22.1"
   :link '(custom-manual "(gnus)Customizing Articles")
   :link '(custom-manual "(gnus)X-Face")
   :type gnus-article-treat-head-custom)
@@ -1301,7 +1301,7 @@
 Valid values are nil, t, `head', `last', an integer or a predicate.
 See Info node `(gnus)Customizing Articles' and Info node
 `(gnus)Picons' for details."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-treat
   :group 'gnus-picon
   :link '(custom-manual "(gnus)Customizing Articles")
@@ -1317,7 +1317,7 @@
 Valid values are nil, t, `head', `last', an integer or a predicate.
 See Info node `(gnus)Customizing Articles' and Info node
 `(gnus)Picons' for details."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-treat
   :group 'gnus-picon
   :link '(custom-manual "(gnus)Customizing Articles")
@@ -1333,7 +1333,7 @@
 Valid values are nil, t, `head', `last', an integer or a predicate.
 See Info node `(gnus)Customizing Articles' and Info node
 `(gnus)Picons' for details."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-treat
   :group 'gnus-picon
   :link '(custom-manual "(gnus)Customizing Articles")
@@ -1349,7 +1349,7 @@
   "Draw a boundary at the end of the headers.
 Valid values are nil and `head'.
 See Info node `(gnus)Customizing Articles' for details."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-treat
   :link '(custom-manual "(gnus)Customizing Articles")
   :type gnus-article-treat-head-custom)
@@ -1367,7 +1367,7 @@
   "Format as HTML.
 Valid values are nil, t, `head', `last', an integer or a predicate.
 See Info node `(gnus)Customizing Articles' for details."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-treat
   :link '(custom-manual "(gnus)Customizing Articles")
   :type gnus-article-treat-custom)
@@ -1403,7 +1403,7 @@
 To automatically treat X-PGP-Sig, set it to head.
 Valid values are nil, t, `head', `last', an integer or a predicate.
 See Info node `(gnus)Customizing Articles' for details."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-treat
   :group 'mime-security
   :link '(custom-manual "(gnus)Customizing Articles")
@@ -1417,7 +1417,7 @@
 (defcustom gnus-article-encrypt-protocol "PGP"
   "The protocol used for encrypt articles.
 It is a string, such as \"PGP\". If nil, ask user."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :group 'mime-security)
 
@@ -1429,13 +1429,13 @@
 			      (executable-find idna-program))
   "Whether IDNA decoding of headers is used when viewing messages.
 This requires GNU Libidn, and by default only enabled if it is found."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-headers
   :type 'boolean)
 
 (defcustom gnus-article-over-scroll nil
   "If non-nil, allow scrolling the article buffer even when there no more text."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article
   :type 'boolean)
 
@@ -4703,7 +4703,7 @@
 
 (defcustom gnus-mime-display-multipart-alternative-as-mixed nil
   "Display \"multipart/alternative\" parts as  \"multipart/mixed\"."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-mime
   :type 'boolean)
 
@@ -4713,7 +4713,7 @@
 If displaying \"text/html\" is discouraged \(see
 `mm-discouraged-alternatives'\) images or other material inside a
 \"multipart/related\" part might be overlooked when this variable is nil."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-mime
   :type 'boolean)
 
@@ -5821,7 +5821,7 @@
 (defcustom gnus-button-valid-fqdn-regexp
   message-valid-fqdn-regexp
   "Regular expression that matches a valid FQDN."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-buttons
   :type 'regexp)
 
@@ -5829,7 +5829,7 @@
   "Function to use for displaying man pages.
 The function must take at least one argument with a string naming the
 man page."
-  :version "21.4"
+  :version "22.1"
   :type '(choice (function-item :tag "Man" manual-entry)
 		 (function-item :tag "Woman" woman)
 		 (function :tag "Other"))
@@ -5840,7 +5840,7 @@
 If the default site is too slow, try to find a CTAN mirror, see
 <URL:http://tug.ctan.org/tex-archive/CTAN.sites?action=/index.html>.  See also
 the variable `gnus-button-handle-ctan'."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-buttons
   :link '(custom-manual "(gnus)Group Parameters")
   :type '(choice (const "http://www.tex.ac.uk/tex-archive/")
@@ -5851,14 +5851,14 @@
 (defcustom gnus-button-ctan-handler 'browse-url
   "Function to use for displaying CTAN links.
 The function must take one argument, the string naming the URL."
-  :version "21.4"
+  :version "22.1"
   :type '(choice (function-item :tag "Browse Url" browse-url)
 		 (function :tag "Other"))
   :group 'gnus-article-buttons)
 
 (defcustom gnus-button-handle-ctan-bogus-regexp "^/?tex-archive/\\|^/"
   "Bogus strings removed from CTAN URLs."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-buttons
   :type '(choice (const "^/?tex-archive/\\|/")
 		 (regexp :tag "Other")))
@@ -5872,7 +5872,7 @@
    "\\)")
   "Regular expression for ctan directories.
 It should match all directories in the top level of `gnus-ctan-url'."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-buttons
   :type 'regexp)
 
@@ -5882,7 +5882,7 @@
 	  gnus-button-valid-fqdn-regexp
 	  ">?\\)\\b")
   "Regular expression that matches a message ID or a mail address."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-buttons
   :type 'regexp)
 
@@ -5894,7 +5894,7 @@
 symbol `ask', always query the user what do do.  If it is a function, this
 function will be called with the string as it's only argument.  The function
 must return `mid', `mail', `invalid' or `ask'."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-buttons
   :type '(choice (function-item :tag "Heuristic function"
 				gnus-button-mid-or-mail-heuristic)
@@ -5958,7 +5958,7 @@
 
 A negative RATE indicates a message IDs, whereas a positive indicates a mail
 address.  The REGEXP is processed with `case-fold-search' set to nil."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-buttons
   :type '(repeat (cons (number :tag "Rate")
 		       (regexp :tag "Regexp"))))
@@ -6143,7 +6143,7 @@
 specific groups.  Setting it higher in TeX groups is probably a good idea.
 See Info node `(gnus)Group Parameters' and the variable `gnus-parameters' on
 how to set variables in specific groups."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-buttons
   :link '(custom-manual "(gnus)Group Parameters")
   :type 'integer)
@@ -6155,7 +6155,7 @@
 specific groups.  Setting it higher in Unix groups is probably a good idea.
 See Info node `(gnus)Group Parameters' and the variable `gnus-parameters' on
 how to set variables in specific groups."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-buttons
   :link '(custom-manual "(gnus)Group Parameters")
   :type 'integer)
@@ -6167,7 +6167,7 @@
 specific groups.  Setting it higher in Emacs or Gnus related groups is
 probably a good idea.  See Info node `(gnus)Group Parameters' and the variable
 `gnus-parameters' on how to set variables in specific groups."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-buttons
   :link '(custom-manual "(gnus)Group Parameters")
   :type 'integer)
@@ -6177,7 +6177,7 @@
 The higher the number, the more buttons will appear and the more false
 positives are possible."
   ;; mail addresses, MIDs, URLs for news, ...
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-buttons
   :type 'integer)
 
@@ -6186,7 +6186,7 @@
 The higher the number, the more buttons will appear and the more false
 positives are possible."
   ;; stuff handled by `browse-url' or `gnus-button-embedded-url'
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-article-buttons
   :type 'integer)
 
@@ -6716,10 +6716,10 @@
   (if (string-match "\\([^#]+\\)#?\\(.*\\)" url)
       (gnus-info-find-node
        (concat "("
-	       (gnus-url-unhex-string 
+	       (gnus-url-unhex-string
 		 (match-string 1 url))
 	       ")"
-	       (or (gnus-url-unhex-string 
+	       (or (gnus-url-unhex-string
 		    (match-string 2 url))
 		   "Top")))
     (error "Can't parse %s" url)))
--- a/lisp/gnus/gnus-cite.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/gnus-cite.el	Sun Feb 13 07:19:08 2005 +0000
@@ -124,7 +124,7 @@
 (defcustom gnus-cite-unsightly-citation-regexp
   "^-----Original Message-----\nFrom: \\(.+\n\\)+\n"
   "Regexp matching Microsoft-type rest-of-message citations."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-cite
   :type 'regexp)
 
@@ -132,7 +132,7 @@
   "Non-nil means don't regard lines beginning with \">From \" as cited text.
 Those lines may have been quoted by MTAs in order not to mix up with
 the envelope From line."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-cite
   :type 'boolean)
 
@@ -143,7 +143,7 @@
 (defcustom gnus-cite-attribution-face 'gnus-cite-attribution-face
   "Face used for attribution lines.
 It is merged with the face for the cited text belonging to the attribution."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-cite
   :type 'face)
 
--- a/lisp/gnus/gnus-delay.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/gnus-delay.el	Sun Feb 13 07:19:08 2005 +0000
@@ -41,7 +41,7 @@
 ;;;###autoload
 (defgroup gnus-delay nil
   "Arrange for sending postings later."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus)
 
 (defcustom gnus-delay-group "delayed"
@@ -61,7 +61,7 @@
 
 (defcustom gnus-delay-default-hour 8
   "*If deadline is given as date, then assume this time of day."
-  :version "21.4"
+  :version "22.1"
   :type 'integer
   :group 'gnus-delay)
 
--- a/lisp/gnus/gnus-diary.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/gnus-diary.el	Sun Feb 13 07:19:08 2005 +0000
@@ -103,7 +103,7 @@
 
 (defgroup gnus-diary nil
   "Utilities on top of the nndiary backend for Gnus."
-  :version "21.4")
+  :version "22.1")
 
 (defcustom gnus-diary-summary-line-format "%U%R%z %uD: %(%s%) (%ud)\n"
   "*Summary line format for nndiary groups."
--- a/lisp/gnus/gnus-fun.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/gnus-fun.el	Sun Feb 13 07:19:08 2005 +0000
@@ -34,13 +34,13 @@
 
 (defcustom gnus-x-face-directory (expand-file-name "x-faces" gnus-directory)
   "*Directory where X-Face PBM files are stored."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-fun
   :type 'directory)
 
 (defcustom gnus-convert-pbm-to-x-face-command "pbmtoxbm %s | compface"
   "Command for converting a PBM to an X-Face."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-fun
   :type 'string)
 
@@ -48,7 +48,7 @@
   "Command for converting an image to an X-Face.
 By default it takes a GIF filename and output the X-Face header data
 on stdout."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-fun
   :type 'string)
 
@@ -56,7 +56,7 @@
   "Command for converting an image to an Face.
 By default it takes a JPEG filename and output the Face header data
 on stdout."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-fun
   :type 'string)
 
--- a/lisp/gnus/gnus-group.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/gnus-group.el	Sun Feb 13 07:19:08 2005 +0000
@@ -435,7 +435,7 @@
 If non-nil, the value should be a string, e.g. \"nnml:\",
 in which case `gnus-group-jump-to-group' offers \"Group: nnml:\"
 in the minibuffer prompt."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-group-various
   :type '(choice (string :tag "Prompt string")
 		 (const :tag "Empty" nil)))
@@ -1965,14 +1965,14 @@
 If the number of articles in a newsgroup is greater than this value,
 confirmation is required for selecting the newsgroup.  If it is nil, no
 confirmation is required."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-group-select
   :type '(choice (const :tag "No limit" nil)
 		 integer))
 
 (defcustom gnus-fetch-old-ephemeral-headers nil
   "Same as `gnus-fetch-old-headers', but only used for ephemeral newsgroups."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-thread
   :type '(choice (const :tag "off" nil)
 		 (const some)
--- a/lisp/gnus/gnus-int.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/gnus-int.el	Sun Feb 13 07:19:08 2005 +0000
@@ -47,7 +47,7 @@
 `denied', set the server denied; `offline', set the server offline;
 nil, ask user.  If the server is not covered by Gnus agent, set the
 server denied."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-start
   :type '(choice (const :tag "Ask" nil)
 		 (const :tag "Deny server" denied)
@@ -573,7 +573,7 @@
 	       (gnus-agent-method-p gnus-command-method))
       (gnus-agent-unfetch-articles group (list article)))
     result))
-    
+
 (defun gnus-request-accept-article (group &optional gnus-command-method last
 					  no-encode)
   ;; Make sure there's a newline at the end of the article.
@@ -596,8 +596,8 @@
       (message-encode-message-body)))
 (let ((gnus-command-method (or gnus-command-method
 				 (gnus-find-method-for-group group)))
-	(result 
-	 (funcall 
+	(result
+	 (funcall
 	  (gnus-get-function gnus-command-method 'request-accept-article)
 	  (if (stringp group) (gnus-group-real-name group) group)
 	  (cadr gnus-command-method)
--- a/lisp/gnus/gnus-msg.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/gnus-msg.el	Sun Feb 13 07:19:08 2005 +0000
@@ -142,7 +142,7 @@
 
 (defcustom gnus-gcc-mark-as-read nil
   "If non-nil, automatically mark Gcc articles as read."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-message
   :type 'boolean)
 
@@ -154,7 +154,7 @@
 If it is `all', attach files as external parts;
 if a regexp and matches the Gcc group name, attach files as external parts;
 if nil, attach files as normal parts."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-message
   :type '(choice (const nil :tag "None")
 		 (const all :tag "Any")
@@ -212,7 +212,7 @@
     "gnus-agent.el" "gnus-cache.el" "gnus-srvr.el"
     "mm-util.el" "mm-decode.el" "nnmail.el" "message.el")
   "Files whose variables will be reported in `gnus-bug'."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-message
   :type '(repeat (string :tag "File")))
 
@@ -220,7 +220,7 @@
   '(mm-mime-mule-charset-alist
     nnmail-split-fancy message-minibuffer-local-map)
   "Variables that should not be reported in `gnus-bug'."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-message
   :type '(repeat (symbol :tag "Variable")))
 
@@ -228,7 +228,7 @@
   '(nndraft nnml nnimap nnmaildir nnmh nnfolder nndir)
   "A list of back ends that are not used in \"real\" newsgroups.
 This variable is used only when `gnus-post-method' is `current'."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-group-foreign
   :type '(repeat (symbol :tag "Back end")))
 
@@ -260,7 +260,7 @@
 parameter which should return non-nil iff a confirmation is needed, or
 a regexp, in which case a confirmation is asked for iff the group name
 matches the regexp."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-message
   :type '(choice (const :tag "No" nil)
 		 (const :tag "Yes" t)
@@ -273,7 +273,7 @@
 when replying by mail.  See the `gnus-confirm-mail-reply-to-news' variable
 for fine-tuning this.
 If nil, Gnus will never ask for confirmation if replying to mail."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-message
   :type 'boolean)
 
@@ -281,7 +281,7 @@
   "If non-nil, Gnus tries to suggest a default address to resend to.
 If nil, the address field will always be empty after invoking
 `gnus-summary-resend-message'."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-message
   :type 'boolean)
 
--- a/lisp/gnus/gnus-registry.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/gnus-registry.el	Sun Feb 13 07:19:08 2005 +0000
@@ -66,7 +66,7 @@
 
 (defgroup gnus-registry nil
   "The Gnus registry."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus)
 
 (defvar gnus-registry-hashtb nil
@@ -99,7 +99,7 @@
 The Subject and Sender (From:) headers are currently tracked this
 way."
   :group 'gnus-registry
-  :type      
+  :type
   '(set :tag "Tracking choices"
     (const :tag "Track by subject (Subject: header)" subject)
     (const :tag "Track by sender (From: header)"  sender)))
@@ -188,12 +188,12 @@
 				 "%s#tmp#%d"))
 			     working-dir (setq i (1+ i))))
 		      (file-exists-p working-file)))
-	
+
 	(unwind-protect
 	    (progn
 	      (gnus-with-output-to-file working-file
 		(gnus-gnus-to-quick-newsrc-format t "gnus registry startup file" 'gnus-registry-alist))
-	      
+
 	      ;; These bindings will mislead the current buffer
 	      ;; into thinking that it is visiting the startup
 	      ;; file.
@@ -203,14 +203,14 @@
 		    (setmodes (file-modes startup-file)))
 		;; Backup the current version of the startup file.
 		(backup-buffer)
-		
+
 		;; Replace the existing startup file with the temp file.
 		(rename-file working-file startup-file t)
 		(set-file-modes startup-file setmodes)))
 	  (condition-case nil
 	      (delete-file working-file)
 	    (file-error nil)))))
-    
+
     (gnus-kill-buffer (current-buffer))
     (gnus-message 5 "Saving %s...done" file))))
 
@@ -238,10 +238,10 @@
 	     (remhash key gnus-registry-hashtb)))
        gnus-registry-hashtb)
       ;; remove empty entries
-      (when gnus-registry-clean-empty 
+      (when gnus-registry-clean-empty
 	(gnus-registry-clean-empty-function))
       ;; now trim the registry appropriately
-      (setq gnus-registry-alist (gnus-registry-trim 
+      (setq gnus-registry-alist (gnus-registry-trim
 				 (hashtable-to-alist gnus-registry-hashtb)))
       ;; really save
       (gnus-registry-cache-save)
@@ -283,15 +283,15 @@
       (setq alist
             (nthcdr
              trim-length
-             (sort alist 
+             (sort alist
                    (lambda (a b)
-                     (time-less-p 
+                     (time-less-p
                       (cdr (gethash (car a) timehash))
                       (cdr (gethash (car b) timehash))))))))))
 
 (defun alist-to-hashtable (alist)
   "Build a hashtable from the values in ALIST."
-  (let ((ht (make-hash-table 			    
+  (let ((ht (make-hash-table
 	     :size 4096
 	     :test 'equal)))
     (mapc
@@ -311,7 +311,7 @@
 
 (defun gnus-registry-action (action data-header from &optional to method)
   (let* ((id (mail-header-id data-header))
-	 (subject (gnus-registry-simplify-subject 
+	 (subject (gnus-registry-simplify-subject
 		   (mail-header-subject data-header)))
 	 (sender (mail-header-from data-header))
 	 (from (gnus-group-guess-full-name-from-command-method from))
@@ -327,7 +327,7 @@
     ;; All except copy will need a delete
     (gnus-registry-delete-group id from)
 
-    (when (equal 'copy action) 
+    (when (equal 'copy action)
       (gnus-registry-add-group id from subject sender)) ; undo the delete
 
     (gnus-registry-add-group id to subject sender)))
@@ -347,7 +347,7 @@
   "Split this message into the same group as its parent.  The parent
 is obtained from the registry.  This function can be used as an entry
 in `nnmail-split-fancy' or `nnimap-split-fancy', for example like
-this: (: gnus-registry-split-fancy-with-parent) 
+this: (: gnus-registry-split-fancy-with-parent)
 
 For a message to be split, it looks for the parent message in the
 References or In-Reply-To header and then looks in the registry to
@@ -369,7 +369,7 @@
 		    (when (or (gnus-registry-grep-in-list
 			       res
 			       gnus-registry-unfollowed-groups)
-			      (gnus-registry-grep-in-list 
+			      (gnus-registry-grep-in-list
 			       res
 			       nnmail-split-fancy-with-parent-ignore-groups))
 		      (setq res nil)))
@@ -385,7 +385,7 @@
 		   sender)
 	  (maphash
 	   (lambda (key value)
-	     (let ((this-sender (cdr 
+	     (let ((this-sender (cdr
 				 (gnus-registry-fetch-extra key 'sender))))
 	       (when (and single-match
 			  this-sender
@@ -408,7 +408,7 @@
 		   (< gnus-registry-minimum-subject-length (length subject)))
 	  (maphash
 	   (lambda (key value)
-	     (let ((this-subject (cdr 
+	     (let ((this-subject (cdr
 				  (gnus-registry-fetch-extra key 'subject))))
 	       (when (and single-match
 			  this-subject
@@ -432,26 +432,26 @@
 	   refstr)
 	  (setq res nil))))
     (gnus-message
-     5 
+     5
      "gnus-registry-split-fancy-with-parent traced %s to group %s"
      refstr (if res res "nil"))
 
     (when (and res gnus-registry-use-long-group-names)
       (let ((m1 (gnus-find-method-for-group res))
-	    (m2 (or gnus-command-method 
+	    (m2 (or gnus-command-method
 		    (gnus-find-method-for-group gnus-newsgroup-name)))
 	    (short-res (gnus-group-short-name res)))
       (if (gnus-methods-equal-p m1 m2)
 	  (progn
 	    (gnus-message
-	     9 
+	     9
 	     "gnus-registry-split-fancy-with-parent stripped group %s to %s"
 	     res
 	     short-res)
 	    (setq res short-res))
 	;; else...
 	(gnus-message
-	 5 
+	 5
 	 "gnus-registry-split-fancy-with-parent ignored foreign group %s"
 	 res)
 	(setq res nil))))
@@ -463,9 +463,9 @@
     (dolist (article gnus-newsgroup-articles)
       (let ((id (gnus-registry-fetch-message-id-fast article)))
 	(unless (gnus-registry-fetch-group id)
-	  (gnus-message 9 "Registry: Registering article %d with group %s" 
+	  (gnus-message 9 "Registry: Registering article %d with group %s"
 			article gnus-newsgroup-name)
-	  (gnus-registry-add-group 
+	  (gnus-registry-add-group
 	   (gnus-registry-fetch-message-id-fast article)
 	   gnus-newsgroup-name
 	   (gnus-registry-fetch-simplified-message-subject-fast article)
@@ -504,7 +504,7 @@
   (when word
     (memq nil
 	  (mapcar 'not
-		  (mapcar 
+		  (mapcar
 		   (lambda (x)
 		     (string-match x word))
 		   list)))))
@@ -540,7 +540,7 @@
 
 	  ;; get the entree from the hash table or from the alist
 	  (setq entree (gethash id entry-cache)))
-	
+
 	(unless entree
 	  (setq entree (assq entry alist))
 	  (when gnus-registry-entry-caching
@@ -581,8 +581,8 @@
     (let ((trail (gethash id gnus-registry-hashtb)))
       (dolist (crumb trail)
 	(when (stringp crumb)
-	  (return (if gnus-registry-use-long-group-names 
-		       crumb 
+	  (return (if gnus-registry-use-long-group-names
+		       crumb
 		     (gnus-group-short-name crumb))))))))
 
 (defun gnus-registry-group-count (id)
@@ -624,8 +624,8 @@
     (when (and id
 	       (not (string-match "totally-fudged-out-message-id" id)))
       (let ((full-group group)
-	    (group (if gnus-registry-use-long-group-names 
-		       group 
+	    (group (if gnus-registry-use-long-group-names
+		       group
 		     (gnus-group-short-name group))))
 	(gnus-registry-delete-group id group)
 
@@ -641,16 +641,16 @@
 	  (when (and (gnus-registry-track-subject-p)
 		     subject)
 	    (gnus-registry-store-extra-entry
-	     id 
-	     'subject 
+	     id
+	     'subject
 	     (gnus-registry-simplify-subject subject)))
 	  (when (and (gnus-registry-track-sender-p)
 		     sender)
 	    (gnus-registry-store-extra-entry
-	     id 
+	     id
 	     'sender
 	     sender))
-	  
+
 	  (gnus-registry-store-extra-entry id 'mtime (current-time)))))))
 
 (defun gnus-registry-clear ()
@@ -671,11 +671,11 @@
 (defun gnus-registry-install-hooks ()
   "Install the registry hooks."
   (interactive)
-  (add-hook 'gnus-summary-article-move-hook 'gnus-registry-action) 
+  (add-hook 'gnus-summary-article-move-hook 'gnus-registry-action)
   (add-hook 'gnus-summary-article-delete-hook 'gnus-registry-action)
   (add-hook 'gnus-summary-article-expire-hook 'gnus-registry-action)
   (add-hook 'nnmail-spool-hook 'gnus-registry-spool-action)
-  
+
   (add-hook 'gnus-save-newsrc-hook 'gnus-registry-save)
   (add-hook 'gnus-read-newsrc-el-hook 'gnus-registry-read)
 
@@ -684,11 +684,11 @@
 (defun gnus-registry-unload-hook ()
   "Uninstall the registry hooks."
   (interactive)
-  (remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action) 
+  (remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action)
   (remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action)
   (remove-hook 'gnus-summary-article-expire-hook 'gnus-registry-action)
   (remove-hook 'nnmail-spool-hook 'gnus-registry-spool-action)
-  
+
   (remove-hook 'gnus-save-newsrc-hook 'gnus-registry-save)
   (remove-hook 'gnus-read-newsrc-el-hook 'gnus-registry-read)
 
--- a/lisp/gnus/gnus-score.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/gnus-score.el	Sun Feb 13 07:19:08 2005 +0000
@@ -237,7 +237,7 @@
 
 (defcustom gnus-adaptive-word-length-limit nil
   "*Words of a length lesser than this limit will be ignored when doing adaptive scoring."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-score-adapt
   :type '(radio (const :format "Unlimited " nil)
 		(integer :format "Maximum length: %v")))
--- a/lisp/gnus/gnus-spec.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/gnus-spec.el	Sun Feb 13 07:19:08 2005 +0000
@@ -32,14 +32,14 @@
 
 (defcustom gnus-use-correct-string-widths (featurep 'xemacs)
   "*If non-nil, use correct functions for dealing with wide characters."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-format
   :type 'boolean)
 
 (defcustom gnus-make-format-preserve-properties (featurep 'xemacs)
   "*If non-nil, use a replacement `format' function which preserves
 text properties. This is only needed on XEmacs, as FSF Emacs does this anyway."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-format
   :type 'boolean)
 
--- a/lisp/gnus/gnus-srvr.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/gnus-srvr.el	Sun Feb 13 07:19:08 2005 +0000
@@ -71,7 +71,7 @@
 (defcustom gnus-server-browse-in-group-buffer nil
   "Whether server browsing should take place in the group buffer.
 If nil, a faster, but more primitive, buffer is used instead."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-server-visual
   :type 'boolean)
 
@@ -205,31 +205,31 @@
 
 (defcustom gnus-server-agent-face 'gnus-server-agent-face
   "Face name to use on AGENTIZED servers."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-server-visual
   :type 'face)
 
 (defcustom gnus-server-opened-face 'gnus-server-opened-face
   "Face name to use on OPENED servers."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-server-visual
   :type 'face)
 
 (defcustom gnus-server-closed-face 'gnus-server-closed-face
   "Face name to use on CLOSED servers."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-server-visual
   :type 'face)
 
 (defcustom gnus-server-denied-face 'gnus-server-denied-face
   "Face name to use on DENIED servers."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-server-visual
   :type 'face)
 
 (defcustom gnus-server-offline-face 'gnus-server-offline-face
   "Face name to use on OFFLINE servers."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-server-visual
   :type 'face)
 
@@ -736,10 +736,10 @@
 	  (if (eq (car method) 'nntp)
 	      (while (not (eobp))
 		(ignore-errors
-		  (push (cons 
-			 (buffer-substring 
+		  (push (cons
+			 (buffer-substring
 			  (point)
-			  (progn 
+			  (progn
 			    (skip-chars-forward "^ \t")
 			    (point)))
 			 (let ((last (read cur)))
@@ -903,7 +903,7 @@
     (beginning-of-line)
     (let ((name (get-text-property (point) 'gnus-group)))
       (when (re-search-forward ": \\(.*\\)$" (gnus-point-at-eol) t)
-	(concat (gnus-method-to-server-name gnus-browse-current-method) ":" 
+	(concat (gnus-method-to-server-name gnus-browse-current-method) ":"
 		(or name
 		    (match-string-no-properties 1)))))))
 
--- a/lisp/gnus/gnus-start.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/gnus-start.el	Sun Feb 13 07:19:08 2005 +0000
@@ -37,7 +37,7 @@
 (autoload 'gnus-agent-save-local "gnus-agent")
 (autoload 'gnus-agent-possibly-alter-active "gnus-agent")
 
-(eval-when-compile 
+(eval-when-compile
   (require 'cl)
 
   (defvar gnus-agent-covered-methods nil)
@@ -54,7 +54,7 @@
   "Whether to create backup files.
 This variable takes the same values as the `version-control'
 variable."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-start
   :type '(choice (const :tag "Never" never)
 		 (const :tag "If existing" nil)
@@ -65,7 +65,7 @@
 the buffer or write directly to the file.  The buffer is faster
 because all of the contents are written at once.  The direct write
 uses considerably less memory."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-start
   :type '(choice (const :tag "Write via buffer" t)
                  (const :tag "Write directly to file" nil)))
@@ -299,7 +299,7 @@
 (defcustom gnus-subscribe-newsgroup-hooks nil
   "*Hooks run after you subscribe to a new group.
 The hooks will be called with new group's name as argument."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-group-new
   :type 'hook)
 
@@ -406,7 +406,7 @@
 
 (defcustom gnus-get-top-new-news-hook nil
   "A hook run just before Gnus checks for new news globally."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-group-new
   :type 'hook)
 
@@ -1908,7 +1908,7 @@
                             (setcdr range (1- article))
                             (setq modified t)
                             ranges))))))))
-                  
+
     (when modified
       (when (eq modified 'remove-null)
         (setq r (delq nil r)))
@@ -2309,7 +2309,7 @@
                                   t)))))
 
               (funcall func convert-to)))
-          (gnus-dribble-enter 
+          (gnus-dribble-enter
            (format ";Converted gnus from version '%s' to '%s'."
                    gnus-newsrc-file-version gnus-version)))))))
 
--- a/lisp/gnus/gnus-sum.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/gnus-sum.el	Sun Feb 13 07:19:08 2005 +0000
@@ -119,7 +119,7 @@
 
 (defcustom gnus-summary-make-false-root-always nil
   "Always make a false dummy root."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-thread
   :type 'boolean)
 
@@ -220,7 +220,7 @@
   "*Default threshold for a high scored article.
 An article will be highlighted as high scored if its score is greater
 than this score."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-score-default
   :type 'integer)
 
@@ -228,7 +228,7 @@
   "*Default threshold for a low scored article.
 An article will be highlighted as low scored if its score is smaller
 than this score."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-score-default
   :type 'integer)
 
@@ -324,7 +324,7 @@
 line of the first unseen article or, if all article have been seen, on the
 subject line of the first unread article), or a function to be called to
 place point on some subject line."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-group-select
   :type '(choice (const best)
 		 (const unread)
@@ -368,7 +368,7 @@
 
 NOTE: The list of unfetched articles will always be nil when plugged
 and, when unplugged, a subset of the undownloaded article list."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary-maneuvering
   :type '(choice (const :tag "None" nil)
                  (const :tag "Undownloaded when unplugged" undownloaded)
@@ -469,7 +469,7 @@
 
 (defcustom gnus-spam-mark ?$
   "*Mark used for spam articles."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary-marks
   :type 'character)
 
@@ -500,13 +500,13 @@
 
 (defcustom gnus-forwarded-mark ?F
   "*Mark used for articles that have been forwarded."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary-marks
   :type 'character)
 
 (defcustom gnus-recent-mark ?N
   "*Mark used for articles that are recent."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary-marks
   :type 'character)
 
@@ -522,13 +522,13 @@
 
 (defcustom gnus-unseen-mark ?.
   "*Mark used for articles that haven't been seen."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary-marks
   :type 'character)
 
 (defcustom gnus-no-mark ?               ;Whitespace
   "*Mark used for articles that have no other secondary mark."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary-marks
   :type 'character)
 
@@ -554,7 +554,7 @@
 
 (defcustom gnus-undownloaded-mark ?-
   "*Mark used for articles that weren't downloaded."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary-marks
   :type 'character)
 
@@ -893,19 +893,19 @@
 
 (defcustom gnus-summary-article-move-hook nil
   "*A hook called after an article is moved, copied, respooled, or crossposted."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary
   :type 'hook)
 
 (defcustom gnus-summary-article-delete-hook nil
   "*A hook called after an article is deleted."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary
   :type 'hook)
 
 (defcustom gnus-summary-article-expire-hook nil
   "*A hook called after an article is expired."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary
   :type 'hook)
 
@@ -913,7 +913,7 @@
   (and (fboundp 'display-graphic-p)
        (display-graphic-p))
   "*If non-nil, display an arrow highlighting the current article."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary
   :type 'boolean)
 
@@ -1091,13 +1091,13 @@
 This is mostly relevant for slow back ends where the user may
 wish to widen the summary buffer to include all headers
 that were fetched.  Say, for nnultimate groups."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary
   :type '(choice boolean regexp))
 
 (defcustom gnus-summary-muttprint-program "muttprint"
   "Command (and optional arguments) used to run Muttprint."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary
   :type 'string)
 
@@ -1107,7 +1107,7 @@
 supply the MIME-Version header or deliberately strip it from the mail.
 Set it to non-nil, Gnus will treat some articles as MIME even if
 the MIME-Version header is missed."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'gnus-article-mime)
 
@@ -1116,7 +1116,7 @@
 This means that Gnus will search message bodies for text that look
 like uuencoded bits, yEncoded bits, and so on, and present that using
 the normal Gnus MIME machinery."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'gnus-article-mime)
 
@@ -4639,39 +4639,39 @@
 (defcustom gnus-sum-thread-tree-root "> "
   "With %B spec, used for the root of a thread.
 If nil, use subject instead."
-  :version "21.4"
+  :version "22.1"
   :type '(radio (const :format "%v  " nil) string)
   :group 'gnus-thread)
 (defcustom gnus-sum-thread-tree-false-root "> "
   "With %B spec, used for a false root of a thread.
 If nil, use subject instead."
-  :version "21.4"
+  :version "22.1"
   :type '(radio (const :format "%v  " nil) string)
   :group 'gnus-thread)
 (defcustom gnus-sum-thread-tree-single-indent ""
   "With %B spec, used for a thread with just one message.
 If nil, use subject instead."
-  :version "21.4"
+  :version "22.1"
   :type '(radio (const :format "%v  " nil) string)
   :group 'gnus-thread)
 (defcustom gnus-sum-thread-tree-vertical "| "
   "With %B spec, used for drawing a vertical line."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :group 'gnus-thread)
 (defcustom gnus-sum-thread-tree-indent "  "
   "With %B spec, used for indenting."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :group 'gnus-thread)
 (defcustom gnus-sum-thread-tree-leaf-with-other "+-> "
   "With %B spec, used for a leaf with brothers."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :group 'gnus-thread)
 (defcustom gnus-sum-thread-tree-single-leaf "\\-> "
   "With %B spec, used for a leaf without brothers."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :group 'gnus-thread)
 
@@ -9182,7 +9182,7 @@
   "If non-nil, show and update the summary buffer as it's being built.
 If the value is t, update the buffer after every line is inserted.  If
 the value is an integer (N), update the display every N lines."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-thread
   :type '(choice (const :tag "off" nil)
 		 number
--- a/lisp/gnus/gnus-util.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/gnus-util.el	Sun Feb 13 07:19:08 2005 +0000
@@ -1125,7 +1125,7 @@
             (standard-output
 	     (lambda (c)
                (aset ,buffer ,leng c)
-                   
+
 	       (if (= ,size (setq ,leng (1+ ,leng)))
 		   (progn (write-region ,buffer nil ,file ,append 'no-msg)
 			  (setq ,leng 0
@@ -1194,7 +1194,7 @@
 Setting it to nil has no effect after the first time `gnus-byte-compile'
 is run."
   :type 'boolean
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-various)
 
 (defun gnus-byte-compile (form)
@@ -1560,8 +1560,8 @@
 			(setq temp (cdr temp)))
 		      (= (length temp) 0))
 	  (delete-directory old-dir)
-	  (setq old-dir (file-name-as-directory 
-			 (file-truename 
+	  (setq old-dir (file-name-as-directory
+			 (file-truename
 			  (concat old-dir "..")))))))))
 
 
--- a/lisp/gnus/gnus-win.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/gnus-win.el	Sun Feb 13 07:19:08 2005 +0000
@@ -62,7 +62,7 @@
   "*If non-nil, frames on all displays will be considered useable by Gnus.
 When nil, only frames on the same display as the selected frame will be
 used to display Gnus windows."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-windows
   :type 'boolean)
 
@@ -199,7 +199,7 @@
 
 (defcustom gnus-configure-windows-hook nil
   "*A hook called when configuring windows."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-windows
   :type 'hook)
 
--- a/lisp/gnus/gnus.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/gnus.el	Sun Feb 13 07:19:08 2005 +0000
@@ -964,7 +964,7 @@
      (\"mail\\\\.me\" (gnus-use-scoring  t))
      (\"list\\\\..*\" (total-expire . t)
 		  (broken-reply-to . t)))"
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-group-various
   :type '(repeat (cons regexp
 		       (repeat sexp))))
@@ -1314,7 +1314,7 @@
 			(gnus-replace-in-string name "\\." "-") "-charter.html")))
   "*An alist of (HIERARCHY . FORM) pairs used to construct the URL of a charter.
 When FORM is evaluated `name' is bound to the name of the group."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-group-various
   :type '(repeat (cons (string :tag "Hierarchy") (sexp :tag "Form"))))
 
@@ -1322,7 +1322,7 @@
   "*Non-nil means that control messages are displayed using `browse-url'.
 Otherwise they are fetched with ange-ftp and displayed in an ephemeral
 group."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-group-various
   :type 'boolean)
 
@@ -1781,7 +1781,7 @@
 		  (list
 		   (regexp :tag "Group Name Regular Expression")
 		   (boolean :tag "Ignored")))
- 
+
  :parameter-type '(boolean :tag "Group Ignored by the Registry")
  :parameter-document
  "Whether the Gnus Registry should ignore this group.")
@@ -1790,7 +1790,7 @@
 (defcustom gnus-install-group-spam-parameters t
   "*Disable the group parameters for spam detection.
 Enable if `G c' in XEmacs is giving you trouble, and make sure to submit a bug report."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'gnus-start)
 
@@ -1891,8 +1891,8 @@
   (gnus-define-group-parameter
    spam-process
    :type list
-   :parameter-type 
-   '(choice 
+   :parameter-type
+   '(choice
      :tag "Spam Summary Exit Processor"
      :value nil
      (list :tag "Spam Summary Exit Processor Choices"
@@ -1933,11 +1933,11 @@
 name regexps that should match all groups in which to do automatic
 spam processing, associated with the appropriate processor."
    :variable-group spam
-   :variable-type 
+   :variable-type
    '(repeat :tag "Spam/Ham Processors"
 	    (list :tag "Spam Summary Exit Processor Choices"
 		  (regexp :tag "Group Regexp")
-		  (set 
+		  (set
 		   :tag "Spam/Ham Summary Exit Processor"
 		   (variable-item gnus-group-spam-exit-processor-ifile)
 		   (variable-item gnus-group-spam-exit-processor-stat)
@@ -1972,7 +1972,7 @@
   (gnus-define-group-parameter
    spam-autodetect
    :type list
-   :parameter-type 
+   :parameter-type
    '(boolean :tag "Spam autodetection")
    :function-document
    "Should spam be autodetected (with spam-split) in this group?"
@@ -1983,7 +1983,7 @@
    Only unseen articles will be examined, unless
    spam-autodetect-recheck-messages is set."
    :variable-group spam
-   :variable-type 
+   :variable-type
    '(repeat
      :tag "Autodetection setting"
      (list
@@ -1997,7 +1997,7 @@
   (gnus-define-group-parameter
    spam-autodetect-methods
    :type list
-   :parameter-type 
+   :parameter-type
    '(choice :tag "Spam autodetection-specific methods"
      (const none)
      (const default)
@@ -2024,7 +2024,7 @@
 will be examined, unless spam-autodetect-recheck-messages is
 set."
    :variable-group spam
-   :variable-type 
+   :variable-type
    '(repeat
      :tag "Autodetection methods"
      (list
@@ -2046,7 +2046,7 @@
 	(variable-item spam-use-bogofilter-headers)
 	(variable-item spam-use-bogofilter)))))
      :parameter-document
-   "Spam autodetection methods.  
+   "Spam autodetection methods.
 Requires the spam-autodetect parameter.  Only unseen articles
 will be examined, unless spam-autodetect-recheck-messages is
 set.")
@@ -2054,7 +2054,7 @@
   (gnus-define-group-parameter
    spam-process-destination
    :type list
-   :parameter-type 
+   :parameter-type
    '(choice :tag "Destination for spam-processed articles at summary exit"
 	    (string :tag "Move to a group")
 	    (repeat :tag "Move to multiple groups"
@@ -2072,7 +2072,7 @@
 group or nil for explicit expiration.  This only makes sense for
 mail groups."
    :variable-group spam
-   :variable-type 
+   :variable-type
    '(repeat
      :tag "Spam-processed articles destination"
      (list
@@ -2085,11 +2085,11 @@
        (const :tag "Expire" nil))))
    :parameter-document
    "Where spam-processed articles will go at summary exit.")
-  
+
   (gnus-define-group-parameter
    ham-process-destination
    :type list
-   :parameter-type 
+   :parameter-type
    '(choice
      :tag "Destination for ham articles at summary exit from a spam group"
      (string :tag "Move to a group")
@@ -2109,7 +2109,7 @@
 group or nil for explicit ignoring.  This only makes sense for
 mail groups, and only works in spam groups."
    :variable-group spam
-   :variable-type 
+   :variable-type
    '(repeat
      :tag "Ham articles destination"
      (list
@@ -2296,7 +2296,7 @@
 When set, Gnus will prefer using the locally stored content rather
 than re-fetching it from the server.  You also need to enable
 `gnus-agent' for this to have any affect."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-agent
   :type 'boolean)
 
@@ -2315,7 +2315,7 @@
 You may customize gnus-agent to disable its use.  However, some
 back ends have started to use the agent as a client-side cache.
 Disabling the agent may result in noticeable loss of performance."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-agent
   :type 'boolean)
 
@@ -2347,7 +2347,7 @@
 `emacs-gnus' plus system configuration\), `emacs-gnus-type' \(same as
 `emacs-gnus' plus system type\) or a custom string.  If you set it to a
 string, be sure to use a valid format, see RFC 2616."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-message
   :type '(choice
 	  (item :tag "Show Gnus and Emacs versions and system type"
@@ -3331,7 +3331,7 @@
               ;; gnus-server-method-cache so this only happens once,
               ;; if at all.
               (let (match)
-                (mapcar 
+                (mapcar
                  (lambda (info)
                    (let ((info-method (gnus-info-method info)))
                      (unless (stringp info-method)
@@ -3992,10 +3992,10 @@
 (defun gnus-agent-method-p (method)
   "Say whether METHOD is covered by the agent."
   (or (eq (car gnus-agent-method-p-cache) method)
-      (setq gnus-agent-method-p-cache 
+      (setq gnus-agent-method-p-cache
             (cons method
-                  (member (if (stringp method) 
-                              method 
+                  (member (if (stringp method)
+                              method
                             (gnus-method-to-server method)) gnus-agent-covered-methods))))
   (cdr gnus-agent-method-p-cache))
 
--- a/lisp/gnus/imap.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/imap.el	Sun Feb 13 07:19:08 2005 +0000
@@ -228,7 +228,7 @@
 system has no ptys or if all ptys are busy: then a pipe is used
 in any case.  The value takes effect when a IMAP server is
 opened, changing it after that has no effect."
-  :version "21.4"
+  :version "22.1"
   :group 'imap
   :type 'boolean)
 
--- a/lisp/gnus/mail-source.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/mail-source.el	Sun Feb 13 07:19:08 2005 +0000
@@ -236,7 +236,7 @@
   "*Ignore errors when querying mail sources.
 If nil, the user will be prompted when an error occurs.  If non-nil,
 the error will be ignored."
-  :version "21.4"
+  :version "22.1"
   :group 'mail-source
   :type 'boolean)
 
@@ -284,7 +284,7 @@
   "*If non-nil, ask for for confirmation before deleting old incoming files.
 This variable only applies when `mail-source-delete-incoming' is a positive
 number."
-  :version "21.4"
+  :version "22.1"
   :group 'mail-source
   :type 'boolean)
 
@@ -305,7 +305,7 @@
 
 (defcustom mail-source-movemail-program nil
   "If non-nil, name of program for fetching new mail."
-  :version "21.4"
+  :version "22.1"
   :group 'mail-source
   :type '(choice (const nil) string))
 
@@ -512,7 +512,7 @@
 			       (format "Mail source %s error (%s).  Continue? "
 				       (if (memq ':password source)
 					   (let ((s (copy-sequence source)))
-					     (setcar (cdr (memq ':password s)) 
+					     (setcar (cdr (memq ':password s))
 						     "********")
 					     s)
 					 source)
--- a/lisp/gnus/message.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/message.el	Sun Feb 13 07:19:08 2005 +0000
@@ -135,7 +135,7 @@
 
 (defcustom message-fcc-externalize-attachments nil
   "If non-nil, attachments are included as external parts in Fcc copies."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'message-sending)
 
@@ -175,7 +175,7 @@
 
 (defcustom message-insert-canlock t
   "Whether to insert a Cancel-Lock header in news postings."
-  :version "21.4"
+  :version "22.1"
   :group 'message-headers
   :type 'boolean)
 
@@ -204,7 +204,7 @@
   "*Headers to be generated or prompted for when sending a message.
 Also see `message-required-news-headers' and
 `message-required-mail-headers'."
-  :version "21.4"
+  :version "22.1"
   :group 'message-news
   :group 'message-headers
   :link '(custom-manual "(message)Message Headers")
@@ -212,7 +212,7 @@
 
 (defcustom message-draft-headers '(References From)
   "*Headers to be generated when saving a draft message."
-  :version "21.4"
+  :version "22.1"
   :group 'message-news
   :group 'message-headers
   :link '(custom-manual "(message)Message Headers")
@@ -300,7 +300,7 @@
 `message-subject-trailing-was-query' is t, always strip the trailing
 old subject.  In this case, `message-subject-trailing-was-regexp' is
 used."
-  :version "21.4"
+  :version "22.1"
   :type '(choice (const :tag "never" nil)
 		 (const :tag "always strip" t)
                  (const ask))
@@ -317,7 +317,7 @@
 `message-subject-trailing-was-regexp' instead.
 
 It is okay to create some false positives here, as the user is asked."
-  :version "21.4"
+  :version "22.1"
   :group 'message-various
   :link '(custom-manual "(message)Message Headers")
   :type 'regexp)
@@ -330,7 +330,7 @@
 matched against `message-subject-trailing-was-regexp' in
 `message-strip-subject-trailing-was'.  You should use a regexp creating very
 few false positives here."
-  :version "21.4"
+  :version "22.1"
   :group 'message-various
   :link '(custom-manual "(message)Message Headers")
   :type 'regexp)
@@ -343,7 +343,7 @@
 (defcustom message-mark-insert-begin
   "--8<---------------cut here---------------start------------->8---\n"
   "How to mark the beginning of some inserted text."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :link '(custom-manual "(message)Insertion Variables")
   :group 'message-various)
@@ -352,7 +352,7 @@
 (defcustom message-mark-insert-end
   "--8<---------------cut here---------------end--------------->8---\n"
   "How to mark the end of some inserted text."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :link '(custom-manual "(message)Insertion Variables")
   :group 'message-various)
@@ -362,7 +362,7 @@
   "X-No-Archive: Yes\n"
   "Header to insert when you don't want your article to be archived.
 Archives \(such as groups.google.com\) respect this header."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :link '(custom-manual "(message)Header Commands")
   :group 'message-various)
@@ -372,7 +372,7 @@
   "X-No-Archive: Yes - save http://groups.google.com/"
   "Note to insert why you wouldn't want this posting archived.
 If nil, don't insert any text in the body."
-  :version "21.4"
+  :version "22.1"
   :type '(radio string (const nil))
   :link '(custom-manual "(message)Header Commands")
   :group 'message-various)
@@ -391,7 +391,7 @@
 If nil, `message-cross-post-followup-to' will only do a followup.  Note that
 you can explicitly override this setting by calling
 `message-cross-post-followup-to' with a prefix."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'message-various)
 
@@ -399,7 +399,7 @@
 (defcustom message-cross-post-note
   "Crosspost & Followup-To: "
   "Note to insert before signature to notify of cross-post and follow-up."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :group 'message-various)
 
@@ -407,7 +407,7 @@
 (defcustom message-followup-to-note
   "Followup-To: "
   "Note to insert before signature to notify of follow-up only."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :group 'message-various)
 
@@ -418,7 +418,7 @@
 The function will be called with four arguments.  The function should not only
 insert a note, but also ensure old notes are deleted.  See the documentation
 for `message-cross-post-insert-note'."
-  :version "21.4"
+  :version "22.1"
   :type 'function
   :group 'message-various)
 
@@ -586,7 +586,7 @@
 		non-word-constituents
 		"]\\)+>+\\|[ \t]*[]>|}+]\\)+"))))
   "*Regexp matching the longest possible citation prefix on a line."
-  :version "21.4"
+  :version "22.1"
   :group 'message-insertion
   :link '(custom-manual "(message)Insertion Variables")
   :type 'regexp)
@@ -671,7 +671,7 @@
 If nil, always ignore the header.  If it is the symbol `ask', always
 query the user whether to use the value.  If it is the symbol `use',
 always use the value."
-  :version "21.4"
+  :version "22.1"
   :group 'message-interface
   :link '(custom-manual "(message)Mailing Lists")
   :type '(choice (const :tag "ignore" nil)
@@ -685,7 +685,7 @@
 regular expressions to match lists.  These functions can be used in
 conjunction with `message-subscribed-regexps' and
 `message-subscribed-addresses'."
-  :version "21.4"
+  :version "22.1"
   :group 'message-interface
   :link '(custom-manual "(message)Mailing Lists")
   :type '(repeat sexp))
@@ -694,7 +694,7 @@
   "*A file containing addresses the user is subscribed to.
 If nil, do not look at any files to determine list subscriptions.  If
 non-nil, each line of this file should be a mailing list address."
-  :version "21.4"
+  :version "22.1"
   :group 'message-interface
   :link '(custom-manual "(message)Mailing Lists")
   :type '(radio file (const nil)))
@@ -704,7 +704,7 @@
 If nil, do not use any predefined list subscriptions.  This list of
 addresses can be used in conjunction with
 `message-subscribed-address-functions' and `message-subscribed-regexps'."
-  :version "21.4"
+  :version "22.1"
   :group 'message-interface
   :link '(custom-manual "(message)Mailing Lists")
   :type '(repeat string))
@@ -714,7 +714,7 @@
 If nil, do not use any predefined list subscriptions.  This list of
 regular expressions can be used in conjunction with
 `message-subscribed-address-functions' and `message-subscribed-addresses'."
-  :version "21.4"
+  :version "22.1"
   :group 'message-interface
   :link '(custom-manual "(message)Mailing Lists")
   :type '(repeat regexp))
@@ -724,7 +724,7 @@
 If it is the symbol `always', the posting is allowed.  If it is the
 symbol `never', the posting is not allowed.  If it is the symbol
 `ask', you are prompted."
-  :version "21.4"
+  :version "22.1"
   :group 'message-interface
   :link '(custom-manual "(message)Message Headers")
   :type '(choice (const always)
@@ -742,7 +742,7 @@
   "*Envelope-from when sending mail with sendmail.
 If this is nil, use `user-mail-address'.  If it is the symbol
 `header', use the From: header of the message."
-  :version "21.4"
+  :version "22.1"
   :type '(choice (string :tag "From name")
 		 (const :tag "Use From: header from message" header)
 		 (const :tag "Use `user-mail-address'" nil))
@@ -856,7 +856,7 @@
     (set-keymap-parent map minibuffer-local-map)
     map)
   "Keymap for `message-read-from-minibuffer'."
-  :version "21.4")
+  :version "22.1")
 
 ;;;###autoload
 (defcustom message-citation-line-function 'message-insert-citation-line
@@ -883,7 +883,7 @@
   "*Prefix inserted on cited or empty lines of yanked messages.
 Fix `message-cite-prefix-regexp' if it is set to an abnormal value.
 See also `message-yank-prefix'."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :link '(custom-manual "(message)Insertion Variables")
   :group 'message-insertion)
@@ -940,7 +940,7 @@
 ;;;###autoload
 (defcustom message-signature-insert-empty-line t
   "*If non-nil, insert an empty line before the signature separator."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :link '(custom-manual "(message)Insertion Variables")
   :group 'message-insertion)
@@ -1121,7 +1121,7 @@
   "Regexp of headers to be hidden when composing new messages.
 This can also be a list of regexps to match headers.  Or a list
 starting with `not' and followed by regexps."
-  :version "21.4"
+  :version "22.1"
   :group 'message
   :link '(custom-manual "(message)Message Headers")
   :type '(repeat regexp))
@@ -1397,7 +1397,7 @@
 for a message, the subaddresses will be removed (if present) before
 the mail is sent.  All addresses in this structure should be
 downcased."
-  :version "21.4"
+  :version "22.1"
   :group 'message-headers
   :type '(repeat (repeat string)))
 
@@ -1405,7 +1405,7 @@
   "Like `mail-user-agent'.
 Except if it is nil, use Gnus native MUA; if it is t, use
 `mail-user-agent'."
-  :version "21.4"
+  :version "22.1"
   :type '(radio (const :tag "Gnus native"
 		       :format "%t\n"
 		       nil)
@@ -1429,14 +1429,14 @@
 recipients?\" before a wide reply to multiple recipients.  If the user
 answers yes, reply to all recipients as usual.  If the user answers
 no, only reply back to the author."
-  :version "21.4"
+  :version "22.1"
   :group 'message-headers
   :link '(custom-manual "(message)Wide Reply")
   :type 'boolean)
 
 (defcustom message-user-fqdn nil
   "*Domain part of Messsage-Ids."
-  :version "21.4"
+  :version "22.1"
   :group 'message-headers
   :link '(custom-manual "(message)News Headers")
   :type '(radio (const :format "%v  " nil)
@@ -1448,7 +1448,7 @@
 				 (executable-find idna-program)
 				 'ask)
   "Whether to encode non-ASCII in domain names into ASCII according to IDNA."
-  :version "21.4"
+  :version "22.1"
   :group 'message-headers
   :link '(custom-manual "(message)IDNA")
   :type '(choice (const :tag "Ask" ask)
@@ -1574,7 +1574,7 @@
 	  "\\)")
   "Regular expression that matches a valid FQDN."
   ;; see also: gnus-button-valid-fqdn-regexp
-  :version "21.4"
+  :version "22.1"
   :group 'message-headers
   :type 'regexp)
 
@@ -2384,7 +2384,7 @@
 packages requires these properties to be present in order to work.
 If you use one of these packages, turn this option off, and hope the
 message composition doesn't break too bad."
-  :version "21.4"
+  :version "22.1"
   :group 'message-various
   :link '(custom-manual "(message)Various Message Variables")
   :type 'boolean)
@@ -2731,7 +2731,7 @@
 E.g., if this list contains a member list with elements `Cc' and `To',
 then `message-carefully-insert-headers' will not insert a `To' header
 when the message is already `Cc'ed to the recipient."
-  :version "21.4"
+  :version "22.1"
   :group 'message-headers
   :link '(custom-manual "(message)Message Headers")
   :type '(repeat sexp))
@@ -5176,10 +5176,10 @@
 If the current line has `message-yank-prefix', insert it on the new line."
   (interactive "*")
   (condition-case nil
-      (split-line message-yank-prefix) ;; Emacs 21.3.50+ supports arg.
+      (split-line message-yank-prefix) ;; Emacs 22.1+ supports arg.
     (error
      (split-line))))
-     
+
 (defun message-fill-header (header value)
   (let ((begin (point))
 	(fill-column 78)
@@ -5281,7 +5281,7 @@
 (defcustom message-beginning-of-line t
   "Whether \\<message-mode-map>\\[message-beginning-of-line]\
  goes to beginning of header values."
-  :version "21.4"
+  :version "22.1"
   :group 'message-buffers
   :link '(custom-manual "(message)Movement")
   :type 'boolean)
@@ -6593,14 +6593,14 @@
 	'("^\\(Disposition-Notification-To\\|Return-Receipt-To\\):"
 	  . message-expand-name))
   "Alist of (RE . FUN).  Use FUN for completion on header lines matching RE."
-  :version "21.4"
+  :version "22.1"
   :group 'message
   :type '(alist :key-type regexp :value-type function))
 
 (defcustom message-tab-body-function nil
   "*Function to execute when `message-tab' (TAB) is executed in the body.
 If nil, the function bound in `text-mode-map' or `global-map' is executed."
-  :version "21.4"
+  :version "22.1"
   :group 'message
   :link '(custom-manual "(message)Various Commands")
   :type 'function)
--- a/lisp/gnus/mm-decode.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/mm-decode.el	Sun Feb 13 07:19:08 2005 +0000
@@ -115,7 +115,7 @@
 `lynx' : use lynx;
 `html2text' : use html2text;
 nil    : use external viewer."
-  :version "21.4"
+  :version "22.1"
   :type '(choice (const w3)
 		 (const w3m)
 		 (const w3m-standalone)
@@ -134,7 +134,7 @@
   "If non-nil, Gnus will allow retrieving images in HTML contents with
 the <img> tags.  It has no effect on Emacs/w3.  See also the
 documentation for the `mm-w3m-safe-url-regexp' variable."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'mime-display)
 
@@ -150,14 +150,14 @@
 matches parts embedded to the Multipart/Related type MIME contents and
 Gnus will never connect to the spammer's site arbitrarily.  You may
 set this variable to nil if you consider all urls to be safe."
-  :version "21.4"
+  :version "22.1"
   :type '(choice (regexp :tag "Regexp")
 		 (const :tag "All URLs are safe" nil))
   :group 'mime-display)
 
 (defcustom mm-inline-text-html-with-w3m-keymap t
   "If non-nil, use emacs-w3m command keys in the article buffer."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'mime-display)
 
@@ -167,7 +167,7 @@
 If t, all defined external MIME handlers are used.  If nil, files are saved by
 `mailcap-save-binary-file'.  If it is the symbol `ask', you are prompted
 before the external MIME handler is invoked."
-  :version "21.4"
+  :version "22.1"
   :type '(choice (const :tag "Always" t)
 		 (const :tag "Never" nil)
 		 (const :tag "Ask" ask))
@@ -283,7 +283,7 @@
     "application/pdf" "application/x-dvi")
   "List of media types for which the external viewer will not be killed
 when selecting a different article."
-  :version "21.4"
+  :version "22.1"
   :type '(repeat string)
   :group 'mime-display)
 
@@ -380,13 +380,13 @@
 
 (defcustom mm-attachment-file-modes 384
   "Set the mode bits of saved attachments to this integer."
-  :version "21.4"
+  :version "22.1"
   :type 'integer
   :group 'mime-display)
 
 (defcustom mm-external-terminal-program "xterm"
   "The program to start an external terminal."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :group 'mime-display)
 
@@ -419,7 +419,7 @@
   "Option of verifying signed parts.
 `never', not verify; `always', always verify;
 `known', only verify known protocols.  Otherwise, ask user."
-  :version "21.4"
+  :version "22.1"
   :type '(choice (item always)
 		 (item never)
 		 (item :tag "only known protocols" known)
@@ -438,7 +438,7 @@
   "Option of decrypting encrypted parts.
 `never', not decrypt; `always', always decrypt;
 `known', only decrypt known protocols.  Otherwise, ask user."
-  :version "21.4"
+  :version "22.1"
   :type '(choice (item always)
 		 (item never)
 		 (item :tag "only known protocols" known)
--- a/lisp/gnus/mm-url.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/mm-url.el	Sun Feb 13 07:19:08 2005 +0000
@@ -49,7 +49,7 @@
 				    (require 'url)
 				  (error nil)))
   "*If non-nil, use external grab program `mm-url-program'."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'mm-url)
 
@@ -68,7 +68,7 @@
    (t "GET"))
   "The url grab program.
 Likely values are `wget', `w3m', `lynx' and `curl'."
-  :version "21.4"
+  :version "22.1"
   :type '(choice
 	  (symbol :tag "wget" wget)
 	  (symbol :tag "w3m" w3m)
@@ -79,7 +79,7 @@
 
 (defcustom mm-url-arguments nil
   "The arguments for `mm-url-program'."
-  :version "21.4"
+  :version "22.1"
   :type '(repeat string)
   :group 'mm-url)
 
--- a/lisp/gnus/mm-uu.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/mm-uu.el	Sun Feb 13 07:19:08 2005 +0000
@@ -80,7 +80,7 @@
 
 (defcustom mm-uu-diff-groups-regexp "gnus\\.commits"
   "*Regexp matching diff groups."
-  :version "21.4"
+  :version "22.1"
   :type 'regexp
   :group 'gnus-article-mime)
 
--- a/lisp/gnus/mml-sec.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/mml-sec.el	Sun Feb 13 07:19:08 2005 +0000
@@ -43,7 +43,7 @@
 (defcustom mml-default-sign-method "pgpmime"
   "Default sign method.
 The string must have an entry in `mml-sign-alist'."
-  :version "21.4"
+  :version "22.1"
   :type '(choice (const "smime")
 		 (const "pgp")
 		 (const "pgpauto")
@@ -61,7 +61,7 @@
 (defcustom mml-default-encrypt-method "pgpmime"
   "Default encryption method.
 The string must have an entry in `mml-encrypt-alist'."
-  :version "21.4"
+  :version "22.1"
   :type '(choice (const "smime")
 		 (const "pgp")
 		 (const "pgpauto")
@@ -85,7 +85,7 @@
 understood by all PGP implementations, in particular PGP version
 2 does not support it!  See Info node `(message)Security' for
 details."
-  :version "21.4"
+  :version "22.1"
   :group 'message
   :type '(repeat (list (choice (const :tag "S/MIME" "smime")
 			       (const :tag "PGP" "pgp")
--- a/lisp/gnus/mml.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/mml.el	Sun Feb 13 07:19:08 2005 +0000
@@ -44,7 +44,7 @@
   '(name access-type expiration size permission format)
   "*A list of acceptable parameters in MML tag.
 These parameters are generated in Content-Type header if exists."
-  :version "21.4"
+  :version "22.1"
   :type '(repeat (symbol :tag "Parameter"))
   :group 'message)
 
@@ -52,14 +52,14 @@
   '(filename creation-date modification-date read-date)
   "*A list of acceptable parameters in MML tag.
 These parameters are generated in Content-Disposition header if exists."
-  :version "21.4"
+  :version "22.1"
   :type '(repeat (symbol :tag "Parameter"))
   :group 'message)
 
 (defcustom mml-insert-mime-headers-always nil
   "If non-nil, always put Content-Type: text/plain at top of empty parts.
 It is necessary to work against a bug in certain clients."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'message)
 
--- a/lisp/gnus/mml2015.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/mml2015.el	Sun Feb 13 07:19:08 2005 +0000
@@ -83,7 +83,7 @@
     ("TRUST_FULLY"     . t)
     ("TRUST_ULTIMATE"  . t))
   "Map GnuPG trust output values to a boolean saying if you trust the key."
-  :version "21.4"
+  :version "22.1"
   :group 'mime-security
   :type '(repeat (cons (regexp :tag "GnuPG output regexp")
 		       (boolean :tag "Trust key"))))
@@ -585,7 +585,7 @@
 	;; set up a function to call the correct gpg encrypt routine
 	;; with the right arguments. (FIXME: this should be done
 	;; differently.)
-	(flet ((gpg-encrypt-func 
+	(flet ((gpg-encrypt-func
 		 (sign plaintext ciphertext result recipients &optional
 		       passphrase sign-with-key armor textmode)
 		 (if sign
@@ -656,7 +656,7 @@
 	(if (condition-case err
 		(prog1
 		    (pgg-decrypt-region (point-min) (point-max))
-		  (setq decrypt-status 
+		  (setq decrypt-status
 			(with-current-buffer mml2015-result-buffer
 			  (buffer-string)))
 		  (mm-set-handle-multipart-parameter
@@ -740,7 +740,7 @@
 	  (mm-insert-part signature))
 	(if (condition-case err
 		(prog1
-		    (pgg-verify-region (point-min) (point-max) 
+		    (pgg-verify-region (point-min) (point-max)
 				       signature-file t)
 		  (goto-char (point-min))
 		  (while (search-forward "\r\n" nil t)
--- a/lisp/gnus/nndiary.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/nndiary.el	Sun Feb 13 07:19:08 2005 +0000
@@ -223,7 +223,7 @@
 
 (defgroup nndiary nil
   "The Gnus Diary backend."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-diary)
 
 (defcustom nndiary-mail-sources
@@ -760,7 +760,7 @@
   (when (nndiary-schedule)
     (let (result)
       (when nnmail-cache-accepted-message-ids
-	(nnmail-cache-insert (nnmail-fetch-field "message-id") 
+	(nnmail-cache-insert (nnmail-fetch-field "message-id")
 			     group
 			     (nnmail-fetch-field "subject")))
       (if (stringp group)
--- a/lisp/gnus/nnimap.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/nnimap.el	Sun Feb 13 07:19:08 2005 +0000
@@ -211,7 +211,7 @@
 used (which currently is nil, unless you use a statistical
 spam.el test); if this variable is another non-nil value bodies
 will be downloaded."
-  :version "21.4"
+  :version "22.1"
   :group 'nnimap
   :type '(choice (const :tag "Let system decide" deault)
 		 boolean))
@@ -223,7 +223,7 @@
 This means that errors caught by nnimap when closing the mailbox will
 not prevent Gnus from updating the group status, which may be harmful.
 However, it increases speed."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'nnimap)
 
@@ -232,7 +232,7 @@
 This increases the speed of closing mailboxes (quiting group) but may
 decrease the speed of selecting another mailbox later.  Re-selecting
 the same mailbox will be faster though."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'nnimap)
 
@@ -245,7 +245,7 @@
 
 In summary, the default is O((1-p)*k+p*n) and changing it to nil makes
 it O(n).  If p is small, then the default is probably faster."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'nnimap)
 
@@ -826,7 +826,7 @@
 
 (defun nnimap-make-callback (article gnus-callback buffer)
   "Return a callback function."
-  `(lambda () 
+  `(lambda ()
      (nnimap-callback ,article ,gnus-callback ,buffer)))
 
 (defun nnimap-callback (article gnus-callback buffer)
@@ -876,8 +876,8 @@
 				   (imap-error-text nnimap-server-buffer))
 		(cons group article)))
 	  (add-hook 'imap-fetch-data-hook
-		    (nnimap-make-callback article 
-					  nnheader-callback-function 
+		    (nnimap-make-callback article
+					  nnheader-callback-function
 					  nntp-server-buffer))
 	  (imap-fetch-asynch article part nil nnimap-server-buffer)
 	  (cons group article))))))
@@ -930,7 +930,7 @@
   "Update the unseen count in `nnimap-mailbox-info'."
   (gnus-sethash
    (gnus-group-prefixed-name group server)
-   (let ((old (gnus-gethash-safe (gnus-group-prefixed-name group server) 
+   (let ((old (gnus-gethash-safe (gnus-group-prefixed-name group server)
 				 nnimap-mailbox-info)))
      (list (nth 0 old) (nth 1 old)
 	   (imap-mailbox-status group 'unseen nnimap-server-buffer)
@@ -1043,7 +1043,7 @@
 			     'asyncgroups
 			   'slowgroups)
 			 (list group (imap-mailbox-status-asynch
-				      group '(uidvalidity uidnext unseen) 
+				      group '(uidvalidity uidnext unseen)
 				      nnimap-server-buffer))))
 	  (dolist (asyncgroup asyncgroups)
 	    (let ((group (nth 0 asyncgroup))
@@ -1054,7 +1054,7 @@
 			      (nth 0 (gnus-gethash (gnus-group-prefixed-name
 						    group server)
 						   nnimap-mailbox-info))
-			      (imap-mailbox-get 'uidvalidity group 
+			      (imap-mailbox-get 'uidvalidity group
 						nnimap-server-buffer)))
 			(not (string=
 			      (nth 1 (gnus-gethash (gnus-group-prefixed-name
@@ -1310,7 +1310,7 @@
 			     (let (msgid)
 			       (and (setq msgid
 					  (nnmail-fetch-field "message-id"))
-				    (nnmail-cache-insert msgid 
+				    (nnmail-cache-insert msgid
 							 to-group
 							 (nnmail-fetch-field "subject"))))))
 			 ;; Add the group-art list to the history list.
@@ -1418,12 +1418,12 @@
 			nnmail-expiry-wait)))
 	  (cond ((or force (eq days 'immediate))
 		 (let ((oldarts (imap-search
-				 (concat "UID " 
+				 (concat "UID "
 					 (imap-range-to-message-set artseq)))))
 		   (when oldarts
 		     (nnimap-expiry-target oldarts group server)
 		     (when (imap-message-flags-add
-			    (imap-range-to-message-set 
+			    (imap-range-to-message-set
 			     (gnus-compress-sequence oldarts)) "\\Deleted")
 		       (setq articles (gnus-set-difference
 				       articles oldarts))))))
@@ -1437,9 +1437,9 @@
 		   (when oldarts
 		     (nnimap-expiry-target oldarts group server)
 		     (when (imap-message-flags-add
-			    (imap-range-to-message-set 
+			    (imap-range-to-message-set
 			     (gnus-compress-sequence oldarts)) "\\Deleted")
-		       (setq articles (gnus-set-difference 
+		       (setq articles (gnus-set-difference
 				       articles oldarts)))))))))))
   ;; return articles not deleted
   articles)
--- a/lisp/gnus/nnmail.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/nnmail.el	Sun Feb 13 07:19:08 2005 +0000
@@ -119,7 +119,7 @@
 (defcustom nnmail-split-fancy-with-parent-ignore-groups nil
   "Regexp that matches group names to be ignored when applying `nnmail-split-fancy-with-parent'.
 This can also be a list of regexps."
-  :version "21.4"
+  :version "22.1"
   :group 'nnmail-split
   :type '(choice (const :tag "none" nil)
 		 (regexp :value ".*")
@@ -128,7 +128,7 @@
 (defcustom nnmail-cache-ignore-groups nil
   "Regexp that matches group names to be ignored when inserting message ids into the cache (`nnmail-cache-insert').
 This can also be a list of regexps."
-  :version "21.4"
+  :version "22.1"
   :group 'nnmail-split
   :type '(choice (const :tag "none" nil)
 		 (regexp :value ".*")
@@ -226,7 +226,7 @@
 articles containing the sting \"IMPORTANT\" in the Subject header will
 be expired to the group \"nnfolder:IMPORTANT.YYYY.MMM\"; and
 everything else will be expired to \"nnfolder:Archive-YYYY\"."
-  :version "21.4"
+  :version "22.1"
   :group 'nnmail-expire
   :type '(repeat (list (choice :tag "Match against"
 			       (string :tag "Header")
@@ -355,7 +355,7 @@
 
 (defcustom nnmail-spool-hook nil
   "*A hook called when a new article is spooled."
-  :version "21.4"
+  :version "22.1"
   :group 'nnmail
   :type 'hook)
 
@@ -370,14 +370,14 @@
 (define-widget 'nnmail-lazy 'default
   "Base widget for recursive datastructures.
 
-This is copy of the `lazy' widget in Emacs 21.4 provided for compatibility."
+This is copy of the `lazy' widget in Emacs 22.1 provided for compatibility."
   :format "%{%t%}: %v"
   :convert-widget 'widget-value-convert-widget
   :value-create (lambda (widget)
                   (let ((value (widget-get widget :value))
                         (type (widget-get widget :type)))
-                    (widget-put widget :children 
-                                (list (widget-create-child-value 
+                    (widget-put widget :children
+                                (list (widget-create-child-value
                                        widget (widget-convert type) value)))))
   :value-delete 'widget-children-value-delete
   :value-get (lambda (widget)
@@ -409,7 +409,7 @@
                       (list :tag "Function with fixed arguments (:)"
                             :value (: nil)
                             (const :format "" :value :)
-                            function 
+                            function
                             (editable-list :inline t (sexp :tag "Arg"))
                             )
                       (list :tag "Function with split arguments (!)"
@@ -417,11 +417,11 @@
                             (const :format "" !)
                             function
                             (editable-list :inline t nnmail-split-fancy))
-                      (list :tag "Field match" 
-                            (choice :tag "Field" 
+                      (list :tag "Field match"
+                            (choice :tag "Field"
                                     regexp symbol)
                             (choice :tag "Match"
-                                    regexp 
+                                    regexp
                                     (symbol :value mail))
                             (repeat :inline t
                                     :tag "Restrictions"
@@ -562,13 +562,13 @@
 
 (defcustom nnmail-mail-splitting-charset nil
   "Default charset to be used when splitting incoming mail."
-  :version "21.4"
+  :version "22.1"
   :group 'nnmail
   :type 'symbol)
 
 (defcustom nnmail-mail-splitting-decodes nil
   "Whether the nnmail splitting functionality should MIME decode headers."
-  :version "21.4"
+  :version "22.1"
   :group 'nnmail
   :type 'boolean)
 
@@ -578,7 +578,7 @@
 by \"\\=\\<...\\>\".  If this variable is true, they are not implicitly\
  surrounded
 by anything."
-  :version "21.4"
+  :version "22.1"
   :group 'nnmail
   :type 'boolean)
 
@@ -586,7 +586,7 @@
   "Whether to lowercase expanded entries (i.e. \\N) when splitting mails.
 This avoids the creation of multiple groups when users send to an address
 using different case (i.e. mailing-list@domain vs Mailing-List@Domain)."
-  :version "21.4"
+  :version "22.1"
   :group 'nnmail
   :type 'boolean)
 
@@ -1580,7 +1580,7 @@
   (when (stringp id)
     ;; this will handle cases like `B r' where the group is nil
     (let ((grp (or grp gnus-newsgroup-name "UNKNOWN")))
-      (run-hook-with-args 'nnmail-spool-hook 
+      (run-hook-with-args 'nnmail-spool-hook
 			  id grp subject sender))
     (when nnmail-treat-duplicates
       ;; Store some information about the group this message is written
@@ -1603,7 +1603,7 @@
 	      (unless (and regexp (string-match regexp grp))
 		(insert id "\t" grp "\n")))
 	  (insert id "\n"))))))
-  
+
 (defun nnmail-cache-primary-mail-backend ()
   (let ((be-list (cons gnus-select-method gnus-secondary-select-methods))
 	(be nil)
--- a/lisp/gnus/pgg-def.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/pgg-def.el	Sun Feb 13 07:19:08 2005 +0000
@@ -30,7 +30,7 @@
 (defgroup pgg ()
   "Glue for the various PGP implementations."
   :group 'mime
-  :version "21.4")
+  :version "22.1")
 
 (defcustom pgg-default-scheme 'gpg
   "Default PGP scheme."
@@ -51,7 +51,7 @@
 
 (defcustom pgg-query-keyserver nil
   "Whether PGG queries keyservers for missing keys when verifying messages."
-  :version "21.4"
+  :version "22.1"
   :group 'pgg
   :type 'boolean)
 
--- a/lisp/gnus/pop3.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/pop3.el	Sun Feb 13 07:19:08 2005 +0000
@@ -46,26 +46,26 @@
 			     (getenv "LOGNAME")
 			     (getenv "USER"))
   "*POP3 maildrop."
-  :version "21.4" ;; Oort Gnus
+  :version "22.1" ;; Oort Gnus
   :type 'string
   :group 'pop3)
 
 (defcustom pop3-mailhost (or (getenv "MAILHOST") ;; nil -> mismatch
 			     "pop3")
   "*POP3 mailhost."
-  :version "21.4" ;; Oort Gnus
+  :version "22.1" ;; Oort Gnus
   :type 'string
   :group 'pop3)
 
 (defcustom pop3-port 110
   "*POP3 port."
-  :version "21.4" ;; Oort Gnus
+  :version "22.1" ;; Oort Gnus
   :type 'number
   :group 'pop3)
 
 (defcustom pop3-password-required t
   "*Non-nil if a password is required when connecting to POP server."
-  :version "21.4" ;; Oort Gnus
+  :version "22.1" ;; Oort Gnus
   :type 'boolean
   :group 'pop3)
 
@@ -77,7 +77,7 @@
   "*POP3 authentication scheme.
 Defaults to 'pass, for the standard USER/PASS authentication.  Other valid
 values are 'apop."
-  :version "21.4" ;; Oort Gnus
+  :version "22.1" ;; Oort Gnus
   :type '(choice (const :tag "USER/PASS" pass)
 		 (const :tag "APOP" apop))
   :group 'pop3)
@@ -91,7 +91,7 @@
 client believes is there and what is actually there may not match
 up.  If they do not, then the whole thing can fall apart and
 leave you with a corrupt mailbox."
-  :version "21.4" ;; Oort Gnus
+  :version "22.1" ;; Oort Gnus
   :type 'boolean
   :group 'pop3)
 
--- a/lisp/gnus/sha1.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/sha1.el	Sun Feb 13 07:19:08 2005 +0000
@@ -60,7 +60,7 @@
 
 (defgroup sha1 nil
   "Elisp interface for SHA1 hash computation."
-  :version "21.4"
+  :version "22.1"
   :group 'extensions)
 
 (defcustom sha1-maximum-internal-length 500
--- a/lisp/gnus/sieve.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/sieve.el	Sun Feb 13 07:19:08 2005 +0000
@@ -65,7 +65,7 @@
 
 (defgroup sieve nil
   "Manage sieve scripts."
-  :version "21.4"
+  :version "22.1"
   :group 'tools)
 
 (defcustom sieve-new-script "<new script>"
--- a/lisp/gnus/smiley.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/smiley.el	Sun Feb 13 07:19:08 2005 +0000
@@ -78,7 +78,7 @@
       (push "xpm" types))
     types)
   "*List of suffixes on picon file names to try."
-  :version "21.4"
+  :version "22.1"
   :type '(repeat string)
   :group 'smiley)
 
--- a/lisp/gnus/smime.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/smime.el	Sun Feb 13 07:19:08 2005 +0000
@@ -150,7 +150,7 @@
 (defcustom smime-CA-file nil
   "*Files containing certificates for CAs you trust.
 File should contain certificates in PEM format."
-  :version "21.4"
+  :version "22.1"
   :type '(choice (const :tag "none" nil)
 		 file)
   :group 'smime)
@@ -178,7 +178,7 @@
 
 (defcustom smime-encrypt-cipher "-des3"
   "*Cipher algorithm used for encryption."
-  :version "21.4"
+  :version "22.1"
   :type '(choice (const :tag "Triple DES" "-des3")
 		 (const :tag "DES"  "-des")
 		 (const :tag "RC2 40 bits" "-rc2-40")
@@ -210,7 +210,7 @@
 (defcustom smime-dns-server nil
   "*DNS server to query certificates from.
 If nil, use system defaults."
-  :version "21.4"
+  :version "22.1"
   :type '(choice (const :tag "System defaults")
 		 string)
   :group 'smime)
--- a/lisp/gnus/spam-stat.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/spam-stat.el	Sun Feb 13 07:19:08 2005 +0000
@@ -128,7 +128,7 @@
 Use the functions to build a dictionary of words and their statistical
 distribution in spam and non-spam mails.  Then use a function to determine
 whether a buffer contains spam or not."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus)
 
 (defcustom spam-stat-file "~/.spam-stat.el"
--- a/lisp/gnus/spam.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/spam.el	Sun Feb 13 07:19:08 2005 +0000
@@ -77,7 +77,7 @@
 
 (defgroup spam nil
   "Spam configuration."
-  :version "21.4")
+  :version "22.1")
 
 (defcustom spam-directory (nnheader-concat gnus-directory "spam/")
   "Directory for spam whitelists and blacklists."
--- a/lisp/gnus/starttls.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/starttls.el	Sun Feb 13 07:19:08 2005 +0000
@@ -126,7 +126,7 @@
   "Name of GNUTLS command line tool.
 This program is used when GNUTLS is used, i.e. when
 `starttls-use-gnutls' is non-nil."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :group 'starttls)
 
@@ -139,7 +139,7 @@
 
 (defcustom starttls-use-gnutls (not (executable-find starttls-program))
   "*Whether to use GNUTLS instead of the `starttls' command."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'starttls)
 
@@ -158,13 +158,13 @@
 For example, non-TLS compliant servers may require
 '(\"--protocols\" \"ssl3\").  Invoke \"gnutls-cli --help\" to
 find out which parameters are available."
-  :version "21.4"
+  :version "22.1"
   :type '(repeat string)
   :group 'starttls)
 
 (defcustom starttls-process-connection-type nil
   "*Value for `process-connection-type' to use when starting STARTTLS process."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'starttls)
 
@@ -174,7 +174,7 @@
   ;; GNUTLS cli.c:main() print this string when it is starting to run
   ;; in the application read/write phase.  If the logic, or the string
   ;; itself, is modified, this must be updated.
-  :version "21.4"
+  :version "22.1"
   :type 'regexp
   :group 'starttls)
 
@@ -183,7 +183,7 @@
 The default is what GNUTLS's \"gnutls-cli\" outputs."
   ;; GNUTLS cli.c:do_handshake() print this string on failure.  If the
   ;; logic, or the string itself, is modified, this must be updated.
-  :version "21.4"
+  :version "22.1"
   :type 'regexp
   :group 'starttls)
 
@@ -194,7 +194,7 @@
   ;; common.c:print_info(), that unconditionally print this string
   ;; last.  If that logic, or the string itself, is modified, this
   ;; must be updated.
-  :version "21.4"
+  :version "22.1"
   :type 'regexp
   :group 'starttls)
 
--- a/lisp/gnus/utf7.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/utf7.el	Sun Feb 13 07:19:08 2005 +0000
@@ -59,7 +59,7 @@
 ;; $ echo "a+£"|iconv -f iso-8859-1 -t utf-7
 ;; a+-+AKM
 ;;
-;;  -- fx 
+;;  -- fx
 
 
 ;;; Code:
@@ -78,7 +78,7 @@
 (defconst utf7-utf-16-coding-system
   (cond ((mm-coding-system-p 'utf-16-be-no-signature) ; Mule-UCS
 	 'utf-16-be-no-signature)
-	((and (mm-coding-system-p 'utf-16-be) ; Emacs 21.4 (?), Emacs 22
+	((and (mm-coding-system-p 'utf-16-be) ; Emacs 22.1
 	      ;; Avoid versions with BOM.
 	      (= 2 (length (encode-coding-string "a" 'utf-16-be))))
 	 'utf-16-be)
--- a/lisp/gnus/uudecode.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/gnus/uudecode.el	Sun Feb 13 07:19:08 2005 +0000
@@ -51,7 +51,7 @@
 (defcustom uudecode-use-external
   (executable-find uudecode-decoder-program)
   "*Use external uudecode program."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-extract
   :type 'boolean)
 
--- a/lisp/help-at-pt.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/help-at-pt.el	Sun Feb 13 07:19:08 2005 +0000
@@ -53,7 +53,7 @@
 (defgroup help-at-pt nil
   "Features for displaying local help."
   :group 'help
-  :version "21.4")
+  :version "22.1")
 
 ;;;###autoload
 (defun help-at-pt-string (&optional kbd)
--- a/lisp/help.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/help.el	Sun Feb 13 07:19:08 2005 +0000
@@ -179,8 +179,11 @@
 ;; So keyboard macro definitions are documented correctly
 (fset 'defining-kbd-macro (symbol-function 'start-kbd-macro))
 
-(defalias 'help 'help-for-help)
-(make-help-screen help-for-help
+(defalias 'help 'help-for-help-internal)
+;; find-function can find this.
+(defalias 'help-for-help 'help-for-help-internal)
+;; It can't find this, but nobody will look.
+(make-help-screen help-for-help-internal
   "a b c C e f F i I k C-k l L m p s t v w C-c C-d C-f C-n C-p C-t C-w . or ? :"
   "You have typed %THIS-KEY%, the help character.  Type a Help option:
 \(Use SPC or DEL to scroll through this text.  Type \\<help-map>\\[help-quit] to exit the Help command.)
--- a/lisp/hl-line.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/hl-line.el	Sun Feb 13 07:19:08 2005 +0000
@@ -58,7 +58,7 @@
 ;; mode is used.
 
 ;; In default whole the line is highlighted. The range of highlighting
-;; can be changed by defining an appropriate function as the 
+;; can be changed by defining an appropriate function as the
 ;; buffer-local value of `hl-line-range-function'.
 
 ;;; Code:
@@ -79,13 +79,13 @@
 window.  Setting this variable takes effect the next time you use
 the command `hl-line-mode' to turn Hl-Line mode on."
   :type 'boolean
-  :version "21.4"
+  :version "22.1"
   :group 'hl-line)
 
 (defvar hl-line-range-function nil
   "If non-nil, function to call to return highlight range.
 The function of no args should return a cons cell; its car value
-is the beginning position of highlight and its cdr value is the 
+is the beginning position of highlight and its cdr value is the
 end position of highlight in the buffer.
 It should return nil if there's no region to be highlighted.
 
--- a/lisp/ibuffer.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/ibuffer.el	Sun Feb 13 07:19:08 2005 +0000
@@ -45,7 +45,7 @@
 Ibuffer allows you to operate on buffers in a manner much like Dired.
 Operations include sorting, marking by regular expression, and
 the ability to filter the displayed buffers by various criteria."
-  :version "21.4"
+  :version "22.1"
   :group 'convenience)
 
 (defcustom ibuffer-formats '((mark modified read-only " " (name 18 18 :left :elide)
@@ -215,7 +215,7 @@
 should return non-nil if this buffer should be shown.
 
 Viewing of buffers hidden because of these predicates may be customized
-via `ibuffer-default-display-maybe-show-predicates' and is toggled by 
+via `ibuffer-default-display-maybe-show-predicates' and is toggled by
 giving a non-nil prefix argument to `ibuffer-update'.
 Note that this specialized filtering occurs before real filtering."
   :type '(repeat (choice regexp function))
--- a/lisp/ido.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/ido.el	Sun Feb 13 07:19:08 2005 +0000
@@ -338,7 +338,7 @@
   "Switch between files using substrings."
   :group 'extensions
   :group 'convenience
-  :version "21.4"
+  :version "22.1"
   :link '(emacs-commentary-link :tag "Commentary" "ido.el")
   :link '(emacs-library-link :tag "Lisp File" "ido.el"))
 
@@ -410,6 +410,15 @@
   :type 'boolean
   :group 'ido)
 
+(defcustom ido-file-extensions-order nil
+  "*List of file extensions specifying preferred order of file selections.
+Each element is either a string with `.' as the first char, an empty
+string matching files without extension, or t which is the default order
+of for files with an unlisted file extension."
+  :type '(repeat (choice string
+			 (const :tag "Default order" t)))
+  :group 'ido)
+
 (defcustom ido-ignore-directories
   '("\\`CVS/" "\\`\\.\\./" "\\`\\./")
   "*List of regexps or functions matching sub-directory names to ignore."
@@ -2629,10 +2638,69 @@
      (t nil))))
 
 
-(defun ido-sort-list (items)
-  ;; Simple list of file or buffer names
-  (sort items (lambda (a b) (string-lessp (ido-no-final-slash a)
-					  (ido-no-final-slash b)))))
+;; File list sorting
+
+(defun ido-file-lessp (a b)
+  ;; Simple compare two file names.
+  (string-lessp (ido-no-final-slash a) (ido-no-final-slash b)))
+
+
+(defun ido-file-extension-lessp (a b)
+  ;; Compare file names according to ido-file-extensions-order list.
+  (let ((n (compare-strings a 0 nil b 0 nil nil))
+	lessp p)
+    (if (eq n t)
+	nil
+      (if (< n 0)
+	  (setq n (1- (- n))
+		p a a b b p
+		lessp t)
+	(setq n (1- n)))
+      (cond
+       ((= n 0)
+	lessp)
+       ((= (aref a n) ?.)
+	(ido-file-extension-aux a b n lessp))
+       (t
+	(while (and (> n 2) (/= (aref a n) ?.))
+	  (setq n (1- n)))
+	(if (> n 1)
+	    (ido-file-extension-aux a b n lessp)
+	  lessp))))))
+
+(defun ido-file-extension-aux (a b n lessp)
+  (let ((oa (ido-file-extension-order a n))
+	(ob (ido-file-extension-order b n)))
+    (cond
+     ((= oa ob)
+      lessp)
+     ((and oa ob)
+      (if lessp
+	  (> oa ob)
+	(< oa ob)))
+     (oa
+      (not lessp))
+     (ob
+      lessp)
+     (t
+      lessp))))
+
+(defun ido-file-extension-order (s n)
+  (let ((l ido-file-extensions-order)
+	(i 0) o do)
+    (while l
+      (cond
+       ((eq (car l) t)
+	(setq do i
+	      l (cdr l)))
+       ((eq (compare-strings s n nil (car l) 0 nil nil) t)
+	(setq o i
+	      l nil))
+       (t
+	(setq l (cdr l))))
+      (setq i (1+ i)))
+    (or o do)))
+
 
 (defun ido-sort-merged-list (items promote)
   ;; Input is list of ("file" . "dir") cons cells.
@@ -2905,7 +2973,10 @@
   ;; created to allow the user to further modify the order of the file names
   ;; in this list.
   (let ((ido-temp-list (ido-make-file-list1 ido-current-directory)))
-    (setq ido-temp-list (ido-sort-list ido-temp-list))
+    (setq ido-temp-list (sort ido-temp-list
+			      (if ido-file-extensions-order
+				  #'ido-file-extension-lessp
+				#'ido-file-lessp)))
     (let ((default-directory ido-current-directory))
       (ido-to-end ;; move ftp hosts and visited files to end
        (delq nil (mapcar
@@ -2954,7 +3025,7 @@
   ;; created to allow the user to further modify the order of the
   ;; directory names in this list.
   (let ((ido-temp-list (ido-make-dir-list1 ido-current-directory)))
-    (setq ido-temp-list (ido-sort-list ido-temp-list))
+    (setq ido-temp-list (sort ido-temp-list #'ido-file-lessp))
     (ido-to-end  ;; move . files to end
      (delq nil (mapcar
 		(lambda (x) (if (string-equal (substring x 0 1) ".") x))
@@ -3184,14 +3255,15 @@
       (setq display-it t))
     (if display-it
 	(with-output-to-temp-buffer ido-completion-buffer
-	  (let ((completion-list (ido-sort-list
+	  (let ((completion-list (sort
 				  (cond
 				   (ido-use-merged-list
 				    (ido-flatten-merged-list (or ido-matches ido-cur-list)))
 				   ((or full-list ido-completion-buffer-all-completions)
 				    (ido-all-completions))
 				   (t
-				    (copy-sequence (or ido-matches ido-cur-list)))))))
+				    (copy-sequence (or ido-matches ido-cur-list))))
+				  #'ido-file-lessp)))
 	    (if (featurep 'xemacs)
 		;; XEmacs extents are put on by default, doesn't seem to be
 		;; any way of switching them off.
--- a/lisp/ielm.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/ielm.el	Sun Feb 13 07:19:08 2005 +0000
@@ -77,7 +77,7 @@
 another binding for `comint-kill-whole-line'."
   :type 'boolean
   :group 'ielm
-  :version "21.4")
+  :version "22.1")
 
 (defcustom ielm-prompt "ELISP> "
   "Prompt used in IELM.
--- a/lisp/imenu.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/imenu.el	Sun Feb 13 07:19:08 2005 +0000
@@ -107,7 +107,7 @@
 
 (defvar imenu-always-use-completion-buffer-p nil)
 (make-obsolete-variable 'imenu-always-use-completion-buffer-p
-			'imenu-use-popup-menu "21.4")
+			'imenu-use-popup-menu "22.1")
 
 (defcustom imenu-use-popup-menu
   (if imenu-always-use-completion-buffer-p
@@ -126,7 +126,7 @@
   "If non-nil, eagerly popup the completion buffer."
   :type 'boolean
   :group 'imenu
-  :version "21.4")
+  :version "22.1")
 
 (defcustom imenu-after-jump-hook nil
   "*Hooks called after jumping to a place in the buffer.
--- a/lisp/info.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/info.el	Sun Feb 13 07:19:08 2005 +0000
@@ -98,7 +98,7 @@
 
 (defcustom Info-fontify-visited-nodes t
   "*Non-nil means to fontify visited nodes in a different face."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'info)
 
@@ -169,7 +169,7 @@
 Setting this option to nil results in behavior similar to the stand-alone
 Info reader program, which visits the first subnode from the menu only
 when you hit the end of the current node."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'info)
 
@@ -177,7 +177,7 @@
   "*If non-nil, hide the tag and section reference in *note and * menu items.
 If value is non-nil but not `hide', also replaces the \"*note\" with \"see\".
 If value is non-nil but not t or `hide', the reference section is still shown."
-  :version "21.4"
+  :version "22.1"
   :type '(choice (const :tag "No hiding" nil)
 		 (const :tag "Replace tag and hide reference" t)
 		 (const :tag "Hide tag and reference" hide)
@@ -188,7 +188,7 @@
   "*If non-nil, attempt to refill paragraphs with hidden references.
 This refilling may accidentally remove explicit line breaks in the info
 file, so be prepared for a few surprises if you enable this feature."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'info)
 
--- a/lisp/international/latin1-disp.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/international/latin1-disp.el	Sun Feb 13 07:19:08 2005 +0000
@@ -156,7 +156,7 @@
 (defcustom latin1-display-face 'default
   "Face to use for displaying substituted ASCII sequences."
   :type 'face
-  :version "21.4"
+  :version "22.1"
   :group 'latin1-display)
 
 (defun latin1-display-char (char display &optional alt-display)
@@ -225,7 +225,7 @@
 
 ;; Backwards compatibility.
 (defalias 'latin1-char-displayable-p 'char-displayable-p)
-(make-obsolete 'latin1-char-displayable-p 'char-displayable-p "21.4")
+(make-obsolete 'latin1-char-displayable-p 'char-displayable-p "22.1")
 
 (defun latin1-display-setup (set &optional force)
   "Set up Latin-1 display for characters in the given SET.
--- a/lisp/international/mule-util.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/international/mule-util.el	Sun Feb 13 07:19:08 2005 +0000
@@ -64,7 +64,7 @@
 ;;;###autoload
 (make-obsolete 'string-to-sequence
 	       "use `string-to-list' or `string-to-vector'."
-	       "21.4")
+	       "22.1")
 
 ;;;###autoload
 (defsubst string-to-list (string)
Binary file lisp/international/mule.el has changed
--- a/lisp/kmacro.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/kmacro.el	Sun Feb 13 07:19:08 2005 +0000
@@ -120,7 +120,7 @@
   "Simplified keyboard macro user interface."
   :group 'keyboard
   :group 'convenience
-  :version "21.4"
+  :version "22.1"
   :link '(emacs-commentary-link :tag "Commentary" "kmacro.el")
   :link '(emacs-library-link :tag "Lisp File" "kmacro.el"))
 
--- a/lisp/ldefs-boot.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/ldefs-boot.el	Sun Feb 13 07:19:08 2005 +0000
@@ -3054,7 +3054,7 @@
 The choices are: `one-frame' (calendar and diary together in one separate,
 dedicated frame); `two-frames' (calendar and diary in separate, dedicated
 frames); `calendar-only' (calendar in a separate, dedicated frame); with
-any other value the current frame is used.  Using any of the first 
+any other value the current frame is used.  Using any of the first
 three options overrides the value of `view-diary-entries-initially'.")
 
 (custom-autoload (quote calendar-setup) "calendar")
@@ -10508,7 +10508,7 @@
 ;;;;;;  "gnus-delay" "gnus/gnus-delay.el" (16775 26712))
 ;;; Generated autoloads from gnus/gnus-delay.el
 
-(defgroup gnus-delay nil "Arrange for sending postings later." :version "21.4" :group (quote gnus))
+(defgroup gnus-delay nil "Arrange for sending postings later." :version "22.1" :group (quote gnus))
 
 (autoload (quote gnus-delay-article) "gnus-delay" "\
 Delay this article by some time.
@@ -12917,7 +12917,7 @@
    \\i         IF statement template
    \\elif      IF-ELSE statement template
    \\b         BEGIN
-   
+
    For a full list, use \\[idlwave-list-abbrevs].  Some templates also
    have direct keybindings - see the list of keybindings below.
 
@@ -13602,7 +13602,7 @@
 ;;; Generated autoloads from language/ind-util.el
 
 (autoload (quote indian-compose-region) "ind-util" "\
-Compose the region according to `composition-function-table'. 
+Compose the region according to `composition-function-table'.
 
 \(fn FROM TO)" t nil)
 
@@ -16343,7 +16343,7 @@
 
 (autoload (quote malayalam-composition-function) "mlm-util" "\
 Compose Malayalam characters in REGION, or STRING if specified.
-Assume that the REGION or STRING must fully match the composable 
+Assume that the REGION or STRING must fully match the composable
 PATTERN regexp.
 
 \(fn FROM TO PATTERN &optional STRING)" nil nil)
@@ -16782,7 +16782,7 @@
 
 \(fn STRING TYPE)" nil nil)
 
-(make-obsolete (quote string-to-sequence) "use `string-to-list' or `string-to-vector'." "21.4")
+(make-obsolete (quote string-to-sequence) "use `string-to-list' or `string-to-vector'." "22.1")
 
 (defsubst string-to-list (string) "\
 Return a list of characters in STRING." (append string nil))
@@ -17503,7 +17503,7 @@
 ;;; Generated autoloads from textmodes/org.el
 
 (autoload (quote org-mode) "org" "\
-Outline-based notes management and organizer, alias 
+Outline-based notes management and organizer, alias
 \"Carstens outline-mode for keeping track of everything.\"
 
 Org-mode develops organizational tasks around a NOTES file which
@@ -25170,7 +25170,7 @@
 
 (autoload (quote tamil-composition-function) "tml-util" "\
 Compose Tamil characters in REGION, or STRING if specified.
-Assume that the REGION or STRING must fully match the composable 
+Assume that the REGION or STRING must fully match the composable
 PATTERN regexp.
 
 \(fn FROM TO PATTERN &optional STRING)" nil nil)
--- a/lisp/locate.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/locate.el	Sun Feb 13 07:19:08 2005 +0000
@@ -157,7 +157,7 @@
 This should contain the \"-l\" switch, but not the \"-F\" or \"-b\" switches."
   :type 'string
   :group 'locate
-  :version "21.4")
+  :version "22.1")
 
 (defcustom locate-update-command "updatedb"
   "The command used to update the locate database."
--- a/lisp/log-edit.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/log-edit.el	Sun Feb 13 07:19:08 2005 +0000
@@ -281,19 +281,19 @@
 
 ;; Compatibility with old names.
 (defvaralias 'vc-comment-ring 'log-edit-comment-ring)
-(make-obsolete-variable 'vc-comment-ring 'log-edit-comment-ring "21.4")
+(make-obsolete-variable 'vc-comment-ring 'log-edit-comment-ring "22.1")
 (defvaralias 'vc-comment-ring-index 'log-edit-comment-ring-index)
-(make-obsolete-variable 'vc-comment-ring-index 'log-edit-comment-ring-index "21.4")
+(make-obsolete-variable 'vc-comment-ring-index 'log-edit-comment-ring-index "22.1")
 (defalias 'vc-previous-comment 'log-edit-previous-comment)
-(make-obsolete 'vc-previous-comment 'log-edit-previous-comment "21.4")
+(make-obsolete 'vc-previous-comment 'log-edit-previous-comment "22.1")
 (defalias 'vc-next-comment 'log-edit-next-comment)
-(make-obsolete 'vc-next-comment 'log-edit-next-comment "21.4")
+(make-obsolete 'vc-next-comment 'log-edit-next-comment "22.1")
 (defalias 'vc-comment-search-reverse 'log-edit-comment-search-backward)
-(make-obsolete 'vc-comment-search-reverse 'log-edit-comment-search-backward "21.4")
+(make-obsolete 'vc-comment-search-reverse 'log-edit-comment-search-backward "22.1")
 (defalias 'vc-comment-search-forward 'log-edit-comment-search-forward)
-(make-obsolete 'vc-comment-search-forward 'log-edit-comment-search-forward "21.4")
+(make-obsolete 'vc-comment-search-forward 'log-edit-comment-search-forward "22.1")
 (defalias 'vc-comment-to-change-log 'log-edit-comment-to-change-log)
-(make-obsolete 'vc-comment-to-change-log 'log-edit-comment-to-change-log "21.4")
+(make-obsolete 'vc-comment-to-change-log 'log-edit-comment-to-change-log "22.1")
 
 ;;;
 ;;; Actual code
--- a/lisp/mail/footnote.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/mail/footnote.el	Sun Feb 13 07:19:08 2005 +0000
@@ -89,7 +89,7 @@
 
 (defcustom footnote-section-tag "Footnotes: "
   "*Tag inserted at beginning of footnote section."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :group 'footnote)
 
--- a/lisp/mail/mail-extr.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/mail/mail-extr.el	Sun Feb 13 07:19:08 2005 +0000
@@ -231,7 +231,7 @@
 If true, then when we see an address like \"Idiot <dumb@stupid.com>\"
 we will act as though we couldn't find a full name in the address."
   :type 'boolean
-  :version "21.4"
+  :version "22.1"
   :group 'mail-extr)
 
 (defcustom mail-extr-ignore-realname-equals-mailbox-name t
@@ -1411,7 +1411,7 @@
 		    (setq names-match-flag nil))
 		(setq i (1+ i)))
 	      (delete-region (+ (point-min) buffer-length) (point-max))
-	      (and names-match-flag 
+	      (and names-match-flag
 			   mail-extr-ignore-realname-equals-mailbox-name
 			   (narrow-to-region (point) (point)))))
 
--- a/lisp/mail/rmail.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/mail/rmail.el	Sun Feb 13 07:19:08 2005 +0000
@@ -117,7 +117,7 @@
 		 (const :tag "Not Required" nil))
   :set-after '(rmail-pop-password)
   :set #'(lambda (symbol value)
-	   (set-default symbol 
+	   (set-default symbol
 			(if (and (not value)
                                  (boundp 'rmail-pop-password)
 				 rmail-pop-password)
@@ -125,14 +125,14 @@
 			  value))
 	   (setq rmail-pop-password nil))
   :group 'rmail-retrieve
-  :version "21.3.50.1")
+  :version "22.1")
 
 (defcustom rmail-remote-password-required nil
   "*Non-nil if a password is required when reading mail from a remote server."
   :type 'boolean
   :set-after '(rmail-pop-password-required)
   :set #'(lambda (symbol value)
-	   (set-default symbol 
+	   (set-default symbol
 			(if (and (not value)
                                  (boundp 'rmail-pop-password-required)
 				 rmail-pop-password-required)
@@ -140,7 +140,7 @@
 			  value))
 	   (setq rmail-pop-password-required nil))
   :group 'rmail-retrieve
-  :version "21.3.50.1")
+  :version "22.1")
 
 (defcustom rmail-movemail-flags nil
   "*List of flags to pass to movemail.
@@ -1621,7 +1621,7 @@
 is non-nil if the user has supplied the password interactively.
 "
   (if (string-match "^\\([^:]+\\)://\\(\\([^:@]+\\)\\(:\\([^@]+\\)\\)?@\\)?.*" file)
-      (let (got-password supplied-password 
+      (let (got-password supplied-password
 	    (proto (match-string 1 file))
 	    (user  (match-string 3 file))
 	    (pass  (match-string 5 file))
@@ -1632,7 +1632,7 @@
 	      (setq got-password (not (rmail-have-password)))
 	      (setq supplied-password (rmail-get-remote-password
 				       (string-equal proto "imap")))))
-			      
+
 	(if (rmail-movemail-variant-p 'emacs)
 	    (if (string-equal proto "pop")
 		(list (concat "po:" user ":" host)
@@ -1671,7 +1671,7 @@
 		    ;; Generate name to move to from inbox name,
 		    ;; in case of multiple inboxes that need moving.
 		    (concat ".newmail-"
-			    (file-name-nondirectory 
+			    (file-name-nondirectory
 			     (if (memq system-type '(windows-nt cygwin))
 				 ;; cannot have "po:" in file name
 				 (substring file 3)
@@ -1777,14 +1777,14 @@
 		     (goto-char (point-min))
 		     (when (looking-at "[A-Z][A-Z0-9_]*:")
 		       (delete-region (point-min) (match-end 0))))
-		   
+
 		   (message "movemail: %s"
 			    (buffer-substring (point-min)
 					      (point-max)))
-		       
+
 		   (sit-for 3)
 		   nil)))))
-	       
+
       ;; At this point, TOFILE contains the name to read:
       ;; Either the alternate name (if we renamed)
       ;; or the actual inbox (if not renaming).
--- a/lisp/mail/sendmail.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/mail/sendmail.el	Sun Feb 13 07:19:08 2005 +0000
@@ -282,7 +282,7 @@
 This directory is used for auto-save files of mail buffers."
   :type '(directory :tag "Directory")
   :group 'sendmail
-  :version "21.4")
+  :version "22.1")
 
 (defvar mail-reply-action nil)
 (defvar mail-send-actions nil
@@ -324,7 +324,7 @@
   :type '(repeat (radio (const :tag "Failure" failure)
 			(const :tag "Delay" delay)
 			(const :tag "Success" success)))
-  :version "21.4")
+  :version "22.1")
 
 ;; Note: could use /usr/ucb/mail instead of sendmail;
 ;; options -t, and -v if not interactive.
--- a/lisp/mail/smtpmail.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/mail/smtpmail.el	Sun Feb 13 07:19:08 2005 +0000
@@ -170,7 +170,7 @@
 		       (string  :tag "Username")
 		       (choice (const :tag "Query when needed" nil)
 				       (string  :tag "Password")))))
-  :version "21.4"
+  :version "22.1"
   :group 'smtpmail)
 
 (defcustom smtpmail-starttls-credentials '(("" 25 "" ""))
--- a/lisp/mouse.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/mouse.el	Sun Feb 13 07:19:08 2005 +0000
@@ -46,7 +46,7 @@
 (defcustom mouse-drag-copy-region t
   "*If non-nil, mouse drag copies region to kill-ring."
   :type 'boolean
-  :version "21.4"
+  :version "22.1"
   :group 'mouse)
 
 (defcustom mouse-1-click-follows-link 350
@@ -75,7 +75,7 @@
 This feature only works in modes that specifically identify
 clickable text as links, so it may not work with some external
 packages.  See `mouse-on-link-p' for details."
-  :version "21.4"
+  :version "22.1"
   :type '(choice (const :tag "Disabled" nil)
 		 (const :tag "Double click" double)
                  (number :tag "Single click time limit" :value 350)
--- a/lisp/net/ange-ftp.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/net/ange-ftp.el	Sun Feb 13 07:19:08 2005 +0000
@@ -1004,7 +1004,7 @@
   :type '(repeat (cons regexp (choice (const :tag "On" "on")
 				      (const :tag "Off" "off")
 				      (const :tag "Don't change" nil))))
-  :version "21.4")
+  :version "22.1")
 
 ;;;; ------------------------------------------------------------
 ;;;; Hash table support.
--- a/lisp/net/ldap.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/net/ldap.el	Sun Feb 13 07:19:08 2005 +0000
@@ -1,9 +1,9 @@
 ;;; ldap.el --- client interface to LDAP for Emacs
 
-;; Copyright (C) 1998, 1999, 2000, 02, 2004  Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2002, 2004  Free Software Foundation, Inc.
 
 ;; Author: Oscar Figueiredo <oscar@cpe.fr>
-;; Maintainer: Pavel Janík <Pavel@Janik.cz>
+;; Maintainer: FSF
 ;; Created: April 1998
 ;; Keywords: comm
 
--- a/lisp/net/tls.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/net/tls.el	Sun Feb 13 07:19:08 2005 +0000
@@ -67,21 +67,21 @@
 
 (defcustom tls-process-connection-type nil
   "*Value for `process-connection-type' to use when starting TLS process."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'tls)
 
 (defcustom tls-success "- Handshake was completed"
   "*Regular expression indicating completed TLS handshakes.
 The default is what GNUTLS's \"gnutls-cli\" outputs."
-  :version "21.4"
+  :version "22.1"
   :type 'regexp
   :group 'tls)
 
 (defcustom tls-certtool-program (executable-find "certtool")
   "Name of  GnuTLS certtool.
 Used by `tls-certificate-information'."
-  :version "21.4"
+  :version "22.1"
   :type '(repeat string)
   :group 'tls)
 
--- a/lisp/net/tramp-smb.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/net/tramp-smb.el	Sun Feb 13 07:19:08 2005 +0000
@@ -340,11 +340,11 @@
   (mapcar
    (lambda (x)
      ;; We cannot call `file-attributes' for backward compatibility reasons.
-     ;; Its optional parameter ID-FORMAT is introduced with Emacs 21.4.
+     ;; Its optional parameter ID-FORMAT is introduced with Emacs 22.1.
      (cons x (tramp-smb-handle-file-attributes
 	(if full x (concat (file-name-as-directory directory) x)) id-format)))
    (directory-files directory full match nosort)))
- 
+
 (defun tramp-smb-handle-file-attributes (filename &optional id-format)
   "Like `file-attributes' for tramp files."
 ;  (with-parsed-tramp-file-name filename nil
@@ -500,7 +500,7 @@
 	     (entries (tramp-smb-get-file-entries user host share file)))
 
 	;; Delete dummy "" entry, useless entries
-	(setq entries 
+	(setq entries
 	      (if (file-directory-p filename)
 		  (delq (assoc "" entries) entries)
 		;; We just need the only and only entry FILENAME.
--- a/lisp/net/tramp-util.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/net/tramp-util.el	Sun Feb 13 07:19:08 2005 +0000
@@ -34,7 +34,7 @@
 
 ;; Define a Tramp minor mode. It's intention is to redefine some keys for Tramp
 ;; specific functions, like compilation.
-;; The key remapping works since Emacs 21.4 only. Unknown for XEmacs.
+;; The key remapping works since Emacs 22.1 only. Unknown for XEmacs.
 
 (when (fboundp 'define-minor-mode)
 
@@ -59,7 +59,7 @@
 bindings.  Otherwise, only bindings active during invocation are taken
 into account.  XEmacs menubar bindings are not changed by this."
     (if (functionp 'command-remapping)
-	;; Emacs 21.4
+	;; Emacs 22.1
 	(eval
 	 `(define-key tramp-minor-mode-map [remap ,old-command] new-command))
       ;; previous Emacs 21 versions.
--- a/lisp/net/tramp-vc.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/net/tramp-vc.el	Sun Feb 13 07:19:08 2005 +0000
@@ -51,7 +51,7 @@
 ;; This used to blow away the file-name-handler-alist and reinstall
 ;; TRAMP into it. This was intended to let VC work remotely. It didn't,
 ;; at least not in my XEmacs 21.2 install.
-;; 
+;;
 ;; In any case, tramp-run-real-handler now deals correctly with disabling
 ;; the things that should be, making this a no-op.
 ;;
@@ -96,7 +96,7 @@
 	(set (make-local-variable 'vc-parent-buffer-name)
 	     (concat " from " (buffer-name camefrom)))
 	(setq default-directory olddir)
-    
+
 	(erase-buffer)
 
 	(mapcar
@@ -230,7 +230,7 @@
         (if (or (and (stringp file)     (tramp-tramp-file-p file))
                 (and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name))))
             (setq ad-return-value
-                  (apply 'tramp-vc-do-command-new buffer okstatus command 
+                  (apply 'tramp-vc-do-command-new buffer okstatus command
                          file ;(or file (buffer-file-name))
                          flags))
           ad-do-it)))
@@ -243,7 +243,7 @@
       (if (or (and (stringp file)     (tramp-tramp-file-p file))
               (and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name))))
           (setq ad-return-value
-                (apply 'tramp-vc-do-command buffer okstatus command 
+                (apply 'tramp-vc-do-command buffer okstatus command
                        (or file (buffer-file-name)) last flags))
         ad-do-it)))))
 ;;-)
@@ -298,7 +298,7 @@
 	    (tramp-wait-for-output)
 	    (setq exec-status (read (current-buffer)))
 	    (message "Command %s returned status %d." command exec-status)))
-      
+
 	;; Maybe okstatus can be `async' here.  But then, maybe the
 	;; async thing is new in Emacs 21, but this function is only
 	;; used in Emacs 20.
@@ -319,7 +319,7 @@
     (if (or (and (stringp file)     (tramp-tramp-file-p file))
             (and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name))))
         (setq ad-return-value
-              (apply 'tramp-vc-simple-command okstatus command 
+              (apply 'tramp-vc-simple-command okstatus command
                      (or file (buffer-file-name)) args))
       ad-do-it)))
 
@@ -381,17 +381,17 @@
 
 
 ;; Do we need to advise the vc-user-login-name function anyway?
-;; This will return the correct login name for the owner of a 
+;; This will return the correct login name for the owner of a
 ;; file. It does not deal with the default remote user name...
 ;;
-;; That is, when vc calls (vc-user-login-name), we return the 
+;; That is, when vc calls (vc-user-login-name), we return the
 ;; local login name, something that may be different to the remote
-;; default. 
+;; default.
 ;;
 ;; The remote VC operations will occur as the user that we logged
 ;; in with however - not always the same as the local user.
 ;;
-;; In the end, I did advise the function. This is because, well, 
+;; In the end, I did advise the function. This is because, well,
 ;; the thing didn't work right otherwise ;)
 ;;
 ;; Daniel Pittman <daniel@danann.net>
@@ -409,7 +409,7 @@
   ;; boundness-checking into this function?
   (let* ((file (symbol-value 'file))
 	 (remote-uid
-	  ;; With Emacs 21.4, `file-attributes' has got an optional parameter
+	  ;; With Emacs 22.1, `file-attributes' has got an optional parameter
 	  ;; ID-FORMAT. Handle this case backwards compatible.
 	  (if (and (functionp 'subr-arity)
 		   (= 2 (cdr (funcall (symbol-function 'subr-arity)
@@ -444,11 +444,11 @@
 		     (tramp-handle-vc-user-login-name uid)))) ; get the owner name
         ad-do-it)))                     ; else call the original
 
-  
+
 ;; Determine the name of the user owning a file.
 (defun tramp-file-owner (filename)
   "Return who owns FILE (user name, as a string)."
-  (let ((v (tramp-dissect-file-name 
+  (let ((v (tramp-dissect-file-name
 	    (expand-file-name filename))))
     (if (not (file-exists-p filename))
         nil                             ; file cannot be opened
--- a/lisp/net/tramp.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/net/tramp.el	Sun Feb 13 07:19:08 2005 +0000
@@ -34,7 +34,7 @@
 ;;
 ;; Notes:
 ;; -----
-;; 
+;;
 ;; This package only works for Emacs 20 and higher, and for XEmacs 21
 ;; and higher.  (XEmacs 20 is missing the `with-timeout' macro.  Emacs
 ;; 19 is reported to have other problems.  For XEmacs 21, you need the
@@ -160,7 +160,7 @@
 (defgroup tramp nil
   "Edit remote files with a combination of rsh and rcp or similar programs."
   :group 'files
-  :version "21.4")
+  :version "22.1")
 
 (defcustom tramp-verbose 9
   "*Verbosity level for tramp.el.  0 means be silent, 10 is most verbose."
@@ -205,7 +205,7 @@
 
 gives the same backup policy for Tramp files on their hosts like the
 policy for local files."
-      :type '(repeat 
+      :type '(repeat
 	      (list (regexp :tag "File regexp")
 		    (string :tag "Backup Dir")
 		    (set :inline t
@@ -506,7 +506,7 @@
 	      (tramp-copy-args            nil)
 	      (tramp-copy-keep-date-arg   "-p")
 	      (tramp-password-end-of-line "xy")) ;see docstring for "xy"
-     ("fcp"   
+     ("fcp"
 	      (tramp-connection-function  tramp-open-connection-rsh)
               (tramp-login-program        "fsh")
               (tramp-copy-program         "fcp")
@@ -633,7 +633,7 @@
     ("rsh"    tramp-multi-connect-rlogin "rsh %h -l %u%n")
     ("remsh"  tramp-multi-connect-rlogin "remsh %h -l %u%n")
     ("ssh"    tramp-multi-connect-rlogin "ssh %h -l %u%n")
-    ("ssht"   tramp-multi-connect-rlogin "ssh %h -e none -t -t -l %u%n")     
+    ("ssht"   tramp-multi-connect-rlogin "ssh %h -e none -t -t -l %u%n")
     ("su"     tramp-multi-connect-su     "su - %u%n")
     ("sudo"   tramp-multi-connect-su     "sudo -u %u -s -p Password:%n"))
   "*List of connection functions for multi-hop methods.
@@ -777,7 +777,7 @@
       "sudo" tramp-completion-function-alist-su)
      (tramp-set-completion-function
       "multi" nil)
-     (tramp-set-completion-function 
+     (tramp-set-completion-function
       "scpx" tramp-completion-function-alist-ssh)
      (tramp-set-completion-function
       "sshx" tramp-completion-function-alist-ssh)
@@ -2064,7 +2064,7 @@
 	(setq filename (tramp-file-name-localname
 			(tramp-dissect-file-name
 			 (expand-file-name filename)))))
-    
+
       ;; Right, they are on the same host, regardless of user, method, etc.
       ;; We now make the link on the remote machine. This will occur as the user
       ;; that FILENAME belongs to.
@@ -2073,7 +2073,7 @@
 	l-multi-method l-method l-user l-host
 	(format "cd %s && %s -sf %s %s"
 		cwd ln
-		filename 
+		filename
 		l-localname)
 	t)))))
 
@@ -2419,7 +2419,7 @@
 	  (let* ((attr (file-attributes f))
 		 (modtime (nth 5 attr))
 		 (mt (visited-file-modtime)))
-	    
+
  	    (cond
 	     ;; file exists, and has a known modtime.
 	     ((and attr (not (equal modtime '(0 0))))
@@ -2766,7 +2766,7 @@
 	    (push (buffer-substring (point)
 				    (tramp-line-end-position))
 		  result))
-	
+
 	  (tramp-send-command multi-method method user host "cd")
 	  (tramp-wait-for-output)
 
@@ -3211,7 +3211,7 @@
 	 'file-error
 	 (list "Removing old file name" "no such directory" filename)))
     ;; Which is better, -r or -R? (-r works for me <daniel@danann.net>)
-    (tramp-send-command multi-method method user host 
+    (tramp-send-command multi-method method user host
 			(format "rm -r %s" (tramp-shell-quote-argument localname)))
     ;; Wait for the remote system to return to us...
     ;; This might take a while, allow it plenty of time.
@@ -3219,7 +3219,7 @@
     ;; Make sure that it worked...
     (and (file-exists-p filename)
 	 (error "Failed to recursively delete %s" filename))))
-	 
+
 (defun tramp-handle-dired-call-process (program discard &rest arguments)
   "Like `dired-call-process' for tramp files."
   (with-parsed-tramp-file-name default-directory nil
@@ -3241,7 +3241,7 @@
 	  (tramp-send-command-and-check multi-method method user host nil)
 	(tramp-send-command multi-method method user host "cd")
 	(tramp-wait-for-output)))))
-	 
+
 (defun tramp-handle-dired-compress-file (file &rest ok-flag)
   "Like `dired-compress-file' for tramp files."
   ;; OK-FLAG is valid for XEmacs only, but not implemented.
@@ -3501,7 +3501,7 @@
 This will break if COMMAND prints a newline, followed by the value of
 `tramp-end-of-output', followed by another newline."
   ;; Asynchronous processes are far from being perfect.  But it works at least
-  ;; for `find-grep-dired' and `find-name-dired' in Emacs 21.4.
+  ;; for `find-grep-dired' and `find-name-dired' in Emacs 22.1.
   (if (tramp-tramp-file-p default-directory)
       (with-parsed-tramp-file-name default-directory nil
 	(let ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command))
@@ -3609,7 +3609,7 @@
   (when (and (numberp buffer) (zerop buffer))
     (error "Implementation does not handle immediate return"))
   (when (consp buffer) (error "Implementation does not handle error files"))
-  (shell-command 
+  (shell-command
    (mapconcat 'tramp-shell-quote-argument
               (cons program args)
               " ")
@@ -4213,7 +4213,7 @@
 
 (defun tramp-repair-jka-compr ()
   "If jka-compr is already loaded, move it to the front of
-`file-name-handler-alist'.  On Emacs 21.4 or so this will not be
+`file-name-handler-alist'.  On Emacs 22.1 or so this will not be
 necessary anymore."
   (let ((jka (rassoc 'jka-compr-handler file-name-handler-alist)))
     (when jka
@@ -4293,7 +4293,7 @@
 ;; `tramp-completion-file-name-regexp-unified' aren't different.
 ;; If nil, `tramp-completion-run-real-handler' is called (i.e. forwarding to
 ;; `tramp-file-name-handler'). Otherwise, it takes `tramp-run-real-handler'.
-;; Using `last-input-event' is a little bit risky, because completing a file 
+;; Using `last-input-event' is a little bit risky, because completing a file
 ;; might require loading other files, like "~/.netrc", and for them it
 ;; shouldn't be decided based on that variable. On the other hand, those files
 ;; shouldn't have partial tramp file name syntax. Maybe another variable should
@@ -4397,7 +4397,7 @@
 			       (funcall (nth 0 x) (nth 1 x)))))
 	       (tramp-get-completion-function m))
 
-	      (setq result (append result 
+	      (setq result (append result
 	        (mapcar
 		 (lambda (x)
 		   (tramp-get-completion-user-host
@@ -4438,7 +4438,7 @@
 ;; [nil nil "x" nil nil]
 ;; [nil "x" nil nil nil]
 
-;; "/x:"                    "/x:y"                   "/x:y:"		      
+;; "/x:"                    "/x:y"                   "/x:y:"
 ;; [nil nil nil "x" ""]     [nil nil nil "x" "y"]    [nil "x" nil "y" ""]
 ;;       "/[x/"                   "/[x/y"
 ;; [nil "x" nil "" nil]     [nil "x" nil "y" nil]
@@ -4907,7 +4907,7 @@
 			"touch" nil (current-buffer) nil "-t" touch-time file))
 	      (pop-to-buffer (current-buffer))
 	      (error "tramp-touch: touch failed"))))))
- 
+
 (defun tramp-buffer-name (multi-method method user host)
   "A name for the connection buffer for USER at HOST using METHOD."
   (if multi-method
@@ -5072,7 +5072,7 @@
                   (file-exists-p existing)
                   (not (file-exists-p nonexisting))))
       (error "Couldn't find command to check if file exists."))))
-    
+
 
 ;; CCC test ksh or bash found for tilde expansion?
 (defun tramp-find-shell (multi-method method user host)
@@ -5171,9 +5171,9 @@
    (tramp-check-ls-commands multi-method method user host "gnuls" tramp-remote-path)
    (tramp-check-ls-commands multi-method method user host "gls" tramp-remote-path)))
 
-;; ------------------------------------------------------------ 
-;; -- Functions for establishing connection -- 
-;; ------------------------------------------------------------ 
+;; ------------------------------------------------------------
+;; -- Functions for establishing connection --
+;; ------------------------------------------------------------
 
 ;; The following functions are actions to be taken when seeing certain
 ;; prompts from the remote host.  See the variable
@@ -5422,7 +5422,7 @@
     (when multi-method
       (error "Cannot multi-connect using telnet connection method"))
     (tramp-pre-connection multi-method method user host)
-    (tramp-message 7 "Opening connection for %s@%s using %s..." 
+    (tramp-message 7 "Opening connection for %s@%s using %s..."
 		   (or user (user-login-name)) host method)
     (let ((process-environment (copy-sequence process-environment)))
       (setenv "TERM" tramp-terminal-type)
@@ -5456,7 +5456,7 @@
          p multi-method method user host)
         (tramp-post-connection multi-method method user host)))))
 
-	    
+
 (defun tramp-open-connection-rsh (multi-method method user host)
   "Open a connection using an rsh METHOD.
 This starts the command `rsh HOST -l USER'[*], then waits for a remote
@@ -5481,7 +5481,7 @@
       (error "Cannot multi-connect using rsh connection method"))
     (tramp-pre-connection multi-method method user host)
     (if (and user (not (string= user "")))
-	(tramp-message 7 "Opening connection for %s@%s using %s..." 
+	(tramp-message 7 "Opening connection for %s@%s using %s..."
 		       user host method)
       (tramp-message 7 "Opening connection at %s using %s..." host method))
     (let ((process-environment (copy-sequence process-environment))
@@ -5510,9 +5510,9 @@
                                                   (> emacs-major-version 20))
                                        tramp-dos-coding-system))
              (p (if (and user (not (string= user "")))
-                    (apply #'start-process bufnam buf login-program  
+                    (apply #'start-process bufnam buf login-program
                            real-host "-l" user login-args)
-                  (apply #'start-process bufnam buf login-program 
+                  (apply #'start-process bufnam buf login-program
                          real-host login-args)))
              (found nil))
         (tramp-set-process-query-on-exit-flag p nil)
@@ -5582,10 +5582,10 @@
 			       tramp-actions-before-shell)
         (tramp-open-connection-setup-interactive-shell
          p multi-method method user host)
-        (tramp-post-connection multi-method method 
+        (tramp-post-connection multi-method method
                                user host)))))
 
-;; HHH: Not Changed.  Multi method.  It is not clear to me how this can 
+;; HHH: Not Changed.  Multi method.  It is not clear to me how this can
 ;;      handle not giving a user name in the "file name".
 ;;
 ;;      This is more difficult than for the single-hop method.  In the
@@ -5655,7 +5655,7 @@
         (tramp-post-connection multi-method method user host)))))
 
 ;; HHH: Changed.  Multi method.  Don't know how to handle this in the case
-;;      of no user name provided.  Hack to make it work as it did before:  
+;;      of no user name provided.  Hack to make it work as it did before:
 ;;      changed `user' to `(or user (user-login-name))' in the places where
 ;;      the value is actually used.
 (defun tramp-multi-connect-telnet (p method user host command)
@@ -5677,8 +5677,8 @@
     (tramp-process-multi-actions p method user host
 				 tramp-multi-actions)))
 
-;; HHH: Changed.  Multi method.  Don't know how to handle this in the case 
-;;      of no user name provided.  Hack to make it work as it did before:  
+;; HHH: Changed.  Multi method.  Don't know how to handle this in the case
+;;      of no user name provided.  Hack to make it work as it did before:
 ;;      changed `user' to `(or user (user-login-name))' in the places where
 ;;      the value is actually used.
 (defun tramp-multi-connect-rlogin (p method user host command)
@@ -5703,8 +5703,8 @@
     (tramp-process-multi-actions p method user host
 				 tramp-multi-actions)))
 
-;; HHH: Changed.  Multi method.  Don't know how to handle this in the case 
-;;      of no user name provided.  Hack to make it work as it did before:  
+;; HHH: Changed.  Multi method.  Don't know how to handle this in the case
+;;      of no user name provided.  Hack to make it work as it did before:
 ;;      changed `user' to `(or user (user-login-name))' in the places where
 ;;      the value is actually used.
 (defun tramp-multi-connect-su (p method user host command)
@@ -6334,7 +6334,7 @@
   (tramp-barf-if-no-shell-prompt
    nil 30
    "Couldn't `%s', see buffer `%s'" command (buffer-name)))
-  
+
 (defun tramp-wait-for-output (&optional timeout)
   "Wait for output from remote rsh command."
   (let ((proc (get-buffer-process (current-buffer)))
@@ -6667,9 +6667,9 @@
    ""))
 
 
-;; ------------------------------------------------------------ 
-;; -- TRAMP file names -- 
-;; ------------------------------------------------------------ 
+;; ------------------------------------------------------------
+;; -- TRAMP file names --
+;; ------------------------------------------------------------
 ;; Conversion functions between external representation and
 ;; internal data structure.  Convenience functions for internal
 ;; data structure.
@@ -6680,7 +6680,7 @@
   "Return t iff NAME is a tramp file."
   (save-match-data
     (string-match tramp-file-name-regexp name)))
- 
+
 ;; HHH: Changed.  Used to assign the return value of (user-login-name)
 ;;      to the `user' part of the structure if a user name was not
 ;;      provided, now it assigns nil.
@@ -6733,7 +6733,7 @@
 If both MULTI-METHOD and METHOD are nil, do a lookup in
 `tramp-default-method-alist'."
   (or multi-method method (tramp-find-default-method user host)))
-    
+
 ;; HHH: Not Changed.  Multi method.  Will probably not handle the case where
 ;;      a user name is not provided in the "file name" very well.
 (defun tramp-dissect-multi-file-name (name)
@@ -6905,7 +6905,7 @@
     (if entry
 	(second entry)
       (symbol-value param))))
-      
+
 
 ;; Auto saving to a special directory.
 
@@ -6937,7 +6937,7 @@
             (tramp-make-auto-save-file-name (buffer-file-name)))
     ad-do-it))
 
-;; In Emacs < 21.4 and XEmacs < 21.5 autosaved remote files have
+;; In Emacs < 22.1 and XEmacs < 21.5 autosaved remote files have
 ;; permission 666 minus umask. This is a security threat.
 
 (defun tramp-set-auto-save-file-modes ()
@@ -7097,9 +7097,9 @@
 	     process flag)))
 
 
-;; ------------------------------------------------------------ 
-;; -- Kludges section -- 
-;; ------------------------------------------------------------ 
+;; ------------------------------------------------------------
+;; -- Kludges section --
+;; ------------------------------------------------------------
 
 ;; Currently (as of Emacs 20.5), the function `shell-quote-argument'
 ;; does not deal well with newline characters.  Newline is replaced by
@@ -7362,7 +7362,7 @@
 ;;   strange when doing zerop, we should kill the process and start
 ;;   again.  (Greg Stark)
 ;; * Add caching for filename completion.  (Greg Stark)
-;;   Of course, this has issues with usability (stale cache bites) 
+;;   Of course, this has issues with usability (stale cache bites)
 ;;      -- <daniel@danann.net>
 ;; * Provide a local cache of old versions of remote files for the rsync
 ;;   transfer method to use.  (Greg Stark)
--- a/lisp/novice.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/novice.el	Sun Feb 13 07:19:08 2005 +0000
@@ -44,7 +44,7 @@
 (defvaralias 'disabled-command-hook 'disabled-command-function)
 (make-obsolete-variable
  'disabled-command-hook
- 'disabled-command-function "21.4")
+ 'disabled-command-function "22.1")
 
 ;;;###autoload
 (defun disabled-command-function (&rest ignore)
--- a/lisp/progmodes/asm-mode.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/progmodes/asm-mode.el	Sun Feb 13 07:19:08 2005 +0000
@@ -186,7 +186,7 @@
       (delete-horizontal-space)
       (tab-to-tab-stop))))
 
-;; Obsolete since Emacs-21.4.
+;; Obsolete since Emacs-22.1.
 (defalias 'asm-newline 'newline-and-indent)
 
 (defun asm-comment ()
--- a/lisp/progmodes/cfengine.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/progmodes/cfengine.el	Sun Feb 13 07:19:08 2005 +0000
@@ -175,7 +175,7 @@
     (if (> (- (point-max) pos) (point))
 	(goto-char (- (point-max) pos)))))
 
-;; This doesn't work too well in Emacs 21.2.  See 21.4 development
+;; This doesn't work too well in Emacs 21.2.  See 22.1 development
 ;; code.
 (defun cfengine-fill-paragraph (&optional justify)
   "Fill `paragraphs' in Cfengine code."
--- a/lisp/progmodes/compile.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/progmodes/compile.el	Sun Feb 13 07:19:08 2005 +0000
@@ -459,7 +459,7 @@
     (t (:weight bold)))
   "Face used to highlight compiler warnings."
   :group 'font-lock-highlighting-faces
-  :version "21.4")
+  :version "22.1")
 
 (defface compilation-info-face
   '((((class color) (min-colors 16) (background light))
@@ -470,7 +470,7 @@
     (t (:weight bold)))
   "Face used to highlight compiler warnings."
   :group 'font-lock-highlighting-faces
-  :version "21.4")
+  :version "22.1")
 
 (defvar compilation-message-face nil
   "Face name to use for whole messages.
@@ -1133,7 +1133,7 @@
 		 (const :tag "Info" 1)
 		 (const :tag "None" 0))
   :group 'compilation
-  :version "21.4")
+  :version "22.1")
 
 (defcustom compilation-skip-visited nil
   "*Compilation motion commands skip visited messages if this is t.
@@ -1142,7 +1142,7 @@
 from a different message."
   :type 'boolean
   :group 'compilation
-  :version "21.4")
+  :version "22.1")
 
 ;;;###autoload
 (defun compilation-mode (&optional name-of-mode)
@@ -1557,7 +1557,7 @@
 If nil, don't scroll the compilation output window."
   :type '(choice integer (const :tag "No window scrolling" nil))
   :group 'compilation
-  :version "21.4")
+  :version "22.1")
 
 (defsubst compilation-set-window (w mk)
   "Align the compilation output window W with marker MK near top."
--- a/lisp/progmodes/fortran.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/progmodes/fortran.el	Sun Feb 13 07:19:08 2005 +0000
@@ -147,7 +147,7 @@
   "*Regexp to match a directive line.
 The matching text will be fontified with `font-lock-keyword-face'.
 The matching line will be given zero indentation."
-  :version "21.4"
+  :version "22.1"
   :type    'regexp
   :group   'fortran-indent)
 
@@ -952,7 +952,7 @@
 			fortran-minimum-statement-indent-tab
 		      fortran-minimum-statement-indent-fixed) (current-column))
                  ;; In col 8 with a single tab to the left.
-		 (eq ?\t (char-after (line-beginning-position))) 
+		 (eq ?\t (char-after (line-beginning-position)))
 		 (not (or (eq last-command 'fortran-indent-line)
 			  (eq last-command
 			      'fortran-indent-new-line))))
--- a/lisp/progmodes/gdb-ui.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/progmodes/gdb-ui.el	Sun Feb 13 07:19:08 2005 +0000
@@ -59,7 +59,7 @@
 ;;    of 'info registers'.
 ;; 3) Use tree-widget.el instead of the speedbar for watch-expressions?
 ;; 4) Mark breakpoint locations on scroll-bar of source buffer?
-;; 5) After release of 21.4 use '-var-list-children --all-values'
+;; 5) After release of 22.1 use '-var-list-children --all-values'
 ;;    and '-stack-list-locals 2' which need GDB 6.1 onwards.
 
 ;;; Code:
@@ -183,13 +183,13 @@
   "Non-nil means record the process input and output in `gdb-debug-log'."
   :type 'boolean
   :group 'gud
-  :version "21.4")
+  :version "22.1")
 
 (defcustom gdb-use-inferior-io-buffer nil
   "Non-nil means display output from the inferior in a separate buffer."
   :type 'boolean
   :group 'gud
-  :version "21.4")
+  :version "22.1")
 
 (defun gdb-ann3 ()
   (setq gdb-debug-log nil)
@@ -248,6 +248,7 @@
   (setq gdb-output-sink 'user)
   (setq gdb-server-prefix "server ")
   (setq gdb-flush-pending-output nil)
+  (setq gdb-location-list nil)
   ;;
   (setq gdb-buffer-type 'gdba)
   ;;
@@ -256,6 +257,7 @@
   (if (eq window-system 'w32)
       (gdb-enqueue-input (list "set new-console off\n" 'ignore)))
   (gdb-enqueue-input (list "set height 0\n" 'ignore))
+  (gdb-enqueue-input (list "set width 0\n" 'ignore))
   ;; find source file and compilation directory here
   (gdb-enqueue-input (list "server list main\n"   'ignore))   ; C program
   (gdb-enqueue-input (list "server list MAIN__\n" 'ignore))   ; Fortran program
@@ -267,7 +269,7 @@
   "If non-nil use FUN::VAR format to display variables in the speedbar." ;
   :type 'boolean
   :group 'gud
-  :version "21.4")
+  :version "22.1")
 
 (defun gud-watch ()
   "Watch expression at point."
@@ -440,7 +442,7 @@
 The highlighting is done with `font-lock-warning-face'."
   :type 'boolean
   :group 'gud
-  :version "21.4")
+  :version "22.1")
 
 (defun gdb-speedbar-expand-node (text token indent)
   "Expand the node the user clicked on.
@@ -490,7 +492,7 @@
 	     (name (funcall (gdb-rules-name-maker rules)))
 	     (new (get-buffer-create name)))
 	(with-current-buffer new
-	  (let ((trigger))	  
+	  (let ((trigger))
 	    (if (cdr (cdr rules))
 		(setq trigger (funcall (car (cdr (cdr rules))))))
 	    (set (make-local-variable 'gdb-buffer-type) key)
@@ -690,7 +692,7 @@
   "Default command to execute an executable under the GDB-UI debugger."
   :type 'string
   :group 'gud
-  :version "21.4")
+  :version "22.1")
 
 (defvar gdb-annotation-rules
   '(("pre-prompt" gdb-pre-prompt)
@@ -788,7 +790,7 @@
 	(setq gud-running t)
 	(if gdb-use-inferior-io-buffer
 	    (setq gdb-output-sink 'inferior))))
-     (t 
+     (t
       (gdb-resync)
       (error "Unexpected `starting' annotation")))))
 
@@ -1046,7 +1048,7 @@
   ;; buffer specific functions
   gdb-info-breakpoints-custom)
 
-(defvar gdb-cdir nil "Compilation directory.")
+(defvar gdb-location-list nil "List of directories for source files.")
 
 (defconst breakpoint-xpm-data
   "/* XPM */
@@ -1145,7 +1147,7 @@
 		(setq bptno (match-string 1))
 		(setq flag (char-after (match-beginning 2)))
 		(beginning-of-line)
-		(if (re-search-forward "in.*at\\s-+" nil t)
+		(if (re-search-forward " in .* at\\s-+" nil t)
 		    (progn
 		      (looking-at "\\(\\S-+\\):\\([0-9]+\\)")
 		      (let ((line (match-string 2)) (buffer-read-only nil)
@@ -1153,18 +1155,30 @@
 			(add-text-properties (point-at-bol) (point-at-eol)
 			 '(mouse-face highlight
 			   help-echo "mouse-2, RET: visit breakpoint"))
-			(with-current-buffer
-			    (find-file-noselect
-			     (if (file-exists-p file) file
-			       (expand-file-name file gdb-cdir)))
-			  (save-current-buffer
-			    (set (make-local-variable 'gud-minor-mode) 'gdba)
-			    (set (make-local-variable 'tool-bar-map)
-				 gud-tool-bar-map))
-			  ;; only want one breakpoint icon at each location
-			  (save-excursion
-			    (goto-line (string-to-number line))
-			    (gdb-put-breakpoint-icon (eq flag ?y) bptno))))))))
+			(unless (file-exists-p file)
+			   (setq file (cdr (assoc bptno gdb-location-list))))
+			(unless (string-equal file "File not found")
+			  (if file
+			      (with-current-buffer
+				  (find-file-noselect file)
+				(save-current-buffer
+				  (set (make-local-variable 'gud-minor-mode)
+				     'gdba)
+				  (set (make-local-variable 'tool-bar-map)
+				       gud-tool-bar-map))
+				;; only want one breakpoint icon at each location
+				(save-excursion
+				  (goto-line (string-to-number line))
+				  (gdb-put-breakpoint-icon (eq flag ?y) bptno)))
+			    (gdb-enqueue-input
+			     (list (concat gdb-server-prefix "list "
+					   (match-string-no-properties 1) ":1\n")
+				   'ignore))
+			    (gdb-enqueue-input
+			     (list (concat gdb-server-prefix "info source\n")
+				   `(lambda ()
+				      (gdb-get-location
+				       ,bptno ,line ,flag)))))))))))
 	  (end-of-line)))))
   (if (gdb-get-buffer 'gdb-assembler-buffer) (gdb-assembler-custom)))
 
@@ -1192,7 +1206,7 @@
 	(with-selected-window (posn-window posn)
 	  (save-excursion
 	    (goto-char (posn-point posn))
-	    (if 
+	    (if
 ;		(or
 		 (posn-object posn)
 ;		 (eq (car (fringe-bitmaps-at-pos (posn-point posn)))
@@ -1300,15 +1314,16 @@
   (save-excursion
     (beginning-of-line 1)
     (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
-	    (looking-at ".*in.*at\\s-+\\(\\S-*\\):\\([0-9]+\\)")
+	    (looking-at "\\([0-9]+\\) .* in .* at\\s-+\\(\\S-*\\):\\([0-9]+\\)")
 	  (looking-at
-     "[0-9]+\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\\(\\S-*\\):\\([0-9]+\\)"))
-	(let ((line (match-string 2))
-	      (file (match-string 1)))
+ "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\\(\\S-*\\):\\([0-9]+\\)"))
+	(let ((bptno (match-string 1))
+	      (file  (match-string 2))
+	      (line  (match-string 3)))
 	  (save-selected-window
 	    (let* ((buf (find-file-noselect (if (file-exists-p file)
 						file
-					      (expand-file-name file gdb-cdir))))
+					      (cdr (assoc bptno gdb-location-list)))))
 		   (window (display-buffer buf)))
 	      (with-current-buffer buf
 		(goto-line (string-to-number line))
@@ -1530,7 +1545,7 @@
   "Number of data items in memory window."
   :type 'integer
   :group 'gud
-  :version "21.4")
+  :version "22.1")
 
 (defcustom gdb-memory-format "x"
   "Display format of data items in memory window."
@@ -1540,7 +1555,7 @@
 		 (const :tag "Octal" "o")
 		 (const :tag "Binary" "t"))
   :group 'gud
-  :version "21.4")
+  :version "22.1")
 
 (defcustom gdb-memory-unit "w"
   "Unit size of data items in memory window."
@@ -1549,7 +1564,7 @@
 		 (const :tag "Word" "w")
 		 (const :tag "Giant word" "g"))
   :group 'gud
-  :version "21.4")
+  :version "22.1")
 
 (gdb-set-buffer-rules 'gdb-memory-buffer
 		      'gdb-memory-buffer-name
@@ -1739,7 +1754,7 @@
   (use-local-map gdb-memory-mode-map)
   (setq header-line-format
 	'(:eval
-	  (concat 
+	  (concat
 	   "Read address: "
 	   (propertize gdb-memory-address
 		       'face font-lock-warning-face
@@ -1943,7 +1958,7 @@
   "Nil means don't display source file containing the main routine."
   :type 'boolean
   :group 'gud
-  :version "21.4")
+  :version "22.1")
 
 (defun gdb-set-window-buffer (name)
   (set-window-buffer (selected-window) (get-buffer name))
@@ -1987,7 +2002,7 @@
 `gdba'."
   :type 'boolean
   :group 'gud
-  :version "21.4")
+  :version "22.1")
 
 (defun gdb-many-windows (arg)
   "Toggle the number of windows in the basic arrangement."
@@ -2039,21 +2054,37 @@
   "Find the source file where the program starts and displays it with related
 buffers."
   (goto-char (point-min))
-  (if (search-forward "directory is " nil t)
-      (if (looking-at "\\S-*:\\(\\S-*\\)")
-	  (setq gdb-cdir (match-string 1))
-	(looking-at "\\S-*")
-	(setq gdb-cdir (match-string 0))))
   (if (search-forward "Located in " nil t)
       (if (looking-at "\\S-*")
 	  (setq gdb-main-file (match-string 0))))
  (if gdb-many-windows
       (gdb-setup-windows)
-    (gdb-get-create-buffer 'gdb-breakpoints-buffer)
+   (gdb-get-create-buffer 'gdb-breakpoints-buffer)
     (if gdb-show-main
       (let ((pop-up-windows t))
 	(display-buffer (gud-find-file gdb-main-file))))))
 
+(defun gdb-get-location (bptno line flag)
+  "Find the directory containing the relevant source file.
+Put in buffer and place breakpoint icon."
+  (goto-char (point-min))
+  (if (search-forward "Located in " nil t)
+      (if (looking-at "\\S-*")
+	  (push (cons bptno (match-string 0)) gdb-location-list))
+    (gdb-resync)
+    (push (cons bptno "File not found") gdb-location-list)
+    (error "Cannot find source file for breakpoint location.
+Add directory to search path for source files using the GDB command, dir."))
+  (with-current-buffer
+      (find-file-noselect (match-string 0))
+    (save-current-buffer
+      (set (make-local-variable 'gud-minor-mode) 'gdba)
+      (set (make-local-variable 'tool-bar-map) gud-tool-bar-map))
+    ;; only want one breakpoint icon at each location
+    (save-excursion
+      (goto-line (string-to-number line))
+      (gdb-put-breakpoint-icon (eq flag ?y) bptno))))
+
 ;;from put-image
 (defun gdb-put-string (putstring pos &optional dprop)
   "Put string PUTSTRING in front of POS in the current buffer.
--- a/lisp/progmodes/grep.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/progmodes/grep.el	Sun Feb 13 07:19:08 2005 +0000
@@ -44,7 +44,7 @@
   "*Number of lines in a grep window.  If nil, use `compilation-window-height'."
   :type '(choice (const :tag "Default" nil)
 		 integer)
-  :version "21.4"
+  :version "22.1"
   :group 'grep)
 
 (defcustom grep-auto-highlight t
@@ -61,7 +61,7 @@
   :type '(choice (const :tag "All" t)
 		 (const :tag "None" nil)
 		 (integer :tag "First N lines"))
-  :version "21.4"
+  :version "22.1"
   :group 'grep)
 
 (defcustom grep-highlight-matches 'auto-detect
@@ -81,7 +81,7 @@
   :type '(choice (const :tag "Do not highlight matches with grep markers" nil)
 		 (const :tag "Highlight matches with grep markers" t)
 		 (other :tag "Not Set" auto-detect))
-  :version "21.4"
+  :version "22.1"
   :group 'grep)
 
 (defcustom grep-scroll-output nil
@@ -91,7 +91,7 @@
 output window so that the end of the output is always visible rather
 than the begining."
   :type 'boolean
-  :version "21.4"
+  :version "22.1"
   :group 'grep)
 
 ;;;###autoload
@@ -141,7 +141,7 @@
  <R> - the regular expression searched for."
   :type '(choice string
 		 (const :tag "Not Set" nil))
-  :version "21.4"
+  :version "22.1"
   :group 'grep)
 
 (defcustom grep-tree-files-aliases '(
@@ -172,7 +172,7 @@
 See `compilation-error-screen-columns'"
   :type '(choice (const :tag "Default" nil)
 		 integer)
-  :version "21.4"
+  :version "22.1"
   :group 'grep)
 
 ;;;###autoload
@@ -253,7 +253,7 @@
   '(("^\\(.+?\\)[: \t]+\
 \\([0-9]+\\)\\([.:]?\\)\\([0-9]+\\)?\
 \\(?:-\\(?:\\([0-9]+\\)\\3\\)?\\.?\\([0-9]+\\)?\\)?[: \t]" 1 (2 . 5) (4 . 6))
-    ("^\\(.+?\\)[:(]+\\([0-9]+\\)\\([:)]\\).*?\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)"
+    ("^\\(.+?\\)[:(]+\\([0-9]+\\)\\([:)]\\).*?\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(\033\\[K\\)?\\)"
      1 2
      ;; Calculate column positions (beg . end) of first grep match on a line
      ((lambda ()
@@ -293,7 +293,7 @@
       (1 compilation-warning-face)
       (2 compilation-line-face))
      ;; Highlight grep matches and delete markers
-     ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)"
+     ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(\033\\[K\\)?\\)"
       (2 grep-match-face)
       ((lambda (p))
        (progn
--- a/lisp/progmodes/python.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/progmodes/python.el	Sun Feb 13 07:19:08 2005 +0000
@@ -72,7 +72,7 @@
 (defgroup python nil
   "Silly walks in the Python language"
   :group 'languages
-  :version "21.4"
+  :version "22.1"
   :link '(emacs-commentary-link "python"))
 
 ;;;###autoload
--- a/lisp/progmodes/sql.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/progmodes/sql.el	Sun Feb 13 07:19:08 2005 +0000
@@ -617,7 +617,7 @@
   ;; -w is the linesize
   "*List of additional options for `sql-ms-program'."
   :type '(repeat string)
-  :version "21.4"
+  :version "22.1"
   :group 'SQL)
 
 ;; Customization for Postgres
--- a/lisp/recentf.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/recentf.el	Sun Feb 13 07:19:08 2005 +0000
@@ -192,7 +192,7 @@
   'recentf-menu-append-commands-flag)
 (make-obsolete-variable 'recentf-menu-append-commands-p
                         'recentf-menu-append-commands-flag
-                        "21.4")
+                        "22.1")
 
 (defcustom recentf-keep-non-readable-files-flag nil
   "*non-nil means to keep non readable files in the recent list."
@@ -203,7 +203,7 @@
   'recentf-keep-non-readable-files-flag)
 (make-obsolete-variable 'recentf-keep-non-readable-files-p
                         'recentf-keep-non-readable-files-flag
-                        "21.4")
+                        "22.1")
 
 (defcustom recentf-auto-cleanup 'mode
   "*Define when to automatically cleanup the recent list.
@@ -740,7 +740,7 @@
                 elts  (cdr elts)))
         (unless menu
           (push elt others)))
-      
+
       (setq l nil
             min (if (natnump recentf-arrange-by-rules-min-items)
                     recentf-arrange-by-rules-min-items 0))
@@ -755,7 +755,7 @@
              menu (recentf-apply-menu-filter
                    recentf-arrange-by-rule-subfilter (nreverse elts)))
             (push menu l))))
-      
+
       (if (and (stringp recentf-arrange-by-rule-others) others)
           (nreverse
            (cons
--- a/lisp/replace.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/replace.el	Sun Feb 13 07:19:08 2005 +0000
@@ -62,7 +62,7 @@
   "*Non-nil means `query-replace' and friends ignore read-only matches."
   :type 'boolean
   :group 'matching
-  :version "21.4")
+  :version "22.1")
 
 (defcustom query-replace-highlight t
   "*Non-nil means to highlight matches during query replacement."
@@ -77,13 +77,13 @@
   :type 'boolean
   :group 'lazy-highlight
   :group 'matching
-  :version "21.4")
+  :version "22.1")
 
 (defface query-replace
   '((t (:inherit isearch)))
   "Face for highlighting query replacement matches."
   :group 'matching
-  :version "21.4")
+  :version "22.1")
 
 (defun query-replace-descr (string)
   (mapconcat 'isearch-text-char-description string ""))
@@ -789,7 +789,7 @@
     (t :background "gray"))
   "Face used to highlight matches permanently."
   :group 'matching
-  :version "21.4")
+  :version "22.1")
 
 (defcustom list-matching-lines-default-context-lines 0
   "*Default number of context lines included around `list-matching-lines' matches.
--- a/lisp/ruler-mode.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/ruler-mode.el	Sun Feb 13 07:19:08 2005 +0000
@@ -116,7 +116,7 @@
 
 (defgroup ruler-mode nil
   "Display a ruler in the header line."
-  :version "21.4"
+  :version "22.1"
   :group 'convenience)
 
 (defcustom ruler-mode-show-tab-stops nil
--- a/lisp/server.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/server.el	Sun Feb 13 07:19:08 2005 +0000
@@ -123,7 +123,7 @@
 It is not meaningful to set this to a specific frame or window with Custom.
 Only programs can do so."
   :group 'server
-  :version "21.4"
+  :version "22.1"
   :type '(choice (const :tag "Use selected window"
 			:match (lambda (widget value)
 				 (not (functionp value)))
@@ -282,7 +282,7 @@
 `emacsclient' program.  See `server-start' and Info node `Emacs server'."
   :global t
   :group 'server
-  :version "21.4"
+  :version "22.1"
   ;; Fixme: Should this check for an existing server socket and do
   ;; nothing if there is one (for multiple Emacs sessions)?
   (server-start (not server-mode)))
--- a/lisp/simple.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/simple.el	Sun Feb 13 07:19:08 2005 +0000
@@ -71,13 +71,13 @@
 (defgroup next-error nil
   "next-error support framework."
   :group 'compilation
-  :version "21.4")
+  :version "22.1")
 
 (defface next-error
   '((t (:inherit region)))
   "Face used to highlight next error locus."
   :group 'next-error
-  :version "21.4")
+  :version "22.1")
 
 (defcustom next-error-highlight 0.1
   "*Highlighting of locations in selected source buffers.
@@ -90,7 +90,7 @@
                  (const :tag "No highlighting" nil)
                  (const :tag "Fringe arrow" 'fringe-arrow))
   :group 'next-error
-  :version "21.4")
+  :version "22.1")
 
 (defcustom next-error-highlight-no-select 0.1
   "*Highlighting of locations in non-selected source buffers.
@@ -103,7 +103,7 @@
                  (const :tag "No highlighting" nil)
                  (const :tag "Fringe arrow" 'fringe-arrow))
   :group 'next-error
-  :version "21.4")
+  :version "22.1")
 
 (defvar next-error-last-buffer nil
   "The most recent next-error buffer.
@@ -902,7 +902,7 @@
                (eq this-command last-command)
                (if (boundp 'edebug-active) edebug-active)))
       (let ((char-string
-             (if (or (and (boundp 'edebug-active) edebug-active)
+             (if (or (if (boundp 'edebug-active) edebug-active)
                      (memq this-command '(eval-last-sexp eval-print-last-sexp)))
                  (prin1-char value))))
         (if char-string
@@ -1540,7 +1540,7 @@
 excessively long before answering the question."
   :type 'boolean
   :group 'undo
-  :version "21.4")
+  :version "22.1")
 
 (defvar undo-extra-outer-limit nil
   "If non-nil, an extra level of size that's ok in an undo item.
@@ -2461,7 +2461,7 @@
 which means to discard all text properties."
   :type '(choice (const :tag "All" t) (repeat symbol))
   :group 'killing
-  :version "21.4")
+  :version "22.1")
 
 (defvar yank-window-start nil)
 (defvar yank-undo-function nil
@@ -4674,7 +4674,8 @@
 			       (point-min)
 			       'mouse-face))
 	       (element-common-end
-		(+ (or element-start nil) common-string-length))
+		(and element-start
+		     (+ (or element-start nil) common-string-length)))
 	       (maxp (point-max)))
 	  (while (and element-start (< element-common-end maxp))
 	    (when (and (get-char-property element-start 'mouse-face)
@@ -5094,7 +5095,7 @@
 wait this many seconds after Emacs becomes idle before doing an update."
   :type 'number
   :group 'display
-  :version "21.4")
+  :version "22.1")
 
 (defvar vis-mode-saved-buffer-invisibility-spec nil
   "Saved value of `buffer-invisibility-spec' when Visible mode is on.")
--- a/lisp/speedbar.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/speedbar.el	Sun Feb 13 07:19:08 2005 +0000
@@ -711,7 +711,7 @@
 proportionally to the number of subdirs."
   :group 'speedbar
   :type 'boolean
-  :version 21.4)
+  :version 22.1)
 
 (defun speedbar-add-supported-extension (extension)
   "Add EXTENSION as a new supported extension for speedbar tagging.
--- a/lisp/startup.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/startup.el	Sun Feb 13 07:19:08 2005 +0000
@@ -735,12 +735,14 @@
               (<= (frame-parameter nil 'tool-bar-lines) 0))
     (tool-bar-mode 1))
 
-  ;; Can't do this init in defcustom because window-system isn't set.
+  ;; Can't do this init in defcustom because the relevant variables
+  ;; are not set.  If you make any changes to the `or' form below,
+  ;; you should also change the corresponding expression in the
+  ;; defcustom in frame.el, or Custom will be badly confused.
   (unless (or noninteractive
 	      emacs-quick-startup
               (eq system-type 'ms-dos)
               (not (memq window-system '(x w32))))
-    (setq-default blink-cursor t)
     (blink-cursor-mode 1))
 
   (unless noninteractive
--- a/lisp/subr.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/subr.el	Sun Feb 13 07:19:08 2005 +0000
@@ -810,9 +810,9 @@
 is converted into a string by expressing it in decimal."
   (dolist (el args)
     (insert (if (integerp el) (number-to-string el) el))))
-(make-obsolete 'insert-string 'insert "21.4")
+(make-obsolete 'insert-string 'insert "22.1")
 (defun makehash (&optional test) (make-hash-table :test (or test 'eql)))
-(make-obsolete 'makehash 'make-hash-table "21.4")
+(make-obsolete 'makehash 'make-hash-table "22.1")
 
 ;; Some programs still use this as a function.
 (defun baud-rate ()
@@ -837,9 +837,9 @@
   "use timers instead, with `run-with-idle-timer'." "before 19.34")
 
 (defvaralias 'x-lost-selection-hooks 'x-lost-selection-functions)
-(make-obsolete-variable 'x-lost-selection-hooks 'x-lost-selection-functions "21.4")
+(make-obsolete-variable 'x-lost-selection-hooks 'x-lost-selection-functions "22.1")
 (defvaralias 'x-sent-selection-hooks 'x-sent-selection-functions)
-(make-obsolete-variable 'x-sent-selection-hooks 'x-sent-selection-functions "21.4")
+(make-obsolete-variable 'x-sent-selection-hooks 'x-sent-selection-functions "22.1")
 
 (defvaralias 'messages-buffer-max-lines 'message-log-max)
 
@@ -1156,7 +1156,7 @@
 
 (make-obsolete 'process-kill-without-query
                "use `process-query-on-exit-flag' or `set-process-query-on-exit-flag'."
-               "21.4")
+               "22.1")
 (defun process-kill-without-query (process &optional flag)
   "Say no query needed if PROCESS is running when Emacs is exited.
 Optional second argument if non-nil says to require a query.
--- a/lisp/textmodes/conf-mode.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/textmodes/conf-mode.el	Sun Feb 13 07:19:08 2005 +0000
@@ -36,7 +36,7 @@
 (defgroup conf nil
   "Configuration files."
   :group 'data
-  :version "21.4")
+  :version "22.1")
 
 (defcustom conf-assignment-column 24
   "Align assignments to this column by default with \\[conf-align-assignments].
--- a/lisp/textmodes/sgml-mode.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/textmodes/sgml-mode.el	Sun Feb 13 07:19:08 2005 +0000
@@ -350,7 +350,7 @@
 Otherwise, it is set to be buffer-local when the file has
  a DOCTYPE or an XML declaration."
   :type 'boolean
-  :version "21.4"
+  :version "22.1"
   :group 'sgml)
 
 (defvar sgml-empty-tags nil
@@ -1213,7 +1213,7 @@
 		  (if (cdr tmp) (setcdr tmp (cddr tmp)))))
 	    (message "Unmatched tags <%s> and </%s>"
 		     (sgml-tag-name tag-info) (pop stack)))))
-	
+
 	(if (and (null stack) (sgml-unclosed-tag-p (sgml-tag-name tag-info)))
 	    ;; This is a top-level open of an implicitly closed tag, so any
 	    ;; occurrence of such an open tag at the same level can be ignored
--- a/lisp/textmodes/table.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/textmodes/table.el	Sun Feb 13 07:19:08 2005 +0000
@@ -646,7 +646,7 @@
   :group 'wp
   :group 'paragraphs
   :group 'fill
-  :version "21.4")
+  :version "22.1")
 
 (defgroup table-hooks nil
   "Hooks for table manipulation utilities"
--- a/lisp/textmodes/tex-mode.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/textmodes/tex-mode.el	Sun Feb 13 07:19:08 2005 +0000
@@ -127,7 +127,7 @@
 If nil, TeX runs with no options.  See the documentation of `tex-command'."
   :type 'string
   :group 'tex-run
-  :version "21.4")
+  :version "22.1")
 
 ;;;###autoload
 (defcustom tex-start-commands "\\nonstopmode\\input"
@@ -139,7 +139,7 @@
 		       "\\nonstopmode\\input")
 		(string :tag "String at your choice"))
   :group 'tex-run
-  :version "21.4")
+  :version "22.1")
 
 (defvar latex-standard-block-names
   '("abstract"		"array"		"center"	"description"
@@ -199,7 +199,7 @@
 (defcustom tex-dvi-view-command
   '(cond
     ((eq window-system 'x) "xdvi")
-    ((eq window-system 'w32) "yap") 
+    ((eq window-system 'w32) "yap")
     (t "dvi2tty * | cat -s"))
   "*Command used by \\[tex-view] to display a `.dvi' file.
 If it is a string, that specifies the command directly.
@@ -1776,7 +1776,7 @@
 	   (when (file-newer-than-file-p f file)
 	     (setq uptodate nil)))))
      uptodate)))
-    
+
 
 (autoload 'format-spec "format-spec")
 
--- a/lisp/thumbs.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/thumbs.el	Sun Feb 13 07:19:08 2005 +0000
@@ -21,7 +21,7 @@
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
-;;              
+;;
 ;; Thanks: Alex Schroeder <alex@gnu.org> for maintaining the package at some time
 ;;         The peoples at #emacs@freenode.net for numerous help
 ;;         RMS for emacs and the GNU project.
@@ -62,7 +62,7 @@
 
 (defgroup thumbs nil
   "Thumbnails previewer."
-  :version "21.4"
+  :version "22.1"
   :group 'multimedia)
 
 (defcustom thumbs-thumbsdir
--- a/lisp/time.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/time.el	Sun Feb 13 07:19:08 2005 +0000
@@ -131,7 +131,7 @@
 make the mail indicator stand out on a colour display."
   :group 'faces
   :group 'display-time
-  :version "21.4"
+  :version "22.1"
   :type '(choice (const :tag "None" nil) face))
 
 (defvar display-time-mail-icon
@@ -153,7 +153,7 @@
   "String to use as the mail indicator in `display-time-string-forms'.
 This can use the Unicode letter character if you can display it."
   :group 'display-time
-  :version "21.4"
+  :version "22.1"
   :type '(choice (const "Mail")
 		 ;; Use :tag here because the Lucid menu won't display
 		 ;; multibyte text.
--- a/lisp/tree-widget.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/tree-widget.el	Sun Feb 13 07:19:08 2005 +0000
@@ -112,7 +112,7 @@
 ;;
 (defgroup tree-widget nil
   "Customization support for the Tree Widget Library."
-  :version "21.4"
+  :version "22.1"
   :group 'widgets)
 
 (defcustom tree-widget-image-enable
--- a/lisp/url/url-vars.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/url/url-vars.el	Sun Feb 13 07:19:08 2005 +0000
@@ -30,7 +30,7 @@
 
 (defgroup url nil
   "Uniform Resource Locator tool"
-  :version "21.4"
+  :version "22.1"
   :group 'hypermedia)
 
 (defgroup url-file nil
--- a/lisp/vc-cvs.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/vc-cvs.el	Sun Feb 13 07:19:08 2005 +0000
@@ -42,7 +42,7 @@
 		 (repeat :tag "Argument List"
 			 :value ("")
 			 string))
-  :version "21.4"
+  :version "22.1"
   :group 'vc)
 
 (defcustom vc-cvs-register-switches nil
@@ -106,7 +106,7 @@
 Format is according to `format-time-string'.  Only used if
 `vc-cvs-sticky-tag-display' is t."
   :type '(string)
-  :version "21.4"
+  :version "22.1"
   :group 'vc)
 
 (defcustom vc-cvs-sticky-tag-display t
@@ -145,7 +145,7 @@
 
 See also variable `vc-cvs-sticky-date-format-string'."
   :type '(choice boolean function)
-  :version "21.4"
+  :version "22.1"
   :group 'vc)
 
 ;;;
@@ -548,7 +548,7 @@
 	       (append (vc-switches nil 'diff) '("/dev/null")))
 	;; Even if it's empty, it's locally modified.
 	1)
-    (let* ((async (and (not vc-disable-async-diff) 
+    (let* ((async (and (not vc-disable-async-diff)
                        (vc-stay-local-p file)
                        (fboundp 'start-process)))
 	   (status (apply 'vc-cvs-command (or buffer "*vc-diff*")
--- a/lisp/vc-hooks.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/vc-hooks.el	Sun Feb 13 07:19:08 2005 +0000
@@ -149,7 +149,7 @@
 		(set :format "%v" :inline t (const :format "%t" :tag "don't" except))
 		(regexp :format " stay local,\n%t: %v" :tag "if it matches")
 		(repeat :format "%v%i\n" :inline t (regexp :tag "or"))))
-  :version "21.4"
+  :version "22.1"
   :group 'vc)
 
 (defun vc-stay-local-p (file)
@@ -632,8 +632,15 @@
   (unless (and (fboundp 'msdos-long-file-names)
                (not (with-no-warnings (msdos-long-file-names))))
     (vc-delete-automatic-version-backups file)
-    (copy-file file (vc-version-backup-file-name file)
-               nil 'keep-date)))
+    (condition-case nil
+        (copy-file file (vc-version-backup-file-name file)
+                   nil 'keep-date)
+      ;; It's ok if it doesn't work (e.g. directory not writable),
+      ;; since this is just for efficiency.
+      (file-error
+       (message
+        (concat "Warning: Cannot make version backup; "
+                "diff/revert therefore not local"))))))
 
 (defun vc-before-save ()
   "Function to be called by `basic-save-buffer' (in files.el)."
--- a/lisp/vc-mcvs.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/vc-mcvs.el	Sun Feb 13 07:19:08 2005 +0000
@@ -70,7 +70,7 @@
 		 (repeat :tag "Argument List"
 			 :value ("")
 			 string))
-  :version "21.4"
+  :version "22.1"
   :group 'vc)
 
 (defcustom vc-mcvs-register-switches nil
@@ -82,7 +82,7 @@
 		 (repeat :tag "Argument List"
 			 :value ("")
 			 string))
-  :version "21.4"
+  :version "22.1"
   :group 'vc)
 
 (defcustom vc-mcvs-diff-switches nil
@@ -92,13 +92,13 @@
 		 (repeat :tag "Argument List"
 			 :value ("")
 			 string))
-  :version "21.4"
+  :version "22.1"
   :group 'vc)
 
 (defcustom vc-mcvs-header (or (cdr (assoc 'MCVS vc-header-alist))
 			      vc-cvs-header)
   "*Header keywords to be inserted by `vc-insert-headers'."
-  :version "21.4"
+  :version "22.1"
   :type '(repeat string)
   :group 'vc)
 
@@ -107,7 +107,7 @@
 This is only meaningful if you don't use the implicit checkout model
 \(i.e. if you have $CVSREAD set)."
   :type 'boolean
-  :version "21.4"
+  :version "22.1"
   :group 'vc)
 
 ;;;
@@ -447,7 +447,7 @@
 	;; Even if it's empty, it's locally modified.
 	1)
     (let* ((async (and (not vc-disable-async-diff)
-                       (vc-stay-local-p file) 
+                       (vc-stay-local-p file)
                        (fboundp 'start-process)))
 	   ;; Run the command from the root dir so that `mcvs filt' returns
 	   ;; valid relative names.
--- a/lisp/vc-svn.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/vc-svn.el	Sun Feb 13 07:19:08 2005 +0000
@@ -51,7 +51,7 @@
 		 (repeat :tag "Argument List"
 			 :value ("")
 			 string))
-  :version "21.4"
+  :version "22.1"
   :group 'vc)
 
 (defcustom vc-svn-register-switches nil
@@ -63,7 +63,7 @@
 		 (repeat :tag "Argument List"
 			 :value ("")
 			 string))
-  :version "21.4"
+  :version "22.1"
   :group 'vc)
 
 (defcustom vc-svn-diff-switches
@@ -77,12 +77,12 @@
 		 (repeat :tag "Argument List"
 			 :value ("")
 			 string))
-  :version "21.4"
+  :version "22.1"
   :group 'vc)
 
 (defcustom vc-svn-header (or (cdr (assoc 'SVN vc-header-alist)) '("\$Id\$"))
   "*Header keywords to be inserted by `vc-insert-headers'."
-  :version "21.4"
+  :version "22.1"
   :type '(repeat string)
   :group 'vc)
 
@@ -92,7 +92,7 @@
 This is only meaningful if you don't use the implicit checkout model
 \(i.e. if you have $SVNREAD set)."
   ;; :type 'boolean
-  ;; :version "21.4"
+  ;; :version "22.1"
   ;; :group 'vc
   )
 
--- a/lisp/vc.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/vc.el	Sun Feb 13 07:19:08 2005 +0000
@@ -573,7 +573,7 @@
   :type '(choice (const :tag "No" nil)
                  (const :tag "Yes" t))
   :group 'vc
-  :version "21.4")
+  :version "22.1")
 
 ;;;###autoload
 (defcustom vc-checkout-hook nil
@@ -1827,7 +1827,7 @@
 
 ;; Old def for compatibility with Emacs-21.[123].
 (defmacro vc-diff-switches-list (backend) `(vc-switches ',backend 'diff))
-(make-obsolete 'vc-diff-switches-list 'vc-switches "21.4")
+(make-obsolete 'vc-diff-switches-list 'vc-switches "22.1")
 
 (defun vc-default-diff-tree (backend dir rev1 rev2)
   "List differences for all registered files at and below DIR.
--- a/lisp/w32-vars.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/w32-vars.el	Sun Feb 13 07:19:08 2005 +0000
@@ -30,7 +30,7 @@
 (defgroup w32 nil
   "MS-Windows specific features"
   :group 'environment
-  :version "21.4"
+  :version "22.1"
   :prefix "w32")
 
 ;; Redefine the font selection to use the standard W32 dialog
--- a/lisp/x-dnd.el	Sun Feb 13 00:40:20 2005 +0000
+++ b/lisp/x-dnd.el	Sun Feb 13 07:19:08 2005 +0000
@@ -47,7 +47,7 @@
 the wanted action as car and the wanted type as cdr.  The wanted action
 can be copy, move, link, ask or private.
 The default value for this variable is `x-dnd-default-test-function'."
-  :version "21.4"
+  :version "22.1"
   :type 'symbol
   :group 'x)
 
@@ -70,7 +70,7 @@
 for that.
 The function shall return the action done (move, copy, link or private)
 if some action was made, or nil if the URL is ignored."
-  :version "21.4"
+  :version "22.1"
   :type 'alist
   :group 'x)
 
@@ -98,13 +98,13 @@
 call to `x-dnd-test-function'.  DATA is the drop data.
 The function shall return the action used (copy, move, link or private) if drop
 is successful, nil if not."
-  :version "21.4"
+  :version "22.1"
   :type 'alist
   :group 'x)
 
 (defcustom x-dnd-open-file-other-window nil
   "If non-nil, always use find-file-other-window to open dropped files."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'x)
 
@@ -124,7 +124,7 @@
     )
   "The types accepted by default for dropped data.
 The types are chosen in the order they appear in the list."
-  :version "21.4"
+  :version "22.1"
   :type '(repeat string)
   :group 'x
 )
@@ -135,10 +135,10 @@
   "The current state for a drop.
 This is an alist with one entry for each display.  The value for each display
 is a vector that contains the state for drag and drop for that display.
-Elements in the vector are: 
+Elements in the vector are:
 Last buffer drag was in,
 last window drag was in,
-types available for drop, 
+types available for drop,
 the action suggested by the source,
 the type we want for the drop,
 the action we want for the drop,
@@ -209,7 +209,7 @@
 	       (handler (cdr (assoc (cdr action-type) x-dnd-types-alist))))
 	  ;; Ignore action-type if we have no handler.
 	  (setq current-state
-		(x-dnd-save-state window 
+		(x-dnd-save-state window
 				  action
 				  (when handler action-type)))))))
   (let ((current-state (x-dnd-get-state-for-frame window)))
@@ -300,13 +300,13 @@
 		 ((string-match "^file:" uri)		; Old KDE, Motif, Sun
 		  (substring uri (match-end 0))))))
     (when (and f must-exist)
-      (let* ((decoded-f (decode-coding-string 
+      (let* ((decoded-f (decode-coding-string
 			 f
 			 (or file-name-coding-system
 			     default-file-name-coding-system)))
 	     (try-f (if (file-readable-p decoded-f) decoded-f f)))
 	(when (file-readable-p try-f) try-f)))))
-	
+
 
 (defun x-dnd-open-local-file (uri action)
   "Open a local file.
@@ -590,7 +590,7 @@
 			(frame-parameter frame 'outer-window-id))
 		       accept ;; 1 = Accept, 0 = reject.
 		       (x-dnd-get-drop-x-y frame window)
-		       (x-dnd-get-drop-width-height 
+		       (x-dnd-get-drop-width-height
 			frame window (eq accept 1))
 		       (or reply-action 0)
 		       )))
@@ -612,9 +612,9 @@
 
 	   (setq action (if value
 			    (condition-case info
-				(x-dnd-drop-data event frame window value 
+				(x-dnd-drop-data event frame window value
 						 (x-dnd-current-type window))
-			      (error 
+			      (error
 			       (message "Error: %s" info)
 			       nil))))
 
@@ -738,7 +738,7 @@
 	  ((eq message-type 'XmDRAG_MOTION)
 	   (let* ((state (x-dnd-get-state-for-frame frame))
 		  (timestamp (x-dnd-motif-value-to-list
-			      (x-dnd-get-motif-value data 4 4 
+			      (x-dnd-get-motif-value data 4 4
 						     source-byteorder)
 			      4 my-byteorder))
 		  (x (x-dnd-motif-value-to-list
@@ -757,7 +757,7 @@
 		  (reply-flags
 		   (x-dnd-motif-value-to-list
 		    (if reply-action
-			(+ reply-action 
+			(+ reply-action
 			   ?\x30	; 30:  valid drop site
 			   ?\x700)	; 700: can do copy, move or link
 		      ?\x30)		; 30:  drop site, but noop.
@@ -794,7 +794,7 @@
 		  (reply-flags
 		   (x-dnd-motif-value-to-list
 		    (if reply-action
-			(+ reply-action 
+			(+ reply-action
 			   ?\x30	; 30:  valid drop site
 			   ?\x700)	; 700: can do copy, move or link
 		      ?\x30)		; 30:  drop site, but noop
@@ -833,7 +833,7 @@
 		  (reply-flags
 		   (x-dnd-motif-value-to-list
 		    (if reply-action
-			(+ reply-action 
+			(+ reply-action
 			   ?\x30	; 30:  valid drop site
 			   ?\x700)	; 700: can do copy, move or link
 		      (+ ?\x30		; 30:  drop site, but noop.
@@ -847,7 +847,7 @@
 			  reply-flags
 			  x
 			  y))
-		  (timestamp (x-dnd-get-motif-value 
+		  (timestamp (x-dnd-get-motif-value
 			      data 4 4 source-byteorder))
 		  action)
 
@@ -857,26 +857,26 @@
 				    "_MOTIF_DRAG_AND_DROP_MESSAGE"
 				    8
 				    reply)
-	     (setq action 
+	     (setq action
 		   (when (and reply-action atom-name)
 		     (let* ((value (x-get-selection-internal
 				    (intern atom-name)
 				    (intern (x-dnd-current-type window)))))
 		       (when value
 			 (condition-case info
-			     (x-dnd-drop-data event frame window value 
+			     (x-dnd-drop-data event frame window value
 					      (x-dnd-current-type window))
 			   (error
 			    (message "Error: %s" info)
 			    nil))))))
 	     (x-get-selection-internal
-	      (intern atom-name)	  
+	      (intern atom-name)
 	      (if action 'XmTRANSFER_SUCCESS 'XmTRANSFER_FAILURE)
 	      timestamp)
 	     (x-dnd-forget-drop frame)))
 
 	  (t (error "Unknown Motif DND message %s %s" message-atom data)))))
-					   
+
 
 ;;;
 
--- a/lispref/ChangeLog	Sun Feb 13 00:40:20 2005 +0000
+++ b/lispref/ChangeLog	Sun Feb 13 07:19:08 2005 +0000
@@ -1,3 +1,39 @@
+2005-02-10  Richard M. Stallman  <rms@gnu.org>
+
+	* objects.texi (Symbol Type): Minor correction.
+
+2005-02-06  Lute Kamstra  <lute@gnu.org>
+
+	* modes.texi (Example Major Modes): Fix typos.
+
+2005-02-06  Richard M. Stallman  <rms@gnu.org>
+
+	* text.texi (Margins): fill-nobreak-predicate can be one function.
+
+	* strings.texi (Modifying Strings): clear-string can make unibyte.
+	(Formatting Strings): format gives error if values missing.
+
+	* positions.texi (Character Motion): Mention default arg
+	for forward-char.  backward-char refers to forward-char.
+	(Word Motion): Mention default arg for forward-word.
+	(Buffer End Motion): Mention default arg for beginning-of-buffer.
+	Simplify end-of-buffer.
+	(Text Lines): Mention default arg for forward-line.
+	(List Motion): Mention default arg for beginning/end-of-defun.
+	(Skipping Characters): Minor fixes in explaining character-set.
+
+	* modes.texi (Major Mode Conventions): Mention "system abbrevs".
+	Mode inheritance applies only when default-major-mode is nil.
+	Clarifications.
+	(Example Major Modes): Update Text mode and Lisp mode examples.
+	(Minor Mode Conventions): Mention define-minor-mode at top.
+	(Defining Minor Modes): In Hungry example, don't define C-M-DEL.
+	(Mode Line Format): Update mode line face display info.
+	(Properties in Mode): Mention effect of risky vars.
+	(Imenu): Define imenu-add-to-menubar.
+	(Font Lock Mode): Add descriptions to menu lines.
+	(Faces for Font Lock): Add font-lock-doc-face.
+
 2005-02-05  Lute Kamstra  <lute@gnu.org>
 
 	* text.texi (Maintaining Undo): Remove obsolete function.
--- a/lispref/modes.texi	Sun Feb 13 00:40:20 2005 +0000
+++ b/lispref/modes.texi	Sun Feb 13 07:19:08 2005 +0000
@@ -235,9 +235,11 @@
 @item
 @cindex abbrev tables in modes
 The mode may have its own abbrev table or may share one with other
-related modes.  If it has its own abbrev table, it should store this in
-a variable named @code{@var{modename}-mode-abbrev-table}.  @xref{Abbrev
-Tables}.
+related modes.  If it has its own abbrev table, it should store this
+in a variable named @code{@var{modename}-mode-abbrev-table}.  If the
+major mode command defines any abbrevs itself, it should pass @code{t}
+for the @var{system-flag} argument to @code{define-abbrev}.
+@xref{Abbrev Tables}.
 
 @item
 The mode should specify how to do highlighting for Font Lock mode, by
@@ -308,8 +310,9 @@
 @end example
 
 @noindent
-This tells Emacs that new buffers created while the current buffer is in
-Funny mode should not inherit Funny mode.  Modes such as Dired, Rmail,
+This tells Emacs that new buffers created while the current buffer is
+in Funny mode should not inherit Funny mode, in case
+@code{default-major-mode} is @code{nil}.  Modes such as Dired, Rmail,
 and Buffer List use this feature.
 
 @item
@@ -321,9 +324,10 @@
 file that contains the mode definition.  @xref{Auto Major Mode}.
 
 @item
-In the documentation, you should provide a sample @code{autoload} form
-and an example of how to add to @code{auto-mode-alist}, that users can
-include in their init files (@pxref{Init File}).
+In the comments that document the file, you should provide a sample
+@code{autoload} form and an example of how to add to
+@code{auto-mode-alist}, that users can include in their init files
+(@pxref{Init File}).
 
 @item
 @cindex mode loading
@@ -341,46 +345,65 @@
 
 @smallexample
 @group
-;; @r{Create mode-specific tables.}
-(defvar text-mode-syntax-table nil
-  "Syntax table used while in text mode.")
+;; @r{Create the syntax table for this mode.}
+(defvar text-mode-syntax-table
+  (let ((st (make-syntax-table)))
+    (modify-syntax-entry ?\" ".   " st)
+    (modify-syntax-entry ?\\ ".   " st)
+    ;; We add `p' so that M-c on 'hello' leads to 'Hello' rather than 'hello'.
+    (modify-syntax-entry ?' "w p" st)
+    st)
+  "Syntax table used while in `text-mode'.")
 @end group
 
+;; @r{Create the keymap for this mode.}
 @group
-(if text-mode-syntax-table
-    ()              ; @r{Do not change the table if it is already set up.}
-  (setq text-mode-syntax-table (make-syntax-table))
-  (modify-syntax-entry ?\" ".   " text-mode-syntax-table)
-  (modify-syntax-entry ?\\ ".   " text-mode-syntax-table)
-  (modify-syntax-entry ?' "w   " text-mode-syntax-table))
+(defvar text-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map "\e\t" 'ispell-complete-word)
+    (define-key map "\es" 'center-line)
+    (define-key map "\eS" 'center-paragraph)
+    map)
+  "Keymap for `text-mode'.
+Many other modes, such as `mail-mode', `outline-mode' and `indented-text-mode',
+inherit all the commands defined in this map.")
 @end group
-
+@end smallexample
+
+  Here is how the actual mode command is defined now:
+
+@smallexample
+@group
+(define-derived-mode text-mode nil "Text"
+  "Major mode for editing text written for humans to read.
+In this mode, paragraphs are delimited only by blank or white lines.
+You can thus get the full benefit of adaptive filling
+ (see the variable `adaptive-fill-mode').
+\\@{text-mode-map@}
+Turning on Text mode runs the normal hook `text-mode-hook'."
+@end group
 @group
+  (make-local-variable 'text-mode-variant)
+  (setq text-mode-variant t)
+  ;; @r{These two lines are a feature added recently.}
+  (set (make-local-variable 'require-final-newline)
+       mode-require-final-newline)
+  (set (make-local-variable 'indent-line-function) 'indent-relative))
+@end group
+@end smallexample
+
+  But here is how it was defined formerly, before
+@code{define-derived-mode} existed:
+
+@smallexample
+@group
+;; @r{This isn't needed nowadays, since @code{define-derived-mode} does it.}
 (defvar text-mode-abbrev-table nil
   "Abbrev table used while in text mode.")
 (define-abbrev-table 'text-mode-abbrev-table ())
 @end group
 
 @group
-(defvar text-mode-map nil    ; @r{Create a mode-specific keymap.}
-  "Keymap for Text mode.
-Many other modes, such as Mail mode, Outline mode and Indented Text mode,
-inherit all the commands defined in this map.")
-
-(if text-mode-map
-    ()              ; @r{Do not change the keymap if it is already set up.}
-  (setq text-mode-map (make-sparse-keymap))
-  (define-key text-mode-map "\e\t" 'ispell-complete-word)
-  (define-key text-mode-map "\t" 'indent-relative)
-  (define-key text-mode-map "\es" 'center-line)
-  (define-key text-mode-map "\eS" 'center-paragraph))
-@end group
-@end smallexample
-
-  This was formerly the complete major mode function definition for Text mode:
-
-@smallexample
-@group
 (defun text-mode ()
   "Major mode for editing text intended for humans to read...
  Special commands: \\@{text-mode-map@}
@@ -396,6 +419,9 @@
   (set-syntax-table text-mode-syntax-table)
 @end group
 @group
+  ;; @r{These four lines are absent from the current version}
+  ;; @r{not because this is done some other way, but rather}
+  ;; @r{because nowadays Text mode uses the normal definition of paragraphs.}
   (make-local-variable 'paragraph-start)
   (setq paragraph-start (concat "[ \t]*$\\|" page-delimiter))
   (make-local-variable 'paragraph-separate)
@@ -422,36 +448,48 @@
 @group
 ;; @r{Create mode-specific table variables.}
 (defvar lisp-mode-syntax-table nil "")
-(defvar emacs-lisp-mode-syntax-table nil "")
 (defvar lisp-mode-abbrev-table nil "")
 @end group
 
 @group
-(if (not emacs-lisp-mode-syntax-table) ; @r{Do not change the table}
-                                       ;   @r{if it is already set.}
+(defvar emacs-lisp-mode-syntax-table
+  (let ((table (make-syntax-table)))
     (let ((i 0))
-      (setq emacs-lisp-mode-syntax-table (make-syntax-table))
 @end group
 
 @group
-      ;; @r{Set syntax of chars up to 0 to class of chars that are}
+      ;; @r{Set syntax of chars up to @samp{0} to say they are}
       ;;   @r{part of symbol names but not words.}
-      ;;   @r{(The number 0 is @code{48} in the @acronym{ASCII} character set.)}
+      ;;   @r{(The digit @samp{0} is @code{48} in the @acronym{ASCII} character set.)}
       (while (< i ?0)
-        (modify-syntax-entry i "_   " emacs-lisp-mode-syntax-table)
-        (setq i (1+ i)))
-      @dots{}
+	(modify-syntax-entry i "_   " table)
+	(setq i (1+ i)))
+      ;; @r{@dots{} similar code follows for other character ranges.}
+@end group
+@group
+      ;; @r{Then set the syntax codes for characters that are special in Lisp.}
+      (modify-syntax-entry ?  "    " table)
+      (modify-syntax-entry ?\t "    " table)
+      (modify-syntax-entry ?\f "    " table)
+      (modify-syntax-entry ?\n ">   " table)
 @end group
 @group
-      ;; @r{Set the syntax for other characters.}
-      (modify-syntax-entry ?  "    " emacs-lisp-mode-syntax-table)
-      (modify-syntax-entry ?\t "    " emacs-lisp-mode-syntax-table)
-      @dots{}
+      ;; @r{Give CR the same syntax as newline, for selective-display.}
+      (modify-syntax-entry ?\^m ">   " table)
+      (modify-syntax-entry ?\; "<   " table)
+      (modify-syntax-entry ?` "'   " table)
+      (modify-syntax-entry ?' "'   " table)
+      (modify-syntax-entry ?, "'   " table)
 @end group
 @group
-      (modify-syntax-entry ?\( "()  " emacs-lisp-mode-syntax-table)
-      (modify-syntax-entry ?\) ")(  " emacs-lisp-mode-syntax-table)
-      @dots{}))
+      ;; @r{@dots{}likewise for many other characters@dots{}}
+      (modify-syntax-entry ?\( "()  " table)
+      (modify-syntax-entry ?\) ")(  " table)
+      (modify-syntax-entry ?\[ "(]  " table)
+      (modify-syntax-entry ?\] ")[  " table))
+    table))
+@end group
+@group
 ;; @r{Create an abbrev table for lisp-mode.}
 (define-abbrev-table 'lisp-mode-abbrev-table ())
 @end group
@@ -464,8 +502,8 @@
 @smallexample
 @group
 (defun lisp-mode-variables (lisp-syntax)
-  (cond (lisp-syntax
-	  (set-syntax-table lisp-mode-syntax-table)))
+  (when lisp-syntax
+    (set-syntax-table lisp-mode-syntax-table))
   (setq local-abbrev-table lisp-mode-abbrev-table)
   @dots{}
 @end group
@@ -504,6 +542,7 @@
 (defvar shared-lisp-mode-map ()
   "Keymap for commands shared by all sorts of Lisp modes.")
 
+;; @r{Putting this @code{if} after the @code{defvar} is an older style.}
 (if shared-lisp-mode-map
     ()
    (setq shared-lisp-mode-map (make-sparse-keymap))
@@ -557,6 +596,11 @@
                                          ;   @r{finds out what to describe.}
   (setq mode-name "Lisp")                ; @r{This goes into the mode line.}
   (lisp-mode-variables t)                ; @r{This defines various variables.}
+  (make-local-variable 'comment-start-skip)
+  (setq comment-start-skip
+        "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")
+  (make-local-variable 'font-lock-keywords-case-fold-search)
+  (setq font-lock-keywords-case-fold-search t)
 @end group
 @group
   (setq imenu-case-fold-search t)
@@ -911,7 +955,8 @@
 other tables.
 
   In addition, there are several conventions that are specific to
-minor modes.
+minor modes.  (The easiest way to follow all the conventions is to use
+the macro @code{define-minor-mode}; @ref{Defining Minor Modes}.)
 
 @itemize @bullet
 @item
@@ -1001,7 +1046,7 @@
 
   If just setting the variable is not sufficient to enable the mode, you
 should also specify a @code{:set} method which enables the mode by
-invoke the mode command.  Note in the variable's documentation string that
+invoking the mode command.  Note in the variable's documentation string that
 setting the variable other than via Custom may not take effect.
 
   Also mark the definition with an autoload cookie (@pxref{Autoload}),
@@ -1124,11 +1169,7 @@
  ;; The indicator for the mode line.
  " Hungry"
  ;; The minor mode bindings.
- '(("\C-\^?" . hungry-electric-delete)
-   ("\C-\M-\^?"
-    . (lambda ()
-        (interactive)
-        (hungry-electric-delete t))))
+ '(("\C-\^?" . hungry-electric-delete))
  :group 'hunger)
 @end smallexample
 
@@ -1137,10 +1178,10 @@
 @code{hungry-mode} to toggle it, a variable named @code{hungry-mode}
 which indicates whether the mode is enabled, and a variable named
 @code{hungry-mode-map} which holds the keymap that is active when the
-mode is enabled.  It initializes the keymap with key bindings for
-@kbd{C-@key{DEL}} and @kbd{C-M-@key{DEL}}.  It puts the variable
-@code{hungry-mode} into custom group @code{hunger}.  There are no
-@var{body} forms---many minor modes don't need any.
+mode is enabled.  It initializes the keymap with a key binding for
+@kbd{C-@key{DEL}}.  It puts the variable @code{hungry-mode} into
+custom group @code{hunger}.  There are no @var{body} forms---many
+minor modes don't need any.
 
   Here's an equivalent way to write it:
 
@@ -1216,8 +1257,9 @@
 and the frame title.
 @end defun
 
-  The mode line is usually displayed in inverse video; see
-@code{mode-line-inverse-video} in @ref{Inverse Video}.
+  The selected window's mode line is usually displayed in a different
+color using the face @code{mode-line}.  Other windows' mode lines
+appear in the face @code{mode-line-inactive} instead.  @xref{Faces}.
 
   A window that is just one line tall does not display either a mode
 line or a header line, even if the variables call for one.  A window
@@ -1313,8 +1355,7 @@
 process the mode-line construct @var{elt} recursively and add the text
 properties specified by @var{props} to the result.  The argument
 @var{props} should consist of zero or more pairs @var{text-property}
-@var{value}.  (This feature is new as of Emacs 21.4.)
-@c FIXME: This might be Emacs 21.5.
+@var{value}.  (This feature is new as of Emacs 22.1.)
 
 @item (@var{symbol} @var{then} @var{else})
 A list whose first element is a symbol that is not a keyword specifies a
@@ -1703,6 +1744,13 @@
 effect, since it is impossible to move point into the mode line.  This
 keymap can only take real effect for mouse clicks.
 
+  When the mode line refers to a variable which does not have a
+non-@code{nil} @code{risky-local-variable} property, any text
+properties given or specified within that variable's values are
+ignored.  This is because such properties could otherwise specify
+functions to be called, and those functions could come from file
+local variables.
+
 @node Header Lines
 @subsection Window Header Lines
 @cindex header line (of a window)
@@ -1770,11 +1818,18 @@
 directly to that location in the buffer.  Imenu works by constructing
 a buffer index which lists the names and buffer positions of the
 definitions, or other named portions of the buffer; then the user can
-choose one of them and move point to it.  The user-level commands for
-using Imenu are described in the Emacs Manual (@pxref{Imenu,, Imenu,
-emacs, the Emacs Manual}).  This section explains how to customize
-Imenu's method of finding definitions or buffer portions for a
-particular major mode.
+choose one of them and move point to it.  Major modes can add a menu
+bar item to use Imenu using @code{imenu-add-to-menubar}.
+
+@defun imenu-add-to-menubar name
+This function defines a local menu bar item named @var{name}
+to run Imenu.
+@end defun
+
+  The user-level commands for using Imenu are described in the Emacs
+Manual (@pxref{Imenu,, Imenu, emacs, the Emacs Manual}).  This section
+explains how to customize Imenu's method of finding definitions or
+buffer portions for a particular major mode.
 
   The usual and simplest way is to set the variable
 @code{imenu-generic-expression}:
@@ -1967,13 +2022,16 @@
 (@pxref{Faces for Font Lock}).  Search-based fontification follows.
 
 @menu
-* Font Lock Basics::
-* Search-based Fontification::
-* Other Font Lock Variables::
-* Levels of Font Lock::
-* Precalculated Fontification::
-* Faces for Font Lock::
-* Syntactic Font Lock::
+* Font Lock Basics::            Overview of customizing Font Lock.
+* Search-based Fontification::  Fontification based on regexps.
+* Other Font Lock Variables::   Additional customization facilities.
+* Levels of Font Lock::         Each mode can define alternative levels
+                                  so that the user can select more or less.
+* Precalculated Fontification:: How Lisp programs that produce the buffer
+                                  contents can also specify how to fontify it.
+* Faces for Font Lock::         Special faces specifically for Font Lock.
+* Syntactic Font Lock::         Defining character syntax based on context
+                                  using the Font Lock mechanism.
 @end menu
 
 @node Font Lock Basics
@@ -2357,7 +2415,7 @@
 @node Precalculated Fontification
 @subsection Precalculated Fontification
 
-In addition to using @code{font-lock-defaults} for search-based
+  In addition to using @code{font-lock-defaults} for search-based
 fontification, you may use the special character property
 @code{font-lock-face} (@pxref{Special Properties}).  This property
 acts just like the explicit @code{face} property, but its activation
@@ -2394,6 +2452,10 @@
 @vindex font-lock-comment-face
 Used (typically) for comments.
 
+@item font-lock-doc-face
+@vindex font-lock-doc-face
+Used (typically) for documentation strings in the code.
+
 @item font-lock-string-face
 @vindex font-lock-string-face
 Used (typically) for string constants.
--- a/lispref/objects.texi	Sun Feb 13 00:40:20 2005 +0000
+++ b/lispref/objects.texi	Sun Feb 13 07:19:08 2005 +0000
@@ -517,7 +517,7 @@
 
   Here are several examples of symbol names.  Note that the @samp{+} in
 the fifth example is escaped to prevent it from being read as a number.
-This is not necessary in the seventh example because the rest of the name
+This is not necessary in the fourth example because the rest of the name
 makes it invalid as a number.
 
 @example
--- a/lispref/positions.texi	Sun Feb 13 00:40:20 2005 +0000
+++ b/lispref/positions.texi	Sun Feb 13 07:19:08 2005 +0000
@@ -165,23 +165,20 @@
 @c @kindex end-of-buffer
 This function moves point @var{count} characters forward, towards the
 end of the buffer (or backward, towards the beginning of the buffer, if
-@var{count} is negative).  If the function attempts to move point past
-the beginning or end of the buffer (or the limits of the accessible
-portion, when narrowing is in effect), an error is signaled with error
-code @code{beginning-of-buffer} or @code{end-of-buffer}.
+@var{count} is negative).  If @var{count} is @code{nil}, the default
+is 1.
+
+If this attempts to move past the beginning or end of the buffer (or
+the limits of the accessible portion, when narrowing is in effect), it
+signals an error with error symbol @code{beginning-of-buffer} or
+@code{end-of-buffer}.
 
 In an interactive call, @var{count} is the numeric prefix argument.
 @end deffn
 
 @deffn Command backward-char &optional count
-This function moves point @var{count} characters backward, towards the
-beginning of the buffer (or forward, towards the end of the buffer, if
-@var{count} is negative).  If the function attempts to move point past
-the beginning or end of the buffer (or the limits of the accessible
-portion, when narrowing is in effect), an error is signaled with error
-code @code{beginning-of-buffer} or @code{end-of-buffer}.
-
-In an interactive call, @var{count} is the numeric prefix argument.
+This is just like @code{forward-char} except that it moves
+in the opposite direction.
 @end deffn
 
 @node Word Motion
@@ -192,12 +189,15 @@
 
 @deffn Command forward-word &optional count
 This function moves point forward @var{count} words (or backward if
-@var{count} is negative).  ``Moving one word'' means moving until point
-crosses a word-constituent character and then encounters a
-word-separator character.  However, this function cannot move point past
-the boundary of the accessible portion of the buffer, or across a field
-boundary (@pxref{Fields}).  The most common case of a field boundary is
-the end of the prompt in the minibuffer.
+@var{count} is negative).  If @var{count} is @code{nil}, it moves
+forward one word.
+
+``Moving one word'' means moving until point crosses a
+word-constituent character and then encounters a word-separator
+character.  However, this function cannot move point past the boundary
+of the accessible portion of the buffer, or across a field boundary
+(@pxref{Fields}).  The most common case of a field boundary is the end
+of the prompt in the minibuffer.
 
 If it is possible to move @var{count} words, without being stopped
 prematurely by the buffer boundary or a field boundary, the value is
@@ -258,22 +258,24 @@
 @deffn Command beginning-of-buffer &optional n
 This function moves point to the beginning of the buffer (or the limits
 of the accessible portion, when narrowing is in effect), setting the
-mark at the previous position.  If @var{n} is non-@code{nil}, then it
-puts point @var{n} tenths of the way from the beginning of the
-accessible portion of the buffer.
+mark at the previous position (except in Transient Mark mode, if
+the mark is already active, it does not set the mark.)
 
-In an interactive call, @var{n} is the numeric prefix argument,
-if provided; otherwise @var{n} defaults to @code{nil}.
+If @var{n} is non-@code{nil}, then it puts point @var{n} tenths of the
+way from the beginning of the accessible portion of the buffer.  In an
+interactive call, @var{n} is the numeric prefix argument, if provided;
+otherwise @var{n} defaults to @code{nil}.
 
 @strong{Warning:} Don't use this function in Lisp programs!
 @end deffn
 
 @deffn Command end-of-buffer &optional n
-This function moves point to the end of the buffer (or the limits of the
-accessible portion, when narrowing is in effect), setting the mark at
-the previous position.  If @var{n} is non-@code{nil}, then it puts point
-@var{n} tenths of the way from the end of the accessible portion of the
-buffer.
+This function moves point to the end of the buffer (or the limits of
+the accessible portion, when narrowing is in effect), setting the mark
+at the previous position (except in Transient Mark mode when the mark
+is already active).  If @var{n} is non-@code{nil}, then it puts point
+@var{n} tenths of the way from the end of the accessible portion of
+the buffer.
 
 In an interactive call, @var{n} is the numeric prefix argument,
 if provided; otherwise @var{n} defaults to @code{nil}.
@@ -373,7 +375,7 @@
 the line.  If @var{count} is negative, it moves point
 @minus{}@var{count} lines backward, to the beginning of a line.  If
 @var{count} is zero, it moves point to the beginning of the current
-line.
+line.  If @var{count} is @code{nil}, that means 1.
 
 If @code{forward-line} encounters the beginning or end of the buffer (or
 of the accessible portion) before finding that many lines, it sets point
@@ -703,13 +705,15 @@
 @deffn Command beginning-of-defun &optional arg
 This function moves back to the @var{arg}th beginning of a defun.  If
 @var{arg} is negative, this actually moves forward, but it still moves
-to the beginning of a defun, not to the end of one.
+to the beginning of a defun, not to the end of one.  @var{arg} defaults
+to 1.
 @end deffn
 
 @deffn Command end-of-defun &optional arg
 This function moves forward to the @var{arg}th end of a defun.  If
 @var{arg} is negative, this actually moves backward, but it still moves
-to the end of a defun, not to the beginning of one.
+to the end of a defun, not to the beginning of one.  @var{arg} defaults
+to 1.
 @end deffn
 
 @defopt defun-prompt-regexp
@@ -761,12 +765,12 @@
 continues until it reaches a character that does not match.  The
 function returns the number of characters moved over.
 
-The argument @var{character-set} is like the inside of a
-@samp{[@dots{}]} in a regular expression except that @samp{]} is never
-special and @samp{\} quotes @samp{^}, @samp{-} or @samp{\}.  Thus,
-@code{"a-zA-Z"} skips over all letters, stopping before the first
-nonletter, and @code{"^a-zA-Z"} skips nonletters stopping before the
-first letter.  @xref{Regular Expressions}.
+The argument @var{character-set} is a string, like the inside of a
+@samp{[@dots{}]} in a regular expression except that @samp{]} does not
+terminate it, and @samp{\} quotes @samp{^}, @samp{-} or @samp{\}.
+Thus, @code{"a-zA-Z"} skips over all letters, stopping before the
+first nonletter, and @code{"^a-zA-Z"} skips nonletters stopping before
+the first letter.  @xref{Regular Expressions}.
 
 If @var{limit} is supplied (it must be a number or a marker), it
 specifies the maximum position in the buffer that point can be skipped
--- a/lispref/processes.texi	Sun Feb 13 00:40:20 2005 +0000
+++ b/lispref/processes.texi	Sun Feb 13 07:19:08 2005 +0000
@@ -1314,7 +1314,7 @@
 of a second; on those that do not, you get an error if you specify
 nonzero @var{millisec}.
 
-@c Emacs 21.4 feature
+@c Emacs 22.1 feature
 If @var{process} is a process, and the argument @var{just-this-one} is
 non-@code{nil}, only output from that process is handled, suspending output
 from other processes until some output has been received from that
--- a/lispref/strings.texi	Sun Feb 13 00:40:20 2005 +0000
+++ b/lispref/strings.texi	Sun Feb 13 07:19:08 2005 +0000
@@ -383,8 +383,9 @@
 @code{clear-string}:
 
 @defun clear-string string
-This clears the contents of @var{string} to zeros
-and may change its length.
+This clears the contents of @var{string} to zeros.
+It may also change @var{string}'s length and convert it to
+a unibyte string.
 @end defun
 
 @need 2000
@@ -714,8 +715,8 @@
 @var{objects}.  Thus, the first format specification in @var{string}
 uses the first such value, the second format specification uses the
 second such value, and so on.  Any extra format specifications (those
-for which there are no corresponding values) cause unpredictable
-behavior.  Any extra values to be formatted are ignored.
+for which there are no corresponding values) cause an error.  Any
+extra values to be formatted are ignored.
 
   Certain format specifications require values of particular types.  If
 you supply a value that doesn't fit the requirements, an error is
--- a/lispref/text.texi	Sun Feb 13 00:40:20 2005 +0000
+++ b/lispref/text.texi	Sun Feb 13 07:19:08 2005 +0000
@@ -1598,11 +1598,13 @@
 @end defvar
 
 @defvar fill-nobreak-predicate
-This variable gives major modes a way to specify not to break a line at
-certain places.  Its value should be a function.  This function is
-called during filling, with no arguments and with point located at the
-place where a break is being considered.  If the function returns
-non-@code{nil}, then the line won't be broken there.
+This variable gives major modes a way to specify not to break a line
+at certain places.  Its value should be a list of functions, but a
+single function is also supported for compatibility.  Whenever filling
+considers breaking the line at a certain place in the buffer, it calls
+each of these functions with no arguments and with point located at
+that place.  If any of the functions returns non-@code{nil}, then the
+line won't be broken there.
 @end defvar
 
 @node Adaptive Fill
@@ -2884,7 +2886,7 @@
 property; rather, it is implemented in Font Lock mode using
 @code{char-property-alias-alist}.  @xref{Examining Properties}.
 
-This property is new in Emacs 21.4.
+This property is new in Emacs 22.1.
 
 @item mouse-face
 @kindex mouse-face @r{(text property)}
--- a/man/ChangeLog	Sun Feb 13 00:40:20 2005 +0000
+++ b/man/ChangeLog	Sun Feb 13 07:19:08 2005 +0000
@@ -1,3 +1,74 @@
+2005-02-10  Jay Belanger  <belanger@truman.edu>
+
+	* calc.texi:  Change @LaTeX to La@TeX throughout.
+	Redefine @expr as @math for TeX output.
+	Redefine @texline as a no-op for TeX output.
+	Define @tfn, replace @t by @tfn throughout.
+
+2005-02-09  Jay Belanger  <belanger@truman.edu>
+
+	* calc.texi:  Add macro for LaTeX for info output.
+
+2005-02-08  Kim F. Storm  <storm@cua.dk>
+
+	* texinfo.tex (LaTex): Add def.
+
+2005-02-06  Jay Belanger  <belanger@truman.edu>
+
+	* calc.texi (TeX Language Mode): Add mention of LaTeX mode, and
+	change name to "TeX and LaTeX Language Modes."  Mention LaTeX mode
+	throughout manual.
+
+2005-02-06  Lute Kamstra  <lute@gnu.org>
+
+	* basic.texi (Undo): Fix typo.
+
+	* cmdargs.texi (Emacs Invocation): Fix typo.
+
+	* custom.texi (Init Examples): Fix typo.
+
+	* abbrevs.texi (Expanding Abbrevs): Fix typo.
+
+2005-02-06  Richard M. Stallman  <rms@gnu.org>
+
+	* regs.texi (Registers): Registers can hold numbers, too.
+
+	* killing.texi (Other Kill Commands): Cleanup.
+	Delete redundant explanation of kill in read-only buffer.
+	(Yanking): Mention term "copying".
+	(Accumulating Text): Fix typo.
+
+	* entering.texi (Entering Emacs): Update rationale at start.
+	(Exiting): Treat iconifying on a par with suspension.
+
+	* custom.texi (Minor Modes): Fix typo.
+	(Easy Customization): Fix menu style.
+	(Variables): Add xref.
+	(Examining): Setting for future sessions works through .emacs.
+	(Keymaps): "Text terminals", not "Many".
+	(Init Rebinding): Explain \C-.  Show example of \M-.
+	Fix minor wording errors.
+	(Function Keys): Explain vector syntax just once.
+	(Named ASCII Chars): Clarify history of TAB/C-i connection.
+	(Init File): Mention .emacs.d directory.
+	(Init Examples): Add xref.
+	(Find Init): Mention .emacs.d directory.
+
+	* cmdargs.texi (Emacs Invocation): +LINENUM is also an option.
+	(Action Arguments): Explain which kinds of -l args are found how.
+	(Initial Options): --batch does not inhibit site-start.
+	Add xrefs.
+	(Command Example): Use --batch, not -batch.
+
+	* basic.texi (Inserting Text): Cleanup wording.
+	(Moving Point): Doc PRIOR, PAGEUP, NEXT, PAGEDOWN more systematically.
+	C-n is not error at end of buffer.
+	(Undo): Doc C-/ like C-_.  Add xrefs.
+	(Arguments): META key may be labeled ALT.
+	Peculiar arg meanings are explained in doc strings.
+
+	* abbrevs.texi (Expanding Abbrevs): Clarify.
+
 2005-02-05  Eli Zaretskii  <eliz@gnu.org>
 
 	* frames.texi (Frame Parameters): Add an xref to the description
@@ -129,7 +200,7 @@
 	remote files.
 
 2005-01-15  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
- 
+
  	* man/rmail.texi (Movemail): Explain differences
 	between standard and mailutils versions of movemail.
 	Describe command line and configuration options introduced
@@ -140,7 +211,7 @@
 	user names and user passwords for rmail.
 	(Remote Mailboxes): New section.  Describe
 	how movemail handles remote mailboxes.  Describe configuration
-	options used to control its behavior. 
+	options used to control its behavior.
 	(Other Mailbox Formats): Explain handling of various mailbox
 	formats.
 
@@ -324,7 +395,7 @@
 2004-12-08  Luc Teirlinck  <teirllm@auburn.edu>
 
 	* custom.texi (Saving Customizations): Emacs only loads the custom
-	file automatically after the init file in version 21.4 or later.
+	file automatically after the init file in version 22.1 or later.
 	Adapt text and examples to this fact.
 
 	* makefile.w32-in (INFO_TARGETS, DVI_TARGETS, $(infodir)/org)
@@ -877,7 +948,7 @@
 
 	* reftex.texi (AUCTeX): Update links, section name.
 
-	* faq.texi (Calc): Update availability (included in 21.4).
+	* faq.texi (Calc): Update availability (included in 22.1).
 	(AUCTeX): Update availability, information, versions, description.
 
 2004-08-21  Luc Teirlinck  <teirllm@auburn.edu>
--- a/man/abbrevs.texi	Sun Feb 13 00:40:20 2005 +0000
+++ b/man/abbrevs.texi	Sun Feb 13 07:19:08 2005 +0000
@@ -153,14 +153,14 @@
 (@key{SPC}, comma, etc.@:).  More precisely, any character that is not a
 word constituent expands an abbrev, and any word-constituent character
 can be part of an abbrev.  The most common way to use an abbrev is to
-insert it and then insert a punctuation character to expand it.
+insert it and then insert a punctuation or whitespace character to expand it.
 
 @vindex abbrev-all-caps
   Abbrev expansion preserves case; thus, @samp{foo} expands into @samp{find
 outer otter}; @samp{Foo} into @samp{Find outer otter}, and @samp{FOO} into
 @samp{FIND OUTER OTTER} or @samp{Find Outer Otter} according to the
-variable @code{abbrev-all-caps} (a non-@code{nil} value chooses the first
-of the two expansions).
+variable @code{abbrev-all-caps} (setting it non-@code{nil} specifies
+@samp{FIND OUTER OTTER}).
 
   These commands are used to control abbrev expansion:
 
--- a/man/basic.texi	Sun Feb 13 00:40:20 2005 +0000
+++ b/man/basic.texi	Sun Feb 13 07:19:08 2005 +0000
@@ -73,7 +73,7 @@
 @cindex newline
    To end a line and start typing a new one, type @key{RET}.  This
 inserts a newline character in the buffer.  If point is in the middle of
-a line, @key{RET} splits the line.  Typing @key{DEL} when the cursor is
+a line, the effect is to split the line.  Typing @key{DEL} when the cursor is
 at the beginning of a line deletes the preceding newline, thus joining
 the line with the preceding line.
 
@@ -219,17 +219,21 @@
 @item M->
 Move to the end of the buffer (@code{end-of-buffer}).
 @item C-v
-Scroll the display one screen forward, and move point if necessary to put
-it on the screen (@code{scroll-up}).  This doesn't always
-move point, but it is commonly used to do so.
-If your keyboard has a @key{PAGEDOWN} key, it does the same thing.
+@itemx @key{PAGEDOWN}
+@itemx @key{PRIOR}
+Scroll the display one screen forward, and move point if necessary to
+put it on the screen (@code{scroll-up}).  This doesn't always move
+point, but it is commonly used to do so.  If your keyboard has a
+@key{PAGEDOWN} or @key{PRIOR} key, it does the same thing.
 
 Scrolling commands are further described in @ref{Scrolling}.
 @item M-v
+@itemx @key{PAGEUP}
+@itemx @key{NEXT}
 Scroll one screen backward, and move point if necessary to put it on
 the screen (@code{scroll-down}).  This doesn't always move point, but
-it is commonly used to do so.  The @key{PAGEUP} key has the same
-effect.
+it is commonly used to do so.  If your keyboard has a @key{PAGEUP} or
+@key{NEXT} key, it does the same thing.
 @item M-x goto-char
 Read a number @var{n} and move point to buffer position @var{n}.
 Position 1 is the beginning of the buffer.
@@ -256,11 +260,11 @@
 @xref{Variables}, for how to set variables such as @code{track-eol}.
 
 @vindex next-line-add-newlines
-  @kbd{C-n} normally gets an error when you use it on the last line of
-the buffer (just as @kbd{C-p} gets an error on the first line).  But
-if you set the variable @code{next-line-add-newlines} to a
-non-@code{nil} value, @kbd{C-n} on the last line of a buffer creates
-an additional line at the end and moves down onto it.
+  @kbd{C-n} normally stops at the end of the bufer when you use it on
+the last line of the buffer.  But if you set the variable
+@code{next-line-add-newlines} to a non-@code{nil} value, @kbd{C-n} on
+the last line of a buffer creates an additional line at the end and
+moves down onto it.
 
 @node Erasing
 @section Erasing Text
@@ -319,6 +323,7 @@
 @item C-x u
 Undo one batch of changes---usually, one command worth (@code{undo}).
 @item C-_
+@itemx C-/
 The same.
 @item C-u C-x u
 Undo one batch of changes in the region.
@@ -326,10 +331,12 @@
 
 @kindex C-x u
 @kindex C-_
+@kindex C-/
 @findex undo
-  The command @kbd{C-x u} or @kbd{C-_} is how you undo.  The first time
-you give this command, it undoes the last change.  Point moves back to
-where it was before the command that made the change.
+  The command @kbd{C-x u} (or @kbd{C-_} or @kbd{C-/}) is how you undo.
+The first time you give this command, it undoes the last change.
+Point moves back to where it was before the command that made the
+change.
 
   Consecutive repetitions of @kbd{C-_} or @kbd{C-x u} undo earlier and
 earlier changes, back to the limit of the undo information available.
@@ -345,14 +352,16 @@
 @cindex selective undo
 @kindex C-u C-x u
   Ordinary undo applies to all changes made in the current buffer.  You
-can also perform @dfn{selective undo}, limited to the current region.
+can also perform @dfn{selective undo}, limited to the current region
+(@pxref{Mark}).
 To do this, specify the region you want, then run the @code{undo}
 command with a prefix argument (the value does not matter): @kbd{C-u C-x
 u} or @kbd{C-u C-_}.  This undoes the most recent change in the region.
 To undo further changes in the same region, repeat the @code{undo}
-command (no prefix argument is needed).  In Transient Mark mode, any use
-of @code{undo} when there is an active region performs selective undo;
-you do not need a prefix argument.
+command (no prefix argument is needed).  In Transient Mark mode
+(@pxref{Transient Mark}), any use of @code{undo} when there is an
+active region performs selective undo; you do not need a prefix
+argument.
 
   If you notice that a buffer has been modified accidentally, the
 easiest way to recover is to type @kbd{C-_} repeatedly until the stars
@@ -407,11 +416,10 @@
 undo data, then it is probably a bug and you should report it.
 @xref{Bugs,, Reporting Bugs}.
 
-  The reason the @code{undo} command has two keys, @kbd{C-x u} and
-@kbd{C-_}, set up to run it is that it is worthy of a single-character
-key, but on some keyboards it is not obvious how to type @kbd{C-_}.
-@kbd{C-x u} is an alternative you can type straightforwardly on any
-terminal.
+  The reason the @code{undo} command has three key bindings, @kbd{C-x
+u}, @kbd{C-_} and @kbd{C-/}, is that it is worthy of a
+single-character key, but @kbd{C-x u} is more straightforward for
+beginners to type.
 
 @node Basic Files
 @section Files
@@ -722,9 +730,10 @@
 @kindex M-@t{-}
 @findex digit-argument
 @findex negative-argument
-  If your terminal keyboard has a @key{META} key, the easiest way to
-specify a numeric argument is to type digits and/or a minus sign while
-holding down the @key{META} key.  For example,
+  If your terminal keyboard has a @key{META} key (labeled @key{ALT} on
+PC keyboards), the easiest way to specify a numeric argument is to
+type digits and/or a minus sign while holding down the @key{META} key.
+For example,
 
 @example
 M-5 C-n
@@ -777,8 +786,9 @@
   A few commands treat a plain @kbd{C-u} differently from an ordinary
 argument.  A few others may treat an argument of just a minus sign
 differently from an argument of @minus{}1.  These unusual cases are
-described when they come up; they are always for reasons of convenience
-of use of the individual command.
+described when they come up; they are always for reasons of
+convenience of use of the individual command, and they are documented
+in the command's documentation string.
 
   You can use a numeric argument to insert multiple copies of a
 character.  This is straightforward unless the character is a digit; for
--- a/man/calc.texi	Sun Feb 13 00:40:20 2005 +0000
+++ b/man/calc.texi	Sun Feb 13 07:19:08 2005 +0000
@@ -17,15 +17,11 @@
 @c $x$ in TeX, @samp{x} otherwise.
 
 @iftex
-@macro texline{stuff}
-\stuff\
+@macro texline
 @end macro
 @alias infoline=comment
-@tex
-\gdef\exprsetup{\tex \let\t\ttfont \turnoffactive}
-\gdef\expr{\exprsetup$\exprfinish}
-\gdef\exprfinish#1{#1$\endgroup}
-@end tex
+@alias expr=math
+@alias tfn=code
 @alias mathit=expr
 @macro cpi{}
 @math{@pi{}}
@@ -41,6 +37,7 @@
 \stuff\
 @end macro
 @alias expr=samp
+@alias tfn=t
 @alias mathit=i
 @macro cpi{}
 @expr{pi}
@@ -663,7 +660,7 @@
 ``buttons'' using your left mouse button.
 
 @noindent
-Click on @key{PI}, @key{2}, and @t{y^x}.
+Click on @key{PI}, @key{2}, and @tfn{y^x}.
 
 @noindent
 Click on @key{INV}, then @key{ENTER} to swap the two results.
@@ -734,9 +731,10 @@
 
 @noindent
 Type @kbd{d B} to view the solutions in more readable notation.
-Type @w{@kbd{d C}} to view them in C language notation, and @kbd{d T}
-to view them in the notation for the @TeX{} typesetting system.
-Type @kbd{d N} to return to normal notation.
+Type @w{@kbd{d C}} to view them in C language notation, @kbd{d T}
+to view them in the notation for the @TeX{} typesetting system,
+and @kbd{d L} to view them in the notation for the La@TeX{} typesetting
+system.  Type @kbd{d N} to return to normal notation.
 
 @noindent
 Type @kbd{7.5}, then @kbd{s l a @key{RET}} to let @expr{a = 7.5} in these formulas.
@@ -1119,10 +1117,10 @@
 
 Calc has added annotations to the file to help it remember the modes
 that were used for this formula.  They are formatted like comments
-in the @TeX{} typesetting language, just in case you are using @TeX{}.
-(In this example @TeX{} is not being used, so you might want to move
-these comments up to the top of the file or otherwise put them out
-of the way.)
+in the @TeX{} typesetting language, just in case you are using @TeX{} or
+La@TeX{}. (In this example @TeX{} is not being used, so you might want
+to move these comments up to the top of the file or otherwise put them
+out of the way.)
 
 As an extra flourish, we can add an equation number using a
 righthand label:  Type @kbd{d @} (1) @key{RET}}.
@@ -5216,7 +5214,8 @@
 
 Here things like powers, square roots, and quotients and fractions
 are displayed in a two-dimensional pictorial form.  Calc has other
-language modes as well, such as C mode, FORTRAN mode, and @TeX{} mode.
+language modes as well, such as C mode, FORTRAN mode, @TeX{} mode
+and La@TeX{} mode.
 
 @smallexample
 @group
@@ -9069,9 +9068,9 @@
 @starindex
 @end ignore
 @tindex nterms
-If @expr{x} is the sum @expr{a + b}, then `@t{nterms(}@var{x}@t{)}' must
-be `@t{nterms(}@var{a}@t{)}' plus `@t{nterms(}@var{b}@t{)}'.  If @expr{x}
-is not a sum, then `@t{nterms(}@var{x}@t{)}' = 1.
+If @expr{x} is the sum @expr{a + b}, then `@tfn{nterms(}@var{x}@tfn{)}' must
+be `@tfn{nterms(}@var{a}@tfn{)}' plus `@tfn{nterms(}@var{b}@tfn{)}'.  If @expr{x}
+is not a sum, then `@tfn{nterms(}@var{x}@tfn{)}' = 1.
 
 @smallexample
 @group
@@ -10870,8 +10869,8 @@
 notation; @pxref{Complex Formats}.
 
 Polar complex numbers are displayed in the form 
-@texline `@t{(}@var{r}@t{;}@math{\theta}@t{)}'
-@infoline `@t{(}@var{r}@t{;}@var{theta}@t{)}'
+@texline `@tfn{(}@var{r}@tfn{;}@math{\theta}@tfn{)}'
+@infoline `@tfn{(}@var{r}@tfn{;}@var{theta}@tfn{)}'
 where @var{r} is the nonnegative magnitude and 
 @texline @math{\theta}
 @infoline @var{theta} 
@@ -11288,7 +11287,7 @@
 A @dfn{modulo form} is a real number which is taken modulo (i.e., within
 an integer multiple of) some value @var{M}.  Arithmetic modulo @var{M}
 often arises in number theory.  Modulo forms are written
-`@var{a} @t{mod} @var{M}',
+`@var{a} @tfn{mod} @var{M}',
 where @var{a} and @var{M} are real numbers or HMS forms, and
 @texline @math{0 \le a < M}.
 @infoline @expr{0 <= a < @var{M}}.
@@ -11312,15 +11311,15 @@
 actually computing the power and then reducing.)
 
 @cindex Modulo division
-Two modulo forms `@var{a} @t{mod} @var{M}' and `@var{b} @t{mod} @var{M}'
+Two modulo forms `@var{a} @tfn{mod} @var{M}' and `@var{b} @tfn{mod} @var{M}'
 can be divided if @expr{a}, @expr{b}, and @expr{M} are all
 integers.  The result is the modulo form which, when multiplied by
-`@var{b} @t{mod} @var{M}', produces `@var{a} @t{mod} @var{M}'.  If
+`@var{b} @tfn{mod} @var{M}', produces `@var{a} @tfn{mod} @var{M}'.  If
 there is no solution to this equation (which can happen only when
 @expr{M} is non-prime), or if any of the arguments are non-integers, the
 division is left in symbolic form.  Other operations, such as square
 roots, are not yet supported for modulo forms.  (Note that, although
-@w{`@t{(}@var{a} @t{mod} @var{M}@t{)^.5}'} will compute a ``modulo square root''
+@w{`@tfn{(}@var{a} @tfn{mod} @var{M}@tfn{)^.5}'} will compute a ``modulo square root''
 in the sense of reducing 
 @texline @math{\sqrt a}
 @infoline @expr{sqrt(a)} 
@@ -11372,8 +11371,8 @@
 @cindex Standard deviations
 An @dfn{error form} is a number with an associated standard
 deviation, as in @samp{2.3 +/- 0.12}.  The notation
-@texline `@var{x} @t{+/-} @math{\sigma}' 
-@infoline `@var{x} @t{+/-} sigma' 
+@texline `@var{x} @tfn{+/-} @math{\sigma}' 
+@infoline `@var{x} @tfn{+/-} sigma' 
 stands for an uncertain value which follows
 a normal or Gaussian distribution of mean @expr{x} and standard
 deviation or ``error'' 
@@ -11419,11 +11418,11 @@
 of standard deviations.  Actual errors often are neither Gaussian-distributed
 nor uncorrelated, and the above formulas are valid only when errors
 are small.  As an example, the error arising from
-@texline `@t{sin(}@var{x} @t{+/-} @math{\sigma}@t{)}' 
-@infoline `@t{sin(}@var{x} @t{+/-} @var{sigma}@t{)}' 
+@texline `@tfn{sin(}@var{x} @tfn{+/-} @math{\sigma}@tfn{)}' 
+@infoline `@tfn{sin(}@var{x} @tfn{+/-} @var{sigma}@tfn{)}' 
 is 
-@texline `@math{\sigma} @t{abs(cos(}@var{x}@t{))}'.  
-@infoline `@var{sigma} @t{abs(cos(}@var{x}@t{))}'.  
+@texline `@math{\sigma} @tfn{abs(cos(}@var{x}@tfn{))}'.  
+@infoline `@var{sigma} @tfn{abs(cos(}@var{x}@tfn{))}'.  
 When @expr{x} is close to zero,
 @texline @math{\cos x}
 @infoline @expr{cos(x)} 
@@ -11555,14 +11554,14 @@
 While it may seem that intervals and error forms are similar, they are
 based on entirely different concepts of inexact quantities.  An error
 form 
-@texline `@var{x} @t{+/-} @math{\sigma}' 
-@infoline `@var{x} @t{+/-} @var{sigma}' 
+@texline `@var{x} @tfn{+/-} @math{\sigma}' 
+@infoline `@var{x} @tfn{+/-} @var{sigma}' 
 means a variable is random, and its value could
 be anything but is ``probably'' within one 
 @texline @math{\sigma} 
 @infoline @var{sigma} 
 of the mean value @expr{x}. An interval 
-`@t{[}@var{a} @t{..@:} @var{b}@t{]}' means a
+`@tfn{[}@var{a} @tfn{..@:} @var{b}@tfn{]}' means a
 variable's value is unknown, but guaranteed to lie in the specified
 range.  Error forms are statistical or ``average case'' approximations;
 interval arithmetic tends to produce ``worst case'' bounds on an
@@ -12740,9 +12739,7 @@
 default simplifications for all formulas.  This includes many easy and
 fast algebraic simplifications such as @expr{a+0} to @expr{a}, and
 @expr{a + 2 a} to @expr{3 a}, as well as evaluating functions like
-@texline @t{deriv}@expr{(x^2,x)}
-@infoline @expr{@t{deriv}(x^2, x)} 
-to @expr{2 x}.
+@expr{@tfn{deriv}(x^2, x)} to @expr{2 x}.
 
 @kindex m B
 @pindex calc-bin-simplify-mode
@@ -13920,7 +13917,7 @@
 @noindent
 The commands in this section change Calc to use a different notation for
 entry and display of formulas, corresponding to the conventions of some
-other common language such as Pascal or @TeX{}.  Objects displayed on the
+other common language such as Pascal or La@TeX{}.  Objects displayed on the
 stack or yanked from the Calculator to an editing buffer will be formatted
 in the current language; objects entered in algebraic entry or yanked from
 another buffer will be interpreted according to the current language.
@@ -13945,10 +13942,10 @@
 and would have written the formula back with notations (like implicit
 multiplication) which would not have been legal for a C program.
 
-As another example, suppose you are maintaining a C program and a @TeX{}
+As another example, suppose you are maintaining a C program and a La@TeX{}
 document, each of which needs a copy of the same formula.  You can grab the
-formula from the program in C mode, switch to @TeX{} mode, and yank the
-formula into the document in @TeX{} math-mode format.
+formula from the program in C mode, switch to La@TeX{} mode, and yank the
+formula into the document in La@TeX{} math-mode format.
 
 Language modes are selected by typing the letter @kbd{d} followed by a
 shifted letter key.
@@ -13956,7 +13953,7 @@
 @menu
 * Normal Language Modes::
 * C FORTRAN Pascal::
-* TeX Language Mode::
+* TeX and LaTeX Language Modes::
 * Eqn Language Mode::
 * Mathematica Language Mode::
 * Maple Language Mode::
@@ -14066,7 +14063,7 @@
 (except that Mathematica mode expects square brackets instead of
 parentheses).
 
-@node C FORTRAN Pascal, TeX Language Mode, Normal Language Modes, Language Modes
+@node C FORTRAN Pascal, TeX and LaTeX Language Modes, Normal Language Modes, Language Modes
 @subsection C, FORTRAN, and Pascal Modes
 
 @noindent
@@ -14141,72 +14138,122 @@
 convert to lower-case on input.  With a negative prefix, these modes
 convert to lower-case for display and input.
 
-@node TeX Language Mode, Eqn Language Mode, C FORTRAN Pascal, Language Modes
-@subsection @TeX{} Language Mode
+@node TeX and LaTeX Language Modes, Eqn Language Mode, C FORTRAN Pascal, Language Modes
+@subsection @TeX{} and La@TeX{} Language Modes
 
 @noindent
 @kindex d T
 @pindex calc-tex-language
 @cindex TeX language
+@kindex d L
+@pindex calc-latex-language
+@cindex LaTeX language
 The @kbd{d T} (@code{calc-tex-language}) command selects the conventions
-of ``math mode'' in the @TeX{} typesetting language, by Donald Knuth.
-Formulas are entered
-and displayed in @TeX{} notation, as in @samp{\sin\left( a \over b \right)}.
-Math formulas are usually enclosed by @samp{$ $} signs in @TeX{}; these
-should be omitted when interfacing with Calc.  To Calc, the @samp{$} sign
-has the same meaning it always does in algebraic formulas (a reference to
-an existing entry on the stack).
+of ``math mode'' in Donald Knuth's @TeX{} typesetting language,
+and the @kbd{d L} (@code{calc-latex-language}) command selects the
+conventions of ``math mode'' in La@TeX{}, a typesetting language that
+uses @TeX{} as its formatting engine.  Calc's La@TeX{} language mode can
+read any formula that the @TeX{} language mode can, although La@TeX{}
+mode may display it differently.
+
+Formulas are entered and displayed in the appropriate notation;
+@texline @math{\sin(a/b)}
+@infoline @expr{sin(a/b)}
+will appear as @samp{\sin\left( a \over b \right)} in @TeX{} mode and
+@samp{\sin\left(\frac@{a@}@{b@}\right)} in La@TeX{} mode.
+Math formulas are often enclosed by @samp{$ $} signs in @TeX{} and
+La@TeX{}; these should be omitted when interfacing with Calc.  To Calc,
+the @samp{$} sign has the same meaning it always does in algebraic
+formulas (a reference to an existing entry on the stack).
 
 Complex numbers are displayed as in @samp{3 + 4i}.  Fractions and
-quotients are written using @code{\over};
-binomial coefficients are written with @code{\choose}.
-Interval forms are written with @code{\ldots}, and
-error forms are written with @code{\pm}.
-Absolute values are written as in @samp{|x + 1|}, and the floor and
-ceiling functions are written with @code{\lfloor}, @code{\rfloor}, etc.
-The words @code{\left} and @code{\right} are ignored when reading
-formulas in @TeX{} mode.  Both @code{inf} and @code{uinf} are written
-as @code{\infty}; when read, @code{\infty} always translates to
-@code{inf}.
+quotients are written using @code{\over} in @TeX{} mode (as in 
+@code{@{a \over b@}}) and @code{\frac} in La@TeX{} mode (as in
+@code{\frac@{a@}@{b@}});  binomial coefficients are written with
+@code{\choose} in @TeX{} mode (as in @code{@{a \choose b@}}) and
+@code{\binom} in La@TeX{} mode (as in @code{\binom@{a@}@{b@}}).
+Interval forms are written with @code{\ldots}, and error forms are
+written with @code{\pm}. Absolute values are written as in 
+@samp{|x + 1|}, and the floor and ceiling functions are written with
+@code{\lfloor}, @code{\rfloor}, etc. The words @code{\left} and
+@code{\right} are ignored when reading formulas in @TeX{} and La@TeX{}
+modes.  Both @code{inf} and @code{uinf} are written as @code{\infty};
+when read, @code{\infty} always translates to @code{inf}.
 
 Function calls are written the usual way, with the function name followed
-by the arguments in parentheses.  However, functions for which @TeX{} has
-special names (like @code{\sin}) will use curly braces instead of
-parentheses for very simple arguments.  During input, curly braces and
-parentheses work equally well for grouping, but when the document is
-formatted the curly braces will be invisible.  Thus the printed result is
+by the arguments in parentheses.  However, functions for which @TeX{}
+and La@TeX{} have special names (like @code{\sin}) will use curly braces
+instead of parentheses for very simple arguments.  During input, curly
+braces and parentheses work equally well for grouping, but when the
+document is formatted the curly braces will be invisible.  Thus the
+printed result is 
 @texline @math{\sin{2 x}}
 @infoline @expr{sin 2x} 
 but 
 @texline @math{\sin(2 + x)}.
 @infoline @expr{sin(2 + x)}.
 
-Function and variable names not treated specially by @TeX{} are simply
-written out as-is, which will cause them to come out in italic letters
-in the printed document.  If you invoke @kbd{d T} with a positive numeric
-prefix argument, names of more than one character will instead be written
-@samp{\hbox@{@var{name}@}}.  The @samp{\hbox@{ @}} notation is ignored
-during reading.  If you use a negative prefix argument, such function
-names are written @samp{\@var{name}}, and function names that begin
-with @code{\} during reading have the @code{\} removed.  (Note that
-in this mode, long variable names are still written with @code{\hbox}.
-However, you can always make an actual variable name like @code{\bar}
-in any @TeX{} mode.)
+Function and variable names not treated specially by @TeX{} and La@TeX{}
+are simply written out as-is, which will cause them to come out in
+italic letters in the printed document.  If you invoke @kbd{d T} or
+@kbd{d L} with a positive numeric prefix argument, names of more than
+one character will instead be enclosed in a protective commands that
+will prevent them from being typeset in the math italics; they will be
+written @samp{\hbox@{@var{name}@}} in @TeX{} mode and 
+@samp{\text@{@var{name}@}} in La@TeX{} mode.  The
+@samp{\hbox@{ @}} and @samp{\text@{ @}} notations are ignored during
+reading.  If you use a negative prefix argument, such function names are
+written @samp{\@var{name}}, and function names that begin with @code{\} during
+reading have the @code{\} removed.  (Note that in this mode, long
+variable names are still written with @code{\hbox} or @code{\text}.
+However, you can always make an actual variable name like @code{\bar} in
+any @TeX{} mode.)
 
 During reading, text of the form @samp{\matrix@{ ...@: @}} is replaced
 by @samp{[ ...@: ]}.  The same also applies to @code{\pmatrix} and
-@code{\bmatrix}.  The symbol @samp{&} is interpreted as a comma,
+@code{\bmatrix}.  In La@TeX{} mode this also applies to 
+@samp{\begin@{matrix@} ... \end@{matrix@}},
+@samp{\begin@{bmatrix@} ... \end@{bmatrix@}},
+@samp{\begin@{pmatrix@} ... \end@{pmatrix@}}, as well as
+@samp{\begin@{smallmatrix@} ... \end@{smallmatrix@}}.
+The symbol @samp{&} is interpreted as a comma,
 and the symbols @samp{\cr} and @samp{\\} are interpreted as semicolons.
 During output, matrices are displayed in @samp{\matrix@{ a & b \\ c & d@}}
-format; you may need to edit this afterwards to change @code{\matrix}
-to @code{\pmatrix} or @code{\\} to @code{\cr}.
+format in @TeX{} mode and in 
+@samp{\begin@{pmatrix@} a & b \\ c & d \end@{pmatrix@}} format in
+La@TeX{} mode; you may need to edit this afterwards to change to your
+preferred matrix form.  If you invoke @kbd{d T} or @kbd{d L} with an
+argument of 2 or -2, then matrices will be displayed in two-dimensional
+form, such as 
+
+@example
+\begin@{pmatrix@}
+a & b \\
+c & d
+\end@{pmatrix@}
+@end example
+
+@noindent
+This may be convenient for isolated matrices, but could lead to
+expressions being displayed like
+
+@example
+\begin@{pmatrix@} \times x
+a & b \\
+c & d
+\end@{pmatrix@}
+@end example
+
+@noindent
+While this wouldn't bother Calc, it is incorrect La@TeX{}.
+(Similarly for @TeX{}.)
 
 Accents like @code{\tilde} and @code{\bar} translate into function
 calls internally (@samp{tilde(x)}, @samp{bar(x)}).  The @code{\underline}
 sequence is treated as an accent.  The @code{\vec} accent corresponds
 to the function name @code{Vec}, because @code{vec} is the name of
 a built-in Calc function.  The following table shows the accents
-in Calc, @TeX{}, and @dfn{eqn} (described in the next section):
+in Calc, @TeX{}, La@TeX{} and @dfn{eqn} (described in the next section):
 
 @iftex
 @begingroup
@@ -14220,26 +14267,58 @@
 @ignore
 @starindex
 @end ignore
+@tindex Acute
+@ignore
+@starindex
+@end ignore
 @tindex bar
 @ignore
 @starindex
 @end ignore
+@tindex Bar
+@ignore
+@starindex
+@end ignore
 @tindex breve
 @ignore
 @starindex
 @end ignore
+@tindex Breve
+@ignore
+@starindex
+@end ignore
 @tindex check
 @ignore
 @starindex
 @end ignore
+@tindex Check
+@ignore
+@starindex
+@end ignore
+@tindex dddot
+@ignore
+@starindex
+@end ignore
+@tindex ddddot
+@ignore
+@starindex
+@end ignore
 @tindex dot
 @ignore
 @starindex
 @end ignore
+@tindex Dot
+@ignore
+@starindex
+@end ignore
 @tindex dotdot
 @ignore
 @starindex
 @end ignore
+@tindex DotDot
+@ignore
+@starindex
+@end ignore
 @tindex dyad
 @ignore
 @starindex
@@ -14248,10 +14327,18 @@
 @ignore
 @starindex
 @end ignore
+@tindex Grave
+@ignore
+@starindex
+@end ignore
 @tindex hat
 @ignore
 @starindex
 @end ignore
+@tindex Hat
+@ignore
+@starindex
+@end ignore
 @tindex Prime
 @ignore
 @starindex
@@ -14260,30 +14347,50 @@
 @ignore
 @starindex
 @end ignore
+@tindex Tilde
+@ignore
+@starindex
+@end ignore
 @tindex under
 @ignore
 @starindex
 @end ignore
 @tindex Vec
+@ignore
+@starindex
+@end ignore
+@tindex VEC
 @iftex
 @endgroup
 @end iftex
 @example
-Calc      TeX           eqn
-----      ---           ---
-acute     \acute
-bar       \bar          bar
-breve     \breve
-check     \check
-dot       \dot          dot
-dotdot    \ddot         dotdot
-dyad                    dyad
-grave     \grave
-hat       \hat          hat
-Prime                   prime
-tilde     \tilde        tilde
-under     \underline    under
-Vec       \vec          vec
+Calc      TeX           LaTeX         eqn
+----      ---           -----         ---
+acute     \acute        \acute        
+Acute                   \Acute        
+bar       \bar          \bar          bar
+Bar                     \Bar
+breve     \breve        \breve        
+Breve                   \Breve        
+check     \check        \check        
+Check                   \Check        
+dddot                   \dddot
+ddddot                  \ddddot
+dot       \dot          \dot          dot
+Dot                     \Dot
+dotdot    \ddot         \ddot         dotdot
+DotDot                  \Ddot         
+dyad                                  dyad
+grave     \grave        \grave        
+Grave                   \Grave        
+hat       \hat          \hat          hat
+Hat                     \Hat          
+Prime                                 prime
+tilde     \tilde        \tilde        tilde
+Tilde                   \Tilde
+under     \underline    \underline    under
+Vec       \vec          \vec          vec
+VEC                     \Vec
 @end example
 
 The @samp{=>} (evaluates-to) operator appears as a @code{\to} symbol:
@@ -14320,8 +14427,9 @@
 \evalto
 @end example
 
-Note that, because these symbols are ignored, reading a @TeX{} formula
-into Calc and writing it back out may lose spacing and font information.
+Note that, because these symbols are ignored, reading a @TeX{} or
+La@TeX{} formula into Calc and writing it back out may lose spacing and
+font information. 
 
 Also, the ``discretionary multiplication sign'' @samp{\*} is read
 the same as @samp{*}.
@@ -14449,7 +14557,7 @@
 @sp 2
 @end iftex
 
-@node Eqn Language Mode, Mathematica Language Mode, TeX Language Mode, Language Modes
+@node Eqn Language Mode, Mathematica Language Mode, TeX and LaTeX Language Modes, Language Modes
 @subsection Eqn Language Mode
 
 @noindent
@@ -14491,7 +14599,7 @@
 symbol (these are used to introduce spaces of various widths into
 the typeset output of @dfn{eqn}).
 
-As in @TeX{} mode, Calc's formatter omits parentheses around the
+As in La@TeX{} mode, Calc's formatter omits parentheses around the
 arguments of functions like @code{ln} and @code{sin} if they are
 ``simple-looking''; in this case Calc surrounds the argument with
 braces, separated by a @samp{~} from the function name: @samp{sin~@{x@}}.
@@ -14505,17 +14613,17 @@
 of quotes in @dfn{eqn}, but it is good enough for most uses.
 
 Accent codes (@samp{@var{x} dot}) are handled by treating them as
-function calls (@samp{dot(@var{x})}) internally.  @xref{TeX Language
-Mode}, for a table of these accent functions.  The @code{prime} accent
-is treated specially if it occurs on a variable or function name:
-@samp{f prime prime @w{( x prime )}} is stored internally as
-@samp{f'@w{'}(x')}.  For example, taking the derivative of @samp{f(2 x)}
-with @kbd{a d x} will produce @samp{2 f'(2 x)}, which @dfn{eqn} mode
-will display as @samp{2 f prime ( 2 x )}.
+function calls (@samp{dot(@var{x})}) internally.  
+@xref{TeX and LaTeX Language Modes}, for a table of these accent
+functions.  The @code{prime} accent is treated specially if it occurs on
+a variable or function name: @samp{f prime prime @w{( x prime )}} is
+stored internally as @samp{f'@w{'}(x')}.  For example, taking the
+derivative of @samp{f(2 x)} with @kbd{a d x} will produce @samp{2 f'(2
+x)}, which @dfn{eqn} mode will display as @samp{2 f prime ( 2 x )}.
 
 Assignments are written with the @samp{<-} (left-arrow) symbol,
 and @code{evalto} operators are written with @samp{->} or
-@samp{evalto ... ->} (@pxref{TeX Language Mode}, for a discussion
+@samp{evalto ... ->} (@pxref{TeX and LaTeX Language Modes}, for a discussion
 of this).  The regular Calc symbols @samp{:=} and @samp{=>} are also
 recognized for these operators during reading.
 
@@ -15820,7 +15928,10 @@
 FORTRAN language mode (@kbd{d F}).
 
 @item TeX
-@TeX{} language mode (@kbd{d T}; @pxref{TeX Language Mode}).
+@TeX{} language mode (@kbd{d T}; @pxref{TeX and LaTeX Language Modes}).
+
+@item LaTeX
+La@TeX{} language mode (@kbd{d L}; @pxref{TeX and LaTeX Language Modes}).
 
 @item Eqn
 @dfn{Eqn} language mode (@kbd{d E}; @pxref{Eqn Language Mode}).
@@ -16396,7 +16507,7 @@
 
 @cindex Fractional part of a number
 To compute the fractional part of a number (i.e., the amount which, when
-added to `@t{floor(}@var{n}@t{)}', will produce @var{n}) just take @var{n}
+added to `@tfn{floor(}@var{n}@tfn{)}', will produce @var{n}) just take @var{n}
 modulo 1 using the @code{%} command.
 
 Note also the @kbd{\} (integer quotient), @kbd{f I} (integer logarithm),
@@ -16423,8 +16534,8 @@
 The @kbd{G} (@code{calc-argument}) [@code{arg}] command computes the
 ``argument'' or polar angle of a complex number.  For a number in polar
 notation, this is simply the second component of the pair
-@texline `@t{(}@var{r}@t{;}@math{\theta}@t{)}'.
-@infoline `@t{(}@var{r}@t{;}@var{theta}@t{)}'.
+@texline `@tfn{(}@var{r}@tfn{;}@math{\theta}@tfn{)}'.
+@infoline `@tfn{(}@var{r}@tfn{;}@var{theta}@tfn{)}'.
 The result is expressed according to the current angular mode and will
 be in the range @mathit{-180} degrees (exclusive) to @mathit{+180} degrees
 (inclusive), or the equivalent range in radians.
@@ -18692,7 +18803,7 @@
 are both real numbers, the result uses a Gaussian distribution with mean
 @var{m} and standard deviation 
 @texline @math{\sigma}.
-@var{s}.
+@infoline @var{s}.
 
 If @expr{M} is an interval form, the lower and upper bounds specify the
 acceptable limits of the random numbers.  If both bounds are integers,
@@ -20372,7 +20483,7 @@
 weight is completely negligible.)
 
 This function also works for distributions (error forms or
-intervals).  The mean of an error form `@var{a} @t{+/-} @var{b}' is simply
+intervals).  The mean of an error form `@var{a} @tfn{+/-} @var{b}' is simply
 @expr{a}.  The mean of an interval is the mean of the minimum
 and maximum values of the interval.
 
@@ -22144,17 +22255,17 @@
 back on.
 
 The most basic default simplification is the evaluation of functions.
-For example, @expr{2 + 3} is evaluated to @expr{5}, and @expr{@t{sqrt}(9)}
+For example, @expr{2 + 3} is evaluated to @expr{5}, and @expr{@tfn{sqrt}(9)}
 is evaluated to @expr{3}.  Evaluation does not occur if the arguments
-to a function are somehow of the wrong type @expr{@t{tan}([2,3,4])}),
-range (@expr{@t{tan}(90)}), or number (@expr{@t{tan}(3,5)}), 
-or if the function name is not recognized (@expr{@t{f}(5)}), or if
+to a function are somehow of the wrong type @expr{@tfn{tan}([2,3,4])}),
+range (@expr{@tfn{tan}(90)}), or number (@expr{@tfn{tan}(3,5)}), 
+or if the function name is not recognized (@expr{@tfn{f}(5)}), or if
 Symbolic mode (@pxref{Symbolic Mode}) prevents evaluation
-(@expr{@t{sqrt}(2)}).
+(@expr{@tfn{sqrt}(2)}).
 
 Calc simplifies (evaluates) the arguments to a function before it
-simplifies the function itself.  Thus @expr{@t{sqrt}(5+4)} is
-simplified to @expr{@t{sqrt}(9)} before the @code{sqrt} function
+simplifies the function itself.  Thus @expr{@tfn{sqrt}(5+4)} is
+simplified to @expr{@tfn{sqrt}(9)} before the @code{sqrt} function
 itself is applied.  There are very few exceptions to this rule:
 @code{quote}, @code{lambda}, and @code{condition} (the @code{::}
 operator) do not evaluate their arguments, @code{if} (the @code{? :}
@@ -22279,7 +22390,7 @@
 @texline @math{x^{a+b}}
 @infoline @expr{x^(a+b)}
 where @expr{a} is a number, or an implicit 1 (as in @expr{x}),
-or the implicit one-half of @expr{@t{sqrt}(x)}, and similarly for
+or the implicit one-half of @expr{@tfn{sqrt}(x)}, and similarly for
 @expr{b}.  The result is written using @samp{sqrt} or @samp{1/sqrt}
 if the sum of the powers is @expr{1/2} or @expr{-1/2}, respectively.
 If the sum of the powers is zero, the product is simplified to
@@ -22370,20 +22481,20 @@
 is not.)  @xref{Declarations}, for ways to inform Calc that your
 variables satisfy these requirements.
 
-As a special case of this rule, @expr{@t{sqrt}(x)^n} is simplified to
+As a special case of this rule, @expr{@tfn{sqrt}(x)^n} is simplified to
 @texline @math{x^{n/2}}
 @infoline @expr{x^(n/2)} 
 only for even integers @expr{n}.
 
 If @expr{a} is known to be real, @expr{b} is an even integer, and
 @expr{c} is a half- or quarter-integer, then @expr{(a^b)^c} is
-simplified to @expr{@t{abs}(a^(b c))}.
+simplified to @expr{@tfn{abs}(a^(b c))}.
 
 Also, @expr{(-a)^b} is simplified to @expr{a^b} if @expr{b} is an
 even integer, or to @expr{-(a^b)} if @expr{b} is an odd integer,
 for any negative-looking expression @expr{-a}.
 
-Square roots @expr{@t{sqrt}(x)} generally act like one-half powers
+Square roots @expr{@tfn{sqrt}(x)} generally act like one-half powers
 @texline @math{x^{1:2}}
 @infoline @expr{x^1:2} 
 for the purposes of the above-listed simplifications.
@@ -22394,21 +22505,21 @@
 is changed to 
 @texline @math{x^{-1:2}},
 @infoline @expr{x^(-1:2)},
-but @expr{1 / @t{sqrt}(x)} is left alone.
+but @expr{1 / @tfn{sqrt}(x)} is left alone.
 
 @tex
 \bigskip
 @end tex
 
 Generic identity matrices (@pxref{Matrix Mode}) are simplified by the
-following rules:  @expr{@t{idn}(a) + b} to @expr{a + b} if @expr{b}
+following rules:  @expr{@tfn{idn}(a) + b} to @expr{a + b} if @expr{b}
 is provably scalar, or expanded out if @expr{b} is a matrix;
-@expr{@t{idn}(a) + @t{idn}(b)} to @expr{@t{idn}(a + b)}; 
-@expr{-@t{idn}(a)} to @expr{@t{idn}(-a)}; @expr{a @t{idn}(b)} to 
-@expr{@t{idn}(a b)} if @expr{a} is provably scalar, or to @expr{a b} 
-if @expr{a} is provably non-scalar;  @expr{@t{idn}(a) @t{idn}(b)} to
-@expr{@t{idn}(a b)}; analogous simplifications for quotients involving
-@code{idn}; and @expr{@t{idn}(a)^n} to @expr{@t{idn}(a^n)} where
+@expr{@tfn{idn}(a) + @tfn{idn}(b)} to @expr{@tfn{idn}(a + b)}; 
+@expr{-@tfn{idn}(a)} to @expr{@tfn{idn}(-a)}; @expr{a @tfn{idn}(b)} to 
+@expr{@tfn{idn}(a b)} if @expr{a} is provably scalar, or to @expr{a b} 
+if @expr{a} is provably non-scalar;  @expr{@tfn{idn}(a) @tfn{idn}(b)} to
+@expr{@tfn{idn}(a b)}; analogous simplifications for quotients involving
+@code{idn}; and @expr{@tfn{idn}(a)^n} to @expr{@tfn{idn}(a^n)} where
 @expr{n} is an integer.
 
 @tex
@@ -22417,27 +22528,27 @@
 
 The @code{floor} function and other integer truncation functions
 vanish if the argument is provably integer-valued, so that
-@expr{@t{floor}(@t{round}(x))} simplifies to @expr{@t{round}(x)}.
+@expr{@tfn{floor}(@tfn{round}(x))} simplifies to @expr{@tfn{round}(x)}.
 Also, combinations of @code{float}, @code{floor} and its friends,
 and @code{ffloor} and its friends, are simplified in appropriate
 ways.  @xref{Integer Truncation}.
 
-The expression @expr{@t{abs}(-x)} changes to @expr{@t{abs}(x)}.
-The expression @expr{@t{abs}(@t{abs}(x))} changes to
-@expr{@t{abs}(x)};  in fact, @expr{@t{abs}(x)} changes to @expr{x} or
+The expression @expr{@tfn{abs}(-x)} changes to @expr{@tfn{abs}(x)}.
+The expression @expr{@tfn{abs}(@tfn{abs}(x))} changes to
+@expr{@tfn{abs}(x)};  in fact, @expr{@tfn{abs}(x)} changes to @expr{x} or
 @expr{-x} if @expr{x} is provably nonnegative or nonpositive
 (@pxref{Declarations}). 
 
 While most functions do not recognize the variable @code{i} as an
 imaginary number, the @code{arg} function does handle the two cases
-@expr{@t{arg}(@t{i})} and @expr{@t{arg}(-@t{i})} just for convenience.
-
-The expression @expr{@t{conj}(@t{conj}(x))} simplifies to @expr{x}.
+@expr{@tfn{arg}(@tfn{i})} and @expr{@tfn{arg}(-@tfn{i})} just for convenience.
+
+The expression @expr{@tfn{conj}(@tfn{conj}(x))} simplifies to @expr{x}.
 Various other expressions involving @code{conj}, @code{re}, and
 @code{im} are simplified, especially if some of the arguments are
 provably real or involve the constant @code{i}.  For example,
-@expr{@t{conj}(a + b i)} is changed to 
-@expr{@t{conj}(a) - @t{conj}(b) i},  or to @expr{a - b i} if @expr{a}
+@expr{@tfn{conj}(a + b i)} is changed to 
+@expr{@tfn{conj}(a) - @tfn{conj}(b) i},  or to @expr{a - b i} if @expr{a}
 and @expr{b} are known to be real.
 
 Functions like @code{sin} and @code{arctan} generally don't have
@@ -22447,13 +22558,13 @@
 these functions, though.
 
 One important simplification that does occur is that
-@expr{@t{ln}(@t{e})} is simplified to 1, and @expr{@t{ln}(@t{e}^x)} is
+@expr{@tfn{ln}(@tfn{e})} is simplified to 1, and @expr{@tfn{ln}(@tfn{e}^x)} is
 simplified to @expr{x} for any @expr{x}.  This occurs even if you have
 stored a different value in the Calc variable @samp{e}; but this would
 be a bad idea in any case if you were also using natural logarithms!
 
-Among the logical functions, @t{(@var{a} <= @var{b})} changes to
-@t{@var{a} > @var{b}} and so on.  Equations and inequalities where both sides
+Among the logical functions, @tfn{(@var{a} <= @var{b})} changes to
+@tfn{@var{a} > @var{b}} and so on.  Equations and inequalities where both sides
 are either negative-looking or zero are simplified by negating both sides
 and reversing the inequality.  While it might seem reasonable to simplify
 @expr{!!x} to @expr{x}, this would not be valid in general because
@@ -22577,17 +22688,17 @@
 Square roots of integer or rational arguments are simplified in
 several ways.  (Note that these will be left unevaluated only in
 Symbolic mode.)  First, square integer or rational factors are
-pulled out so that @expr{@t{sqrt}(8)} is rewritten as
-@texline @math{2\,\t{sqrt}(2)}.
+pulled out so that @expr{@tfn{sqrt}(8)} is rewritten as
+@texline @math{2\,@tfn{sqrt}(2)}.
 @infoline @expr{2 sqrt(2)}.  
 Conceptually speaking this implies factoring the argument into primes
 and moving pairs of primes out of the square root, but for reasons of
 efficiency Calc only looks for primes up to 29.
 
 Square roots in the denominator of a quotient are moved to the
-numerator:  @expr{1 / @t{sqrt}(3)} changes to @expr{@t{sqrt}(3) / 3}.
+numerator:  @expr{1 / @tfn{sqrt}(3)} changes to @expr{@tfn{sqrt}(3) / 3}.
 The same effect occurs for the square root of a fraction:
-@expr{@t{sqrt}(2:3)} changes to @expr{@t{sqrt}(6) / 3}.
+@expr{@tfn{sqrt}(2:3)} changes to @expr{@tfn{sqrt}(6) / 3}.
 
 @tex
 \bigskip
@@ -22620,16 +22731,16 @@
 @end tex
 
 Trigonometric functions are simplified in several ways.  First,
-@expr{@t{sin}(@t{arcsin}(x))} is simplified to @expr{x}, and
+@expr{@tfn{sin}(@tfn{arcsin}(x))} is simplified to @expr{x}, and
 similarly for @code{cos} and @code{tan}.  If the argument to
 @code{sin} is negative-looking, it is simplified to 
-@expr{-@t{sin}(x),},  and similarly for @code{cos} and @code{tan}.
+@expr{-@tfn{sin}(x),},  and similarly for @code{cos} and @code{tan}.
 Finally, certain special values of the argument are recognized;
 @pxref{Trigonometric and Hyperbolic Functions}.
 
 Trigonometric functions of inverses of different trigonometric
-functions can also be simplified, as in @expr{@t{sin}(@t{arccos}(x))}
-to @expr{@t{sqrt}(1 - x^2)}.
+functions can also be simplified, as in @expr{@tfn{sin}(@tfn{arccos}(x))}
+to @expr{@tfn{sqrt}(1 - x^2)}.
 
 Hyperbolic functions of their inverses and of negative-looking
 arguments are also handled, as are exponentials of inverse
@@ -22638,29 +22749,29 @@
 No simplifications for inverse trigonometric and hyperbolic
 functions are known, except for negative arguments of @code{arcsin},
 @code{arctan}, @code{arcsinh}, and @code{arctanh}.  Note that
-@expr{@t{arcsin}(@t{sin}(x))} can @emph{not} safely change to
+@expr{@tfn{arcsin}(@tfn{sin}(x))} can @emph{not} safely change to
 @expr{x}, since this only correct within an integer multiple of 
 @texline @math{2 \pi}
 @infoline @expr{2 pi} 
-radians or 360 degrees.  However, @expr{@t{arcsinh}(@t{sinh}(x))} is
+radians or 360 degrees.  However, @expr{@tfn{arcsinh}(@tfn{sinh}(x))} is
 simplified to @expr{x} if @expr{x} is known to be real.
 
 Several simplifications that apply to logarithms and exponentials
-are that @expr{@t{exp}(@t{ln}(x))}, 
-@texline @t{e}@math{^{\ln(x)}},
-@infoline @expr{e^@t{ln}(x)}, 
+are that @expr{@tfn{exp}(@tfn{ln}(x))}, 
+@texline @tfn{e}@math{^{\ln(x)}},
+@infoline @expr{e^@tfn{ln}(x)}, 
 and
 @texline @math{10^{{\rm log10}(x)}}
-@infoline @expr{10^@t{log10}(x)} 
-all reduce to @expr{x}.  Also, @expr{@t{ln}(@t{exp}(x))}, etc., can
+@infoline @expr{10^@tfn{log10}(x)} 
+all reduce to @expr{x}.  Also, @expr{@tfn{ln}(@tfn{exp}(x))}, etc., can
 reduce to @expr{x} if @expr{x} is provably real.  The form
-@expr{@t{exp}(x)^y} is simplified to @expr{@t{exp}(x y)}.  If @expr{x}
+@expr{@tfn{exp}(x)^y} is simplified to @expr{@tfn{exp}(x y)}.  If @expr{x}
 is a suitable multiple of 
 @texline @math{\pi i} 
 @infoline @expr{pi i}
 (as described above for the trigonometric functions), then
-@expr{@t{exp}(x)} or @expr{e^x} will be expanded.  Finally,
-@expr{@t{ln}(x)} is simplified to a form involving @code{pi} and
+@expr{@tfn{exp}(x)} or @expr{e^x} will be expanded.  Finally,
+@expr{@tfn{ln}(x)} is simplified to a form involving @code{pi} and
 @code{i} where @expr{x} is provably negative, positive imaginary, or
 negative imaginary. 
 
@@ -22732,9 +22843,9 @@
 
 Inverse trigonometric or hyperbolic functions, called with their
 corresponding non-inverse functions as arguments, are simplified
-by @kbd{a e}.  For example, @expr{@t{arcsin}(@t{sin}(x))} changes
-to @expr{x}.  Also, @expr{@t{arcsin}(@t{cos}(x))} and
-@expr{@t{arccos}(@t{sin}(x))} both change to @expr{@t{pi}/2 - x}.
+by @kbd{a e}.  For example, @expr{@tfn{arcsin}(@tfn{sin}(x))} changes
+to @expr{x}.  Also, @expr{@tfn{arcsin}(@tfn{cos}(x))} and
+@expr{@tfn{arccos}(@tfn{sin}(x))} both change to @expr{@tfn{pi}/2 - x}.
 These simplifications are unsafe because they are valid only for
 values of @expr{x} in a certain range; outside that range, values
 are folded down to the 360-degree range that the inverse trigonometric
@@ -22750,22 +22861,22 @@
 the powers cancel to get @expr{x}, which is valid for positive values
 of @expr{x} but not for negative or complex values.
 
-Similarly, @expr{@t{sqrt}(x^a)} and @expr{@t{sqrt}(x)^a} are both
+Similarly, @expr{@tfn{sqrt}(x^a)} and @expr{@tfn{sqrt}(x)^a} are both
 simplified (possibly unsafely) to 
 @texline @math{x^{a/2}}.
 @infoline @expr{x^(a/2)}.
 
-Forms like @expr{@t{sqrt}(1 - sin(x)^2)} are simplified to, e.g.,
-@expr{@t{cos}(x)}.  Calc has identities of this sort for @code{sin},
+Forms like @expr{@tfn{sqrt}(1 - sin(x)^2)} are simplified to, e.g.,
+@expr{@tfn{cos}(x)}.  Calc has identities of this sort for @code{sin},
 @code{cos}, @code{tan}, @code{sinh}, and @code{cosh}.
 
 Arguments of square roots are partially factored to look for
 squared terms that can be extracted.  For example,
-@expr{@t{sqrt}(a^2 b^3 + a^3 b^2)} simplifies to 
-@expr{a b @t{sqrt}(a+b)}.
-
-The simplifications of @expr{@t{ln}(@t{exp}(x))},
-@expr{@t{ln}(@t{e}^x)}, and @expr{@t{log10}(10^x)} to @expr{x} are also
+@expr{@tfn{sqrt}(a^2 b^3 + a^3 b^2)} simplifies to 
+@expr{a b @tfn{sqrt}(a+b)}.
+
+The simplifications of @expr{@tfn{ln}(@tfn{exp}(x))},
+@expr{@tfn{ln}(@tfn{e}^x)}, and @expr{@tfn{log10}(10^x)} to @expr{x} are also
 unsafe because of problems with principal values (although these
 simplifications are safe if @expr{x} is known to be real).
 
@@ -24317,8 +24428,8 @@
 or all be plain numbers.  Error forms can go anywhere but generally
 go on the numbers in the last row of the data matrix.  If the last
 row contains error forms
-@texline `@var{y_i}@w{ @t{+/-} }@math{\sigma_i}', 
-@infoline `@var{y_i}@w{ @t{+/-} }@var{sigma_i}', 
+@texline `@var{y_i}@w{ @tfn{+/-} }@math{\sigma_i}', 
+@infoline `@var{y_i}@w{ @tfn{+/-} }@var{sigma_i}', 
 then the 
 @texline @math{\chi^2}
 @infoline @expr{chi^2}
@@ -24470,17 +24581,17 @@
 @item 2-9
 Polynomials.  @mathit{a + b x + c x^2 + d x^3}.
 @item e
-Exponential.  @mathit{a} @t{exp}@mathit{(b x)} @t{exp}@mathit{(c y)}.
+Exponential.  @mathit{a} @tfn{exp}@mathit{(b x)} @tfn{exp}@mathit{(c y)}.
 @item E
-Base-10 exponential.  @mathit{a} @t{10^}@mathit{(b x)} @t{10^}@mathit{(c y)}.
+Base-10 exponential.  @mathit{a} @tfn{10^}@mathit{(b x)} @tfn{10^}@mathit{(c y)}.
 @item x
-Exponential (alternate notation).  @t{exp}@mathit{(a + b x + c y)}.
+Exponential (alternate notation).  @tfn{exp}@mathit{(a + b x + c y)}.
 @item X
-Base-10 exponential (alternate).  @t{10^}@mathit{(a + b x + c y)}.
+Base-10 exponential (alternate).  @tfn{10^}@mathit{(a + b x + c y)}.
 @item l
-Logarithmic.  @mathit{a + b} @t{ln}@mathit{(x) + c} @t{ln}@mathit{(y)}.
+Logarithmic.  @mathit{a + b} @tfn{ln}@mathit{(x) + c} @tfn{ln}@mathit{(y)}.
 @item L
-Base-10 logarithmic.  @mathit{a + b} @t{log10}@mathit{(x) + c} @t{log10}@mathit{(y)}.
+Base-10 logarithmic.  @mathit{a + b} @tfn{log10}@mathit{(x) + c} @tfn{log10}@mathit{(y)}.
 @item ^
 General exponential.  @mathit{a b^x c^y}.
 @item p
@@ -28234,7 +28345,7 @@
 @cindex @samp{=>} operator
 The special algebraic symbol @samp{=>} is known as the @dfn{evaluates-to
 operator}.  (It will show up as an @code{evalto} function call in
-other language modes like Pascal and @TeX{}.)  This is a binary
+other language modes like Pascal and La@TeX{}.)  This is a binary
 operator, that is, it has a lefthand and a righthand argument,
 although it can be entered with the righthand argument omitted.
 
@@ -28349,7 +28460,7 @@
 (@code{calc-assign}) [@code{assign}] command which takes a variable
 and value from the stack and replaces them with an assignment.
 
-@xref{TeX Language Mode}, for the way @samp{=>} appears in
+@xref{TeX and LaTeX Language Modes}, for the way @samp{=>} appears in
 @TeX{} language output.  The @dfn{eqn} mode gives similar
 treatment to @samp{=>}.
 
@@ -29752,7 +29863,7 @@
 The @TeX{} and La@TeX{} math delimiters @samp{$ $}, @samp{$$ $$},
 @samp{\[ \]}, and @samp{\( \)};
 @item
-Lines beginning with @samp{\begin} and @samp{\end};
+Lines beginning with @samp{\begin} and @samp{\end} (except matrix delimiters);
 @item
 Lines beginning with @samp{@@} (Texinfo delimiters).
 @item
@@ -29889,16 +30000,16 @@
 When Embedded mode ``activates'' a formula, i.e., when it examines
 the formula for the first time since the buffer was created or
 loaded, Calc tries to sense the language in which the formula was
-written.  If the formula contains any @TeX{}-like @samp{\} sequences,
-it is parsed (i.e., read) in @TeX{} mode.  If the formula appears to
+written.  If the formula contains any La@TeX{}-like @samp{\} sequences,
+it is parsed (i.e., read) in La@TeX{} mode.  If the formula appears to
 be written in multi-line Big mode, it is parsed in Big mode.  Otherwise,
 it is parsed according to the current language mode.
 
 Note that Calc does not change the current language mode according
-to what it finds.  Even though it can read a @TeX{} formula when
-not in @TeX{} mode, it will immediately rewrite this formula using
-whatever language mode is in effect.  You must then type @kbd{d T}
-to switch Calc permanently into @TeX{} mode if that is what you
+to what it finds.  Even though it can read a La@TeX{} formula when
+not in La@TeX{} mode, it will immediately rewrite this formula using
+whatever language mode is in effect.  You must then type @kbd{d L}
+to switch Calc permanently into La@TeX{} mode if that is what you
 desire.
 
 @tex
@@ -29919,8 +30030,8 @@
 
 Plain formulas are preceded and followed by @samp{%%%} signs
 by default.  This notation has the advantage that the @samp{%}
-character begins a comment in @TeX{}, so if your formula is
-embedded in a @TeX{} document its plain version will be
+character begins a comment in @TeX{} and La@TeX{}, so if your formula is 
+embedded in a @TeX{} or La@TeX{} document its plain version will be
 invisible in the final printed copy.  @xref{Customizing
 Embedded Mode}, to see how to change the ``plain'' formula
 delimiters, say to something that @dfn{eqn} or some other
@@ -30210,7 +30321,7 @@
 @noindent
 where the leading and trailing @samp{---} can be replaced by
 any suitable strings (which must be the same on all three lines)
-or omitted altogether; in a @TeX{} file, @samp{%} would be a good
+or omitted altogether; in a @TeX{} or La@TeX{} file, @samp{%} would be a good
 leading string and no trailing string would be necessary.  In a
 C program, @samp{/*} and @samp{*/} would be good leading and
 trailing strings.
@@ -34667,7 +34778,7 @@
 @r{       @:      .     @:number       @:        @:@:0.number}
 @r{       @:      _     @:number       @:        @:-@:number}
 @r{       @:      e     @:number       @:        @:@:1e number}
-@r{       @:      #     @:number       @:        @:@:current-radix@t{#}number}
+@r{       @:      #     @:number       @:        @:@:current-radix@tfn{#}number}
 @r{       @:      P     @:(in number)  @:        @:+/-@:}
 @r{       @:      M     @:(in number)  @:        @:mod@:}
 @r{       @:      @@ ' " @:  (in number)@:        @:@:HMS form}
@@ -34976,6 +35087,7 @@
 @r{       @:      d O   @:             @:    50  @:calc-flat-language@:}
 @r{       @:      d P   @:             @:    50  @:calc-pascal-language@:}
 @r{       @:      d T   @:             @:    50  @:calc-tex-language@:}
+@r{       @:      d L   @:             @:    50  @:calc-latex-language@:}
 @r{       @:      d U   @:             @:    50  @:calc-unformatted-language@:}
 @r{       @:      d W   @:             @:    50  @:calc-maple-language@:}
 
@@ -35226,8 +35338,8 @@
 @r{       @:      s &   @:var          @: 29,47  @:calc-store-inv@:  (v^-1)}
 @r{       @:      s [   @:var          @: 29,47  @:calc-store-decr@:  (v-1)}
 @r{       @:      s ]   @:var          @: 29,47  @:calc-store-incr@:  (v-(-1))}
-@r{    a b@:      s :   @:             @:     2  @:assign@:(a,b)  a @t{:=} b}
-@r{      a@:      s =   @:             @:     1  @:evalto@:(a,b)  a @t{=>}}
+@r{    a b@:      s :   @:             @:     2  @:assign@:(a,b)  a @tfn{:=} b}
+@r{      a@:      s =   @:             @:     1  @:evalto@:(a,b)  a @tfn{=>}}
 
 @c
 @r{       @:      t [   @:             @:     4  @:calc-trail-first@:}
--- a/man/cc-mode.texi	Sun Feb 13 00:40:20 2005 +0000
+++ b/man/cc-mode.texi	Sun Feb 13 07:19:08 2005 +0000
@@ -41,7 +41,7 @@
 
 
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-@comment 
+@comment
 @comment Texinfo manual for CC Mode
 @comment Generated from the original README file by Krishna Padmasola
 @comment <krishna@earth-gw.njit.edu>
@@ -51,7 +51,7 @@
 @comment Martin Stjernholm
 @comment
 @comment Maintained by Martin Stjernholm <bug-cc-mode@gnu.org>
-@comment 
+@comment
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
 @comment Define an index for syntactic symbols.
@@ -1951,9 +1951,9 @@
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
 The following list of commands reindent C constructs.  Note that when
-you change your coding style, either interactively or through some other 
+you change your coding style, either interactively or through some other
 means, your file does @emph{not} automatically get reindented.  You
-will need to execute one of the following commands to see the effects of 
+will need to execute one of the following commands to see the effects of
 your changes.
 
 @cindex GNU indent program
@@ -2865,9 +2865,9 @@
 If @samp{other} is not found then the @samp{gnu} style is used.
 
 @item
-In all cases, the style described in @code{c-default-style} is installed 
+In all cases, the style described in @code{c-default-style} is installed
 @emph{before} the language hooks are run, so you can always override
-this setting by including an explicit call to @code{c-set-style} in your 
+this setting by including an explicit call to @code{c-set-style} in your
 language mode hook, or in @code{c-mode-common-hook}.
 @end enumerate
 @end defopt
@@ -3051,7 +3051,7 @@
 like @ccmode{} to be a little more intelligent so that it aligns
 all the @samp{<<} symbols in lines 3 through 6.  To do this, we have
 to write a custom indentation function which finds the column of the first
-stream operator on the first line of the statement.  Here is sample 
+stream operator on the first line of the statement.  Here is sample
 lisp code implementing this:
 
 @example
@@ -3878,19 +3878,19 @@
 @example
  1: void a_function( int line1,
  2:                  int line2 );
- 3: 
+ 3:
  4: void a_longer_function(
  5:     int line1,
  6:     int line2
  7:     );
- 8: 
+ 8:
  9: void call_them( int line1, int line2 )
 10: @{
 11:     a_function(
 12:         line1,
 13:         line2
 14:         );
-15: 
+15:
 16:     a_longer_function( line1,
 17:                        line2 );
 18: @}
@@ -3927,10 +3927,10 @@
  3: @{
  4:     /* this line starts a multiline
  5:      * comment.  This line should get `c' syntax */
- 6: 
+ 6:
  7:     char* a_multiline_string = "This line starts a multiline \
  8: string.  This line should get `string' syntax.";
- 9: 
+ 9:
 10:   note:
 11:     @{
 12: #ifdef LOCK
@@ -4243,7 +4243,7 @@
 @example
 @group
 int *foo[] = @{
-    NULL,                 
+    NULL,
     @{17@},             @hereFn{c-indent-multi-line-block}
 @end group
 @end example
@@ -4474,7 +4474,7 @@
 @example
 @group
 main (int,
-      char **           
+      char **
      )                @hereFn{c-lineup-close-paren}
 @end group
 @end example
@@ -4684,7 +4684,7 @@
 @example
 @group
 class Foo
-    extends           
+    extends
         Bar           @hereFn{c-lineup-java-inher}
     @sssTBasicOffset{}
 @end group
@@ -5548,7 +5548,7 @@
 (@xref{Defuns,,, emacs, The Emacs Editor}, in the Emacs 20 manual).
 
 This heuristic is built into the core syntax analysis routines in
-(X)Emacs, so it's not really a @ccmode{} issue.  However, in Emacs 21.4
+(X)Emacs, so it's not really a @ccmode{} issue.  However, in Emacs 22.1
 it has become possible to turn it off@footnote{Using the variable
 @code{open-paren-in-column-0-is-defun-start}.} and @ccmode{} does so
 there since it got its own system to keep track of blocks.
--- a/man/cmdargs.texi	Sun Feb 13 00:40:20 2005 +0000
+++ b/man/cmdargs.texi	Sun Feb 13 07:19:08 2005 +0000
@@ -14,15 +14,16 @@
 for sophisticated activities.  We don't recommend using them for
 ordinary editing.
 
-  Arguments starting with @samp{-} are @dfn{options}.  Other arguments
-specify files to visit.  Emacs visits the specified files while it
-starts up.  The last file name on your command line becomes the
-current buffer; the other files are also visited in other buffers.  If
-there are two files, they are both displayed; otherwise the last file
-is displayed along with a buffer list that shows what other buffers
-there are.  As with most programs, the special argument @samp{--} says
-that all subsequent arguments are file names, not options, even if
-they start with @samp{-}.
+  Arguments starting with @samp{-} are @dfn{options}, and so is
+@samp{+@var{linenum}}.  All other arguments specify files to visit.
+Emacs visits the specified files while it starts up.  The last file
+name on your command line becomes the current buffer; the other files
+are also visited in other buffers.  If there are two files, they are
+both displayed; otherwise the last file is displayed along with a
+buffer list that shows what other buffers there are.  As with most
+programs, the special argument @samp{--} says that all subsequent
+arguments are file names, not options, even if they start with
+@samp{-}.
 
   Emacs command options can specify many things, such as the size and
 position of the X window Emacs uses, its colors, and so on.  A few
@@ -111,9 +112,10 @@
 @opindex --load
 @cindex loading Lisp libraries, command-line argument
 Load a Lisp library named @var{file} with the function @code{load}.
-@xref{Lisp Libraries}.  The library can be found either in the current
-directory, or in the Emacs library search path as specified
-with @env{EMACSLOADPATH} (@pxref{General Variables}).
+@xref{Lisp Libraries}.  If @var{file} is not an absolute file name,
+the library can be found either in the current directory, or in the
+Emacs library search path as specified with @env{EMACSLOADPATH}
+(@pxref{General Variables}).
 
 @item -L @var{dir}
 @opindex -L
@@ -218,10 +220,11 @@
 @code{stderr}.  Functions that would normally read from the minibuffer
 take their input from @code{stdin} instead.
 
-@samp{--batch} implies @samp{-q} (do not load an init file).  It also
-causes Emacs to exit after processing all the command options.  In
-addition, it disables auto-saving except in buffers for which it has
-been explicitly requested.
+@samp{--batch} implies @samp{-q} (do not load an init file), but
+@file{site-start.el} is loaded nonetheless.  It also causes Emacs to
+exit after processing all the command options.  In addition, it
+disables auto-saving except in buffers for which it has been
+explicitly requested.
 
 @item --script @var{file}
 @opindex --script
@@ -301,7 +304,8 @@
 explicitly ask for a multibyte buffer or string.  (Note that Emacs
 always loads Lisp files in multibyte mode, even if @samp{--unibyte} is
 specified; see @ref{Enabling Multibyte}.)  Setting the environment
-variable @env{EMACS_UNIBYTE} has the same effect.
+variable @env{EMACS_UNIBYTE} has the same effect
+(@pxref{General Variables}).
 
 @item --multibyte
 @opindex --multibyte
@@ -320,7 +324,7 @@
 to be a C program.
 
 @example
-emacs -batch foo.c -l hack-c -f save-buffer >& log
+emacs --batch foo.c -l hack-c -f save-buffer >& log
 @end example
 
 @noindent
--- a/man/custom.texi	Sun Feb 13 00:40:20 2005 +0000
+++ b/man/custom.texi	Sun Feb 13 07:19:08 2005 +0000
@@ -83,7 +83,7 @@
   These minor-mode variables provide a good way for Lisp programs to turn
 minor modes on and off; they are also useful in a file's local variables
 list.  But please think twice before setting minor modes with a local
-variables list, because most minor modes are matter of user
+variables list, because most minor modes are a matter of user
 preference---other users editing the same file might not want the same
 minor modes you prefer.
 
@@ -198,8 +198,7 @@
 the active fields and other features.
 
 @menu
-* Groups: Customization Groups.
-                             How options are classified in a structure.
+* Groups: Customization Groups.   How options are classified in a structure.
 * Changing a Variable::      How to edit a value and set an option.
 * Saving Customizations::    Details of saving customizations.
 * Face Customization::       How to edit the attributes of a face.
@@ -507,9 +506,12 @@
       ((and (= emacs-major-version 21) (< emacs-minor-version 4))
        ;; @r{Emacs 21 customization, before version 21.4.}
        (setq custom-file "~/.custom-21.el"))
-      (t
+      ((< emacs-major-version 22)
        ;; @r{Emacs version 21.4 or later.}
-       (setq custom-file "~/.custom-21.4.el")))
+       (setq custom-file "~/.custom-21.4.el"))
+      (t
+       ;; @r{Emacs version 22.1 or later.}
+       (setq custom-file "~/.custom-22.el")))
 
 (load custom-file)
 @end example
@@ -687,8 +689,9 @@
 buffer is (if it is not a face) in fact a Lisp variable.  Emacs does
 not (usually) change the values of these variables; instead, you set
 the values, and thereby alter and control the behavior of certain
-Emacs commands.  Use of the customization buffer is explained above;
-here we describe other aspects of Emacs variables.
+Emacs commands.  Use of the customization buffer is explained above
+(@pxref{Easy Customization}); here we describe other aspects of Emacs
+variables.
 
 @menu
 * Examining::	        Examining or setting one variable's value.
@@ -761,7 +764,9 @@
 Interaction}.
 
   Setting variables, like all means of customizing Emacs except where
-otherwise stated, affects only the current Emacs session.
+otherwise stated, affects only the current Emacs session.  The only
+way to alter the variable in future sessions is to put something in
+the @file{~/.emacs} file to set it those sessions (@pxref{Init File}).
 
 @node Hooks
 @subsection Hooks
@@ -1179,7 +1184,7 @@
 Function keys send input events just as character keys do, and keymaps
 can have bindings for them.
 
-  On many terminals, typing a function key actually sends the computer a
+  On text terminals, typing a function key actually sends the computer a
 sequence of characters; the precise details of the sequence depends on
 which function key and on the model of terminal you are using.  (Often
 the sequence starts with @kbd{@key{ESC} [}.)  If Emacs understands your
@@ -1464,16 +1469,17 @@
 @end example
 
 @noindent
-This example uses a string constant containing one character, @kbd{C-z}.
-The single-quote before the command name, @code{shell}, marks it as a
+This example uses a string constant containing one character,
+@kbd{C-z}.  (@samp{\C-} is string syntax for a control character.)  The
+single-quote before the command name, @code{shell}, marks it as a
 constant symbol rather than a variable.  If you omit the quote, Emacs
 would try to evaluate @code{shell} immediately as a variable.  This
 probably causes an error; it certainly isn't what you want.
 
-  Here is another example that binds a key sequence two characters long:
+  Here is another example that binds the key sequence @kbd{C-x M-l}:
 
 @example
-(global-set-key "\C-xl" 'make-symbolic-link)
+(global-set-key "\C-x\M-l" 'make-symbolic-link)
 @end example
 
   To put @key{TAB}, @key{RET}, @key{ESC}, or @key{DEL} in the
@@ -1521,8 +1527,7 @@
 @end example
 
   You can use a vector for the simple cases too.  Here's how to
-rewrite the first three examples above, using vectors to bind
-@kbd{C-z}, @kbd{C-x l}, and @kbd{C-x @key{TAB}}:
+rewrite the first six examples above to use vectors:
 
 @example
 (global-set-key [?\C-z] 'shell)
@@ -1535,7 +1540,7 @@
 
 @noindent
 As you see, you represent a multi-character key sequence with a vector
-by listing each of the characters within the square brackets that
+by listing all of the characters in order within the square brackets that
 delimit the vector.
 
   Language and coding systems can cause problems with key bindings
@@ -1584,10 +1589,9 @@
 key.
 
   A key sequence which contains function key symbols (or anything but
-@acronym{ASCII} characters) must be a vector rather than a string.  The vector
-syntax uses spaces between the elements, and square brackets around the
-whole vector.  Thus, to bind function key @samp{f1} to the command
-@code{rmail}, write the following:
+@acronym{ASCII} characters) must be a vector rather than a string.
+Thus, to bind function key @samp{f1} to the command @code{rmail},
+write the following:
 
 @example
 (global-set-key [f1] 'rmail)
@@ -1635,18 +1639,21 @@
 @subsection Named @acronym{ASCII} Control Characters
 
   @key{TAB}, @key{RET}, @key{BS}, @key{LFD}, @key{ESC} and @key{DEL}
-started out as names for certain @acronym{ASCII} control characters, used so often
-that they have special keys of their own.  Later, users found it
+started out as names for certain @acronym{ASCII} control characters,
+used so often that they have special keys of their own.  For instance,
+@key{TAB} was another name for @kbd{C-i}.  Later, users found it
 convenient to distinguish in Emacs between these keys and the ``same''
-control characters typed with the @key{CTRL} key.
+control characters typed with the @key{CTRL} key.  Therefore, on most
+modern terminals, they are no longer the same, and @key{TAB} is
+distinguishable from @kbd{C-i}.
 
-  Emacs distinguishes these two kinds of input, when the keyboard
-reports these keys to Emacs.  It treats the ``special'' keys as function
-keys named @code{tab}, @code{return}, @code{backspace}, @code{linefeed},
-@code{escape}, and @code{delete}.  These function keys translate
-automatically into the corresponding @acronym{ASCII} characters @emph{if} they
-have no bindings of their own.  As a result, neither users nor Lisp
-programs need to pay attention to the distinction unless they care to.
+  Emacs can distinguish these two kinds of input if the keyboard does.
+It treats the ``special'' keys as function keys named @code{tab},
+@code{return}, @code{backspace}, @code{linefeed}, @code{escape}, and
+@code{delete}.  These function keys translate automatically into the
+corresponding @acronym{ASCII} characters @emph{if} they have no
+bindings of their own.  As a result, neither users nor Lisp programs
+need to pay attention to the distinction unless they care to.
 
   If you do not want to distinguish between (for example) @key{TAB} and
 @kbd{C-i}, make just one binding, for the @acronym{ASCII} character @key{TAB}
@@ -1950,12 +1957,14 @@
 @cindex rebinding keys, permanently
 @cindex startup (init file)
 
-  When Emacs is started, it normally loads a Lisp program from the file
-@file{.emacs} or @file{.emacs.el} in your home directory.  We call this
-file your @dfn{init file} because it specifies how to initialize Emacs
-for you.  You can use the command line switch @samp{-q} to prevent
-loading your init file, and @samp{-u} (or @samp{--user}) to specify a
-different user's init file (@pxref{Initial Options}).
+  When Emacs is started, it normally loads a Lisp program from the
+file @file{.emacs} or @file{.emacs.el} in your home directory.  (You
+can also put it in a subdirectory @file{~/.emacs.d} and Emacs will
+still find it.)  We call this file your @dfn{init file} because it
+specifies how to initialize Emacs for you.  You can use the command
+line switch @samp{-q} to prevent loading your init file, and @samp{-u}
+(or @samp{--user}) to specify a different user's init file
+(@pxref{Initial Options}).
 
 @cindex @file{default.el}, the default init file
   There can also be a @dfn{default init file}, which is the library
@@ -2223,7 +2232,8 @@
 @code{nil}.
 
 @item
-Rebind the key @kbd{C-x l} to run the function @code{make-symbolic-link}.
+Rebind the key @kbd{C-x l} to run the function @code{make-symbolic-link}
+(@pxref{Init Rebinding}).
 
 @example
 (global-set-key "\C-xl" 'make-symbolic-link)
@@ -2326,11 +2336,14 @@
 @subsection How Emacs Finds Your Init File
 
   Normally Emacs uses the environment variable @env{HOME} to find
-@file{.emacs}; that's what @samp{~} means in a file name.  But if you
-run Emacs from a shell started by @code{su}, Emacs tries to find your
-own @file{.emacs}, not that of the user you are currently pretending
-to be.  The idea is that you should get your own editor customizations
-even if you are running as the super user.
+@file{.emacs}; that's what @samp{~} means in a file name.  If @file{.emacs}
+is not found directly inside @file{~/}, Emacs looks for it in
+@file{~/.emacs.d/}.
+
+  However, if you run Emacs from a shell started by @code{su}, Emacs
+tries to find your own @file{.emacs}, not that of the user you are
+currently pretending to be.  The idea is that you should get your own
+editor customizations even if you are running as the super user.
 
   More precisely, Emacs first determines which user's init file to use.
 It gets the user name from the environment variables @env{LOGNAME} and
--- a/man/emacs-xtra.texi	Sun Feb 13 00:40:20 2005 +0000
+++ b/man/emacs-xtra.texi	Sun Feb 13 07:19:08 2005 +0000
@@ -274,7 +274,7 @@
 Dired buffers, using @kbd{C-u i}.  You can change the @code{ls}
 switches of an already inserted subdirectory using @kbd{C-u l}.
 
-In Emacs versions 21.4 and later, Dired remembers the switches, so
+In Emacs versions 22.1 and later, Dired remembers the switches, so
 that reverting the buffer will not change them back to the main
 directory's switches.  Deleting a subdirectory forgets about its
 switches.
--- a/man/emacs.texi	Sun Feb 13 00:40:20 2005 +0000
+++ b/man/emacs.texi	Sun Feb 13 07:19:08 2005 +0000
@@ -5,7 +5,7 @@
 
 @c The edition number appears in several places in this file
 @set EDITION   Fourteenth
-@set EMACSVER  21.3.50
+@set EMACSVER  22.0.50
 
 @copying
 This is the @value{EDITION} edition of the @cite{GNU Emacs Manual},
--- a/man/entering.texi	Sun Feb 13 00:40:20 2005 +0000
+++ b/man/entering.texi	Sun Feb 13 07:19:08 2005 +0000
@@ -40,11 +40,11 @@
 command-line argument to say which file to edit.
 
   But starting a new Emacs each time you want to edit a different file
-does not make sense.  For one thing, this would be annoyingly slow.
-For another, this would fail to take advantage of Emacs's ability to
-visit more than one file in a single editing session.  And it would
-lose the other accumulated context, such as the kill ring, registers,
-undo history, and mark ring.
+does not make sense.  This would fail to take advantage of Emacs's
+ability to visit more than one file in a single editing session, and
+it would lose the other accumulated context, such as the kill ring,
+registers, undo history, and mark ring, that are useful for operating
+on multiple files.
 
   The recommended way to use GNU Emacs is to start it only once, just
 after you log in, and do all your editing in the same Emacs session.
@@ -71,13 +71,19 @@
 @cindex leaving Emacs
 @cindex quitting Emacs
 
-  There are two commands for exiting Emacs because there are two kinds
-of exiting: @dfn{suspending} Emacs and @dfn{killing} Emacs.
+  There are two commands for exiting Emacs because there are three
+kinds of exiting: @dfn{suspending} Emacs, @dfn{Iconifying} Emacs, and
+@dfn{killing} Emacs.
 
   @dfn{Suspending} means stopping Emacs temporarily and returning
 control to its parent process (usually a shell), allowing you to resume
 editing later in the same Emacs job, with the same buffers, same kill
-ring, same undo history, and so on.  This is the usual way to exit.
+ring, same undo history, and so on.  This is the usual way to exit Emacs
+when running on a text terminal.
+
+  @dfn{Iconifying} means replacing the Emacs frame with a small box
+somewhere on the screen.  This is the usual way to exit Emacs when you're
+using a graphics terminal.
 
   @dfn{Killing} Emacs means destroying the Emacs job.  You can run Emacs
 again later, but you will get a fresh Emacs; there is no way to resume
@@ -93,31 +99,33 @@
 
 @kindex C-z
 @findex suspend-emacs
-  To suspend Emacs, type @kbd{C-z} (@code{suspend-emacs}).  This takes
-you back to the shell from which you invoked Emacs.  You can resume
-Emacs with the shell command @command{%emacs} in most common shells.
+  To suspend or iconify Emacs, type @kbd{C-z} (@code{suspend-emacs}).
+On text terminals, this suspends Emacs.  On graphics terminals,
+it iconifies the Emacs frame.
 
-  On systems that do not support suspending programs, @kbd{C-z} starts
-an inferior shell that communicates directly with the terminal.
-Emacs waits until you exit the subshell.  (The way to do that is
-probably with @kbd{C-d} or @command{exit}, but it depends on which shell
-you use.)  The only way on these systems to get back to the shell from
-which Emacs was run (to log out, for example) is to kill Emacs.
+  Suspending Emacs takes you back to the shell from which you invoked
+Emacs.  You can resume Emacs with the shell command @command{%emacs}
+in most common shells.  On systems that don't support suspending
+programs, @kbd{C-z} starts an inferior shell that communicates
+directly with the terminal.  Emacs waits until you exit the subshell.
+(The way to do that is probably with @kbd{C-d} or @command{exit}, but
+it depends on which shell you use.)  The only way on these systems to
+get back to the shell from which Emacs was run (to log out, for
+example) is to kill Emacs.
 
-  Suspending also fails if you run Emacs under a shell that doesn't
-support suspending programs, even if the system itself does support it.
-In such a case, you can set the variable @code{cannot-suspend} to a
-non-@code{nil} value to force @kbd{C-z} to start an inferior shell.
+  Suspending can fail if you run Emacs under a shell that doesn't
+support suspending programs, even if the system itself does support
+it.  In such a case, you can set the variable @code{cannot-suspend} to
+a non-@code{nil} value to force @kbd{C-z} to start an inferior shell.
 (One might also describe Emacs's parent shell as ``inferior'' for
-failing to support job control properly, but that is a matter of taste.)
+failing to support job control properly, but that is a matter of
+taste.)
 
-  When Emacs communicates directly with an X server and creates its own
-dedicated X windows, @kbd{C-z} has a different meaning.  Suspending an
-application that uses its own X windows is not meaningful or useful.
-Instead, @kbd{C-z} runs the command @code{iconify-or-deiconify-frame},
-which temporarily iconifies (or ``minimizes'') the selected Emacs
-frame (@pxref{Frames}).  Then you can use the window manager to get
-back to a shell window.
+  On graphics terminals, @kbd{C-z} has a different meaning: it runs
+the command @code{iconify-or-deiconify-frame}, which temporarily
+iconifies (or ``minimizes'') the selected Emacs frame
+(@pxref{Frames}).  Then you can use the window manager to get back to
+a shell window.
 
 @kindex C-x C-c
 @findex save-buffers-kill-emacs
--- a/man/faq.texi	Sun Feb 13 00:40:20 2005 +0000
+++ b/man/faq.texi	Sun Feb 13 07:19:08 2005 +0000
@@ -424,7 +424,7 @@
 
 The archive is at @uref{ftp://ftp-mailing-list-archives.gnu.org}.
 
-The archive can be browsed over the web at 
+The archive can be browsed over the web at
 @uref{http://mail.gnu.org/archive/html/, the GNU mail archive}.
 
 Web-based Usenet search services, such as
@@ -2633,7 +2633,7 @@
 default, a backslash (@samp{\}) will appear in the mode line.
 
 If you are running a version of Emacs before 20.1, get @code{crypt++}
-(@pxref{Packages that do not come with Emacs}).  Among other things, 
+(@pxref{Packages that do not come with Emacs}).  Among other things,
 @code{crypt++} transparently modifies MS-DOS files as they are loaded
 and saved, allowing you to ignore the different conventions that Unix
 and MS-DOS have for delineating the end of a line.
@@ -3300,10 +3300,10 @@
 @uref{ftp://ftp.gnu.org/pub/gnu/emacs/emacs-@value{VER}.tar.gz}
 
 The above will obviously change as new versions of Emacs come out.  For
-instance, when Emacs 21.42 is released, it will most probably be
+instance, when Emacs 22.42 is released, it will most probably be
 available as
 
-@uref{ftp://ftp.gnu.org/pub/gnu/emacs/emacs-21.42.tar.gz}
+@uref{ftp://ftp.gnu.org/pub/gnu/emacs/emacs-22.42.tar.gz}
 
 Again, you should use one of the GNU mirror sites (see @ref{Current GNU
 distributions}, and adjust the URL accordingly) so as to reduce load on
@@ -3543,7 +3543,7 @@
 List (ELL)}, maintained by @email{stephen@@anc.ed.ac.uk, Stephen Eglen},
 aims to provide one compact list with links to all of the current Emacs
 Lisp files on the internet.  The ELL can be browsed over the web, or
-from Emacs with @uref{http://www.anc.ed.ac.uk/~stephen/emacs/ell.el, 
+from Emacs with @uref{http://www.anc.ed.ac.uk/~stephen/emacs/ell.el,
 the @file{ell} package}.
 
 Many authors post their packages to the @uref{news:gnu.emacs.sources,
@@ -3805,7 +3805,7 @@
 
 Most of these modes are now available in standard Emacs distribution.
 To get additional modes, see @ref{Finding a package with particular
-functionality}.  
+functionality}.
 
 Barry Warsaw's @code{cc-mode} now works for C, C@t{++}, Objective-C, and
 Java code.  It is distributed with Emacs, but has
@@ -3932,7 +3932,7 @@
 @email{daveg@@csvax.cs.caltech.edu, Dave Gillespie}
 
 @item Latest version
-2.02g (part of Emacs since version 21.4)
+2.02g (part of Emacs since version 22.1)
 
 @item Distribution
 No separate distribution outside of Emacs.  Older versions
--- a/man/killing.texi	Sun Feb 13 00:40:20 2005 +0000
+++ b/man/killing.texi	Sun Feb 13 07:19:08 2005 +0000
@@ -222,10 +222,10 @@
 Kill through the next occurrence of @var{char} (@code{zap-to-char}).
 @end table
 
-  A kill command which is very general is @kbd{C-w}
-(@code{kill-region}), which kills everything between point and the
-mark.  With this command, you can kill any contiguous sequence of
-characters, if you first set the region around them.
+  The most general kill command is @kbd{C-w} (@code{kill-region}),
+which kills everything between point and the mark.  With this command,
+you can kill any contiguous sequence of characters, if you first set
+the region around them.
 
 @kindex M-z
 @findex zap-to-char
@@ -240,13 +240,6 @@
 (@pxref{Expressions}); and sentences, with @kbd{C-x @key{DEL}} and
 @kbd{M-k} (@pxref{Sentences}).@refill
 
-  You can use kill commands in read-only buffers.  They don't actually
-change the buffer, and they beep to warn you of that, but they do copy
-the text you tried to kill into the kill ring, so you can yank it into
-other buffers.  Most of the kill commands move point across the text
-they copy in this way, so that successive kill commands build up a
-single kill ring entry as usual.
-
 @node Graphical Kill
 @subsection Killing on Graphical Terminals
 
@@ -289,7 +282,7 @@
 (@code{yank-pop}).
 @item M-w
 Save region as last killed text without actually killing it
-(@code{kill-ring-save}).
+(@code{kill-ring-save}).  Some systems call this ``copying''.
 @item C-M-w
 Append next kill to last batch of killed text (@code{append-next-kill}).
 @end table
@@ -466,7 +459,7 @@
 
 @cindex accumulating scattered text
   Usually we copy or move text by killing it and yanking it, but there
-are other methods convenient for copying one block of text in many
+are other convenient methods for copying one block of text in many
 places, or for copying many scattered blocks of text into one place.  To
 copy one block to many places, store it in a register
 (@pxref{Registers}).  Here we describe the commands to accumulate
--- a/man/regs.texi	Sun Feb 13 00:40:20 2005 +0000
+++ b/man/regs.texi	Sun Feb 13 07:19:08 2005 +0000
@@ -12,13 +12,12 @@
 register once, or many times.
 
 @findex view-register
-  Each register has a name, which consists of a single character.
-A register can
-store a piece of text, a rectangle, a position, a window configuration,
-or a file name, but only one thing at any given time.  Whatever you
-store in a register remains there until you store something else in that
-register.  To see what a register @var{r} contains, use @kbd{M-x
-view-register}.
+  Each register has a name, which consists of a single character.  A
+register can store a number, a piece of text, a rectangle, a position,
+a window configuration, or a file name, but only one thing at any
+given time.  Whatever you store in a register remains there until you
+store something else in that register.  To see what a register @var{r}
+contains, use @kbd{M-x view-register}.
 
 @table @kbd
 @item M-x view-register @key{RET} @var{r}
--- a/man/texinfo.tex	Sun Feb 13 00:40:20 2005 +0000
+++ b/man/texinfo.tex	Sun Feb 13 07:19:08 2005 +0000
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2003-10-06.16}
+\def\texinfoversion{2005-02-08.10}
 %
 % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
 %               2000, 01, 02 Free Software Foundation, Inc.
@@ -2845,6 +2845,7 @@
 \def\r##1{\realbackslash r {##1}}%
 %
 \def\TeX{\realbackslash TeX}%
+\def\LaTeX{\realbackslash LaTeX}%
 \def\acronym##1{\realbackslash acronym {##1}}%
 \def\cite##1{\realbackslash cite {##1}}%
 \def\code##1{\realbackslash code {##1}}%
--- a/man/tramp.texi	Sun Feb 13 00:40:20 2005 +0000
+++ b/man/tramp.texi	Sun Feb 13 07:19:08 2005 +0000
@@ -381,7 +381,7 @@
 may be downloaded from
 @uref{http://savannah.nongnu.org/download/tramp/}. This
 release includes the full documentation and code for @value{tramp},
-suitable for installation.  But Emacs (21.4 or later) includes
+suitable for installation.  But Emacs (22.1 or later) includes
 @value{tramp} already, and there is a @value{tramp} package for XEmacs, as well.
 So maybe it is easier to just use those.  But if you want the bleeding
 edge, read on@dots{...}
--- a/src/ChangeLog	Sun Feb 13 00:40:20 2005 +0000
+++ b/src/ChangeLog	Sun Feb 13 07:19:08 2005 +0000
@@ -1,7 +1,70 @@
+2005-02-12  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* keyboard.c: If HAVE_FCNTL_H include fcntl.h.
+
+2005-02-12  Kim F. Storm  <storm@cua.dk>
+
+	* xdisp.c (expose_window): Don't fix overlaps for mode lines.
+
+2005-02-10  Kim F. Storm  <storm@cua.dk>
+
+	* xdisp.c (try_window_id): Set first_unchanged_at_end_row to NULL
+	if it moves outside window or it doesn't display text.
+
+2005-02-09  Kim F. Storm  <storm@cua.dk>
+
+	* undo.c (Fprimitive_undo): Check that undo function does not
+	switch buffer.
+
+2005-02-08  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
+
+	* xselect.c (selection_data_to_lisp_data): For the special case
+	type == XA_ATOM, data contains array of int, not array of Atom.
+	(x_property_data_to_lisp, selection_data_to_lisp_data): Comment
+	update: data must be array of int for format == 32.
+
+2005-02-08  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* undo.c (Fprimitive_undo): Check veracity of delta,start,end.
+
+2005-02-07  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
+
+	* xfns.c (Fx_change_window_property): Use long array when format is 32.
+	(Fx_window_property): If format is 32 and long is bigger than 32 bits,
+	convert long array returned from XGetWindowProperty to an int array.
+	(x_set_tool_bar_lines): Check that width and height is greater than
+	zero before clearing area.
+
+	* xselect.c (x_reply_selection_request): Pass long array to
+	XChangeProperty so that 64 bit longs are handeled correctly.
+	(x_get_window_property): If format is 32 and long is bigger than 32
+	bits convert data from XGetWindowProperty from long array to int array.
+	(lisp_data_to_selection_data): When the input is a vector and the
+	format is 32, allocate a long array even if long is bigger than 32 bits.
+	(x_fill_property_data): Use char, short and long as the man page
+	for XChangeProperty specifies.  This way the data returned is OK for
+	both 32 and 64 bit machines.
+	(x_handle_dnd_message): Calculate size correctly even for 64 bit
+	machines.
+	(Fx_send_client_event): Undo change from 2005-02-05,
+	x_fill_property_data now handles that case.
+
+	* xfns.c (Fx_backspace_delete_keys_p): Add comment about the
+	reason for the approach in the code.
+
+2005-02-07  Kim F. Storm  <storm@cua.dk>
+
+	* undo.c (Fprimitive_undo): Record max one dummmy apply element.
+
+2005-02-06  Richard M. Stallman  <rms@gnu.org>
+
+	* eval.c (Frun_hook_with_args)
+	(Frun_hook_with_args_until_success)
+	(Frun_hook_with_args_until_failure): Doc fixes.
+
 2005-02-05  Andreas Schwab  <schwab@suse.de>
 
-	* sysdep.c (sys_subshell): Properly terminate execlp argument
-	list.
+	* sysdep.c (sys_subshell): Properly terminate execlp argument list.
 
 2005-02-05  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
 
@@ -41,8 +104,7 @@
 
 	* macfns.c (x_create_tip_frame): Likewise.
 
-	* macterm.c (mac_draw_string_common, x_make_frame_visible):
-	Likewise.
+	* macterm.c (mac_draw_string_common, x_make_frame_visible): Likewise.
 
 2005-02-03  Richard M. Stallman  <rms@gnu.org>
 
@@ -9915,7 +9977,7 @@
 	* search.c (Fmatch_data): Doc fix.  Explicitly state that
 	match-data is undefined if last search failed.
 
-	* keymap.c (Fcommand_remapping): Renamed from Fremap_command.
+	* keymap.c (Fcommand_remapping): Rename from Fremap_command.
 	All uses changed.
 
 2003-02-12  Juanma Barranquero  <lektu@terra.es>
@@ -10622,7 +10684,7 @@
 	selected frame.
 
 	* keymap.c (apropos_predicate, apropos_accumulate): Make them static.
-	(syms_of_keymap): staticpro them.
+	(syms_of_keymap): Staticpro them.
 	(Fapropos_internal): Initialize them and clear them out.
 	Don't GCPRO them.
 
@@ -12724,9 +12786,9 @@
 	* fns.c (concat): Likewise.
 	* lread.c (read_vector): Likewise.
 
-	* lisp.h (SMBP): Deleted.  All uses changed to STRING_MULTIBYTE.
+	* lisp.h (SMBP): Delete.  All uses changed to STRING_MULTIBYTE.
 	(STRING_SET_UNIBYTE): New macro.
-	(SET_STRING_BYTES): Deleted.  Callers (all of which supplied a
+	(SET_STRING_BYTES): Delete.  Callers (all of which supplied a
 	length of -1) changed to use STRING_SET_UNIBYTE.
 	* abbrev.c, alloc.c, buffer.c, bytecode.c, callint.c, callproc.c,
 	casefiddle.c, category.c, ccl.c, charset.c, charset.h, coding.c,
@@ -12769,7 +12831,7 @@
 2002-07-11  Richard M. Stallman  <rms@gnu.org>
 
 	* alloc.c (Vmemory_full): New variable.
-	(Vmemory_signal_data): Renamed from memory_signal_data.
+	(Vmemory_signal_data): Rename from memory_signal_data.
 	Uses changed.
 	(syms_of_alloc): Defvar them.
 	(memory_full, buffer_memory_full): Set Vmemory_full.
@@ -12787,7 +12849,7 @@
 	(reseat_at_next_visible_line_start, next_element_from_buffer):
 	Use `double', not `float', when calling indented_beyond_p.
 
-	* s/hpux11.h (BROKEN_SA_RESTART): Defined.
+	* s/hpux11.h (BROKEN_SA_RESTART): Define.
 
 	* sysdep.c (sys_signal): Test BROKEN_SA_RESTART.
 
@@ -13545,7 +13607,7 @@
 
 2002-05-11  Kim F. Storm  <storm@cua.dk>
 
-	* keymap.c (current_minor_maps): Fixed resizing of cmm_maps;
+	* keymap.c (current_minor_maps): Fix resizing of cmm_maps;
 	only update cmm_size if realloc actually succeeds.
 	Testing with initial size of 2 elements revealed that using
 	realloc on GNU/Linux would cause a random trap in xmalloc
@@ -14784,7 +14846,7 @@
 
 2002-02-24  Kim F. Storm  <storm@cua.dk>
 
-	* keymap.c (Flookup_key): Fixed problem in 2001-12-28 patch:
+	* keymap.c (Flookup_key): Fix problem in 2001-12-28 patch:
 	The validation of the event type was too strict as it didn't
 	allow string events; buffer names are used in bindings for
 	menu-bar-select-buffer (see `menu-bar-update-buffers').
@@ -14797,7 +14859,7 @@
 	prefix in the keymaps, i.e. [remap COMMAND].
 
 	* keymap.c (Qremap, remap_command_vector): New variables.
-	(is_command_symbol): Removed function.
+	(is_command_symbol): Remove function.
 	(Fdefine_key): No longer accept a symbol for KEY.
 	Added validation of [remap COMMAND] argument for KEY.
 	The DEF is no longer required to be a symbol when remapping a command.
@@ -15155,7 +15217,7 @@
 	Doc updated.  Callers changed.  Pass arg to where_is_internal.
 
 	* keymap.h (Fkey_binding, Fwhere_is_internal): Update prototype.
-	(is_command_symbol): Added prototype.
+	(is_command_symbol): Add prototype.
 
 	* keyboard.c (Vthis_original_command): New variable.
 	(syms_of_keyboard): DEFVAR_LISP it.
@@ -15572,7 +15634,7 @@
 
 2002-01-03  Kim F. Storm  <storm@cua.dk>
 
-	* keyboard.c (read_key_sequence): Fixed cast of submaps arg to bcopy.
+	* keyboard.c (read_key_sequence): Fix cast of submaps arg to bcopy.
 
 2002-01-02  Richard M. Stallman  <rms@gnu.org>
 
--- a/src/eval.c	Sun Feb 13 00:40:20 2005 +0000
+++ b/src/eval.c	Sun Feb 13 07:19:08 2005 +0000
@@ -2323,7 +2323,7 @@
 the given arguments and its return value is returned.  If it is a list
 of functions, those functions are called, in order,
 with the given arguments ARGS.
-It is best not to depend on the value return by `run-hook-with-args',
+It is best not to depend on the value returned by `run-hook-with-args',
 as that may change.
 
 Do not use `make-local-variable' to make a hook variable buffer-local.
@@ -2339,11 +2339,14 @@
 DEFUN ("run-hook-with-args-until-success", Frun_hook_with_args_until_success,
        Srun_hook_with_args_until_success, 1, MANY, 0,
        doc: /* Run HOOK with the specified arguments ARGS.
-HOOK should be a symbol, a hook variable.  Its value should
-be a list of functions.  We call those functions, one by one,
-passing arguments ARGS to each of them, until one of them
+HOOK should be a symbol, a hook variable.  If HOOK has a non-nil
+value, that value may be a function or a list of functions to be
+called to run the hook.  If the value is a function, it is called with
+the given arguments and its return value is returned.
+If it is a list of functions, those functions are called, in order,
+with the given arguments ARGS, until one of them
 returns a non-nil value.  Then we return that value.
-If all the functions return nil, we return nil.
+However, if they all return nil, we return nil.
 
 Do not use `make-local-variable' to make a hook variable buffer-local.
 Instead, use `add-hook' and specify t for the LOCAL argument.
@@ -2358,11 +2361,13 @@
 DEFUN ("run-hook-with-args-until-failure", Frun_hook_with_args_until_failure,
        Srun_hook_with_args_until_failure, 1, MANY, 0,
        doc: /* Run HOOK with the specified arguments ARGS.
-HOOK should be a symbol, a hook variable.  Its value should
-be a list of functions.  We call those functions, one by one,
-passing arguments ARGS to each of them, until one of them
-returns nil.  Then we return nil.
-If all the functions return non-nil, we return non-nil.
+HOOK should be a symbol, a hook variable.  If HOOK has a non-nil
+value, that value may be a function or a list of functions to be
+called to run the hook.  If the value is a function, it is called with
+the given arguments and its return value is returned.
+If it is a list of functions, those functions are called, in order,
+with the given arguments ARGS, until one of them returns nil.
+Then we return nil.  However, if they all return non-nil, we return non-nil.
 
 Do not use `make-local-variable' to make a hook variable buffer-local.
 Instead, use `add-hook' and specify t for the LOCAL argument.
--- a/src/keyboard.c	Sun Feb 13 00:40:20 2005 +0000
+++ b/src/keyboard.c	Sun Feb 13 07:19:08 2005 +0000
@@ -65,6 +65,10 @@
 #include <unistd.h>
 #endif
 
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+
 /* This is to get the definitions of the XK_ symbols.  */
 #ifdef HAVE_X_WINDOWS
 #include "xterm.h"
--- a/src/undo.c	Sun Feb 13 00:40:20 2005 +0000
+++ b/src/undo.c	Sun Feb 13 07:19:08 2005 +0000
@@ -1,5 +1,6 @@
 /* undo handling for GNU Emacs.
-   Copyright (C) 1990, 1993, 1994, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1993, 1994, 2000, 2002, 2004, 2005
+	Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -454,6 +455,8 @@
   Lisp_Object next;
   int count = SPECPDL_INDEX ();
   register int arg;
+  Lisp_Object oldlist;
+  int did_apply = 0;
 
 #if 0  /* This is a good feature, but would make undo-start
 	  unable to do what is expected.  */
@@ -470,6 +473,8 @@
   arg = XINT (n);
   next = Qnil;
   GCPRO2 (next, list);
+  /* I don't think we need to gcpro oldlist, as we use it only
+     to check for EQ.  ++kfs  */
 
   /* In a writable buffer, enable undoing read-only text that is so
      because of text properties.  */
@@ -479,6 +484,8 @@
   /* Don't let `intangible' properties interfere with undo.  */
   specbind (Qinhibit_point_motion_hooks, Qt);
 
+  oldlist = current_buffer->undo_list;
+
   while (arg > 0)
     {
       while (CONSP (list))
@@ -549,24 +556,38 @@
 		}
 	      else if (EQ (car, Qapply))
 		{
-		  Lisp_Object oldlist = current_buffer->undo_list;
-		  /* Element (apply FUNNAME . ARGS) means call FUNNAME to undo.  */
+		  /* Element (apply FUN . ARGS) means call FUN to undo.  */
+		  struct buffer *save_buffer = current_buffer;
+
 		  car = Fcar (cdr);
+		  cdr = Fcdr (cdr);
 		  if (INTEGERP (car))
 		    {
-		      /* Long format: (apply DELTA START END FUNNAME . ARGS).  */
-		      cdr = Fcdr (Fcdr (Fcdr (cdr)));
-		      car = Fcar (cdr);
-		    }
-		  cdr = Fcdr (cdr);
-		  apply1 (car, cdr);
+		      /* Long format: (apply DELTA START END FUN . ARGS).  */
+		      Lisp_Object delta = car;
+		      Lisp_Object start = Fcar (cdr);
+		      Lisp_Object end   = Fcar (Fcdr (cdr));
+		      Lisp_Object start_mark = Fcopy_marker (start, Qnil);
+		      Lisp_Object end_mark   = Fcopy_marker (end, Qt);
+
+		      cdr = Fcdr (Fcdr (cdr));
+		      apply1 (Fcar (cdr), Fcdr (cdr));
 
-		  /* Make sure this produces at least one undo entry,
-		     so the test in `undo' for continuing an undo series
-		     will work right.  */
-		  if (EQ (oldlist, current_buffer->undo_list))
-		    current_buffer->undo_list
-		      = Fcons (list3 (Qapply, Qcdr, Qnil), current_buffer->undo_list);
+		      /* Check that the function did what the entry said it
+			 would do.  */
+		      if (!EQ (start, Fmarker_position (start_mark))
+			  || (XINT (delta) + XINT (end)
+			      != marker_position (end_mark)))
+			error ("Changes to be undone by function different than announced");
+		      Fset_marker (start_mark, Qnil, Qnil);
+		      Fset_marker (end_mark, Qnil, Qnil);
+		    }
+		  else
+		    apply1 (car, cdr);
+
+		  if (save_buffer != current_buffer)
+		    error ("Undo function switched buffer");
+		  did_apply = 1;
 		}
 	      else if (STRINGP (car) && INTEGERP (cdr))
 		{
@@ -611,6 +632,15 @@
       arg--;
     }
 
+
+  /* Make sure an apply entry produces at least one undo entry,
+     so the test in `undo' for continuing an undo series
+     will work right.  */
+  if (did_apply
+      && EQ (oldlist, current_buffer->undo_list))
+    current_buffer->undo_list
+      = Fcons (list3 (Qapply, Qcdr, Qnil), current_buffer->undo_list);
+
   UNGCPRO;
   return unbind_to (count, list);
 }
--- a/src/xdisp.c	Sun Feb 13 00:40:20 2005 +0000
+++ b/src/xdisp.c	Sun Feb 13 07:19:08 2005 +0000
@@ -13927,7 +13927,12 @@
 			bottom_vpos, dy);
 
   if (first_unchanged_at_end_row)
-    first_unchanged_at_end_row += dvpos;
+    {
+      first_unchanged_at_end_row += dvpos;
+      if (first_unchanged_at_end_row->y >= it.last_visible_y
+	  || !MATRIX_ROW_DISPLAYS_TEXT_P (first_unchanged_at_end_row))
+	first_unchanged_at_end_row = NULL;
+    }
 
   /* If scrolling up, there may be some lines to display at the end of
      the window.  */
@@ -13984,7 +13989,6 @@
 
   /* Update window_end_pos and window_end_vpos.  */
   if (first_unchanged_at_end_row
-      && first_unchanged_at_end_row->y < it.last_visible_y
       && !last_text_row_at_end)
     {
       /* Window end line if one of the preserved rows from the current
@@ -22235,7 +22239,9 @@
 	      || (r.y >= y0 && r.y < y1)
 	      || (r.y + r.height > y0 && r.y + r.height < y1))
 	    {
-	      if (row->overlapping_p)
+	      /* A header line may be overlapping, but there is no need
+		 to fix overlapping areas for them.  KFS 2005-02-12 */
+	      if (row->overlapping_p && !row->mode_line_p)
 		{
 		  if (first_overlapping_row == NULL)
 		    first_overlapping_row = row;
--- a/src/xfns.c	Sun Feb 13 00:40:20 2005 +0000
+++ b/src/xfns.c	Sun Feb 13 07:19:08 2005 +0000
@@ -1399,10 +1399,14 @@
       int width = FRAME_PIXEL_WIDTH (f);
       int y = nlines * FRAME_LINE_HEIGHT (f);
 
-      BLOCK_INPUT;
-      x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-		    0, y, width, height, False);
-      UNBLOCK_INPUT;
+      /* height can be zero here. */
+      if (height > 0 && width > 0)
+	{
+          BLOCK_INPUT;
+          x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+                        0, y, width, height, False);
+          UNBLOCK_INPUT;
+        }
 
       if (WINDOWP (f->tool_bar_window))
 	clear_glyph_matrix (XWINDOW (f->tool_bar_window)->current_matrix);
@@ -4051,8 +4055,13 @@
         data = (unsigned char *) xmalloc (nelements);
       else if (element_format == 16)
         data = (unsigned char *) xmalloc (nelements*2);
-      else
-        data = (unsigned char *) xmalloc (nelements*4);
+      else /* format == 32 */
+        /* The man page for XChangeProperty:
+               "If the specified format is 32, the property data must be a
+                long array."
+           This applies even if long is more than 64 bits.  The X library
+           converts to 32 bits before sending to the X server.  */
+        data = (unsigned char *) xmalloc (nelements * sizeof(long));
 
       x_fill_property_data (FRAME_X_DISPLAY (f), value, data, element_format);
     }
@@ -4187,6 +4196,30 @@
 			       (unsigned char **) &tmp_data);
       if (rc == Success && tmp_data)
         {
+          /* The man page for XGetWindowProperty says:
+             "If the returned format is 32, the returned data is represented
+             as a long array and should be cast to that type to obtain the
+             elements."
+             This applies even if long is more than 32 bits, the X library
+             converts from 32 bit elements received from the X server to long
+             and passes the long array to us.  Thus, for that case bcopy can not
+             be used.  We convert to a 32 bit type here, because so much code
+             assume on that.
+
+             The bytes and offsets passed to XGetWindowProperty refers to the
+             property and those are indeed in 32 bit quantities if format is
+             32.  */
+
+          if (actual_format == 32 && actual_format < BITS_PER_LONG)
+            {
+              unsigned long i;
+              int  *idata = (int *) tmp_data;
+              long *ldata = (long *) tmp_data;
+
+              for (i = 0; i < actual_size; ++i)
+                idata[i]= (int) ldata[i];
+            }
+
           if (NILP (vector_ret_p))
             prop_value = make_string (tmp_data, size);
           else
@@ -5387,6 +5420,22 @@
       return Qnil;
     }
 
+  /* In this code we check that the keyboard has physical keys with names
+     that start with BKSP (Backspace) and DELE (Delete), and that they
+     generate keysym XK_BackSpace and XK_Delete respectively.
+     This function is used to test if normal-erase-is-backspace should be
+     turned on.
+     An alternative approach would be to just check if XK_BackSpace and
+     XK_Delete are mapped to any key.  But if any of those are mapped to
+     some non-intuitive key combination (Meta-Shift-Ctrl-whatever) and the
+     user doesn't know about it, it is better to return false here.
+     It is more obvious to the user what to do if she/he has two keys
+     clearly marked with names/symbols and one key does something not
+     expected (i.e. she/he then tries the other).
+     The cases where Backspace/Delete is mapped to some other key combination
+     are rare, and in those cases, normal-erase-is-backspace can be turned on
+     manually.  */
+
   have_keys = Qnil;
   kb = XkbGetMap (dpy, XkbAllMapComponentsMask, XkbUseCoreKbd);
   if (kb)
--- a/src/xselect.c	Sun Feb 13 00:40:20 2005 +0000
+++ b/src/xselect.c	Sun Feb 13 07:19:08 2005 +0000
@@ -173,12 +173,6 @@
 /* If the selection owner takes too long to reply to a selection request,
    we give up on it.  This is in milliseconds (0 = no timeout.)  */
 static EMACS_INT x_selection_timeout;
-
-/* Utility functions */
-
-static void lisp_data_to_selection_data ();
-static Lisp_Object selection_data_to_lisp_data ();
-static Lisp_Object x_get_window_property_as_lisp_data ();
 
 
 
@@ -769,9 +763,17 @@
 
       TRACE1 ("Set %s to number of bytes to send",
 	      XGetAtomName (display, reply.property));
-      XChangeProperty (display, window, reply.property, dpyinfo->Xatom_INCR,
-		       32, PropModeReplace,
-		       (unsigned char *) &bytes_remaining, 1);
+      {
+        /* XChangeProperty expects an array of long even if long is more than
+           32 bits.  */
+        long value[1];
+
+        value[0] = bytes_remaining;
+        XChangeProperty (display, window, reply.property, dpyinfo->Xatom_INCR,
+                         32, PropModeReplace,
+                         (unsigned char *) value, 1);
+      }
+
       XSelectInput (display, window, PropertyChangeMask);
 
       /* Tell 'em the INCR data is there...  */
@@ -796,9 +798,9 @@
       TRACE0 ("Got ACK");
       while (bytes_remaining)
 	{
-	  int i = ((bytes_remaining < max_bytes)
-		   ? bytes_remaining
-		   : max_bytes);
+          int i = ((bytes_remaining < max_bytes)
+                   ? bytes_remaining
+                   : max_bytes);
 
 	  BLOCK_INPUT;
 
@@ -1523,9 +1525,38 @@
 	 reading it.  Deal with that, I guess.... */
       if (result != Success)
 	break;
-      *actual_size_ret *= *actual_format_ret / 8;
-      bcopy (tmp_data, (*data_ret) + offset, *actual_size_ret);
-      offset += *actual_size_ret;
+
+      /* The man page for XGetWindowProperty says:
+         "If the returned format is 32, the returned data is represented
+          as a long array and should be cast to that type to obtain the
+          elements."
+         This applies even if long is more than 32 bits, the X library
+         converts from 32 bit elements received from the X server to long
+         and passes the long array to us.  Thus, for that case bcopy can not
+         be used.  We convert to a 32 bit type here, because so much code
+         assume on that.
+
+         The bytes and offsets passed to XGetWindowProperty refers to the
+         property and those are indeed in 32 bit quantities if format is 32.  */
+
+      if (*actual_format_ret == 32 && *actual_format_ret < BITS_PER_LONG)
+        {
+          unsigned long i;
+          int  *idata = (int *) ((*data_ret) + offset);
+          long *ldata = (long *) tmp_data;
+
+          for (i = 0; i < *actual_size_ret; ++i)
+            {
+              idata[i]= (int) ldata[i];
+              offset += 4;
+            }
+        }
+      else
+        {
+          *actual_size_ret *= *actual_format_ret / 8;
+          bcopy (tmp_data, (*data_ret) + offset, *actual_size_ret);
+          offset += *actual_size_ret;
+        }
 
       /* This was allocated by Xlib, so use XFree.  */
       XFree ((char *) tmp_data);
@@ -1738,7 +1769,11 @@
 
    When converting an object to C, it may be of the form (SYMBOL . <data>)
    where SYMBOL is what we should claim that the type is.  Format and
-   representation are as above.  */
+   representation are as above.
+
+   Important: When format is 32, data should contain an array of int,
+   not an array of long as the X library returns.  This makes a difference
+   when sizeof(long) != sizeof(int).  */
 
 
 
@@ -1780,15 +1815,21 @@
   else if (type == XA_ATOM)
     {
       int i;
-      if (size == sizeof (Atom))
-	return x_atom_to_symbol (display, *((Atom *) data));
+      /* On a 64 bit machine sizeof(Atom) == sizeof(long) == 8.
+         But the callers of these function has made sure the data for
+         format == 32 is an array of int.  Thus, use int instead
+         of Atom.  */
+      int *idata = (int *) data;
+
+      if (size == sizeof (int))
+	return x_atom_to_symbol (display, (Atom) idata[0]);
       else
 	{
-	  Lisp_Object v = Fmake_vector (make_number (size / sizeof (Atom)),
+	  Lisp_Object v = Fmake_vector (make_number (size / sizeof (int)),
 					make_number (0));
-	  for (i = 0; i < size / sizeof (Atom); i++)
+	  for (i = 0; i < size / sizeof (int); i++)
 	    Faset (v, make_number (i),
-		   x_atom_to_symbol (display, ((Atom *) data) [i]));
+                   x_atom_to_symbol (display, (Atom) idata[i]));
 	  return v;
 	}
     }
@@ -1970,6 +2011,7 @@
       else
 	/* This vector is an INTEGER set, or something like it */
 	{
+          int data_size = 2;
 	  *size_ret = XVECTOR (obj)->size;
 	  if (NILP (type)) type = QINTEGER;
 	  *format_ret = 16;
@@ -1982,7 +2024,11 @@
 	("elements of selection vector must be integers or conses of integers"),
 			      Fcons (obj, Qnil)));
 
-	  *data_ret = (unsigned char *) xmalloc (*size_ret * (*format_ret/8));
+          /* Use sizeof(long) even if it is more than 32 bits.  See comment
+             in x_get_window_property and x_fill_property_data.  */
+          
+          if (*format_ret == 32) data_size = sizeof(long);
+	  *data_ret = (unsigned char *) xmalloc (*size_ret * data_size);
 	  for (i = 0; i < *size_ret; i++)
 	    if (*format_ret == 32)
 	      (*((unsigned long **) data_ret)) [i]
@@ -2469,8 +2515,10 @@
    DATA is a Lisp list of values to be converted.
    RET is the C array that contains the converted values.  It is assumed
    it is big enough to hold all values.
-   FORMAT is 8, 16 or 32 and gives the size in bits for each C value to
-   be stored in RET.  */
+   FORMAT is 8, 16 or 32 and denotes char/short/long for each C value to
+   be stored in RET.  Note that long is used for 32 even if long is more
+   than 32 bits (see man pages for XChangeProperty, XGetWindowProperty and
+   XClientMessageEvent).  */
 
 void
 x_fill_property_data (dpy, data, ret, format)
@@ -2479,10 +2527,10 @@
      void *ret;
      int format;
 {
-  CARD32 val;
-  CARD32 *d32 = (CARD32 *) ret;
-  CARD16 *d16 = (CARD16 *) ret;
-  CARD8  *d08 = (CARD8  *) ret;
+  long val;
+  long  *d32 = (long  *) ret;
+  short *d16 = (short *) ret;
+  char  *d08 = (char  *) ret;
   Lisp_Object iter;
 
   for (iter = data; CONSP (iter); iter = XCDR (iter))
@@ -2490,24 +2538,24 @@
       Lisp_Object o = XCAR (iter);
 
       if (INTEGERP (o))
-        val = (CARD32) XFASTINT (o);
+        val = (long) XFASTINT (o);
       else if (FLOATP (o))
-        val = (CARD32) XFLOAT_DATA (o);
+        val = (long) XFLOAT_DATA (o);
       else if (CONSP (o))
-        val = (CARD32) cons_to_long (o);
+        val = (long) cons_to_long (o);
       else if (STRINGP (o))
         {
           BLOCK_INPUT;
-          val = XInternAtom (dpy, (char *) SDATA (o), False);
+          val = (long) XInternAtom (dpy, (char *) SDATA (o), False);
           UNBLOCK_INPUT;
         }
       else
         error ("Wrong type, must be string, number or cons");
 
       if (format == 8)
-        *d08++ = (CARD8) val;
+        *d08++ = (char) val;
       else if (format == 16)
-        *d16++ = (CARD16) val;
+        *d16++ = (short) val;
       else
         *d32++ = val;
     }
@@ -2522,6 +2570,10 @@
    be stored in RET.
    SIZE is the number of elements in DATA.
 
+   Important: When format is 32, data should contain an array of int,
+   not an array of long as the X library returns.  This makes a difference
+   when sizeof(long) != sizeof(int).
+
    Also see comment for selection_data_to_lisp_data above.  */
 
 Lisp_Object
@@ -2633,7 +2685,8 @@
 {
   Lisp_Object vec;
   Lisp_Object frame;
-  unsigned long size = (8*sizeof (event->data))/event->format;
+  /* format 32 => size 5, format 16 => size 10, format 8 => size 20 */
+  unsigned long size = 160/event->format;
   int x, y;
   unsigned char *data = (unsigned char *) event->data.b;
   int idata[5];
@@ -2712,8 +2765,6 @@
   struct frame *f = check_x_frame (from);
   int count;
   int to_root;
-  int idata[5];
-  void *data;
 
   CHECK_STRING (message_type);
   CHECK_NUMBER (format);
@@ -2774,30 +2825,10 @@
   event.xclient.window = to_root ? FRAME_OUTER_WINDOW (f) : wdest;
 
   
-  if (event.xclient.format == 32 && event.xclient.format < BITS_PER_LONG)
-    {
-      /* x_fill_property_data expects data to hold 32 bit values when
-         format == 32, but on a 64 bit machine long is 64 bits.
-         event.xclient.l is an array of long, so we must compensate. */
-
-      memset (idata, 0, sizeof (idata));
-      data = idata;
-    }
-  else
-    {
-      memset (event.xclient.data.b, 0, sizeof (event.xclient.data.b));
-      data = event.xclient.data.b;
-    }
-
-  x_fill_property_data (dpyinfo->display, values, data, event.xclient.format);
-
-  if (data == idata)
-    {
-      int i;
-      for (i = 0; i < 5; ++i) /* There are only 5 longs in a ClientMessage. */
-        event.xclient.data.l[i] = (long) idata[i];
-    }
-  
+  memset (event.xclient.data.b, 0, sizeof (event.xclient.data.b));
+  x_fill_property_data (dpyinfo->display, values, event.xclient.data.b,
+                        event.xclient.format);
+
   /* If event mask is 0 the event is sent to the client that created
      the destination window.  But if we are sending to the root window,
      there is no such client.  Then we set the event mask to 0xffff.  The