changeset 90180:62afea0771d8

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-51 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 289-301) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 68) - Update from CVS
author Miles Bader <miles@gnu.org>
date Thu, 12 May 2005 03:41:19 +0000
parents b745036dab36 (current diff) 0592fa6c5b5c (diff)
children 0c828e2b0b6f
files ChangeLog admin/FOR-RELEASE etc/ChangeLog etc/NEWS etc/TODO etc/TUTORIAL.pl etc/TUTORIAL.translators lisp/ChangeLog lisp/calc/calc-alg.el lisp/calc/calc-arith.el lisp/calc/calc-comb.el lisp/calc/calc-embed.el lisp/calc/calc-ext.el lisp/calc/calc-help.el lisp/calc/calc-lang.el lisp/calc/calc-math.el lisp/calc/calc-misc.el lisp/calc/calc-mode.el lisp/calc/calc-poly.el lisp/calc/calc-rewr.el lisp/calc/calc-store.el lisp/calc/calc-stuff.el lisp/calc/calc-vec.el lisp/calc/calcalg2.el lisp/calc/calcalg3.el lisp/calc/calccomp.el lisp/calc/calcsel2.el lisp/calendar/appt.el lisp/calendar/solar.el lisp/cus-edit.el lisp/dired.el lisp/emacs-lisp/byte-run.el lisp/emacs-lisp/cl-macs.el lisp/emacs-lisp/easy-mmode.el lisp/emulation/cua-base.el lisp/files.el lisp/font-lock.el lisp/gnus/ChangeLog lisp/gnus/gnus-art.el lisp/ido.el lisp/international/mule.el lisp/jka-comp-hook.el lisp/jka-compr.el lisp/loadup.el lisp/mouse-sel.el lisp/net/goto-addr.el lisp/net/webjump.el lisp/obsolete/float.el lisp/obsolete/hilit19.el lisp/obsolete/rnews.el lisp/obsolete/uncompress.el lisp/pcvs.el lisp/play/5x5.el lisp/play/animate.el lisp/play/blackbox.el lisp/play/decipher.el lisp/play/doctor.el lisp/play/fortune.el lisp/play/gamegrid.el lisp/play/gametree.el lisp/play/handwrite.el lisp/play/landmark.el lisp/play/life.el lisp/play/morse.el lisp/play/mpuz.el lisp/play/pong.el lisp/play/snake.el lisp/play/tetris.el lisp/play/zone.el lisp/progmodes/ada-mode.el lisp/progmodes/ada-stmt.el lisp/progmodes/cc-fonts.el lisp/progmodes/cmacexp.el lisp/progmodes/compile.el lisp/progmodes/cperl-mode.el lisp/progmodes/ebrowse.el lisp/progmodes/executable.el lisp/progmodes/gdb-ui.el lisp/progmodes/grep.el lisp/progmodes/gud.el lisp/progmodes/make-mode.el lisp/progmodes/sh-script.el lisp/replace.el lisp/simple.el lisp/startup.el lisp/term/mac-win.el lisp/term/sun.el lisp/term/tty-colors.el lisp/term/w32-win.el lisp/term/x-win.el lisp/term/xterm.el lisp/textmodes/bibtex.el lisp/textmodes/ispell.el lisp/textmodes/org.el lisp/textmodes/po.el lisp/tooltip.el lispref/ChangeLog lispref/customize.texi lispref/display.texi lispref/elisp.texi lispref/frames.texi lispref/functions.texi lispref/keymaps.texi lispref/processes.texi lispref/variables.texi mac/ChangeLog mac/inc/config.h make-dist man/ChangeLog man/basic.texi man/building.texi man/calc.texi man/frames.texi man/screen.texi src/ChangeLog src/Makefile.in src/buffer.c src/dired.c src/eval.c src/fileio.c src/image.c src/lread.c src/macterm.c src/macterm.h src/sysselect.h src/xfns.c src/xmenu.c src/xterm.c
diffstat 137 files changed, 4707 insertions(+), 2991 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu May 12 02:47:44 2005 +0000
+++ b/ChangeLog	Thu May 12 03:41:19 2005 +0000
@@ -1,3 +1,9 @@
+2005-05-07  J,Ai(Br,At(Bme Marant  <jerome@marant.org>
+
+	* make-dist: Remove references to makefile.nt and makefile.def.
+	Include widgets and images subdirectories of etc.  Do not exclude
+	ldefs-boot.el.
+
 2005-04-23  Andreas Schwab  <schwab@suse.de>
 
 	* configure.in: Remove duplicate match for powerpc configuration.
--- a/admin/FOR-RELEASE	Thu May 12 02:47:44 2005 +0000
+++ b/admin/FOR-RELEASE	Thu May 12 03:41:19 2005 +0000
@@ -91,6 +91,14 @@
 Please record your name here and say which part of the distribution
 you're going to handle.
 
+DIRECTORY		STATUS		IN CHARGE
+---------		------		---------
+lisp/international	working		Kenichi Handa
+lisp/languages		working		Kenichi Handa
+lisp/net		working		Thien-Thi Nguyen
+lisp/play		done		Thien-Thi Nguyen
+lisp/term		working		Thien-Thi Nguyen
+
 ** Update AUTHORS.
 
 ** Reorder NEWS entries.
@@ -169,7 +177,7 @@
 lispref/debugging.texi   Joakim Verona <joakim@verona.se>   Lute Kamstra
 lispref/display.texi     Chong Yidong
 lispref/edebug.texi      Chong Yidong
-lispref/elisp.texi       "Luc Teirlinck"
+lispref/elisp.texi       "Luc Teirlinck"   Lute Kamstra
 lispref/errors.texi      "Luc Teirlinck"
 lispref/eval.texi        "Luc Teirlinck"   Chong Yidong
 lispref/files.texi       "Luc Teirlinck"   Chong Yidong
@@ -194,7 +202,7 @@
 lispref/objects.texi	 "Luc Teirlinck"   Chong Yidong
 lispref/os.texi		 "Luc Teirlinck"   Chong Yidong
 lispref/positions.texi	 "Luc Teirlinck"   Chong Yidong
-lispref/processes.texi   Chong Yidong
+lispref/processes.texi   Chong Yidong	   Thien-Thi Nguyen
 lispref/searching.texi	 "Luc Teirlinck"   Chong Yidong
 lispref/sequences.texi	 "Luc Teirlinck"   Chong Yidong
 lispref/streams.texi	 "Luc Teirlinck"   Chong Yidong
@@ -230,7 +238,7 @@
 etc/TUTORIAL.ja		 Kenichi Handa <handa@m17n.org>
 etc/TUTORIAL.ko
 etc/TUTORIAL.nl		 Lute Kamstra
-etc/TUTORIAL.pl
+etc/TUTORIAL.pl          Slawomir Nowaczyk <slawek@cs.lth.se>
 etc/TUTORIAL.pt_BR       Marcelo Toledo
 etc/TUTORIAL.ro
 etc/TUTORIAL.ru          Alex Ott <alexott@gmail.com>
--- a/etc/ChangeLog	Thu May 12 02:47:44 2005 +0000
+++ b/etc/ChangeLog	Thu May 12 03:41:19 2005 +0000
@@ -1,3 +1,7 @@
+2005-05-05  Slawomir Nowaczyk  <slawek@cs.lth.se>  (tiny change)
+
+        * TUTORIAL.pl: Updated header.
+
 2005-05-02  Richard M. Stallman  <rms@gnu.org>
 
 	* NEWS: More rearrangements.
@@ -55,7 +59,7 @@
 
 	* TUTORIAL.de: Updated header.
 
-2005-04-05  Marcelo Toledo  <marcelo@marcelotoledo.org>
+2005-04-05  Marcelo Toledo  <marcelo@gnu.org>
 
         * TUTORIAL.translators: Added the field Maintainer.
 
@@ -76,20 +80,24 @@
 
 	* TUTORIAL.es: Clean up line breaks.
 
-2005-04-01  Marcelo Toledo  <marcelo@marcelotoledo.org>
+2005-04-01  Marcelo Toledo  <marcelo@gnu.org>
 
         * TUTORIAL.pt_BR, TUTORIAL.cn, TUTORIAL.cs, TUTORIAL.de,
         * TUTORIAL.es, TUTORIAL.fr, TUTORIAL.it, TUTORIAL.ja, TUTORIAL.ko,
         * TUTORIAL.pl, TUTORIAL.pt_BR, TUTORIAL.ro, TUTORIAL.ru,
         * TUTORIAL.sk, TUTORIAL.sl, TUTORIAL.th, TUTORIAL.zh: Fix title
         line.
-
+        
+2005-04-01  Ognyan Kulev  <ogi@fmi.uni-sofia.bg>
+        
         * TUTORIAL.bg: Fix title line; Applied TUTORIAL changes in
         revision 1.59, "Emacs" is not transliterated to cyrillic anymore;
-        Minor fixes; patch by Ognyan Kulev <ogi@fmi.uni-sofia.bg>.
+        Minor fixes.
+
+2005-04-01  Mats Lidell  <matsl@contactor.se>
 
         * TUTORIAL.sv: Sync some other changes with the TUTORIAL version
-        1.61 in CVS patch by Mats Lidell <matsl@contactor.se>.
+        1.61 in CVS.
 
 2005-04-01  Lute Kamstra  <lute@gnu.org>
 
@@ -354,7 +362,7 @@
 	* tree-widget: New directory containing tree-widget themes and
 	images.
 
-2004-04-13  Marcelo Toledo  <marcelo@marcelotoledo.org>
+2004-04-13  Marcelo Toledo  <marcelo@gnu.org>
 
 	* TUTORIAL.pt_BR: initial check-in.
 
@@ -373,9 +381,9 @@
 
 	* TUTORIAL.it, TUTORIAL.nl, TUTORIAL.sv: Add coding: latin-1.
 
-2004-04-16  David Kastrup  <dak@gnu.org>
-
-	* TUTORIAL.ru: Changes by Alex Ott checked in.
+2004-04-16  Alex Ott  <ottalex@narod.ru>
+
+	* TUTORIAL.ru: Various corrections.
 
 2004-04-14  Jan Nieuwenhuizen  <janneke@gnu.org>
 
@@ -570,10 +578,9 @@
 
 	* MH-E-NEWS: Upgraded to MH-E version 7.0.
 
-2002-11-22  Juanma Barranquero  <lektu@terra.es>
-
-	* TUTORIAL.es: Extensively changed and updated by Rafael Sep,Az(Blveda
-	<drs@gnulinux.org.mx>.
+2002-11-22  Rafael Sep,Az(Blveda  <drs@gnulinux.org.mx>
+
+	* TUTORIAL.es: Extensively changed and updated.
 
 2002-10-01  Bill Wohler  <wohler@newt.com>
 
@@ -1829,11 +1836,13 @@
 	* emacstool.c: setenv IN_EMACSTOOL=t, TERM=sun, TERMCAP=.
 
 	* emacsstool.1: update to document environment variables.
+        
+1989-02-21  Mosur Mohan (email@notavailable)
+        
+	* etags.c (PAS_funcs): New function.
 
 1989-02-21  Richard Stallman  (rms@sugar-bombs.ai.mit.edu)
 
-	* etags.c (PAS_funcs): New function by Mosur Mohan.
-
 	* movemail.c: On sysv, include unistd.h.
 
 1989-02-18  Richard Stallman  (rms@sugar-bombs.ai.mit.edu)
@@ -1852,10 +1861,10 @@
 
 	* fakemail.c (put_line): Break header lines at 79 cols.
 
-1989-01-19  Richard Stallman  (rms@sugar-bombs.ai.mit.edu)
-
-	* etags.c: Greatly rewritten by Sam Kendall for C++ support and for
-	multiple tags per line.
+1989-01-19  Sam Kendall  (email@notavailable)
+
+	* etags.c: Greatly rewritten for C++ support and for multiple tags        
+        per line.
 
 1989-01-03  Richard Stallman  (rms@sugar-bombs.ai.mit.edu)
 
--- a/etc/NEWS	Thu May 12 02:47:44 2005 +0000
+++ b/etc/NEWS	Thu May 12 03:41:19 2005 +0000
@@ -111,7 +111,7 @@
 ---
 ** By default, Emacs now uses a setgid helper program to update game
 scores.  The directory ${localstatedir}/games/emacs is the normal
-place for game scores to be stored.  This may be controlled by the
+place for game scores to be stored.  You can control this with the
 configure option `--with-game-dir'.  The specific user that Emacs uses
 to own the game scores is controlled by `--with-game-user'.  If access
 to a game user is not available, then scores will be stored separately
@@ -179,6 +179,10 @@
 ---
 ** Building with -DENABLE_CHECKING does not automatically build with union
 types any more.  Add -DUSE_LISP_UNION_TYPE if you want union types.
+
+---
+** When pure storage overflows while dumping, Emacs now prints how
+much pure storage it will approximately need.
 
 * Startup Changes in Emacs 22.1
 
@@ -196,6 +200,23 @@
 the blinking cursor on graphical terminals.
 
 +++
+** The option --script FILE runs Emacs in batch mode and loads FILE.
+It is useful for writing Emacs Lisp shell script files, because they
+can start with this line:
+
+   #!/usr/bin/emacs --script
+
++++
+** The option --directory DIR now modifies `load-path' immediately.
+Directories are added to the front of `load-path' in the order they
+appear on the command line.  For example, with this command line:
+
+  emacs -batch -L .. -L /tmp --eval "(require 'foo)"
+
+Emacs looks for library `foo' in the parent directory, then in /tmp, then
+in the other directories in `load-path'.  (-L is short for --directory.)
+
++++
 ** The command line option --no-windows has been changed to
 --no-window-system.  The old one still works, but is deprecated.
 
@@ -205,6 +226,11 @@
 an interactively callable function.
 
 +++
+** When you specify a frame size with --geometry, the size applies to
+all frames you create.  A position specified with --geometry only
+affects the initial frame.
+
++++
 ** Emacs can now be invoked in full-screen mode on a windowed display.
 When Emacs is invoked on a window system, the new command-line options
 `--fullwidth', `--fullheight', and `--fullscreen' produce a frame
@@ -234,14 +260,8 @@
 modified buffers, it saves the abbrevs too if they have changed.  It
 can do this either silently or asking for confirmation first,
 according to the value of `save-abbrevs'.
-
 
-* Editing Changes in Emacs 22.1
-
-+++
-** The mode line position information now comes before the major mode.
-When the file is maintained under version control, that information
-appears between the position information and the major mode.
+* Incompatible Editing Changes in Emacs 22.1
 
 +++
 ** M-g is now a prefix key.
@@ -250,41 +270,120 @@
 M-g p and M-g M-p run previous-error.
 
 +++
-** M-o now is the prefix key for setting text properties;
-M-o M-o requests refontification.
-
-+++
-** C-u M-x goto-line now switches to the most recent previous buffer,
+** C-u M-g M-g switches to the most recent previous buffer,
 and goes to the specified line in that buffer.
 
 When goto-line starts to execute, if there's a number in the buffer at
 point then it acts as the default argument for the minibuffer.
 
 +++
+** The old bindings C-M-delete and C-M-backspace have been deleted,
+since there are situations where one or the other will shut down
+the operating system or your X server.
+
++++
+** line-move-ignore-invisible now defaults to t.
+
++++
+** When the undo information of the current command gets really large
+(beyond the value of `undo-outer-limit'), Emacs discards it and warns
+you about it.
+
++++
+** `apply-macro-to-region-lines' now operates on all lines that begin
+in the region, rather than on all complete lines in the region.
+
++++
+** A prefix argument is no longer required to repeat a jump to a
+previous mark, i.e. C-u C-SPC C-SPC C-SPC ... cycles through the
+mark ring.  Use C-u C-u C-SPC to set the mark immediately after a jump.
+
++++
+** The info-search bindings on C-h C-f, C-h C-k and C-h C-i
+have been moved to C-h F, C-h K and C-h S.
+
++++
+** In incremental search, C-w is changed.  M-%, C-M-w and C-M-y are special.
+
+See below under "incremental search changes".
+
+---
+** C-x C-f RET, typing nothing in the minibuffer, is no longer a special case.
+
+Since the default input is the current directory, this has the effect
+of specifying the current directory.  Normally that means to visit the
+directory with Dired.
+
++++
+** The completion commands TAB, SPC and ? in the minibuffer apply only
+to the text before point.  If there is text in the buffer after point,
+it remains unchanged.
+
++++
+** M-o now is the prefix key for setting text properties;
+M-o M-o requests refontification.
+
++++
+** You can now follow links by clicking Mouse-1 on the link.
+
+See below for more details.
+
++++
+** In Dired's ! command (dired-do-shell-command), `*' and `?' now
+control substitution of the file names only when they are surrounded
+by whitespace.  This means you can now use them as shell wildcards
+too.  If you want to use just plain `*' as a wildcard, type `*""'; the
+doublequotes make no difference in the shell, but they prevent
+special treatment in `dired-do-shell-command'.
+
+* Editing Changes in Emacs 22.1
+
++++
+** The max size of buffers and integers has been doubled.
+On 32bit machines, it is now 256M (i.e. 268435455).
+
++++
+** M-g is now a prefix key.
+M-g g and M-g M-g run goto-line.
+M-g n and M-g M-n run next-error (like C-x `).
+M-g p and M-g M-p run previous-error.
+
++++
+** C-u M-g M-g switches to the most recent previous buffer,
+and goes to the specified line in that buffer.
+
+When goto-line starts to execute, if there's a number in the buffer at
+point then it acts as the default argument for the minibuffer.
+
++++
+** The old bindings C-M-delete and C-M-backspace have been deleted,
+since there are situations where one or the other will shut down
+the operating system or your X server.
+
++++
+** line-move-ignore-invisible now defaults to t.
+
++++
+** When the undo information of the current command gets really large
+(beyond the value of `undo-outer-limit'), Emacs discards it and warns
+you about it.
+
++++
+** `apply-macro-to-region-lines' now operates on all lines that begin
+in the region, rather than on all complete lines in the region.
+
++++
 ** You can now switch buffers in a cyclic order with C-x C-left and
 (prev-buffer) and C-x C-right (next-buffer).  C-x left and C-x right
 can be used as well.
 
 +++
-** The old bindings C-M-delete and C-M-backspace have been deleted,
-since there are situations where one or the other will shut down
-the operating system or your X server.
-
-+++
 ** `undo-only' does an undo which does not redo any previous undo.
 
 +++
-** When the undo information of the current command gets really large
-(beyond the value of `undo-outer-limit'), Emacs discards it and warns
-you about it.
-
-+++
 ** M-SPC (just-one-space) when given a numeric argument N
 converts whitespace around point to N spaces.
 
-+++
-** line-move-ignore-invisible now defaults to t.
-
 ---
 ** New commands to operate on pairs of open and close characters:
 `insert-pair', `delete-pair', `raise-sexp'.
@@ -305,11 +404,22 @@
 in Indented-Text mode.
 
 +++
-** Movement commands `beginning-of-buffer', `end-of-buffer',
-`beginning-of-defun', `end-of-defun' do not set the mark if the mark
-is already active in Transient Mark mode.
-
-** Mark Changes:
+** M-x setenv now expands environment variable references.
+
+Substrings of the form `$foo' and `${foo}' in the specified new value
+now refer to the value of environment variable foo.  To include a `$'
+in the value, use `$$'.
+
++++
+** `special-display-buffer-names' and `special-display-regexps' now
+understand two new boolean pseudo-frame-parameters `same-frame' and
+`same-window'.
+
++++
+** The default for the paper size (variable ps-paper-type) is taken
+from the locale.
+
+** Mark command changes:
 
 +++
 *** A prefix argument is no longer required to repeat a jump to a
@@ -317,18 +427,21 @@
 mark ring.  Use C-u C-u C-SPC to set the mark immediately after a jump.
 
 +++
-*** Marking commands extend the region when invoked multiple times.  If
-you hit M-C-SPC (mark-sexp), M-@ (mark-word), M-h (mark-paragraph), or
-C-M-h (mark-defun) repeatedly, the marked region extends each time, so
-you can mark the next two sexps with M-C-SPC M-C-SPC, for example.
-This feature also works for mark-end-of-sentence, if you bind that to
-a key.  It also extends the region when the mark is active in Transient
-Mark mode, regardless of the last command.  To start a new region with
-one of marking commands in Transient Mark mode, you can deactivate the
-active region with C-g, or set the new mark with C-SPC.
+*** Marking commands extend the region when invoked multiple times.
+
+If you type C-M-SPC (mark-sexp), M-@ (mark-word), M-h
+(mark-paragraph), or C-M-h (mark-defun) repeatedly, the marked region
+extends each time, so you can mark the next two sexps with M-C-SPC
+M-C-SPC, for example.  This feature also works for
+mark-end-of-sentence, if you bind that to a key.  It also extends the
+region when the mark is active in Transient Mark mode, regardless of
+the last command.  To start a new region with one of marking commands
+in Transient Mark mode, you can deactivate the active region with C-g,
+or set the new mark with C-SPC.
 
 +++
 *** M-h (mark-paragraph) now accepts a prefix arg.
+
 With positive arg, M-h marks the current and the following paragraphs;
 if the arg is negative, it marks the current and the preceding
 paragraphs.
@@ -351,6 +464,11 @@
 that alters the buffer, but you can also deactivate the mark by typing
 C-g.
 
++++
+*** Movement commands `beginning-of-buffer', `end-of-buffer',
+`beginning-of-defun', `end-of-defun' do not set the mark if the mark
+is already active in Transient Mark mode.
+
 ** Help command changes:
 
 +++
@@ -415,6 +533,10 @@
 clicking on mouse-sensitive areas or moving there and pressing RET.
 
 +++
+*** The command `list-text-properties-at' has been deleted because
+C-u C-x = gives the same information and more.
+
++++
 *** New command `display-local-help' displays any local help at point
 in the echo area.  It is bound to `C-h .'.  It normally displays the
 same string that would be displayed on mouse-over using the
@@ -428,37 +550,91 @@
 determined by the user option `help-at-pt-timer-delay' and defaults
 to one second.  This feature is turned off by default.
 
-** Buffer Menu changes
-
-+++
-*** New command `Buffer-menu-toggle-files-only' toggles display of file
-buffers only in the Buffer Menu.  It is bound to `T' in Buffer Menu
-mode.
-
-+++
-*** `buffer-menu' and `list-buffers' now list buffers whose names begin
-with a space, when those buffers are visiting files.  Normally buffers
-whose names begin with space are omitted.
-
----
-*** The new options `buffers-menu-show-directories' and
-`buffers-menu-show-status' let you control how buffers are displayed
-in the menu dropped down when you click "Buffers" from the menu bar.
-
-`buffers-menu-show-directories' controls whether the menu displays
-leading directories as part of the file name visited by the buffer.
-If its value is `unless-uniquify', the default, directories are
-shown unless uniquify-buffer-name-style' is non-nil.  The value of nil
-and t turn the display of directories off and on, respectively.
-
-`buffers-menu-show-status' controls whether the Buffers menu includes
-the modified and read-only status of the buffers.  By default it is
-t, and the status is shown.
-
-Setting these variables directly does not take effect until next time
-the Buffers menu is regenerated.
-
-** File Operation Changes:
++++
+*** The apropos commands now accept a list of words to match.
+When more than one word is specified, at least two of those words must
+be present for an item to match.  Regular expression matching is still
+available.
+
++++
+*** The new option `apropos-sort-by-scores' causes the matching items
+to be sorted according to their score.  The score for an item is a
+number calculated to indicate how well the item matches the words or
+regular expression that you entered to the apropos command.  The best
+match is listed first, and the calculated score is shown for each
+matching item.
+
+** Incremental Search changes:
+
++++
+*** Vertical scrolling is now possible within incremental search.
+To enable this feature, customize the new user option
+`isearch-allow-scroll'.  User written commands which satisfy stringent
+constraints can be marked as "scrolling commands".  See the Emacs manual
+for details.
+
++++
+*** C-w in incremental search now grabs either a character or a word,
+making the decision in a heuristic way.  This new job is done by the
+command `isearch-yank-word-or-char'.  To restore the old behavior,
+bind C-w to `isearch-yank-word' in `isearch-mode-map'.
+
++++
+*** C-y in incremental search now grabs the next line if point is already
+at the end of a line.
+
++++
+*** C-M-w deletes and C-M-y grabs a character in isearch mode.
+Another method to grab a character is to enter the minibuffer by `M-e'
+and to type `C-f' at the end of the search string in the minibuffer.
+
++++
+*** M-% typed in isearch mode invokes `query-replace' or
+`query-replace-regexp' (depending on search mode) with the current
+search string used as the string to replace.
+
++++
+*** Isearch no longer adds `isearch-resume' commands to the command
+history by default.  To enable this feature, customize the new
+user option `isearch-resume-in-command-history'.
+
+** Replace command changes:
+
+---
+*** New user option `query-replace-skip-read-only': when non-nil,
+`query-replace' and related functions simply ignore
+a match if part of it has a read-only property.
+
++++
+*** When used interactively, the commands `query-replace-regexp' and
+`replace-regexp' allow \,expr to be used in a replacement string,
+where expr is an arbitrary Lisp expression evaluated at replacement
+time.  In many cases, this will be more convenient than using
+`query-replace-regexp-eval'.  `\#' in a replacement string now refers
+to the count of replacements already made by the replacement command.
+All regular expression replacement commands now allow `\?' in the
+replacement string to specify a position where the replacement string
+can be edited for each replacement.
+
++++
+*** query-replace uses isearch lazy highlighting when the new user option
+`query-replace-lazy-highlight' is non-nil.
+
+---
+*** The current match in query-replace is highlighted in new face
+`query-replace' which by default inherits from isearch face.
+
+** File operation changes:
+
++++
+*** Unquoted `$' in file names do not signal an error any more when
+the corresponding environment variable does not exist.
+Instead, the `$ENVVAR' text is left as is, so that `$$' quoting
+is only rarely needed.
+
++++
+*** In processing a local variables list, Emacs strips the prefix and
+suffix are from every line before processing all the lines.
 
 +++
 *** find-file-read-only visits multiple files in read-only mode,
@@ -508,7 +684,7 @@
 
 +++
 *** If the user visits a file larger than `large-file-warning-threshold',
-Emacs prompts her for confirmation.
+Emacs asks for confirmation.
 
 +++
 *** require-final-newline now has two new possible values:
@@ -528,10 +704,6 @@
 So you can customize mode-require-final-newline to control what these
 modes do.
 
-+++
-** The max size of buffers and integers has been doubled.
-On 32bit machines, it is now 256M (i.e. 268435455).
-
 ** Minibuffer changes:
 
 +++
@@ -541,7 +713,7 @@
 prompt string.
 
 ---
-*** Enhanced visual feedback in *Completions* buffer.
+*** Enhanced visual feedback in `*Completions*' buffer.
 
 Completions lists use faces to highlight what all completions
 have in common and where they begin to differ.
@@ -556,7 +728,7 @@
 parts is, by contrast, slightly highlighted.
 
 +++
-*** File-name completion can now ignore directories.
+*** File-name completion can now ignore specified directories.
 If an element of the list in `completion-ignored-extensions' ends in a
 slash `/', it indicates a subdirectory that should be ignored when
 completing file names.  Elements of `completion-ignored-extensions'
@@ -573,7 +745,17 @@
 If set to t when adding a new history element, all previous identical
 elements are deleted.
 
-** Redisplay Changes
+** Redisplay changes:
+
++++
+*** The mode line position information now comes before the major mode.
+When the file is maintained under version control, that information
+appears between the position information and the major mode.
+
+*** Easy to overlook single character negation is now font-locked.
+You can use the new variable `font-lock-negation-char-face' and the face of
+the same name to customize this.  Currently the cc-modes, sh-script-mode,
+cperl-mode and make-mode support this.
 
 +++
 *** Control characters and escape glyphs are now shown in the new
@@ -601,15 +783,10 @@
 `auto-hscroll-mode'.  The old name is still available as an alias.
 
 *** Moving or scrolling through images (and other lines) taller that
-the window now works sensible, by automatically adjusting the window's
+the window now works sensibly, by automatically adjusting the window's
 vscroll property.
 
 +++
-*** In graphical mode, with a C program, GUD Tooltips have been extended to
-display the #define directive associated with an identifier when program is
-not executing.
-
-+++
 *** The new face `mode-line-inactive' is used to display the mode line
 of non-selected windows.  The `mode-line' face is now used to display
 the mode line of the currently selected window.
@@ -625,10 +802,9 @@
 set-fringe-style.
 
 +++
-*** The buffer boundaries (i.e. first and last line in the buffer) may
-now be marked with angle bitmaps in the fringes.  In addition, up and
-down arrow bitmaps may be shown at the top and bottom of the left or
-right fringe if the window can be scrolled in either direction.
+*** Angle icons in the fringes can indicate the buffer boundaries.  In
+addition, up and down arrow bitmaps in the fringe indicate which ways
+the window can be scrolled.
 
 This behavior is activated by setting the buffer-local variable
 `indicate-buffer-boundaries' to a non-nil value.  The default value of
@@ -637,8 +813,8 @@
 If value is `left' or `right', both angle and arrow bitmaps are
 displayed in the left or right fringe, resp.
 
-Value may also be an alist which specifies the presense and position
-of each bitmap individually.
+The value can also be an alist which specifies the presense and
+position of each bitmap individually.
 
 For example, ((top . left) (t .  right)) places the top angle bitmap
 in left fringe, the bottom angle bitmap in right fringe, and both
@@ -652,23 +828,23 @@
 Instead, the newline now "overflows" into the right fringe, and the
 cursor will be displayed in the fringe when positioned on that newline.
 
-The new user option 'overflow-newline-into-fringe' may be set to nil to
+The new user option 'overflow-newline-into-fringe' can be set to nil to
 revert to the old behavior of continuing such lines.
 
 +++
-*** When display margins are present in a window, the fringes are now
+*** When a window has display margin areas, the fringes are now
 displayed between the margins and the buffer's text area, rather than
-at the edges of the window.
-
-+++
-*** A window may now have individual fringe and scroll-bar settings,
+outside those margins.
+
++++
+*** A window can now have individual fringe and scroll-bar settings,
 in addition to the individual display margin settings.
 
 Such individual settings are now preserved when windows are split
 horizontally or vertically, a saved window configuration is restored,
 or when the frame is resized.
 
-** Cursor Display Changes
+** Cursor display changes:
 
 +++
 *** On X, MS Windows, and Mac OS, the blinking cursor's "off" state is
@@ -692,21 +868,41 @@
 *** The variable `cursor-in-non-selected-windows' can now be set to any
 of the recognized cursor types.
 
-+++
-** font-lock-lines-before specifies a number of lines before the
+** Font-Lock changes:
+
++++
+*** M-o now is the prefix key for setting text properties;
+M-o M-o requests refontification.
+
++++
+*** All modes now support using M-x font-lock-mode to toggle
+fontification, even those such as Occur, Info, and comint-derived
+modes that do their own fontification in a special way.
+
+The variable `Info-fontify' is no longer applicable; to disable
+fontification in Info, remove `turn-on-font-lock' from
+`Info-mode-hook'.
+
++++
+*** font-lock-lines-before specifies a number of lines before the
 current line that should be refontified when you change the buffer.
 The default value is 1.
 
----
-** JIT-lock changes
-
++++
+*** font-lock: in modes like C and Lisp where the fontification assumes that
+an open-paren in column 0 is always outside of any string or comment,
+font-lock now highlights any such open-paren-in-column-zero in bold-red
+if it is inside a string or a comment, to indicate that it can cause
+trouble with fontification and/or indentation.
+
+---
 *** The default settings for JIT stealth lock parameters are changed.
 The default value for the user option jit-lock-stealth-time is now 16
 instead of 3, and the default value of jit-lock-stealth-nice is now
 0.5 instead of 0.125.  The new defaults should lower the CPU usage
 when Emacs is fontifying in the background.
 
-
+---
 *** jit-lock can now be delayed with `jit-lock-defer-time'.
 
 If this variable is non-nil, its value should be the amount of Emacs
@@ -714,13 +910,14 @@
 example, if you set `jit-lock-defer-time' to 0.25, fontification will
 only happen after 0.25s of idle time.
 
+---
 *** contextual refontification is now separate from stealth fontification.
 
 jit-lock-defer-contextually is renamed jit-lock-contextually and
 jit-lock-context-time determines the delay after which contextual
 refontification takes place.
 
-** Menu Bar changes
+** Menu support:
 
 ---
 *** A menu item "Show/Hide" was added to the top-level menu "Options".
@@ -734,16 +931,40 @@
 ---
 *** Speedbar has moved from the "Tools" top level menu to "Show/Hide".
 
-+++
-** You can now customize fill-nobreak-predicate to control where
-filling can break lines.  The value is now normally a list of
-functions, but it can also be a single function, for compatibility.
-
-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 display feature: focus follows the mouse from one Emacs window
+---
+*** You can exit dialog windows and menus by typing C-g.
+
+---
+*** The menu item "Open File..." has been split into two items, "New File..."
+and "Open File...".  "Open File..." now opens only existing files.  This is
+to support existing GUI file selection dialogs better.
+
++++
+*** The file selection dialog for Gtk+, Mac, W32 and Motif/Lesstif can be
+disabled by customizing the variable `use-file-dialog'.
+
+---
+*** The pop up menus for Lucid now stay up if you do a fast click and can
+be navigated with the arrow keys (like Gtk+, Mac and W32).
+
++++
+*** The Lucid menus can display multilingual text in your locale.  You have
+to explicitly specify a fontSet resource for this to work, for example
+`-xrm "Emacs*fontSet:  -*-helvetica-medium-r-*--*-120-*-*-*-*-*-*,*"'.
+
+---
+*** Dialogs for Lucid/Athena and Lesstif/Motif now pops down when pressing
+ESC, like they do for Gtk+, Mac and W32.
+
++++
+*** For Gtk+ version 2.4, you can make Emacs use the old file dialog
+by setting the variable `x-use-old-gtk-file-dialog' to t.  Default is to use
+the new dialog.
+
+** Mouse changes:
+
++++
+*** New display feature: focus follows the mouse from one Emacs window
 to another, even within a frame.  If you set the variable
 mouse-autoselect-window to non-nil value, moving the mouse to a
 different Emacs window will select that window (minibuffer window can
@@ -751,7 +972,7 @@
 feature is not enabled.
 
 +++
-** On X, when the window manager requires that you click on a frame to
+*** On X, when the window manager requires that you click on a frame to
 select it (give it focus), the selected window and cursor position
 normally changes according to the mouse click position.  If you set
 the variable x-mouse-click-focus-ignore-position to t, the selected
@@ -759,39 +980,16 @@
 to give it focus.
 
 +++
-** When you specify a frame size with --geometry, the size applies to
-all frames you create.  A position specified with --geometry only
-affects the initial frame.
-
-+++
-** `special-display-buffer-names' and `special-display-regexps' now
-understand two new boolean pseudo-frame-parameters `same-frame' and
-`same-window'.
-
----
-** New commands `scan-buf-next-region' and `scan-buf-previous-region'
-move to the start of the next (previous, respectively) region with
-non-nil help-echo property and display any help found there in the
-echo area, using `display-local-help'.
-
-+++
-** In processing a local variables list, Emacs strips the prefix and
-suffix are from every line before processing all the lines.
-
-+++
-** `apply-macro-to-region-lines' now operates on all lines that begin
-in the region, rather than on all complete lines in the region.
-
-+++
-** You can now follow links by clicking Mouse-1 on the link.
+*** You can now follow links by clicking Mouse-1 on the link.
 
 Traditionally, Emacs uses a Mouse-1 click to set point and a Mouse-2
 click to follow a link, whereas most other applications use a Mouse-1
 click for both purposes, depending on whether you click outside or
 inside a link.  Now the behavior of a Mouse-1 click has been changed
-to match this context-sentitive dual behavior.
-
-Depending on the current mode, a Mouse-2 click in Emacs may do much
+to match this context-sentitive dual behavior.  (If you prefer the old
+behavior, set the user option `mouse-1-click-follows-link' to nil.)
+
+Depending on the current mode, a Mouse-2 click in Emacs can do much
 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
@@ -813,56 +1011,43 @@
 `mouse-1-click-follows-link' and `mouse-1-click-in-non-selected-windows'.
 
 +++
-** Emacs normally highlights mouse sensitive text whenever the mouse
+*** Emacs normally highlights mouse sensitive text whenever the mouse
 is over the text.  By setting the new variable `mouse-highlight', you
 can optionally enable mouse highlighting only after you move the
 mouse, so that highlighting disappears when you press a key.  You can
 also disable mouse highlighting.
 
 +++
-** You can now customize if selecting a region by dragging the mouse
+*** You can now customize if selecting a region by dragging the mouse
 shall not copy the selected text to the kill-ring by setting the new
 variable mouse-drag-copy-region to nil.
 
 ---
-** mouse-wheels can now scroll a specific fraction of the window
+*** mouse-wheels can now scroll a specific fraction of the window
 (rather than a fixed number of lines) and the scrolling is `progressive'.
 
 ---
-** Unexpected yanking of text due to accidental clicking on the mouse
+*** Unexpected yanking of text due to accidental clicking on the mouse
 wheel button (typically mouse-2) during wheel scrolling is now avoided.
 This behavior can be customized via the mouse-wheel-click-event and
 mouse-wheel-inhibit-click-time variables.
 
 +++
-** Under X, mouse-wheel-mode is turned on by default.
-
-+++
-** M-x setenv now expands environment variables of the form `$foo' and
-`${foo}' in the specified new value of the environment variable.  To
-include a `$' in the value, use `$$'.
-
-+++
-** Unquoted `$' in file names do not signal an error any more when
-the corresponding environment variable does not exist.
-Instead, the `$ENVVAR' text is left as is, so that `$$' quoting
-is only rarely needed.
-
----
-** Language environment and various default coding systems are setup
+*** Under X, mouse-wheel-mode is turned on by default.
+
+** Mule changes:
+
+---
+*** Language environment and various default coding systems are setup
 more correctly according to the current locale name.  If the locale
 name doesn't specify a charset, the default is what glibc defines.
-This change may result in using the different coding systems as
+This change can result in using the different coding systems as
 default in some locale (e.g. vi_VN).
 
 +++
-** The default for the paper size (variable ps-paper-type) is taken
-from the locale.
-
-+++
-** The keyboard-coding-system is now automatically set based on your
+*** The keyboard-coding-system is now automatically set based on your
 current locale settings if you are not using a window system.  This
-may mean that the META key doesn't work but generates non-ASCII
+can mean that the META key doesn't work but generates non-ASCII
 characters instead, depending on how the terminal (or terminal
 emulator) works.  Use `set-keyboard-coding-system' (or customize
 keyboard-coding-system) if you prefer META to work (the old default)
@@ -870,33 +1055,33 @@
 by the keyboard.  See Info node `Single-Byte Character Support'.
 
 +++
-** The new command `revert-buffer-with-coding-system' (C-x RET r)
+*** The new command `revert-buffer-with-coding-system' (C-x RET r)
 revisits the current file using a coding system that you specify.
 
 +++
-** New command `recode-region' decodes the region again by a specified
+*** New command `recode-region' decodes the region again by a specified
 coding system.
 
 +++
-** The new command `recode-file-name' changes the encoding of the name
+*** The new command `recode-file-name' changes the encoding of the name
 of a file.
 
 ---
-** New command `ucs-insert' inserts a character specified by its
+*** New command `ucs-insert' inserts a character specified by its
 unicode.
 
 +++
-** The new command `set-file-name-coding-system' (C-x RET F) sets
+*** The new command `set-file-name-coding-system' (C-x RET F) sets
 coding system for encoding and decoding file names.  A new menu item
 (Options->Mule->Set Coding Systems->For File Name) invokes this
 command.
 
 +++
-** New command quail-show-key shows what key (or key sequence) to type
+*** New command quail-show-key shows what key (or key sequence) to type
 in the current input method to input a character at point.
 
 +++
-** Limited support for character `unification' has been added.
+*** Limited support for character `unification' has been added.
 Emacs now knows how to translate between different representations of
 the same characters in various Emacs charsets according to standard
 Unicode mappings.  This applies mainly to characters in the ISO 8859
@@ -916,20 +1101,20 @@
 will often effectively clobber data with an iso-2022 encoding.
 
 ---
-** There is support for decoding Greek and Cyrillic characters into
+*** There is support for decoding Greek and Cyrillic characters into
 either Unicode (the mule-unicode charsets) or the iso-8859 charsets,
 when possible.  The latter are more space-efficient.  This is
 controlled by user option utf-fragment-on-decoding.
 
 ---
-** New language environments: French, Ukrainian, Tajik,
+*** New language environments: French, Ukrainian, Tajik,
 Bulgarian, Belarusian, Ukrainian, UTF-8, Windows-1255, Welsh, Latin-6,
 Latin-7, Lithuanian, Latvian, Swedish, Slovenian, Croatian, Georgian,
 Italian, Russian, Malayalam, Tamil, Russian, Chinese-EUC-TW.  (Set up
 automatically according to the locale.)
 
 ---
-** New input methods: latin-alt-postfix, latin-postfix, latin-prefix,
+*** New input methods: latin-alt-postfix, latin-postfix, latin-prefix,
 ukrainian-computer, belarusian, bulgarian-bds, russian-computer,
 vietnamese-telex, lithuanian-numeric, lithuanian-keyboard,
 latvian-keyboard, welsh, georgian, rfc1345, ucs, sgml,
@@ -937,11 +1122,11 @@
 tamil-inscript.
 
 ---
-** New input method chinese-sisheng for inputting Chinese Pinyin
+*** New input method chinese-sisheng for inputting Chinese Pinyin
 characters.
 
 ---
-** Improved Thai support.  A new minor mode `thai-word-mode' (which is
+*** Improved Thai support.  A new minor mode `thai-word-mode' (which is
 automatically activated if you select Thai as a language
 environment) changes key bindings of most word-oriented commands to
 versions which recognize Thai words.  Affected commands are
@@ -953,17 +1138,17 @@
     M-q     (fill-paragraph)
 
 ---
-** Indian support has been updated.
+*** Indian support has been updated.
 The in-is13194 coding system is now Unicode-based.  CDAC fonts are
 assumed.  There is a framework for supporting various
 Indian scripts, but currently only Devanagari, Malayalam and Tamil are
 supported.
 
 ---
-** A UTF-7 coding system is available in the library `utf-7'.
-
----
-** The utf-8/16 coding systems have been enhanced.
+*** A UTF-7 coding system is available in the library `utf-7'.
+
+---
+*** The utf-8/16 coding systems have been enhanced.
 By default, untranslatable utf-8 sequences are simply composed into
 single quasi-characters.  User option `utf-translate-cjk-mode' (it is
 turned on by default) arranges to translate many utf-8 CJK character
@@ -977,12 +1162,12 @@
 The utf-16 coding system is affected similarly.
 
 ---
-** A new coding system `euc-tw' has been added for traditional Chinese
+*** A new coding system `euc-tw' has been added for traditional Chinese
 in CNS encoding; it accepts both Big 5 and CNS as input; on saving,
 Big 5 is then converted to CNS.
 
 ---
-** Many new coding systems are available by loading the `code-pages'
+*** Many new coding systems are available by loading the `code-pages'
 library.  These include complete versions of most of those in
 codepage.el, based on Unicode mappings.  `codepage-setup' is now
 obsolete and is used only in the MS-DOS port of Emacs.  windows-1252
@@ -990,82 +1175,24 @@
 latter is used by GNU locales.
 
 ---
-** New variable `utf-translate-cjk-unicode-range' controls which
+*** New variable `utf-translate-cjk-unicode-range' controls which
 Unicode characters to translate in `utf-translate-cjk-mode'.
 
 ---
-** iso-10646-1 (`Unicode') fonts can be used to display any range of
+*** iso-10646-1 (`Unicode') fonts can be used to display any range of
 characters encodable by the utf-8 coding system.  Just specify the
 fontset appropriately.
 
-+++
-** Vertical scrolling is now possible within incremental search.
-To enable this feature, customize the new user option
-`isearch-allow-scroll'.  User written commands which satisfy stringent
-constraints can be marked as "scrolling commands".  See the Emacs manual
-for details.
-
-+++
-** C-w in incremental search now grabs either a character or a word,
-making the decision in a heuristic way.  This new job is done by the
-command `isearch-yank-word-or-char'.  To restore the old behavior,
-bind C-w to `isearch-yank-word' in `isearch-mode-map'.
-
-+++
-** C-y in incremental search now grabs the next line if point is already
-at the end of a line.
-
-+++
-** C-M-w deletes and C-M-y grabs a character in isearch mode.
-Another method to grab a character is to enter the minibuffer by `M-e'
-and to type `C-f' at the end of the search string in the minibuffer.
-
-+++
-** M-% typed in isearch mode invokes `query-replace' or
-`query-replace-regexp' (depending on search mode) with the current
-search string used as the string to replace.
-
-+++
-** Isearch no longer adds `isearch-resume' commands to the command
-history by default.  To enable this feature, customize the new
-user option `isearch-resume-in-command-history'.
-
----
-** New user option `query-replace-skip-read-only': when non-nil,
-`query-replace' and related functions simply ignore
-a match if part of it has a read-only property.
-
-+++
-** When used interactively, the commands `query-replace-regexp' and
-`replace-regexp' allow \,expr to be used in a replacement string,
-where expr is an arbitrary Lisp expression evaluated at replacement
-time.  In many cases, this will be more convenient than using
-`query-replace-regexp-eval'.  `\#' in a replacement string now refers
-to the count of replacements already made by the replacement command.
-All regular expression replacement commands now allow `\?' in the
-replacement string to specify a position where the replacement string
-can be edited for each replacement.
-
-+++
-** query-replace uses isearch lazy highlighting when the new user option
-`query-replace-lazy-highlight' is non-nil.
-
----
-** The current match in query-replace is highlighted in new face
-`query-replace' which by default inherits from isearch face.
-
-+++
-** M-x compare-windows now can automatically skip non-matching text to
-resync points in both windows.
-
-+++
-** The commands M-x customize-face and M-x customize-face-other-window
+** Customize changes:
+
++++
+*** The commands M-x customize-face and M-x customize-face-other-window
 now look at the character after point.  If a face or faces are
 specified for that character, the commands by default customize those
 faces.
 
 ---
-** The face-customization widget has been reworked to be less confusing.
+*** The face-customization widget has been reworked to be less confusing.
 In particular, when you enable a face attribute using the corresponding
 check-box, there's no longer a redundant `*' option in value selection
 for that attribute; the values you can choose are only those which make
@@ -1074,11 +1201,41 @@
 case you re-select the attribute) value is hidden.
 
 +++
-** When you set or reset a variable's value in a Customize buffer,
+*** When you set or reset a variable's value in a Customize buffer,
 the previous value becomes the "backup value" of the variable.
 You can go back to that backup value by selecting "Use Backup Value"
 under the "[State]" button.
 
+** Buffer Menu changes:
+
++++
+*** New command `Buffer-menu-toggle-files-only' toggles display of file
+buffers only in the Buffer Menu.  It is bound to `T' in Buffer Menu
+mode.
+
++++
+*** `buffer-menu' and `list-buffers' now list buffers whose names begin
+with a space, when those buffers are visiting files.  Normally buffers
+whose names begin with space are omitted.
+
+---
+*** The new options `buffers-menu-show-directories' and
+`buffers-menu-show-status' let you control how buffers are displayed
+in the menu dropped down when you click "Buffers" from the menu bar.
+
+`buffers-menu-show-directories' controls whether the menu displays
+leading directories as part of the file name visited by the buffer.
+If its value is `unless-uniquify', the default, directories are
+shown unless uniquify-buffer-name-style' is non-nil.  The value of nil
+and t turn the display of directories off and on, respectively.
+
+`buffers-menu-show-status' controls whether the Buffers menu includes
+the modified and read-only status of the buffers.  By default it is
+t, and the status is shown.
+
+Setting these variables directly does not take effect until next time
+the Buffers menu is regenerated.
+
 ** Dired mode:
 
 ---
@@ -1107,36 +1264,23 @@
 into the kill ring.  With a zero prefix arg, copies absolute file names.
 
 +++
-** The variables dired-free-space-program and dired-free-space-args
+*** In Dired-x, Omitting files is now a minor mode, dired-omit-mode.
+
+The mode toggling command is bound to M-o.  A new command
+dired-mark-omitted, bound to * O, marks omitted files.  The variable
+dired-omit-files-p is obsoleted, use the mode toggling function
+instead.
+
++++
+*** The variables dired-free-space-program and dired-free-space-args
 have been renamed to directory-free-space-program and
 directory-free-space-args, and they now apply whenever Emacs puts a
 directory listing into a buffer.
 
-+++
-** Dired-x:
-
-+++
-*** Omitting files is now a minor mode, dired-omit-mode.  The mode toggling
-command is bound to M-o.  A new command dired-mark-omitted, bound to * O,
-marks omitted files.  The variable dired-omit-files-p is obsoleted, use the
-mode toggling function instead.
-
-+++
-** In Outline mode, hide-body no longer hides lines at the top
-of the file that precede the first header line.
-
-+++
-** Occur, Info, and comint-derived modes now support using
-M-x font-lock-mode to toggle fontification.  The variable
-`Info-fontify' is no longer applicable; to disable fontification,
-remove `turn-on-font-lock' from `Info-mode-hook'.
-
----
-** The terminal emulation code in term.el has been improved, it can
-run most curses applications now.
-
----
-** The comint prompt can now be made read-only, using the new user
+** Comint changes:
+
+---
+*** The comint prompt can now be made read-only, using the new user
 option `comint-prompt-read-only'.  This is not enabled by default,
 except in IELM buffers.  The read-only status of IELM prompts can be
 controlled with the new user option `ielm-prompt-read-only', which
@@ -1158,20 +1302,19 @@
 kill-ring, but does not delete it.
 
 +++
-** The new command `comint-insert-previous-argument' in comint-derived
+*** The new command `comint-insert-previous-argument' in comint-derived
 modes (shell-mode etc) inserts arguments from previous command lines,
 like bash's `ESC .' binding.  It is bound by default to `C-c .', but
 otherwise behaves quite similarly to the bash version.
 
-** `comint-use-prompt-regexp-instead-of-fields' has been renamed
+*** `comint-use-prompt-regexp-instead-of-fields' has been renamed
 `comint-use-prompt-regexp'.  The old name has been kept as an alias,
 but declared obsolete.
 
-+++
-** Telnet now prompts you for a port number with C-u M-x telnet.
-
----
-** M-x compile has become more robust and reliable
+** M-x Compile changes:
+
+---
+*** M-x compile has become more robust and reliable
 
 Quite a few more kinds of messages are recognized.  Messages that are
 recognized as warnings or informational come in orange or green, instead of
@@ -1190,8 +1333,6 @@
 
 The new file etc/compilation.txt gives examples of each type of message.
 
-** Compilation mode enhancements:
-
 +++
 *** New user option `compilation-environment'.
 This option allows you to specify environment variables for inferior
@@ -1199,19 +1340,49 @@
 subprocesses inherit.
 
 +++
-** Grep has been decoupled from compilation mode setup.
-
----
-*** There's a new separate package grep.el.
-
----
-*** M-x grep has been adapted to new compile
+*** New options `next-error-highlight' and `next-error-highlight-no-select'
+specify the method of highlighting of the corresponding source line
+in new face `next-error'.
+
++++
+*** A new minor mode `next-error-follow-minor-mode' can be used in
+compilation-mode, grep-mode, occur-mode, and diff-mode (i.e. all the
+modes that can use `next-error').  In this mode, cursor motion in the
+buffer causes automatic display in another window of the corresponding
+matches, compilation errors, etc.  This minor mode can be toggled with
+C-c C-f.
+
+** Occur mode changes:
+
++++
+*** In the *Occur* buffer, `o' switches to it in another window, and
+C-o displays the current line's occurrence in another window without
+switching to it.
+
++++
+*** You can now use next-error (C-x `) and previous-error to advance to
+the next/previous matching line found by M-x occur.
+
++++
+*** The new command `multi-occur' is just like `occur', except it can
+search multiple buffers.  There is also a new command
+`multi-occur-by-filename-regexp' which allows you to specify the
+buffers to search by their filename.  Internally, Occur mode has been
+rewritten, and now uses font-lock, among other changes.
+
+** Grep changes:
+
++++
+*** Grep has been decoupled from compilation mode setup.
+
+There's a new separate package grep.el, with its own submenu and
+customization group.
+
+---
+*** M-x grep provides highlighting support.
 
 Hits are fontified in green, and hits in binary files in orange.  Grep buffers
-can be saved and automatically revisited with the new Grep mode.
-
----
-*** Grep commands now have their own submenu and customization group.
+can be saved and automatically revisited.
 
 +++
 *** `grep-find' is now also available under the name `find-grep' where
@@ -1219,8 +1390,8 @@
 
 ---
 *** The new variables `grep-window-height', `grep-auto-highlight', and
-`grep-scroll-output' can be used to override the corresponding
-compilation mode settings for grep commands.
+`grep-scroll-output' override the corresponding compilation mode
+settings, for grep commands only.
 
 +++
 *** New option `grep-highlight-matches' highlightes matches in *grep*
@@ -1240,103 +1411,13 @@
 file.
 
 +++
-** M-x grep now tries to avoid appending `/dev/null' to the command line
+*** M-x grep now tries to avoid appending `/dev/null' to the command line
 by using GNU grep `-H' option instead.  M-x grep automatically
 detects whether this is possible or not the first time it is invoked.
 When `-H' is used, the grep command line supplied by the user is passed
 unchanged to the system to execute, which allows more complicated
 command lines to be used than was possible before.
 
-+++
-** New options `next-error-highlight' and `next-error-highlight-no-select'
-specify the method of highlighting of the corresponding source line
-in new face `next-error'.
-
-+++
-** A new minor mode `next-error-follow-minor-mode' can be used in
-compilation-mode, grep-mode, occur-mode, and diff-mode (i.e. all the
-modes that can use `next-error').  In this mode, cursor motion in the
-buffer causes automatic display in another window of the corresponding
-matches, compilation errors, etc.  This minor mode can be toggled with
-C-c C-f.
-
-+++
-** M-x diff uses diff-mode instead of compilation-mode.
-
-+++
-** In the *Occur* buffer, `o' switches to it in another window, and
-C-o displays the current line's occurrence in another window without
-switching to it.
-
-+++
-** You can now use next-error (C-x `) and previous-error to advance to
-the next/previous matching line found by M-x occur.
-
-+++
-** The new command `multi-occur' is just like `occur', except it can
-search multiple buffers.  There is also a new command
-`multi-occur-by-filename-regexp' which allows you to specify the
-buffers to search by their filename.  Internally, Occur mode has been
-rewritten, and now uses font-lock, among other changes.
-
-+++
-** font-lock: in modes like C and Lisp where the fontification assumes that
-an open-paren in column 0 is always outside of any string or comment,
-font-lock now highlights any such open-paren-in-column-zero in bold-red
-if it is inside a string or a comment, to indicate that it can cause
-trouble with fontification and/or indentation.
-
-** Enhancements to apropos commands:
-
-+++
-*** The apropos commands now accept a list of words to match.
-When more than one word is specified, at least two of those words must
-be present for an item to match.  Regular expression matching is still
-available.
-
-+++
-*** The new option `apropos-sort-by-scores' causes the matching items
-to be sorted according to their score.  The score for an item is a
-number calculated to indicate how well the item matches the words or
-regular expression that you entered to the apropos command.  The best
-match is listed first, and the calculated score is shown for each
-matching item.
-
-+++
-** You can have several Emacs servers on the same machine.
-
-	% emacs --eval '(setq server-name "foo")' -f server-start &
-	% emacs --eval '(setq server-name "bar")' -f server-start &
-	% emacsclient -s foo file1
-	% emacsclient -s bar file2
-
-+++
-** The `emacsclient' command understands the options `--eval' and
-`--display' which tell Emacs respectively to evaluate the given elisp
-expression and to use the given display when visiting files.
-
-+++
-** User option `server-mode' can be used to start a server process.
-
-+++
-** New user option `add-log-always-start-new-record'.
-When this option is enabled, M-x add-change-log-entry always
-starts a new record regardless of when the last record is.
-
-** Menu support:
-
----
-*** Dialogs and menus pop down if you type C-g.
-
----
-*** The menu item "Open File..." has been split into two items, "New File..."
-and "Open File...".  "Open File..." now opens only existing files.  This is
-to support existing GUI file selection dialogs better.
-
-+++
-*** The file selection dialog for Gtk+, Mac, W32 and Motif/Lesstif can be
-disabled by customizing the variable `use-file-dialog'.
-
 ** X Windows Support:
 
 +++
@@ -1354,7 +1435,7 @@
     (setq x-meta-keysym 'alt)
 
 +++
-*** The X resource useXIM can be used to turn off use of XIM, which may
+*** The X resource useXIM can be used to turn off use of XIM, which can
 speed up Emacs with slow networking to the X server.
 
 If the configure option `--without-xim' was used to turn off use of
@@ -1371,24 +1452,6 @@
 On the other hand, the size of the thumb does not represent the actual
 amount of text shown any more (only a crude approximation of it).
 
----
-*** The pop up menus for Lucid now stay up if you do a fast click and can
-be navigated with the arrow keys (like Gtk+, Mac and W32).
-
-+++
-*** The Lucid menus can display multilingual text in your locale.  You have
-to explicitly specify a fontSet resource for this to work, for example
-`-xrm "Emacs*fontSet:  -*-helvetica-medium-r-*--*-120-*-*-*-*-*-*,*"'.
-
----
-*** Dialogs for Lucid/Athena and Lesstif/Motif now pops down when pressing
-ESC, like they do for Gtk+, Mac and W32.
-
-+++
-** For Gtk+ version 2.4, you can make Emacs use the old file dialog
-by setting the variable `x-use-old-gtk-file-dialog' to t.  Default is to use
-the new dialog.
-
 ** Xterm support:
 
 ---
@@ -1403,7 +1466,7 @@
 These key bindings work on xterm from X.org 6.8, they might not work on
 some older versions of xterm, or on some proprietary versions.
 
-** Changes in support of colors on character terminals
+** Character terminal color support changes:
 
 +++
 *** The new command-line option --color=MODE lets you specify a standard
@@ -1432,10 +1495,12 @@
 
 ---
 *** There's a new support for colors on `rxvt' terminal emulator.
-
----
-** M-x view-file and commands that use it now avoid interfering
-with special modes such as Tar mode.
+
+* New Modes and Packages in Emacs 22.1
+
++++
+** New package benchmark.el contains simple support for convenient
+timing measurements of code (including the garbage collection component).
 
 +++
 ** Filesets are collections of files.  You can define a fileset in
@@ -1446,23 +1511,6 @@
 all the files in it, such as visiting them or searching and replacing
 in them.
 
----
-** Commands winner-redo and winner-undo, from winner.el, are now bound to
-C-c <left> and C-c <right>, respectively.  This is an incompatible change.
-
----
-** global-whitespace-mode is a new alias for whitespace-global-mode.
-
-+++
-** The command `list-text-properties-at' has been deleted because
-C-u C-x = gives the same information and more.
-
-* New modes and packages in Emacs 22.1
-
-+++
-** New package benchmark.el contains simple support for convenient
-timing measurements of code (including the garbage collection component).
-
 +++
 ** Calc is now part of the Emacs distribution.
 
@@ -1520,7 +1568,7 @@
 
 The features of cua also works with the standard emacs bindings for
 kill, copy, yank, and undo.  If you want to use cua mode, but don't
-want the C-x, C-c, C-v, and C-z bindings, you may customize the
+want the C-x, C-c, C-v, and C-z bindings, you can customize the
 `cua-enable-cua-keys' variable.
 
 Note: This version of cua mode is not backwards compatible with older
@@ -1538,7 +1586,7 @@
 filenames being entered by the user in the minibuffer are displayed, so
 that it's clear when part of the entered filename will be ignored due to
 emacs' filename parsing rules.  The ignored portion can be made dim,
-invisible, or otherwise less visually noticable.  The display method may
+invisible, or otherwise less visually noticable.  The display method can
 be displayed by customizing the variable `file-name-shadow-properties'.
 
 +++
@@ -1551,16 +1599,6 @@
 ---
 ** GDB-Script-mode is used for files like .gdbinit.
 
-+++
-** The new package gdb-ui.el provides an enhanced graphical interface to
-GDB. You can interact with GDB through the GUD buffer in the usual way, but
-there are also further buffers which control the execution and describe the
-state of your program.  It separates the input/output of your program from
-that of GDB and watches expressions in the speedbar.  It also uses features of
-Emacs 21 such as the display margin for breakpoints, and the toolbar.
-
-Use M-x gdba to start GDB-UI.
-
 ---
 ** The new package ibuffer provides a powerful, completely
 customizable replacement for buff-menu.el.
@@ -1647,12 +1685,6 @@
 similar to Refill mode, but more reliable.  To turn the word wrap
 feature off, set `longlines-auto-wrap' to nil.
 
----
-** The old Octave mode bindings C-c f and C-c i have been changed
-to C-c C-f and C-c C-i.  The C-c C-i subcommands now have duplicate
-bindings on control characters--thus, C-c C-i C-b is the same as
-C-c C-i b, and so on.
-
 ** The printing package is now part of the Emacs distribution.
 
 If you enable the printing package by including (require 'printing) in
@@ -1737,25 +1769,114 @@
 +++
 ** The wdired.el package allows you to use normal editing commands on Dired
 buffers to change filenames, permissions, etc...
+
+---
+** The TCL package tcl-mode.el was replaced by tcl.el.
+This was actually done in Emacs-21.1, and was not documented.
+
+** The new package bindat.el provides functions to unpack and pack
+binary data structures, such as network packets, to and from Lisp
+data structures.
+
++++
+** The new package button.el implements simple and fast `clickable buttons'
+in emacs buffers.  `buttons' are much lighter-weight than the `widgets'
+implemented by widget.el, and can be used by lisp code that doesn't
+require the full power of widgets.  Emacs uses buttons for such things
+as help and apropos buffers.
+
+---
+** master-mode.el implements a minor mode for scrolling a slave
+buffer without leaving your current buffer, the master buffer.
+
+It can be used by sql.el, for example: the SQL buffer is the master
+and its SQLi buffer is the slave.  This allows you to scroll the SQLi
+buffer containing the output from the SQL buffer containing the
+commands.
+
+This is how to use sql.el and master.el together: the variable
+sql-buffer contains the slave buffer.  It is a local variable in the
+SQL buffer.
+
+(add-hook 'sql-mode-hook
+   (function (lambda ()
+	       (master-mode t)
+	       (master-set-slave sql-buffer))))
+(add-hook 'sql-set-sqli-hook
+   (function (lambda ()
+	       (master-set-slave sql-buffer))))
+
++++
+** New Lisp library testcover.el works with edebug to help you determine
+whether you've tested all your Lisp code.  Function testcover-start
+instruments all functions in a given file.  Then test your code.  Function
+testcover-mark-all adds overlay "splotches" to the Lisp file's buffer to
+show where coverage is lacking.  Command testcover-next-mark (bind it to
+a key!) will move point forward to the next spot that has a splotch.
+
+Normally, a red splotch indicates the form was never completely
+evaluated; a brown splotch means it always evaluated to the same
+value.  The red splotches are skipped for forms that can't possibly
+complete their evaluation, such as `error'.  The brown splotches are
+skipped for forms that are expected to always evaluate to the same
+value, such as (setq x 14).
+
+For difficult cases, you can add do-nothing macros to your code to
+help out the test coverage tool.  The macro `noreturn' suppresses a
+red splotch.  It is an error if the argument to `noreturn' does
+return.  The macro 1value suppresses a brown splotch for its argument.
+This macro is a no-op except during test-coverage -- then it signals
+an error if the argument actually returns differing values.
 
-* Changes in specialized modes and packages:
-
-+++
-** There is a new user option `mail-default-directory' that allows you
-to specify the value of `default-directory' for mail buffers.  This
-directory is used for auto-save files of mail buffers.  It defaults to
-"~/".
-
-+++
-** Emacs can now indicate in the mode-line the presence of new e-mail
-in a directory or in a file.  See the documentation of the user option
-`display-time-mail-directory'.
+* Changes in Specialized Modes and Packages in Emacs 22.1:
+
++++
+** In Outline mode, hide-body no longer hides lines at the top
+of the file that precede the first header line.
+
++++
+** Telnet now prompts you for a port number with C-u M-x telnet.
+
+---
+** The terminal emulation code in term.el has been improved, it can
+run most curses applications now.
+
++++
+** M-x diff uses diff-mode instead of compilation-mode.
+
++++
+** You can now customize fill-nobreak-predicate to control where
+filling can break lines.  The value is now normally a list of
+functions, but it can also be a single function, for compatibility.
+
+We provide two sample predicates, fill-single-word-nobreak-p and
+fill-french-nobreak-p, for use in the value of fill-nobreak-predicate.
+
+---
+** M-x view-file and commands that use it now avoid interfering
+with special modes such as Tar mode.
+
+---
+** Commands winner-redo and winner-undo, from winner.el, are now bound to
+C-c <left> and C-c <right>, respectively.  This is an incompatible change.
+
+---
+** global-whitespace-mode is a new alias for whitespace-global-mode.
+
++++
+** M-x compare-windows now can automatically skip non-matching text to
+resync points in both windows.
+
++++
+** New user option `add-log-always-start-new-record'.
+When this option is enabled, M-x add-change-log-entry always
+starts a new record regardless of when the last record is.
 
 ---
 ** PO translation files are decoded according to their MIME headers
 when Emacs visits them.
 
-** Info mode:
+** Info mode changes:
 
 +++
 *** A numeric prefix argument of `info' selects an Info buffer
@@ -1839,7 +1960,7 @@
 `eval-print-last-sexp' (C-j) and some edebug evaluation functions.
 
 +++
-** CC Mode changes.
+** CC mode changes.
 
 *** Font lock support.
 CC Mode now provides font lock support for all its languages.  This
@@ -2130,6 +2251,12 @@
 ---
 ** Perl mode has a new variable `perl-indent-continued-arguments'.
 
+---
+** The old Octave mode bindings C-c f and C-c i have been changed
+to C-c C-f and C-c C-i.  The C-c C-i subcommands now have duplicate
+bindings on control characters--thus, C-c C-i C-b is the same as
+C-c C-i b, and so on.
+
 ** Fortran mode changes:
 
 ---
@@ -2254,6 +2381,24 @@
 *** GUD mode has its own tool bar for controlling execution of the inferior
 and other common debugger commands.
 
++++
+*** The new package gdb-ui.el provides an enhanced graphical interface to
+GDB. You can interact with GDB through the GUD buffer in the usual way, but
+there are also further buffers which control the execution and describe the
+state of your program.  It separates the input/output of your program from
+that of GDB and watches expressions in the speedbar.  It also uses features of
+Emacs 21 such as the display margin for breakpoints, and the toolbar.
+
+Use M-x gdba to start GDB-UI.
+
+*** GUD tooltips can be toggled independently of normal tooltips
+with the minor mode, gud-tooltip-mode.
+
++++
+*** In graphical mode, with a C program, GUD Tooltips have been extended to
+display the #define directive associated with an identifier when program is
+not executing.
+
 ---
 ** GUD mode improvements for jdb:
 
@@ -2306,7 +2451,7 @@
 displayed at the end of a file buffer in any window, it stays at
 the end of the buffer in that window.  This allows to tail a file:
 just put point at the end of the buffer and it stays there.  This
-rule applies to file buffers.  For non-file buffers, the behavior may
+rule applies to file buffers.  For non-file buffers, the behavior can
 be mode dependent.
 
 If you are sure that the file will only change by growing at the end,
@@ -2557,6 +2702,30 @@
 "checkout", "update" or "commit".  That means using cvs diff options
 -rBASE -rHEAD.
 
++++
+** There is a new user option `mail-default-directory' that allows you
+to specify the value of `default-directory' for mail buffers.  This
+directory is used for auto-save files of mail buffers.  It defaults to
+"~/".
+
++++
+** Emacs can now indicate in the mode-line the presence of new e-mail
+in a directory or in a file.  See the documentation of the user option
+`display-time-mail-directory'.
+
+** Rmail changes:
+
+---
+*** Rmail now displays 5-digit message ids in its summary buffer.
+
++++
+*** Support for `movemail' from GNU mailutils was added to Rmail.
+This version of `movemail' allows to read mail from a wide range of
+mailbox formats, including remote POP3 and IMAP4 mailboxes with or
+without TLS encryption.  If GNU mailutils is installed on the system
+and its version of `movemail' can be found in exec-path, it will be
+used instead of the native one.
+
 ** Gnus package
 
 ---
@@ -2569,17 +2738,6 @@
 See the file GNUS-NEWS or the node "Oort Gnus" in the Gnus manual for details.
 
 ---
-** Rmail now displays 5-digit message ids in its summary buffer.
-
-+++
-** Support for `movemail' from GNU mailutils was added to Rmail.
-This version of `movemail' allows to read mail from a wide range of
-mailbox formats, including remote POP3 and IMAP4 mailboxes with or
-without TLS encryption.  If GNU mailutils is installed on the system
-and its version of `movemail' can be found in exec-path, it will be
-used instead of the native one.
-
----
 ** MH-E changes.
 
 Upgraded to MH-E version 7.82. There have been major changes since
@@ -2770,6 +2928,24 @@
 the stroke directly to a string to insert.  This is convenient for
 using strokes as an input method.
 
+** Emacs server changes:
+
++++
+*** You can have several Emacs servers on the same machine.
+
+	% emacs --eval '(setq server-name "foo")' -f server-start &
+	% emacs --eval '(setq server-name "bar")' -f server-start &
+	% emacsclient -s foo file1
+	% emacsclient -s bar file2
+
++++
+*** The `emacsclient' command understands the options `--eval' and
+`--display' which tell Emacs respectively to evaluate the given elisp
+expression and to use the given display when visiting files.
+
++++
+*** User option `server-mode' can be used to start a server process.
+
 ---
 ** LDAP support now defaults to ldapsearch from OpenLDAP version 2.
 
@@ -2817,7 +2993,7 @@
 ---
 ** cplus-md.el has been removed to avoid problems with Custom.
 
-* Changes for non-free operating systems
+* Changes in Emacs 22.1 on non-free operating systems
 
 +++
 ** Passing resources on the command line now works on MS Windows.
@@ -2892,11 +3068,6 @@
 * Incompatible Lisp Changes in Emacs 22.1
 
 +++
-** The new interactive-specification `G' reads a file name
-much like `F', but if the input is a directory name (even defaulted),
-it returns just the directory name.
-
-+++
 ** `suppress-keymap' now works by remapping `self-insert-command' to
 the command `undefined'.  (In earlier Emacs versions, it used
 `substitute-key-definition' to rebind self inserting characters to
@@ -2906,166 +3077,145 @@
 ** Mode line display ignores text properties as well as the
 :propertize and :eval forms in the value of a variable whose
 `risky-local-variable' property is nil.
+
+---
+** Support for Mocklisp has been removed.
 
 * Lisp Changes in Emacs 22.1
 
-+++
-** The option --script FILE runs Emacs in batch mode and loads FILE.
-It is useful for writing Emacs Lisp shell script files, because they
-can start with this line:
-
-   #!/usr/bin/emacs --script
-
-+++
-** The option --directory DIR now modifies `load-path' immediately.
-Directories are added to the front of `load-path' in the order they
-appear on the command line.  For example, with this command line:
-
-  emacs -batch -L .. -L /tmp --eval "(require 'foo)"
-
-Emacs looks for library `foo' in the parent directory, then in /tmp, then
-in the other directories in `load-path'.  (-L is short for --directory.)
-
-+++
-** The default value of `sentence-end' is now defined using the new
-variable `sentence-end-without-space', which contains such characters
-that end a sentence without following spaces.
-
-The function `sentence-end' should be used to obtain the value of the
-variable `sentence-end'.  If the variable `sentence-end' is nil, then
-this function returns the regexp constructed from the variables
-`sentence-end-without-period', `sentence-end-double-space' and
-`sentence-end-without-space'.
-
-+++
-** The argument to forward-word, backward-word, forward-to-indentation
-and backward-to-indentation is now optional, and defaults to 1.
-
-+++
-** If a command sets transient-mark-mode to `only', that
-enables Transient Mark mode for the following command only.
-During that following command, the value of transient-mark-mode
-is `identity'.  If it is still `identity' at the end of the command,
-it changes to nil.
-
-+++
-** The new hook `before-save-hook' is invoked by `basic-save-buffer'
-before saving buffers.  This allows packages to perform various final
-tasks, for example; it can be used by the copyright package to make
-sure saved files have the current year in any copyright headers.
-
-+++
-** If a buffer sets buffer-save-without-query to non-nil,
-save-some-buffers will always save that buffer without asking
-(if it's modified).
-
----
-** list-buffers-noselect now takes an additional argument, BUFFER-LIST.
-If it is non-nil, it specifies which buffers to list.
-
-+++
-** The kill-buffer-hook is now permanent-local.
-
-+++
-** `auto-save-file-format' has been renamed to
-`buffer-auto-save-file-format' and made into a permanent local.
-
-+++
-** Functions `file-name-sans-extension' and `file-name-extension' now
-ignore the leading dots in file names, so that file names such as
-`.emacs' are treated as extensionless.
-
-+++
-** copy-file now takes an additional option arg MUSTBENEW.
-
-This argument works like the MUSTBENEW argument of write-file.
-
-+++
-** If the second argument to `copy-file' is the name of a directory,
-the file is copied to that directory instead of signaling an error.
-
-+++
-** `visited-file-modtime' and `calendar-time-from-absolute' now return
-a list of two integers, instead of a cons.
-
-+++
-** `file-chase-links' now takes an optional second argument LIMIT which
-specifies the maximum number of links to chase through.  If after that
-many iterations the file name obtained is still a symbolic link,
-`file-chase-links' returns it anyway.
-
-+++
-** The function `commandp' takes an additional optional
-argument.  If it is non-nil, then `commandp' checks
-for a function that could be called with `call-interactively',
-and does not return t for keyboard macros.
-
-+++
-** An interactive specification may now use the code letter 'U' to get
-the up-event that was discarded in case the last key sequence read for a
-previous 'k' or 'K' argument was a down-event; otherwise nil is used.
-
----
-** Functions y-or-n-p, read-char, read-key-sequence and the like, that
-display a prompt but don't use the minibuffer, now display the prompt
-using the text properties (esp. the face) of the prompt string.
-
-+++
-** read-from-minibuffer now accepts an additional argument KEEP-ALL
-saying to put all inputs in the history list, even empty ones.
-
-+++
-** The `read-file-name' function now takes an additional argument which
-specifies a predicate which the file name read must satify.  The
-new variable `read-file-name-predicate' contains the predicate argument
-while reading the file name from the minibuffer; the predicate in this
-variable is used by read-file-name-internal to filter the completion list.
-
----
-** The new variable `read-file-name-function' can be used by lisp code
-to override the internal read-file-name function.
-
-+++
-** The new variable `read-file-name-completion-ignore-case' specifies
-whether completion ignores case when reading a file name with the
-`read-file-name' function.
-
-+++
-** The new function `read-directory-name' can be used instead of
-`read-file-name' to read a directory name; when used, completion
-will only show directories.
-
-+++
-** The new variable search-spaces-regexp controls how to search
-for spaces in a regular expression.  If it is non-nil, it should be a
-regular expression, and any series of spaces stands for that regular
-expression.  If it is nil, spaces stand for themselves.
-
-Spaces inside of constructs such as [..] and *, +, ? are never
-replaced with search-spaces-regexp.
-
-+++
-** There are now two new regular expression operators, \_< and \_>,
-for matching the beginning and end of a symbol.  A symbol is a
-non-empty sequence of either word or symbol constituent characters, as
-specified by the syntax table.
-
-+++
-** skip-chars-forward and skip-chars-backward now handle
-character classes such as [:alpha:], along with individual characters
-and ranges.
-
----
-** In `replace-match', the replacement text no longer inherits
-properties from surrounding text.
-
-+++
-** The list returned by `(match-data t)' now has the buffer as a final
-element, if the last match was on a buffer.  `set-match-data'
-accepts such a list for restoring the match state.
-
-+++
-** Variable aliases have been implemented:
+** General Lisp changes:
+
++++
+*** The function `eql' is now available without requiring the CL package.
+
++++
+*** `makehash' is now obsolete.  Use `make-hash-table' instead.
+
++++
+*** If optional third argument APPEND to `add-to-list' is non-nil, a
+new element gets added at the end of the list instead of at the
+beginning.  This change actually occurred in Emacs-21.1, but was not
+documented.
+
++++
+*** New function `copy-tree' makes a copy of a tree, recursively copying
+both cars and cdrs.
+
++++
+*** New function `delete-dups' destructively removes `equal'
+duplicates from a list.  Of several `equal' occurrences of an element
+in the list, the first one is kept.
+
++++
+*** `declare' is now a macro.  This change was made mostly for
+documentation purposes and should have no real effect on Lisp code.
+
++++
+*** The new function `rassq-delete-all' deletes all elements from an
+alist whose cdr is `eq' to a specified value.
+
++++
+*** The function `number-sequence' returns a list of equally-separated
+numbers.  For instance, (number-sequence 4 9) returns (4 5 6 7 8 9).
+By default, the separation is 1, but you can specify a different separation
+as the third argument.  (number-sequence 1.5 6 2) returns (1.5 3.5 5.5).
+
++++
+*** The variables `most-positive-fixnum' and `most-negative-fixnum'
+hold the largest and smallest possible integer values.
+
++++
+*** The flags, width, and precision options for %-specifications in function
+`format' are now documented.  Some flags that were accepted but not
+implemented (such as "*") are no longer accepted.
+
++++
+*** Functions `get' and `plist-get' no longer signals an error for
+a malformed property list.  They also detect cyclic lists.
+
++++
+*** The new functions `lax-plist-get' and `lax-plist-put' are like
+`plist-get' and `plist-put', except that they compare the property
+name using `equal' rather than `eq'.
+
++++
+*** The new variable `print-continuous-numbering', when non-nil, says
+that successive calls to print functions should use the same
+numberings for circular structure references.  This is only relevant
+when `print-circle' is non-nil.
+
+When you bind `print-continuous-numbering' to t, you should
+also bind `print-number-table' to nil.
+
++++
+*** New function `macroexpand-all' expands all macros in a form.
+
+It is similar to the Common-Lisp function of the same name.
+One difference is that it guarantees to return the original argument
+if no expansion is done, which can be tested using `eq'.
+
++++
+*** The function `atan' now accepts an optional second argument.
+
+When called with 2 arguments, as in `(atan Y X)', `atan' returns the
+angle in radians between the vector [X, Y] and the X axis.  (This is
+equivalent to the standard C library function `atan2'.)
+
++++
+*** A function's doc string can now specify the calling pattern.
+
+You put this in the doc string's last line, which should match the
+regexp "\n\n(fn.*)\\'".
+
++++
+*** New macro `with-local-quit' temporarily sets `inhibit-quit' to nil.
+
+This is for use around potentially blocking or long-running code in
+timers and `post-command-hook' functions.
+
+***  `define-obsolete-function-alias'
+combines `defalias' and `make-obsolete'.
+
++++
+*** New function `unsafep' returns nil if the given Lisp form can't
+possibly do anything dangerous; otherwise it returns a reason why the
+form might be unsafe (calls unknown function, alters global variable,
+etc).
+
+** Lisp code indentation features:
+
++++
+*** The `defmacro' form can contain declarations specifying how to
+indent the macro in Lisp mode and how to debug it with Edebug.  The
+syntax of defmacro has been extended to
+
+   (defmacro NAME LAMBDA-LIST [DOC-STRING] [DECLARATION ...] ...)
+
+DECLARATION is a list `(declare DECLARATION-SPECIFIER ...)'.  The
+declaration specifiers supported are:
+
+(indent INDENT)
+	Set NAME's `lisp-indent-function' property to INDENT.
+
+(edebug DEBUG)
+	Set NAME's `edebug-form-spec' property to DEBUG.  (This is
+	equivalent to writing a `def-edebug-spec' for the macro.
+
+---
+*** cl-indent now allows customization of Indentation of backquoted forms.
+
+See the new user option `lisp-backquote-indentation'.
+
+---
+*** cl-indent now handles indentation of simple and extended `loop' forms.
+
+The new user options `lisp-loop-keyword-indentation',
+`lisp-loop-forms-indentation', and `lisp-simple-loop-indentation' can
+be used to customize the indentation of keywords and forms in loop
+forms.
+
++++
+** Variable aliases:
 
 *** defvaralias ALIAS-VAR BASE-VAR [DOCSTRING]
 
@@ -3087,9 +3237,492 @@
 variables, including buffer-local and frame-local variables.
 
 +++
-*** The macro define-obsolete-variable-alias combines defvaralias and
-make-obsolete-variable.  The macro define-obsolete-function-alias
-combines defalias and make-obsolete.
+*** The macro `define-obsolete-variable-alias' combines `defvaralias' and
+`make-obsolete-variable'.
+
+** defcustom changes:
+
++++
+*** defcustom and other custom declarations now use a default group
+(the last prior group defined in the same file) when no :group was given.
+
+---
+*** The new customization type `float' specifies numbers with floating
+point (no integers are allowed).
+
+** String changes:
+
++++
+*** The escape sequence \s is now interpreted as a SPACE character,
+unless it is followed by a `-' in a character constant (e.g. ?\s-A),
+in which case it is still interpreted as the super modifier.
+In strings, \s is always interpreted as a space.
+
++++
+*** A hex escape in a string forces the string to be multibyte.
+An octal escape makes it unibyte.
+
++++
+*** `split-string' now includes null substrings in the returned list if
+the optional argument SEPARATORS is non-nil and there are matches for
+SEPARATORS at the beginning or end of the string.  If SEPARATORS is
+nil, or if the new optional third argument OMIT-NULLS is non-nil, all
+empty matches are omitted from the returned list.
+
++++
+*** New function `string-to-multibyte' converts a unibyte string to a
+multibyte string with the same individual character codes.
+
++++
+*** New function `substring-no-properties returns a substring without
+text properties.
+
++++
+*** The new function `assoc-string' replaces `assoc-ignore-case' and
+`assoc-ignore-representation', which are still available, but have
+been declared obsolete.
+
+** Buffer/variable changes:
+
++++
+*** The new function `buffer-local-value' returns the buffer-local
+binding of VARIABLE (a symbol) in buffer BUFFER.  If VARIABLE does not
+have a buffer-local binding in buffer BUFFER, it returns the default
+value of VARIABLE instead.
+
++++
+** There is a new facility for displaying warnings to the user.
+
+See the functions `warn' and `display-warning' .
+
++++
+** Progress reporters.
+
+These provide a simple and uniform way for commands to present
+progress messages for the user.
+
+See the new functions `make-progress-reporter',
+`progress-reporter-update', `progress-reporter-force-update',
+`progress-reporter-done', and `dotimes-with-progress-reporter'.
+
+** Buffer positions:
+
++++
+*** Function `compute-motion' now calculates the usable window
+width if the WIDTH argument is nil.  If the TOPOS argument is nil,
+the usable window height and width is used.
+
++++
+*** The `line-move', `scroll-up', and `scroll-down' functions will now
+modify the window vscroll to scroll through display rows that are
+taller that the height of the window, for example in the presense of
+large images.  To disable this feature, Lisp code can bind the new
+variable `auto-window-vscroll' to nil.
+
++++
+*** The argument to `forward-word', `backward-word',
+`forward-to-indentation' and `backward-to-indentation' is now
+optional, and defaults to 1.
+
++++
+*** Lisp code can now test if a given buffer position is inside a
+clickable link with the new function `mouse-on-link-p'.  This is the
+function used by the new `mouse-1-click-follows-link' functionality.
+
++++
+*** New function `line-number-at-pos' returns the line number of the
+current line in the current buffer, or if optional buffer position is
+given, line number of corresponding line in current buffer.
+
++++
+*** `field-beginning' and `field-end' now accept an additional optional
+argument, LIMIT.
+
++++
+*** Function `pos-visible-in-window-p' now returns the pixel coordinates
+and partial visiblity state of the corresponding row, if the PARTIALLY
+arg is non-nil.
+
++++
+*** New functions `posn-at-point' and `posn-at-x-y' return
+click-event-style position information for a given visible buffer
+position or for a given window pixel coordinate.
+
+** Text modification:
+
++++
+*** The new function `insert-buffer-substring-as-yank' works like
+`insert-buffer-substring', but removes the text properties in the
+`yank-excluded-properties' list.
+
++++
+*** The new function `insert-buffer-substring-no-properties' is like
+insert-buffer-substring, but removes all text properties from the
+inserted substring.
+
++++
+*** The new function `filter-buffer-substring' extracts a buffer
+substring, passes it through a set of filter functions, and returns
+the filtered substring.  It is used instead of `buffer-substring' or
+`delete-and-extract-region' when copying text into a user-accessible
+data structure, like the kill-ring, X clipboard, or a register.  The
+list of filter function is specified by the new variable
+`buffer-substring-filters'.  For example, Longlines mode uses
+`buffer-substring-filters' to remove soft newlines from the copied
+text.
+
++++
+*** Function `translate-region' accepts also a char-table as TABLE
+argument.
+
++++
+*** The new translation table `translation-table-for-input'
+is used for customizing self-insertion.  The character to
+be inserted is translated through it.
+
+---
+*** Text clones.
+
+The new function `text-clone-create'.  Text clones are chunks of text
+that are kept identical by transparently propagating changes from one
+clone to the other.
+
+---
+*** The function `insert-string' is now obsolete.
+
+** Syntax table changes:
+
++++
+*** The macro `with-syntax-table' does not copy the table any more.
+
++++
+*** The new function `syntax-after' returns the syntax code
+of the character after a specified buffer position, taking account
+of text properties as well as the character code.
+
++++
+*** `syntax-class' extracts the class of a syntax code (as returned
+by syntax-after).
+
+*** The new package `syntax.el' provides an efficient way to find the
+current syntactic context (as returned by `parse-partial-sexp').
+
+** GC changes:
+
++++
+*** New variables `gc-elapsed' and `gcs-done' provide extra information
+on garbage collection.
+
++++
+*** Functions from `post-gc-hook' are run at the end of garbage
+collection.  The hook is run with GC inhibited, so use it with care.
+
+** Buffer-related changes:
+
+---
+*** `list-buffers-noselect' now takes an additional argument, BUFFER-LIST.
+If it is non-nil, it specifies which buffers to list.
+
++++
+*** `kill-buffer-hook' is now a permanent local.
+
+** Local variables lists:
+
++++
+*** Text properties in local variables.
+
+A file local variables list cannot specify a string with text
+properties--any specified text properties are discarded.
+
++++
+*** The variable `safe-local-eval-forms' specifies a list of forms that
+are ok to evaluate when they appear in an `eval' local variables
+specification.  Normally Emacs asks for confirmation before evaluating
+such a form, but if the form appears in this list, no confirmation is
+needed.
+
+---
+*** If a function has a non-nil `safe-local-eval-function' property,
+that means it is ok to evaluate some calls to that function when it
+appears in an `eval' local variables specification.  If the property
+is t, then any form calling that function with constant arguments is
+ok.  If the property is a function or list of functions, they are called
+with the form as argument, and if any returns t, the form is ok to call.
+
+If the form is not "ok to call", that means Emacs asks for
+confirmation as before.
+
+** Abbrev changes:
+
+*** The new function copy-abbrev-table returns a new abbrev table that
+is a copy of a given abbrev table.
+
++++
+*** define-abbrev now accepts an optional argument SYSTEM-FLAG.  If
+non-nil, this marks the abbrev as a "system" abbrev, which means that
+it won't be stored in the user's abbrevs file if he saves the abbrevs.
+Major modes that predefine some abbrevs should always specify this
+flag.
+
+** Undo changes:
+
++++
+*** An element of buffer-undo-list can now have the form (apply FUNNAME
+. ARGS), where FUNNAME is a symbol other than t or nil.  That stands
+for a high-level change that should be undone by evaluating (apply
+FUNNAME ARGS).
+
+These entries can also have the form (apply DELTA BEG END FUNNAME . ARGS)
+which indicates that the change which took place was limited to the
+range BEG...END and increased the buffer size by DELTA.
+
++++
+*** If the buffer's undo list for the current command gets longer than
+undo-outer-limit, garbage collection empties it.  This is to prevent
+it from using up the available memory and choking Emacs.
+
++++
+** New `yank-handler' text property can be used to control how
+previously killed text on the kill-ring is reinserted.
+
+The value of the yank-handler property must be a list with one to four
+elements with the following format:
+  (FUNCTION PARAM NOEXCLUDE UNDO).
+
+The `insert-for-yank' function looks for a yank-handler property on
+the first character on its string argument (typically the first
+element on the kill-ring).  If a yank-handler property is found,
+the normal behavior of `insert-for-yank' is modified in various ways:
+
+  When FUNCTION is present and non-nil, it is called instead of `insert'
+to insert the string.  FUNCTION takes one argument--the object to insert.
+  If PARAM is present and non-nil, it replaces STRING as the object
+passed to FUNCTION (or `insert'); for example, if FUNCTION is
+`yank-rectangle', PARAM should be a list of strings to insert as a
+rectangle.
+  If NOEXCLUDE is present and non-nil, the normal removal of the
+yank-excluded-properties is not performed; instead FUNCTION is
+responsible for removing those properties.  This may be necessary
+if FUNCTION adjusts point before or after inserting the object.
+  If UNDO is present and non-nil, it is a function that will be called
+by `yank-pop' to undo the insertion of the current object.  It is
+called with two arguments, the start and end of the current region.
+FUNCTION can set `yank-undo-function' to override the UNDO value.
+
+*** The functions kill-new, kill-append, and kill-region now have an
+optional argument to specify the yank-handler text property to put on
+the killed text.
+
+*** The function yank-pop will now use a non-nil value of the variable
+`yank-undo-function' (instead of delete-region) to undo the previous
+yank or yank-pop command (or a call to insert-for-yank).  The function
+insert-for-yank automatically sets that variable according to the UNDO
+element of the string argument's yank-handler text property if present.
+
+*** The function `insert-for-yank' now supports strings where the
+`yank-handler' property does not span the first character of the
+string.  The old behavior is available if you call
+`insert-for-yank-1' instead.
+
+*** The new function insert-for-yank normally works like `insert', but
+removes the text properties in the `yank-excluded-properties' list.
+However, the insertion of the text can be modified by a `yank-handler'
+text property.
+
+** File operation changes:
+
++++
+*** New vars `exec-suffixes' and `load-suffixes' used when
+searching for an executable resp. an elisp file.
+
++++
+*** The new primitive `set-file-times' sets a file's access and
+modification times.  Magic file name handlers can handle this
+operation.
+
++++
+*** The new function `file-remote-p' tests a file name and returns
+non-nil if it specifies a remote file (one that Emacs accesses using
+its own special methods and not directly through the file system).
+The value in that case is an identifier for the remote file system.
+
++++
+*** `auto-save-file-format' has been renamed to
+`buffer-auto-save-file-format' and made into a permanent local.
+
++++
+*** Functions `file-name-sans-extension' and `file-name-extension' now
+ignore the leading dots in file names, so that file names such as
+`.emacs' are treated as extensionless.
+
++++
+*** copy-file now takes an additional option arg MUSTBENEW.
+
+This argument works like the MUSTBENEW argument of write-file.
+
++++
+*** If the second argument to `copy-file' is the name of a directory,
+the file is copied to that directory instead of signaling an error.
+
++++
+*** `visited-file-modtime' and `calendar-time-from-absolute' now return
+a list of two integers, instead of a cons.
+
++++
+*** `file-chase-links' now takes an optional second argument LIMIT which
+specifies the maximum number of links to chase through.  If after that
+many iterations the file name obtained is still a symbolic link,
+`file-chase-links' returns it anyway.
+
++++
+*** The new hook `before-save-hook' is invoked by `basic-save-buffer'
+before saving buffers.  This allows packages to perform various final
+tasks, for example; it can be used by the copyright package to make
+sure saved files have the current year in any copyright headers.
+
++++
+*** If a buffer sets buffer-save-without-query to non-nil,
+save-some-buffers will always save that buffer without asking
+(if it's modified).
+
+*** New function `locate-file' searches for a file in a list of directories.
+`locate-file' accepts a name of a file to search (a string), and two
+lists: a list of directories to search in and a list of suffixes to
+try; typical usage might use `exec-path' and `load-path' for the list
+of directories, and `exec-suffixes' and `load-suffixes' for the list
+of suffixes.  The function also accepts a predicate argument to
+further filter candidate files.
+
+One advantage of using this function is that the list of suffixes in
+`exec-suffixes' is OS-dependant, so this function will find
+executables without polluting Lisp code with OS dependancies.
+
+---
+*** The precedence of file-name-handlers has been changed.
+Instead of blindly choosing the first handler that matches,
+find-file-name-handler now gives precedence to a file-name handler
+that matches near the end of the file name.  More specifically, the
+handler whose (match-beginning 0) is the largest is chosen.
+In case of ties, the old "first matched" rule applies.
+
++++
+*** A file name handler can declare which operations it handles.
+
+You do this by putting an `operation' property on the handler name
+symbol.  The property value should be a list of the operations that
+the handler really handles.  It won't be called for any other
+operations.
+
+This is useful for autoloaded handlers, to prevent them from being
+autoloaded when not really necessary.
+
+** Input changes:
+
++++
+*** An interactive specification can now use the code letter 'U' to get
+the up-event that was discarded in case the last key sequence read for a
+previous 'k' or 'K' argument was a down-event; otherwise nil is used.
+
++++
+*** The new interactive-specification `G' reads a file name
+much like `F', but if the input is a directory name (even defaulted),
+it returns just the directory name.
+
+---
+*** Functions y-or-n-p, read-char, read-key-sequence and the like, that
+display a prompt but don't use the minibuffer, now display the prompt
+using the text properties (esp. the face) of the prompt string.
+
++++
+*** (while-no-input BODY...) runs BODY, but only so long as no input
+arrives.  If the user types or clicks anything, BODY stops as if a
+quit had occurred.  while-no-input returns the value of BODY, if BODY
+finishes.  It returns nil if BODY was aborted.
+
+** Minibuffer changes:
+
+*** The new function `minibufferp' returns non-nil if its optional
+buffer argument is a minibuffer.  If the argument is omitted, it
+defaults to the current buffer.
+
++++
+*** New function minibuffer-selected-window returns the window which
+was selected when entering the minibuffer.
+
++++
+*** read-from-minibuffer now accepts an additional argument KEEP-ALL
+saying to put all inputs in the history list, even empty ones.
+
++++
+*** The `read-file-name' function now takes an additional argument which
+specifies a predicate which the file name read must satify.  The
+new variable `read-file-name-predicate' contains the predicate argument
+while reading the file name from the minibuffer; the predicate in this
+variable is used by read-file-name-internal to filter the completion list.
+
+---
+*** The new variable `read-file-name-function' can be used by lisp code
+to override the internal read-file-name function.
+
++++
+*** The new variable `read-file-name-completion-ignore-case' specifies
+whether completion ignores case when reading a file name with the
+`read-file-name' function.
+
++++
+*** The new function `read-directory-name' can be used instead of
+`read-file-name' to read a directory name; when used, completion
+will only show directories.
+
+** Searching and matching changes:
+
++++
+*** New function `looking-back' checks whether a regular expression matches
+the text before point.  Specifying the LIMIT argument bounds how far
+back the match can start; this is a way to keep it from taking too long.
+
++++
+*** The new variable search-spaces-regexp controls how to search
+for spaces in a regular expression.  If it is non-nil, it should be a
+regular expression, and any series of spaces stands for that regular
+expression.  If it is nil, spaces stand for themselves.
+
+Spaces inside of constructs such as [..] and *, +, ? are never
+replaced with search-spaces-regexp.
+
++++
+*** There are now two new regular expression operators, \_< and \_>,
+for matching the beginning and end of a symbol.  A symbol is a
+non-empty sequence of either word or symbol constituent characters, as
+specified by the syntax table.
+
++++
+*** skip-chars-forward and skip-chars-backward now handle
+character classes such as [:alpha:], along with individual characters
+and ranges.
+
+---
+*** In `replace-match', the replacement text no longer inherits
+properties from surrounding text.
+
++++
+*** The list returned by `(match-data t)' now has the buffer as a final
+element, if the last match was on a buffer.  `set-match-data'
+accepts such a list for restoring the match state.
+
+---
+*** rx.el has new corresponding `symbol-end' and `symbol-start' elements.
+
++++
+*** The default value of `sentence-end' is now defined using the new
+variable `sentence-end-without-space', which contains such characters
+that end a sentence without following spaces.
+
+The function `sentence-end' should be used to obtain the value of the
+variable `sentence-end'.  If the variable `sentence-end' is nil, then
+this function returns the regexp constructed from the variables
+`sentence-end-without-period', `sentence-end-double-space' and
+`sentence-end-without-space'.
 
 +++
 ** Enhancements to keymaps.
@@ -3247,76 +3880,6 @@
 finished.
 
 +++
-** Progress reporters.
-The new functions `make-progress-reporter', `progress-reporter-update',
-`progress-reporter-force-update', `progress-reporter-done', and
-`dotimes-with-progress-reporter' provide a simple and efficient way for
-a command to present progress messages for the user.
-
-+++
-** New `yank-handler' text property may be used to control how
-previously killed text on the kill-ring is reinserted.
-
-The value of the yank-handler property must be a list with one to four
-elements with the following format:
-  (FUNCTION PARAM NOEXCLUDE UNDO).
-
-The `insert-for-yank' function looks for a yank-handler property on
-the first character on its string argument (typically the first
-element on the kill-ring).  If a yank-handler property is found,
-the normal behavior of `insert-for-yank' is modified in various ways:
-
-  When FUNCTION is present and non-nil, it is called instead of `insert'
-to insert the string.  FUNCTION takes one argument--the object to insert.
-  If PARAM is present and non-nil, it replaces STRING as the object
-passed to FUNCTION (or `insert'); for example, if FUNCTION is
-`yank-rectangle', PARAM should be a list of strings to insert as a
-rectangle.
-  If NOEXCLUDE is present and non-nil, the normal removal of the
-yank-excluded-properties is not performed; instead FUNCTION is
-responsible for removing those properties.  This may be necessary
-if FUNCTION adjusts point before or after inserting the object.
-  If UNDO is present and non-nil, it is a function that will be called
-by `yank-pop' to undo the insertion of the current object.  It is
-called with two arguments, the start and end of the current region.
-FUNCTION may set `yank-undo-function' to override the UNDO value.
-
-*** The functions kill-new, kill-append, and kill-region now have an
-optional argument to specify the yank-handler text property to put on
-the killed text.
-
-*** The function yank-pop will now use a non-nil value of the variable
-`yank-undo-function' (instead of delete-region) to undo the previous
-yank or yank-pop command (or a call to insert-for-yank).  The function
-insert-for-yank automatically sets that variable according to the UNDO
-element of the string argument's yank-handler text property if present.
-
-*** The function `insert-for-yank' now supports strings where the
-`yank-handler' property does not span the first character of the
-string.  The old behavior is available if you call
-`insert-for-yank-1' instead.
-
-*** The new function insert-for-yank normally works like `insert', but
-removes the text properties in the `yank-excluded-properties' list.
-However, the insertion of the text may be modified by a `yank-handler'
-text property.
-
-+++
-** An element of buffer-undo-list can now have the form (apply FUNNAME
-. ARGS), where FUNNAME is a symbol other than t or nil.  That stands
-for a high-level change that should be undone by evaluating (apply
-FUNNAME ARGS).
-
-These entries can also have the form (apply DELTA BEG END FUNNAME . ARGS)
-which indicates that the change which took place was limited to the
-range BEG...END and increased the buffer size by DELTA.
-
-+++
-** If the buffer's undo list for the current command gets longer than
-undo-outer-limit, garbage collection empties it.  This is to prevent
-it from using up the available memory and choking Emacs.
-
-+++
 ** Enhancements to process support
 
 *** Function list-processes now has an optional argument; if non-nil,
@@ -3355,25 +3918,27 @@
 from such processes, to allowing them to produce more output before
 emacs tries to read it.
 
-*** The new function `call-process-shell-command' executes a shell
-command command synchronously in a separate process.
+*** The new function `call-process-shell-command'.
+
+This executes a shell command command synchronously in a separate
+process.
 
 *** The new function `process-file' is similar to `call-process', but
 obeys file handlers.  The file handler is chosen based on
-default-directory.
-
-*** The new function `set-process-filter-multibyte' sets the
-multibyteness of a string given to a process's filter.
-
-*** The new function `process-filter-multibyte-p' returns t if a
-string given to a process's filter is multibyte.
+`default-directory'.
 
 *** A filter function of a process is called with a multibyte string
 if the filter's multibyteness is t.  That multibyteness is decided by
 the value of `default-enable-multibyte-characters' when the process is
 created and can be changed later by `set-process-filter-multibyte'.
 
-*** If a process's coding system is raw-text or no-conversion and its
+*** The new function `set-process-filter-multibyte' sets the
+multibyteness of the strings passed to the process's filter.
+
+*** The new function `process-filter-multibyte-p' returns the
+multibyteness of the strings passed to the process's filter.
+
+*** If a process's coding system is `raw-text' or `no-conversion' and its
 buffer is multibyte, the output of the process is at first converted
 to multibyte by `string-to-multibyte' then inserted in the buffer.
 Previously, it was converted to multibyte by `string-as-multibyte',
@@ -3391,7 +3956,7 @@
 - A server can open on a random port using :service t arg.
 - Local sockets are supported using :family 'local arg.
 - Non-blocking connect is supported using :nowait t arg.
-- The process' property list may be initialized using :plist PLIST arg;
+- The process' property list can be initialized using :plist PLIST arg;
   a copy of the server process' property list is automatically inherited
   by new client processes created to handle incoming connections.
 
@@ -3458,31 +4023,19 @@
 sentinel when the connection is closed by the remote peer has been
 changed to "connection broken by remote peer".
 
-+++
-** New function `force-window-update' can initiate a full redisplay of
-one or all windows.  Normally, this is not needed as changes in window
-contents are detected automatically.  However, certain implicit
-changes to mode lines, header lines, or display properties may require
-forcing an explicit window update.
-
-+++
-** The line-move, scroll-up, and scroll-down functions will now
-modify the window vscroll to scroll through display rows that are
-taller that the height of the window, for example in the presense of
-large images.  To disable this feature, Lisp code may bind the new
-variable `auto-window-vscroll' to nil.
-
-+++
-** Function `compute-motion' now calculates the usable window
-width if the WIDTH argument is nil.  If the TOPOS argument is nil,
-the usable window height and width is used.
-
-+++
-** Function pos-visible-in-window-p now returns the pixel coordinates
-and partial visiblity state of the corresponding row, if the PARTIALLY
-arg is non-nil.
-
-** Changes in using window objects:
+** Using window objects:
+
++++
+*** New function `window-body-height'.
+
+This is like `window-height' but does not count the mode line or the
+header line.
+
++++
+*** New function `window-body-height'.
+
+This is like window-height but does not count the mode line
+or the header line.
 
 +++
 *** You can now make a window as short as one line.
@@ -3505,11 +4058,12 @@
 
 +++
 *** The new macro `with-selected-window' temporarily switches the
-selected window without impacting the order of buffer-list.
-
-+++
-*** `select-window' takes an optional second argument `norecord', like
-`switch-to-buffer'.
+selected window without impacting the order of `buffer-list'.
+
++++
+*** `select-window' takes an optional second argument `norecord'.
+
+This is like `switch-to-buffer'.
 
 +++
 *** `save-selected-window' now saves and restores the selected window
@@ -3517,32 +4071,33 @@
 by calling `select-window'.
 
 +++
-*** The function `set-window-buffer' now has an optional third argument
-KEEP-MARGINS which will preserve the window's current margin, fringe,
-and scroll-bar settings if non-nil.
+*** `set-window-buffer' has an optional argument KEEP-MARGINS.
+
+If non-nil, that says to preserve the window's current margin, fringe,
+and scroll-bar settings.
 
 +++
 ** Customizable fringe bitmaps
 
-*** New function 'define-fringe-bitmap' can now be used to create new
+*** New function `define-fringe-bitmap' can now be used to create new
 fringe bitmaps, as well as change the built-in fringe bitmaps.
 
 To change a built-in bitmap, do (require 'fringe) and use the symbol
 identifing the bitmap such as `left-truncation or `continued-line'.
 
-*** New function 'destroy-fringe-bitmap' may be used to destroy a
-previously created bitmap, or restore a built-in bitmap.
-
-*** New function 'set-fringe-bitmap-face' can now be used to set a
+*** New function `destroy-fringe-bitmap' deletes a fringe bitmap
+or restores a built-in one to its default value.
+
+*** New function `set-fringe-bitmap-face' can now be used to set a
 specific face to be used for a specific fringe bitmap.  The face is
 automatically merged with the `fringe' face, so normally, the face
 should only specify the foreground color of the bitmap.
 
-*** There are new display properties, left-fringe and right-fringe,
+*** There are new display properties, `left-fringe; and `right-fringe',
 that can be used to show a specific bitmap in the left or right fringe
 bitmap of the display line.
 
-Format is 'display '(left-fringe BITMAP [FACE]), where BITMAP is a
+Format is `display (left-fringe BITMAP [FACE])', where BITMAP is a
 symbol identifying a fringe bitmap, either built-in or defined with
 `define-fringe-bitmap', and FACE is an optional face name to be used
 for displaying the bitmap instead of the default `fringe' face.
@@ -3551,8 +4106,10 @@
 *** New function `fringe-bitmaps-at-pos' returns the current fringe
 bitmaps in the display line at a given buffer position.
 
-+++
-** Controlling the default left and right fringe widths.
+** Other window fringe features:
+
++++
+*** Controlling the default left and right fringe widths.
 
 The default left and right fringe widths for all windows of a frame
 can now be controlled by setting the `left-fringe' and `right-fringe'
@@ -3572,9 +4129,9 @@
 fringe bitmaps is 8 pixels.
 
 +++
-** Per-window fringe and scrollbar settings
-
-*** Windows can now have their own individual fringe widths and
+*** Per-window fringe and scrollbar settings
+
+**** Windows can now have their own individual fringe widths and
 position settings.
 
 To control the fringe widths of a window, either set the buffer-local
@@ -3592,7 +4149,7 @@
 displaying the buffer in a window, or use `set-window-buffer' to force
 an update of the display margins.
 
-*** Windows can now have their own individual scroll-bar settings
+**** Windows can now have their own individual scroll-bar settings
 controlling the width and position of scroll-bars.
 
 To control the scroll-bar of a window, either set the buffer-local
@@ -3603,17 +4160,34 @@
 the buffer in a window, or use `set-window-buffer' to force an update
 of the display margins.
 
-+++
-** When using non-toolkit scroll bars with the default width,
-the scroll-bar-width frame parameter value is nil.
-
-+++
-** Multiple overlay arrows can now be defined and managed via the new
-variable `overlay-arrow-variable-list'.  It contains a list of
-varibles which contain overlay arrow position markers, including
-the original `overlay-arrow-position' variable.
-
-Each variable on this list may have individual `overlay-arrow-string'
+** Redisplay features:
+
++++
+*** `sit-for' can now be called with args (SECONDS &optional NODISP).
+
++++
+*** New function `force-window-update' can initiate a full redisplay of
+one or all windows.  Normally, this is not needed as changes in window
+contents are detected automatically.  However, certain implicit
+changes to mode lines, header lines, or display properties may require
+forcing an explicit window update.
+
++++
+*** (char-displayable-p CHAR) returns non-nil if Emacs ought to be able
+to display CHAR.  More precisely, if the selected frame's fontset has
+a font to display the character set that CHAR belongs to.
+
+Fontsets can specify a font on a per-character basis; when the fontset
+does that, this value cannot be accurate.
+
++++
+*** You can define multiple overlay arrows via the new
+variable `overlay-arrow-variable-list'.
+
+It contains a list of varibles which contain overlay arrow position
+markers, including the original `overlay-arrow-position' variable.
+
+Each variable on this list can have individual `overlay-arrow-string'
 and `overlay-arrow-bitmap' properties that specify an overlay arrow
 string (for non-window terminals) or fringe bitmap (for window
 systems) to display at the corresponding overlay arrow position.
@@ -3621,52 +4195,52 @@
 'overlay-arrow-fringe-bitmap' will be used.
 
 +++
-** New line-height and line-spacing properties for newline characters
-
-A newline may now have line-height and line-spacing text or overlay
+*** New `line-height' and `line-spacing' properties for newline characters
+
+A newline can now have `line-height' and `line-spacing' text or overlay
 properties that control the height of the corresponding display row.
 
-If the line-height property value is t, the newline does not
+If the `line-height' property value is t, the newline does not
 contribute to the height of the display row; instead the height of the
-newline glyph is reduced.  Also, a line-spacing property on this
+newline glyph is reduced.  Also, a `line-spacing' property on this
 newline is ignored.  This can be used to tile small images or image
 slices without adding blank areas between the images.
 
-If the line-height property value is a positive integer, the value
+If the `line-height' property value is a positive integer, the value
 specifies the minimum line height in pixels.  If necessary, the line
 height it increased by increasing the line's ascent.
 
-If the line-height property value is a float, the minimum line height
-is calculated by multiplying the default frame line height by the
-given value.
-
-If the line-height property value is a cons (FACE . RATIO), the
+If the `line-height' property value is a float, the minimum line
+height is calculated by multiplying the default frame line height by
+the given value.
+
+If the `line-height' property value is a cons (FACE . RATIO), the
 minimum line height is calculated as RATIO * height of named FACE.
 RATIO is int or float.  If FACE is t, it specifies the current face.
 
-If the line-height property value is a cons (nil . RATIO), the line
+If the `line-height' property value is a cons (nil . RATIO), the line
 height is calculated as RATIO * actual height of the line's contents.
 
-If the line-height value is a cons (HEIGHT . TOTAL), HEIGHT specifies
+If the `line-height' value is a cons (HEIGHT . TOTAL), HEIGHT specifies
 the line height as described above, while TOTAL is any of the forms
 described above and specifies the total height of the line, causing a
 varying number of pixels to be inserted after the line to make it line
 exactly that many pixels high.
 
-If the line-spacing property value is an positive integer, the value
+If the `line-spacing' property value is an positive integer, the value
 is used as additional pixels to insert after the display line; this
-overrides the default frame line-spacing and any buffer local value of
-the line-spacing variable.
-
-If the line-spacing property may be a float or cons, the line spacing
-is calculated as specified above for the line-height property.
-
-+++
-** The buffer local line-spacing variable may now have a float value,
+overrides the default frame `line-spacing' and any buffer local value of
+the `line-spacing' variable.
+
+If the `line-spacing' property is a float or cons, the line spacing
+is calculated as specified above for the `line-height' property.
+
++++
+*** The buffer local line-spacing variable can now have a float value,
 which is used as a height relative to the default frame line height.
 
 +++
-** Enhancements to stretch display properties
+*** Enhancements to stretch display properties
 
 The display property stretch specification form `(space PROPS)', where
 PROPS is a property list now allows pixel based width and height
@@ -3723,27 +4297,37 @@
 The form `(- EXPR ...)' negates or subtracts the value of the expressions.
 
 +++
-** Support for displaying image slices
-
-*** New display property (slice X Y WIDTH HEIGHT) may be used with
+*** Normally, the cursor is displayed at the end of any overlay and
+text property string that may be present at the current window
+position.  The cursor can now be placed on any character of such
+strings by giving that character a non-nil `cursor' text property.
+
++++
+*** The display space :width and :align-to text properties are now
+supported on text terminals.
+
++++
+*** Support for displaying image slices
+
+**** New display property (slice X Y WIDTH HEIGHT) can be used with
 an image property to display only a specific slice of the image.
 
-*** Function insert-image has new optional fourth arg to
+**** Function insert-image has new optional fourth arg to
 specify image slice (X Y WIDTH HEIGHT).
 
-*** New function insert-sliced-image inserts a given image as a
+**** New function insert-sliced-image inserts a given image as a
 specified number of evenly sized slices (rows x columns).
 
 +++
-** Images may now have an associated image map via the :map property.
+*** Images can now have an associated image map via the :map property.
 
 An image map is an alist where each element has the format (AREA ID PLIST).
 An AREA is specified as either a rectangle, a circle, or a polygon:
-A rectangle is a cons (rect . ((x0 . y0) . (x1 . y1))) specifying the
+A rectangle is a cons (rect . ((X0 . Y0) . (X1 . Y1))) specifying the
 pixel coordinates of the upper left and bottom right corners.
-A circle is a cons (circle . ((x0 . y0) . r)) specifying the center
-and the radius of the circle; r may be a float or integer.
-A polygon is a cons (poly . [x0 y0 x1 y1 ...]) where each pair in the
+A circle is a cons (circle . ((X0 . Y0) . R)) specifying the center
+and the radius of the circle; R can be a float or integer.
+A polygon is a cons (poly . [X0 Y0 X1 Y1 ...]) where each pair in the
 vector describes one corner in the polygon.
 
 When the mouse pointer is above a hot-spot area of an image, the
@@ -3757,25 +4341,22 @@
 an event is composed by combining the ID of the hot-spot with the
 mouse event, e.g. [area4 mouse-1] if the hot-spot's ID is `area4'.
 
+** Mouse pointer features:
+
 +++ (lispref)
 ??? (man)
-** The mouse pointer shape in void text areas (i.e. after the end of a
+*** The mouse pointer shape in void text areas (i.e. after the end of a
 line or below the last line in the buffer) of the text window is now
 controlled by the new variable `void-text-area-pointer'.  The default
 is to use the `arrow' (non-text) pointer.  Other choices are `text'
 (or nil), `hand', `vdrag', `hdrag', `modeline', and `hourglass'.
 
 +++
-** The mouse pointer shape over an image can now be controlled by the
+*** The mouse pointer shape over an image can now be controlled by the
 :pointer image property.
 
 +++
-** Lisp code can now test if a given buffer position is inside a
-clickable link with the new function `mouse-on-link-p'.  This is the
-function used by the new `mouse-1-click-follows-link' functionality.
-
-+++
-** The mouse pointer shape over ordinary text or images may now be
+*** The mouse pointer shape over ordinary text or images can now be
 controlled/overriden via the `pointer' text property.
 
 ** Mouse event enhancements:
@@ -3809,7 +4390,7 @@
 *** New function `posn-actual-col-row' returns actual glyph coordinates.
 
 +++
-*** Mouse events may now include image object in addition to string object.
+*** Mouse events can now include image object in addition to string object.
 
 +++
 *** Mouse events include relative x and y pixel coordinates relative to
@@ -3825,33 +4406,14 @@
 click, the x and y pixel coordinates relative to the top left corner
 of that object, and the total width and height of that object.
 
-+++
-** At the end of a command, point moves out from within invisible
-text, in the same way it moves out from within text covered by an
-image or composition property.
-
-This makes it generally unnecessary to mark invisible text as intangible.
-This is particularly good because the intangible property often has
-unexpected side-effects since the property applies to everything
-(including `goto-char', ...) whereas this new code is only run after
-post-command-hook and thus does not care about intermediate states.
-
-+++
-** Normally, the cursor is displayed at the end of any overlay and
-text property string that may be present at the current window
-position.  The cursor may now be placed on any character of such
-strings by giving that character a non-nil `cursor' text property.
-
-+++
-** The display space :width and :align-to text properties are now
-supported on text terminals.
-
-+++
-** Arguments for remove-overlays are now optional, so that you can
-remove all overlays in the buffer by just calling (remove-overlay).
-
-+++
-** New variable char-property-alias-alist.
+** Text property and overlay changes:
+
++++
+*** Arguments for remove-overlays are now optional, so that you can
+remove all overlays in the buffer by just calling (remove-overlays).
+
++++
+*** New variable char-property-alias-alist.
 
 This variable allows you to create alternative names for text
 properties.  It works at the same level as `default-text-properties',
@@ -3859,36 +4421,29 @@
 to implement the `font-lock-face' property.
 
 +++
-** New function `get-char-property-and-overlay' accepts the same
+*** New function `get-char-property-and-overlay' accepts the same
 arguments as `get-char-property' and returns a cons whose car is the
 return value of `get-char-property' called with those arguments and
 whose cdr is the overlay in which the property was found, or nil if
 it was found as a text property or not found at all.
 
 +++
-** The new frame parameter `tty-color-mode' specifies the mode to use
-for color support on character terminal frames.  Its value can be a
-number of colors to support, or a symbol.  See the Emacs Lisp
-Reference manual for more detailed documentation.
-
-+++
-** The new face attribute `min-colors' can be used to tailor the face
-color to the number of colors supported by a display, and define the
-foreground and background colors accordingly so that they look best on
-a terminal that supports at least this many colors.  This is now the
-preferred method for defining default faces in a way that makes a good
-use of the capabilities of the display.
-
-+++
-** (char-displayable-p CHAR) returns non-nil if Emacs ought to be able
-to display CHAR.  More precisely, if the selected frame's fontset has
-a font to display the character set that CHAR belongs to.
-
-Fontsets can specify a font on a per-character basis; when the fontset
-does that, this value may not be accurate.
-
-+++
-** New function display-supports-face-attributes-p may be used to test
+*** The new function remove-list-of-text-properties is almost the same
+as `remove-text-properties'.  The only difference is that it takes a
+list of property names as argument rather than a property list.
+
+** Face changes
+
++++
+*** The new face attribute condition `min-colors' can be used to tailor
+the face color to the number of colors supported by a display, and
+define the foreground and background colors accordingly so that they
+look best on a terminal that supports at least this many colors.  This
+is now the preferred method for defining default faces in a way that
+makes a good use of the capabilities of the display.
+
++++
+*** New function display-supports-face-attributes-p can be used to test
 whether a given set of face attributes is actually displayable.
 
 A new predicate `supports' has also been added to the `defface' face
@@ -3896,68 +4451,83 @@
 defined with defface.
 
 ---
-** The special treatment of faces whose names are of the form `fg:COLOR'
+*** The special treatment of faces whose names are of the form `fg:COLOR'
 or `bg:COLOR' has been removed.  Lisp programs should use the
 `defface' facility for defining faces with specific colors, or use
 the feature of specifying the face attributes :foreground and :background
 directly in the `face' property instead of using a named face.
 
 +++
-** The first face specification element in a defface can specify
+*** The first face specification element in a defface can specify
 `default' instead of frame classification.  Then its attributes act as
-defaults that apply to all the subsequent cases (and may be overridden
+defaults that apply to all the subsequent cases (and can be overridden
 by them).
 
 +++
-** The variable `face-font-rescale-alist' specifies how much larger
+*** The variable `face-font-rescale-alist' specifies how much larger
 (or smaller) font we should use.  For instance, if the value is
 '((SOME-FONTNAME-PATTERN . 1.3)) and a face requests a font of 10
 point, we actually use a font of 13 point if the font matches
 SOME-FONTNAME-PATTERN.
 
 ---
-** `set-fontset-font', `fontset-info', `fontset-font' now operate on
+*** The function `face-differs-from-default-p' now truly checks
+whether the given face displays differently from the default face or
+not (previously it did only a very cursory check).
+
++++
+*** `face-attribute', `face-foreground', `face-background', and
+`face-stipple' now accept a new optional argument, INHERIT, which
+controls how face inheritance is used when determining the value of a
+face attribute.
+
++++
+*** New functions `face-attribute-relative-p' and `merge-face-attribute'
+help with handling relative face attributes.
+
++++
+*** The priority of faces in an :inherit attribute face list is reversed.
+
+If a face contains an :inherit attribute with a list of faces, earlier
+faces in the list override later faces in the list; in previous
+releases of Emacs, the order was the opposite.  This change was made
+so that :inherit face lists operate identically to face lists in text
+`face' properties.
+
++++
+*** New standard font-lock face `font-lock-preprocessor-face'.
+
+---
+*** `set-fontset-font', `fontset-info', `fontset-font' now operate on
 the default fontset if the argument NAME is nil..
 
----
-** The function face-differs-from-default-p now truly checks whether the
-given face displays differently from the default face or not (previously
-it did only a very cursory check).
-
-+++
-** face-attribute, face-foreground, face-background, and face-stipple now
-accept a new optional argument, INHERIT, which controls how face
-inheritance is used when determining the value of a face attribute.
-
-+++
-** New functions face-attribute-relative-p and merge-face-attribute
-help with handling relative face attributes.
-
-+++
-** The priority of faces in an :inherit attribute face-list is reversed.
-If a face contains an :inherit attribute with a list of faces, earlier
-faces in the list override later faces in the list; in previous releases
-of Emacs, the order was the opposite.  This change was made so that
-:inherit face-lists operate identically to face-lists in text `face'
-properties.
-
-+++
-** New standard font-lock face `font-lock-preprocessor-face'.
-
-+++
-** New special text property `font-lock-face'.
+** Font-Lock changes:
+
++++
+*** New special text property `font-lock-face'.
 
 This property acts like the `face' property, but it is controlled by
 M-x font-lock-mode.  It is not, strictly speaking, a builtin text
 property.  Instead, it is implemented inside font-core.el, using the
 new variable `char-property-alias-alist'.
 
----
-** jit-lock obeys a new text-property `jit-lock-defer-multiline'.
++++
+*** font-lock can manage arbitrary text-properties beside `face'.
+
+*** the FACENAME returned in `font-lock-keywords' can be a list of the
+form (face FACE PROP1 VAL1 PROP2 VAL2 ...) so you can set other
+properties than `face'.
+
+*** `font-lock-extra-managed-props' can be set to make sure those
+extra properties are automatically cleaned up by font-lock.
+
+---
+*** jit-lock obeys a new text-property `jit-lock-defer-multiline'.
+
 If a piece of text with that property gets contextually refontified
-(see jit-lock-defer-contextually), then all of that text will
+(see `jit-lock-defer-contextually'), then all of that text will
 be refontified.  This is useful when the syntax of a textual element
-depends on text several lines further down (and when font-lock-multiline
+depends on text several lines further down (and when `font-lock-multiline'
 is not appropriate to solve that problem).  For example in Perl:
 
 	s{
@@ -3967,160 +4537,123 @@
 	}e
 
 Adding/removing the last `e' changes the `bar' from being a piece of
-text to being a piece of code, so you'd put a jit-lock-defer-multiline
+text to being a piece of code, so you'd put a `jit-lock-defer-multiline'
 property over the second half of the command to force (deferred)
 refontification of `bar' whenever the `e' is added/removed.
 
-+++
-** font-lock can manage arbitrary text-properties beside `face'.
-*** the FACENAME returned in font-lock-keywords can be a list
-of the form (face FACE PROP1 VAL1 PROP2 VAL2 ...) so you can set
-other properties than `face'.
-*** font-lock-extra-managed-props can be set to make sure those extra
-properties are automatically cleaned up by font-lock.
-
----
-** The precedence of file-name-handlers has been changed.
-Instead of blindly choosing the first handler that matches,
-find-file-name-handler now gives precedence to a file-name handler
-that matches near the end of the file name.  More specifically, the
-handler whose (match-beginning 0) is the largest is chosen.
-In case of ties, the old "first matched" rule applies.
-
-+++
-** A file name handler can declare which operations it handles.
-
-You do this by putting an `operation' property on the handler name
-symbol.  The property value should be a list of the operations that
-the handler really handles.  It won't be called for any other
-operations.
-
-This is useful for autoloaded handlers, to prevent them from being
-autoloaded when not really necessary.
-
-+++
-** `set-auto-mode' now gives the interpreter magic line (if present)
-precedence over the file name.  Likewise an <?xml or <!DOCTYPE declaration
-will give the buffer XML or SGML mode, based on the new var
-`magic-mode-alist'.
-
-+++
-** Major mode functions now run the new normal hook
+** Major mode mechanism changes:
+
++++
+*** `set-auto-mode' now gives the interpreter magic line (if present)
+precedence over the file name.  Likewise an `<?xml' or `<!DOCTYPE'
+declaration will give the buffer XML or SGML mode, based on the new
+var `magic-mode-alist'.
+
++++
+*** Major mode functions now run the new normal hook
 `after-change-major-mode-hook', at their very end, after the mode hooks.
 
 ---
-** If a major mode function has a non-nil `no-clone-indirect'
+*** If a major mode function has a non-nil `no-clone-indirect'
 property, `clone-indirect-buffer' signals an error if you use
 it in that buffer.
 
 +++
-** Major modes can define `eldoc-documentation-function'
+*** Major modes can define `eldoc-documentation-function'
 locally to provide Eldoc functionality by some method appropriate to
 the language.
 
 +++
-** define-derived-mode by default creates a new empty abbrev table.
+*** `define-derived-mode' by default creates a new empty abbrev table.
 It does not copy abbrevs from the parent mode's abbrev table.
 
 +++
-** define-minor-mode now accepts arbitrary additional keyword arguments
-and simply passes them to defcustom, if applicable.
-
-+++
-** The new function `run-mode-hooks' and the new macro `delay-mode-hooks'
-are used by define-derived-mode to make sure the mode hook for the
+*** The new function `run-mode-hooks' and the new macro `delay-mode-hooks'
+are used by `define-derived-mode' to make sure the mode hook for the
 parent mode is run at the end of the child mode.
 
-+++
-** `minor-mode-list' now holds a list of minor mode commands.
-
-+++
-** Both the variable and the function `disabled-command-hook' have
+** Minor mode changes:
+
++++
+*** `define-minor-mode' now accepts arbitrary additional keyword arguments
+and simply passes them to `defcustom', if applicable.
+
++++
+*** `minor-mode-list' now holds a list of minor mode commands.
+
+---
+*** `define-global-minor-mode'.
+
+This is a new name for what was formerly called
+`easy-mmode-define-global-mode'.  The old name remains as an alias.
+
+** Command loop changes:
+
++++
+*** The new function `called-interactively-p' does what many people
+have mistakenly believed `interactive-p' did: it returns t if the
+calling function was called through `call-interactively'.  This should
+only be used when you cannot solve the problem by adding a new
+INTERACTIVE argument to the command.
+
++++
+*** The function `commandp' takes an additional optional argument.
+
+If it is non-nil, then `commandp' checks for a function that could be
+called with `call-interactively', and does not return t for keyboard
+macros.
+
++++
+*** When a command returns, the command loop moves point out from
+within invisible text, in the same way it moves out from within text
+covered by an image or composition property.
+
+This makes it generally unnecessary to mark invisible text as intangible.
+This is particularly good because the intangible property often has
+unexpected side-effects since the property applies to everything
+(including `goto-char', ...) whereas this new code is only run after
+`post-command-hook' and thus does not care about intermediate states.
+
++++
+*** If a command sets `transient-mark-mode' to `only', that
+enables Transient Mark mode for the following command only.
+During that following command, the value of `transient-mark-mode'
+is `identity'.  If it is still `identity' at the end of the command,
+the next return to the command loop changes to nil.
+
++++
+*** Both the variable and the function `disabled-command-hook' have
 been renamed to `disabled-command-function'.  The variable
 `disabled-command-hook' has been kept as an obsolete alias.
 
 +++
-** The function `eql' is now available without requiring the CL package.
-
-+++
-** If optional third argument APPEND to `add-to-list' is non-nil, a
-new element gets added at the end of the list instead of at the
-beginning.  This change actually occurred in Emacs-21.1, but was not
-documented.
-
-+++
-** The escape sequence \s is now interpreted as a SPACE character,
-unless it is followed by a `-' in a character constant (e.g. ?\s-A),
-in which case it is still interpreted as the super modifier.
-In strings, \s is always interpreted as a space.
-
-+++
-** A hex escape in a string forces the string to be multibyte.
-An octal escape makes it unibyte.
-
-+++
-** `split-string' now includes null substrings in the returned list if
-the optional argument SEPARATORS is non-nil and there are matches for
-SEPARATORS at the beginning or end of the string.  If SEPARATORS is
-nil, or if the new optional third argument OMIT-NULLS is non-nil, all
-empty matches are omitted from the returned list.
-
-+++
-** New function `string-to-multibyte' converts a unibyte string to a
-multibyte string with the same individual character codes.
-
-+++
-** The function `number-sequence' returns a list of equally-separated
-numbers.  For instance, (number-sequence 4 9) returns (4 5 6 7 8 9).
-By default, the separation is 1, but you can specify a different separation
-as the third argument.  (number-sequence 1.5 6 2) returns (1.5 3.5 5.5).
-
-+++
-** `sit-for' can now be called with args (SECONDS &optional NODISP).
-
-+++
-** A function's docstring can now hold the function's usage info on
-its last line.  It should match the regexp "\n\n(fn.*)\\'".
-
-+++
-** The `defmacro' form may contain declarations specifying how to
-indent the macro in Lisp mode and how to debug it with Edebug.  The
-syntax of defmacro has been extended to
-
-   (defmacro NAME LAMBDA-LIST [DOC-STRING] [DECLARATION ...] ...)
-
-DECLARATION is a list `(declare DECLARATION-SPECIFIER ...)'.  The
-declaration specifiers supported are:
-
-(indent INDENT)
-	Set NAME's `lisp-indent-function' property to INDENT.
-
-(edebug DEBUG)
-	Set NAME's `edebug-form-spec' property to DEBUG.  (This is
-	equivalent to writing a `def-edebug-spec' for the macro.
-
-+++
-** The functions all-completions and try-completion now accept lists
+*** `emacsserver' now runs `pre-command-hook' and `post-command-hook'
+when it receives a request from emacsclient.
+
+** Minibuffer changes:
+
++++
+*** The functions all-completions and try-completion now accept lists
 of strings as well as hash-tables additionally to alists, obarrays
 and functions.  Furthermore, the function `test-completion' is now
-exported to Lisp.  The keys in alists and hash tables may be either
+exported to Lisp.  The keys in alists and hash tables can be either
 strings or symbols, which are automatically converted with to strings.
 
 +++
-** The new macro dynamic-completion-table supports using functions
+*** The new macro `dynamic-completion-table' supports using functions
 as a dynamic completion table.
 
   (dynamic-completion-table FUN)
 
 FUN is called with one argument, the string for which completion is required,
 and it should return an alist containing all the intended possible
-completions. This alist may be a full list of possible completions so that FUN
-can ignore the value of its argument. If completion is performed in the
+completions.  This alist can be a full list of possible completions so that FUN
+can ignore the value of its argument.  If completion is performed in the
 minibuffer, FUN will be called in the buffer from which the minibuffer was
-entered. dynamic-completion-table then computes the completion.
-
-+++
-** The new macro lazy-completion-table initializes a variable
+entered.  `dynamic-completion-table' then computes the completion.
+
++++
+*** The new macro `lazy-completion-table' initializes a variable
 as a lazy completion table.
 
   (lazy-completion-table VAR FUN &rest ARGS)
@@ -4132,34 +4665,32 @@
 from which the minibuffer was entered. The return value of
 `lazy-completion-table' must be used to initialize the value of VAR.
 
-+++
-** `load-history' can now have elements of the form (t . FUNNAME),
+** Lisp file loading changes:
+
++++
+*** `load-history' can now have elements of the form (t . FUNNAME),
 which means FUNNAME was previously defined as an autoload (before the
 current file redefined it).
 
 +++
-** `load-history' now records (defun . FUNNAME) when a function is
+*** `load-history' now records (defun . FUNNAME) when a function is
 defined.  For a variable, it records just the variable name.
 
----
-** The variable `recursive-load-depth-limit' has been deleted.
++++
+*** The function symbol-file can now search specifically for function or
+variable definitions.
+
++++
+*** `provide' and `featurep' now accept an optional second argument
+to test/provide subfeatures.  Also `provide' now checks `after-load-alist'
+and runs any code associated with the provided feature.
+
+---
+*** The variable `recursive-load-depth-limit' has been deleted.
 Emacs now signals an error if the same file is loaded with more
 than 3 levels of nesting.
 
 +++
-** The function symbol-file can now search specifically for function or
-variable definitions.
-
-+++
-** `provide' and `featurep' now accept an optional second argument
-to test/provide subfeatures.  Also `provide' now checks `after-load-alist'
-and runs any code associated with the provided feature.
-
-+++
-** `declare' is now a macro.  This change was made mostly for
-documentation purposes and should have no real effect on Lisp code.
-
-+++
 ** Byte compiler changes:
 
 *** The byte-compiler now displays the actual line and character
@@ -4183,12 +4714,12 @@
 won't produce a warning if it's not defined as a function, and in the
 second case, using `foo' as a variable won't produce a warning if it's
 unbound.  The test must be in exactly one of the above forms (after
-macro expansion), but such tests may be nested.  Note that `when' and
+macro expansion), but such tests can be nested.  Note that `when' and
 `unless' expand to `if', but `cond' doesn't.
 
 *** `(featurep 'xemacs)' is treated by the compiler as nil.  This
 helps to avoid noisy compiler warnings in code meant to run under both
-Emacs and XEmacs and may sometimes make the result significantly more
+Emacs and XEmacs and can sometimes make the result significantly more
 efficient.  Since byte code from recent versions of XEmacs won't
 generally run in Emacs and vice versa, this optimization doesn't lose
 you anything.
@@ -4196,29 +4727,36 @@
 *** The local variable `no-byte-compile' in elisp files is now obeyed.
 
 ---
-** When a Lisp file uses CL functions at run-time, compiling the file
+*** When a Lisp file uses CL functions at run-time, compiling the file
 now issues warnings about these calls, unless the file performs
 (require 'cl) when loaded.
 
-+++
-** New function unsafep returns nil if the given Lisp form can't possibly
-do anything dangerous; otherwise it returns a reason why the form might be
-unsafe (calls dangerous function, alters global variable, etc).
-
-+++
-** There is a new Warnings facility; see the functions `warn'
-and `display-warning'.
-
----
-** VC changes for backends:
-*** (vc-switches BACKEND OPERATION) is a new function for use by backends.
-*** The new `find-version' backend function replaces the `destfile'
-parameter of the `checkout' backend function.
-Old code still works thanks to a default `find-version' behavior that
-uses the old `destfile' parameter.
-
-+++
-** Already true in Emacs 21.1, but not emphasized clearly enough:
+** Frame operations:
+
++++
+*** New functions `frame-current-scroll-bars' and `window-current-scroll-bars'.
+
+These functions return the current locations of the vertical and
+horizontal scroll bars in a frame or window.
+
++++
+*** The new function `modify-all-frames-parameters' modifies parameters
+for all (existing and future) frames.
+
++++
+*** The new frame parameter `tty-color-mode' specifies the mode to use
+for color support on character terminal frames.  Its value can be a
+number of colors to support, or a symbol.  See the Emacs Lisp
+Reference manual for more detailed documentation.
+
++++
+*** When using non-toolkit scroll bars with the default width,
+the `scroll-bar-width' frame parameter value is nil.
+
+** Mule changes:
+
++++
+*** Already true in Emacs 21.1, but not emphasized clearly enough:
 
 Multibyte buffers can now faithfully record all 256 character codes
 from 0 to 255.  As a result, most of the past reasons to use unibyte
@@ -4234,467 +4772,121 @@
 wasteful.
 
 ---
-** set-buffer-file-coding-system now takes an additional argument,
+*** set-buffer-file-coding-system now takes an additional argument,
 NOMODIFY.  If it is non-nil, it means don't mark the buffer modified.
 
 +++
-** The new variable `auto-coding-functions' lets you specify functions
+*** The new variable `auto-coding-functions' lets you specify functions
 to examine a file being visited and deduce the proper coding system
 for it.  (If the coding system is detected incorrectly for a specific
 file, you can put a `coding:' tags to override it.)
 
 ---
-** The new function `merge-coding-systems' fills in unspecified aspects
+*** The new function `merge-coding-systems' fills in unspecified aspects
 of one coding system from another coding system.
 
 ---
-** New coding system property `mime-text-unsuitable' indicates that
+*** New coding system property `mime-text-unsuitable' indicates that
 the coding system's `mime-charset' is not suitable for MIME text
 parts, e.g. utf-16.
 
 +++
-** New function `decode-coding-inserted-region' decodes a region as if
+*** New function `decode-coding-inserted-region' decodes a region as if
 it is read from a file without decoding.
 
-+++
-** Function `translate-region' accepts also a char-table as TABLE
-argument.
-
-+++
-** The new translation table `translation-table-for-input'
-is used for customizing self-insertion.  The character to
-be inserted is translated through it.
-
----
-** New CCL functions `lookup-character' and `lookup-integer' access
+---
+*** New CCL functions `lookup-character' and `lookup-integer' access
 hash tables defined by the Lisp function `define-translation-hash-table'.
 
-+++
-** The flags, width, and precision options for %-specifications in function
-`format' are now documented.  Some flags that were accepted but not
-implemented (such as "*") are no longer accepted.
-
----
-** New function `redirect-debugging-output' can be used to redirect
+---
+*** New function quail-find-key returns a list of keys to type in the
+current input method to input a character.
+
+** Mode line changes:
+
++++
+*** New function `format-mode-line'.
+
+This returns the mode-line or header-line of the selected (or a
+specified) window as a string with or without text properties.
+
++++
+*** The new mode-line construct `(:propertize ELT PROPS...)' can be
+used to add text properties to mode-line elements.
+
++++
+*** The new `%i' and `%I' constructs for `mode-line-format' can be used
+to display the size of the accessible part of the buffer on the mode
+line.
+
+** Menu manipulation changes:
+
+---
+*** To manipulate the File menu using easy-menu, you must specify the
+proper name "file".  In previous Emacs versions, you had to specify
+"files", even though the menu item itself was changed to say "File"
+several versions ago.
+
+---
+*** The dummy function keys made by easy-menu are now always lower case.
+If you specify the menu item name "Ada", for instance, it uses `ada'
+as the "key" bound by that key binding.
+
+This is relevant only if Lisp code looks for the bindings that were
+made with easy-menu.
+
+---
+*** `easy-menu-define' now allows you to use nil for the symbol name
+if you don't need to give the menu a name.  If you install the menu
+into other keymaps right away (MAPS is non-nil), it usually doesn't
+need to have a name.
+
+** Operating system access:
+
++++
+*** The new primitive `get-internal-run-time' returns the processor
+run time used by Emacs since start-up.
+
++++
+*** Functions `user-uid' and `user-real-uid' now return floats if the
+user UID doesn't fit in a Lisp integer.  Function `user-full-name'
+accepts a float as UID parameter.
+
++++
+*** New function `locale-info' accesses locale information.
+
+---
+*** On MS Windows, locale-coding-system is used to interact with the OS.
+The Windows specific variable w32-system-coding-system, which was
+formerly used for that purpose is now an alias for locale-coding-system.
+
+---
+*** New function `redirect-debugging-output' can be used to redirect
 debugging output on the stderr file handle to a file.
 
-+++
-** `makehash' is now obsolete.  Use `make-hash-table' instead.
-
-+++
-** The macro `with-syntax-table' does not copy the table any more.
-
-+++
-** New variables `gc-elapsed' and `gcs-done' provide extra information
-on garbage collection.
-
-+++
-** New function `locale-info' accesses locale information.
-
-+++
-** The new variable `print-continuous-numbering', when non-nil, says
-that successive calls to print functions should use the same
-numberings for circular structure references.  This is only relevant
-when `print-circle' is non-nil.
-
-When you bind `print-continuous-numbering' to t, you should
-also bind `print-number-table' to nil.
-
----
-** When pure storage overflows while dumping, Emacs now prints how
-much pure storage it will approximately need.
-
-+++
-** File local variables.
-
-A file local variables list cannot specify a string with text
-properties--any specified text properties are discarded.
-
-+++
-** The variable `safe-local-eval-forms' specifies a list of forms that
-are ok to evaluate when they appear in an `eval' local variables
-specification.  Normally Emacs asks for confirmation before evaluating
-such a form, but if the form appears in this list, no confirmation is
-needed.
-
----
-** If a function has a non-nil `safe-local-eval-function' property,
-that means it is ok to evaluate some calls to that function when it
-appears in an `eval' local variables specification.  If the property
-is t, then any form calling that function with constant arguments is
-ok.  If the property is a function or list of functions, they are called
-with the form as argument, and if any returns t, the form is ok to call.
-
-If the form is not "ok to call", that means Emacs asks for
-confirmation as before.
-
-+++
-** Renamed hooks to better follow the naming convention:
+** Miscellaneous:
+
++++
+*** A number of hooks have been renamed to better follow the conventions:
+
 find-file-hooks to find-file-hook,
 find-file-not-found-hooks to find-file-not-found-functions,
 write-file-hooks to write-file-functions,
 write-contents-hooks to write-contents-functions,
 x-lost-selection-hooks to x-lost-selection-functions,
-x-sent-selection-hooks to x-sent-selection-functions.
-Marked local-write-file-hooks as obsolete (use the LOCAL arg of `add-hook').
-
-+++
-** The new variable `delete-frame-functions' replaces `delete-frame-hook'.
-It was renamed to follow the naming conventions for abnormal hooks.  The old
-name remains available as an alias, but has been marked obsolete.
-
-+++
-** The new function `file-remote-p' tests a file name and returns
-non-nil if it specifies a remote file (one that Emacs accesses using
-its own special methods and not directly through the file system).
-The value in that case is an identifier for the remote file system.
-
-+++
-** Functions `get' and `plist-get' no longer signals an error for
-a malformed property list.  They also detect cyclic lists.
-
-+++
-** The function `atan' now accepts an optional second argument.
-
-When called with 2 arguments, as in `(atan Y X)', `atan' returns the
-angle in radians between the vector [X, Y] and the X axis.  (This is
-equivalent to the standard C library function `atan2'.)
-
-+++
-** New function format-mode-line.
-
-This returns the mode-line or header-line of the selected (or a
-specified) window as a string with or without text properties.
-
-+++
-** The new mode-line construct `(:propertize ELT PROPS...)' can be
-used to add text properties to mode-line elements.
-
-+++
-** The new `%i' and `%I' constructs for `mode-line-format' can be used
-to display the size of the accessible part of the buffer on the mode
-line.
-
----
-** Indentation of simple and extended loop forms has been added to the
-cl-indent package.  The new user options
-`lisp-loop-keyword-indentation', `lisp-loop-forms-indentation', and
-`lisp-simple-loop-indentation' can be used to customize the
-indentation of keywords and forms in loop forms.
-
----
-** Indentation of backquoted forms has been made customizable in the
-cl-indent package.  See the new user option `lisp-backquote-indentation'.
-
-+++
-** field-beginning and field-end now accept an additional optional
-argument, LIMIT.
-
-+++
-** define-abbrev now accepts an optional argument SYSTEM-FLAG.  If
-non-nil, this marks the abbrev as a "system" abbrev, which means that
-it won't be stored in the user's abbrevs file if he saves the abbrevs.
-Major modes that predefine some abbrevs should always specify this
-flag.
-
----
-** describe-vector now takes a second argument `describer' which is
-called to print the entries' values.  It defaults to `princ'.
-
-+++
-** defcustom and other custom declarations now use a default group
-(the last prior group defined in the same file) when no :group was given.
-
----
-** The new customization type `float' specifies numbers with floating
-point (no integers are allowed).
-
-+++
-** emacsserver now runs pre-command-hook and post-command-hook when
-it receives a request from emacsclient.
-
----
-** New function `text-clone-create'.  Text clones are chunks of text
-that are kept identical by transparently propagating changes from one
-clone to the other.
-
-+++
-** Functions `user-uid' and `user-real-uid' now return floats if the
-user UID doesn't fit in a Lisp integer.  Function `user-full-name'
-accepts a float as UID parameter.
-
-+++
-** New vars `exec-suffixes' and `load-suffixes' used when
-searching for an executable resp. an elisp file.
-
-+++
-** Functions from `post-gc-hook' are run at the end of garbage
-collection.  The hook is run with GC inhibited, so use it with care.
-
-+++
-** The variables most-positive-fixnum and most-negative-fixnum
-hold the largest and smallest possible integer values.
-
----
-** On MS Windows, locale-coding-system is used to interact with the OS.
-The Windows specific variable w32-system-coding-system, which was
-formerly used for that purpose is now an alias for locale-coding-system.
-
----
-** New function x-send-client-message sends a client message when
+x-sent-selection-hooks to x-sent-selection-functions,
+delete-frame-hook to delete-frame-functions.
+
+In each case the old name remains as an alias for the moment.
+
++++
+*** local-write-file-hooks is marked obsolete
+
+Use the LOCAL arg of `add-hook'.
+
+---
+*** New function `x-send-client-message' sends a client message when
 running under X.
-
----
-** easy-mmode-define-global-mode has been renamed to
-define-global-minor-mode.  The old name remains as an alias.
-
----
-** To manipulate the File menu using easy-menu, you must specify the
-proper name "file".  In previous Emacs versions, you had to specify
-"files", even though the menu item itself was changed to say "File"
-several versions ago.
-
----
-** The dummy function keys made by easymenu are now always lower case.
-If you specify the menu item name "Ada", for instance, it uses `ada'
-as the "key" bound by that key binding.
-
-This is relevant only if Lisp code looks for the bindings that were
-made with easymenu.
-
----
-** `easy-menu-define' now allows you to use nil for the symbol name
-if you don't need to give the menu a name.  If you install the menu
-into other keymaps right away (MAPS is non-nil), it usually doesn't
-need to have a name.
-
----
-** rx.el has new corresponding `symbol-end' and `symbol-start' elements.
-
-** New functions, macros, and commands:
-
-+++
-*** The new function `assoc-string' replaces `assoc-ignore-case' and
-`assoc-ignore-representation', which are still available, but have
-been declared obsolete.
-
-+++
-*** The new function `buffer-local-value' returns the buffer-local
-binding of VARIABLE (a symbol) in buffer BUFFER.  If VARIABLE does not
-have a buffer-local binding in buffer BUFFER, it returns the default
-value of VARIABLE instead.
-
-+++
-*** The new function `called-interactively-p' does what many people
-have mistakenly believed `interactive-p' did: it returns t if the
-calling function was called through `call-interactively'.  This should
-only be used when you cannot add a new "interactive" argument to the
-command.
-
-*** The new function copy-abbrev-table returns a new abbrev table that
-is a copy of a given abbrev table.
-
-+++
-*** New function copy-tree makes a copy of a tree, recursively copying
-both cars and cdrs.
-
-+++
-*** New function `delete-dups' destructively removes `equal'
-duplicates from a list.  Of several `equal' occurrences of an element
-in the list, the first one is kept.
-
-+++
-*** The new function `filter-buffer-substring' extracts a buffer
-substring, passes it through a set of filter functions, and returns
-the filtered substring.  It is used instead of `buffer-substring' or
-`delete-and-extract-region' when copying text into a user-accessible
-data structure, like the kill-ring, X clipboard, or a register.  The
-list of filter function is specified by the new variable
-`buffer-substring-filters'.  For example, Longlines mode uses
-`buffer-substring-filters' to remove soft newlines from the copied
-text.
-
-+++
-*** New functions frame-current-scroll-bars and window-current-scroll-bars.
-
-These functions return the current locations of the vertical and
-horizontal scroll bars in a frame or window.
-
-+++
-*** The new primitive `get-internal-run-time' returns the processor
-run time used by Emacs since start-up.
-
-+++
-*** The new function insert-buffer-substring-as-yank works like
-`insert-buffer-substring', but removes the text properties in the
-`yank-excluded-properties' list.
-
-+++
-*** The new function insert-buffer-substring-no-properties is like
-insert-buffer-substring, but removes all text properties from the
-inserted substring.
-
-+++
-*** The new functions `lax-plist-get' and `lax-plist-put' are like
-`plist-get' and `plist-put', except that they compare the property
-name using `equal' rather than `eq'.
-
-+++
-*** New function `line-number-at-pos' returns the line number of the
-current line in the current buffer, or if optional buffer position is
-given, line number of corresponding line in current buffer.
-
-+++
-*** New function `looking-back' checks whether a regular expression matches
-the text before point.  Specifying the LIMIT argument bounds how far
-back the match can start; this is a way to keep it from taking too long.
-
-+++
-*** New function `macroexpand-all' expands all macros in a form.
-It is similar to the Common-Lisp function of the same name.
-One difference is that it guarantees to return the original argument
-if no expansion is done, which may be tested using `eq'.
-
-*** The new function `minibufferp' returns non-nil if its optional
-buffer argument is a minibuffer.  If the argument is omitted, it
-defaults to the current buffer.
-
-+++
-*** New function minibuffer-selected-window returns the window which
-was selected when entering the minibuffer.
-
-+++
-*** The new function `modify-all-frames-parameters' modifies parameters
-for all (existing and future) frames.
-
-+++
-*** New functions posn-at-point and posn-at-x-y return
-click-event-style position information for a given visible buffer
-position or for a given window pixel coordinate.
-
----
-*** New function quail-find-key returns a list of keys to type in the
-current input method to input a character.
-
-+++
-*** The new function `rassq-delete-all' deletes all elements from an
-alist whose cdr is `eq' to a specified value.
-
-+++
-*** The new function remove-list-of-text-properties is almost the same
-as `remove-text-properties'.  The only difference is that it takes a
-list of property names as argument rather than a property list.
-
-+++
-*** The new primitive `set-file-times' sets a file's access and
-modification times.  Magic file name handlers can handle this
-operation.
-
-+++
-*** New function substring-no-properties returns a substring without
-text properties.
-
-+++
-*** The new function syntax-after returns the syntax code
-of the character after a specified buffer position, taking account
-of text properties as well as the character code.
-
-+++
-*** `syntax-class' extracts the class of a syntax code (as returned
-by syntax-after).
-
-+++
-*** New function `tool-bar-local-item-from-menu'
-
-The `tool-bar-add-item-from-menu' must not be used (as previously
-recommended) for making entries in the tool bar for local keymaps.
-Instead, use the function `tool-bar-local-item-from-menu', which lets
-you specify the map to use as an argument.
-
-+++
-*** New function window-body-height.
-This is like window-height but does not count the mode line
-or the header line.
-
-+++
-*** (while-no-input BODY...) runs BODY, but only so long as no input
-arrives.  If the user types or clicks anything, BODY stops as if a
-quit had occurred.  while-no-input returns the value of BODY, if BODY
-finishes.  It returns nil if BODY was aborted.
-
-+++
-*** New macro with-local-quit temporarily sets inhibit-quit to nil for use
-around potentially blocking or long-running code in timers
-and post-command-hooks.
-
-** New packages:
-
-*** The new package syntax.el provides an efficient way to find the
-current syntactic context (as returned by parse-partial-sexp).
-
-*** The new package bindat.el provides functions to unpack and pack
-binary data structures, such as network packets, to and from Lisp
-data structures.
-
----
-*** The TCL package tcl-mode.el was replaced by tcl.el.
-This was actually done in Emacs-21.1, and was not documented.
-
-+++
-*** The new package button.el implements simple and fast `clickable buttons'
-in emacs buffers.  `buttons' are much lighter-weight than the `widgets'
-implemented by widget.el, and can be used by lisp code that doesn't
-require the full power of widgets.  Emacs uses buttons for such things
-as help and apropos buffers.
-
----
-*** master-mode.el implements a minor mode for scrolling a slave
-buffer without leaving your current buffer, the master buffer.
-
-It can be used by sql.el, for example: the SQL buffer is the master
-and its SQLi buffer is the slave.  This allows you to scroll the SQLi
-buffer containing the output from the SQL buffer containing the
-commands.
-
-This is how to use sql.el and master.el together: the variable
-sql-buffer contains the slave buffer.  It is a local variable in the
-SQL buffer.
-
-(add-hook 'sql-mode-hook
-   (function (lambda ()
-	       (master-mode t)
-	       (master-set-slave sql-buffer))))
-(add-hook 'sql-set-sqli-hook
-   (function (lambda ()
-	       (master-set-slave sql-buffer))))
-
-+++
-*** New Lisp library testcover.el works with edebug to help you determine
-whether you've tested all your Lisp code.  Function testcover-start
-instruments all functions in a given file.  Then test your code.  Function
-testcover-mark-all adds overlay "splotches" to the Lisp file's buffer to
-show where coverage is lacking.  Command testcover-next-mark (bind it to
-a key!) will move point forward to the next spot that has a splotch.
-
-Normally, a red splotch indicates the form was never completely
-evaluated; a brown splotch means it always evaluated to the same
-value.  The red splotches are skipped for forms that can't possibly
-complete their evaluation, such as `error'.  The brown splotches are
-skipped for forms that are expected to always evaluate to the same
-value, such as (setq x 14).
-
-For difficult cases, you can add do-nothing macros to your code to
-help out the test coverage tool.  The macro `noreturn' suppresses a
-red splotch.  It is an error if the argument to `noreturn' does
-return.  The macro 1value suppresses a brown splotch for its argument.
-This macro is a no-op except during test-coverage -- then it signals
-an error if the argument actually returns differing values.
-
----
-** Support for Mocklisp has been removed.
-
----
-** The function insert-string is now obsolete.
 
 * Installation changes in Emacs 21.3
 
--- a/etc/TODO	Thu May 12 02:47:44 2005 +0000
+++ b/etc/TODO	Thu May 12 03:41:19 2005 +0000
@@ -9,6 +9,9 @@
 
 * Small but important fixes needed in existing features:
 
+** Convert everything that uses post-command-idle-hook
+  to use idle timers instead.
+
 ** Fix the kill/yank treatment of invisible text.  At the moment,
   invisible text is placed in the kill-ring, so that the contents of
   the ring may not correspond to the text as displayed to the user. It
@@ -256,6 +259,8 @@
 ** Make monochrome images display using the foreground and background
   colors of the applicable faces.
 
+** Face remapping.
+
 ** Add support for rendering antialiased text, probably using
   XRender/Freetype.
 
--- a/etc/TUTORIAL.pl	Thu May 12 02:47:44 2005 +0000
+++ b/etc/TUTORIAL.pl	Thu May 12 03:41:19 2005 +0000
@@ -1,5 +1,5 @@
-krótki samouczek Emacsa. Copyright (c) 1985, 2001
-Free Software Foundation, Inc. Szczegó³y na koñcu pliku.
+Krótki samouczek Emacsa.  Warunki kopiowania znajduj± sie na koñcu pliku.
+Copyright (c) 1985, 1996, 1998, 2001, 2002, 2005 Free Software Foundation.
 
 Polecenia Emacsa wymagaj± na ogó³ wci¶niêcia klawisza CONTROL (oznaczanego
 czasami Ctrl lub CTL) lub klawisza META (oznaczanego czasami EDIT
--- a/etc/TUTORIAL.pt_BR	Thu May 12 02:47:44 2005 +0000
+++ b/etc/TUTORIAL.pt_BR	Thu May 12 03:41:19 2005 +0000
@@ -1061,7 +1061,7 @@
 iniciando com um escrito por Stuart Cracraft para o Emacs original.
 
 Essa versão do tutorial foi originalmente traduzida por Marcelo Toledo
-<marcelo@marcelotoledo.org> e como o GNU Emacs, tem um copyright, e vem
+<marcelo@gnu.org> e como o GNU Emacs, tem um copyright, e vem
 com uma permissão de distribuição de cópias nas seguintes condições:
 
 Copyright (c) 1985, 1996 Free Software Foundation
--- a/etc/TUTORIAL.translators	Thu May 12 02:47:44 2005 +0000
+++ b/etc/TUTORIAL.translators	Thu May 12 03:41:19 2005 +0000
@@ -52,8 +52,8 @@
             Janusz S. Bien <jsbien@mail.uw.edu.pl>
 
 * TUTORIAL.pt_BR: 
-Author:     Marcelo Toledo <marcelo@marcelotoledo.org>
-Maintainer: Marcelo Toledo <marcelo@marcelotoledo.org>
+Author:     Marcelo Toledo <marcelo@gnu.org>
+Maintainer: Marcelo Toledo <marcelo@gnu.org>
 
 * TUTORIAL.ro: 
 Author:     Tudor Hulubei <tudor@gnu.org>
--- a/lisp/ChangeLog	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/ChangeLog	Thu May 12 03:41:19 2005 +0000
@@ -1,16 +1,339 @@
+2005-05-11  Arne J,Ax(Brgensen  <arne@arnested.dk>
+
+	* international/latexenc.el (latexenc-find-file-coding-system):
+	Avoid `re-search-forward' when looking for input encoding because
+	of speed and safety.  Better regular expressions for recognizing
+	input encoding.  Limit a search for TeX-master/tex-main-file to
+	the local variable section.
+
+2005-05-11  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* progmodes/sh-script.el (sh-mode-default-syntax-table): Set the
+	syntax of $ to "'" (quote).
+
+2005-05-11  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* dnd.el (dnd-protocol-alist): Improve custom type.
+
+	* dired.el (dired-dnd-protocol-alist): New variable.
+	(dired-mode): Use `dired-dnd-protocol-alist'.  Move call of
+	`dired-mode-hook' to the end.
+
+2005-05-11  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* files.el (executable-find): Move from executable.el. Use locate-file.
+	* progmodes/executable.el (executable-find): Move to files.el.
+
+	* font-lock.el (font-lock-fontify-keywords-region): Use a marker
+	when trying to ensure forward progress.
+
+2005-05-11  Chong Yidong  <cyd@stupidchicken.com>
+
+	* mouse-sel.el (mouse-sel-follow-link-p): New function.
+	(mouse-select, mouse-select-internal, mouse-extend-internal):
+	Use it to implement mouse-1-click-follows-link functionality.
+
+2005-05-10  Jay Belanger  <belanger@truman.edu>
+
+	* calc/calc-help.el (calc-m-prefix-help): Add mention of
+	preserving embedded modes.
+
+2005-05-10  Richard M. Stallman  <rms@gnu.org>
+
+	* progmodes/sh-script.el (sh-indent-for-do): Default to 0.
+
+	* progmodes/ada-mode.el (ada-adjust-case-skeleton):
+	Move from ada-stmt.el.
+	(ada-mode): Add ada-adjust-case-skeleton to skeleton-end-hook.
+
+	* progmodes/ada-stmt.el (ada-adjust-case-skeleton):
+	Move to ada-mode.el.
+	(ada-stmt-mode-hook): Delete; do the work in ada-mode.
+
+	* cus-edit.el (custom-file): Call file-chase-links.
+
+	* files.el (read-directory-name): Fix previous change.
+
+2005-05-10  Lute Kamstra  <lute@gnu.org>
+
+	* font-lock.el (font-lock-keywords-alist)
+	(font-lock-removed-keywords-alist): Clarify docstrings.
+
+2005-05-10  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gdb-ui.el (gdb-macro-info): New variable.
+	(gdb-source-info): Check for preprocessor info.
+	(gdb-tooltip-print-1): New function. Don't print tooltip if it is
+	a macro for a function.
+	found (user might have used GDB dir command).
+	(gdb-info-breakpoints-custom): Try to find file again if not already
+	(gdb-get-location): Update gdb-location-alist correctly for change
+	to gdb-info-breakpoints-custom.
+
+	* progmodes/gud.el (gud-tooltip-mode): Require tooltip to be safe.
+	(gud-tooltip-print-command): Add gdbmi case.
+	(gud-tooltip-tips): Call gdb-tooltip-print-1 first if there is
+	preprocessor info.
+
+2005-05-09  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* startup.el (fancy-splash-insert): Fix typo in doc string.
+
+2005-05-09  Juanma Barranquero  <lekktu@gmail.com>
+
+	* obsolete/float.el (string-to-float):
+	* obsolete/hilit19.el (hilit-add-pattern):
+	* obsolete/rnews.el (news-parse-range, news-select-message)
+	(news-get-pruned-list-of-files): Replace `string-to-int' by
+	`string-to-number'.
+
+	* obsolete/uncompress.el: Set `find-file-not-found-functions', not
+	`find-file-not-found-hooks'; use `add-hook'.
+	(uncompress-while-visiting): Set `write-file-functions', not
+	`write-file-hooks'; use `add-hook'.
+
+2005-05-09  Kim F. Storm  <storm@cua.dk>
+
+	* emulation/cua-base.el (cua-copy-region, cua-cut-region)
+	(cua-paste): Handle clipboard action.
+	(cua--init-keymaps): Remap clipboard-kill-region and
+	clipboard-kill-ring-save.
+
+2005-05-08  Eli Zaretskii  <eliz@gnu.org>
+
+	* emacs-lisp/easy-mmode.el (easy-mmode-pretty-mode-name):
+	Improve commentary.
+
+	* simple.el (next-error-overlay-arrow-position): Revert the change
+	made on 2005-04-30.
+
+2005-05-07  Jay Belanger  <belanger@truman.edu>
+
+	* calc/calcsel2.el (calc-commute-left, calc-commute-right)
+	(calc-sel-unpack, calc-sel-isolate): Rename variable `reselect' to
+	`calc-sel-reselect'.
+
+	* calc/calc-mode.el (calc-save-modes): Reset the modes list if
+	Calc is in embedded mode.
+
+2005-05-07  Eli Zaretskii  <eliz@gnu.org>
+
+	* progmodes/compile.el (compilation-setup):
+	Set overlay-arrow-string to an empty string on text terminals.
+
+	* textmodes/ispell.el (ispell-program-name): Try looking for
+	"aspell" along exec-path, and if found, use it as the default
+	speller program.
+
+2005-05-07  Jirka Kosek  <jirka@kosek.cz>  (tiny change)
+
+	* international/mule.el (sgml-xml-auto-coding-function):
+	Recognize encoding='FOO' in single quotes as well as in double quotes.
+
+2005-05-07  Johan Bockg,Ae(Brd  <bojohan@dd.chalmers.se>
+
+	* emacs-lisp/cl-macs.el (cl-transform-lambda): Recognize `declare'
+	as well as `interactive', so that defmacro* would recognize
+	`declare' forms.
+
+2005-05-07  Eli Zaretskii  <eliz@gnu.org>
+
+	* emacs-lisp/easy-mmode.el (easy-mmode-pretty-mode-name):
+	Explain more about the LIGHTER arg's usage in the doc string.
+	Add commentary to clarify what the code does.  Fix the regexp that
+	strips whitespace from LIGHTER.  Quote LIGHTER before using it,
+	since it could have characters special to regular expressions.
+
+2005-05-07  Matt Hodges  <MPHodges@member.fsf.org>  (tiny change)
+
+	* replace.el (occur-1): Bind inhibit-read-only so that
+	erase-buffer doesn't barf on read-only text properties (likewise
+	for add-text-properties in occur-engine).  Mark buffer as unmodified.
+	(occur-engine): Don't set buffer-read-only here.
+
+2005-05-06  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* pcvs.el (cvs-mode-commit, cvs-mode-edit-log): Don't fiddle with
+	list-buffers-directory.  This caused the *cvs-commit* buffer to be
+	sometimes mistakenly reused as a *cvs* buffer.
+
+2005-05-07  Nick Roberts  <nickrob@snap.net.nz>
+
+	* tooltip.el: Move code for GUD tooltips into gud.el.
+	(require): CL no longer needed to compile case.
+	(tooltip-mode): Do not toggle functions for GUD tooltips.
+	(tooltip-gud-tips-p): Remove. Replace with minor mode
+	gud-tooltip-mode in gud.el.
+	(tooltip-gud-modes, tooltip-gud-display, tooltip-gud-echo-area)
+	(tooltip-gud-toggle-dereference): Rename in gud.el by replacing
+	tooltip-gud prefix with gud-tooltip and obsolete.
+	(tooltip-change-major-mode, tooltip-activate-mouse-motions-if-enabled)
+	(tooltip-mouse-motions-active, tooltip-activate-mouse-motions)
+	(tooltip-mouse-motion): Mouse movement functions/variable.
+	Rename in gud.el by adding gud prefix.
+	(tooltip-gud-original-filter, tooltip-gud-dereference)
+	(tooltip-gud-event, tooltip-toggle-gud-tips)
+	(tooltip-gud-process-output, tooltip-gud-print-command)
+	(tooltip-gud-tips): GUD tooltip functions/variables. Rename in
+	gud.el by replacing tooltip-gud prefix with gud-tooltip.
+	(gdb-tooltip-print): Move to gdb-ui.el.
+
+	* progmodes/gud.el: Move code for GUD tooltips from tooltip.el.
+	(require): CL needed to compile case.
+	(gud-tooltip-mode): Use to toggle GUD tooltips unstead of
+	tooltip-gud-tips-p. Make it a minor-mode.
+	(gud-find-file): Only prepare GUD tooltips if gud-tooltip-mode is t.
+	(gud-menu-map): GUD tooltips use gud-tooltip-mode now.
+	(gud-tooltip-modes, gud-tooltip-display, gud-tooltip-echo-area)
+	(gud-tooltip-change-major-mode)
+	(gud-tooltip-activate-mouse-motions-if-enabled)
+	(gud-tooltip-mouse-motions-active, gud-tooltip-activate-mouse-motions)
+	(gud-tooltip-mouse-motion, gud-tooltip-toggle-dereference)
+	(gud-tooltip-original-filter, gud-tooltip-dereference)
+	(gud-tooltip-event, tooltip-toggle-gud-tips)
+	(gud-tooltip-process-output, gud-tooltip-print-command)
+	(gud-tooltip-tips): Move from tooltip.el.
+
+	* progmodes/gdb-ui.el (gdb-tooltip-print): Move from tooltip.el.
+	(gdb-cpp-define-alist-flags): Doc fix.
+	(gdb-set-gud-minor-mode-1): Only prepare GUD tooltips if
+	gud-tooltip-mode is t.
+
+2005-05-06  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* net/goto-addr.el (goto-address-fontify): Make sure the overlays
+	evaporate if their text is deleted.
+	(goto-address-at-point): Make it work as a mouse binding as well.
+	(goto-address-at-mouse): Obsolete it.  Update users.
+
+2005-05-06  Glenn Morris  <gmorris@ast.cam.ac.uk>
+
+	* calendar/appt.el (top-level): No longer activate on load.
+
+2005-05-06  Juanma Barranquero  <lekktu@gmail.com>
+
+	* calendar/cal-bahai.el (mark-bahai-diary-entries):
+	* net/webjump.el (webjump):
+	* progmodes/idlw-help.el (idlwave-do-context-help1)
+	(idlwave-highlight-linked-completions):
+	* textmodes/po.el (po-find-file-coding-system-guts):
+	Replace `assoc-ignore-case' by `assoc-string'.
+
+2005-05-06  Eli Zaretskii  <eliz@gnu.org>
+
+	* files.el (locate-file): Doc fix.
+
+	* progmodes/gdb-ui.el (gdb-cpp-define-alist-program): Doc fix.
+	Remove the redundant test for ms-dos.
+
+	* progmodes/cmacexp.el (c-macro-preprocessor): Use locate-file to
+	look for the preprocessor with exec-suffixes.  If not found in
+	standard places, look in exec-path.  Remove most of the tests that
+	used system-type.
+
+	* loadup.el: Load jka-cmpr-hook instead of jka-comp-hook.
+
+	* jka-compr.el (jka-compr-uninstall): Add autoload cookie.
+
+	* jka-cmpr-hook.el: Renamed from jka-comp-hook.el, to avoid
+	file-name clash with jka-compr.el on 8+3 filesystems.
+
+2005-05-06  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* term/mac-win.el: Don't define or bind scroll bar functions if
+	x-toolkit-scroll-bars is t.
+	(x-select-text, x-get-selection-value):
+	Clear x-last-selected-text-clipboard if x-select-enable-clipboard is nil.
+	(PRIMARY): Put mac-scrap-name property.
+	(mac-select-convert-to-file-url): New function.
+	(public.file-url): New selection target type.  Add to
+	selection-converter-alist.
+	(x-get-selection, x-selection-value): Handle it.
+	(x-cut-buffer-or-selection-value): New alias.
+
+2005-05-05  Roland Winkler  <Roland.Winkler@physik.uni-erlangen.de>
+
+	* textmodes/bibtex.el (bibtex-summary): Use current BibTeX
+	entry to avoid calling bibtex-find-entry with arg global
+	being t.  Remove arg key.
+	(bibtex-summary-function, bibtex-complete-crossref-cleanup)
+	(bibtex-copy-summary-as-kill): Change accordingly.
+
+2005-05-05  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* textmodes/org.el (org-get-entries-from-diary): Remove unused vars.
+	(org-agenda-date-later): Use with-current-buffer.
+
+2005-05-05  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* emacs-lisp/byte-run.el (define-obsolete-function-alias)
+	(define-obsolete-variable-alias): Doc Fixes.
+
+2005-05-06  Kim F. Storm  <storm@cua.dk>
+
+	* simple.el (line-move-1): Fix 2005-04-26 change.  Must still use
+	vertical-motion when selective-display is active.
+
+	* ido.el (ido-setup-hook): New hook.
+	(ido-define-mode-map-hook): Remove hook; use ido-setup-hook instead.
+	(ido-input-stack): New var.
+	(ido-define-mode-map): Bind M-b to ido-push-dir. Move old
+	ido-next-work-file binding to M-O.
+	Bind M-f to ido-wide-find-file-or-pop-dir.
+	(ido-define-mode-map): Don't run ido-define-mode-map-hook.
+	(ido-read-internal): Run ido-setup-hook.
+	Catch quit in read-file-name and read-string to cancel edit.
+	Handle new push, pop, and pop-all exit codes (for M-b/M-f).
+	Automatically pop-all when completing a directory name (RET).
+	(ido-file-internal): Add with-no-warnings around ffap and dired code.
+	(ido-exit-minibuffer): Use exit-minibuffer instead of throw.
+	(ido-wide-find-file, ido-wide-find-dir): Catch quit to cancel find.
+	(ido-push-dir, ido-pop-dir, ido-wide-find-file-or-pop-dir):
+	New functions for M-b/M-f to move among the directory components.
+	(ido-make-merged-file-list): Catch quit to cancel merge.
+	(ido-make-dir-list): Delete "." when ido-input-stack is non-empty.
+	(ido-completion-help): No warnings for ido-completion-buffer-full.
+
+2005-05-05  Daniel Pfeiffer  <occitan@esperanto.org>
+
+	* font-lock.el (font-lock-negation-char-face): New face and variable.
+	* progmodes/cc-fonts.el (c-cpp-matchers): Use it.
+	* progmodes/sh-script.el (sh-font-lock-keywords): Use it.
+	* progmodes/cperl-mode.el (cperl-init-faces): Use it.
+	* progmodes/make-mode.el (makefile-font-lock-keywords): Use it.
+
+2005-05-05  Juanma Barranquero  <lekktu@gmail.com>
+
+	* emacs-lisp/byte-run.el (define-obsolete-function-alias):
+	Fix typo in docstring.
+
+	* progmodes/ebrowse.el (ebrowse-install-1-to-9-keys)
+	(ebrowse-print-statistics-line)
+	(ebrowse-electric-position-mode-hook): Fix typo in docstring.
+
+	* term/w32-win.el (image-library-alist): Add additional name for
+	Xpm library.
+
 2005-05-05  Nick Roberts  <nickrob@snap.net.nz>
 
 	* progmodes/cmacexp.el (c-macro-preprocessor): Update for BSD and
 	use gcc instead of cpp.
 
 	* progmodes/gdb-ui.el (gdb-cpp-define-alist-flags): New variable.
-	(gdb-create-define-alist): Use. it.
-	(gdb-cpp-define-alist-program): Update for MS-DOS?
+	(gdb-create-define-alist): Use it.
+	(gdb-cpp-define-alist-program): Update for MS-DOS.
 
 2005-05-04  Nick Roberts  <nickrob@snap.net.nz>
 
 	* progmodes/cmacexp.el (c-macro-preprocessor): Update for Mac OSX.
 
+2005-05-04  Richard M. Stallman  <rms@gnu.org>
+
+	* help.el (describe-key): No error when UNTRANSLATED is nil.
+
+	* simple.el (line-move-1): Fix previous change to signal errors
+	appropriately.
+
 2005-05-03  Ulf Jasper  <ulf.jasper@web.de>
 
 	* calendar/icalendar.el (icalendar-version): Now at 0.12.
@@ -152,11 +475,15 @@
 	with mode-require-final-newline.
 	(mode-require-final-newline): Doc fix.
 
-2005-05-01  Lute Kamstra  <lute@gnu.org>
+2005-05-01  Stefan Monnier <monnier@iro.umontreal.ca>
 
 	* international/latexenc.el (latexenc-find-file-coding-system):
-	Fix regular expressions.  Suggested by David Kastrup <dak@gnu.org>
-	and Stefan Monnier <monnier@iro.umontreal.ca>.
+	Fix regular expressions.
+
+2005-05-01  David Kastrup <dak@gnu.org>
+
+	* international/latexenc.el (latexenc-find-file-coding-system):
+	Fix regular expressions.
 
 2005-05-01  Nick Roberts  <nickrob@snap.net.nz>
 
@@ -168,10 +495,10 @@
 
 	* loadup.el: load jka-comp-hook.
 
-	* jka-compr.el: Many functions and vars moved to jka-compr-hook.el.
+	* jka-compr.el: Many functions and vars moved to jka-comp-hook.el.
 	(jka-compr-handler): Add autoload.  `put' calls moved
-	to jka-compr-hook.el.
-	(compression, jka-compr): defgroups moved to jka-compr-hook.el.
+	to jka-comp-hook.el.
+	(compression, jka-compr): defgroups moved to jka-comp-hook.el.
 	(jka-compr-inhibit): Autoload.
 
 	* jka-comp-hook.el: New file.
@@ -1431,7 +1758,7 @@
 	* xt-mouse.el (xterm-mouse-mode): Add explicit Custom group, mouse.
 	Doc fix.
 
-2005-04-03  Marcelo Toledo  <marcelo@marcelotoledo.org>
+2005-04-03  Marcelo Toledo  <marcelo@gnu.org>
 
 	* add-log.el (change-log-font-lock-keywords): The manual
 	describing a Change Log entry, says: (...) "Aside from these
@@ -2139,7 +2466,7 @@
 	(menu-bar-showhide-menu): Use menu-bar-make-mm-toggle.
 	(menu-bar-make-mm-toggle): Simplify.
 
-2005-03-22  JUAN-LEON Lahoz Garcia <juanleon1@gmail.com>
+2005-03-22  JUAN-LEON Lahoz Garcia  <juanleon1@gmail.com>
 
 	* progmodes/perl-mode.el (perl-font-lock-keywords-2):
 	Accept qualified variable and function names.
@@ -2313,7 +2640,7 @@
 	(recentf-cleanup): Use it to conditionally check availablity of
 	remote files.
 
-2005-03-19  Joe Edmonds <joe-bugs-debian-org@elem.com>  (tiny change)
+2005-03-19  Joe Edmonds  <joe-bugs-debian-org@elem.com>  (tiny change)
 
 	* emacs-lisp/lisp-mode.el (lisp-mode-variables): Recognize `@' in
 	function names.
@@ -3888,7 +4215,7 @@
 	(bibtex-parse-field-name): Fix typos in docstrings.
 	(bibtex-field-list, bibtex-find-crossref): Fix typos in error messages.
 
-2005-01-24  Carsten Dominik <dominik@science.uva.nl>
+2005-01-24  Carsten Dominik  <dominik@science.uva.nl>
 
 	* textmodes/reftex-global.el (reftex-isearch-push-state-function)
 	(reftex-isearch-pop-state-function, reftex-isearch-isearch-search)
@@ -4651,7 +4978,7 @@
 
 	* vc-svn.el (vc-svn-diff): Stay local if possible.
 
-2005-01-02  Stefan  <monnier@iro.umontreal.ca>
+2005-01-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* vc-arch.el (vc-arch-workfile-version): Handle the empty-branch case.
 
@@ -5020,7 +5347,7 @@
 	* ffap.el (ffap-string-at-point-mode-alist): Add "*" to url chars,
 	it can appear unencoded and has been seen from yahoo.
 
-2004-12-27  Sergey Poznyakoff <gray@Mirddin.farlep.net>  (tiny change)
+2004-12-27  Sergey Poznyakoff  <gray@Mirddin.farlep.net>  (tiny change)
 
 	* mail/smtpmail.el (smtpmail-try-auth-methods): Send AUTH CRAM-MD5
 	in upper case.  Reported by Wojciech Polak <polak@gnu.org>.
@@ -6390,7 +6717,7 @@
 	other frames.
 	(gdb-reset): Remove dedicated property after debugging.
 
-2004-11-24  Jay Belanger <belanger@truman.edu>
+2004-11-24  Jay Belanger  <belanger@truman.edu>
 
 	* calc/calc-sel.el: Add comment.
 
@@ -7678,7 +8005,7 @@
 	(gud-gdba-command-name, gdb-show-main, gdb-many-windows):
 	Add :version keyword.
 
-2004-11-02  Pavel Kobiakov <pk_at_work@yahoo.com>
+2004-11-02  Pavel Kobiakov  <pk_at_work@yahoo.com>
 
 	* progmodes/flymake.el (flymake-err-line-patterns):
 	Use `flymake-reformat-err-line-patterns-from-compile-el' to convert
@@ -8087,7 +8414,7 @@
 	Handle periods and underscores in a function name.
 	Remove the address fontification.
 
-2004-10-24 Masatake YAMATO <jet@gyve.org>
+2004-10-24  Masatake YAMATO  <jet@gyve.org>
 
 	* progmodes/asm-mode.el (asm-font-lock-keywords):
 	Use font-lock-variable-name-face for registers.
@@ -8224,7 +8551,7 @@
 
 	* paths.el (news-path): Fix previous change.
 
-2004-10-18 Jay Belanger  <belanger@truman.edu>
+2004-10-18  Jay Belanger  <belanger@truman.edu>
 
 	* calc/calc-help.el (calc-describe-bindings):
 	Set `buffer-read-only' to nil while working in the keybindings buffer;
@@ -9364,7 +9691,7 @@
 
 	* terminal.el (te-escape): Show `?' in prompt for help key.
 
-2004-09-04  Emilio C. Lopes <eclig@gmx.net>
+2004-09-04  Emilio C. Lopes  <eclig@gmx.net>
 
 	* emacs-lisp/lisp.el (kill-backward-up-list): New function.
 
@@ -9772,7 +10099,7 @@
 
 	* imenu.el: Several doc fixes: don't say variables are buffer-local.
 
-2004-08-16  Davis Herring <herring@lanl.gov>
+2004-08-16  Davis Herring  <herring@lanl.gov>
 
 	* isearch.el (isearch-string, isearch-message-string, isearch-point)
 	(isearch-success, isearch-forward-flag, isearch-other-end)
@@ -11786,7 +12113,7 @@
 
 	* tree-widget.el: New file.
 
-2004-05-13  Marcelo Toledo  <marcelo@marcelotoledo.org>
+2004-05-13  Marcelo Toledo  <marcelo@gnu.org>
 
 	* language/european.el ("Brazilian Portuguese"): Add support for
 	Brazilian Portuguese.
--- a/lisp/calc/README	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calc/README	Thu May 12 03:41:19 2005 +0000
@@ -2,7 +2,7 @@
 This directory contains Calc, an advanced desk calculator for GNU
 Emacs.
 
-"Calc"  Copyright 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
+"Calc"  Copyright 1990, 1991, 1992, 1993, 2001, 2005  Free Software Foundation, Inc.
 
 Written by:
 	Dave Gillespie
@@ -52,20 +52,9 @@
 
 
 Calc is written entirely in Emacs Lisp, for maximum portability.
-You do not need to recompile Emacs to install and use Calc.
-
-You will need about six megabytes of disk space to install Calc
-and its Info documentation.
-
-See the file INSTALL for installation instructions.  The instructions
-may seem long, but on typical systems you will only need to follow the
-steps shown in the first section.
-
-Don't even try to run Calc in uncompiled (.el) form!  It's far too slow.
-
 
 I am anxious to hear about your experiences using Calc.  Send mail to
-"daveg@synaptics.com".  A bug report is most useful if you include the
+"belanger@truman.edu".  A bug report is most useful if you include the
 exact input and output that occurred, any modes in effect (such as the
 current precision), and so on.  If you find Calc is difficult to operate
 in any way, or if you have other suggestions, don't hesitate to let me
@@ -73,21 +62,32 @@
 me know.  Even if you find no bugs at all I would love to hear your
 opinions.
 
-The latest Calc tar files and patches are always available for anonymous
-FTP on prep.ai.mit.edu.
-
-Thanks,
-
-								-- Dave
-
-
-
 
 
 Summary of changes to "Calc"
 ------- -- ------- --  ----
 
 
+Version 2.1:
+
+* Added new functions: sec, csc, cot, sech, csch, coth.
+
+* 0^0 now evaluates to 1.
+
+* Added a new language mode for LaTeX.
+
+* Calc now tries to use an appropriate language mode in embedded mode.
+
+* Calc now restores original modes when leaving embedded mode.
+
+* User settable variables which are not set with keystrokes are now
+  customizable.
+
+* Made ~/.calc.el the default Calc settings file.
+
+* Miscellaneous updates and bugfixes.
+
+
 Version 2.02f:
 
  * Fixed a bug which broke `I', `H', `K' prefix keys in recent Emacs.
--- a/lisp/calc/calc-alg.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calc/calc-alg.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; calc-alg.el --- algebraic functions for Calc
 
-;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger  <belanger@truman.edu>
--- a/lisp/calc/calc-arith.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calc/calc-arith.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; calc-arith.el --- arithmetic functions for Calc
 
-;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <belanger@truman.edu>
--- a/lisp/calc/calc-comb.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calc/calc-comb.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; calc-comb.el --- combinatoric functions for Calc
 
-;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <belanger@truman.edu>
--- a/lisp/calc/calc-embed.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calc/calc-embed.el	Thu May 12 03:41:19 2005 +0000
@@ -148,6 +148,15 @@
           (setq calc-embedded-original-modes (cons lang modes)))
       (setq calc-embedded-original-modes nil))))
 
+(defun calc-embedded-preserve-modes ()
+  "Preserve the current modes when leaving embedded mode."
+  (interactive)
+  (if calc-embedded-info
+      (progn
+        (calc-embedded-save-original-modes)
+        (message "Current modes will be preserved when leaving embedded mode."))
+    (message "Not in embedded mode.")))
+
 (defun calc-embedded-restore-original-modes ()
   "Restore the original Calc modes when leaving embedded mode."
   (let ((calcbuf (get-buffer "*Calculator*"))
--- a/lisp/calc/calc-ext.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calc/calc-ext.el	Thu May 12 03:41:19 2005 +0000
@@ -378,6 +378,7 @@
   (define-key calc-mode-map "m?" 'calc-m-prefix-help)
   (define-key calc-mode-map "ma" 'calc-algebraic-mode)
   (define-key calc-mode-map "md" 'calc-degrees-mode)
+  (define-key calc-mode-map "me" 'calc-embedded-preserve-modes)
   (define-key calc-mode-map "mf" 'calc-frac-mode)
   (define-key calc-mode-map "mg" 'calc-get-modes)
   (define-key calc-mode-map "mh" 'calc-hms-mode)
@@ -737,7 +738,8 @@
 
  ("calc-embed" calc-do-embedded
 calc-do-embedded-activate calc-embedded-evaluate-expr
-calc-embedded-modes-change calc-embedded-var-change)
+calc-embedded-modes-change calc-embedded-var-change
+calc-embedded-preserve-modes)
 
  ("calc-fin" calc-to-percentage calcFunc-ddb
 calcFunc-fv calcFunc-fvb calcFunc-fvl calcFunc-irr calcFunc-irrb
--- a/lisp/calc/calc-help.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calc/calc-help.el	Thu May 12 03:41:19 2005 +0000
@@ -630,7 +630,7 @@
   (interactive)
   (calc-do-prefix-help
    '("Deg, Rad, HMS; Frac; Polar; Inf; Alg, Total; Symb; Vec/mat"
-     "Working; Xtensions; Mode-save"
+     "Working; Xtensions; Mode-save; preserve Embedded modes"
      "SHIFT + Shifted-prefixes, mode-Filename; Record; reCompute"
      "SHIFT + simplify: Off, Num, Default, Bin, Alg, Ext, Units")
    "mode" ?m))
--- a/lisp/calc/calc-lang.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calc/calc-lang.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; calc-lang.el --- calc language functions
 
-;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <belanger@truman.edu>
--- a/lisp/calc/calc-math.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calc/calc-math.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; calc-math.el --- mathematical functions for Calc
 
-;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <belanger@truman.edu>
--- a/lisp/calc/calc-misc.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calc/calc-misc.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; calc-misc.el --- miscellaenous functions for Calc
 
-;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <belanger@truman.edu>
--- a/lisp/calc/calc-mode.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calc/calc-mode.el	Thu May 12 03:41:19 2005 +0000
@@ -304,7 +304,9 @@
 	       vals (cdr vals))))
      (run-hooks 'calc-mode-save-hook)
      (insert ";;; End of mode settings\n")
-     (save-buffer))))
+     (save-buffer)
+     (if calc-embedded-info
+         (calc-embedded-save-original-modes)))))
 
 (defun calc-settings-file-name (name &optional arg)
   (interactive
--- a/lisp/calc/calc-poly.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calc/calc-poly.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; calc-poly.el --- polynomial functions for Calc
 
-;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <belanger@truman.edu>
--- a/lisp/calc/calc-rewr.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calc/calc-rewr.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; calc-rewr.el --- rewriting functions for Calc
 
-;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <belanger@truman.edu>
--- a/lisp/calc/calc-store.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calc/calc-store.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; calc-store.el --- value storage functions for Calc
 
-;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <belanger@truman.edu>
--- a/lisp/calc/calc-stuff.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calc/calc-stuff.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; calc-stuff.el --- miscellaneous functions for Calc
 
-;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <belanger@truman.edu>
--- a/lisp/calc/calc-vec.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calc/calc-vec.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; calc-vec.el --- vector functions for Calc
 
-;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <belanger@truman.edu>
--- a/lisp/calc/calcalg2.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calc/calcalg2.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; calcalg2.el --- more algebraic functions for Calc
 
-;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <belanger@truman.edu>
--- a/lisp/calc/calcalg3.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calc/calcalg3.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; calcalg3.el --- more algebraic functions for Calc
 
-;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <belanger@truman.edu>
--- a/lisp/calc/calccomp.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calc/calccomp.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; calccomp.el --- composition functions for Calc
 
-;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <belanger@truman.edu>
--- a/lisp/calc/calcsel2.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calc/calcsel2.el	Thu May 12 03:41:19 2005 +0000
@@ -34,6 +34,10 @@
 ;; The variable calc-keep-selection is declared and set in calc-sel.el.
 (defvar calc-keep-selection)
 
+;; The variable calc-sel-reselect is local to the methods below,
+;; but is used by some functions in calc-sel.el which are called
+;; by the functions below.
+
 (defun calc-commute-left (arg)
   (interactive "p")
   (if (< arg 0)
@@ -41,7 +45,7 @@
     (calc-wrapper
      (calc-preserve-point)
      (let ((num (max 1 (calc-locate-cursor-element (point))))
-	   (reselect calc-keep-selection))
+	   (calc-sel-reselect calc-keep-selection))
        (if (= arg 0) (setq arg nil))
        (while (or (null arg) (>= (setq arg (1- arg)) 0))
 	 (let* ((entry (calc-top num 'entry))
@@ -106,14 +110,14 @@
 	   (if (null new)
 	       (if arg
 		   (error "Term is already leftmost")
-		 (or reselect
+		 (or calc-sel-reselect
 		     (calc-pop-push-list 1 (list expr) num '(nil)))
 		 (setq arg 0))
 	     (calc-pop-push-record-list
 	      1 "left"
 	      (list (calc-replace-sub-formula expr parent new))
 	      num
-	      (list (and (or (not (eq arg 0)) reselect)
+	      (list (and (or (not (eq arg 0)) calc-sel-reselect)
 			 sel))))))))))
 
 (defun calc-commute-right (arg)
@@ -123,7 +127,7 @@
     (calc-wrapper
      (calc-preserve-point)
      (let ((num (max 1 (calc-locate-cursor-element (point))))
-	   (reselect calc-keep-selection))
+	   (calc-sel-reselect calc-keep-selection))
        (if (= arg 0) (setq arg nil))
        (while (or (null arg) (>= (setq arg (1- arg)) 0))
 	 (let* ((entry (calc-top num 'entry))
@@ -189,14 +193,14 @@
 	   (if (null new)
 	       (if arg
 		   (error "Term is already rightmost")
-		 (or reselect
+		 (or calc-sel-reselect
 		     (calc-pop-push-list 1 (list expr) num '(nil)))
 		 (setq arg 0))
 	     (calc-pop-push-record-list
 	      1 "rght"
 	      (list (calc-replace-sub-formula expr parent new))
 	      num
-	      (list (and (or (not (eq arg 0)) reselect)
+	      (list (and (or (not (eq arg 0)) calc-sel-reselect)
 			 sel))))))))))
 
 (defun calc-build-assoc-term (op lhs rhs)
@@ -225,7 +229,7 @@
   (calc-wrapper
    (calc-preserve-point)
    (let* ((num (max 1 (calc-locate-cursor-element (point))))
-	  (reselect calc-keep-selection)
+	  (calc-sel-reselect calc-keep-selection)
 	  (entry (calc-top num 'entry))
 	  (expr (car entry))
 	  (sel (or (calc-auto-selection entry) expr)))
@@ -236,14 +240,14 @@
 				(list (calc-replace-sub-formula
 				       expr sel (nth 1 sel)))
 				num
-				(list (and reselect (nth 1 sel)))))))
+				(list (and calc-sel-reselect (nth 1 sel)))))))
 
 (defun calc-sel-isolate ()
   (interactive)
   (calc-slow-wrapper
    (calc-preserve-point)
    (let* ((num (max 1 (calc-locate-cursor-element (point))))
-	  (reselect calc-keep-selection)
+	  (calc-sel-reselect calc-keep-selection)
 	  (entry (calc-top num 'entry))
 	  (expr (car entry))
 	  (sel (or (calc-auto-selection entry) (error "No selection")))
@@ -266,7 +270,7 @@
 				(list (calc-replace-sub-formula
 				       expr eqn soln))
 				num
-				(list (and reselect sel)))
+				(list (and calc-sel-reselect sel)))
      (calc-handle-whys))))
 
 (defun calc-sel-commute (many)
--- a/lisp/calendar/appt.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calendar/appt.el	Thu May 12 03:41:19 2005 +0000
@@ -688,10 +688,6 @@
       (appt-check t))))
 
 
-;; This is needed for backwards compatibility. Feh.
-(appt-activate 1)
-
-
 (provide 'appt)
 
 ;;; arch-tag: bf5791c4-8921-499e-a26f-772b1788d347
--- a/lisp/calendar/cal-bahai.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calendar/cal-bahai.el	Thu May 12 03:41:19 2005 +0000
@@ -375,19 +375,21 @@
                          (string-to-int y-str)))))
             (if dd-name
                 (mark-calendar-days-named
-                 (cdr (assoc-ignore-case (substring dd-name 0 3)
-                                         (calendar-make-alist
-                                          calendar-day-name-array
-                                          0
-                                          '(lambda (x) (substring x 0 3))))))
+                 (cdr (assoc-string (substring dd-name 0 3)
+                                    (calendar-make-alist
+                                     calendar-day-name-array
+                                     0
+                                     '(lambda (x) (substring x 0 3)))
+                                    t)))
               (if mm-name
                   (if (string-equal mm-name "*")
                       (setq mm 0)
                     (setq mm
-                          (cdr (assoc-ignore-case
+                          (cdr (assoc-string
                                 mm-name
                                 (calendar-make-alist
-                                  bahai-calendar-month-name-array))))))
+                                  bahai-calendar-month-name-array)
+                                t)))))
               (mark-bahai-calendar-date-pattern mm dd yy)))))
       (setq d (cdr d)))))
 
--- a/lisp/calendar/solar.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/calendar/solar.el	Thu May 12 03:41:19 2005 +0000
@@ -4,6 +4,7 @@
 
 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
 ;;	Denis B. Roegel <Denis.Roegel@loria.fr>
+;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk>
 ;; Keywords: calendar
 ;; Human-Keywords: sunrise, sunset, equinox, solstice, calendar, diary,
 ;;	holidays
--- a/lisp/cus-edit.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/cus-edit.el	Thu May 12 03:41:19 2005 +0000
@@ -3835,20 +3835,21 @@
 
 (defun custom-file ()
   "Return the file name for saving customizations."
-  (or custom-file
-      (let ((user-init-file user-init-file)
-	    (default-init-file
-	      (if (eq system-type 'ms-dos) "~/_emacs" "~/.emacs")))
-	(when (null user-init-file)
-	  (if (or (file-exists-p default-init-file)
-		  (and (eq system-type 'windows-nt)
-		       (file-exists-p "~/_emacs")))
-	      ;; Started with -q, i.e. the file containing
-	      ;; Custom settings hasn't been read.  Saving
-	      ;; settings there would overwrite other settings.
-	      (error "Saving settings from \"emacs -q\" would overwrite existing customizations"))
-	  (setq user-init-file default-init-file))
-	user-init-file)))
+  (file-chase-links
+   (or custom-file
+       (let ((user-init-file user-init-file)
+	     (default-init-file
+	       (if (eq system-type 'ms-dos) "~/_emacs" "~/.emacs")))
+	 (when (null user-init-file)
+	   (if (or (file-exists-p default-init-file)
+		   (and (eq system-type 'windows-nt)
+			(file-exists-p "~/_emacs")))
+	       ;; Started with -q, i.e. the file containing
+	       ;; Custom settings hasn't been read.  Saving
+	       ;; settings there would overwrite other settings.
+	       (error "Saving settings from \"emacs -q\" would overwrite existing customizations"))
+	   (setq user-init-file default-init-file))
+	 user-init-file))))
 
 (defun custom-save-delete (symbol)
   "Visit `custom-file' and delete all calls to SYMBOL from it.
--- a/lisp/dired.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/dired.el	Thu May 12 03:41:19 2005 +0000
@@ -200,6 +200,18 @@
 ;; Note this can't simply be run inside function `dired-ls' as the hook
 ;; functions probably depend on the dired-subdir-alist to be OK.
 
+(defcustom dired-dnd-protocol-alist
+  '(("^file:///" . dired-dnd-handle-local-file)
+    ("^file://"  . dired-dnd-handle-file)
+    ("^file:"    . dired-dnd-handle-local-file))
+  "The functions to call when a drop in `dired-mode' is made.
+See `dnd-protocol-alist' for more information.  When nil, behave
+as in other buffers."
+  :type '(choice (repeat (cons (regexp) (function)))
+		 (const :tag "Behave as in other buffers" nil))
+  :version "22.1"
+  :group 'dired)
+
 ;; Internal variables
 
 (defvar dired-marker-char ?*		; the answer is 42
@@ -1522,14 +1534,11 @@
        'dired-desktop-buffer-misc-data)
   (setq dired-switches-alist nil)
   (dired-sort-other dired-actual-switches t)
-  (run-mode-hooks 'dired-mode-hook)
   (when (featurep 'dnd)
     (make-variable-buffer-local 'dnd-protocol-alist)
     (setq dnd-protocol-alist
-	  (append '(("^file:///" . dired-dnd-handle-local-file)
-		    ("^file://"  . dired-dnd-handle-file)
-		    ("^file:"    . dired-dnd-handle-local-file))
-		  dnd-protocol-alist))))
+	  (append dired-dnd-protocol-alist dnd-protocol-alist)))
+  (run-mode-hooks 'dired-mode-hook))
 
 ;; Idiosyncratic dired commands that don't deal with marks.
 
--- a/lisp/dnd.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/dnd.el	Thu May 12 03:41:19 2005 +0000
@@ -55,7 +55,7 @@
 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 "22.1"
-  :type 'alist
+  :type '(repeat (cons (regexp) (function)))
   :group 'dnd)
 
 
--- a/lisp/emacs-lisp/byte-run.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/emacs-lisp/byte-run.el	Thu May 12 03:41:19 2005 +0000
@@ -116,12 +116,16 @@
 
 (defmacro define-obsolete-function-alias (function new
 						   &optional when docstring)
-  "Set FUNCTION's function definition to NEW and warn that FUNCTION is obsolete.
-If provided, WHEN should be a string indicating when FUNCTION was
-first made obsolete, for example a date or a release number.  The
-optional argument DOCSTRING specifies the documentation string
-for FUNCTION; if DOCSTRING is omitted or nil, FUNCTION uses the
-documentation string of NEW unluess it already has one."
+  "Set FUNCTION's function definition to NEW and mark it obsolete.
+
+\(define-obsolete-function-alias 'old-fun 'new-fun \"22.1\" \"old-fun's doc.\")
+
+is equivalent to the following two lines of code:
+
+\(defalias 'old-fun 'new-fun \"old-fun's doc.\")
+\(make-obsolete 'old-fun 'new-fun \"22.1\")
+
+See the docstrings of `defalias' and `make-obsolete' for more details."
   `(progn
      (defalias ,function ,new ,docstring)
      (make-obsolete ,function ,new ,when)))
@@ -143,12 +147,17 @@
 
 (defmacro define-obsolete-variable-alias (variable new
 						 &optional when docstring)
-  "Make VARIABLE a variable alias for NEW and warn that VARIABLE is obsolete.
-If provided, WHEN should be a string indicating when VARIABLE was
-first made obsolete, for example a date or a release number.  The
-optional argument DOCSTRING specifies the documentation string
-for VARIABLE; if DOCSTRING is omitted or nil, VARIABLE uses the
-documentation string of NEW unless it already has one."
+  "Make VARIABLE a variable alias for NEW and mark it obsolete.
+
+\(define-obsolete-variable-alias 'old-var 'new-var \"22.1\" \"old-var's doc.\")
+
+is equivalent to the following two lines of code:
+
+\(defvaralias 'old-var 'new-var \"old-var's doc.\")
+\(make-obsolete-variable 'old-var 'new-var \"22.1\")
+
+See the docstrings of `defvaralias' and `make-obsolete-variable' or
+Info node `(elisp)Variable Aliases' for more details."
   `(progn
      (defvaralias ,variable ,new ,docstring)
       (make-obsolete-variable ,variable ,new ,when)))
--- a/lisp/emacs-lisp/cl-macs.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/emacs-lisp/cl-macs.el	Thu May 12 03:41:19 2005 +0000
@@ -233,7 +233,8 @@
 	 (bind-defs nil) (bind-enquote nil)
 	 (bind-inits nil) (bind-lets nil) (bind-forms nil)
 	 (header nil) (simple-args nil))
-    (while (or (stringp (car body)) (eq (car-safe (car body)) 'interactive))
+    (while (or (stringp (car body))
+	       (memq (car-safe (car body)) '(interactive declare)))
       (push (pop body) header))
     (setq args (if (listp args) (copy-list args) (list '&rest args)))
     (let ((p (last args))) (if (cdr p) (setcdr p (list '&rest (cdr p)))))
--- a/lisp/emacs-lisp/easy-mmode.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/emacs-lisp/easy-mmode.el	Thu May 12 03:41:19 2005 +0000
@@ -58,16 +58,31 @@
 
 (defun easy-mmode-pretty-mode-name (mode &optional lighter)
   "Turn the symbol MODE into a string intended for the user.
-If provided LIGHTER will be used to help choose capitalization."
+If provided, LIGHTER will be used to help choose capitalization by,
+replacing its case-insensitive matches with the literal string in LIGHTER."
   (let* ((case-fold-search t)
+	 ;; Produce "Foo-Bar minor mode" from foo-bar-minor-mode.
 	 (name (concat (replace-regexp-in-string
+			;; If the original mode name included "-minor" (some
+			;; of them don't, e.g. auto-revert-mode), then
+			;; replace it with " minor".
 			"-Minor" " minor"
+			;; "foo-bar-minor" -> "Foo-Bar-Minor"
 			(capitalize (replace-regexp-in-string
+				     ;; "foo-bar-minor-mode" -> "foo-bar-minor"
 				     "-mode\\'" "" (symbol-name mode))))
 		       " mode")))
     (if (not (stringp lighter)) name
-      (setq lighter (replace-regexp-in-string "\\`\\s-+\\|\\-s+\\'" "" lighter))
-      (replace-regexp-in-string lighter lighter name t t))))
+      ;; Strip leading and trailing whitespace from LIGHTER.
+      (setq lighter (replace-regexp-in-string "\\`\\s-+\\|\\s-+\\'" ""
+					      lighter))
+      ;; Replace any (case-insensitive) matches for LIGHTER in NAME
+      ;; with a literal LIGHTER.  E.g., if NAME is "Iimage mode" and
+      ;; LIGHTER is " iImag", then this will produce "iImage mode".
+      ;; (LIGHTER normally comes from the mode-line string passed to
+      ;; define-minor-mode, and normally includes at least one leading
+      ;; space.)
+      (replace-regexp-in-string (regexp-quote lighter) lighter name t t))))
 
 ;;;###autoload
 (defalias 'easy-mmode-define-minor-mode 'define-minor-mode)
--- a/lisp/emulation/cua-base.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/emulation/cua-base.el	Thu May 12 03:41:19 2005 +0000
@@ -777,9 +777,13 @@
   (let ((start (mark)) (end (point)))
     (or (<= start end)
 	(setq start (prog1 end (setq end start))))
-    (if cua--register
-	(copy-to-register cua--register start end nil)
-      (copy-region-as-kill start end))
+    (cond
+     (cua--register
+      (copy-to-register cua--register start end nil))
+     ((eq this-original-command 'clipboard-kill-ring-save)
+      (clipboard-kill-ring-save start end))
+     (t
+      (copy-region-as-kill start end)))
     (if cua-keep-region-after-copy
 	(cua--keep-active)
       (cua--deactivate))))
@@ -795,9 +799,13 @@
     (let ((start (mark)) (end (point)))
       (or (<= start end)
 	  (setq start (prog1 end (setq end start))))
-      (if cua--register
-	  (copy-to-register cua--register start end t)
-	(kill-region start end)))
+      (cond
+       (cua--register
+	(copy-to-register cua--register start end t))
+       ((eq this-original-command 'clipboard-kill-region)
+	(clipboard-kill-region start end))
+       (t
+	(kill-region start end))))
     (cua--deactivate)))
 
 ;;; Generic commands for regions, rectangles, and global marks
@@ -864,6 +872,8 @@
 	  (cua--insert-rectangle (cdr cua--last-killed-rectangle)
 				 nil paste-column paste-lines)
 	  (if arg (goto-char pt))))
+       ((eq this-original-command 'clipboard-yank)
+	(clipboard-yank))
        (t (yank arg)))))))
 
 (defun cua-paste-pop (arg)
@@ -1282,9 +1292,11 @@
   (define-key cua--region-keymap [remap delete-char]		'cua-delete-region)
   ;; kill region
   (define-key cua--region-keymap [remap kill-region]		'cua-cut-region)
+  (define-key cua--region-keymap [remap clipboard-kill-region]	'cua-cut-region)
   ;; copy region
   (define-key cua--region-keymap [remap copy-region-as-kill]	'cua-copy-region)
   (define-key cua--region-keymap [remap kill-ring-save]		'cua-copy-region)
+  (define-key cua--region-keymap [remap clipboard-kill-ring-save] 'cua-copy-region)
   ;; cancel current region/rectangle
   (define-key cua--region-keymap [remap keyboard-escape-quit]	'cua-cancel)
   (define-key cua--region-keymap [remap keyboard-quit]		'cua-cancel)
--- a/lisp/files.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/files.el	Thu May 12 03:41:19 2005 +0000
@@ -541,9 +541,6 @@
 the value of `default-directory'."
   (unless dir
     (setq dir default-directory))
-  (unless default-dirname
-    (setq default-dirname
-	  (if initial (concat dir initial) default-directory)))
   (read-file-name prompt dir (or default-dirname 
 				 (if initial (expand-file-name initial dir)
 				   dir))
@@ -632,8 +629,13 @@
 
 (defun locate-file (filename path &optional suffixes predicate)
   "Search for FILENAME through PATH.
+If found, return the absolute file name of FILENAME, with its suffixes;
+otherwise return nil.
+PATH should be a list of directories to look in, like the lists in
+`exec-path' or `load-path'.
 If SUFFIXES is non-nil, it should be a list of suffixes to append to
 file name when searching.  If SUFFIXES is nil, it is equivalent to '(\"\").
+Use '(\"/\") to disable PATH search, but still try the suffixes in SUFFIXES.
 If non-nil, PREDICATE is used instead of `file-readable-p'.
 PREDICATE can also be an integer to pass to the `access' system call,
 in which case file-name handlers are ignored.  This usage is deprecated.
@@ -674,6 +676,13 @@
        ((null action) (try-completion string names))
        (t (test-completion string names))))))
 
+(defun executable-find (command)
+  "Search for COMMAND in `exec-path' and return the absolute file name.
+Return nil if COMMAND is not found anywhere in `exec-path'."
+  ;; Use 1 rather than file-executable-p to better match the behavior of
+  ;; call-process.
+  (locate-file command exec-path exec-suffixes 1))
+
 (defun load-library (library)
   "Load the library named LIBRARY.
 This is an interface to the function `load'."
@@ -2142,6 +2151,26 @@
        (goto-char beg)
        end))))
 
+(defun hack-local-variables-confirm ()
+  (or (eq enable-local-variables t)
+      (and enable-local-variables
+	   (save-window-excursion
+	     (condition-case nil
+		 (switch-to-buffer (current-buffer))
+	       (error
+		;; If we fail to switch in the selected window,
+		;; it is probably a minibuffer or dedicated window.
+		;; So try another window.
+		(let ((pop-up-frames nil))
+		  ;; Refrain from popping up frames since it can't
+		  ;; be undone by save-window-excursion.
+		  (pop-to-buffer (current-buffer)))))
+	     (save-excursion
+	       (beginning-of-line)
+	       (set-window-start (selected-window) (point)))
+	     (y-or-n-p (format "Set local variables as specified in -*- line of %s? "
+			       (file-name-nondirectory buffer-file-name)))))))
+
 (defun hack-local-variables-prop-line (&optional mode-only)
   "Set local variables specified in the -*- line.
 Ignore any specification for `mode:' and `coding:';
@@ -2196,21 +2225,7 @@
       (if mode-only mode-specified
 	(if (and result
 		 (or mode-only
-		     (eq enable-local-variables t)
-		     (and enable-local-variables
-			  (save-window-excursion
-			    (condition-case nil
-				(switch-to-buffer (current-buffer))
-			      (error
-			       ;; If we fail to switch in the selected window,
-			       ;; it is probably a minibuffer.
-			       ;; So try another window.
-			       (condition-case nil
-				   (switch-to-buffer-other-window (current-buffer))
-				 (error
-				  (switch-to-buffer-other-frame (current-buffer))))))
-			    (y-or-n-p (format "Set local variables as specified in -*- line of %s? "
-					      (file-name-nondirectory buffer-file-name)))))))
+		     (hack-local-variables-confirm)))
 	    (let ((enable-local-eval enable-local-eval))
 	      (while result
 		(hack-one-local-variable (car (car result)) (cdr (car result)))
@@ -2239,20 +2254,8 @@
       (search-backward "\n\^L" (max (- (point-max) 3000) (point-min)) 'move)
       (when (let ((case-fold-search t))
 	      (and (search-forward "Local Variables:" nil t)
-		   (or (eq enable-local-variables t)
-		       mode-only
-		       (and enable-local-variables
-			    (save-window-excursion
-			      (switch-to-buffer (current-buffer))
-			      (save-excursion
-				(beginning-of-line)
-				(set-window-start (selected-window) (point)))
-			      (y-or-n-p (format "Set local variables as specified at end of %s? "
-						(if buffer-file-name
-						    (file-name-nondirectory
-						     buffer-file-name)
-						  (concat "buffer "
-							  (buffer-name))))))))))
+		   (or mode-only
+		       (hack-local-variables-confirm))))
 	(skip-chars-forward " \t")
 	(let ((enable-local-eval enable-local-eval)
 	      ;; suffix is what comes after "local variables:" in its line.
@@ -2473,18 +2476,7 @@
 		      (hack-one-local-variable-eval-safep val))
 		 ;; Permit eval if not root and user says ok.
 		 (and (not (zerop (user-uid)))
-		      (or (eq enable-local-eval t)
-			  (and enable-local-eval
-			       (save-window-excursion
-				 (switch-to-buffer (current-buffer))
-				 (save-excursion
-				   (beginning-of-line)
-				   (set-window-start (selected-window) (point)))
-				 (setq enable-local-eval
-				       (y-or-n-p (format "Process `eval' or hook local variables in %s? "
-							 (if buffer-file-name
-							     (concat "file " (file-name-nondirectory buffer-file-name))
-							   (concat "buffer " (buffer-name)))))))))))
+		      (hack-local-variables-confirm)))
 	     (if (eq var 'eval)
 		 (save-excursion (eval val))
 	       (make-local-variable var)
@@ -4870,5 +4862,5 @@
 (define-key ctl-x-5-map "\C-f" 'find-file-other-frame)
 (define-key ctl-x-5-map "r" 'find-file-read-only-other-frame)
 
-;;; arch-tag: bc68d3ea-19ca-468b-aac6-3a4a7766101f
+;; arch-tag: bc68d3ea-19ca-468b-aac6-3a4a7766101f
 ;;; files.el ends here
--- a/lisp/font-lock.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/font-lock.el	Thu May 12 03:41:19 2005 +0000
@@ -339,6 +339,10 @@
 (defvar font-lock-warning-face		'font-lock-warning-face
   "Face name to use for things that should stand out.")
 
+(defvar font-lock-negation-char-face	'font-lock-negation-char-face
+  "Face name to use for easy to overlook negation.
+This can be an \"!\" or the \"n\" in \"ifndef\".")
+
 (defvar font-lock-preprocessor-face	'font-lock-preprocessor-face
   "Face name to use for preprocessor directives.")
 
@@ -386,7 +390,7 @@
 
 MATCH-HIGHLIGHT should be of the form:
 
- (MATCH FACENAME [[OVERRIDE [LAXMATCH]])
+ (MATCH FACENAME [OVERRIDE [LAXMATCH]])
 
 MATCH is the subexpression of MATCHER to be highlighted.  FACENAME is an
 expression whose value is the face name to use.  Face default attributes
@@ -466,12 +470,27 @@
 optimized.")
 
 (defvar font-lock-keywords-alist nil
-  "Alist of `font-lock-keywords' local to a `major-mode'.
+  "Alist of additional `font-lock-keywords' elements for major modes.
+
+Each element has the form (MODE KEYWORDS . APPEND).
+`font-lock-set-defaults' adds the elements in the list KEYWORDS to
+`font-lock-keywords' when Font Lock is turned on in major mode MODE.
+
+If APPEND is nil, KEYWORDS are added at the beginning of
+`font-lock-keywords'.  If it is `set', they are used to replace the
+value of `font-lock-keywords'.  If APPEND is any other non-nil value,
+they are added at the end.
+
 This is normally set via `font-lock-add-keywords' and
 `font-lock-remove-keywords'.")
 
 (defvar font-lock-removed-keywords-alist nil
-  "Alist of `font-lock-keywords' removed from `major-mode'.
+  "Alist of `font-lock-keywords' elements to be removed for major modes.
+
+Each element has the form (MODE . KEYWORDS).  `font-lock-set-defaults'
+removes the elements in the list KEYWORDS from `font-lock-keywords'
+when Font Lock is turned on in major mode MODE.
+
 This is normally set via `font-lock-add-keywords' and
 `font-lock-remove-keywords'.")
 
@@ -1295,7 +1314,10 @@
 (defun font-lock-fontify-syntactically-region (start end &optional loudly ppss)
   "Put proper face on each string and comment between START and END.
 START should be at the beginning of a line."
-  (let (state face beg)
+  (let ((comment-end-regexp
+         (regexp-quote
+          (replace-regexp-in-string "^ *" "" comment-end)))
+        state face beg)
     (if loudly (message "Fontifying %s... (syntactically...)" (buffer-name)))
     (goto-char start)
     ;;
@@ -1310,7 +1332,19 @@
 	    (setq beg (max (nth 8 state) start))
 	    (setq state (parse-partial-sexp (point) end nil nil state
 					    'syntax-table))
-	    (when face (put-text-property beg (point) 'face face)))
+	    (when face (put-text-property beg (point) 'face face))
+	    (when (and (eq face 'font-lock-comment-face)
+                       comment-start-skip)
+	      ;; Find the comment delimiters
+	      ;; and use font-lock-comment-delimiter-face for them.
+	      (save-excursion
+		(goto-char beg)
+		(if (looking-at comment-start-skip)
+		    (put-text-property beg (match-end 0) 'face
+				       font-lock-comment-delimiter-face)))
+	      (if (looking-back comment-end-regexp (point-at-bol))
+		  (put-text-property (match-beginning 0) (point) 'face
+				     font-lock-comment-delimiter-face))))
 	  (< (point) end))
       (setq state (parse-partial-sexp (point) end nil nil state
 				      'syntax-table)))))
@@ -1401,6 +1435,7 @@
   (let ((case-fold-search font-lock-keywords-case-fold-search)
 	(keywords (cddr font-lock-keywords))
 	(bufname (buffer-name)) (count 0)
+        (pos (make-marker))
 	keyword matcher highlights)
     ;;
     ;; Fontify each item in `font-lock-keywords' from `start' to `end'.
@@ -1435,12 +1470,14 @@
 	(while highlights
 	  (if (numberp (car (car highlights)))
 	      (font-lock-apply-highlight (car highlights))
-	    (let ((pos (point)))
-	      (font-lock-fontify-anchored-keywords (car highlights) end)
-	      ;; Ensure forward progress.
-	      (if (< (point) pos) (goto-char pos))))
+	    (set-marker pos (point))
+            (font-lock-fontify-anchored-keywords (car highlights) end)
+            ;; Ensure forward progress.  `pos' is a marker because anchored
+            ;; keyword may add/delete text (this happens e.g. in grep.el).
+            (if (< (point) pos) (goto-char pos)))
 	  (setq highlights (cdr highlights))))
-      (setq keywords (cdr keywords)))))
+      (setq keywords (cdr keywords)))
+    (set-marker pos nil)))
 
 ;;; End of Keyword regexp fontification functions.
 
@@ -1761,6 +1798,16 @@
   "Font Lock mode face used to highlight warnings."
   :group 'font-lock-highlighting-faces)
 
+;; Matches font-lock-builtin-face, because that is used for #ifndef and
+;; font-lock-keyword-face, which alas make-mode uses for ifndef
+(defface font-lock-negation-char-face
+  '((((class color) (min-colors 88) (background light)) (:foreground "VioletRed" :weight bold))
+    (((class color) (min-colors 88) (background dark)) (:foreground "MediumOrchid1" :weight bold))
+    (((class color) (min-colors 8)) (:foreground "red" :weight bold))
+    (t (:inverse-video t :weight bold)))
+  "Font Lock mode face used to highlight easy to overlook negation."
+  :group 'font-lock-highlighting-faces)
+
 (defface font-lock-preprocessor-face
   '((t :inherit font-lock-builtin-face))
   "Font Lock mode face used to highlight preprocessor directives."
@@ -1809,7 +1856,7 @@
 ;  (put 'font-lock-fontify-more 'menu-enable '(identity))
 ;  (put 'font-lock-fontify-less 'menu-enable '(identity)))
 ;
-;;; Put the appropriate symbol property values on now.  See above.
+; ;; Put the appropriate symbol property values on now.  See above.
 ;(put 'global-font-lock-mode 'menu-selected 'global-font-lock-mode)
 ;(put 'font-lock-mode 'menu-selected 'font-lock-mode)
 ;(put 'font-lock-fontify-more 'menu-enable '(nth 2 font-lock-fontify-level))
@@ -1843,7 +1890,7 @@
 ;      (font-lock-fontify-level (1+ (car font-lock-fontify-level)))
 ;    (error "No more decoration")))
 ;
-;;; This should be called by `font-lock-set-defaults'.
+; ;; This should be called by `font-lock-set-defaults'.
 ;(defun font-lock-set-menu ()
 ;  ;; Activate less/more fontification entries if there are multiple levels for
 ;  ;; the current buffer.  Sets `font-lock-fontify-level' to be of the form
@@ -1864,7 +1911,7 @@
 ;      (setq font-lock-fontify-level (list level (> level 1)
 ;					  (< level (1- (length keywords))))))))
 ;
-;;; This should be called by `font-lock-unset-defaults'.
+; ;; This should be called by `font-lock-unset-defaults'.
 ;(defun font-lock-unset-menu ()
 ;  ;; Deactivate less/more fontification entries.
 ;  (setq font-lock-fontify-level nil))
@@ -1872,7 +1919,7 @@
 ;;; End of Menu support.
 
 ;;; Various regexp information shared by several modes.
-;;; Information specific to a single mode should go in its load library.
+; ;; Information specific to a single mode should go in its load library.
 
 ;; Font Lock support for C, C++, Objective-C and Java modes is now in
 ;; cc-fonts.el (and required by cc-mode.el).  However, the below function
@@ -2025,9 +2072,9 @@
       ;; ELisp and CLisp `&' keywords as types.
       '("\\&\\sw+\\>" . font-lock-type-face)
       ;;
-;;; This is too general -- rms.
-;;; A user complained that he has functions whose names start with `do'
-;;; and that they get the wrong color.
+;;;  This is too general -- rms.
+;;;  A user complained that he has functions whose names start with `do'
+;;;  and that they get the wrong color.
 ;;;      ;; CL `with-' and `do-' constructs
 ;;;      '("(\\(\\(do-\\|with-\\)\\(\\s_\\|\\w\\)*\\)" 1 font-lock-keyword-face)
       )))
--- a/lisp/gnus/ChangeLog	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/gnus/ChangeLog	Thu May 12 03:41:19 2005 +0000
@@ -1,3 +1,15 @@
+2005-04-28  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* gnus-art.el (article-date-ut): Support converting date in
+	forwarded parts as well.
+	(gnus-article-save-original-date): New macro.
+	(gnus-display-mime): Use it.
+
+2005-04-28  David Hansen  <david.hansen@physik.fu-berlin.de>
+
+	* nnrss.el (nnrss-check-group, nnrss-request-article): Support the
+	enclosure element of <item>.
+
 2005-04-24  Teodor Zlatanov  <tzz@lifelogs.com>
 
 	* spam-report.el (spam-report-unplug-agent)
@@ -18,7 +30,7 @@
 	Process requests from `spam-report-requests-file'.
 	(spam-report-url-ping-mm-url): Autoload.
 	[Added missing offline functionality from trunk.]
-	
+
 2005-04-18  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* qp.el (quoted-printable-encode-region): Save excursion.
--- a/lisp/gnus/gnus-art.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/gnus/gnus-art.el	Thu May 12 03:41:19 2005 +0000
@@ -2824,72 +2824,76 @@
 	  (forward-line 1)
 	(setq ended t)))))
 
-(defun article-date-ut (&optional type highlight header)
+(defun article-date-ut (&optional type highlight)
   "Convert DATE date to universal time in the current article.
 If TYPE is `local', convert to local time; if it is `lapsed', output
 how much time has lapsed since DATE.  For `lapsed', the value of
 `gnus-article-date-lapsed-new-header' says whether the \"X-Sent:\" header
 should replace the \"Date:\" one, or should be added below it."
   (interactive (list 'ut t))
-  (let* ((header (or header
-		     (message-fetch-field "date")
-		     ""))
-	 (tdate-regexp "^Date:[ \t]\\|^X-Sent:[ \t]")
-	 (date-regexp
-	  (cond
-	   ((not gnus-article-date-lapsed-new-header)
-	    tdate-regexp)
-	   ((eq type 'lapsed)
-	    "^X-Sent:[ \t]")
-	   (t
-	    "^Date:[ \t]")))
-	 (date (if (vectorp header) (mail-header-date header)
-		 header))
+  (let* ((tdate-regexp "^Date:[ \t]\\|^X-Sent:[ \t]")
+	 (date-regexp (cond ((not gnus-article-date-lapsed-new-header)
+			     tdate-regexp)
+			    ((eq type 'lapsed)
+			     "^X-Sent:[ \t]")
+			    (article-lapsed-timer
+			     "^Date:[ \t]")
+			    (t
+			     tdate-regexp)))
+	 (case-fold-search t)
+	 (inhibit-read-only t)
 	 (inhibit-point-motion-hooks t)
-	 pos
-	 bface eface)
+	 pos date bface eface)
     (save-excursion
       (save-restriction
-	(article-narrow-to-head)
-	(when (re-search-forward tdate-regexp nil t)
-	  (setq bface (get-text-property (gnus-point-at-bol) 'face)
-		date (or (get-text-property (gnus-point-at-bol)
-					    'original-date)
-			 date)
-		eface (get-text-property (1- (gnus-point-at-eol)) 'face))
-	  (forward-line 1))
-	(when (and date (not (string= date "")))
+	(widen)
+	(goto-char (point-min))
+	(while (or (setq date (get-text-property (setq pos (point))
+						 'original-date))
+		   (when (setq pos (next-single-property-change
+				    (point) 'original-date))
+		     (setq date (get-text-property pos 'original-date))
+		     t))
+	  (narrow-to-region pos (or (text-property-any pos (point-max)
+						       'original-date nil)
+				    (point-max)))
+	  (goto-char (point-min))
+	  (when (re-search-forward tdate-regexp nil t)
+	    (setq bface (get-text-property (gnus-point-at-bol) 'face)
+		  eface (get-text-property (1- (gnus-point-at-eol)) 'face)))
 	  (goto-char (point-min))
-	  (let ((inhibit-read-only t))
-	    ;; Delete any old Date headers.
-	    (while (re-search-forward date-regexp nil t)
-	      (if pos
-		  (delete-region (progn (beginning-of-line) (point))
-				 (progn (gnus-article-forward-header)
-					(point)))
-		(delete-region (progn (beginning-of-line) (point))
-				 (progn (gnus-article-forward-header)
-					(forward-char -1)
-					(point)))
-		(setq pos (point))))
-	    (when (and (not pos)
-		       (re-search-forward tdate-regexp nil t))
-	      (forward-line 1))
-	    (when pos
-	      (goto-char pos))
-	    (insert (article-make-date-line date (or type 'ut)))
-	    (unless pos
-	      (insert "\n")
-	      (forward-line -1))
-	    ;; Do highlighting.
-	    (beginning-of-line)
-	    (when (looking-at "\\([^:]+\\): *\\(.*\\)$")
-	      (put-text-property (match-beginning 1) (1+ (match-end 1))
-				 'original-date date)
-	      (put-text-property (match-beginning 1) (1+ (match-end 1))
-				 'face bface)
-	      (put-text-property (match-beginning 2) (match-end 2)
-				 'face eface))))))))
+	  (setq pos nil)
+	  ;; Delete any old Date headers.
+	  (while (re-search-forward date-regexp nil t)
+	    (if pos
+		(delete-region (gnus-point-at-bol)
+			       (progn
+				 (gnus-article-forward-header)
+				 (point)))
+	      (delete-region (gnus-point-at-bol)
+			     (progn
+			       (gnus-article-forward-header)
+			       (forward-char -1)
+			       (point)))
+	      (setq pos (point))))
+	  (when (and (not pos)
+		     (re-search-forward tdate-regexp nil t))
+	    (forward-line 1))
+	  (gnus-goto-char pos)
+	  (insert (article-make-date-line date (or type 'ut)))
+	  (unless pos
+	    (insert "\n")
+	    (forward-line -1))
+	  ;; Do highlighting.
+	  (beginning-of-line)
+	  (when (looking-at "\\([^:]+\\): *\\(.*\\)$")
+	    (put-text-property (match-beginning 1) (1+ (match-end 1))
+			       'face bface)
+	    (put-text-property (match-beginning 2) (match-end 2)
+			       'face eface))
+	  (put-text-property (point-min) (1- (point-max)) 'original-date date)
+	  (goto-char (point-max))
+	  (widen))))))
 
 (defun article-make-date-line (date type)
   "Return a DATE line of TYPE."
@@ -3075,6 +3079,27 @@
   (interactive (list t))
   (article-date-ut 'iso8601 highlight))
 
+(defmacro gnus-article-save-original-date (&rest forms)
+  "Save the original date as a text property and evaluate FORMS."
+  `(let* ((case-fold-search t)
+	  (start (progn
+		   (goto-char (point-min))
+		   (when (and (re-search-forward "^date:[\t\n ]+" nil t)
+			      (not (bolp)))
+		     (match-end 0))))
+	  (date (when (and start
+			   (re-search-forward "[\t ]*\n\\([^\t ]\\|\\'\\)"
+					      nil t))
+		  (buffer-substring-no-properties start
+						  (match-beginning 0)))))
+     (goto-char (point-max))
+     (skip-chars-backward "\n")
+     (put-text-property (point-min) (point) 'original-date date)
+     ,@forms
+     (goto-char (point-max))
+     (skip-chars-backward "\n")
+     (put-text-property (point-min) (point) 'original-date date)))
+
 ;; (defun article-show-all ()
 ;;   "Show all hidden text in the article buffer."
 ;;   (interactive)
@@ -4686,7 +4711,8 @@
 	    (save-restriction
 	      (article-goto-body)
 	      (narrow-to-region (point-min) (point))
-	      (gnus-treat-article 'head))))))))
+	      (gnus-article-save-original-date
+	       (gnus-treat-article 'head)))))))))
 
 (defcustom gnus-mime-display-multipart-as-mixed nil
   "Display \"multipart\" parts as  \"multipart/mixed\".
--- a/lisp/gnus/nnrss.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/gnus/nnrss.el	Thu May 12 03:41:19 2005 +0000
@@ -195,6 +195,7 @@
 				   (delete "" (split-string (nth 6 e) "\n+"))
 				   " ")))
 	      (link (nth 2 e))
+	      (enclosure (nth 7 e))
 	      ;; Enable encoding of Newsgroups header in XEmacs.
 	      (default-enable-multibyte-characters t)
 	      (rfc2047-header-encoding-alist
@@ -203,18 +204,21 @@
 			 rfc2047-header-encoding-alist)
 		 rfc2047-header-encoding-alist))
 	      rfc2047-encode-encoded-words body)
-	  (when (or text link)
+	  (when (or text link enclosure)
 	    (insert "\n")
 	    (insert "<#multipart type=alternative>\n"
 		    "<#part type=\"text/plain\">\n")
 	    (setq body (point))
-	    (if text
-		(progn
-		  (insert text "\n")
-		  (when link
-		    (insert "\n" link "\n")))
-	      (when link
-		(insert link "\n")))
+	    (when text
+	      (insert text "\n")
+	      (when (or link enclosure)
+		(insert "\n")))
+	    (when link
+	      (insert link "\n"))
+	    (when enclosure
+	      (insert (car enclosure) " "
+		      (nth 2 enclosure) " "
+		      (nth 3 enclosure) "\n"))
 	    (setq body (buffer-substring body (point)))
 	    (insert "<#/part>\n"
 		    "<#part type=\"text/html\">\n"
@@ -223,6 +227,10 @@
 	      (insert text "\n"))
 	    (when link
 	      (insert "<p><a href=\"" link "\">link</a></p>\n"))
+	    (when enclosure
+	      (insert "<p><a href=\"" (car enclosure) "\">"
+		      (cadr enclosure) "</a> " (nth 2 enclosure)
+		      " " (nth 3 enclosure) "</p>\n"))
 	    (insert "</body></html>\n"
 		    "<#/part>\n"
 		    "<#/multipart>\n"))
@@ -518,8 +526,8 @@
 ;;; Snarf functions
 
 (defun nnrss-check-group (group server)
-  (let (file xml subject url extra changed author
-	     date rss-ns rdf-ns content-ns dc-ns)
+  (let (file xml subject url extra changed author date
+	     enclosure rss-ns rdf-ns content-ns dc-ns)
     (if (and nnrss-use-local
 	     (file-exists-p (setq file (expand-file-name
 					(nnrss-translate-file-chars
@@ -567,6 +575,27 @@
 	(setq date (or (nnrss-node-text dc-ns 'date item)
 		       (nnrss-node-text rss-ns 'pubDate item)
 		       (message-make-date)))
+	(when (setq enclosure (cadr (assq (intern (concat rss-ns "enclosure")) item)))
+	  (let ((url (cdr (assq 'url enclosure)))
+		(len (cdr (assq 'length enclosure)))
+		(type (cdr (assq 'type enclosure)))
+		(name))
+	    (setq len
+		  (if (and len (integerp (setq len (string-to-number len))))
+		      ;; actually already in `ls-lisp-format-file-size' but
+		      ;; probably not worth to require it for one function
+		      (do ((size (/ len 1.0) (/ size 1024.0))
+			   (post-fixes (list "" "k" "M" "G" "T" "P" "E")
+				       (cdr post-fixes)))
+			  ((< size 1024)
+			   (format "%.1f%s" size (car post-fixes))))
+		    "0"))
+	    (setq url (or url ""))
+	    (setq name (if (string-match "/\\([^/]*\\)$" url)
+			   (match-string 1 url)
+			 "file"))
+	    (setq type (or type ""))
+	    (setq enclosure (list url name len type))))
 	(push
 	 (list
 	  (incf nnrss-group-max)
@@ -575,7 +604,8 @@
 	  (and subject (nnrss-mime-encode-string subject))
 	  (and author (nnrss-mime-encode-string author))
 	  date
-	  (and extra (nnrss-decode-entities-string extra)))
+	  (and extra (nnrss-decode-entities-string extra))
+	  enclosure)
 	 nnrss-group-data)
 	(gnus-sethash (or url extra) t nnrss-group-hashtb)
 	(setq changed t))
--- a/lisp/ido.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/ido.el	Thu May 12 03:41:19 2005 +0000
@@ -251,8 +251,8 @@
 ;;
 ;; Customize the `ido' group to change the `ido' functionality.
 ;;
-;; To modify the keybindings, use the hook provided.  For example:
-;;(add-hook 'ido-define-mode-map-hook 'ido-my-keys)
+;; To modify the keybindings, use the ido-setup-hook.  For example:
+;;(add-hook 'ido-setup-hook 'ido-my-keys)
 ;;
 ;;(defun ido-my-keys ()
 ;;  "Add my keybindings for ido."
@@ -705,8 +705,11 @@
 		 (const never))
   :group 'ido)
 
-(defcustom ido-define-mode-map-hook  nil
-  "*Hook to define keys in `ido-mode-map' for extra keybindings."
+(defcustom ido-setup-hook  nil
+  "*Hook run after the ido variables and keymap has been setup.
+The dynamic variable `ido-cur-item' contains the current type of item that
+is read by ido, possible values are file, dir, buffer, and list.
+Additional keys can be defined in `ido-mode-map'."
   :type 'hook
   :group 'ido)
 
@@ -931,6 +934,9 @@
 (defvar ido-text-init nil
   "The initial string for the users string it is typed in.")
 
+(defvar ido-input-stack nil
+  "Stores the users strings when user hits M-b/M-f.")
+
 (defvar ido-matches nil
   "List of files currently matching `ido-text'.")
 
@@ -1399,13 +1405,14 @@
       (define-key map [(meta backspace)] 'ido-delete-backward-word-updir)
       (define-key map [(control backspace)] 'ido-up-directory)
       (define-key map "\C-l" 'ido-reread-directory)
-      (define-key map [(meta ?b)] 'ido-next-work-file)
       (define-key map [(meta ?d)] 'ido-wide-find-dir)
-      (define-key map [(meta ?f)] 'ido-wide-find-file)
+      (define-key map [(meta ?b)] 'ido-push-dir)
+      (define-key map [(meta ?f)] 'ido-wide-find-file-or-pop-dir)
       (define-key map [(meta ?k)] 'ido-forget-work-directory)
       (define-key map [(meta ?m)] 'ido-make-directory)
       (define-key map [(meta ?n)] 'ido-next-work-directory)
       (define-key map [(meta ?o)] 'ido-prev-work-file)
+      (define-key map [(meta ?O)] 'ido-next-work-file)
       (define-key map [(meta ?p)] 'ido-prev-work-directory)
       (define-key map [(meta ?s)] 'ido-merge-work-directories)
       )
@@ -1431,8 +1438,7 @@
 	(define-key map [remap viper-del-backward-char-in-insert] 'ido-delete-backward-updir)
 	(define-key map [remap viper-delete-backward-word] 'ido-delete-backward-word-updir)))
 
-    (setq ido-mode-map map)
-    (run-hooks 'ido-define-mode-map-hook)))
+    (setq ido-mode-map map)))
 
 (defun ido-final-slash (dir &optional fix-it)
   ;; return DIR if DIR has final slash.
@@ -1601,6 +1607,10 @@
 
     (ido-define-mode-map)
     (setq ido-text-init initial)
+    (setq ido-input-stack nil)
+
+    (run-hooks 'ido-setup-hook)
+
     (while (not done)
       (ido-trace "\n_LOOP_" ido-text-init)
       (setq ido-exit nil)
@@ -1742,9 +1752,11 @@
 	    (setq ido-text-init "")
 	    (while new
 	      (setq new (if edit
-			     (read-file-name (concat prompt "[EDIT] ")
-					     (expand-file-name d)
-					     (concat d f) nil f)
+			    (condition-case nil
+				(read-file-name (concat prompt "[EDIT] ")
+						(expand-file-name d)
+						(concat d f) nil f)
+			      (quit (concat d f)))
 			   f)
 		    d (or (file-name-directory new) "/")
 		    f (file-name-nondirectory new)
@@ -1763,7 +1775,11 @@
 		    (setq ido-text-init f
 			  new nil))))))
 	 (t
-	  (setq ido-text-init (read-string (concat prompt "[EDIT] ") ido-final-text))))
+	  (setq ido-text-init
+		(condition-case nil
+		    (read-string (concat prompt "[EDIT] ") ido-final-text)
+		  (quit ido-final-text)))))
+
 	nil)
 
        ((eq ido-exit 'keep)
@@ -1772,7 +1788,7 @@
        ((memq ido-exit '(dired fallback find-file switch-to-buffer insert-buffer insert-file))
 	(setq done t))
 
-       ((eq ido-exit 'updir)
+       ((memq ido-exit '(updir push))
 	;; cannot go up if already at the root-dir (Unix) or at the
 	;; root-dir of a certain drive (Windows or MS-DOS).
         (if (ido-is-tramp-root)
@@ -1781,9 +1797,31 @@
 	      (ido-set-current-directory (match-string 1 ido-current-directory))
 	      (setq ido-set-default-item t))
 	  (unless (ido-is-root-directory)
+	    (when (eq ido-exit 'push)
+	      (setq ido-input-stack (cons (cons ido-cur-item ido-text) ido-input-stack))
+	      (setq ido-cur-item 'dir)
+	      (setq ido-text-init (file-name-nondirectory (substring ido-current-directory 0 -1)))
+	      (ido-trace "push" ido-input-stack))
 	    (ido-set-current-directory (file-name-directory (substring ido-current-directory 0 -1)))
 	    (setq ido-set-default-item t))))
 
+       ((eq ido-exit 'pop)
+	(ido-trace "pop" ido-input-stack)
+	(let ((elt (car ido-input-stack)))
+	  (setq ido-input-stack (cdr ido-input-stack))
+	  (ido-set-current-directory (concat ido-current-directory ido-text))
+	  (setq ido-cur-item (car elt))
+	  (setq ido-text-init (cdr elt))))
+
+       ((eq ido-exit 'pop-all)
+	(ido-trace "pop-all" ido-input-stack)
+	(while ido-input-stack
+	  (let ((elt (car ido-input-stack)))
+	    (setq ido-input-stack (cdr ido-input-stack))
+	    (ido-set-current-directory (concat ido-current-directory ido-text))
+	    (setq ido-cur-item (car elt))
+	    (setq ido-text-init (cdr elt)))))
+
        ;; Handling the require-match must be done in a better way.
        ((and require-match
 	     (not (if ido-directory-too-big
@@ -1838,7 +1876,14 @@
 		  (setq ido-last-directory-list
 			(cons (cons ido-current-directory ido-selected) ido-last-directory-list)))))
 	  (ido-set-current-directory ido-current-directory ido-selected)
-	  (setq ido-set-default-item t))
+	  (if ido-input-stack
+	      (while ido-input-stack
+		(let ((elt (car ido-input-stack)))
+		  (if (setq ido-input-stack (cdr ido-input-stack))
+		      (ido-set-current-directory ido-current-directory (cdr elt))
+		    (setq ido-text-init (cdr elt)))
+		  (setq ido-cur-item (car elt))))
+	    (setq ido-set-default-item t)))
 
 	 (t
 	  (setq done t))))))
@@ -1968,10 +2013,11 @@
 	(require 'ffap)
 	;; Duplicate code from ffap-guesser as we want different behaviour for files and URLs.
 	(cond
-	 ((and ido-use-url-at-point
-	       ffap-url-regexp
-	       (ffap-fixup-url (or (ffap-url-at-point)
-				   (ffap-gopher-at-point))))
+	 ((with-no-warnings
+	    (and ido-use-url-at-point
+		 ffap-url-regexp
+		 (ffap-fixup-url (or (ffap-url-at-point)
+				     (ffap-gopher-at-point)))))
 	  (setq ido-exit 'ffap
 		filename t))
 
@@ -2041,7 +2087,8 @@
 	      (ido-record-work-directory)
 	      (funcall method ido-current-directory)
 	      (if (eq method 'dired)
-		  (dired-goto-file (expand-file-name file))))
+		  (with-no-warnings
+		    (dired-goto-file (expand-file-name file)))))
 	     ((string-match "[[*?]" filename)
 	      (setq dirname (concat ido-current-directory filename))
 	      (ido-record-command method dirname)
@@ -2283,7 +2330,7 @@
   (interactive)
   (if (or (not ido-require-match)
 	   (ido-existing-item-p))
-      (throw 'exit nil)))
+      (exit-minibuffer)))
 
 (defun ido-select-text ()
   "Select the buffer or file named by the prompt.
@@ -2432,7 +2479,9 @@
   (unless file
     (let ((enable-recursive-minibuffers t))
       (setq file
-	    (read-string (concat "Wide find file: " ido-current-directory) ido-text))))
+	    (condition-case nil
+		(read-string (concat "Wide find file: " ido-current-directory) ido-text)
+	      (quit "")))))
   (when (> (length file) 0)
     (setq ido-use-merged-list t ido-try-merged-list 'wide)
     (setq ido-exit 'refresh)
@@ -2446,7 +2495,9 @@
   (unless dir
     (let ((enable-recursive-minibuffers t))
       (setq dir
-	    (read-string (concat "Wide find directory: " ido-current-directory) ido-text))))
+	    (condition-case nil
+		(read-string (concat "Wide find directory: " ido-current-directory) ido-text)
+	      (quit "")))))
   (when (> (length dir) 0)
     (setq ido-use-merged-list t ido-try-merged-list 'wide)
     (setq ido-exit 'refresh)
@@ -2454,6 +2505,26 @@
     (setq ido-rotate-temp t)
     (exit-minibuffer)))
 
+(defun ido-push-dir ()
+  "Move to previous directory in file name, push current input on stack."
+  (interactive)
+  (setq ido-exit 'push)
+  (exit-minibuffer))
+
+(defun ido-pop-dir (arg)
+  "Pop directory from input stack back to input.
+With \\[universal-argument], pop all element."
+  (interactive "P")
+  (when ido-input-stack
+    (setq ido-exit (if arg 'pop-all 'pop))
+    (exit-minibuffer)))
+
+(defun ido-wide-find-file-or-pop-dir (arg)
+  (interactive "P")
+  (if ido-input-stack
+      (ido-pop-dir arg)
+    (ido-wide-find-file)))
+
 (defun ido-make-directory (&optional dir)
   "Prompt for DIR to create in current directory."
   (interactive)
@@ -2771,67 +2842,69 @@
 (defun ido-make-merged-file-list (text auto wide)
   (let (res)
     (message "Searching for `%s'...." text)
-    (if (and (ido-final-slash text) ido-dir-file-cache)
-	(if wide
-	    (setq res (ido-wide-find-dirs-or-files
-		       ido-current-directory (substring text 0 -1) ido-enable-prefix t))
-	  ;; Use list of cached directories
-	  (let ((re (concat (regexp-quote (substring text 0 -1)) "[^/:]*/\\'"))
-		(dirs ido-dir-file-cache)
-		dir b d f)
-	    (if nil ;; simple
-		(while dirs
-		  (setq dir (car (car dirs))
-			dirs (cdr dirs))
-		  (when (and (string-match re dir)
-			     (not (ido-ignore-item-p dir ido-ignore-directories-merge))
-			     (file-directory-p dir))
-		    (setq b (substring dir 0 -1)
-			  f (concat (file-name-nondirectory b) "/")
-			  d (file-name-directory b)
-			  res (cons (cons f d) res))))
+    (condition-case nil
+	(if (and (ido-final-slash text) ido-dir-file-cache)
+	    (if wide
+		(setq res (ido-wide-find-dirs-or-files
+			   ido-current-directory (substring text 0 -1) ido-enable-prefix t))
+	      ;; Use list of cached directories
+	      (let ((re (concat (regexp-quote (substring text 0 -1)) "[^/:]*/\\'"))
+		    (dirs ido-dir-file-cache)
+		    dir b d f)
+		(if nil ;; simple
+		    (while dirs
+		      (setq dir (car (car dirs))
+			    dirs (cdr dirs))
+		      (when (and (string-match re dir)
+				 (not (ido-ignore-item-p dir ido-ignore-directories-merge))
+				 (file-directory-p dir))
+			(setq b (substring dir 0 -1)
+			      f (concat (file-name-nondirectory b) "/")
+			      d (file-name-directory b)
+			      res (cons (cons f d) res))))
+		  (while dirs
+		    (setq dir (car dirs)
+			  d (car dir)
+			  dirs (cdr dirs))
+		    (when (not (ido-ignore-item-p d ido-ignore-directories-merge))
+		      (setq dir (cdr (cdr dir)))
+		      (while dir
+			(setq f (car dir)
+			      dir (cdr dir))
+			(if (and (string-match re f)
+				 (not (ido-ignore-item-p f ido-ignore-directories)))
+			    (setq res (cons (cons f d) res)))))
+		    (if (and auto (input-pending-p))
+			(setq dirs nil
+			      res t))))))
+	  (if wide
+	      (setq res (ido-wide-find-dirs-or-files
+			 ido-current-directory text ido-enable-prefix nil))
+	    (let ((ido-text text)
+		  (dirs ido-work-directory-list)
+		  (must-match (and text (> (length text) 0)))
+		  dir fl)
+	      (if (and auto (not (member ido-current-directory dirs)))
+		  (setq dirs (cons ido-current-directory dirs)))
 	      (while dirs
 		(setq dir (car dirs)
-		      d (car dir)
 		      dirs (cdr dirs))
-		(when (not (ido-ignore-item-p d ido-ignore-directories-merge))
-		  (setq dir (cdr (cdr dir)))
-		  (while dir
-		    (setq f (car dir)
-			  dir (cdr dir))
-		    (if (and (string-match re f)
-			     (not (ido-ignore-item-p f ido-ignore-directories)))
-			(setq res (cons (cons f d) res)))))
+		(when (and dir (stringp dir)
+			   (or ido-merge-ftp-work-directories
+			       (not (ido-is-ftp-directory dir)))
+			   (file-directory-p dir)
+			   ;; TODO. check for nonreadable and too-big.
+			   (setq fl (if (eq ido-cur-item 'file)
+					(ido-make-file-list1 dir t)
+				      (ido-make-dir-list1 dir t))))
+		  (if must-match
+		      (setq fl (ido-set-matches1 fl)))
+		  (if fl
+		      (setq res (nconc fl res))))
 		(if (and auto (input-pending-p))
 		    (setq dirs nil
 			  res t))))))
-      (if wide
-	  (setq res (ido-wide-find-dirs-or-files
-		     ido-current-directory text ido-enable-prefix nil))
-	(let ((ido-text text)
-	      (dirs ido-work-directory-list)
-	      (must-match (and text (> (length text) 0)))
-	      dir fl)
-	  (if (and auto (not (member ido-current-directory dirs)))
-	      (setq dirs (cons ido-current-directory dirs)))
-	  (while dirs
-	    (setq dir (car dirs)
-		  dirs (cdr dirs))
-	    (when (and dir (stringp dir)
-		       (or ido-merge-ftp-work-directories
-			   (not (ido-is-ftp-directory dir)))
-		       (file-directory-p dir)
-		       ;; TODO. check for nonreadable and too-big.
-		       (setq fl (if (eq ido-cur-item 'file)
-				    (ido-make-file-list1 dir t)
-				  (ido-make-dir-list1 dir t))))
-	      (if must-match
-		  (setq fl (ido-set-matches1 fl)))
-	      (if fl
-		  (setq res (nconc fl res))))
-	    (if (and auto (input-pending-p))
-		(setq dirs nil
-		      res t))))))
+      (quit (setq res t)))
     (if (and res (not (eq res t)))
 	(setq res (ido-sort-merged-list res auto)))
     (when (and (or ido-rotate-temp ido-rotate-file-list-default)
@@ -3063,7 +3136,8 @@
 	  (setq ido-temp-list
 		(cons default ido-temp-list))))
     (setq ido-temp-list (delete "." ido-temp-list))
-    (setq ido-temp-list (cons "." ido-temp-list))
+    (unless ido-input-stack
+      (setq ido-temp-list (cons "." ido-temp-list)))
     (run-hooks 'ido-make-dir-list-hook)
     ido-temp-list))
 
@@ -3265,7 +3339,8 @@
 	  (if (pos-visible-in-window-p (point-max) win)
 	      (if (or ido-completion-buffer-all-completions (boundp 'ido-completion-buffer-full))
 		  (set-window-start win (point-min))
-		(set (make-local-variable 'ido-completion-buffer-full) t)
+		(with-no-warnings
+		  (set (make-local-variable 'ido-completion-buffer-full) t))
 		(setq full-list t
 		      display-it t))
 	    (scroll-other-window))
--- a/lisp/international/latexenc.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/international/latexenc.el	Thu May 12 03:41:19 2005 +0000
@@ -120,24 +120,32 @@
       (save-excursion
         ;; try to find the coding system in this file
         (goto-char (point-min))
-        (if (or
-             (re-search-forward "^[^%\n]*\\\\inputencoding{\\(.*\\)}" nil t)
-             (re-search-forward "^[^%\n]*\\\\usepackage\\[\\(.*\\)\\]{inputenc}" nil t))
-            (let* ((match (match-string 1))
-                   (sym (intern match)))
-              (when (latexenc-inputenc-to-coding-system match)
-                (setq sym (latexenc-inputenc-to-coding-system match))
-                (when (coding-system-p sym)
-		  sym
-                  (if (and (require 'code-pages nil t) (coding-system-p sym))
-                      sym
-                    'undecided))))
+	(if (catch 'cs
+	      (let ((case-fold-search nil))
+		(while (search-forward "inputenc" nil t)
+		  (goto-char (match-beginning 0))
+		  (beginning-of-line)
+		  (if (or (looking-at "[^%\n]*\\\\usepackage\\[\\([^]]*\\)\\]{\\([^}]*,\\)?inputenc\\(,[^}]*\\)?}")
+			  (looking-at "[^%\n]*\\\\inputencoding{\\([^}]*\\)}"))
+		      (throw 'cs t)
+		    (goto-char (match-end 0))))))
+	    (let* ((match (match-string 1))
+		   (sym (intern match)))
+	      (when (latexenc-inputenc-to-coding-system match)
+		(setq sym (latexenc-inputenc-to-coding-system match)))
+	      (when (coding-system-p sym)
+		sym
+		(if (and (require 'code-pages nil t) (coding-system-p sym))
+		    sym
+		  'undecided)))
           ;; else try to find it in the master/main file
           (let (latexenc-main-file)
             ;; is there a TeX-master or tex-main-file in the local variable section
             (unless latexenc-dont-use-TeX-master-flag
               (goto-char (point-max))
-              (when (re-search-backward "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\"" nil t)
+	      (search-backward "\n\^L" (max (- (point-max) 3000) (point-min)) 'move)
+	      (search-forward "Local Variables:" nil t)
+              (when (re-search-forward "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\"" nil t)
                 (let ((file (concat (file-name-directory (nth 1 arg-list)) (match-string 2))))
                   (if (file-exists-p file)
                       (setq latexenc-main-file file)
--- a/lisp/international/mule.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/international/mule.el	Thu May 12 03:41:19 2005 +0000
@@ -2146,9 +2146,9 @@
   (when (re-search-forward "\\`[[:space:]\n]*<\\?xml" size t)
     (let ((end (save-excursion
 		 ;; This is a hack.
-		 (re-search-forward "\"\\s-*\\?>" size t))))
+		 (re-search-forward "[\"']\\s-*\\?>" size t))))
       (when end
-	(if (re-search-forward "encoding=\"\\(.+?\\)\"" end t)
+	(if (re-search-forward "encoding=[\"']\\(.+?\\)[\"']" end t)
 	    (let* ((match (match-string 1))
 		   (sym (intern (downcase match))))
 	      (if (coding-system-p sym)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/jka-cmpr-hook.el	Thu May 12 03:41:19 2005 +0000
@@ -0,0 +1,293 @@
+;;; jka-cmpr-hook.el --- preloaded code to enable jka-compr.el
+
+;; Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2003, 2004, 2005  Free Software Foundation, Inc.
+
+;; Author: jka@ece.cmu.edu (Jay K. Adams)
+;; Maintainer: FSF
+;; Keywords: data
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; This file contains the  code to enable and disable Auto-Compression mode.
+;; It is preloaded.  The guts of this mode are in jka-compr.el, which
+;; is loaded only when you really try to uncompress something.
+
+;;; Code:
+
+(defgroup compression nil
+  "Data compression utilities"
+  :group 'data)
+
+(defgroup jka-compr nil
+  "jka-compr customization"
+  :group 'compression)
+
+;;; I have this defined so that .Z files are assumed to be in unix
+;;; compress format; and .gz files, in gzip format, and .bz2 files in bzip fmt.
+(defcustom jka-compr-compression-info-list
+  ;;[regexp
+  ;; compr-message  compr-prog  compr-args
+  ;; uncomp-message uncomp-prog uncomp-args
+  ;; can-append auto-mode-flag strip-extension-flag file-magic-bytes]
+  '(["\\.Z\\(~\\|\\.~[0-9]+~\\)?\\'"
+     "compressing"    "compress"     ("-c")
+     "uncompressing"  "uncompress"   ("-c")
+     nil t "\037\235"]
+     ;; Formerly, these had an additional arg "-c", but that fails with
+     ;; "Version 0.1pl2, 29-Aug-97." (RedHat 5.1 GNU/Linux) and
+     ;; "Version 0.9.0b, 9-Sept-98".
+    ["\\.bz2\\'"
+     "bzip2ing"        "bzip2"         nil
+     "bunzip2ing"      "bzip2"         ("-d")
+     nil t "BZh"]
+    ["\\.tbz\\'"
+     "bzip2ing"        "bzip2"         nil
+     "bunzip2ing"      "bzip2"         ("-d")
+     nil nil "BZh"]
+    ["\\.tgz\\'"
+     "compressing"        "gzip"         ("-c" "-q")
+     "uncompressing"      "gzip"         ("-c" "-q" "-d")
+     t nil "\037\213"]
+    ["\\.g?z\\(~\\|\\.~[0-9]+~\\)?\\'"
+     "compressing"        "gzip"         ("-c" "-q")
+     "uncompressing"      "gzip"         ("-c" "-q" "-d")
+     t t "\037\213"]
+    ;; dzip is gzip with random access.  Its compression program can't
+    ;; read/write stdin/out, so .dz files can only be viewed without
+    ;; saving, having their contents decompressed with gzip.
+    ["\\.dz\\'"
+     nil              nil            nil
+     "uncompressing"      "gzip"         ("-c" "-q" "-d")
+     nil t "\037\213"])
+
+  "List of vectors that describe available compression techniques.
+Each element, which describes a compression technique, is a vector of
+the form [REGEXP COMPRESS-MSG COMPRESS-PROGRAM COMPRESS-ARGS
+UNCOMPRESS-MSG UNCOMPRESS-PROGRAM UNCOMPRESS-ARGS
+APPEND-FLAG STRIP-EXTENSION-FLAG FILE-MAGIC-CHARS], where:
+
+   regexp                is a regexp that matches filenames that are
+                         compressed with this format
+
+   compress-msg          is the message to issue to the user when doing this
+                         type of compression (nil means no message)
+
+   compress-program      is a program that performs this compression
+                         (nil means visit file in read-only mode)
+
+   compress-args         is a list of args to pass to the compress program
+
+   uncompress-msg        is the message to issue to the user when doing this
+                         type of uncompression (nil means no message)
+
+   uncompress-program    is a program that performs this compression
+
+   uncompress-args       is a list of args to pass to the uncompress program
+
+   append-flag           is non-nil if this compression technique can be
+                         appended
+
+   strip-extension-flag  non-nil means strip the regexp from file names
+                         before attempting to set the mode.
+
+   file-magic-chars      is a string of characters that you would find
+			 at the beginning of a file compressed in this way.
+
+Because of the way `call-process' is defined, discarding the stderr output of
+a program adds the overhead of starting a shell each time the program is
+invoked."
+  :type '(repeat (vector regexp
+			 (choice :tag "Compress Message"
+				 (string :format "%v")
+				 (const :tag "No Message" nil))
+			 (choice :tag "Compress Program"
+				 (string)
+				 (const :tag "None" nil))
+			 (repeat :tag "Compress Arguments" string)
+			 (choice :tag "Uncompress Message"
+				 (string :format "%v")
+				 (const :tag "No Message" nil))
+			 (choice :tag "Uncompress Program"
+				 (string)
+				 (const :tag "None" nil))
+			 (repeat :tag "Uncompress Arguments" string)
+			 (boolean :tag "Append")
+			 (boolean :tag "Strip Extension")
+			 (string :tag "Magic Bytes")))
+  :group 'jka-compr)
+
+(defcustom jka-compr-mode-alist-additions
+  (list (cons "\\.tgz\\'" 'tar-mode) (cons "\\.tbz\\'" 'tar-mode))
+  "A list of pairs to add to `auto-mode-alist' when jka-compr is installed."
+  :type '(repeat (cons string symbol))
+  :group 'jka-compr)
+
+(defcustom jka-compr-load-suffixes '(".gz")
+  "List of suffixes to try when loading files."
+  :type '(repeat string)
+  :group 'jka-compr)
+
+;; List of all the elements we actually added to file-coding-system-alist.
+(defvar jka-compr-added-to-file-coding-system-alist nil)
+
+(defvar jka-compr-file-name-handler-entry
+  nil
+  "The entry in `file-name-handler-alist' used by the jka-compr I/O functions.")
+
+(defun jka-compr-build-file-regexp ()
+  (mapconcat
+   'jka-compr-info-regexp
+   jka-compr-compression-info-list
+   "\\|"))
+
+;;; Functions for accessing the return value of jka-compr-get-compression-info
+(defun jka-compr-info-regexp               (info)  (aref info 0))
+(defun jka-compr-info-compress-message     (info)  (aref info 1))
+(defun jka-compr-info-compress-program     (info)  (aref info 2))
+(defun jka-compr-info-compress-args        (info)  (aref info 3))
+(defun jka-compr-info-uncompress-message   (info)  (aref info 4))
+(defun jka-compr-info-uncompress-program   (info)  (aref info 5))
+(defun jka-compr-info-uncompress-args      (info)  (aref info 6))
+(defun jka-compr-info-can-append           (info)  (aref info 7))
+(defun jka-compr-info-strip-extension      (info)  (aref info 8))
+(defun jka-compr-info-file-magic-bytes     (info)  (aref info 9))
+
+
+(defun jka-compr-get-compression-info (filename)
+  "Return information about the compression scheme of FILENAME.
+The determination as to which compression scheme, if any, to use is
+based on the filename itself and `jka-compr-compression-info-list'."
+  (catch 'compression-info
+    (let ((case-fold-search nil))
+      (mapcar
+       (function (lambda (x)
+		   (and (string-match (jka-compr-info-regexp x) filename)
+			(throw 'compression-info x))))
+       jka-compr-compression-info-list)
+      nil)))
+
+(defun jka-compr-install ()
+  "Install jka-compr.
+This adds entries to `file-name-handler-alist' and `auto-mode-alist'
+and `inhibit-first-line-modes-suffixes'."
+
+  (setq jka-compr-file-name-handler-entry
+	(cons (jka-compr-build-file-regexp) 'jka-compr-handler))
+
+  (setq file-name-handler-alist (cons jka-compr-file-name-handler-entry
+				      file-name-handler-alist))
+
+  (setq jka-compr-added-to-file-coding-system-alist nil)
+
+  (mapcar
+   (function (lambda (x)
+	       ;; Don't do multibyte encoding on the compressed files.
+	       (let ((elt (cons (jka-compr-info-regexp x)
+				 '(no-conversion . no-conversion))))
+		 (setq file-coding-system-alist
+		       (cons elt file-coding-system-alist))
+		 (setq jka-compr-added-to-file-coding-system-alist
+		       (cons elt jka-compr-added-to-file-coding-system-alist)))
+
+	       (and (jka-compr-info-strip-extension x)
+		    ;; Make entries in auto-mode-alist so that modes
+		    ;; are chosen right according to the file names
+		    ;; sans `.gz'.
+		    (setq auto-mode-alist
+			  (cons (list (jka-compr-info-regexp x)
+				      nil 'jka-compr)
+				auto-mode-alist))
+		    ;; Also add these regexps to
+		    ;; inhibit-first-line-modes-suffixes, so that a
+		    ;; -*- line in the first file of a compressed tar
+		    ;; file doesn't override tar-mode.
+		    (setq inhibit-first-line-modes-suffixes
+			  (cons (jka-compr-info-regexp x)
+				inhibit-first-line-modes-suffixes)))))
+   jka-compr-compression-info-list)
+  (setq auto-mode-alist
+	(append auto-mode-alist jka-compr-mode-alist-additions))
+
+  ;; Make sure that (load "foo") will find /bla/foo.el.gz.
+  (setq load-suffixes
+	(apply 'append
+	       (mapcar (lambda (suffix)
+			 (cons suffix
+			       (mapcar (lambda (ext) (concat suffix ext))
+				       jka-compr-load-suffixes)))
+		       load-suffixes))))
+
+
+(defun jka-compr-installed-p ()
+  "Return non-nil if jka-compr is installed.
+The return value is the entry in `file-name-handler-alist' for jka-compr."
+
+  (let ((fnha file-name-handler-alist)
+	(installed nil))
+
+    (while (and fnha (not installed))
+     (and (eq (cdr (car fnha)) 'jka-compr-handler)
+	   (setq installed (car fnha)))
+      (setq fnha (cdr fnha)))
+
+    installed))
+
+(define-minor-mode auto-compression-mode
+  "Toggle automatic file compression and uncompression.
+With prefix argument ARG, turn auto compression on if positive, else off.
+Returns the new status of auto compression (non-nil means on)."
+  :global t :group 'jka-compr
+  (let* ((installed (jka-compr-installed-p))
+	 (flag auto-compression-mode))
+    (cond
+     ((and flag installed) t)		; already installed
+     ((and (not flag) (not installed)) nil) ; already not installed
+     (flag (jka-compr-install))
+     (t (jka-compr-uninstall)))))
+
+(defmacro with-auto-compression-mode (&rest body)
+  "Evalute BODY with automatic file compression and uncompression enabled."
+  (let ((already-installed (make-symbol "already-installed")))
+    `(let ((,already-installed (jka-compr-installed-p)))
+       (unwind-protect
+	   (progn
+	     (unless ,already-installed
+	       (jka-compr-install))
+	     ,@body)
+	 (unless ,already-installed
+	   (jka-compr-uninstall))))))
+(put 'with-auto-compression-mode 'lisp-indent-function 0)
+
+
+;;; This is what we need to know about jka-compr-handler
+;;; in order to decide when to call it.
+
+(put 'jka-compr-handler 'safe-magic t)
+(put 'jka-compr-handler 'operations '(jka-compr-byte-compiler-base-file-name
+				      write-region insert-file-contents
+				      file-local-copy load))
+
+;;; Turn on the mode.
+(auto-compression-mode 1)
+
+(provide 'jka-cmpr-hook)
+
+;; arch-tag: 4bd73429-f400-45fe-a065-270a113e31a8
+;;; jka-cmpr-hook.el ends here
--- a/lisp/jka-comp-hook.el	Thu May 12 02:47:44 2005 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,293 +0,0 @@
-;;; jka-comp-hook.el --- preloaded code to enable jka-compr.el
-
-;; Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2003, 2004, 2005  Free Software Foundation, Inc.
-
-;; Author: jka@ece.cmu.edu (Jay K. Adams)
-;; Maintainer: FSF
-;; Keywords: data
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;;; Commentary:
-
-;; This file contains the  code to enable and disable Auto-Compression mode.
-;; It is preloaded.  The guts of this mode are in jka-compr.el, which
-;; is loaded only when you really try to uncompress something.
-
-;;; Code:
-
-(defgroup compression nil
-  "Data compression utilities"
-  :group 'data)
-
-(defgroup jka-compr nil
-  "jka-compr customization"
-  :group 'compression)
-
-;;; I have this defined so that .Z files are assumed to be in unix
-;;; compress format; and .gz files, in gzip format, and .bz2 files in bzip fmt.
-(defcustom jka-compr-compression-info-list
-  ;;[regexp
-  ;; compr-message  compr-prog  compr-args
-  ;; uncomp-message uncomp-prog uncomp-args
-  ;; can-append auto-mode-flag strip-extension-flag file-magic-bytes]
-  '(["\\.Z\\(~\\|\\.~[0-9]+~\\)?\\'"
-     "compressing"    "compress"     ("-c")
-     "uncompressing"  "uncompress"   ("-c")
-     nil t "\037\235"]
-     ;; Formerly, these had an additional arg "-c", but that fails with
-     ;; "Version 0.1pl2, 29-Aug-97." (RedHat 5.1 GNU/Linux) and
-     ;; "Version 0.9.0b, 9-Sept-98".
-    ["\\.bz2\\'"
-     "bzip2ing"        "bzip2"         nil
-     "bunzip2ing"      "bzip2"         ("-d")
-     nil t "BZh"]
-    ["\\.tbz\\'"
-     "bzip2ing"        "bzip2"         nil
-     "bunzip2ing"      "bzip2"         ("-d")
-     nil nil "BZh"]
-    ["\\.tgz\\'"
-     "compressing"        "gzip"         ("-c" "-q")
-     "uncompressing"      "gzip"         ("-c" "-q" "-d")
-     t nil "\037\213"]
-    ["\\.g?z\\(~\\|\\.~[0-9]+~\\)?\\'"
-     "compressing"        "gzip"         ("-c" "-q")
-     "uncompressing"      "gzip"         ("-c" "-q" "-d")
-     t t "\037\213"]
-    ;; dzip is gzip with random access.  Its compression program can't
-    ;; read/write stdin/out, so .dz files can only be viewed without
-    ;; saving, having their contents decompressed with gzip.
-    ["\\.dz\\'"
-     nil              nil            nil
-     "uncompressing"      "gzip"         ("-c" "-q" "-d")
-     nil t "\037\213"])
-
-  "List of vectors that describe available compression techniques.
-Each element, which describes a compression technique, is a vector of
-the form [REGEXP COMPRESS-MSG COMPRESS-PROGRAM COMPRESS-ARGS
-UNCOMPRESS-MSG UNCOMPRESS-PROGRAM UNCOMPRESS-ARGS
-APPEND-FLAG STRIP-EXTENSION-FLAG FILE-MAGIC-CHARS], where:
-
-   regexp                is a regexp that matches filenames that are
-                         compressed with this format
-
-   compress-msg          is the message to issue to the user when doing this
-                         type of compression (nil means no message)
-
-   compress-program      is a program that performs this compression
-                         (nil means visit file in read-only mode)
-
-   compress-args         is a list of args to pass to the compress program
-
-   uncompress-msg        is the message to issue to the user when doing this
-                         type of uncompression (nil means no message)
-
-   uncompress-program    is a program that performs this compression
-
-   uncompress-args       is a list of args to pass to the uncompress program
-
-   append-flag           is non-nil if this compression technique can be
-                         appended
-
-   strip-extension-flag  non-nil means strip the regexp from file names
-                         before attempting to set the mode.
-
-   file-magic-chars      is a string of characters that you would find
-			 at the beginning of a file compressed in this way.
-
-Because of the way `call-process' is defined, discarding the stderr output of
-a program adds the overhead of starting a shell each time the program is
-invoked."
-  :type '(repeat (vector regexp
-			 (choice :tag "Compress Message"
-				 (string :format "%v")
-				 (const :tag "No Message" nil))
-			 (choice :tag "Compress Program"
-				 (string)
-				 (const :tag "None" nil))
-			 (repeat :tag "Compress Arguments" string)
-			 (choice :tag "Uncompress Message"
-				 (string :format "%v")
-				 (const :tag "No Message" nil))
-			 (choice :tag "Uncompress Program"
-				 (string)
-				 (const :tag "None" nil))
-			 (repeat :tag "Uncompress Arguments" string)
-			 (boolean :tag "Append")
-			 (boolean :tag "Strip Extension")
-			 (string :tag "Magic Bytes")))
-  :group 'jka-compr)
-
-(defcustom jka-compr-mode-alist-additions
-  (list (cons "\\.tgz\\'" 'tar-mode) (cons "\\.tbz\\'" 'tar-mode))
-  "A list of pairs to add to `auto-mode-alist' when jka-compr is installed."
-  :type '(repeat (cons string symbol))
-  :group 'jka-compr)
-
-(defcustom jka-compr-load-suffixes '(".gz")
-  "List of suffixes to try when loading files."
-  :type '(repeat string)
-  :group 'jka-compr)
-
-;; List of all the elements we actually added to file-coding-system-alist.
-(defvar jka-compr-added-to-file-coding-system-alist nil)
-
-(defvar jka-compr-file-name-handler-entry
-  nil
-  "The entry in `file-name-handler-alist' used by the jka-compr I/O functions.")
-
-(defun jka-compr-build-file-regexp ()
-  (mapconcat
-   'jka-compr-info-regexp
-   jka-compr-compression-info-list
-   "\\|"))
-
-;;; Functions for accessing the return value of jka-compr-get-compression-info
-(defun jka-compr-info-regexp               (info)  (aref info 0))
-(defun jka-compr-info-compress-message     (info)  (aref info 1))
-(defun jka-compr-info-compress-program     (info)  (aref info 2))
-(defun jka-compr-info-compress-args        (info)  (aref info 3))
-(defun jka-compr-info-uncompress-message   (info)  (aref info 4))
-(defun jka-compr-info-uncompress-program   (info)  (aref info 5))
-(defun jka-compr-info-uncompress-args      (info)  (aref info 6))
-(defun jka-compr-info-can-append           (info)  (aref info 7))
-(defun jka-compr-info-strip-extension      (info)  (aref info 8))
-(defun jka-compr-info-file-magic-bytes     (info)  (aref info 9))
-
-
-(defun jka-compr-get-compression-info (filename)
-  "Return information about the compression scheme of FILENAME.
-The determination as to which compression scheme, if any, to use is
-based on the filename itself and `jka-compr-compression-info-list'."
-  (catch 'compression-info
-    (let ((case-fold-search nil))
-      (mapcar
-       (function (lambda (x)
-		   (and (string-match (jka-compr-info-regexp x) filename)
-			(throw 'compression-info x))))
-       jka-compr-compression-info-list)
-      nil)))
-
-(defun jka-compr-install ()
-  "Install jka-compr.
-This adds entries to `file-name-handler-alist' and `auto-mode-alist'
-and `inhibit-first-line-modes-suffixes'."
-
-  (setq jka-compr-file-name-handler-entry
-	(cons (jka-compr-build-file-regexp) 'jka-compr-handler))
-
-  (setq file-name-handler-alist (cons jka-compr-file-name-handler-entry
-				      file-name-handler-alist))
-
-  (setq jka-compr-added-to-file-coding-system-alist nil)
-
-  (mapcar
-   (function (lambda (x)
-	       ;; Don't do multibyte encoding on the compressed files.
-	       (let ((elt (cons (jka-compr-info-regexp x)
-				 '(no-conversion . no-conversion))))
-		 (setq file-coding-system-alist
-		       (cons elt file-coding-system-alist))
-		 (setq jka-compr-added-to-file-coding-system-alist
-		       (cons elt jka-compr-added-to-file-coding-system-alist)))
-
-	       (and (jka-compr-info-strip-extension x)
-		    ;; Make entries in auto-mode-alist so that modes
-		    ;; are chosen right according to the file names
-		    ;; sans `.gz'.
-		    (setq auto-mode-alist
-			  (cons (list (jka-compr-info-regexp x)
-				      nil 'jka-compr)
-				auto-mode-alist))
-		    ;; Also add these regexps to
-		    ;; inhibit-first-line-modes-suffixes, so that a
-		    ;; -*- line in the first file of a compressed tar
-		    ;; file doesn't override tar-mode.
-		    (setq inhibit-first-line-modes-suffixes
-			  (cons (jka-compr-info-regexp x)
-				inhibit-first-line-modes-suffixes)))))
-   jka-compr-compression-info-list)
-  (setq auto-mode-alist
-	(append auto-mode-alist jka-compr-mode-alist-additions))
-
-  ;; Make sure that (load "foo") will find /bla/foo.el.gz.
-  (setq load-suffixes
-	(apply 'append
-	       (mapcar (lambda (suffix)
-			 (cons suffix
-			       (mapcar (lambda (ext) (concat suffix ext))
-				       jka-compr-load-suffixes)))
-		       load-suffixes))))
-
-
-(defun jka-compr-installed-p ()
-  "Return non-nil if jka-compr is installed.
-The return value is the entry in `file-name-handler-alist' for jka-compr."
-
-  (let ((fnha file-name-handler-alist)
-	(installed nil))
-
-    (while (and fnha (not installed))
-     (and (eq (cdr (car fnha)) 'jka-compr-handler)
-	   (setq installed (car fnha)))
-      (setq fnha (cdr fnha)))
-
-    installed))
-
-(define-minor-mode auto-compression-mode
-  "Toggle automatic file compression and uncompression.
-With prefix argument ARG, turn auto compression on if positive, else off.
-Returns the new status of auto compression (non-nil means on)."
-  :global t :group 'jka-compr
-  (let* ((installed (jka-compr-installed-p))
-	 (flag auto-compression-mode))
-    (cond
-     ((and flag installed) t)		; already installed
-     ((and (not flag) (not installed)) nil) ; already not installed
-     (flag (jka-compr-install))
-     (t (jka-compr-uninstall)))))
-
-(defmacro with-auto-compression-mode (&rest body)
-  "Evalute BODY with automatic file compression and uncompression enabled."
-  (let ((already-installed (make-symbol "already-installed")))
-    `(let ((,already-installed (jka-compr-installed-p)))
-       (unwind-protect
-	   (progn
-	     (unless ,already-installed
-	       (jka-compr-install))
-	     ,@body)
-	 (unless ,already-installed
-	   (jka-compr-uninstall))))))
-(put 'with-auto-compression-mode 'lisp-indent-function 0)
-
-
-;;; This is what we need to know about jka-compr-handler
-;;; in order to decide when to call it.
-
-(put 'jka-compr-handler 'safe-magic t)
-(put 'jka-compr-handler 'operations '(jka-compr-byte-compiler-base-file-name
-				      write-region insert-file-contents
-				      file-local-copy load))
-
-;;; Turn on the mode.
-(auto-compression-mode 1)
-
-(provide 'jka-comp-hook)
-
-;; arch-tag: 4bd73429-f400-45fe-a065-270a113e31a8
-;;; jka-comp-hook.el ends here
\ No newline at end of file
--- a/lisp/jka-compr.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/jka-compr.el	Thu May 12 03:41:19 2005 +0000
@@ -669,7 +669,7 @@
 	(inhibit-file-name-operation operation))
     (apply operation args)))
 
-
+;;;###autoload
 (defun jka-compr-uninstall ()
   "Uninstall jka-compr.
 This removes the entries in `file-name-handler-alist' and `auto-mode-alist'
--- a/lisp/loadup.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/loadup.el	Thu May 12 03:41:19 2005 +0000
@@ -183,7 +183,7 @@
 (message "%s" (garbage-collect))
 
 (load "vc-hooks")
-(load "jka-comp-hook")
+(load "jka-cmpr-hook")
 (load "ediff-hook")
 (if (fboundp 'x-show-tip) (load "tooltip"))
 (message "%s" (garbage-collect))
--- a/lisp/mouse-sel.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/mouse-sel.el	Thu May 12 03:41:19 2005 +0000
@@ -465,10 +465,12 @@
 
 This should be bound to a down-mouse event."
   (interactive "@e")
-  (let (direction)
+  (let (select)
     (unwind-protect
-	(setq direction (mouse-select-internal 'PRIMARY event))
-      (mouse-sel-primary-to-region direction))))
+    	(setq select (mouse-select-internal 'PRIMARY event))
+      (if (and select (listp select))
+	  (push (cons 'mouse-2 (cdr event)) unread-command-events)
+	(mouse-sel-primary-to-region select)))))
 
 (defun mouse-select-secondary (event)
   "Set secondary selection using the mouse.
@@ -487,7 +489,14 @@
   (mouse-select-internal 'SECONDARY event))
 
 (defun mouse-select-internal (selection event)
-  "Set SELECTION using the mouse."
+  "Set SELECTION using the mouse, with EVENT as the initial down-event.
+Normally, this returns the direction in which the selection was
+made: a value of 1 indicates that the mouse was dragged
+left-to-right, otherwise it was dragged right-to-left.
+
+However, if `mouse-1-click-follows-link' is non-nil and the
+subsequent mouse events specify following a link, this returns
+the final mouse-event.  In that case, the selection is not set."
   (mouse-sel-eval-at-event-end event
     (let ((thing-symbol (mouse-sel-selection-thing selection))
 	  (overlay (mouse-sel-selection-overlay selection)))
@@ -501,7 +510,8 @@
 			    (car object-bounds) (cdr object-bounds)
 			    (current-buffer)))
 	  (move-overlay overlay (point) (point) (current-buffer)))))
-    (mouse-extend-internal selection)))
+    (catch 'follow-link
+      (mouse-extend-internal selection event t))))
 
 ;;=== Extend ==============================================================
 
@@ -523,11 +533,12 @@
   (save-window-excursion
     (mouse-extend-internal 'SECONDARY event)))
 
-(defun mouse-extend-internal (selection &optional initial-event)
+(defun mouse-extend-internal (selection &optional initial-event no-process)
   "Extend specified SELECTION using the mouse.
 Track mouse-motion events, adjusting the SELECTION appropriately.
-Optional argument INITIAL-EVENT specifies an initial down-mouse event to
-process.
+Optional argument INITIAL-EVENT specifies an initial down-mouse event.
+Optional argument NO-PROCESS means not to process the initial
+event.
 
 See documentation for mouse-select-internal for more details."
   (mouse-sel-eval-at-event-end initial-event
@@ -564,7 +575,8 @@
 	    ;; Handle dragging
 	    (track-mouse
 
-	      (while (if initial-event	; Use initial event
+	      (while (if (and initial-event (not no-process))
+			 ;; Use initial event
 			 (prog1
 			     (setq event initial-event)
 			   (setq initial-event nil))
@@ -643,6 +655,10 @@
 
 		  )))			; end track-mouse
 
+	    ;; Detect follow-link events
+	    (when (mouse-sel-follow-link-p initial-event event)
+	      (throw 'follow-link event))
+
 	    ;; Finish up after dragging
 	    (let ((overlay-start (overlay-start overlay))
 		  (overlay-end (overlay-end overlay)))
@@ -679,6 +695,25 @@
 
 	))))
 
+(defun mouse-sel-follow-link-p (initial final)
+  "Return t if we should follow a link, given INITIAL and FINAL mouse events.
+See `mouse-1-click-follows-link' for details.  Currently, Mouse
+Sel mode does not support using a `double' value to follow links
+using double-clicks."
+  (and initial final mouse-1-click-follows-link
+       (eq (car initial) 'down-mouse-1)
+       (mouse-on-link-p	(posn-point (event-start initial)))
+       (= (posn-point (event-start initial))
+	  (posn-point (event-end final)))
+       (= (event-click-count initial) 1)
+       (or (not (integerp mouse-1-click-follows-link))
+	   (let ((t0 (posn-timestamp (event-start initial)))
+		 (t1 (posn-timestamp (event-end final))))
+	     (and (integerp t0) (integerp t1)
+		  (if (> mouse-1-click-follows-link 0)
+		      (<= (- t1 t0) mouse-1-click-follows-link)
+		    (< (- t0 t1) mouse-1-click-follows-link)))))))
+
 ;;=== Paste ===============================================================
 
 (defun mouse-insert-selection (event arg)
--- a/lisp/net/goto-addr.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/net/goto-addr.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; goto-addr.el --- click to browse URL or to send to e-mail address
 
-;; Copyright (C) 1995, 2000, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 2000, 2001, 2005  Free Software Foundation, Inc.
 
 ;; Author: Eric Ding <ericding@alum.mit.edu>
 ;; Maintainer: FSF
@@ -46,7 +46,7 @@
 ;;
 ;; (setq goto-address-highlight-keymap
 ;;   (let ((m (make-sparse-keymap)))
-;;     (define-key m [S-mouse-2] 'goto-address-at-mouse)
+;;     (define-key m [S-mouse-2] 'goto-address-at-point)
 ;;     m))
 ;;
 
@@ -118,9 +118,8 @@
 
 (defvar goto-address-highlight-keymap
   (let ((m (make-sparse-keymap)))
-    (if (featurep 'xemacs)
-	(define-key m (kbd "<button2>") 'goto-address-at-mouse)
-      (define-key m (kbd "<mouse-2>") 'goto-address-at-mouse))
+    (define-key m (if (featurep 'xemacs) (kbd "<button2>") (kbd "<mouse-2>"))
+      'goto-address-at-point)
     (define-key m (kbd "C-c RET") 'goto-address-at-point)
     m)
   "keymap to hold goto-addr's mouse key defs under highlighted URLs.")
@@ -165,6 +164,7 @@
                      (this-overlay (make-overlay s e)))
 		(and goto-address-fontify-p
                      (overlay-put this-overlay 'face goto-address-url-face))
+                (overlay-put this-overlay 'evaporate t)
 		(overlay-put this-overlay
                              'mouse-face goto-address-url-mouse-face)
 		(overlay-put this-overlay
@@ -179,6 +179,7 @@
                      (this-overlay (make-overlay s e)))
 		(and goto-address-fontify-p
                      (overlay-put this-overlay 'face goto-address-mail-face))
+                (overlay-put this-overlay 'evaporate t)
                 (overlay-put this-overlay 'mouse-face
                              goto-address-mail-mouse-face)
 		(overlay-put this-overlay
@@ -191,24 +192,18 @@
 ;; snarfed from browse-url.el
 
 ;;;###autoload
-(defun goto-address-at-mouse (event)
-  "Send to the e-mail address or load the URL clicked with the mouse.
-Send mail to address at position of mouse click.  See documentation for
-`goto-address-find-address-at-point'.  If no address is found
-there, then load the URL at or before the position of the mouse click."
-  (interactive "e")
-  (save-excursion
-    (mouse-set-point event)
-    (goto-address-at-point)))
+(define-obsolete-function-alias
+  'goto-address-at-mouse 'goto-address-at-point "22.1")
 
 ;;;###autoload
-(defun goto-address-at-point ()
+(defun goto-address-at-point (&optional event)
   "Send to the e-mail address or load the URL at point.
 Send mail to address at point.  See documentation for
 `goto-address-find-address-at-point'.  If no address is found
 there, then load the URL at or before point."
-  (interactive)
+  (interactive (list last-input-event))
   (save-excursion
+    (if event (mouse-set-point event))
     (let ((address (save-excursion (goto-address-find-address-at-point))))
       (if (and address
 	       (save-excursion
@@ -248,5 +243,5 @@
 
 (provide 'goto-addr)
 
-;;; arch-tag: ca47c505-5661-425d-a471-62bc6e75cf0a
+;; arch-tag: ca47c505-5661-425d-a471-62bc6e75cf0a
 ;;; goto-addr.el ends here
--- a/lisp/net/webjump.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/net/webjump.el	Thu May 12 03:41:19 2005 +0000
@@ -274,9 +274,9 @@
 <nwv@acm.org>."
   (interactive)
   (let* ((completion-ignore-case t)
-	 (item (assoc-ignore-case
+	 (item (assoc-string
 		(completing-read "WebJump to site: " webjump-sites nil t)
-		webjump-sites))
+		webjump-sites t))
 	 (name (car item))
 	 (expr (cdr item)))
     (browse-url (webjump-url-fix
--- a/lisp/obsolete/float.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/obsolete/float.el	Thu May 12 03:41:19 2005 +0000
@@ -423,7 +423,7 @@
 	     (setq power (+ power (- decimal-digits (length digit-string)))))
 
 	   ; round up and add minus sign, if necessary
-	   (f (* (+ (string-to-int digit-string)
+	   (f (* (+ (string-to-number digit-string)
 		    (if round-up 1 0))
 		 (if mant-sign -1 1))))
 
@@ -433,7 +433,7 @@
 		(expt 0) (chunks 0) (tens 0) (exponent _f1)
 		(func 'f*))
 
-	   (setq expt (+ (* (string-to-int
+	   (setq expt (+ (* (string-to-number
 			     (substring expt-subst 0
 					(min expt-digits (length expt-subst))))
 			    (if expt-sign -1 1))
--- a/lisp/obsolete/hilit19.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/obsolete/hilit19.el	Thu May 12 03:41:19 2005 +0000
@@ -1050,7 +1050,7 @@
 
   (and (equal pstart "") (error "Must specify starting regex"))
   (cond ((equal pend "") (setq pend 0))
-	((string-match "^[0-9]+$" pend) (setq pend (string-to-int pend))))
+	((string-match "^[0-9]+$" pend) (setq pend (string-to-number pend))))
   (or mode (setq mode major-mode))
   (let ((old-patterns (cdr (assq mode hilit-patterns-alist)))
 	(new-pat (list pstart pend face)))
--- a/lisp/obsolete/rnews.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/obsolete/rnews.el	Thu May 12 03:41:19 2005 +0000
@@ -397,9 +397,9 @@
 to a list (a . b)"
   (let ((n (string-match "-" number-string)))
     (if n
-	(cons (string-to-int (substring number-string 0 n))
-	      (string-to-int (substring number-string (1+ n))))
-      (setq n (string-to-int number-string))
+	(cons (string-to-number (substring number-string 0 n))
+	      (string-to-number (substring number-string (1+ n))))
+      (setq n (string-to-number number-string))
       (cons n n))))
 
 ;(defun is-in (elt lis)
@@ -524,7 +524,7 @@
   (news-select-message arg))
 
 (defun news-select-message (arg)
-  (if (stringp arg) (setq arg (string-to-int arg)))
+  (if (stringp arg) (setq arg (string-to-number arg)))
   (let ((file (concat news-path
 		      (string-subst-char ?/ ?. news-current-news-group)
 		      "/" arg)))
@@ -803,7 +803,7 @@
 			 ;; don't get confused by directories that look like numbers
 			 (file-directory-p
 			  (concat file-directory "/" (car tem)))
-			 (<= (string-to-int (car tem)) end-file-no))
+			 (<= (string-to-number (car tem)) end-file-no))
 		     (setq news-list-of-files
 			   (delq (car tem) news-list-of-files)))
 		 (setq tem (cdr tem)))
@@ -811,7 +811,7 @@
 		   (progn (setq news-current-group-end 0)
 			  nil)
 		 (setq news-list-of-files
-		       (mapcar 'string-to-int news-list-of-files))
+		       (mapcar 'string-to-number news-list-of-files))
 		 (setq news-list-of-files (sort news-list-of-files '<))
 		 (setq news-current-group-end
 		       (elt news-list-of-files
--- a/lisp/obsolete/uncompress.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/obsolete/uncompress.el	Thu May 12 03:41:19 2005 +0000
@@ -83,14 +83,10 @@
   (goto-char (point-min))
   (message "Uncompressing...done")
   (set-buffer-modified-p nil)
-  (make-local-variable 'write-file-hooks)
-  (or (memq 'uncompress-backup-file write-file-hooks)
-      (setq write-file-hooks (cons 'uncompress-backup-file write-file-hooks)))
+  (add-hook 'write-file-functions 'uncompress-backup-file nil t)
   (normal-mode))
 
-(or (memq 'find-compressed-version find-file-not-found-hooks)
-    (setq find-file-not-found-hooks
-	  (cons 'find-compressed-version find-file-not-found-hooks)))
+(add-hook 'find-file-not-found-functions 'find-compressed-version)
 
 (defun find-compressed-version ()
   "Hook to read and uncompress the compressed version of a file."
--- a/lisp/pcvs.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/pcvs.el	Thu May 12 03:41:19 2005 +0000
@@ -1438,12 +1438,10 @@
   ;; displayed in the wrong minibuffer).
   (cvs-mode!)
   (let ((buf (cvs-temp-buffer "message" 'normal 'nosetup))
-	(lbd list-buffers-directory)
 	(setupfun (or (nth 2 (cdr (assoc "message" cvs-buffer-name-alist)))
 		      'log-edit)))
     (funcall setupfun 'cvs-do-commit setup 'cvs-commit-filelist buf)
     (set (make-local-variable 'cvs-minor-wrap-function) 'cvs-commit-minor-wrap)
-    (set (make-local-variable 'list-buffers-directory) lbd)
     (run-hooks 'cvs-mode-commit-hook)))
 
 (defun cvs-commit-minor-wrap (buf f)
@@ -1494,14 +1492,12 @@
   ;; displayed in the wrong minibuffer).
   (cvs-mode!)
   (let ((buf (cvs-temp-buffer "message" 'normal 'nosetup))
-	(lbd list-buffers-directory)
 	(setupfun (or (nth 2 (cdr (assoc "message" cvs-buffer-name-alist)))
 		      'log-edit)))
     (funcall setupfun 'cvs-do-edit-log nil 'cvs-edit-log-filelist buf)
     (when text (erase-buffer) (insert text))
     (set (make-local-variable 'cvs-edit-log-revision) rev)
     (set (make-local-variable 'cvs-minor-wrap-function) 'cvs-edit-log-minor-wrap)
-    (set (make-local-variable 'list-buffers-directory) lbd)
     ;; (run-hooks 'cvs-mode-commit-hook)
     ))
 
--- a/lisp/play/5x5.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/play/5x5.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; 5x5.el --- simple little puzzle game
 
-;; Copyright (C) 1999,2000 Free Software Foundation, Inc.
+;; Copyright (C) 1999,2000,2005 Free Software Foundation, Inc.
 
 ;; Author: Dave Pearson <davep@davep.org>
 ;; Maintainer: Dave Pearson <davep@davep.org>
--- a/lisp/play/animate.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/play/animate.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; animate.el --- make text dance
 
-;; Copyright (C) 2001 Free Software Foundation, Inc.
+;; Copyright (C) 2001,2005 Free Software Foundation, Inc.
 
 ;; Maintainer: Richard Stallman <rms@gnu.org>
 ;; Keywords: games
--- a/lisp/play/blackbox.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/play/blackbox.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; blackbox.el --- blackbox game in Emacs Lisp
 
-;; Copyright (C) 1985, 1986, 1987, 1992, 2001, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1986, 1987, 1992, 2001, 2005 Free Software Foundation, Inc.
 
 ;; Author: F. Thomas May <uw-nsr!uw-warp!tom@beaver.cs.washington.edu>
 ;; Adapted-By: ESR
--- a/lisp/play/decipher.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/play/decipher.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; decipher.el --- cryptanalyze monoalphabetic substitution ciphers
 ;;
-;; Copyright (C) 1995, 1996, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1996, 2003, 2005 Free Software Foundation, Inc.
 ;;
 ;; Author: Christopher J. Madsen <chris_madsen@geocities.com>
 ;; Keywords: games
--- a/lisp/play/doctor.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/play/doctor.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; doctor.el --- psychological help for frustrated users
 
-;; Copyright (C) 1985, 1987, 1994, 1996, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1994, 1996, 2000, 2005 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: games
--- a/lisp/play/fortune.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/play/fortune.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; fortune.el --- use fortune to create signatures
 
-;; Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2001, 2005 Free Software Foundation, Inc.
 
 ;; Author: Holger Schauer <Holger.Schauer@gmx.de>
 ;; Keywords: games utils mail
--- a/lisp/play/gamegrid.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/play/gamegrid.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; gamegrid.el --- library for implementing grid-based games on Emacs
 
-;; Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
 
 ;; Author: Glynn Clements <glynn@sensei.co.uk>
 ;; Version: 1.02
--- a/lisp/play/gametree.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/play/gametree.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; gametree.el --- manage game analysis trees in Emacs
 
-;;  Copyright (C) 1997 Free Software Foundation, Inc
+;;  Copyright (C) 1997, 1999 Free Software Foundation, Inc
 
 ;; Author: Ian T Zimmerman <itz@rahul.net>
 ;; Created: Wed Dec 10 07:41:46 PST 1997
--- a/lisp/play/handwrite.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/play/handwrite.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; handwrite.el --- turns your emacs buffer into a handwritten document -*- coding: iso-latin-1; -*-
 
-;; (C) Copyright 1996 Free Software Foundation, Inc.
+;; (C) Copyright 1996, 2005 Free Software Foundation, Inc.
 
 ;; Author: Danny Roozendaal (was: <danny@tvs.kun.nl>)
 ;; Created: October 21 1996
--- a/lisp/play/landmark.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/play/landmark.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; landmark.el --- neural-network robot that learns landmarks
 
-;; Copyright (c) 1996, 1997, 2000, 2003 Free Software Foundation, Inc.
+;; Copyright (c) 1996, 1997, 2000, 2003, 2005 Free Software Foundation, Inc.
 
 ;; Author: Terrence Brannon (was: <brannon@rana.usc.edu>)
 ;; Created: December 16, 1996 - first release to usenet
--- a/lisp/play/life.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/play/life.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; life.el --- John Horton Conway's `Life' game for GNU Emacs
 
-;; Copyright (C) 1988, 2001, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 2001, 2005 Free Software Foundation, Inc.
 
 ;; Author: Kyle Jones <kyleuunet.uu.net>
 ;; Maintainer: FSF
--- a/lisp/play/morse.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/play/morse.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; morse.el --- convert text to morse code and back             -*- coding: utf-8 -*-
 
-;; Copyright (C) 1995, 2002, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 2002, 2005 Free Software Foundation, Inc.
 
 ;; Author: Rick Farnbach <rick_farnbach@MENTORG.COM>
 ;; Keywords: games
--- a/lisp/play/mpuz.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/play/mpuz.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; mpuz.el --- multiplication puzzle for GNU Emacs
 
-;; Copyright (C) 1990, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 2002, 2005 Free Software Foundation, Inc.
 
 ;; Author: Philippe Schnoebelen <phs@lsv.ens-cachan.fr>
 ;; Overhauled: Daniel Pfeiffer <occitan@esperanto.org>
--- a/lisp/play/pong.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/play/pong.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; pong.el --- classical implementation of pong
 
-;; Copyright 1999, 2000, 2001 by Free Software Foundation, Inc.
+;; Copyright 1999, 2000, 2001, 2005 by Free Software Foundation, Inc.
 
 ;; Author: Benjamin Drieu <bdrieu@april.org>
 ;; Keywords: games
--- a/lisp/play/snake.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/play/snake.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; snake.el --- implementation of Snake for Emacs
 
-;; Copyright (C) 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2002 Free Software Foundation, Inc.
 
 ;; Author: Glynn Clements <glynn@sensei.co.uk>
 ;; Created: 1997-09-10
--- a/lisp/play/tetris.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/play/tetris.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; tetris.el --- implementation of Tetris for Emacs
 
-;; Copyright (C) 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2002 Free Software Foundation, Inc.
 
 ;; Author: Glynn Clements <glynn@sensei.co.uk>
 ;; Version: 2.01
--- a/lisp/play/zone.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/play/zone.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; zone.el --- idle display hacks
 
-;; Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2001, 2005 Free Software Foundation, Inc.
 
 ;; Author: Victor Zandy <zandy@cs.wisc.edu>
 ;; Maintainer: Thien-Thi Nguyen <ttn@gnu.org>
--- a/lisp/progmodes/ada-mode.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/progmodes/ada-mode.el	Thu May 12 03:41:19 2005 +0000
@@ -1364,6 +1364,11 @@
         (add-hook 'local-write-file-hooks
                   (lambda () (untabify (point-min) (point-max))))))
 
+  (set (make-local-variable 'skeleton-further-elements)
+       '((< '(backward-delete-char-untabify
+	      (min ada-indent (current-column))))))
+  (add-hook 'skeleton-end-hook  'ada-adjust-case-skeleton nil t)
+
   (run-hooks 'ada-mode-hook)
 
   ;;  To be run after the hook, in case the user modified
@@ -1393,6 +1398,13 @@
   (if ada-auto-case
       (ada-activate-keys-for-case)))
 
+(defun ada-adjust-case-skeleton ()
+  "Adjust the case of the text inserted by a skeleton."
+  (save-excursion
+    (let ((aa-end (point)))
+      (ada-adjust-case-region
+       (progn (goto-char (symbol-value 'beg)) (forward-word -1) (point))
+       (goto-char aa-end)))))
 
 ;;  transient-mark-mode and mark-active are not defined in XEmacs
 (defun ada-region-selected ()
--- a/lisp/progmodes/ada-stmt.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/progmodes/ada-stmt.el	Thu May 12 03:41:19 2005 +0000
@@ -466,22 +466,6 @@
   > "terminate;")
 
 
-(defun ada-adjust-case-skeleton ()
-  "Adjust the case of the text inserted by a skeleton."
-  (save-excursion
-    (let ((aa-end (point)))
-      (ada-adjust-case-region
-       (progn (goto-char (symbol-value 'beg)) (forward-word -1) (point))
-       (goto-char aa-end)))))
-
-(defun ada-stmt-mode-hook ()
-  (set (make-local-variable 'skeleton-further-elements)
-       '((< '(backward-delete-char-untabify
-	      (min ada-indent (current-column))))))
-  (add-hook 'skeleton-end-hook  'ada-adjust-case-skeleton nil t))
-
-(add-hook 'ada-mode-hook 'ada-stmt-mode-hook)
-
 (provide 'ada-stmt)
 
 ;;; arch-tag: 94f51555-cc0e-44e5-8865-8788aae8ecd3
--- a/lisp/progmodes/cc-fonts.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/progmodes/cc-fonts.el	Thu May 12 03:41:19 2005 +0000
@@ -495,6 +495,12 @@
 			 "[" (c-lang-const c-symbol-chars) "]+"
 			 "\\)")
 		 `(,(1+ ncle-depth) c-preprocessor-face-name t)))
+
+	      ;; fontify the n in ifndef
+	      (,(concat noncontinued-line-end
+			(c-lang-const c-opt-cpp-prefix)
+			"if\\(n\\)def\\>")
+	       ,(+ ncle-depth 1) font-lock-negation-char-face prepend)
 	      )))
 
       ,@(when (c-major-mode-is 'pike-mode)
@@ -666,6 +672,8 @@
 		      (narrow-to-region (point-min) limit)
 		      (c-font-lock-objc-iip-decl)))
 		  nil))))))
+
+      ("!" . font-lock-negation-char-face)
       ))
 
 (defun c-font-lock-complex-decl-prepare (limit)
--- a/lisp/progmodes/cmacexp.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/progmodes/cmacexp.el	Thu May 12 03:41:19 2005 +0000
@@ -108,18 +108,23 @@
   :group 'c-macro)
 
 (defcustom c-macro-preprocessor
-  ;; Cannot rely on standard directory on MS-DOS to find CPP.  In
-  ;; fact, cannot rely on having cpp.exe, either, in latest GCC
-  ;; versions.
-  (cond ((eq system-type 'ms-dos) "gcc -E -C -o - -")
-	;; Solaris has it in an unusual place.
+  (cond ;; Solaris has it in an unusual place.
 	((and (string-match "^[^-]*-[^-]*-\\(solaris\\|sunos5\\)"
 			    system-configuration)
 	      (file-exists-p "/opt/SUNWspro/SC3.0.1/bin/acomp"))
 	 "/opt/SUNWspro/SC3.0.1/bin/acomp -C -E")
-        ((file-exists-p "/usr/ccs/lib/cpp") "/usr/ccs/lib/cpp -C")
-	((memq system-type '(darwin berkeley-unix)) "gcc -E -C -")
-	(t "/lib/cpp -C"))
+        ((locate-file "/usr/ccs/lib/cpp"
+		      '("/") exec-suffixes 'file-executable-p)
+	 "/usr/ccs/lib/cpp -C")
+	((locate-file "/lib/cpp"
+		      '("/") exec-suffixes 'file-executable-p)
+	 "/lib/cpp -C")
+	;; On some systems, we cannot rely on standard directories to
+	;; find CPP.  In fact, we cannot rely on having cpp, either,
+	;; in some GCC versions.
+	((locate-file "cpp" exec-path exec-suffixes 'file-executable-p)
+	 "cpp -C")
+	(t "gcc -E -C -o - -"))
   "The preprocessor used by the cmacexp package.
 
 If you change this, be sure to preserve the `-C' (don't strip comments)
--- a/lisp/progmodes/compile.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/progmodes/compile.el	Thu May 12 03:41:19 2005 +0000
@@ -1247,7 +1247,8 @@
   (make-local-variable 'compilation-messages-start)
   (make-local-variable 'compilation-error-screen-columns)
   (make-local-variable 'overlay-arrow-position)
-  (set (make-local-variable 'overlay-arrow-string) "=>")
+  (set (make-local-variable 'overlay-arrow-string)
+       (if (display-graphic-p) "=>" ""))
   (setq next-error-overlay-arrow-position nil)
   (add-hook 'kill-buffer-hook
 	    (lambda () (setq next-error-overlay-arrow-position nil)) nil t)
--- a/lisp/progmodes/cperl-mode.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/progmodes/cperl-mode.el	Thu May 12 03:41:19 2005 +0000
@@ -4751,7 +4751,10 @@
 		  (t '("^[ \t{}]*\\(my\\|local\\our\\)[ \t]*\\(([ \t]*\\)?\\([$@%*][a-zA-Z0-9_:]+\\)"
 		       3 font-lock-variable-name-face)))
 	    '("\\<for\\(each\\)?\\([ \t]+\\(my\\|local\\|our\\)\\)?[ \t]*\\(\\$[a-zA-Z_][a-zA-Z_0-9]*\\)[ \t]*("
-	      4 font-lock-variable-name-face)))
+	      4 font-lock-variable-name-face)
+	    ;; Avoid $!, and s!!, qq!! etc. when not fontifying syntaxically
+	    '("\\(?:^\\|[^smywqrx$]\\)\\(!\\)" 1 font-lock-negation-char-face)
+	    '("\\[\\(\\^\\)" 1 font-lock-negation-char-face prepend)))
 	  (setq
 	   t-font-lock-keywords-1
 	   (and (fboundp 'turn-on-font-lock) ; Check for newer font-lock
--- a/lisp/progmodes/ebrowse.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/progmodes/ebrowse.el	Thu May 12 03:41:19 2005 +0000
@@ -3937,7 +3937,7 @@
 
 
 (defvar ebrowse-electric-position-mode-hook nil
-  "If non-nil, its value is called by ebrowse-electric-position-mode.")
+  "If non-nil, its value is called by `ebrowse-electric-position-mode'.")
 
 
 (unless ebrowse-electric-position-mode-map
@@ -4185,7 +4185,7 @@
 
 (defun ebrowse-print-statistics-line (title value)
   "Print a line in the statistics buffer.
-TITLE is the title of the line, VALUE is number to be printed
+TITLE is the title of the line, VALUE is a number to be printed
 after that."
   (insert title)
   (indent-to 40)
@@ -4319,7 +4319,7 @@
 
 
 (defun ebrowse-install-1-to-9-keys ()
-  "Define keys 1..9 to select the 1st to 0nth entry in the list."
+  "Define keys 1..9 to select the 1st to 9nth entry in the list."
   (dotimes (i 9)
     (define-key (current-local-map) (char-to-string (+ i ?1))
       'ebrowse-select-1st-to-9nth)))
--- a/lisp/progmodes/executable.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/progmodes/executable.el	Thu May 12 03:41:19 2005 +0000
@@ -161,30 +161,6 @@
         (if (search-forward file nil t)
             t))))
 
-;;;###autoload
-(defun executable-find (command)
-  "Search for COMMAND in `exec-path' and return the absolute file name.
-Return nil if COMMAND is not found anywhere in `exec-path'."
-  (let ((list exec-path)
-	file)
-    (while list
-      (setq list
-	    (if (and (setq file (expand-file-name command (car list)))
-		     (let ((suffixes exec-suffixes)
-			   candidate)
-		       (while suffixes
-			 (setq candidate (concat file (car suffixes)))
-			 (if (and (file-executable-p candidate)
-				  (not (file-directory-p candidate)))
-			     (setq suffixes nil)
-			   (setq suffixes (cdr suffixes))
-			   (setq candidate nil)))
-		       (setq file candidate)))
-		nil
-	      (setq file nil)
-	      (cdr list))))
-    file))
-
 (defun executable-chmod ()
   "This gets called after saving a file to assure that it be executable.
 You can set the absolute or relative mode in variable `executable-chmod' for
@@ -301,5 +277,5 @@
 
 (provide 'executable)
 
-;;; arch-tag: 58458d1c-d9db-45ec-942b-8bbb1d5e319d
+;; arch-tag: 58458d1c-d9db-45ec-942b-8bbb1d5e319d
 ;;; executable.el ends here
--- a/lisp/progmodes/gdb-ui.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/progmodes/gdb-ui.el	Thu May 12 03:41:19 2005 +0000
@@ -84,6 +84,8 @@
 (defvar gdb-find-file-unhook nil)
 (defvar gdb-active-process nil "GUD tooltips display variable values when t, \
 and #define directives otherwise.")
+(defvar gdb-macro-info nil
+  "Non-nil if GDB knows that the inferior includes preprocessor macro info.")
 
 (defvar gdb-buffer-type nil
   "One of the symbols bound in `gdb-buffer-rules'.")
@@ -196,19 +198,20 @@
   :group 'gud
   :version "22.1")
 
-(defcustom gdb-cpp-define-alist-program 
-  (cond ((eq system-type 'ms-dos) "gcc -E -dM -o - -")
-	(t "gcc -E -dM -"))
-  "The program name for generating an alist of #define directives.
+(defcustom gdb-cpp-define-alist-program "gcc -E -dM -"
+  "Shell command for generating a list of defined macros in a source file.
 This list is used to display the #define directive associated
 with an identifier as a tooltip. It works in a debug session with
-GDB, when tooltip-gud-tips-p is t."
+GDB, when gud-tooltip-mode is t.
+
+Set `gdb-cpp-define-alist-flags' for any include paths or
+predefined macros."
   :type 'string
   :group 'gud
   :version "22.1")
 
 (defcustom gdb-cpp-define-alist-flags ""
-  "*Preprocessor flags used by `gdb-create-define-alist'."
+  "*Preprocessor flags for `gdb-cpp-define-alist-program'."
   :type 'string
   :group 'gud
   :version "22.1")
@@ -233,6 +236,26 @@
       (setq name (nth 1 (split-string define "[( ]")))
       (push (cons name define) gdb-define-alist))))
 
+(defun gdb-tooltip-print ()
+  (tooltip-show
+   (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
+     (let ((string (buffer-string)))
+       ;; remove newline for gud-tooltip-echo-area
+       (substring string 0 (- (length string) 1))))
+   gud-tooltip-echo-area))
+
+;; If expr is a macro for a function don't print because of possible dangerous
+;; side-effects. Also printing a function within a tooltip generates an
+;; unexpected starting annotation (phase error).
+(defun gdb-tooltip-print-1 (expr)
+  (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
+    (goto-char (point-min))
+    (if (search-forward "expands to: " nil t)
+	(unless (looking-at "\\S+.*(.*).*")
+	  (gdb-enqueue-input
+	   (list  (concat gdb-server-prefix "print " expr "\n")
+		  'gdb-tooltip-print))))))
+
 (defun gdb-set-gud-minor-mode (buffer)
   "Set gud-minor-mode from find-file if appropriate."
   (goto-char (point-min))
@@ -252,9 +275,10 @@
     (with-current-buffer buffer
       (set (make-local-variable 'gud-minor-mode) 'gdba)
       (set (make-local-variable 'tool-bar-map) gud-tool-bar-map)
-      (make-local-variable 'gdb-define-alist)
-      (gdb-create-define-alist)
-      (add-hook 'after-save-hook 'gdb-create-define-alist nil t))))
+      (when gud-tooltip-mode
+	(make-local-variable 'gdb-define-alist)
+	(gdb-create-define-alist)
+	(add-hook 'after-save-hook 'gdb-create-define-alist nil t)))))
 
 (defun gdb-set-gud-minor-mode-existing-buffers ()
   (dolist (buffer (buffer-list))
@@ -326,6 +350,7 @@
   (setq gdb-flush-pending-output nil)
   (setq gdb-location-alist nil)
   (setq gdb-find-file-unhook nil)
+  (setq gdb-macro-info nil)
   ;;
   (setq gdb-buffer-type 'gdba)
   ;;
@@ -1283,27 +1308,27 @@
 			   help-echo "mouse-2, RET: visit breakpoint"))
 			(unless (file-exists-p file)
 			   (setq file (cdr (assoc bptno gdb-location-alist))))
-			(unless (string-equal file "File not found")
-			  (if file
-			      (with-current-buffer (find-file-noselect file)
-				(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 "list "
-				      (match-string-no-properties 1) ":1\n")
-				   'ignore))
-			    (gdb-enqueue-input
-			     (list "info source\n"
-				   `(lambda () (gdb-get-location
-						,bptno ,line ,flag)))))))))))
+			(if (and file
+				 (not (string-equal file "File not found")))
+			    (with-current-buffer (find-file-noselect file)
+			      (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 "list "
+				    (match-string-no-properties 1) ":1\n")
+			    'ignore))
+			  (gdb-enqueue-input
+			   (list "info source\n"
+				 `(lambda () (gdb-get-location
+					      ,bptno ,line ,flag))))))))))
 	  (end-of-line)))))
   (if (gdb-get-buffer 'gdb-assembler-buffer) (gdb-assembler-custom)))
 
@@ -2211,6 +2236,9 @@
   (if (and (search-forward "Located in " nil t)
 	   (looking-at "\\S-*"))
       (setq gdb-main-file (match-string 0)))
+  (goto-char (point-min))
+  (if (search-forward "Includes preprocessor macro info." nil t)
+      (setq gdb-macro-info t))
  (if gdb-many-windows
       (gdb-setup-windows)
    (gdb-get-create-buffer 'gdb-breakpoints-buffer)
@@ -2224,12 +2252,14 @@
   (goto-char (point-min))
   (catch 'file-not-found
     (if (search-forward "Located in " nil t)
-	(if (looking-at "\\S-*")
-	    (push (cons bptno (match-string 0)) gdb-location-alist))
+	(when (looking-at "\\S-*")
+	  (delete (cons bptno "File not found") gdb-location-alist)
+	  (push (cons bptno (match-string 0)) gdb-location-alist))
       (gdb-resync)
-      (push (cons bptno "File not found") gdb-location-alist)
-      (message-box "Cannot find source file for breakpoint location.\n\
-Add directory to search path for source files using the GDB command, dir.")
+      (unless (assoc bptno gdb-location-alist)
+	(push (cons bptno "File not found") gdb-location-alist)
+	(message-box "Cannot find source file for breakpoint location.\n\
+Add directory to search path for source files using the GDB command, dir."))
       (throw 'file-not-found nil))
     (with-current-buffer
 	(find-file-noselect (match-string 0))
--- a/lisp/progmodes/grep.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/progmodes/grep.el	Thu May 12 03:41:19 2005 +0000
@@ -1,4 +1,4 @@
-;;; grep.el --- run compiler as inferior of Emacs, parse error messages
+;;; grep.el --- run Grep as inferior of Emacs, parse match messages
 
 ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 ;;   2001, 2002, 2004, 2005  Free Software Foundation, Inc.
--- a/lisp/progmodes/gud.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/progmodes/gud.el	Thu May 12 03:41:19 2005 +0000
@@ -39,6 +39,8 @@
 
 ;;; Code:
 
+(eval-when-compile (require 'cl)) ; for case macro
+
 (require 'comint)
 (require 'etags)
 
@@ -113,11 +115,11 @@
 
 (easy-mmode-defmap gud-menu-map
   '(([help]     "Info" . gud-goto-info)
-    ([tooltips] menu-item "Toggle GUD tooltips" tooltip-toggle-gud-tips
+    ([tooltips] menu-item "Toggle GUD tooltips" gud-tooltip-mode
                   :enable  (and (not emacs-basic-display)
 				(display-graphic-p)
 				(fboundp 'x-show-tip))
-	          :button (:toggle . tooltip-gud-tips-p))
+	          :button (:toggle . gud-tooltip-mode))
     ([refresh]	"Refresh" . gud-refresh)
     ([run]	menu-item "Run" gud-run
                   :enable (and (not gud-running)
@@ -228,7 +230,8 @@
       (with-current-buffer buf
 	(set (make-local-variable 'gud-minor-mode) minor-mode)
 	(set (make-local-variable 'tool-bar-map) gud-tool-bar-map)
-	(when (memq gud-minor-mode '(gdbmi gdba))
+	(when (and gud-tooltip-mode
+		   (memq gud-minor-mode '(gdbmi gdba)))
 	  (make-local-variable 'gdb-define-alist)
 	  (unless  gdb-define-alist (gdb-create-define-alist))
 	  (add-hook 'after-save-hook 'gdb-create-define-alist nil t))
@@ -3100,6 +3103,210 @@
 	 (font-lock-syntactic-face-function
 	  . gdb-script-font-lock-syntactic-face))))
 
+
+;;; tooltips for GUD
+
+;;; Customizable settings
+(defcustom gud-tooltip-modes '(gud-mode c-mode c++-mode fortran-mode)
+  "List of modes for which to enable GUD tips."
+  :type 'sexp
+  :tag "GUD modes"
+  :group 'tooltip)
+
+(defcustom gud-tooltip-display
+  '((eq (tooltip-event-buffer gud-tooltip-event)
+	(marker-buffer gud-overlay-arrow-position)))
+  "List of forms determining where GUD tooltips are displayed.
+
+Forms in the list are combined with AND.  The default is to display
+only tooltips in the buffer containing the overlay arrow."
+  :type 'sexp
+  :tag "GUD buffers predicate"
+  :group 'tooltip)
+
+(defcustom gud-tooltip-echo-area nil
+  "Use the echo area instead of frames for GUD tooltips."
+  :type 'boolean
+  :tag "Use echo area"
+  :group 'tooltip)
+
+(define-obsolete-variable-alias 'tooltip-gud-modes
+                                'gud-tooltip-modes "22.1")
+(define-obsolete-variable-alias 'tooltip-gud-display
+                                'gud-tooltip-display "22.1")
+(define-obsolete-variable-alias 'tooltip-use-echo-area
+                                'gud-tooltip-echo-area "22.1")
+
+;;; Reacting on mouse movements
+
+(defun gud-tooltip-change-major-mode ()
+  "Function added to `change-major-mode-hook' when tooltip mode is on."
+  (add-hook 'post-command-hook 'gud-tooltip-activate-mouse-motions-if-enabled))
+
+(defun gud-tooltip-activate-mouse-motions-if-enabled ()
+  "Reconsider for all buffers whether mouse motion events are desired."
+  (remove-hook 'post-command-hook
+	       'gud-tooltip-activate-mouse-motions-if-enabled)
+  (dolist (buffer (buffer-list))
+    (save-excursion
+      (set-buffer buffer)
+      (if (and gud-tooltip-mode
+	       (memq major-mode gud-tooltip-modes))
+	  (gud-tooltip-activate-mouse-motions t)
+	(gud-tooltip-activate-mouse-motions nil)))))
+
+(defvar gud-tooltip-mouse-motions-active nil
+  "Locally t in a buffer if tooltip processing of mouse motion is enabled.")
+
+(defun gud-tooltip-activate-mouse-motions (activatep)
+  "Activate/deactivate mouse motion events for the current buffer.
+ACTIVATEP non-nil means activate mouse motion events."
+  (if activatep
+      (progn
+	(make-local-variable 'gud-tooltip-mouse-motions-active)
+	(setq gud-tooltip-mouse-motions-active t)
+	(make-local-variable 'track-mouse)
+	(setq track-mouse t))
+    (when gud-tooltip-mouse-motions-active
+      (kill-local-variable 'gud-tooltip-mouse-motions-active)
+      (kill-local-variable 'track-mouse))))
+
+(defun gud-tooltip-mouse-motion (event)
+  "Command handler for mouse movement events in `global-map'."
+  (interactive "e")
+  (tooltip-hide)
+  (when (car (mouse-pixel-position))
+    (setq tooltip-last-mouse-motion-event (copy-sequence event))
+    (tooltip-start-delayed-tip)))
+
+;;; Tips for `gud'
+
+(defvar gud-tooltip-original-filter nil
+  "Process filter to restore after GUD output has been received.")
+
+(defvar gud-tooltip-dereference nil
+  "Non-nil means print expressions with a `*' in front of them.
+For C this would dereference a pointer expression.")
+
+(defvar gud-tooltip-event nil
+  "The mouse movement event that led to a tooltip display.
+This event can be examined by forms in GUD-TOOLTIP-DISPLAY.")
+
+(defun gud-tooltip-toggle-dereference ()
+  "Toggle whether tooltips should show `* expr' or `expr'."
+  (interactive)
+  (setq gud-tooltip-dereference (not gud-tooltip-dereference))
+  (when (interactive-p)
+    (message "Dereferencing is now %s."
+	     (if gud-tooltip-dereference "on" "off"))))
+
+(define-obsolete-function-alias 'tooltip-gud-toggle-dereference
+                                'gud-tooltip-toggle-dereference "22.1")
+
+(define-minor-mode gud-tooltip-mode
+  "Toggle the display of GUD tooltips."
+  :global t
+  :group 'gud
+  (require 'tooltip)
+  (if gud-tooltip-mode
+      (progn
+	(add-hook 'change-major-mode-hook 'gud-tooltip-change-major-mode)
+	(add-hook 'pre-command-hook 'tooltip-hide)
+	(add-hook 'tooltip-hook 'gud-tooltip-tips)
+	(define-key global-map [mouse-movement] 'gud-tooltip-mouse-motion))
+    (unless tooltip-mode (remove-hook 'pre-command-hook 'tooltip-hide)
+    (remove-hook 'change-major-mode-hook 'tooltip-change-major-mode)
+    (remove-hook 'tooltip-hook 'gud-tooltip-tips)
+    (define-key global-map [mouse-movement] 'ignore)))
+  (gud-tooltip-activate-mouse-motions-if-enabled)
+  (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
+      (if gud-tooltip-mode
+	  (progn
+	    (dolist (buffer (buffer-list))
+	      (unless (eq buffer gud-comint-buffer)
+		(with-current-buffer buffer
+		  (when (and (memq gud-minor-mode '(gdbmi gdba))
+			     (not (string-match "\\`\\*.+\\*\\'"
+						(buffer-name))))
+		    (make-local-variable 'gdb-define-alist)
+		    (gdb-create-define-alist)
+		    (add-hook 'after-save-hook
+			      'gdb-create-define-alist nil t))))))
+	(kill-local-variable 'gdb-define-alist)
+	(remove-hook 'after-save-hook 'gdb-create-define-alist t))))
+
+; This will only display data that comes in one chunk.
+; Larger arrays (say 400 elements) are displayed in
+; the tootip incompletely and spill over into the gud buffer.
+; Switching the process-filter creates timing problems and
+; it may be difficult to do better. Using annotations as in
+; gdb-ui.el gets round this problem.
+(defun gud-tooltip-process-output (process output)
+  "Process debugger output and show it in a tooltip window."
+  (set-process-filter process gud-tooltip-original-filter)
+  (tooltip-show (tooltip-strip-prompt process output)
+		gud-tooltip-echo-area))
+
+(defun gud-tooltip-print-command (expr)
+  "Return a suitable command to print the expression EXPR.
+If GUD-TOOLTIP-DEREFERENCE is t, also prepend a `*' to EXPR."
+  (when gud-tooltip-dereference
+    (setq expr (concat "*" expr)))
+  (case gud-minor-mode
+    ((gdb gdba) (concat "server print " expr))
+    ((dbx gdbmi) (concat "print " expr))
+    (xdb (concat "p " expr))
+    (sdb (concat expr "/"))
+    (perldb expr)))
+
+(defun gud-tooltip-tips (event)
+  "Show tip for identifier or selection under the mouse.
+The mouse must either point at an identifier or inside a selected
+region for the tip window to be shown.  If gud-tooltip-dereference is t,
+add a `*' in front of the printed expression. In the case of a C program
+controlled by GDB, show the associated #define directives when program is
+not executing.
+
+This function must return nil if it doesn't handle EVENT."
+  (let (process)
+    (when (and (eventp event)
+	       gud-tooltip-mode
+	       (boundp 'gud-comint-buffer)
+	       gud-comint-buffer
+	       (buffer-name gud-comint-buffer); gud-comint-buffer might be killed
+	       (setq process (get-buffer-process gud-comint-buffer))
+	       (posn-point (event-end event))
+	       (or (and (eq gud-minor-mode 'gdba) (not gdb-active-process))
+		   (progn (setq gud-tooltip-event event)
+			  (eval (cons 'and gud-tooltip-display)))))
+      (let ((expr (tooltip-expr-to-print event)))
+	(when expr
+	  (if (and (eq gud-minor-mode 'gdba)
+		   (not gdb-active-process))
+	      (progn
+		(with-current-buffer
+		    (window-buffer (let ((mouse (mouse-position)))
+				     (window-at (cadr mouse)
+						(cddr mouse))))
+		  (let ((define-elt (assoc expr gdb-define-alist)))
+		    (unless (null define-elt)
+		      (tooltip-show (cdr define-elt))
+		      expr))))
+	    (let ((cmd (gud-tooltip-print-command expr)))
+	      (unless (null cmd) ; CMD can be nil if unknown debugger
+		(if (memq gud-minor-mode '(gdba gdbmi))
+		      (if gdb-macro-info
+			  (gdb-enqueue-input
+			   (list (concat
+				  gdb-server-prefix "macro expand " expr "\n")
+				 `(lambda () (gdb-tooltip-print-1 ,expr))))
+			(gdb-enqueue-input
+			 (list  (concat cmd "\n") 'gdb-tooltip-print)))
+		  (setq gud-tooltip-original-filter (process-filter process))
+		  (set-process-filter process 'gud-tooltip-process-output)
+		  (gud-basic-call cmd))
+		expr))))))))
+
 (provide 'gud)
 
 ;;; arch-tag: 6d990948-df65-461a-be39-1c7fb83ac4c4
--- a/lisp/progmodes/idlw-help.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/progmodes/idlw-help.el	Thu May 12 03:41:19 2005 +0000
@@ -36,7 +36,7 @@
 ;; information, at:
 ;;
 ;;           http://idlwave.org
-;; 
+;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 
@@ -52,10 +52,10 @@
   :group 'idlwave-online-help
   :type 'boolean)
 
-(defvar idlwave-html-link-sep 
+(defvar idlwave-html-link-sep
   (if idlwave-html-help-pre-v6 "#" "#wp"))
 
-(defcustom idlwave-html-help-location 
+(defcustom idlwave-html-help-location
   (if (memq system-type '(ms-dos windows-nt))
       nil
     "/usr/local/etc/")
@@ -83,7 +83,7 @@
   :group 'idlwave-online-help
   :type 'string)
 
-(defcustom idlwave-help-browser-generic-args 
+(defcustom idlwave-help-browser-generic-args
   (if (boundp 'browse-url-generic-args)
       browse-url-generic-args "")
   "Program args to use if using browse-url-generic-program."
@@ -191,7 +191,7 @@
 
 (defvar idlwave-help-activate-links-aggressively nil
   "Obsolete variable.")
-  
+
 (defvar idlwave-completion-help-info)
 
 (defvar idlwave-help-frame nil
@@ -314,7 +314,7 @@
       (setq idlwave-last-context-help-pos marker)
       (idlwave-do-context-help1 arg)
       (if idlwave-help-diagnostics
-	  (message "%s" (mapconcat 'identity 
+	  (message "%s" (mapconcat 'identity
 				   (nreverse idlwave-help-diagnostics)
 				   "; "))))))
 
@@ -323,7 +323,7 @@
 (defun idlwave-do-context-help1 (&optional arg)
   "The work-horse version of `idlwave-context-help', which see."
   (save-excursion
-    (if (equal (char-after) ?/) 
+    (if (equal (char-after) ?/)
 	(forward-char 1)
       (if (equal (char-before) ?=)
 	  (backward-char 1)))
@@ -333,7 +333,7 @@
 	   (beg (save-excursion (skip-chars-backward chars) (point)))
 	   (end (save-excursion (skip-chars-forward chars) (point)))
 	   (this-word (buffer-substring-no-properties beg end))
-	   (st-ass (assoc (downcase this-word) 
+	   (st-ass (assoc (downcase this-word)
 			  idlwave-help-special-topic-words))
 	   (classtag (and (string-match "self\\." this-word)
 			  (< beg (- end 4))))
@@ -341,7 +341,7 @@
 			   (string-match "\\`\\([^.]+\\)\\." this-word)
 			   (< beg (- end 4))))
 	   module keyword cw mod1 mod2 mod3)
-      (if (or arg 
+      (if (or arg
 	      (and (not st-ass)
 		   (not classtag)
 		   (not structtag)
@@ -360,15 +360,15 @@
 		      (setq module (list "init" 'fun (match-string 1 str))
 			    idlwave-current-obj_new-class (match-string 1 str))
 		    )))))
-      (cond 
+      (cond
        (arg (setq mod1 module))
-       
+
        ;; A special topic -- only system help
        (st-ass (setq mod1 (list (cdr st-ass))))
-       
+
        ;; A system variable -- only system help
-       ((string-match 
-	 "\\`!\\([a-zA-Z0-9_]+\\)\\(\.\\([A-Za-z0-9_]+\\)\\)?" 
+       ((string-match
+	 "\\`!\\([a-zA-Z0-9_]+\\)\\(\.\\([A-Za-z0-9_]+\\)\\)?"
 	 this-word)
 	(let* ((word  (match-string-no-properties 1 this-word))
 	       (entry (assq (idlwave-sintern-sysvar word)
@@ -380,18 +380,19 @@
 				      (cdr (assq 'tags entry))))))
 	       (link (nth 1 (assq 'link entry))))
 	  (if tag-target
-	      (setq link (idlwave-substitute-link-target link 
+	      (setq link (idlwave-substitute-link-target link
 							 tag-target)))
 	  (setq mod1 (list link))))
-			  
+
        ;; An executive command -- only system help
        ((string-match "^\\.\\([A-Z_]+\\)" this-word)
 	(let* ((word  (match-string 1 this-word))
-	       (link  (cdr (assoc-ignore-case 
+	       (link  (cdr (assoc-string
 			    word
-			    idlwave-executive-commands-alist))))
+			    idlwave-executive-commands-alist
+                            t))))
 	  (setq mod1 (list link))))
-       
+
        ;; A class -- system OR in-text help (via class__define).
        ((and (eq cw 'class)
 	     (or (idlwave-in-quote)  ; e.g. obj_new
@@ -405,28 +406,28 @@
 	       (name   (concat (downcase this-word) "__define"))
 	       (link   (nth 1 (assq 'link entry))))
 	  (setq mod1 (list link name 'pro))))
-       
+
        ;; A class structure tag (self.BLAH) -- only in-text help available
        (classtag
 	(let ((tag (substring this-word (match-end 0)))
 	      class-with found-in)
-	  (when (setq class-with 
+	  (when (setq class-with
 		      (idlwave-class-or-superclass-with-tag
 		       (nth 2 (idlwave-current-routine))
 		       tag))
 	    (setq found-in (idlwave-class-found-in class-with))
-	    (if (assq (idlwave-sintern-class class-with) 
+	    (if (assq (idlwave-sintern-class class-with)
 		      idlwave-system-class-info)
 		(error "No help available for system class tags"))
 	    (setq idlwave-help-do-class-struct-tag t)
-	    (setq mod1 (list nil 
+	    (setq mod1 (list nil
 			     (if found-in
 				 (cons (concat found-in "__define") class-with)
 			       (concat class-with "__define"))
 			     'pro
 			     nil ; no class.... it's a procedure!
 			     tag)))))
-       
+
        ;; A regular structure tag -- only in text, and if
        ;; optional `complete-structtag' loaded.
        (structtag
@@ -437,7 +438,7 @@
 	  (setq idlwave-help-do-struct-tag
 		idlwave-structtag-struct-location
 		mod1 (list nil nil nil nil tag))))
-       
+
        ;; A routine keyword -- in text or system help
        ((and (memq cw '(function-keyword procedure-keyword))
 	     (stringp this-word)
@@ -479,7 +480,7 @@
 	       (setq mod1 (append (list t) module (list keyword))
 		     mod2 (list t this-word 'fun nil)
 		     mod3 (append (list t) module)))))
-       
+
        ;; Everything else
        (t
 	(setq mod1 (append (list t) module))))
@@ -512,14 +513,14 @@
 	 word link)
     (mouse-set-point ev)
 
-	  
+
     ;; See if we can also find help somewhere, e.g. for multiple classes
     (setq word (idlwave-this-word))
     (if (string= word "")
 	(error "No help item selected"))
     (setq link (get-text-property 0 'link word))
     (select-window cw)
-    (cond 
+    (cond
      ;; Routine name
      ((memq what '(procedure function routine))
       (setq name word)
@@ -530,9 +531,9 @@
 			   type)))
 	    (setq link t)		; No specific link valid yet
 	    (if sclasses
-		(setq classes (idlwave-members-only 
+		(setq classes (idlwave-members-only
 			       classes (cons class sclasses))))
-	    (setq class (idlwave-popup-select ev classes 
+	    (setq class (idlwave-popup-select ev classes
 					      "Select Class" 'sort))))
 
       ;; XXX is this necessary, given all-method-classes?
@@ -552,7 +553,7 @@
 			   type)))
 	    (setq link t) ; Link can't be correct yet
 	    (if sclasses
-		(setq classes (idlwave-members-only 
+		(setq classes (idlwave-members-only
 			       classes (cons class sclasses))))
 	    (setq class (idlwave-popup-select ev classes
 					      "Select Class" 'sort))
@@ -564,14 +565,14 @@
 	(if (string= (downcase name) "obj_new")
 	    (setq class idlwave-current-obj_new-class
 		  name "Init"))))
-	  
+
      ;; Class name
      ((eq what 'class)
       (setq class word
 	    word nil))
-     
+
      ;; A special named function to call which sets some of our variables
-     ((and (symbolp what) 
+     ((and (symbolp what)
 	   (fboundp what))
       (funcall what 'set word))
 
@@ -586,7 +587,7 @@
   "Highlight all completions for which help is available and attach link.
 Those words in `idlwave-completion-help-links' have links.  The
 `idlwave-help-link-face' face is used for this."
-  (if idlwave-highlight-help-links-in-completion      
+  (if idlwave-highlight-help-links-in-completion
       (with-current-buffer (get-buffer "*Completions*")
 	(save-excursion
 	  (let* ((case-fold-search t)
@@ -602,13 +603,13 @@
 	      (setq beg (match-beginning 1) end (match-end 1)
 		    word (match-string 1) doit nil)
 	      ;; Call special completion function test
-	      (if (and (symbolp what) 
+	      (if (and (symbolp what)
 		       (fboundp what))
 		  (setq doit (funcall what 'test word))
 		;; Look for special link property passed in help-links
 		(if idlwave-completion-help-links
-		    (setq doit (assoc-ignore-case 
-				word idlwave-completion-help-links))))
+		    (setq doit (assoc-string
+				word idlwave-completion-help-links t))))
 	      (when doit
 		(if (consp doit)
 		    (setq props (append props `(link ,(cdr doit)))))
@@ -633,13 +634,13 @@
 	     ;; Try to select the return frame.
 	     ;; This can crash on slow network connections, obviously when
 	     ;; we kill the help frame before the return-frame is selected.
-	     ;; To protect the workings, we wait for up to one second 
+	     ;; To protect the workings, we wait for up to one second
 	     ;; and check if the return-frame *is* now selected.
 	     ;; This is marked "eperimental" since we are not sure when its OK.
 	     (let ((maxtime 1.0) (time 0.) (step 0.1))
 	       (select-frame idlwave-help-return-frame)
 	       (while (and (sit-for step)
-			   (not (eq (selected-frame) 
+			   (not (eq (selected-frame)
 				    idlwave-help-return-frame))
 			   (< (setq time (+ time step)) maxtime)))))
 	 (delete-frame idlwave-help-frame))
@@ -652,7 +653,7 @@
 (defvar default-toolbar-visible-p)
 
 (defun idlwave-help-display-help-window (&optional pos-or-func)
-  "Display the help window.  
+  "Display the help window.
 Move window start to POS-OR-FUNC, if passed as a position, or call it
 if passed as a function.  See `idlwave-help-use-dedicated-frame'."
   (let ((cw (selected-window))
@@ -663,13 +664,13 @@
 	  (switch-to-buffer buf))
       ;; Do it in this frame and save the window configuration
       (if (not (get-buffer-window buf nil))
-	  (setq idlwave-help-window-configuration 
+	  (setq idlwave-help-window-configuration
 		(current-window-configuration)))
       (display-buffer buf nil (selected-frame))
       (select-window (get-buffer-window buf)))
     (raise-frame)
-    (if pos-or-func 
-	(if (functionp pos-or-func) 
+    (if pos-or-func
+	(if (functionp pos-or-func)
 	    (funcall pos-or-func)
 	  (goto-char pos-or-func)
 	  (recenter 0)))
@@ -691,31 +692,31 @@
       (select-frame idlwave-help-return-frame)))
 
 (defun idlwave-online-help (link &optional name type class keyword)
-  "Display HTML or other special help on a certain topic.  
+  "Display HTML or other special help on a certain topic.
 Either loads an HTML link, if LINK is non-nil, or gets special-help on
 the optional arguments, if any special help is defined.  If LINK is
 `t', first look up the optional arguments in the routine info list to
 see if a link is set for it.  Try extra help functions if necessary."
   ;; Lookup link
-  (if (eq link t) 
-      (let ((entry (idlwave-best-rinfo-assoc name type class 
+  (if (eq link t)
+      (let ((entry (idlwave-best-rinfo-assoc name type class
 					     (idlwave-routines) nil t)))
 	(cond
 	 ;; Try keyword link
-	 ((and keyword 
+	 ((and keyword
 	       (setq link (cdr (idlwave-entry-find-keyword entry keyword)))))
 	 ;; Default, regular entry link
 	 (t (setq link (idlwave-entry-has-help entry))))))
 
   (cond
    ;; An explicit link
-   ((stringp link) 
+   ((stringp link)
     (idlwave-help-html-link link))
-   
+
    ;; Any extra help
    (idlwave-extra-help-function
     (idlwave-help-get-special-help name type class keyword))
-   
+
    ;; Nothing worked
    (t (idlwave-help-error name type class keyword))))
 
@@ -726,7 +727,7 @@
 	 (help-pos (save-excursion
 		     (set-buffer (idlwave-help-get-help-buffer))
 		     (let ((buffer-read-only nil))
-		       (funcall idlwave-extra-help-function 
+		       (funcall idlwave-extra-help-function
 				name type class keyword)))))
     (if help-pos
 	(idlwave-help-display-help-window help-pos)
@@ -740,7 +741,7 @@
 	(browse-url-generic-program idlwave-help-browser-generic-program)
 	;(browse-url-generic-args idlwave-help-browser-generic-args)
 	full-link)
-    
+
     (if (and (memq system-type '(ms-dos windows-nt))
 	     idlwave-help-use-hh)
 	(progn
@@ -755,12 +756,12 @@
       ;; Just a regular file name (+ anchor name)
       (unless (and (stringp help-loc)
 		   (file-directory-p help-loc))
-	(error 
+	(error
 	 "Invalid help location; customize `idlwave-html-help-location'."))
-      (setq full-link (concat 
+      (setq full-link (concat
 		       "file://"
-		       (expand-file-name 
-			link 
+		       (expand-file-name
+			link
 			(expand-file-name "idl_html_help" help-loc)))))
 
     ;; Check for a local browser
@@ -796,7 +797,7 @@
     (if class-only   ;Help with class?  Using "Init" as source.
 	(setq name "Init"
 	      type 'fun))
-    (if (not struct-tag) 
+    (if (not struct-tag)
 	(setq file
 	      (idlwave-routine-source-file
 	       (nth 3 (idlwave-best-rinfo-assoc
@@ -809,7 +810,7 @@
     (if (or struct-tag (stringp file))
 	(progn
 	  (setq in-buf ; structure-tag completion is always in current buffer
-		(if struct-tag 
+		(if struct-tag
 		    idlwave-current-tags-buffer
 		  (idlwave-get-buffer-visiting file)))
 	  ;; see if file is in a visited buffer, insert those contents
@@ -831,19 +832,19 @@
     ;; Try to find a good place to display
     (setq def-pos
 	  ;; Find the class structure tag if that's what we're after
-	  (cond 
+	  (cond
 	   ;; Class structure tags: find the class or named structure
 	   ;; definition
 	   (class-struct-tag
-	    (save-excursion 
+	    (save-excursion
 	      (setq class
-		    (if (string-match "[a-zA-Z0-9]\\(__\\)" name) 
+		    (if (string-match "[a-zA-Z0-9]\\(__\\)" name)
 			(substring name 0 (match-beginning 1))
 		      idlwave-current-tags-class))
 	      (and
 	       (idlwave-find-class-definition class nil real-class)
 	       (idlwave-find-struct-tag keyword))))
-	   
+
 	   ;; Generic structure tags: the structure definition
 	   ;; location within the file has been recorded in
 	   ;; `struct-tag'
@@ -853,14 +854,14 @@
 	       (integerp struct-tag)
 	       (goto-char struct-tag)
 	       (idlwave-find-struct-tag keyword))))
-	   
+
 	   ;; Just find the routine definition
 	   (t
 	    (if class-only (point-min)
 	      (idlwave-help-find-routine-definition name type class keyword))))
 	  idlwave-help-def-pos def-pos)
 
-    (if (and idlwave-help-source-try-header 
+    (if (and idlwave-help-source-try-header
 	     (not (or struct-tag class-struct-tag)))
 	;; Check if we can find the header
 	(save-excursion
@@ -870,7 +871,7 @@
 		idlwave-help-in-header header-pos)))
 
     (if (or header-pos def-pos)
-	(progn 
+	(progn
 	  (if (boundp 'idlwave-help-min-frame-width)
 	      (setq idlwave-help-min-frame-width 80))
 	  (goto-char (or header-pos def-pos)))
@@ -884,7 +885,7 @@
 KEYWORD is ignored. Returns the point of match if successful, nil otherwise."
   (save-excursion
     (goto-char (point-max))
-    (if (re-search-backward 
+    (if (re-search-backward
 	 (concat "^[ \t]*"
 		 (if (eq type 'pro) "pro"
 		   (if (eq type 'fun) "function"
@@ -930,22 +931,22 @@
 If there is a match, we assume it is the keyword description."
   (let* ((case-fold-search t)
 	 (rname (if (stringp class)
-		    (concat 
+		    (concat
 		     "\\("
 		     ;; Traditional name or class::name
 		     "\\("
 		     "\\(" (regexp-quote (downcase class)) "::\\)?"
 		     (regexp-quote (downcase name))
 		     "\\>\\)"
-		     (concat 
+		     (concat
 		      "\\|"
 		      ;; class__define or just class
 		      (regexp-quote (downcase class)) "\\(__define\\)?")
 		     "\\)")
 		  (regexp-quote (downcase name))))
-	 
+
 	 ;; NAME tag plus the routine name.  The new version is from JD.
-	 (name-re (concat 
+	 (name-re (concat
 		   "\\(^;+\\*?[ \t]*"
 		   idlwave-help-doclib-name
 		   "\\([ \t]*:\\|[ \t]*$\\)[ \t]*\\(\n;+[ \t]*\\)*"
@@ -980,7 +981,7 @@
 		       (regexp-quote (upcase keyword))
 		      "\\>")))
 	 dstart dend name-pos kwds-pos kwd-pos)
-    (catch 'exit 
+    (catch 'exit
       (save-excursion
 	(goto-char (point-min))
 	(while (and (setq dstart (re-search-forward idlwave-doclib-start nil t))
@@ -988,7 +989,7 @@
 	  ;; found a routine header
 	  (goto-char dstart)
 	  (if (setq name-pos (re-search-forward name-re dend t))
-	      (progn 
+	      (progn
 		(if keyword
 		    ;; We do need a keyword
 		    (progn
@@ -1070,7 +1071,7 @@
       (idlwave-help-find-first-header nil)
     (setq idlwave-help-in-header nil)
     (idlwave-help-toggle-header-match-and-def arg 'top)))
-  
+
 (defun idlwave-help-toggle-header-match-and-def (arg &optional top)
   (interactive "P")
   (let ((args idlwave-help-args)
@@ -1082,7 +1083,7 @@
 	  (setq pos idlwave-help-def-pos))
       ;; Try to display header
       (setq pos (apply 'idlwave-help-find-in-doc-header
-		       (if top 
+		       (if top
 			   (list (car args) (nth 1 args) (nth 2 args) nil)
 			 args)))
       (if pos
@@ -1116,7 +1117,7 @@
 	      (font-lock-fontify-buffer))
 	  (set-syntax-table syntax-table)))))
 
-      
+
 (defun idlwave-help-error (name type class keyword)
   (error "Can't find help on %s%s %s"
 	 (or (and (or class name) (idlwave-make-full-name class name))
--- a/lisp/progmodes/make-mode.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/progmodes/make-mode.el	Thu May 12 03:41:19 2005 +0000
@@ -47,7 +47,7 @@
 ;; prerequisites.
 ;;
 ;; The command C-c C-b pops up a browser window listing all target and
-;; macro names.  You can mark or unmark items wit C-c SPC, and insert
+;; macro names.  You can mark or unmark items with C-c SPC, and insert
 ;; all marked items back in the Makefile with C-c TAB.
 ;;
 ;; The command C-c TAB in the makefile buffer inserts a GNU make builtin.
@@ -284,6 +284,9 @@
 	    "\\>[ \t]*\\([^: \t\n#]*\\)")
     '(1 font-lock-keyword-face) '(2 font-lock-variable-name-face))
 
+   '("^\\(?: [ \t]*\\)?if\\(n\\)\\(?:def\\|eq\\)\\>"
+     1 font-lock-negation-char-face prepend)
+
    ;; Highlight lines that contain just whitespace.
    ;; They can cause trouble, especially if they start with a tab.
    '("^[ \t]+$" . makefile-space-face)
--- a/lisp/progmodes/sh-script.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/progmodes/sh-script.el	Thu May 12 03:41:19 2005 +0000
@@ -414,6 +414,10 @@
 	?\" "\"\""
 	?\' "\"'"
 	?\` "\"`"
+	;; ?$ might also have a ". p" syntax. Both "'" and ". p" seem
+	;; to work fine. This is needed so that dabbrev-expand
+	;; $VARNAME works.
+	?$ "'"
 	?! "_"
 	?% "_"
 	?: "_"
@@ -827,7 +831,9 @@
 	;; Function names.
 	("^\\(\\sw+\\)[ \t]*(" 1 font-lock-function-name-face)
 	("\\<\\(function\\)\\>[ \t]*\\(\\sw+\\)?"
-	  (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t)))
+	  (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t))
+	("\\(?:^\\s *\\|[[();&|]\\s *\\|\\(?:\\s +-[ao]\\|if\\|else\\|then\\|while\\|do\\)\\s +\\)\\(!\\)"
+	 1 font-lock-negation-char-face))
 
     ;; The next entry is only used for defining the others
     (shell sh-append executable-font-lock-keywords
@@ -1124,7 +1130,7 @@
   :type `(choice ,@ sh-number-or-symbol-list )
   :group 'sh-indentation)
 
-(defcustom sh-indent-for-do '*
+(defcustom sh-indent-for-do 0
   "*How much to indent a do statement.
 This is relative to the statement before the do, i.e. the
 while until or for statement."
--- a/lisp/replace.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/replace.el	Thu May 12 03:41:19 2005 +0000
@@ -977,32 +977,33 @@
     (setq occur-buf (get-buffer-create buf-name))
 
     (with-current-buffer occur-buf
-      (setq buffer-read-only nil)
       (occur-mode)
-      (erase-buffer)
-      (let ((count (occur-engine
-		    regexp active-bufs occur-buf
-		    (or nlines list-matching-lines-default-context-lines)
-		    (and case-fold-search
-			 (isearch-no-upper-case-p regexp t))
-		    list-matching-lines-buffer-name-face
-		    nil list-matching-lines-face t)))
-	(let* ((bufcount (length active-bufs))
-	       (diff (- (length bufs) bufcount)))
-	  (message "Searched %d buffer%s%s; %s match%s for `%s'"
-		   bufcount (if (= bufcount 1) "" "s")
-		   (if (zerop diff) "" (format " (%d killed)" diff))
-		   (if (zerop count) "no" (format "%d" count))
-		   (if (= count 1) "" "es")
-		   regexp))
-	(setq occur-revert-arguments (list regexp nlines bufs)
-	      buffer-read-only t)
-	(if (> count 0)
-	    (progn
-	      (display-buffer occur-buf)
-	      (setq next-error-last-buffer occur-buf))
-	  (kill-buffer occur-buf)))
-      (run-hooks 'occur-hook))))
+      (let ((inhibit-read-only t))
+	(erase-buffer)
+	(let ((count (occur-engine
+		      regexp active-bufs occur-buf
+		      (or nlines list-matching-lines-default-context-lines)
+		      (and case-fold-search
+			   (isearch-no-upper-case-p regexp t))
+		      list-matching-lines-buffer-name-face
+		      nil list-matching-lines-face t)))
+	  (let* ((bufcount (length active-bufs))
+		 (diff (- (length bufs) bufcount)))
+	    (message "Searched %d buffer%s%s; %s match%s for `%s'"
+		     bufcount (if (= bufcount 1) "" "s")
+		     (if (zerop diff) "" (format " (%d killed)" diff))
+		     (if (zerop count) "no" (format "%d" count))
+		     (if (= count 1) "" "es")
+		     regexp))
+	  (setq occur-revert-arguments (list regexp nlines bufs))
+	  (if (> count 0)
+	      (progn
+		(display-buffer occur-buf)
+		(setq next-error-last-buffer occur-buf))
+	    (kill-buffer occur-buf)))
+	(run-hooks 'occur-hook))
+      (setq buffer-read-only t)
+      (set-buffer-modified-p nil))))
 
 (defun occur-engine-add-prefix (lines)
   (mapcar
@@ -1013,7 +1014,6 @@
 (defun occur-engine (regexp buffers out-buf nlines case-fold-search
 			    title-face prefix-face match-face keep-props)
   (with-current-buffer out-buf
-    (setq buffer-read-only nil)
     (let ((globalcount 0)
 	  (coding nil))
       ;; Map over all the buffers
--- a/lisp/simple.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/simple.el	Thu May 12 03:41:19 2005 +0000
@@ -113,9 +113,7 @@
 (defvar next-error-highlight-timer nil)
 
 (defvar next-error-overlay-arrow-position nil)
-;; This is nil so as not to really display anything on text
-;; terminals.  On text terminals, it would hide part of the file name.
-(put 'next-error-overlay-arrow-position 'overlay-arrow-string "")
+(put 'next-error-overlay-arrow-position 'overlay-arrow-string "=>")
 (add-to-list 'overlay-arrow-variable-list 'next-error-overlay-arrow-position)
 
 (defvar next-error-last-buffer nil
@@ -3416,13 +3414,14 @@
 		;; Now move a line.
 		(end-of-line)
 		;; If there's no invisibility here, move over the newline.
-		(if (not (line-move-invisible-p (point)))
+		(if (and (not (integerp selective-display))
+			 (not (line-move-invisible-p (point))))
 		    ;; We avoid vertical-motion when possible
 		    ;; because that has to fontify.
 		    (if (eobp)
-		       (if (not noerror)
-			   (signal 'end-of-buffer nil)
-			 (setq done t))
+			(if (not noerror)
+			    (signal 'end-of-buffer nil)
+			  (setq done t))
 		      (forward-line 1))
 		  ;; Otherwise move a more sophisticated way.
 		  ;; (What's the logic behind this code?)
@@ -3432,11 +3431,13 @@
 			 (setq done t))))
 		(unless done
 		  (setq arg (1- arg))))
-	      ;; The logic of this is the same as the loop above, 
+	      ;; The logic of this is the same as the loop above,
 	      ;; it just goes in the other direction.
 	      (while (and (< arg 0) (not done))
 		(beginning-of-line)
-		(if (or (bobp) (not (line-move-invisible-p (1- (point)))))
+		(if (or (bobp)
+			(and (not (integerp selective-display))
+			     (not (line-move-invisible-p (1- (point))))))
 		    (if (bobp)
 			(if (not noerror)
 			    (signal 'beginning-of-buffer nil)
--- a/lisp/startup.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/startup.el	Thu May 12 03:41:19 2005 +0000
@@ -1108,7 +1108,7 @@
 Arguments from ARGS should be either strings, functions called
 with no args that return a string, or pairs `:face FACE',
 where FACE is a valid face specification, as it can be used with
-`put-text-properties'."
+`put-text-property'."
   (let ((current-face nil))
     (while args
       (if (eq (car args) :face)
--- a/lisp/term/mac-win.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/term/mac-win.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; mac-win.el --- parse switches controlling interface with Mac window system -*-coding: utf-8
 
-;; Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005
+;; Copyright (C) 1999, 2000, 2002, 2003, 2005
 ;;   Free Software Foundation, Inc.
 
 ;; Author: Andrew Choi <akochoi@mac.com>
@@ -1168,7 +1168,8 @@
 (defun x-select-text (text &optional push)
   (x-set-selection 'PRIMARY text)
   (setq x-last-selected-text-primary text)
-  (when x-select-enable-clipboard
+  (if (not x-select-enable-clipboard)
+      (setq x-last-selected-text-clipboard nil)
     (x-set-selection 'CLIPBOARD text)
     (setq x-last-selected-text-clipboard text))
   )
@@ -1203,20 +1204,26 @@
 		 (setq data
 		       (decode-coding-string data 'utf-16)))))
 	    ((eq data-type 'com.apple.traditional-mac-plain-text)
-	     (setq data (decode-coding-string data coding))))
+	     (setq data (decode-coding-string data coding)))
+	    ((eq data-type 'public.file-url)
+	     (setq data (decode-coding-string data 'utf-8))
+	     ;; Remove a trailing nul character.
+	     (let ((len (length data)))
+	       (if (and (> len 0) (= (aref data (1- len)) ?\0))
+		   (setq data (substring data 0 (1- len)))))))
       (put-text-property 0 (length data) 'foreign-selection data-type data))
     data))
 
 (defun x-selection-value (type)
-  (let (text tiff-image)
-    (setq text (condition-case nil
-		   (x-get-selection type 'public.utf16-plain-text)
-		 (error nil)))
-    (if (not text)
-	(setq text (condition-case nil
-		       (x-get-selection type
-					'com.apple.traditional-mac-plain-text)
-		     (error nil))))
+  (let ((data-types '(public.utf16-plain-text
+		      com.apple.traditional-mac-plain-text
+		      public.file-url))
+	text tiff-image)
+    (while (and (null text) data-types)
+      (setq text (condition-case nil
+		     (x-get-selection type (car data-types))
+		   (error nil)))
+      (setq data-types (cdr data-types)))
     (if text
 	(remove-text-properties 0 (length text) '(foreign-selection nil) text))
     (setq tiff-image (condition-case nil
@@ -1237,7 +1244,8 @@
 ;;; selection won't be added to the kill ring over and over.
 (defun x-get-selection-value ()
   (let (clip-text primary-text)
-    (when x-select-enable-clipboard
+    (if (not x-select-enable-clipboard)
+	(setq x-last-selected-text-clipboard nil)
       (setq clip-text (x-selection-value 'CLIPBOARD))
       (if (string= clip-text "") (setq clip-text nil))
 
@@ -1286,11 +1294,14 @@
     ))
 
 (put 'CLIPBOARD 'mac-scrap-name "com.apple.scrap.clipboard")
-(if (eq system-type 'darwin)
-    (put 'FIND 'mac-scrap-name "com.apple.scrap.find"))
+(when (eq system-type 'darwin)
+  (put 'FIND 'mac-scrap-name "com.apple.scrap.find")
+  (put 'PRIMARY 'mac-scrap-name
+       (format "org.gnu.Emacs.%d.selection.PRIMARY" (emacs-pid))))
 (put 'com.apple.traditional-mac-plain-text 'mac-ostype "TEXT")
 (put 'public.utf16-plain-text 'mac-ostype "utxt")
 (put 'public.tiff 'mac-ostype "TIFF")
+(put 'public.file-url 'mac-ostype "furl")
 
 (defun mac-select-convert-to-string (selection type value)
   (let ((str (cdr (xselect-convert-to-string selection nil value)))
@@ -1326,6 +1337,16 @@
       (setq next-selection-coding-system nil)
       (cons type str))))
 
+(defun mac-select-convert-to-file-url (selection type value)
+  (let ((filename (xselect-convert-to-filename selection type value))
+	(coding (or file-name-coding-system default-file-name-coding-system)))
+    (if (and filename coding)
+	(setq filename (encode-coding-string filename coding)))
+    (and filename
+	 (concat "file://localhost"
+		 (mapconcat 'url-hexify-string
+			    (split-string filename "/") "/")))))
+
 (setq selection-converter-alist
       (nconc
        '((public.utf16-plain-text . mac-select-convert-to-string)
@@ -1333,6 +1354,7 @@
 	 ;; This is not enabled by default because the `Import Image'
 	 ;; menu makes Emacs crash or hang for unknown reasons.
 	 ;; (public.tiff . nil)
+	 (public.file-url . mac-select-convert-to-file-url)
 	 )
        selection-converter-alist))
 
@@ -1657,6 +1679,7 @@
 (setq interprogram-cut-function 'x-select-text)
 (setq interprogram-paste-function 'x-get-selection-value)
 
+(defalias 'x-cut-buffer-or-selection-value 'x-get-selection-value)
 
 ;;; Turn off window-splitting optimization; Mac is usually fast enough
 ;;; that this is only annoying.
@@ -1711,7 +1734,9 @@
 	  '(lambda ()
 	     (defvar mac-ready-for-drag-n-drop t)))
 
-;;;; Scroll bars
+;;;; Non-toolkit Scroll bars
+
+(unless x-toolkit-scroll-bars
 
 ;; for debugging
 ;; (defun mac-handle-scroll-bar-event (event) (interactive "e") (princ event))
@@ -1771,6 +1796,7 @@
     (mac-scroll-ignore-events)
     (scroll-up 1)))
 
+)
 
 ;;;; Others
 
--- a/lisp/term/sun.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/term/sun.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; sun.el --- keybinding for standard default sunterm keys
 
-;; Copyright (C) 1987 Free Software Foundation, Inc.
+;; Copyright (C) 1987, 2001 Free Software Foundation, Inc.
 
 ;; Author: Jeff Peck <peck@sun.com>
 ;; Keywords: terminals
--- a/lisp/term/tty-colors.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/term/tty-colors.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; tty-colors.el --- color support for character terminals
 
-;; Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
 
 ;; Author: Eli Zaretskii
 ;; Maintainer: FSF
--- a/lisp/term/w32-win.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/term/w32-win.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; w32-win.el --- parse switches controlling interface with W32 window system
 
-;; Copyright (C) 1993, 1994, 2003, 2004, 2005  Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1994, 2003, 2005  Free Software Foundation, Inc.
 
 ;; Author: Kevin Gallo
 ;; Keywords: terminals
@@ -1223,7 +1223,7 @@
 
 ;;; Set default known names for image libraries
 (setq image-library-alist
-      '((xpm "libXpm-nox4.dll" "libxpm.dll")
+      '((xpm "xpm4.dll" "libXpm-nox4.dll" "libxpm.dll")
         (png "libpng13d.dll" "libpng13.dll" "libpng12d.dll" "libpng12.dll" "libpng.dll")
         (jpeg "jpeg62.dll" "libjpeg.dll" "jpeg-62.dll" "jpeg.dll")
         (tiff "libtiff3.dll" "libtiff.dll")
--- a/lisp/term/x-win.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/term/x-win.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; x-win.el --- parse relevant switches and set up for X  -*-coding: iso-2022-7bit;-*-
 
-;; Copyright (C) 1993, 1994, 2001, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1994, 2001, 2002, 2005 Free Software Foundation, Inc.
 
 ;; Author: FSF
 ;; Keywords: terminals, i18n
--- a/lisp/term/xterm.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/term/xterm.el	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 ;;; xterm.el --- define function key sequences and standard colors for xterm
 
-;; Copyright (C) 1995, 2002, 2004, 2005  Free Software Foundation, Inc.
+;; Copyright (C) 1995, 2002, 2005  Free Software Foundation, Inc.
 
 ;; Author: FSF
 ;; Keywords: terminals
--- a/lisp/textmodes/bibtex.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/textmodes/bibtex.el	Thu May 12 03:41:19 2005 +0000
@@ -776,8 +776,8 @@
   :type '(repeat string))
 
 (defcustom bibtex-summary-function 'bibtex-summary
-  "Function to call for generating a one-line summary of a BibTeX entry.
-It takes one argument, the key of the entry.
+  "Function to call for generating a summary of current BibTeX entry.
+It takes no arguments.  Point must be at beginning of entry.
 Used by `bibtex-complete-crossref-cleanup' and `bibtex-copy-summary-as-kill'."
   :group 'bibtex
   :type '(choice (const :tag "Default" bibtex-summary)
@@ -2550,25 +2550,24 @@
   (save-excursion
     (if (and (stringp key)
              (bibtex-find-entry key t))
-        (message "Ref: %s" (funcall bibtex-summary-function key)))))
+        (message "Ref: %s" (funcall bibtex-summary-function)))))
 
 (defun bibtex-copy-summary-as-kill ()
   "Push summery of current BibTeX entry to kill ring.
 Use `bibtex-summary-function' to generate summary."
   (interactive)
-  (let ((key (save-excursion
-               (bibtex-beginning-of-entry)
-               (if (looking-at bibtex-entry-maybe-empty-head)
-                   (bibtex-key-in-head)
-                 (error "No key found")))))
-    (kill-new (message "%s" (funcall bibtex-summary-function key)))))
-
-(defun bibtex-summary (key)
-  "Return summary of BibTeX entry KEY.
+  (save-excursion
+    (bibtex-beginning-of-entry)
+    (if (looking-at bibtex-entry-maybe-empty-head)
+        (kill-new (message "%s" (funcall bibtex-summary-function)))
+      (error "No entry found"))))
+
+(defun bibtex-summary ()
+  "Return summary of current BibTeX entry.
 Used as default value of `bibtex-summary-function'."
   ;; It would be neat to customize this function.  How?
   (save-excursion
-    (if (bibtex-find-entry key t)
+    (if (looking-at bibtex-entry-maybe-empty-head)
         (let* ((bibtex-autokey-name-case-convert 'identity)
                (bibtex-autokey-name-length 'infty)
                (bibtex-autokey-names 1)
@@ -2594,7 +2593,7 @@
                      `((" " . ,names) (" " . ,year) (": " . ,title)
                        (", " . ,journal) (" " . ,volume) (":" . ,pages))
                      ""))
-      (error "Key `%s' not found" key))))
+      (error "Entry not found"))))
 
 (defun bibtex-pop (arg direction)
   "Fill current field from the ARGth same field's text in DIRECTION.
@@ -2743,7 +2742,7 @@
 entries.  This is usually the case, if you have created a buffer completely
 with BibTeX mode and finished every new entry with \\[bibtex-clean-entry].
 
-For third party BibTeX files, call the function `bibtex-convert-alien'
+For third party BibTeX files, call the command \\[bibtex-convert-alien]
 to fully take advantage of all features of BibTeX mode.
 
 
@@ -3346,7 +3345,7 @@
 Move point where the entry KEY should be placed.
 If `bibtex-maintain-sorted-entries' is non-nil, perform a binary
 search to look for place for KEY.  This requires that buffer is sorted,
-see \\[bibtex-validate].)
+see `bibtex-validate'.
 Return t if preparation was successful or nil if entry KEY already exists."
   (let ((key (nth 0 index))
         key-exist)
@@ -3770,7 +3769,7 @@
   "Reinsert the last BibTeX item.
 More precisely, reinsert the field or entry killed or yanked most recently.
 With argument N, reinsert the Nth most recently killed BibTeX item.
-See also the command \\[bibtex-yank-pop]]."
+See also the command \\[bibtex-yank-pop]."
   (interactive "*p")
   (bibtex-insert-kill (1- n))
   (setq this-command 'bibtex-yank))
--- a/lisp/textmodes/ispell.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/textmodes/ispell.el	Thu May 12 03:41:19 2005 +0000
@@ -301,7 +301,9 @@
   :type 'integer
   :group 'ispell)
 
-(defcustom ispell-program-name "ispell"
+(defcustom ispell-program-name
+  (or (locate-file "aspell" exec-path exec-suffixes 'file-executable-p)
+      "ispell")
   "Program invoked by \\[ispell-word] and \\[ispell-region] commands."
   :type 'string
   :group 'ispell)
--- a/lisp/textmodes/org.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/textmodes/org.el	Thu May 12 03:41:19 2005 +0000
@@ -636,7 +636,7 @@
 (defcustom org-cycle-hook '(org-optimize-window-after-visibility-change)
   "Hook that is run after `org-cycle' has changed the buffer visibility.
 The function(s) in this hook must accept a single argument which indicates
-the new state that was set by the most recent `org-cycle' command. The
+the new state that was set by the most recent `org-cycle' command.  The
 argument is a symbol.  After a global state change, it can have the values
 `overview', `content', or `all'.  After a local state change, it can have
 the values `folded', `children', or `subtree'."
@@ -677,8 +677,8 @@
 (defcustom org-show-following-heading t
   "Non-nil means, show heading following match in `org-occur'.
 When doing an `org-occur' it is useful to show the headline which
-follows the match, even if they do not match the regexp. This makes it
-easier to edit directly inside the sparse tree. However, if you use
+follows the match, even if they do not match the regexp.  This makes it
+easier to edit directly inside the sparse tree.  However, if you use
 org-occur mainly as an overview, the following headlines are
 unnecessary clutter."
   :group 'org-structure
@@ -712,7 +712,7 @@
   "Non-nil means, keep link in list for entire session.
 
 The command `org-store-link' adds a link pointing to the current
-location to an internal list. These links accumulate during a session.
+location to an internal list.  These links accumulate during a session.
 The command `org-insert-link' can be used to insert links into any
 Org-mode file (offering completion for all stored links).  When this
 option is nil, every link which has been inserted once using \\[org-insert-link]
@@ -1124,7 +1124,7 @@
   :type 'boolean)
 
 (defcustom org-export-with-tables t
-  "If non-nil, lines starting with \"|\" define a table
+  "If non-nil, lines starting with \"|\" define a table.
 For example:
 
   | Name        | Address  | Birthday  |
@@ -1496,7 +1496,7 @@
       (save-excursion
         (goto-char (point-min))
         (insert "    -*- mode: org -*-\n\n")))
-  (run-hooks 'org-mode-hook)
+  (run-hooks 'org-mode-hook)       ;FIXME: Should be run-mode-hooks.
   (unless org-inhibit-startup
     (if org-startup-with-deadline-check
         (call-interactively 'org-check-deadlines)
@@ -1565,7 +1565,7 @@
   (save-excursion
     (org-back-to-heading t)
     (- (match-end 0) (match-beginning 0))))
-
+    
 (defvar org-font-lock-keywords nil)
 
 (defun org-set-font-lock-defaults ()
@@ -1982,7 +1982,7 @@
 
 (defun org-do-promote ()
   "Promote the current heading higher up the tree.
-If the region is active in t`ransient-mark-mode', promote all headings
+If the region is active in `transient-mark-mode', promote all headings
 in the region."
   (interactive)
   (save-excursion
@@ -2614,7 +2614,7 @@
 
 While prompting, a calendar is popped up - you can also select the
 date with the mouse (button 1).  The calendar shows a period of three
-month. To scroll it to other months, use the keys `>' and `<'.  
+month.  To scroll it to other months, use the keys `>' and `<'.  
 If you don't like the calendar, turn it off with 
        \(setq org-popup-calendar-for-date-prompt nil).
 
@@ -3524,9 +3524,9 @@
   "Get the (Emacs Calendar) diary entries for DATE."
   (let* ((fancy-diary-buffer "*temporary-fancy-diary-buffer*")
          (diary-display-hook '(fancy-diary-display))
-         (list-diary-entries-hook 
+         (list-diary-entries-hook
           (cons 'org-diary-default-entry list-diary-entries-hook))
-         entries tod tods
+         entries
          (org-disable-diary t))
     (save-excursion
       (save-window-excursion
@@ -4367,8 +4367,7 @@
                      (org-agenda-error)))
          (buffer (marker-buffer marker))
          (pos (marker-position marker)))
-    (save-excursion
-      (set-buffer buffer)
+    (with-current-buffer buffer
       (widen)
       (goto-char pos)
       (if (not (org-at-timestamp-p))
@@ -4866,10 +4865,10 @@
                          ((fboundp 'gnus-group-name)
                           (gnus-group-name))
                          (t "???"))))
-        (if (org-xor arg org-usenet-links-prefer-google)
-            (setq link (format "http://groups.google.com/groups?group=%s"
-                               group))
-          (setq link (concat "gnus:" group)))))
+        (setq link (concat (if (org-xor arg org-usenet-links-prefer-google)
+                               "http://groups.google.com/groups?group="
+                             "gnus:")
+                           group))))
 
      ((memq major-mode '(gnus-summary-mode gnus-article-mode))
       (and (eq major-mode 'gnus-article-mode) (gnus-article-show-summary))
@@ -4920,6 +4919,7 @@
 
 (defun org-xor (a b)
   "Exclusive or."
+  ;; (if a (not b) b)
   (or (and a (not b))
       (and b (not a))))
 
@@ -4958,7 +4958,7 @@
   s)
 
 (defun org-insert-link (&optional complete-file)
-  "Insert a link. At the prompt, enter the link.
+  "Insert a link.  At the prompt, enter the link.
 
 Completion can be used to select a link previously stored with
 `org-store-link'.  When the empty string is entered (i.e. if you just
@@ -5586,7 +5586,7 @@
       (error "Not in table data field")))
 
 (defvar org-table-clip nil
-  "Clipboard for table regions")
+  "Clipboard for table regions.")
 
 (defun org-table-blank-field ()
   "Blank the current table field or active region."
@@ -5827,7 +5827,7 @@
   (org-table-move-row 'up))
 
 (defun org-table-move-row (&optional up)
-  "Move the current table line down. With arg UP, move it up."
+  "Move the current table line down.  With arg UP, move it up."
   (interactive "P")
   (let ((col (current-column))
         (pos (point))
@@ -7662,7 +7662,7 @@
     (buffer-substring (point-min) (point-max))))
 
 (defun org-html-expand (string)
-  "Prepare STRING for HTML export. Applies all active conversions."
+  "Prepare STRING for HTML export.  Applies all active conversions."
   ;; First check if there is a link in the line - if yes, apply conversions
   ;; only before the start of the link.
   (let* ((m (string-match org-link-regexp string))
@@ -7697,8 +7697,8 @@
 as single character strings.
 The regexp returned will match the entire expression including the
 delimiters.  It will also define a single group which contains the
-match except for the outermost delimiters. The maximum depth of
-stacked delimiters is N. Escaping delimiters is not possible."
+match except for the outermost delimiters.  The maximum depth of
+stacked delimiters is N.  Escaping delimiters is not possible."
   (let* ((nothing (concat "[^" "\\" left "\\" right "]*?"))
          (or "\\|")
          (re nothing)
@@ -8549,7 +8549,7 @@
       regexp)))
 
 (defun org-flag-heading (flag &optional entry)
-  "Flag the current heading. FLAG non-nil means make invisible.
+  "Flag the current heading.  FLAG non-nil means make invisible.
 When ENTRY is non-nil, show the entire entry."
   (save-excursion
     (org-back-to-heading t)
--- a/lisp/textmodes/po.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/textmodes/po.el	Thu May 12 03:41:19 2005 +0000
@@ -80,14 +80,15 @@
 	    assoc)
        (list (cond
 	      ((setq assoc
-		     (assoc-ignore-case charset
-					po-content-type-charset-alist))
+		     (assoc-string charset
+                                   po-content-type-charset-alist
+                                   t))
 	       (cdr assoc))
-	      ((or (setq assoc (assoc-ignore-case charset coding-system-alist))
+	      ((or (setq assoc (assoc-string charset coding-system-alist t))
 		   (setq assoc
-			 (assoc-ignore-case (subst-char-in-string ?_ ?-
-								  charset)
-					    coding-system-alist)))
+			 (assoc-string (subst-char-in-string ?_ ?-
+                                                             charset)
+                                       coding-system-alist t)))
 	       (intern (car assoc)))
 	      ;; In principle we should also check the `mime-charset'
 	      ;; property of everything in the base coding system
@@ -101,10 +102,10 @@
 	       ;; to require it initially?
 	       (require 'code-pages nil t)
 	       (if (or
-		    (setq assoc (assoc-ignore-case charset coding-system-alist))
-		    (setq assoc (assoc-ignore-case (subst-char-in-string
-						    ?_ ?- charset)
-						   coding-system-alist)))
+		    (setq assoc (assoc-string charset coding-system-alist t))
+		    (setq assoc (assoc-string (subst-char-in-string
+                                               ?_ ?- charset)
+                                              coding-system-alist t)))
 		   (intern (car assoc))
 		 'raw-text))))))))
 
--- a/lisp/tooltip.el	Thu May 12 02:47:44 2005 +0000
+++ b/lisp/tooltip.el	Thu May 12 03:41:19 2005 +0000
@@ -27,9 +27,6 @@
 
 ;;; Code:
 
-(eval-when-compile (require 'cl)) ; for case macro
-
-
 ;;; Customizable settings
 
 (defgroup tooltip nil
@@ -116,42 +113,6 @@
   "Face for tooltips."
   :group 'tooltip)
 
-(defcustom tooltip-gud-tips-p nil
-  "*Non-nil means show tooltips in GUD sessions.
-
-This allows you to display a variable's value in a tooltip simply
-by pointing at it with the mouse.  In the case of a C program
-controlled by GDB, it shows the associated #define directives
-when program is not executing."
-  :type 'boolean
-  :tag "GUD"
-  :group 'tooltip)
-
-(defcustom tooltip-gud-modes '(gud-mode c-mode c++-mode fortran-mode)
-  "List of modes for which to enable GUD tips."
-  :type 'sexp
-  :tag "GUD modes"
-  :group 'tooltip)
-
-(defcustom tooltip-gud-display
-  '((eq (tooltip-event-buffer tooltip-gud-event)
-	(marker-buffer gud-overlay-arrow-position)))
-  "List of forms determining where GUD tooltips are displayed.
-
-Forms in the list are combined with AND.  The default is to display
-only tooltips in the buffer containing the overlay arrow."
-  :type 'sexp
-  :tag "GUD buffers predicate"
-  :group 'tooltip)
-
-(defcustom tooltip-gud-echo-area nil
-  "Use the echo area instead of frames for GUD tooltips."
-  :type 'boolean
-  :tag "Use echo area"
-  :group 'tooltip)
-
-(defvaralias 'tooltip-use-echo-area 'tooltip-gud-echo-area)
-(make-obsolete-variable 'tooltip-use-echo-area 'tooltip-gud-echo-area "22.1")
 
 ;;; Variables that are not customizable.
 
@@ -169,7 +130,6 @@
 (defvar tooltip-hide-time nil
   "Time when the last tooltip was hidden.")
 
-
 ;;; Event accessors
 
 (defun tooltip-event-buffer (event)
@@ -178,7 +138,6 @@
   (let ((window (posn-window (event-end event))))
     (and window (window-buffer window))))
 
-
 ;;; Switching tooltips on/off
 
 ;; We don't set track-mouse globally because this is a big redisplay
@@ -202,16 +161,15 @@
   :group 'tooltip
   (unless (or (null tooltip-mode) (fboundp 'x-show-tip))
     (error "Sorry, tooltips are not yet available on this system"))
-  (let ((hook-fn (if tooltip-mode 'add-hook 'remove-hook)))
-    (funcall hook-fn 'change-major-mode-hook 'tooltip-change-major-mode)
-    (tooltip-activate-mouse-motions-if-enabled)
-    (funcall hook-fn 'pre-command-hook 'tooltip-hide)
-    (funcall hook-fn 'tooltip-hook 'tooltip-gud-tips)
-    (funcall hook-fn 'tooltip-hook 'tooltip-help-tips)
-    (setq show-help-function (if tooltip-mode 'tooltip-show-help-function nil))
-    ;; `ignore' is the default binding for mouse movements.
-    (define-key global-map [mouse-movement]
-      (if tooltip-mode 'tooltip-mouse-motion 'ignore))))
+  (if tooltip-mode
+      (progn
+	(add-hook 'pre-command-hook 'tooltip-hide)
+	(add-hook 'tooltip-hook 'tooltip-help-tips))
+    (unless (and (boundp 'gud-tooltip-mode) gud-tooltip-mode)
+      (remove-hook 'pre-command-hook 'tooltip-hide))
+    (remove-hook 'tooltip-hook 'tooltip-help-tips))
+  (setq show-help-function
+	(if tooltip-mode 'tooltip-show-help-function nil)))
 
 
 ;;; Timeout for tooltip display
@@ -242,49 +200,6 @@
 				    tooltip-last-mouse-motion-event))
 
 
-;;; Reacting on mouse movements
-
-(defun tooltip-change-major-mode ()
-  "Function added to `change-major-mode-hook' when tooltip mode is on."
-  (add-hook 'post-command-hook 'tooltip-activate-mouse-motions-if-enabled))
-
-(defun tooltip-activate-mouse-motions-if-enabled ()
-  "Reconsider for all buffers whether mouse motion events are desired."
-  (remove-hook 'post-command-hook 'tooltip-activate-mouse-motions-if-enabled)
-  (dolist (buffer (buffer-list))
-    (save-excursion
-      (set-buffer buffer)
-      (if (and tooltip-mode
-	       tooltip-gud-tips-p
-	       (memq major-mode tooltip-gud-modes))
-	  (tooltip-activate-mouse-motions t)
-	(tooltip-activate-mouse-motions nil)))))
-
-(defvar tooltip-mouse-motions-active nil
-  "Locally t in a buffer if tooltip processing of mouse motion is enabled.")
-
-(defun tooltip-activate-mouse-motions (activatep)
-  "Activate/deactivate mouse motion events for the current buffer.
-ACTIVATEP non-nil means activate mouse motion events."
-  (if activatep
-      (progn
-	(make-local-variable 'tooltip-mouse-motions-active)
-	(setq tooltip-mouse-motions-active t)
-	(make-local-variable 'track-mouse)
-	(setq track-mouse t))
-    (when tooltip-mouse-motions-active
-      (kill-local-variable 'tooltip-mouse-motions-active)
-      (kill-local-variable 'track-mouse))))
-
-(defun tooltip-mouse-motion (event)
-  "Command handler for mouse movement events in `global-map'."
-  (interactive "e")
-  (tooltip-hide)
-  (when (car (mouse-pixel-position))
-    (setq tooltip-last-mouse-motion-event (copy-sequence event))
-    (tooltip-start-delayed-tip)))
-
-
 ;;; Displaying tips
 
 (defun tooltip-set-param (alist key value)
@@ -396,114 +311,6 @@
     output))
 
 
-;;; Tips for `gud'
-
-(defvar tooltip-gud-original-filter nil
-  "Process filter to restore after GUD output has been received.")
-
-(defvar tooltip-gud-dereference nil
-  "Non-nil means print expressions with a `*' in front of them.
-For C this would dereference a pointer expression.")
-
-(defvar tooltip-gud-event nil
-  "The mouse movement event that led to a tooltip display.
-This event can be examined by forms in TOOLTIP-GUD-DISPLAY.")
-
-(defun tooltip-gud-toggle-dereference ()
-  "Toggle whether tooltips should show `* expr' or `expr'."
-  (interactive)
-  (setq tooltip-gud-dereference (not tooltip-gud-dereference))
-  (when (interactive-p)
-    (message "Dereferencing is now %s."
-	     (if tooltip-gud-dereference "on" "off"))))
-
-(defun tooltip-toggle-gud-tips ()
-  "Toggle the display of GUD tooltips."
-  (interactive)
-  (setq tooltip-gud-tips-p (not tooltip-gud-tips-p))
-  ;; Reconsider for all buffers whether mouse motion events are desired.
-  (tooltip-change-major-mode)
-  (when (interactive-p)
-    (message (format "GUD tooltips %sabled"
-		     (if tooltip-gud-tips-p "en" "dis")))))
-
-; This will only display data that comes in one chunk.
-; Larger arrays (say 400 elements) are displayed in
-; the tootip incompletely and spill over into the gud buffer.
-; Switching the process-filter creates timing problems and
-; it may be difficult to do better. Using annotations as in
-; gdb-ui.el gets round this problem.
-(defun tooltip-gud-process-output (process output)
-  "Process debugger output and show it in a tooltip window."
-  (set-process-filter process tooltip-gud-original-filter)
-  (tooltip-show (tooltip-strip-prompt process output)
-		tooltip-gud-echo-area))
-
-(defun tooltip-gud-print-command (expr)
-  "Return a suitable command to print the expression EXPR.
-If TOOLTIP-GUD-DEREFERENCE is t, also prepend a `*' to EXPR."
-  (when tooltip-gud-dereference
-    (setq expr (concat "*" expr)))
-  (case gud-minor-mode
-    ((gdb gdba) (concat "server print " expr))
-    (dbx (concat "print " expr))
-    (xdb (concat "p " expr))
-    (sdb (concat expr "/"))
-    (perldb expr)))
-
-(defun tooltip-gud-tips (event)
-  "Show tip for identifier or selection under the mouse.
-The mouse must either point at an identifier or inside a selected
-region for the tip window to be shown.  If tooltip-gud-dereference is t,
-add a `*' in front of the printed expression. In the case of a C program
-controlled by GDB, show the associated #define directives when program is
-not executing.
-
-This function must return nil if it doesn't handle EVENT."
-  (let (process)
-    (when (and (eventp event)
-	       tooltip-gud-tips-p
-	       (boundp 'gud-comint-buffer)
-	       gud-comint-buffer
-	       (buffer-name gud-comint-buffer); gud-comint-buffer might be killed
-	       (setq process (get-buffer-process gud-comint-buffer))
-	       (posn-point (event-end event))
-	       (or (eq gud-minor-mode 'gdba)
-		   (progn (setq tooltip-gud-event event)
-			  (eval (cons 'and tooltip-gud-display)))))
-      (let ((expr (tooltip-expr-to-print event)))
-	(when expr
-	  (if (and (eq gud-minor-mode 'gdba)
-		   (not gdb-active-process))
-	      (progn
-		(with-current-buffer
-		    (window-buffer (let ((mouse (mouse-position)))
-				     (window-at (cadr mouse)
-						(cddr mouse))))
-		  (let ((define-elt (assoc expr gdb-define-alist)))
-		    (unless (null define-elt)
-		      (tooltip-show (cdr define-elt))
-		      expr))))
-	    (let ((cmd (tooltip-gud-print-command expr)))
-	      (unless (null cmd) ; CMD can be nil if unknown debugger
-		(case gud-minor-mode
-		  (gdba (gdb-enqueue-input
-			 (list  (concat cmd "\n") 'gdb-tooltip-print)))
-		  (t
-		   (setq tooltip-gud-original-filter (process-filter process))
-		   (set-process-filter process 'tooltip-gud-process-output)
-	       	  (gud-basic-call cmd)))
-		expr))))))))
-
-(defun gdb-tooltip-print ()
-  (tooltip-show
-   (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
-     (let ((string (buffer-string)))
-       ;; remove newline for tooltip-gud-echo-area
-       (substring string 0 (- (length string) 1))))
-   tooltip-gud-echo-area))
-
-
 ;;; Tooltip help.
 
 (defvar tooltip-help-message nil
--- a/lispref/ChangeLog	Thu May 12 02:47:44 2005 +0000
+++ b/lispref/ChangeLog	Thu May 12 03:41:19 2005 +0000
@@ -1,3 +1,48 @@
+2005-05-12  Lute Kamstra  <lute@gnu.org>
+
+	* elisp.texi (Top): Update to the current structure of the manual.
+	* processes.texi (Processes): Add menu description.
+	* customize.texi (Customization): Add menu descriptions.
+
+2005-05-11  Thien-Thi Nguyen  <ttn@gnu.org>
+
+	* processes.texi (Signals to Processes)
+	(Low-Level Network): Fix typos.
+
+2005-05-11  Lute Kamstra  <lute@gnu.org>
+
+	* elisp.texi (Top): Add some nodes from the chapter "Major and
+	Minor Modes" to the detailed node listing.
+
+2005-05-10  Richard M. Stallman  <rms@gnu.org>
+
+	* keymaps.texi (Extended Menu Items): Menu item filter functions
+	can be called at any time.
+
+2005-05-08  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* variables.texi (File Local Variables): `(hack-local-variables t)'
+	now also checks whether a mode is specified in the local variables
+	list.
+
+2005-05-05  Kevin Ryde  <user42@zip.com.au>
+
+	* display.texi (The Echo Area): Correct format function cross
+	reference.
+
+2005-05-05  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* variables.texi (Variable Aliases): Change description of
+	`define-obsolete-variable-alias'.
+
+	* functions.texi (Functions): Add "Obsolete Functions" to menu.
+	(Defining Functions): Add xref.
+	(Obsolete Functions): New node.
+	(Function Safety): Standardize capitalization of section title.
+
+	* frames.texi (Pop-Up Menus): Complete description of `x-popup-menu'.
+	(Dialog Boxes): Complete description of `x-popup-dialog'.
+
 2005-05-04  Richard M. Stallman  <rms@gnu.org>
 
 	* commands.texi (Interactive Codes): Fix Texinfo usage.
--- a/lispref/customize.texi	Thu May 12 02:47:44 2005 +0000
+++ b/lispref/customize.texi	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+@c Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005 Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../info/customize
 @node Customization, Loading, Macros, Top
@@ -12,10 +12,11 @@
 definitions---as well as face definitions (@pxref{Defining Faces}).
 
 @menu
-* Common Keywords::
-* Group Definitions::
-* Variable Definitions::
-* Customization Types::
+* Common Keywords::      Common keyword arguments for all kinds of 
+                           customization declarations.
+* Group Definitions::    Writing customization group definitions.
+* Variable Definitions:: Declaring user options.
+* Customization Types::  Specifying the type of a user option.
 @end menu
 
 @node Common Keywords
--- a/lispref/display.texi	Thu May 12 02:47:44 2005 +0000
+++ b/lispref/display.texi	Thu May 12 03:41:19 2005 +0000
@@ -200,7 +200,7 @@
 @defun message string &rest arguments
 This function displays a message in the echo area.  The
 argument @var{string} is similar to a C language @code{printf} control
-string.  See @code{format} in @ref{String Conversion}, for the details
+string.  See @code{format} in @ref{Formatting Strings}, for the details
 on the conversion specifications.  @code{message} returns the
 constructed string.
 
--- a/lispref/elisp.texi	Thu May 12 02:47:44 2005 +0000
+++ b/lispref/elisp.texi	Thu May 12 03:41:19 2005 +0000
@@ -101,7 +101,6 @@
 
 @menu
 * Introduction::            Introduction and conventions used.
-* Standards: Coding Conventions.    Coding conventions for Emacs Lisp.
 
 * Lisp Data Types::         Data types of objects in Emacs Lisp.
 * Numbers::                 Numbers and arithmetic functions.
@@ -184,6 +183,7 @@
 * Caveats::                 Flaws and a request for help.
 * Lisp History::            Emacs Lisp is descended from Maclisp.
 * Conventions::             How the manual is formatted.
+* Version Info::            Which Emacs version is running?
 * Acknowledgements::        The authors, editors, and sponsors of this manual.
 
 Conventions
@@ -196,14 +196,6 @@
 * Buffer Text Notation::    The format we use for buffer contents in examples.
 * Format of Descriptions::  Notation for describing functions, variables, etc.
 
-Tips and Conventions
-
-* Coding Conventions::      Conventions for clean and robust programs.
-* Compilation Tips::        Making compiled code run fast.
-* Documentation Tips::      Writing readable documentation strings.
-* Comment Tips::	    Conventions for writing comments.
-* Library Headers::         Standard headers for library packages.
-
 Format of Descriptions
 
 * A Sample Function Description::
@@ -215,6 +207,7 @@
 * Comments::                Comments and their formatting conventions.
 * Programming Types::       Types found in all Lisp systems.
 * Editing Types::           Types specific to Emacs.
+* Circular Objects::            Read syntax for circular structure.
 * Type Predicates::         Tests related to types.
 * Equality Predicates::     Tests of equality between any two objects.
 
@@ -224,13 +217,16 @@
 * Floating Point Type:: Numbers with fractional parts and with a large range.
 * Character Type::      The representation of letters, numbers and
                           control characters.
+* Symbol Type::         A multi-use object that refers to a function,
+                        variable, property list, or itself.
 * Sequence Type::       Both lists and arrays are classified as sequences.
 * Cons Cell Type::      Cons cells, and lists (which are made from cons cells).
 * Array Type::          Arrays include strings and vectors.
 * String Type::         An (efficient) array of characters.
 * Vector Type::         One-dimensional arrays.
-* Symbol Type::         A multi-use object that refers to a function,
-                        variable, property list, or itself.
+* Char-Table Type::     One-dimensional sparse arrays indexed by characters.
+* Bool-Vector Type::    One-dimensional arrays of @code{t} or @code{nil}.
+* Hash Table Type::     Super-fast lookup tables.
 * Function Type::       A piece of executable code you can call from elsewhere.
 * Macro Type::          A method of expanding an expression into another
                           expression, more fundamental but less pretty.
@@ -239,17 +235,20 @@
 * Autoload Type::       A type used for automatically loading seldom-used
                           functions.
 
-List Type
+Cons Cell and List Types
 
+* Box Diagrams::            Drawing pictures of lists.
 * Dotted Pair Notation::    An alternative syntax for lists.
 * Association List Type::   A specially constructed list.
 
 Editing Types
 
 * Buffer Type::             The basic object of editing.
+* Marker Type::             A position in a buffer.
 * Window Type::             What makes buffers visible.
+* Frame Type::		    Windows subdivide frames.
 * Window Configuration Type::Save what the screen looks like.
-* Marker Type::             A position in a buffer.
+* Frame Configuration Type::Recording the status of all frames.
 * Process Type::            A process running on the underlying OS.
 * Stream Type::             Receive or send characters.
 * Keymap Type::             What function a keystroke invokes.
@@ -261,9 +260,10 @@
 * Float Basics::	      Representation and range of floating point.
 * Predicates on Numbers::     Testing for numbers.
 * Comparison of Numbers::     Equality and inequality predicates.
+* Numeric Conversions::	      Converting float to integer and vice versa.
 * Arithmetic Operations::     How to add, subtract, multiply and divide.
+* Rounding Operations::       Explicitly rounding floating point numbers.
 * Bitwise Operations::        Logical and, or, not, shifting.
-* Numeric Conversions::	      Converting float to integer and vice versa.
 * Math Functions::            Trig, exponential and logarithmic functions.
 * Random Numbers::            Obtaining random integers, predictable or not.
 
@@ -272,10 +272,12 @@
 * String Basics::           Basic properties of strings and characters.
 * Predicates for Strings::  Testing whether an object is a string or char.
 * Creating Strings::        Functions to allocate new strings.
+* Modifying Strings::         Altering the contents of an existing string.
 * Text Comparison::         Comparing characters or strings.
 * String Conversion::       Converting characters or strings and vice versa.
 * Formatting Strings::      @code{format}: Emacs's analogue of @code{printf}.
 * Case Conversion::         Case conversion functions.
+* Case Tables::		      Customizing case conversion.
 
 Lists
 
@@ -300,6 +302,16 @@
 * Arrays::                  Characteristics of arrays in Emacs Lisp.
 * Array Functions::         Functions specifically for arrays.
 * Vectors::                 Functions specifically for vectors.
+* Vector Functions::        Functions specifically for vectors.
+* Char-Tables::             How to work with char-tables.
+* Bool-Vectors::            How to work with bool-vectors.
+
+Hash Tables
+
+* Creating Hash::           Functions to create hash tables.
+* Hash Access::             Reading and writing the hash table contents.
+* Defining Hash::           Defining new comparison methods
+* Other Hash::              Miscellaneous.
 
 Symbols
 
@@ -313,16 +325,18 @@
 Evaluation
 
 * Intro Eval::              Evaluation in the scheme of things.
-* Eval::                    How to invoke the Lisp interpreter explicitly.
 * Forms::                   How various sorts of objects are evaluated.
 * Quoting::                 Avoiding evaluation (to put constants in
                               the program).
+* Eval::                    How to invoke the Lisp interpreter explicitly.
 
 Kinds of Forms
 
 * Self-Evaluating Forms::   Forms that evaluate to themselves.
 * Symbol Forms::            Symbols evaluate as variables.
 * Classifying Lists::       How to distinguish various sorts of list forms.
+* Function Indirection::    When a symbol appears as the car of a list,
+			      we find the real function via the symbol.
 * Function Forms::          Forms that call functions.
 * Macro Forms::             Forms that call macros.
 * Special Forms::           ``Special forms'' are idiosyncratic primitives,
@@ -333,7 +347,7 @@
 Control Structures
 
 * Sequencing::              Evaluation in textual order.
-* Conditionals::            @code{if}, @code{cond}.
+* Conditionals::            @code{if}, @code{cond}, @code{when}, @code{unless}.
 * Combining Conditions::    @code{and}, @code{or}, @code{not}.
 * Iteration::               @code{while} loops.
 * Nonlocal Exits::          Jumping out of a sequence.
@@ -360,11 +374,19 @@
 * Local Variables::         Variable values that exist only temporarily.
 * Void Variables::          Symbols that lack values.
 * Defining Variables::      A definition says a symbol is used as a variable.
+* Tips for Defining::       Things you should think about when you
+                              define a variable.
 * Accessing Variables::     Examining values of variables whose names
                               are known only at run time.
 * Setting Variables::       Storing new values in variables.
 * Variable Scoping::        How Lisp chooses among local and global values.
 * Buffer-Local Variables::  Variable values in effect only in one buffer.
+* Frame-Local Variables::   Variable values in effect only in one frame.
+* Future Local Variables::  New kinds of local values we might add some day.
+* Variable Aliases::        Variables that are aliases for other variables.
+* File Local Variables::    Handling local variable lists in files.
+* Variables with Restricted Values::  Non-constant variables whose value can
+                                        @emph{not} be an arbitrary Lisp object.
 
 Scoping Rules for Variable Bindings
 
@@ -393,6 +415,9 @@
 * Anonymous Functions::     Lambda-expressions are functions with no names.
 * Function Cells::          Accessing or setting the function definition
                               of a symbol.
+* Obsolete Functions::      Declaring functions obsolete.
+* Inline Functions::	    Defining functions that the compiler will open code.
+* Function Safety::         Determining whether a function is safe to call.
 * Related Topics::          Cross-references to specific Lisp primitives
                               that have a special bearing on how
                               functions work.
@@ -415,6 +440,14 @@
                               Don't hide the user's variables.
 * Indenting Macros::        Specifying how to indent macro calls.
 
+Writing Customization Definitions
+
+* Common Keywords::         Common keyword arguments for all kinds of
+                              customization declarations.
+* Group Definitions::       Writing customization group definitions.
+* Variable Definitions::    Declaring user options.
+* Customization Types::     Specifying the type of a user option.
+
 Loading
 
 * How Programs Do Loading:: The @code{load} function and others.
@@ -430,13 +463,20 @@
 
 Byte Compilation
 
+* Speed of Byte-Code::      An example of speedup from byte compilation.
 * Compilation Functions::   Byte compilation functions.
+* Docs and Compilation::    Dynamic loading of documentation strings.
+* Dynamic Loading::         Dynamic loading of individual functions.
+* Eval During Compile::     Code to be evaluated when you compile.
+* Compiler Errors::         Handling compiler error messages.
+* Byte-Code Objects::	    The data type used for byte-compiled functions.
 * Disassembly::             Disassembling byte-code; how to read byte-code.
 
-Advising Functions
+Advising Emacs Lisp Functions
 
 * Simple Advice::           A simple example to explain the basics of advice.
 * Defining Advice::         Detailed description of @code{defadvice}.
+* Around-Advice::           Wrapping advice around a function's definition.
 * Computed Advice::         ...is to @code{defadvice} as @code{fset} is to @code{defun}.
 * Activation of Advice::    Advice doesn't do anything until you activate it.
 * Enabling Advice::         You can enable or disable each piece of advice.
@@ -449,14 +489,16 @@
 Debugging Lisp Programs
 
 * Debugger::                How the Emacs Lisp debugger is implemented.
+* Edebug::                  A source-level Emacs Lisp debugger.
 * Syntax Errors::           How to find syntax errors.
+* Test Coverage::           Ensuring you have tested all branches in your code.
 * Compilation Errors::      How to find errors that show up in
                               byte compilation.
-* Edebug::                  A source-level Emacs Lisp debugger.
 
 The Lisp Debugger
 
 * Error Debugging::         Entering the debugger when an error happens.
+* Infinite Loops::	    Stopping and debugging a program that doesn't exit.
 * Function Debugging::      Entering it when a certain function is called.
 * Explicit Debug::          Entering it at a certain point in the program.
 * Using Debugger::          What the debugger does; what you see while in it.
@@ -464,6 +506,27 @@
 * Invoking the Debugger::   How to call the function @code{debug}.
 * Internals of Debugger::   Subroutines of the debugger, and global variables.
 
+Edebug
+
+* Using Edebug::	    Introduction to use of Edebug.
+* Instrumenting::	    You must instrument your code
+			      in order to debug it with Edebug.
+* Edebug Execution Modes::  Execution modes, stopping more or less often.
+* Jumping::		    Commands to jump to a specified place.
+* Edebug Misc::		    Miscellaneous commands.
+* Breakpoints::		    Setting breakpoints to make the program stop.
+* Trapping Errors::	    Trapping errors with Edebug.
+* Edebug Views::	    Views inside and outside of Edebug.
+* Edebug Eval::		    Evaluating expressions within Edebug.
+* Eval List::		    Expressions whose values are displayed
+			      each time you enter Edebug.
+* Printing in Edebug::	    Customization of printing.
+* Trace Buffer::	    How to produce trace output in a buffer.
+* Coverage Testing::	    How to test evaluation coverage.
+* The Outside Context::	    Data that Edebug saves and restores.
+* Instrumenting Macro Calls:: Specifying how to handle macro calls.
+* Edebug Options::	    Option variables for customizing Edebug.
+
 Debugging Invalid Lisp Syntax
 
 * Excess Open::             How to find a spurious open paren or missing close.
@@ -478,14 +541,21 @@
 * Output Streams::          Various data types that can be used as
                               output streams.
 * Output Functions::        Functions to print Lisp objects as text.
+* Output Variables::        Variables that control what the printing
+                              functions do.
 
 Minibuffers
 
 * Intro to Minibuffers::    Basic information about minibuffers.
 * Text from Minibuffer::    How to read a straight text string.
 * Object from Minibuffer::  How to read a Lisp object or expression.
+* Minibuffer History::	    Recording previous minibuffer inputs
+			      so the user can reuse them.
+* Initial Input::           Specifying initial contents for the minibuffer.
 * Completion::              How to invoke and customize completion.
 * Yes-or-No Queries::       Asking a question with a simple answer.
+* Multiple Queries::	    Asking a series of similar questions.
+* Reading a Password::	    Reading a password from the terminal.
 * Minibuffer Misc::         Various customization hooks and variables.
 
 Completion
@@ -505,8 +575,10 @@
 * Defining Commands::   Specifying how a function should read arguments.
 * Interactive Call::    Calling a command, so that it will read arguments.
 * Command Loop Info::   Variables set by the command loop for you to examine.
+* Adjusting Point::     Adjustment of point after a command.
 * Input Events::	What input looks like when you read it.
 * Reading Input::       How to read input events from the keyboard or mouse.
+* Special Events::      Events processed immediately and individually.
 * Waiting::             Waiting for user input or elapsed time.
 * Quitting::            How @kbd{C-g} works.  How to catch or defer quitting.
 * Prefix Command Arguments::    How the commands to set prefix args work.
@@ -531,8 +603,6 @@
 * Inheritance and Keymaps::	How one keymap can inherit the bindings
 				  of another keymap.
 * Prefix Keys::                 Defining a key with a keymap as its definition.
-* Menu Keymaps::		A keymap can define a menu for X
-				  or for use from the terminal.
 * Active Keymaps::	        Each buffer has a local keymap
                                   to override the standard (global) bindings.
 				  Each minor mode can also override them.
@@ -542,12 +612,19 @@
 * Remapping Commands::          Bindings that translate one command to another.
 * Key Binding Commands::        Interactive interfaces for redefining keys.
 * Scanning Keymaps::            Looking through all keymaps, for printing help.
+* Menu Keymaps::		A keymap can define a menu for X
+				  or for use from the terminal.
 
 Major and Minor Modes
 
 * Major Modes::             Defining major modes.
 * Minor Modes::             Defining minor modes.
 * Mode Line Format::        Customizing the text that appears in the mode line.
+* Imenu::                   How a mode can provide a menu
+                              of definitions in the buffer.
+* Font Lock Mode::          How modes can highlight text according to syntax.
+* Desktop Save Mode::       How modes can have buffer state saved between
+                              Emacs sessions.
 * Hooks::                   How to use hooks; how to write code that
                               provides hooks.
 
@@ -557,17 +634,26 @@
 * Example Major Modes::     Text mode and Lisp modes.
 * Auto Major Mode::         How Emacs chooses the major mode automatically.
 * Mode Help::               Finding out how to use a mode.
+* Derived Modes::           Defining a new major mode based on another major
+                              mode.
+* Generic Modes::           Defining a simple major mode that supports
+                              comment syntax and Font Lock mode.
+* Mode Hooks::              Hooks run at the end of major mode functions.
 
 Minor Modes
 
 * Minor Mode Conventions::  Tips for writing a minor mode.
 * Keymaps and Minor Modes:: How a minor mode can have its own keymap.
+* Defining Minor Modes::    A convenient facility for defining minor modes.
 
 Mode Line Format
 
 * Mode Line Data::          The data structure that controls the mode line.
 * Mode Line Variables::     Variables used in that data structure.
 * %-Constructs::            Putting information into a mode line.
+* Properties in Mode::      Using text properties in the mode line.
+* Header Lines::            Like a mode line, but at the top.
+* Emulating Mode Line::     Formatting text as the mode line would.
 
 Documentation
 
@@ -586,11 +672,15 @@
 * Reading from Files::      Reading files into other buffers.
 * Writing to Files::        Writing new files from parts of buffers.
 * File Locks::              Locking and unlocking files, to prevent
-                                simultaneous editing by two people.
-* Information about Files::   Testing existence, accessibility, size of files.
-* Contents of Directories::   Getting a list of the files in a directory.
+                              simultaneous editing by two people.
+* Information about Files:: Testing existence, accessibility, size of files.
 * Changing Files::          Renaming files, changing protection, etc.
 * File Names::              Decomposing and expanding file names.
+* Contents of Directories:: Getting a list of the files in a directory.
+* Create/Delete Dirs::	    Creating and Deleting Directories.
+* Magic File Names::	    Defining "magic" special handling
+			      for certain file names.
+* Format Conversion::       Conversion to and from various file formats.
 
 Visiting Files
 
@@ -600,19 +690,22 @@
 Information about Files
 
 * Testing Accessibility::   Is a given file readable?  Writable?
-* Kinds of Files::          Is it a directory?  A link?
+* Kinds of Files::          Is it a directory?  A symbolic link?
+* Truenames::		    Eliminating symbolic links from a file name.
 * File Attributes::         How large is it?  Any other names?  Etc.
 
 File Names
 
 * File Name Components::    The directory part of a file name, and the rest.
+* Relative File Names::     Some file names are relative to a
+                              current directory.
 * Directory Names::         A directory's name as a directory
                               is different from its name as a file.
-* Relative File Names::     Some file names are relative to a
-                              current directory.
 * File Name Expansion::     Converting relative file names to absolute ones.
 * Unique File Names::       Generating names for temporary files.
 * File Name Completion::    Finding the completions for a given file name.
+* Standard File Names::     If your package uses a fixed file name,
+                              how to handle various operating systems simply.
 
 Backups and Auto-Saving
 
@@ -634,6 +727,8 @@
 Buffers
 
 * Buffer Basics::           What is a buffer?
+* Current Buffer::          Designating a buffer as current
+                              so primitives will access its contents.
 * Buffer Names::            Accessing and changing buffer names.
 * Buffer File Name::        The buffer file name indicates which file
                               is visited.
@@ -645,8 +740,9 @@
 * The Buffer List::         How to look at all the existing buffers.
 * Creating Buffers::        Functions that create buffers.
 * Killing Buffers::         Buffers exist until explicitly killed.
-* Current Buffer::          Designating a buffer as current
-                              so primitives will access its contents.
+* Indirect Buffers::        An indirect buffer shares text with some
+                              other buffer.
+* Buffer Gap::              The gap in the buffer.
 
 Windows
 
@@ -658,14 +754,20 @@
 * Buffers and Windows::     Each window displays the contents of a buffer.
 * Displaying Buffers::      Higher-lever functions for displaying a buffer
                               and choosing a window for it.
+* Choosing Window::	    How to choose a window for displaying a buffer.
 * Window Point::            Each window has its own location of point.
 * Window Start::            The display-start position controls which text
                               is on-screen in the window.
-* Vertical Scrolling::      Moving text up and down in the window.
-* Horizontal Scrolling::    Moving text sideways on the window.
+* Textual Scrolling::       Moving text up and down through the window.
+* Vertical Scrolling::      Moving the contents up and down on the window.
+* Horizontal Scrolling::    Moving the contents sideways on the window.
 * Size of Window::          Accessing the size of a window.
 * Resizing Windows::        Changing the size of a window.
+* Coordinates and Windows:: Converting coordinates to windows.
 * Window Configurations::   Saving and restoring the state of the screen.
+* Window Hooks::            Hooks for scrolling, window size changes,
+                              redisplay going past a certain point,
+                              or window configuration changes.
 
 Frames
 
@@ -690,6 +792,7 @@
 * Pointer Shapes::          Specifying the shape of the mouse pointer.
 * Window System Selections::Transferring text to and from other windows.
 * Color Names::	            Getting the definitions of color names.
+* Text Terminal Colors::    Defining colors for text-only terminals.
 * Resources::		    Getting resource values from the server.
 * Display Feature Testing:: Determining the features of a terminal.
 
@@ -715,8 +818,10 @@
 * Overview of Markers::     The components of a marker, and how it relocates.
 * Predicates on Markers::   Testing whether an object is a marker.
 * Creating Markers::        Making empty markers or markers at certain places.
-* Information from Markers::  Finding the marker's buffer or character
-                                position.
+* Information from Markers::Finding the marker's buffer or character
+                              position.
+* Marker Insertion Types::  Two ways a marker can relocate when you
+                              insert where it points.
 * Moving Markers::          Moving the marker to a new buffer or position.
 * The Mark::                How ``the mark'' is implemented with a marker.
 * The Region::              How to access ``the region''.
@@ -725,6 +830,7 @@
 
 * Near Point::              Examining text in the vicinity of point.
 * Buffer Contents::         Examining text in a general fashion.
+* Comparing Text::          Comparing substrings of buffers.
 * Insertion::               Adding new text to a buffer.
 * Commands for Insertion::  User-level commands to insert text.
 * Deletion::                Removing text from a buffer.
@@ -732,21 +838,25 @@
 * The Kill Ring::           Where removed text sometimes is saved for
                               later use.
 * Undo::                    Undoing changes to the text of a buffer.
-* Auto Filling::            How auto-fill mode is implemented to break lines.
+* Maintaining Undo::        How to enable and disable undo information.
+			      How to control how much information is kept.
 * Filling::                 Functions for explicit filling.
 * Margins::                 How to specify margins for filling commands.
+* Adaptive Fill::           Adaptive Fill mode chooses a fill prefix
+                              from context.
+* Auto Filling::            How auto-fill mode is implemented to break lines.
 * Sorting::                 Functions for sorting parts of the buffer.
+* Columns::                 Computing horizontal positions, and using them.
 * Indentation::             Functions to insert or adjust indentation.
-* Columns::                 Computing horizontal positions, and using them.
 * Case Changes::            Case conversion of parts of the buffer.
 * Text Properties::         Assigning Lisp property lists to text characters.
 * Substitution::            Replacing a given character wherever it appears.
 * Transposition::           Swapping two portions of a buffer.
 * Registers::               How registers are implemented.  Accessing
                               the text or position stored in a register.
-* Atomic Changes::          Installing several buffer changes ``atomically''.
 * Base 64::                 Conversion to or from base 64 encoding.
 * MD5 Checksum::            Compute the MD5 ``message digest''/``checksum''.
+* Atomic Changes::          Installing several buffer changes ``atomically''.
 * Change Hooks::            Supplying functions to be run when text is changed.
 
 The Kill Ring
@@ -782,6 +892,7 @@
                               only when text is examined.
 * Clickable Text::          Using text properties to make regions of text
                               do something when you click on them.
+* Links and Mouse-1::       How to make @key{Mouse-1} follow a link.
 * Fields::                  The @code{field} property defines
                               fields within the buffer.
 * Not Intervals::	    Why text properties do not use
@@ -810,25 +921,31 @@
 * String Search::           Search for an exact match.
 * Regular Expressions::     Describing classes of strings.
 * Regexp Search::           Searching for a match for a regexp.
+* POSIX Regexps::           Searching POSIX-style for the longest match.
+* Search and Replace::	    Internals of @code{query-replace}.
 * Match Data::              Finding out which part of the text matched
                               various parts of a regexp, after regexp search.
-* Saving Match Data::       Saving and restoring this information.
+* Searching and Case::      Case-independent or case-significant searching.
 * Standard Regexps::        Useful regexps for finding sentences, pages,...
-* Searching and Case::      Case-independent or case-significant searching.
 
 Regular Expressions
 
 * Syntax of Regexps::       Rules for writing regular expressions.
 * Regexp Example::          Illustrates regular expression syntax.
+* Regexp Functions::        Functions for operating on regular expressions.
 
 Syntax Tables
 
+* Syntax Basics::           Basic concepts of syntax tables.
 * Syntax Descriptors::      How characters are classified.
 * Syntax Table Functions::  How to create, examine and alter syntax tables.
+* Syntax Properties::       Overriding syntax with text properties.
+* Motion and Syntax::	    Moving over characters with certain syntaxes.
 * Parsing Expressions::     Parsing balanced expressions
                               using the syntax table.
 * Standard Syntax Tables::  Syntax tables used by various major modes.
 * Syntax Table Internals::  How syntax table information is stored.
+* Categories::              Another way of classifying character syntax.
 
 Syntax Descriptors
 
@@ -838,15 +955,16 @@
 Abbrevs And Abbrev Expansion
 
 * Abbrev Mode::             Setting up Emacs for abbreviation.
-* Tables: Abbrev Tables.    Creating and working with abbrev tables.
+* Abbrev Tables::           Creating and working with abbrev tables.
 * Defining Abbrevs::        Specifying abbreviations and their expansions.
-* Files: Abbrev Files.      Saving abbrevs in files.
-* Expansion: Abbrev Expansion.  Controlling expansion; expansion subroutines.
+* Abbrev Files::            Saving abbrevs in files.
+* Abbrev Expansion::        Controlling expansion; expansion subroutines.
 * Standard Abbrev Tables::  Abbrev tables used by various major modes.
 
 Processes
 
 * Subprocess Creation::     Functions that start subprocesses.
+* Shell Arguments::         Quoting an argument to pass it to a shell.
 * Synchronous Processes::   Details of using synchronous subprocesses.
 * Asynchronous Processes::  Starting up an asynchronous subprocess.
 * Deleting Processes::      Eliminating an asynchronous subprocess.
@@ -856,7 +974,13 @@
                               an asynchronous subprocess.
 * Output from Processes::   Collecting output from an asynchronous subprocess.
 * Sentinels::               Sentinels run when process run-status changes.
+* Query Before Exit::       Whether to query if exiting will kill a process.
+* Transaction Queues::      Transaction-based communication with subprocesses.
 * Network::                 Opening network connections.
+* Network Servers::         Network servers let Emacs accept net connections.
+* Datagrams::               UDP network connections.
+* Low-Level Network::       Lower-level but more general function
+                              to create connections and servers.
 
 Receiving Output from Processes
 
@@ -865,14 +989,53 @@
 * Decoding Output::         Filters can get unibyte or multibyte strings.
 * Accepting Output::        How to wait until process output arrives.
 
+Emacs Display
+
+* Refresh Screen::          Clearing the screen and redrawing everything on it.
+* Forcing Redisplay::       Forcing redisplay.
+* Truncation::              Folding or wrapping long text lines.
+* The Echo Area::           Where messages are displayed.
+* Warnings::                Displaying warning messages for the user.
+* Progress::                Informing user about progress of a long operation.
+* Invisible Text::          Hiding part of the buffer text.
+* Selective Display::       Hiding part of the buffer text.
+* Temporary Displays::      Displays that go away automatically.
+* Overlays::		    Use overlays to highlight parts of the buffer.
+* Width::                   How wide a character or string is on the screen.
+* Line Height::             Controlling the height of lines.
+* Faces::		    A face defines a graphics style
+                              for text characters: font, colors, etc.
+* Fringes::                 Controlling window fringes.
+* Scroll Bars::             Controlling vertical scroll bars.
+* Pointer Shape::           Controlling the mouse pointer shape.
+* Display Property::        Enabling special display features.
+* Images::                  Displaying images in Emacs buffers.
+* Buttons::                 Adding clickable buttons to Emacs buffers.
+* Blinking::                How Emacs shows the matching open parenthesis.
+* Inverse Video::	    Specifying how the screen looks.
+* Usual Display::	    The usual conventions for displaying nonprinting chars.
+* Display Tables::	    How to specify other conventions.
+* Beeping::                 Audible signal to the user.
+* Window Systems::          Which window system is being used.
+
 Operating System Interface
 
 * Starting Up::             Customizing Emacs start-up processing.
 * Getting Out::             How exiting works (permanent or temporary).
 * System Environment::      Distinguish the name and kind of system.
+* User Identification::     Finding the name and user id of the user.
+* Time of Day::		    Getting the current time.
+* Time Conversion::         Converting a time from numeric form to a string, or
+                              to calendrical data (or vice versa).
+* Processor Run Time::      Getting the run time used by Emacs.
+* Time Calculations::       Adding, subtracting, comparing times, etc.
+* Timers::		    Setting a timer to call a function at a certain time.
 * Terminal Input::          Recording terminal input for debugging.
 * Terminal Output::         Recording terminal output for debugging.
+* Sound Output::            Playing sounds on the computer's speaker.
+* X11 Keysyms::             Operating on key symbols for X Windows
 * Batch Mode::              Running Emacs without terminal interaction.
+* Session Management::      Saving and restoring state with X Session Management.
 
 Starting Up Emacs
 
@@ -887,36 +1050,22 @@
 * Killing Emacs::           Exiting Emacs irreversibly.
 * Suspending Emacs::        Exiting Emacs reversibly.
 
-Emacs Display
+Tips and Conventions
 
-* Refresh Screen::          Clearing the screen and redrawing everything on it.
-* Truncation::              Folding or wrapping long text lines.
-* The Echo Area::           Where messages are displayed.
-* Warnings::                Displaying warning messages for the user.
-* Selective Display::       Hiding part of the buffer text.
-* Overlay Arrow::           Display of an arrow to indicate position.
-* Temporary Displays::      Displays that go away automatically.
-* Overlays::		    Use overlays to highlight parts of the buffer.
-* Width::                   How wide a character or string is on the screen.
-* Faces::		    A face defines a graphics style
-                              for text characters: font, colors, etc.
-* Fringes::                 Controlling window fringes.
-* Display Property::        Enabling special display features.
-* Images::                  Displaying images in Emacs buffers.
-* Blinking::                How Emacs shows the matching open parenthesis.
-* Inverse Video::	    Specifying how the screen looks.
-* Usual Display::	    The usual conventions for displaying nonprinting chars.
-* Display Tables::	    How to specify other conventions.
-* Beeping::                 Audible signal to the user.
-* Window Systems::          Which window system is being used.
+* Coding Conventions::      Conventions for clean and robust programs.
+* Compilation Tips::        Making compiled code run fast.
+* Documentation Tips::      Writing readable documentation strings.
+* Comment Tips::	    Conventions for writing comments.
+* Library Headers::         Standard headers for library packages.
 
 GNU Emacs Internals
 
 * Building Emacs::          How to preload Lisp libraries into Emacs.
 * Pure Storage::            A kludge to make preloaded Lisp functions sharable.
 * Garbage Collection::      Reclaiming space for Lisp objects no longer used.
+* Memory Usage::            Info about total size of Lisp objects made so far.
+* Writing Emacs Primitives::  Writing C code for Emacs.
 * Object Internals::        Data formats of buffers, windows, processes.
-* Writing Emacs Primitives::  Writing C code for Emacs.
 
 Object Internals
 
--- a/lispref/frames.texi	Thu May 12 02:47:44 2005 +0000
+++ b/lispref/frames.texi	Thu May 12 03:41:19 2005 +0000
@@ -1402,6 +1402,13 @@
 where @var{line} is a string, and @var{value} is the value to return if
 that @var{line} is chosen.  An item can also be a string; this makes a
 non-selectable line in the menu.
+
+If the user gets rid of the menu without making a valid choice, for
+instance by clicking the mouse away from a valid choice or by typing
+keyboard input, then this normally results in a quit and
+@code{x-popup-menu} does not return.  But if @var{position} is a mouse
+button event (indicating that the user invoked the menu with the
+mouse) then no quit occurs and @code{x-popup-menu} returns @code{nil}.
 @end defun
 
   @strong{Usage note:} Don't use @code{x-popup-menu} to display a menu
@@ -1470,6 +1477,10 @@
 In some configurations, Emacs cannot display a real dialog box; so
 instead it displays the same items in a pop-up menu in the center of the
 frame.
+
+If the user gets rid of the dialog box without making a valid choice,
+for instance using the window manager, then this produces a quit and
+@code{x-popup-dialog} does not return.
 @end defun
 
 @node Pointer Shapes
--- a/lispref/functions.texi	Thu May 12 02:47:44 2005 +0000
+++ b/lispref/functions.texi	Thu May 12 03:41:19 2005 +0000
@@ -21,6 +21,7 @@
 * Anonymous Functions::   Lambda expressions are functions with no names.
 * Function Cells::        Accessing or setting the function definition
                             of a symbol.
+* Obsolete Functions::    Declaring functions obsolete.
 * Inline Functions::	  Defining functions that the compiler will open code.
 * Function Safety::       Determining whether a function is safe to call.
 * Related Topics::        Cross-references to specific Lisp primitives
@@ -601,7 +602,7 @@
 
 By contrast, in programs that manipulate function definitions for other
 purposes, it is better to use @code{fset}, which does not keep such
-records.
+records.  @xref{Function Cells}.
 @end defun
 
   You cannot create a new primitive function with @code{defun} or
@@ -1150,6 +1151,44 @@
 a function defined by another package, it is cleaner to use
 @code{defadvice} (@pxref{Advising Functions}).
 
+@node Obsolete Functions
+@section Declaring Functions Obsolete
+
+You can use @code{make-obsolete} to declare a function obsolete.  This
+indicates that the function may be removed at some stage in the future.
+
+@defun make-obsolete function new &optional when
+This function makes the byte compiler warn that the function
+@var{function} is obsolete.  If @var{new} is a symbol, the warning
+message says to use @var{new} instead of @var{function}.  @var{new}
+does not need to be an alias for @var{function}; it can be a different
+function with similar functionality.  If @var{new} is a string, it is
+the warning message.
+
+If provided, @var{when} should be a string indicating when the function
+was first made obsolete---for example, a date or a release number.
+@end defun
+
+You can define a function as an alias and declare it obsolete at the
+same time using the macro @code{define-obsolete-function-alias}.
+
+@defmac define-obsolete-function-alias function new &optional when docstring
+This macro marks the function @var{function} obsolete and also defines
+it as an alias for the function @var{new}.  A typical call has the form:
+
+@example
+(define-obsolete-function-alias 'old-fun 'new-fun "22.1" "Doc.")
+@end example
+
+@noindent
+which is equivalent to the following two lines of code:
+
+@example
+(defalias 'old-fun 'new-fun "Doc.")
+(make-obsolete 'old-fun 'new-fun "22.1")
+@end example
+@end defmac
+
 @node Inline Functions
 @section Inline Functions
 @cindex inline functions
@@ -1186,7 +1225,7 @@
 following the definition, just like macros.
 
 @node Function Safety
-@section Determining whether a function is safe to call
+@section Determining whether a Function is Safe to Call
 @cindex function safety
 @cindex safety of functions
 
--- a/lispref/keymaps.texi	Thu May 12 02:47:44 2005 +0000
+++ b/lispref/keymaps.texi	Thu May 12 03:41:19 2005 +0000
@@ -1909,6 +1909,10 @@
 The property value @var{filter-fn} should be a function of one argument;
 when it is called, its argument will be @var{real-binding}.  The
 function should return the binding to use instead.
+
+Emacs can call this function at any time that it does redisplay or
+operates on menu data structures, so you should write it so it can
+safely be called at any time.
 @end table
 
 @node Menu Separators
--- a/lispref/processes.texi	Thu May 12 02:47:44 2005 +0000
+++ b/lispref/processes.texi	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999
+@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2005
 @c   Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../info/processes
@@ -49,7 +49,7 @@
 * Transaction Queues::	     Transaction-based communication with subprocesses.
 * Network::                  Opening network connections.
 * Network Servers::          Network servers let Emacs accept net connections.
-* Datagrams::
+* Datagrams::                UDP network connections.
 * Low-Level Network::        Lower-level but more general function
                                to create connections and servers.
 @end menu
@@ -870,7 +870,7 @@
 user hung up the phone.)
 
   Each of the signal-sending functions takes two optional arguments:
-@var{process-name} and @var{current-group}.
+@var{process} and @var{current-group}.
 
   The argument @var{process} must be either a process, a process
 name, a buffer, a buffer name, or @code{nil}.  A buffer or buffer name
@@ -1767,7 +1767,7 @@
 are the meaningful keywords:
 
 @table @asis
-@item :name name
+@item :name @var{name}
 Use the string @var{name} as the process name.  It is modified if
 necessary to make it unique.
 
--- a/lispref/variables.texi	Thu May 12 02:47:44 2005 +0000
+++ b/lispref/variables.texi	Thu May 12 03:41:19 2005 +0000
@@ -1736,14 +1736,19 @@
 
 @defmac define-obsolete-variable-alias variable new &optional when docstring
 This macro marks the variable @var{variable} as obsolete and also
-makes it an alias for the variable @var{new}.
+makes it an alias for the variable @var{new}.  A typical call has the form:
+
+@example
+(define-obsolete-variable-alias 'old-var 'new-var "22.1" "Doc.")
+@end example
 
-If provided, @var{when} should be a string indicating when
-@var{variable} was first made obsolete.  The optional argument
-@var{docstring} specifies the documentation string for @var{variable}.
-If @var{docstring} is omitted or nil, @var{variable} uses the
-documentation string of @var{new} unless it already has one of its
-own.
+@noindent
+which is equivalent to the following two lines of code:
+
+@example
+(defvaralias 'oldvar 'newvar "Doc.")
+(make-obsolete-variable 'old-var 'new-var "22.1")
+@end example
 @end defmac
 
 @defun indirect-variable variable
@@ -1799,10 +1804,9 @@
 @code{enable-local-variables} into account.
 
 If the optional argument @var{mode-only} is non-@code{nil}, then all
-this function does is return @code{t} if the @w{@samp{-*-}} line
-specifies a mode and @code{nil} otherwise.  It does not set the mode
-nor any other file local variable.  It does not check whether a mode
-is specified in the local variables list at the end of the file.
+this function does is return @code{t} if the @w{@samp{-*-}} line or
+the local variables list specifies a mode and @code{nil} otherwise.
+It does not set the mode nor any other file local variable.
 @end defun
 
   If a file local variable list could specify a function that would
--- a/mac/ChangeLog	Thu May 12 02:47:44 2005 +0000
+++ b/mac/ChangeLog	Thu May 12 03:41:19 2005 +0000
@@ -1,3 +1,7 @@
+2005-05-06  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* inc/config.h [HAVE_CARBON]: Define USE_TOOLKIT_SCROLL_BARS.
+
 2005-04-24  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
 	* makefile.MPW (MacObjects): Add macselect.c.x.
--- a/mac/inc/config.h	Thu May 12 02:47:44 2005 +0000
+++ b/mac/inc/config.h	Thu May 12 03:41:19 2005 +0000
@@ -91,7 +91,9 @@
 /* #undef HAVE_XAW3D */
 
 /* Define if we should use toolkit scroll bars.  */
-/* #undef USE_TOOLKIT_SCROLL_BARS */
+#ifdef HAVE_CARBON
+#define USE_TOOLKIT_SCROLL_BARS 1
+#endif
 
 /* Define if we should use XIM, if it is available.  */
 /* #undef USE_XIM */
--- a/make-dist	Thu May 12 02:47:44 2005 +0000
+++ b/make-dist	Thu May 12 03:41:19 2005 +0000
@@ -321,7 +321,9 @@
 	      leim/SKK-DIC leim/ja-dic leim/quail \
 	      src src/m src/s src/bitmaps lib-src oldXMenu lwlib \
 	      nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \
-	      etc etc/e info man msdos vms mac mac/inc mac/inc/sys \
+	      etc etc/e etc/images etc/images/gnus etc/images/smilies \
+	      etc/tree-widget etc/tree-widget/default etc/tree-widget/folder \
+	      info man msdos vms mac mac/inc mac/inc/sys \
 	      mac/src mac/Emacs.app mac/Emacs.app/Contents \
 	      mac/Emacs.app/Contents/MacOS mac/Emacs.app/Contents/Resources \
 	      mac/Emacs.app/Contents/Resources/English.lproj
@@ -349,7 +351,6 @@
  test -f README && ln README ../${tempdir}/lisp
  (cd ../${tempdir}/lisp
   rm -f TAGS =*
-  rm -f ldefs-boot.el
   rm -f site-init site-init.el site-init.elc
   rm -f site-load site-load.el site-load.elc
   rm -f site-start site-start.el site-start.elc
@@ -396,7 +397,7 @@
 echo "Making links to \`leim' and its subdirectories"
 ### Don't distribute TAGS, or =*.el files.
 (cd leim
- ln makefile.nt makefile.w32-in ../${tempdir}/leim
+ ln makefile.w32-in ../${tempdir}/leim
  ln ChangeLog README ../${tempdir}/leim
 
  ln CXTERM-DIC/*.tit ../${tempdir}/leim/CXTERM-DIC
@@ -443,7 +444,7 @@
    fi
  done
  ln README ChangeLog ChangeLog.*[0-9] ../${tempdir}/src
- ln makefile.nt makefile.w32-in ../${tempdir}/src
+ ln makefile.w32-in ../${tempdir}/src
  ln .gdbinit .dbxinit ../${tempdir}/src
  cd ../${tempdir}/src
  rm -f config.h epaths.h Makefile Makefile.c
@@ -466,7 +467,7 @@
 (cd lib-src
  ln [a-zA-Z]*.[chy] ../${tempdir}/lib-src
  ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src
- ln grep-changelog rcs2log rcs-checkin makefile.nt ../${tempdir}/lib-src
+ ln grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src
  ln makefile.w32-in ../${tempdir}/lib-src
  ## If we ended up with a symlink, or if we did not get anything
  ## due to a cross-device symlink, copy the file.
@@ -492,7 +493,7 @@
 (cd nt
  ln emacs.rc config.nt [a-z]*.c ../${tempdir}/nt
  ln nmake.defs gmake.defs subdirs.el ../${tempdir}/nt
- ln [a-z]*.bat [a-z]*.h makefile.def makefile.nt ../${tempdir}/nt
+ ln [a-z]*.bat [a-z]*.h ../${tempdir}/nt
  ln ChangeLog INSTALL README makefile.w32-in ../${tempdir}/nt)
 
 echo "Making links to \`nt/inc'"
@@ -563,7 +564,8 @@
 ### tex litter.
 ### Don't distribute gfdl.1, since no man page references it.
 (cd etc
- files=`ls -d * | grep -v CVS | grep -v RCS | grep -v 'Old' | grep -v '^e$'`
+ files=`ls -d * | grep -v CVS | grep -v RCS | grep -v 'Old' | grep -v '^e$' \
+        | grep -v '^images$' | grep -v '^tree-widget$'`
  ln $files ../${tempdir}/etc
  ## If we ended up with a symlink, or if we did not get anything
  ## due to a cross-device symlink, copy the file.
@@ -592,6 +594,15 @@
  cd ../../${tempdir}/etc/e
  rm -f *~ \#*\# *,v =* core)
 
+for dir in etc/images/gnus etc/images/smilies \
+           etc/tree-widget/default etc/tree-widget/folder ; do
+    echo "Making links to \`${dir}'"
+    (cd ${dir}
+     ln `ls -d * | grep -v CVS | grep -v RCS` ../../../${tempdir}/${dir}
+     cd ../../../${tempdir}/${dir}
+     rm -f *~ \#*\# *,v =* core)
+done
+
 echo "Making links to \`info'"
 # Don't distribute backups or autosaves.
 (cd info
--- a/man/ChangeLog	Thu May 12 02:47:44 2005 +0000
+++ b/man/ChangeLog	Thu May 12 03:41:19 2005 +0000
@@ -1,3 +1,38 @@
+2005-05-10  Richard M. Stallman  <rms@gnu.org>
+
+	* building.texi (Compilation): Clarify recompile's directory choice.
+
+	* frames.texi (Tooltips): Cleanups.
+
+	* basic.texi (Arguments): Fix punctuation.
+
+2005-05-09  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* screen.texi (Menu Bar): The up and down (not left and right)
+	arrow keys move through a keyboard menu.
+
+2005-05-08  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* basic.texi: Various typo and grammar fixes.
+	(Moving Point): C-a now runs move-beginning-of-line.
+
+2005-05-08  Nick Roberts  <nickrob@snap.net.nz>
+
+	* building.texi (Debugger Operation): Describe gud-tooltip-echo-area.
+
+	* frames.texi (Tooltips): Describe help tooltips and GUD tooltips
+	as different animals.
+
+2005-05-07  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* frames.texi (Mouse References): Clarify `mouse-1-click-follows-link'.
+	Correct index entry.
+
+2005-05-07  Nick Roberts  <nickrob@snap.net.nz>
+
+	* building.texi (Debugger Operation): Update to reflect changes
+	in GUD tooltips.
+
 2005-04-30  Richard M. Stallman  <rms@gnu.org>
 
 	* files.texi (Compressed Files): Auto Compression normally enabled.
@@ -1656,8 +1691,8 @@
 	(Indentation Commands): Correct description of `indent-relative'.
 	(Tab Stops): <TAB> is no longer bound to `tab-to-tab-stop' in Text
 	mode.  The *Tab Stops* buffer uses Overwrite Mode.
-	(Just Spaces): `untabify' converts sequences of at least two
-	spaces to tabs.
+	(Just Spaces): `tabify' converts sequences of at least two spaces
+	to tabs.
 
 2004-08-28  Eli Zaretskii  <eliz@gnu.org>
 
--- a/man/basic.texi	Thu May 12 02:47:44 2005 +0000
+++ b/man/basic.texi	Thu May 12 03:41:19 2005 +0000
@@ -170,7 +170,7 @@
 @kindex RIGHT
 @kindex UP
 @kindex DOWN
-@findex beginning-of-line
+@findex move-beginning-of-line
 @findex move-end-of-line
 @findex forward-char
 @findex backward-char
@@ -183,7 +183,7 @@
 @findex move-to-window-line
 @table @kbd
 @item C-a
-Move to the beginning of the line (@code{beginning-of-line}).
+Move to the beginning of the line (@code{move-beginning-of-line}).
 @item C-e
 Move to the end of the line (@code{move-end-of-line}).
 @item C-f
@@ -261,7 +261,7 @@
 @xref{Variables}, for how to set variables such as @code{track-eol}.
 
 @vindex next-line-add-newlines
-  @kbd{C-n} normally stops at the end of the bufer when you use it on
+  @kbd{C-n} normally stops at the end of the buffer 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
@@ -510,7 +510,7 @@
 
   You can make several blank lines by typing @kbd{C-o} several times, or
 by giving it a numeric argument to tell it how many blank lines to make.
-@xref{Arguments}, for how.  If you have a fill prefix, then @kbd{C-o}
+@xref{Arguments}, for how.  If you have a fill prefix, the @kbd{C-o}
 command inserts the fill prefix on the new line, when you use it at the
 beginning of a line.  @xref{Fill Prefix}.
 
@@ -677,7 +677,7 @@
 @cindex character set of character at point
 @cindex font of character at point
 @cindex text properties at point
-  @w{@kbd{C-u C-x =}} displays these additional information about a
+  @w{@kbd{C-u C-x =}} displays the following additional information about a
 character.
 
 @itemize @bullet
--- a/man/building.texi	Thu May 12 02:47:44 2005 +0000
+++ b/man/building.texi	Thu May 12 03:41:19 2005 +0000
@@ -117,8 +117,11 @@
 
 @findex recompile
   To rerun the last compilation with the same command, type @kbd{M-x
-recompile}.  This automatically reuses the compilation command from the
-last invocation of @kbd{M-x compile}.
+recompile}.  This automatically reuses the compilation command from
+the last invocation of @kbd{M-x compile}.  It also reuses the
+@samp{*compilation*} buffer and starts the compilation in its default
+directory, which is the directory in which the previous compilation
+was started.
 
   Emacs does not expect a compiler process to launch asynchronous
 subprocesses; if it does, and they keep running after the main
@@ -491,15 +494,18 @@
 
 @cindex tooltips with GUD
 @vindex tooltip-gud-modes
-@vindex tooltip-gud-tips-p
+@vindex gud-tooltip-mode
+@vindex gud-tooltip-echo-area
   The Tooltip facility (@pxref{Tooltips}) provides support for GUD@.
-You activate this feature by setting the variable
-@code{tooltip-gud-tips-p} to @code{t}.  Then you can display a
-variable's value in a tooltip simply by pointing at it with the mouse.
-In graphical mode, with a C program, you can also display the
-@code{#define} directive associated with an identifier when program is
-not executing.  This operates in the GUD buffer and in source buffers
-with major modes in the list @code{tooltip-gud-modes}.
+You activate this feature by turning on the minor mode
+@code{gud-tooltip-mode}.  Then you can display a variable's value in a
+tooltip simply by pointing at it with the mouse.  In graphical mode,
+with a C program, you can also display the @code{#define} directive
+associated with an identifier when the program is not executing.  This
+operates in the GUD buffer and in source buffers with major modes in
+the list @code{gud-tooltip-modes}.  If the variable
+@code{gud-tooltip-echo-area} is non-@code{nil} then the help text is
+displayed in the echo area.
 
 @node Commands of GUD
 @subsection Commands of GUD
--- a/man/calc.texi	Thu May 12 02:47:44 2005 +0000
+++ b/man/calc.texi	Thu May 12 03:41:19 2005 +0000
@@ -30634,11 +30634,15 @@
 @node Mode Settings in Embedded Mode, Customizing Embedded Mode, Assignments in Embedded Mode, Embedded Mode
 @section Mode Settings in Embedded Mode
 
+@kindex m e
+@pindex calc-embedded-preserve-modes
 @noindent
 The mode settings can be changed while Calc is in embedded mode, but
-will revert to their original values when embedded mode is ended
-(except for the modes saved when the mode-recording mode is
-@code{Save}; see below).
+by default they will revert to their original values when embedded mode
+is ended. However, the modes saved when the mode-recording mode is
+@code{Save} (see below) and the modes in effect when the @kbd{m e}
+(@code{calc-embedded-preserve-modes}) command is given
+will be preserved when embedded mode is ended.
 
 Embedded mode has a rather complicated mechanism for handling mode
 settings in Embedded formulas.  It is possible to put annotations
@@ -35580,6 +35584,7 @@
 @c
 @r{       @:      m a   @:             @: 12,13  @:calc-algebraic-mode@:}
 @r{       @:      m d   @:             @:        @:calc-degrees-mode@:}
+@r{       @:      m e   @:             @:        @:calc-embedded-preserve-modes@:}
 @r{       @:      m f   @:             @:    12  @:calc-frac-mode@:}
 @r{       @:      m g   @:             @:    52  @:calc-get-modes@:}
 @r{       @:      m h   @:             @:        @:calc-hms-mode@:}
--- a/man/frames.texi	Thu May 12 02:47:44 2005 +0000
+++ b/man/frames.texi	Thu May 12 03:41:19 2005 +0000
@@ -48,7 +48,7 @@
 * Menu Bars::	        Enabling and disabling the menu bar.
 * Tool Bars::           Enabling and disabling the tool bar.
 * Dialog Boxes::        Controlling use of dialog boxes.
-* Tooltips::            Showing "tooltips", AKA "balloon help" for active text.
+* Tooltips::            Displaying information at the current mouse position.
 * Mouse Avoidance::     Moving the mouse pointer out of the way.
 * Non-Window Terminals::  Multiple frames on terminals that show only one.
 * XTerm Mouse::         Using the mouse in an XTerm terminal emulator.
@@ -319,16 +319,14 @@
 @kbd{Mouse-2} on a completion in the @samp{*Completions*} buffer, you
 choose that completion.
 
-@vindex mouse-1-click-follows-link
   However, most applications use @kbd{Mouse-1} to do this sort of
 thing, so Emacs implements this too.  If you click @kbd{Mouse-1}
 quickly on a reference or button, it follows or activates.  If you
 click slowly, it moves point as usual.  Dragging, meaning moving the
 mouse while it is held down, also has its usual behavior of setting
-the region.  The variable @code{mouse-1-click-follows-link} controls
-whether @kbd{Mouse-1} has this behavior.
+the region.
 
-@vindex mouse-1-click-follows-link
+@vindex mouse-1-click-in-non-selected-windows
   Normally, the @kbd{Mouse-1} click behavior is performed on links in
 any window.  The variable @code{mouse-1-click-in-non-selected-windows}
 controls whether @kbd{Mouse-1} has this behavior even in non-selected
@@ -342,6 +340,14 @@
 where the mouse already is), never, or only immediately after you move
 the mouse.
 
+@vindex mouse-1-click-follows-link
+  In Emacs versions before 22, only @kbd{Mouse-2} follows links and
+@kbd{Mouse-1} always sets points.  If you prefer this behavior, set
+the variable @code{mouse-1-click-follows-link} to @code{nil}.  This
+variable also lets you choose various other alternatives for following
+links with the mouse.  Type @kbd{C-h v mouse-1-click-follows-link @key{RET}}
+for more details.
+
 @node Menu Mouse Clicks
 @section Mouse Clicks for Menus
 
@@ -963,19 +969,25 @@
 the setting of this variable has no effect.
 
 @node Tooltips
-@section Tooltips (or ``Balloon Help'')
+@section Tooltips
+@cindex tooltips
 
-@cindex balloon help
-  Tooltips are small X windows displaying a help string at the current
-mouse position, typically over text---including the mode line---which
-can be activated with the mouse or other keys.  (This facility is
-sometimes known as @dfn{balloon help}.)  Help text may be available for
-menu items too.
+  @dfn{Tooltips} are small windows that display text information at the
+current mouse position.  They activate when there is a pause in mouse
+movement.  There are two types of tooltip: help tooltips and GUD
+tooltips.
+
+  @dfn{Help tooltips} typically display over text---including the mode
+line---but may be also available for many other parts of the Emacs
+frame such as the toolbar and menu items.
 
 @findex tooltip-mode
-  You can toggle Tooltip mode with the command @kbd{M-x tooltip-mode}.
-When Tooltip mode is disabled, the help text is displayed in the echo
-area instead.
+  You can toggle help tooltips (Tooltip mode) with the command
+  @kbd{M-x tooltip-mode}.  When Tooltip mode is disabled, the help text
+is displayed in the echo area instead.
+
+  @dfn{GUD tooltips} show values of variables.  They are useful when
+you are debugging a program.  @xref{Debugger Operation}.
 
 @vindex tooltip-delay
   The variables @code{tooltip-delay} specifies how long Emacs should
--- a/man/screen.texi	Thu May 12 02:47:44 2005 +0000
+++ b/man/screen.texi	Thu May 12 03:41:19 2005 +0000
@@ -341,7 +341,7 @@
 typing @kbd{M-`} or @key{F10} (these run the command
 @code{tmm-menubar}).  This command enters a mode in which you can select
 a menu item from the keyboard.  A provisional choice appears in the echo
-area.  You can use the left and right arrow keys to move through the
+area.  You can use the up and down arrow keys to move through the
 menu to different choices.  When you have found the choice you want,
 type @key{RET} to select it.
 
--- a/src/ChangeLog	Thu May 12 02:47:44 2005 +0000
+++ b/src/ChangeLog	Thu May 12 03:41:19 2005 +0000
@@ -1,3 +1,104 @@
+2005-05-10  Richard M. Stallman  <rms@gnu.org>
+
+	* xterm.c (noinclude): Add #undef.
+
+	* image.c, xfns.c, xmenu.c: Don't include signal.h.
+
+2005-05-09  Juanma Barranquero  <lekktu@gmail.com>
+
+	* fileio.c (Fexpand_file_name, Frename_file, Fadd_name_to_file)
+	(Fmake_symbolic_link, Faccess_file, Frecent_auto_save_p):
+	Doc fixes.
+
+	* dired.c (Ffile_name_completion): Make argument name
+	match its use in docstring.
+
+2005-05-08  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* eval.c (Fdefvaralias): Remove any pre-existing
+	variable-documentation property of the alias.
+
+2005-05-07  Thien-Thi Nguyen  <ttn@gnu.org>
+
+	* xfns.c (start_hourglass): Do nothing when running on a tty.
+
+2005-05-07  Juanma Barranquero  <lekktu@gmail.com>
+
+	* fns.c (Fchar_table_range): Fix typos in docstring.
+
+2005-05-06  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* fns.c (Fchar_table_range): Yet Another Int/Lisp_Object Mixup.
+
+2005-05-06  Eli Zaretskii  <eliz@gnu.org>
+
+	* lread.c (Flocate_file_internal): Doc fix.
+
+	* Makefile.in (lisp, shortlisp): Add jka-cmpr-hook.elc.
+
+2005-05-06  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* macselect.c (x_own_selection): Accept Lisp string as result of
+	selection converter function.
+	(x_clear_frame_selections): Don't call x-lost-selection-functions
+	if Emacs is not owner of the selection.
+	(Vmac_services_selection): Put variable and initialization in
+	#ifdef MAC_OSX.
+	(syms_of_macselect) [MAC_OSX]: Set default value of
+	Vmac_services_selection to PRIMARY.
+
+	* macterm.c (toolkit_scroll_bar_interaction): Remove unused variable.
+	(mac_handle_tool_bar_click): Remove unused function and declaration.
+	[USE_TOOLKIT_SCROLL_BARS] (scroll_bar_timer_callback)
+	(install_scroll_bar_timer, set_scroll_bar_timer)
+	(control_part_code_to_scroll_bar_part, construct_scroll_bar_click)
+	(get_control_part_bound, x_scroll_bar_handle_press)
+	(x_scroll_bar_handle_release, x_scroll_bar_handle_drag)
+	(x_set_toolkit_scroll_bar_thumb): New functions and declarations.
+	[USE_TOOLKIT_SCROLL_BARS] (last_scroll_bar_part, scroll_bar_timer)
+	(scroll_bar_timer_event_posted_p): New variables.
+	[USE_TOOLKIT_SCROLL_BARS] (SCROLL_BAR_FIRST_DELAY)
+	(SCROLL_BAR_CONTINUOUS_DELAY): New macros.
+	(x_scroll_bar_create): Set control reference with NewControl.
+	(x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS]:
+	Initialize track_top and track_height to nil.
+	(x_scroll_bar_set_handle, x_scroll_bar_note_movement):
+	Put functions in #ifndef USE_TOOLKIT_SCROLL_BARS.
+	(XTset_vertical_scroll_bar): Don't make space between scroll bar
+	and associated window.
+	(XTset_vertical_scroll_bar) [MAC_OSX]: Get scroll bar area width
+	from window config.
+	(XTset_vertical_scroll_bar) [USE_TOOLKIT_SCROLL_BARS]:
+	Set track_top and track_height to nil when scroll bar size is changed.
+	Recalculate them if they are nil.
+	(XTread_socket) [MAC_OSX]: Use control kind to determine if the
+	clicked control is a scroll bar.
+	(XTread_socket) [USE_TOOLKIT_SCROLL_BARS]: Use toolkit scroll bar
+	event handler functions.  Don't add modifiers to scroll bar click
+	events.  Call scroll bar release handler when window is deactivated.
+	(mac_initialize): Remove unused code for X toolkit.
+	(syms_of_macterm) [!USE_TOOLKIT_SCROLL_BARS]:
+	Initialize Vx_toolkit_scroll_bars to nil.
+
+	* macterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS]:
+	New members track_top and track_height.
+
+	* sysselect.h [DARWIN || MAC_OSX]: Temporarily undefine
+	init_process when including sys/select.h.
+
+2005-05-05  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* eval.c (Fdefvaralias): Doc fix.
+
+	* xmenu.c (Fx_popup_menu, Fx_popup_dialog): Doc fixes.
+
+2005-05-05  Kim F. Storm  <storm@cua.dk>
+
+	* buffer.c (init_buffer_once): Set cursor_in_non_selected_windows
+	default value.
+	(syms_of_buffer): Add default-cursor-in-non-selected-windows.
+	Fix type of cursor-in-non-selected-windows.
+
 2005-05-03  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
 
 	* mac.c: #undef init_process so not to conflict with system headers.
@@ -48,7 +149,7 @@
 2005-05-01  Kim F. Storm  <storm@cua.dk>
 
 	* xdisp.c (move_it_in_display_line_to): Stop if we move beyond
-	TO_CHARPOS. This may happen if last glyphs was an image or stretch
+	TO_CHARPOS.  This may happen if last glyphs was an image or stretch
 	glyph.
 
 2005-05-01  Luc Teirlinck  <teirllm@auburn.edu>
@@ -60,7 +161,7 @@
 	* xmenu.c [not HAVE_X_TOOLKIT] (xmenu_show):
 	If user cancels the menu, quit unless FOR_CLICK.
 
-	* macros.c (Vexecuting_kbd_macro): Renamed from Vexecuting_macro.
+	* macros.c (Vexecuting_kbd_macro): Rename from Vexecuting_macro.
 	All uses changed.
 	(syms_of_macros): Define only executing-kbd-macro, not executing-macro.
 	* keyboard.c: Change Vexecuting_macro to Vexecuting_kbd_macro.
@@ -82,8 +183,7 @@
 
 2005-04-29  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
-	* mac.c: Don't include time.h.  Include sysselect.h after
-	systime.h.
+	* mac.c: Don't include time.h.  Include sysselect.h after systime.h.
 
 	* macfns.c (Fx_server_version): Add BLOCK_INPUT around Gestalt.
 
@@ -146,13 +246,12 @@
 	(mac.o): Depend on ccl.h.
 	(macselect.o): New target.
 
-	* emacs.c (main) [MAC_OS8 || MAC_OSX && HAVE_CARBON]: Call
-	syms_of_macselect.
+	* emacs.c (main) [MAC_OS8 || MAC_OSX && HAVE_CARBON]:
+	Call syms_of_macselect.
 
 	* frame.c (Fdelete_frame) [MAC_OS]: Call x_clear_frame_selections.
 
-	* mac.c [!TARGET_API_MAC_CARBON]: Don't include charset.h or
-	coding.h.
+	* mac.c [!TARGET_API_MAC_CARBON]: Don't include charset.h or coding.h.
 	(QCLIPBOARD): Remove variable.
 	(syms_of_mac): Don't initialize it.
 	(Fmac_paste_function, Fmac_cut_function, Fx_selection_exists_p):
@@ -166,10 +265,10 @@
 	[TARGET_API_MAC_CARBON] (Fmac_code_convert_string): Likewise.
 	(syms_of_mac) [TARGET_API_MAC_CARBON]: Defsubr it.
 
-	* macterm.c (handling_window_update, terminate_flag): Remove
-	variables.
-	(do_window_update, do_ae_quit_application, XTread_socket): Don't
-	use them.
+	* macterm.c (handling_window_update, terminate_flag):
+	Remove variables.
+	(do_window_update, do_ae_quit_application, XTread_socket):
+	Don't use them.
 	(WNE_SLEEP_AT_SUSPEND, WNE_SLEEP_AT_RESUME): Don't define.
 	[USE_CARBON_EVENTS && MAC_OSX] (mac_handle_service_event)
 	(init_service_handler): Move to macselect.c.  Remove declarations.
@@ -264,8 +363,8 @@
 	Make a sub-chartable with correct initial value.
 
 	* fns.c (Fset_char_table_range): Don't set slots used as default
-	values for ascii, eight-bit-control, eight-bit-graphic.  Don't
-	call Faref with charset-id.
+	values for ascii, eight-bit-control, eight-bit-graphic.
+	Don't call Faref with charset-id.
 	(Fset_char_table_default): Document how to treat normal character
 	argument.  Handle special slots used as default values of ascii,
 	eight-bit-control, eight-bit-control.  Make a sub chartable if
@@ -300,8 +399,8 @@
 	create_text_encoding_info_alist instead.
 	(init_font_name_table) [TARGET_API_MAC_CARBON]: Use Font Manager
 	routines also on Mac OS Classic.
-	(init_font_name_table) [!TARGET_API_MAC_CARBON]: Use
-	add_font_name_table_entry.
+	(init_font_name_table) [!TARGET_API_MAC_CARBON]:
+	Use add_font_name_table_entry.
 	(mac_do_list_fonts): Regard 0 in XLFD scaleble fields as
 	specified.  Derive unspecified scalable fields from specified one.
 	(x_list_fonts): Consider Valternate_fontname_alist.
@@ -399,8 +498,7 @@
 
 	* mac.c: Include charset.h and coding.h.
 	[TARGET_API_MAC_CARBON] (Qutf_8): Remove extern.
-	[TARGET_API_MAC_CARBON] (cfstring_create_with_string): New
-	function.
+	[TARGET_API_MAC_CARBON] (cfstring_create_with_string): New function.
 	[TARGET_API_MAC_CARBON] (Fmac_get_preference): Use it.
 
 	* macfns.c [TARGET_API_MAC_CARBON] (Fx_file_dialog): Likewise.
@@ -409,8 +507,8 @@
 
 	* macterm.c (x_autoselect_window_p): Remove variable.
 	(last_window): New variable.
-	(XTreassert_line_highlight, x_change_line_highlight): Remove
-	declarations.
+	(XTreassert_line_highlight, x_change_line_highlight):
+	Remove declarations.
 	(mac_focus_changed, x_detect_focus_change): New functions and
 	declarations.
 	(XTextExtents16, front_emacs_window): Remove function.
@@ -423,8 +521,8 @@
 	(XTread_socket): Move its contents here.  Generate select-window
 	event on mouse movement if needed.  Use x_detect_focus_change on
 	activate/deactivate events.  Don't deiconify frame or invalidate
-	window rectangle when dnd items are dropped.  Don't
-	activate/deactivate root control.
+	window rectangle when dnd items are dropped.
+	Don't activate/deactivate root control.
 	(frame_highlight, frame_unhighlight): Activate/deactivate root
 	control here.
 	(syms_of_macterm): Delete DEFVAR_BOOL for x_autoselect_window_p.
@@ -440,17 +538,17 @@
 
 2005-04-14  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
-	* mac.c [!TARGET_API_MAC_CARBON]: Include MacLocales.h.  Don't
-	include TextEncodingConverter.h.
+	* mac.c [!TARGET_API_MAC_CARBON]: Include MacLocales.h.
+	Don't include TextEncodingConverter.h.
 	(mac_system_script_code, Vmac_system_locale): New variables.
 	(syms_of_mac): Defvar them.
 	(mac_get_system_locale): New function.
 
-	* macfns.c (x_set_name, x_set_title) [!TARGET_API_MAC_CARBON]: Use
-	ENCODE_SYSTEM to encode title bar string.
+	* macfns.c (x_set_name, x_set_title) [!TARGET_API_MAC_CARBON]:
+	Use ENCODE_SYSTEM to encode title bar string.
 	(x_create_tip_frame): Apply 2005-03-18 change for xfns.c.
-	(Fx_file_dialog) [TARGET_API_MAC_CARBON && !MAC_OSX]: Use
-	CFStringGetSystemEncoding to get system default string encoding.
+	(Fx_file_dialog) [TARGET_API_MAC_CARBON && !MAC_OSX]:
+	Use CFStringGetSystemEncoding to get system default string encoding.
 
 	* macterm.c [!TARGET_API_MAC_CARBON]: Don't include
 	TextEncodingConverter.h.
@@ -1067,7 +1165,7 @@
 	* xdisp.c (init_from_display_pos): Don't read past end of
 	it->overlay_strings array.
 
-2005-02-25  Stephan Stahl <stahl@eos.franken.de>  (tiny change)
+2005-02-25  Stephan Stahl  <stahl@eos.franken.de>  (tiny change)
 
 	* buffer.c (syms_of_buffer): Fix typo.
 
@@ -1097,7 +1195,7 @@
 	I think those asserts are bogus if buffer contains invisible text
 	or images.
 
-2005-02-21  David Kastrup <dak@gnu.org>
+2005-02-21  David Kastrup  <dak@gnu.org>
 
 	* gtkutil.c (xg_create_frame_widgets): UNBLOCK_INPUT on error.
 
@@ -3692,7 +3790,7 @@
 	compositions to encode.
 	(encode_coding_string): Likewise.  Free composition data.
 
-2004-09-30  Florian Weimer <fw@deneb.enyo.de>
+2004-09-30  Florian Weimer  <fw@deneb.enyo.de>
 
 	* coding.c (code_convert_region): Free composition data.
 
@@ -4230,7 +4328,7 @@
 	* xfns.c (x_icon_verify): New function.
 	(Fx_create_frame): Use it.
 
-2004-07-22  Barry Fishman <barry_fishman@att.net>  (tiny change)
+2004-07-22  Barry Fishman  <barry_fishman@att.net>  (tiny change)
 
 	* s/gnu-linux.h: Use GC_MARK_STACK if __amd64__ is defined.
 
@@ -5893,7 +5991,7 @@
 	* xdisp.c (note_mode_line_or_margin_highlight): Accept HEADER_LINE
 	when keymap and cursor are setup.
 
-2004-03-14  Steven Tamm <steventamm@mac.com>
+2004-03-14  Steven Tamm  <steventamm@mac.com>
 
 	* Makefile.in (XMENU_OBJ) [HAVE_CARBON]: Do not include xmenu.o.
 
@@ -5955,7 +6053,7 @@
 	(GTK_OBJ) [USE_GTK]: New declaration.
 	(obj): Add $(GTK_OBJ) to list.
 
-2004-03-11  Steven Tamm <steventamm@mac.com>
+2004-03-11  Steven Tamm  <steventamm@mac.com>
 
 	* image.c [MAC_OSX]: Include sys/stat.h.
 
--- a/src/Makefile.in	Thu May 12 02:47:44 2005 +0000
+++ b/src/Makefile.in	Thu May 12 03:41:19 2005 +0000
@@ -776,6 +776,7 @@
 	${lispsource}textmodes/paragraphs.elc \
 	${lispsource}textmodes/text-mode.elc \
 	${lispsource}emacs-lisp/timer.elc \
+	${lispsource}jka-cmpr-hook.elc \
 	${lispsource}vc-hooks.elc \
 	${lispsource}ediff-hook.elc \
 	TOOLTIP_SUPPORT \
@@ -860,6 +861,7 @@
 	../lisp/textmodes/text-mode.elc \
 	../lisp/emacs-lisp/timer.elc \
 	../lisp/vc-hooks.elc \
+	../lisp/jka-cmpr-hook.elc \
 	../lisp/ediff-hook.elc \
 	../lisp/widget.elc \
 	../lisp/window.elc \
--- a/src/buffer.c	Thu May 12 02:47:44 2005 +0000
+++ b/src/buffer.c	Thu May 12 03:41:19 2005 +0000
@@ -1,6 +1,6 @@
 /* Buffer manipulation primitives for GNU Emacs.
-   Copyright (C) 1985, 86, 87, 88, 89, 93, 94, 95, 97, 98, 99, 
-     2000, 01, 02, 03, 04, 2005 Free Software Foundation, Inc. 
+   Copyright (C) 1985, 86, 87, 88, 89, 93, 94, 95, 97, 98, 99,
+     2000, 01, 02, 03, 04, 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -4988,6 +4988,7 @@
   buffer_defaults.direction_reversed = Qnil;
   buffer_defaults.cursor_type = Qt;
   buffer_defaults.extra_line_spacing = Qnil;
+  buffer_defaults.cursor_in_non_selected_windows = Qt;
 
 #ifdef DOS_NT
   buffer_defaults.buffer_file_type = Qnil; /* TEXT */
@@ -5276,6 +5277,11 @@
 		     doc: /* Default value of `line-spacing' for buffers that don't override it.
 This is the same as (default-value 'line-spacing).  */);
 
+  DEFVAR_LISP_NOPRO ("default-cursor-in-non-selected-windows",
+		     &buffer_defaults.cursor_in_non_selected_windows,
+		     doc: /* Default value of `cursor-in-non-selected-windows'.
+This is the same as (default-value 'cursor-in-non-selected-windows).  */);
+
   DEFVAR_LISP_NOPRO ("default-abbrev-mode",
 		     &buffer_defaults.abbrev_mode,
 		     doc: /* Default value of `abbrev-mode' for buffers that do not override it.
@@ -5956,7 +5962,7 @@
 to the default frame line height.  */);
 
   DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows",
-		     &current_buffer->cursor_in_non_selected_windows, Qt,
+		     &current_buffer->cursor_in_non_selected_windows, Qnil,
     doc: /* *Cursor type to display in non-selected windows.
 t means to use hollow box cursor.  See `cursor-type' for other values.  */);
 
--- a/src/dired.c	Thu May 12 02:47:44 2005 +0000
+++ b/src/dired.c	Thu May 12 03:41:19 2005 +0000
@@ -401,7 +401,7 @@
 Returns the longest string
 common to all file names in DIRECTORY that start with FILE.
 If there is only one and FILE matches it exactly, returns t.
-Returns nil if DIR contains no name starting with FILE.
+Returns nil if DIRECTORY contains no name starting with FILE.
 
 This function ignores some of the possible completions as
 determined by the variable `completion-ignored-extensions', which see.  */)
--- a/src/eval.c	Thu May 12 02:47:44 2005 +0000
+++ b/src/eval.c	Thu May 12 03:41:19 2005 +0000
@@ -725,7 +725,9 @@
        doc: /* Make SYMBOL a variable alias for symbol ALIASED.
 Setting the value of SYMBOL will subsequently set the value of ALIASED,
 and getting the value of SYMBOL will return the value ALIASED has.
-Third arg DOCSTRING, if non-nil, is documentation for SYMBOL.
+Third arg DOCSTRING, if non-nil, is documentation for SYMBOL.  If it is
+omitted or nil, SYMBOL gets the documentation string of ALIASED, or of the
+variable at the end of the chain of aliases, if ALIASED is itself an alias.
 The return value is ALIASED.  */)
      (symbol, aliased, docstring)
      Lisp_Object symbol, aliased, docstring;
@@ -745,6 +747,8 @@
   LOADHIST_ATTACH (symbol);
   if (!NILP (docstring))
     Fput (symbol, Qvariable_documentation, docstring);
+  else
+    Fput (symbol, Qvariable_documentation, Qnil);
 
   return aliased;
 }
--- a/src/fileio.c	Thu May 12 02:47:44 2005 +0000
+++ b/src/fileio.c	Thu May 12 03:41:19 2005 +0000
@@ -1024,7 +1024,7 @@
        doc: /* Convert filename NAME to absolute, and canonicalize it.
 Second arg DEFAULT-DIRECTORY is directory to start with if NAME is relative
 \(does not start with slash); if DEFAULT-DIRECTORY is nil or missing,
-the current buffer's value of default-directory is used.
+the current buffer's value of `default-directory' is used.
 File name components that are `.' are removed, and
 so are file name components followed by `..', along with the `..' itself;
 note that these simplifications are done without checking the resulting
@@ -2711,7 +2711,7 @@
 
 DEFUN ("rename-file", Frename_file, Srename_file, 2, 3,
        "fRename file: \nGRename %s to file: \np",
-       doc: /* Rename FILE as NEWNAME.  Both args strings.
+       doc: /* Rename FILE as NEWNAME.  Both args must be strings.
 If file has names other than FILE, it continues to have those names.
 Signals a `file-already-exists' error if a file NEWNAME already exists
 unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.
@@ -2800,7 +2800,7 @@
 
 DEFUN ("add-name-to-file", Fadd_name_to_file, Sadd_name_to_file, 2, 3,
        "fAdd name to file: \nGName to add to %s: \np",
-       doc: /* Give FILE additional name NEWNAME.  Both args strings.
+       doc: /* Give FILE additional name NEWNAME.  Both args must be strings.
 Signals a `file-already-exists' error if a file NEWNAME already exists
 unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.
 A number as third arg means request confirmation if NEWNAME already exists.
@@ -2867,7 +2867,7 @@
 #ifdef S_IFLNK
 DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3,
        "FMake symbolic link to file: \nGMake symbolic link to file %s: \np",
-       doc: /* Make a symbolic link to FILENAME, named LINKNAME.  Both args strings.
+       doc: /* Make a symbolic link to FILENAME, named LINKNAME.  Both args must be strings.
 Signals a `file-already-exists' error if a file LINKNAME already exists
 unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.
 A number as third arg means request confirmation if LINKNAME already exists.
@@ -3212,7 +3212,7 @@
 DEFUN ("access-file", Faccess_file, Saccess_file, 2, 2, 0,
        doc: /* Access file FILENAME, and get an error if that does not work.
 The second argument STRING is used in the error message.
-If there is no error, we return nil.  */)
+If there is no error, returns nil.  */)
      (filename, string)
      Lisp_Object filename, string;
 {
@@ -5952,7 +5952,7 @@
 
 DEFUN ("recent-auto-save-p", Frecent_auto_save_p, Srecent_auto_save_p,
        0, 0, 0,
-       doc: /* Return t if buffer has been auto-saved since last read in or saved.  */)
+       doc: /* Return t if current buffer has been auto-saved since last read in or saved.  */)
      ()
 {
   return (SAVE_MODIFF < current_buffer->auto_save_modified) ? Qt : Qnil;
--- a/src/image.c	Thu May 12 02:47:44 2005 +0000
+++ b/src/image.c	Thu May 12 03:41:19 2005 +0000
@@ -20,7 +20,6 @@
 Boston, MA 02111-1307, USA.  */
 
 #include <config.h>
-#include <signal.h>
 #include <stdio.h>
 #include <math.h>
 #include <ctype.h>
--- a/src/lread.c	Thu May 12 02:47:44 2005 +0000
+++ b/src/lread.c	Thu May 12 03:41:19 2005 +0000
@@ -1198,6 +1198,7 @@
 
 DEFUN ("locate-file-internal", Flocate_file_internal, Slocate_file_internal, 2, 4, 0,
        doc: /* Search for FILENAME through PATH.
+Returns the file's name in absolute form, or nil if not found.
 If SUFFIXES is non-nil, it should be a list of suffixes to append to
 file name when searching.
 If non-nil, PREDICATE is used instead of `file-readable-p'.
--- a/src/macselect.c	Thu May 12 02:47:44 2005 +0000
+++ b/src/macselect.c	Thu May 12 03:41:19 2005 +0000
@@ -98,8 +98,10 @@
    selection type with a scrap flavor type via `mac-ostype'.  */
 static Lisp_Object Qmac_scrap_name, Qmac_ostype;
 
+#ifdef MAC_OSX
 /* Selection name for communication via Services menu.  */
 static Lisp_Object Vmac_services_selection;
+#endif
 
 /* Get a reference to the scrap corresponding to the symbol SYM.  The
    reference is set to *SCRAP, and it becomes NULL if there's no
@@ -455,9 +457,11 @@
 	    value = call3 (handler_fn, selection_name,
 			   type, selection_value);
 
-	  if (CONSP (value)
-	      && EQ (XCAR (value), type)
-	      && STRINGP (XCDR (value)))
+	  if (STRINGP (value))
+	    err = put_scrap_string (scrap, type, value);
+	  else if (CONSP (value)
+		   && EQ (XCAR (value), type)
+		   && STRINGP (XCDR (value)))
 	    err = put_scrap_string (scrap, type, XCDR (value));
 	}
 
@@ -622,7 +626,8 @@
       hooks = Vx_lost_selection_functions;
       selection_symbol = Fcar (Fcar (Vselection_alist));
 
-      if (!EQ (hooks, Qunbound))
+      if (!EQ (hooks, Qunbound)
+	  && !NILP (Fx_selection_owner_p (selection_symbol)))
 	{
 	  for (; CONSP (hooks); hooks = Fcdr (hooks))
 	    call1 (Fcar (hooks), selection_symbol);
@@ -646,7 +651,8 @@
 	hooks = Vx_lost_selection_functions;
 	selection_symbol = Fcar (Fcar (XCDR (rest)));
 
-	if (!EQ (hooks, Qunbound))
+	if (!EQ (hooks, Qunbound)
+	  && !NILP (Fx_selection_owner_p (selection_symbol)))
 	  {
 	    for (; CONSP (hooks); hooks = Fcdr (hooks))
 	      call1 (Fcar (hooks), selection_symbol);
--- a/src/macterm.c	Thu May 12 02:47:44 2005 +0000
+++ b/src/macterm.c	Thu May 12 03:41:19 2005 +0000
@@ -156,10 +156,6 @@
 
 struct frame *pending_autoraise_frame;
 
-/* Non-zero means user is interacting with a toolkit scroll bar.  */
-
-static int toolkit_scroll_bar_interaction;
-
 /* Mouse movement.
 
    Formerly, we used PointerMotionHintMask (in standard_event_mask)
@@ -258,7 +254,6 @@
 struct frame * x_window_to_frame (struct mac_display_info *, WindowPtr);
 struct mac_display_info *mac_display_info_for_display (Display *);
 static void x_update_window_end P_ ((struct window *, int, int));
-static void mac_handle_tool_bar_click P_ ((struct frame *, EventRecord *));
 static int x_io_error_quitter P_ ((Display *));
 int x_catch_errors P_ ((Display *));
 void x_uncatch_errors P_ ((Display *, int));
@@ -4137,29 +4132,315 @@
 }
 
 
-/***********************************************************************
-			       Tool-bars
- ***********************************************************************/
-
-/* Handle mouse button event on the tool-bar of frame F, at
-   frame-relative coordinates X/Y.  EVENT_TYPE is either ButtionPress
-   or ButtonRelase.  */
-
-static void
-mac_handle_tool_bar_click (f, button_event)
-     struct frame *f;
-     EventRecord *button_event;
-{
-  int x = button_event->where.h;
-  int y = button_event->where.v;
-
-  if (button_event->what == mouseDown)
-    handle_tool_bar_click (f, x, y, 1, 0);
+/************************************************************************
+			 Toolkit scroll bars
+ ************************************************************************/
+
+#ifdef USE_TOOLKIT_SCROLL_BARS
+
+static pascal void scroll_bar_timer_callback P_ ((EventLoopTimerRef, void *));
+static OSStatus install_scroll_bar_timer P_ ((void));
+static OSStatus set_scroll_bar_timer P_ ((EventTimerInterval));
+static int control_part_code_to_scroll_bar_part P_((ControlPartCode));
+static void construct_scroll_bar_click P_ ((struct scroll_bar *, int,
+					    unsigned long,
+					    struct input_event *));
+static OSErr get_control_part_bound P_((ControlHandle, ControlPartCode,
+					Rect *));
+static void x_scroll_bar_handle_press P_ ((struct scroll_bar *,
+					   ControlPartCode,
+					   unsigned long,
+					   struct input_event *));
+static void x_scroll_bar_handle_release P_ ((struct scroll_bar *,
+					     unsigned long,
+					     struct input_event *));
+static void x_scroll_bar_handle_drag P_ ((WindowPtr, struct scroll_bar *,
+					  Point, unsigned long,
+					  struct input_event *));
+static void x_set_toolkit_scroll_bar_thumb P_ ((struct scroll_bar *,
+						int, int, int));
+
+/* Last scroll bar part sent in x_scroll_bar_handle_*.  */
+
+static int last_scroll_bar_part;
+
+static EventLoopTimerRef scroll_bar_timer;
+
+static int scroll_bar_timer_event_posted_p;
+
+#define SCROLL_BAR_FIRST_DELAY 0.5
+#define SCROLL_BAR_CONTINUOUS_DELAY (1.0 / 15)
+
+static pascal void
+scroll_bar_timer_callback (timer, data)
+     EventLoopTimerRef timer;
+     void *data;
+{
+  EventRef event = NULL;
+  OSErr err;
+
+  err = CreateEvent (NULL, kEventClassMouse, kEventMouseMoved, 0,
+		     kEventAttributeNone, &event);
+  if (err == noErr)
+    {
+      Point mouse_pos;
+
+      GetMouse (&mouse_pos);
+      LocalToGlobal (&mouse_pos);
+      err = SetEventParameter (event, kEventParamMouseLocation, typeQDPoint,
+			       sizeof (Point), &mouse_pos);
+    }
+  if (err == noErr)
+    {
+      UInt32 modifiers = GetCurrentKeyModifiers ();
+
+      err = SetEventParameter (event, kEventParamKeyModifiers, typeUInt32,
+			       sizeof (UInt32), &modifiers);
+    }
+  if (err == noErr)
+    err = PostEventToQueue (GetCurrentEventQueue (), event,
+			    kEventPriorityStandard);
+  if (err == noErr)
+    scroll_bar_timer_event_posted_p = 1;
+
+  if (event)
+    ReleaseEvent (event);
+}
+
+static OSStatus
+install_scroll_bar_timer ()
+{
+  static EventLoopTimerUPP scroll_bar_timer_callbackUPP = NULL;
+
+  if (scroll_bar_timer_callbackUPP == NULL)
+    scroll_bar_timer_callbackUPP =
+      NewEventLoopTimerUPP (scroll_bar_timer_callback);
+
+  if (scroll_bar_timer == NULL)
+    /* Mac OS X and CarbonLib 1.5 and later allow us to specify
+       kEventDurationForever as delays.  */
+    return
+      InstallEventLoopTimer (GetCurrentEventLoop (),
+			     kEventDurationForever, kEventDurationForever,
+			     scroll_bar_timer_callbackUPP, NULL,
+			     &scroll_bar_timer);
+}
+
+static OSStatus
+set_scroll_bar_timer (delay)
+     EventTimerInterval delay;
+{
+  if (scroll_bar_timer == NULL)
+    install_scroll_bar_timer ();
+
+  scroll_bar_timer_event_posted_p = 0;
+
+  return SetEventLoopTimerNextFireTime (scroll_bar_timer, delay);
+}
+
+static int
+control_part_code_to_scroll_bar_part (part_code)
+     ControlPartCode part_code;
+{
+  switch (part_code)
+    {
+    case kControlUpButtonPart:		return scroll_bar_up_arrow;
+    case kControlDownButtonPart:	return scroll_bar_down_arrow;
+    case kControlPageUpPart:		return scroll_bar_above_handle;
+    case kControlPageDownPart:		return scroll_bar_below_handle;
+    case kControlIndicatorPart:		return scroll_bar_handle;
+    }
+
+  return -1;
+}
+
+static void
+construct_scroll_bar_click (bar, part, timestamp, bufp)
+     struct scroll_bar *bar;
+     int part;
+     unsigned long timestamp;
+     struct input_event *bufp;
+{
+  bufp->kind = SCROLL_BAR_CLICK_EVENT;
+  bufp->frame_or_window = bar->window;
+  bufp->arg = Qnil;
+  bufp->part = part;
+  bufp->code = 0;
+  bufp->timestamp = timestamp;
+  XSETINT (bufp->x, 0);
+  XSETINT (bufp->y, 0);
+  bufp->modifiers = 0;
+}
+
+static OSErr
+get_control_part_bound (ch, part_code, rect)
+     ControlHandle ch;
+     ControlPartCode part_code;
+     Rect *rect;
+{
+  RgnHandle region = NewRgn ();
+  OSStatus err;
+
+  err = GetControlRegion (ch, part_code, region);
+  if (err == noErr)
+    GetRegionBounds (region, rect);
+  DisposeRgn (region);
+
+  return err;
+}
+
+static void
+x_scroll_bar_handle_press (bar, part_code, timestamp, bufp)
+     struct scroll_bar *bar;
+     ControlPartCode part_code;
+     unsigned long timestamp;
+     struct input_event *bufp;
+{
+  int part = control_part_code_to_scroll_bar_part (part_code);
+
+  if (part < 0)
+    return;
+
+  if (part != scroll_bar_handle)
+    {
+      construct_scroll_bar_click (bar, part, timestamp, bufp);
+      HiliteControl (SCROLL_BAR_CONTROL_HANDLE (bar), part_code);
+      set_scroll_bar_timer (SCROLL_BAR_FIRST_DELAY);
+    }
+
+  last_scroll_bar_part = part;
+  bar->dragging = Qnil;
+  tracked_scroll_bar = bar;
+}
+
+static void
+x_scroll_bar_handle_release (bar, timestamp, bufp)
+     struct scroll_bar *bar;
+     unsigned long timestamp;
+     struct input_event *bufp;
+{
+  if (last_scroll_bar_part != scroll_bar_handle
+      || !GC_NILP (bar->dragging))
+    construct_scroll_bar_click (bar, scroll_bar_end_scroll, timestamp, bufp);
+
+  HiliteControl (SCROLL_BAR_CONTROL_HANDLE (bar), 0);
+  set_scroll_bar_timer (kEventDurationForever);
+
+  last_scroll_bar_part = -1;
+  bar->dragging = Qnil;
+  tracked_scroll_bar = NULL;
+}
+
+static void
+x_scroll_bar_handle_drag (win, bar, mouse_pos, timestamp, bufp)
+     WindowPtr win;
+     struct scroll_bar *bar;
+     Point mouse_pos;
+     unsigned long timestamp;
+     struct input_event *bufp;
+{
+  ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar);
+
+  if (last_scroll_bar_part == scroll_bar_handle)
+    {
+      int top, top_range;
+      Rect r;
+
+      get_control_part_bound (SCROLL_BAR_CONTROL_HANDLE (bar),
+			      kControlIndicatorPart, &r);
+
+      if (GC_NILP (bar->dragging))
+	XSETINT (bar->dragging, mouse_pos.v - r.top);
+
+      top = mouse_pos.v - XINT (bar->dragging) - XINT (bar->track_top);
+      top_range = (XINT (bar->track_height) - (r.bottom - r.top)) *
+	(1.0 + (float) GetControlViewSize (ch) / GetControl32BitMaximum (ch))
+	+ .5;
+      
+      if (top < 0)
+	top = 0;
+      if (top > top_range)
+	top = top_range;
+
+      construct_scroll_bar_click (bar, scroll_bar_handle, timestamp, bufp);
+      XSETINT (bufp->x, top);
+      XSETINT (bufp->y, top_range);
+    }
   else
-    handle_tool_bar_click (f, x, y, 0,
-			   x_mac_to_emacs_modifiers (FRAME_MAC_DISPLAY_INFO (f),
-						     button_event->modifiers));
-}
+    {
+      ControlPartCode part_code;
+      int unhilite_p = 0, part;
+
+      if (ch != FindControlUnderMouse (mouse_pos, win, &part_code))
+	unhilite_p = 1;
+      else
+	{
+	  part = control_part_code_to_scroll_bar_part (part_code);
+
+	  switch (last_scroll_bar_part)
+	    {
+	    case scroll_bar_above_handle:
+	    case scroll_bar_below_handle:
+	      if (part != scroll_bar_above_handle
+		  && part != scroll_bar_below_handle)
+		unhilite_p = 1;
+	      break;
+
+	    case scroll_bar_up_arrow:
+	    case scroll_bar_down_arrow:
+	      if (part != scroll_bar_up_arrow
+		  && part != scroll_bar_down_arrow)
+		unhilite_p = 1;
+	      break;
+	    }
+	}
+
+      if (unhilite_p)
+	HiliteControl (SCROLL_BAR_CONTROL_HANDLE (bar), 0);
+      else if (part != last_scroll_bar_part
+	       || scroll_bar_timer_event_posted_p)
+	{
+	  construct_scroll_bar_click (bar, part, timestamp, bufp);
+	  last_scroll_bar_part = part;
+	  HiliteControl (SCROLL_BAR_CONTROL_HANDLE (bar), part_code);
+	  set_scroll_bar_timer (SCROLL_BAR_CONTINUOUS_DELAY);
+	}
+    }
+}
+
+/* Set the thumb size and position of scroll bar BAR.  We are currently
+   displaying PORTION out of a whole WHOLE, and our position POSITION.  */
+
+static void
+x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole)
+     struct scroll_bar *bar;
+     int portion, position, whole;
+{
+  ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar);
+
+  int value, viewsize, maximum;
+
+  if (whole == 0 || XINT (bar->track_height) == 0)
+    value = 0, viewsize = 1, maximum = 0;
+  else
+    {
+      value = position;
+      viewsize = portion;
+      maximum = max (0, whole - portion);
+    }
+
+  BLOCK_INPUT;
+
+  SetControl32BitMinimum (ch, 0);
+  SetControl32BitMaximum (ch, maximum);
+  SetControl32BitValue (ch, value);
+  SetControlViewSize (ch, viewsize);
+
+  UNBLOCK_INPUT;
+}
+
+#endif /* USE_TOOLKIT_SCROLL_BARS */
+
 
 
 /************************************************************************
@@ -4191,13 +4472,12 @@
 
 #if TARGET_API_MAC_CARBON
   ch = NewControl (FRAME_MAC_WINDOW (f), &r, "\p", 1, 0, 0, 0,
-		   kControlScrollBarProc, 0L);
+		   kControlScrollBarProc, (long) bar);
 #else
-  ch = NewControl (FRAME_MAC_WINDOW (f), &r, "\p", 1, 0, 0, 0, scrollBarProc,
-		   0L);
+  ch = NewControl (FRAME_MAC_WINDOW (f), &r, "\p", 1, 0, 0, 0,
+		   scrollBarProc, (long) bar);
 #endif
   SET_SCROLL_BAR_CONTROL_HANDLE (bar, ch);
-  SetControlReference (ch, (long) bar);
 
   XSETWINDOW (bar->window, w);
   XSETINT (bar->top, top);
@@ -4207,6 +4487,10 @@
   XSETINT (bar->start, 0);
   XSETINT (bar->end, 0);
   bar->dragging = Qnil;
+#ifdef USE_TOOLKIT_SCROLL_BARS
+  bar->track_top = Qnil;
+  bar->track_height = Qnil;
+#endif
 
   /* Add bar to its frame's list of scroll bars.  */
   bar->next = FRAME_SCROLL_BARS (f);
@@ -4233,6 +4517,8 @@
    the bar's top is as far down as it goes; otherwise, there's no way
    to move to the very end of the buffer.  */
 
+#ifndef USE_TOOLKIT_SCROLL_BARS
+
 static void
 x_scroll_bar_set_handle (bar, start, end, rebuild)
      struct scroll_bar *bar;
@@ -4292,6 +4578,7 @@
   UNBLOCK_INPUT;
 }
 
+#endif /* !USE_TOOLKIT_SCROLL_BARS */
 
 /* Destroy scroll bar BAR, and set its Emacs window's scroll bar to
    nil.  */
@@ -4330,11 +4617,7 @@
   /* Get window dimensions.  */
   window_box (w, -1, 0, &window_y, 0, &window_height);
   top = window_y;
-#ifdef MAC_OSX
-  width = 16;
-#else
   width = WINDOW_CONFIG_SCROLL_BAR_COLS (w) * FRAME_COLUMN_WIDTH (f);
-#endif
   height = window_height;
 
   /* Compute the left edge of the scroll bar area.  */
@@ -4349,9 +4632,9 @@
 
   /* Compute the left edge of the scroll bar.  */
   if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w))
-    sb_left = left + width - sb_width - (width - sb_width) / 2;
+    sb_left = left;
   else
-    sb_left = left + (width - sb_width) / 2;
+    sb_left = left + width - sb_width;
 
   /* Adjustments according to Inside Macintosh to make it look nice */
   disp_top = top;
@@ -4424,11 +4707,44 @@
           XSETINT (bar->top, top);
           XSETINT (bar->width, sb_width);
           XSETINT (bar->height, height);
+#ifdef USE_TOOLKIT_SCROLL_BARS
+	  bar->track_top = Qnil;
+	  bar->track_height = Qnil;
+#endif
         }
 
       UNBLOCK_INPUT;
     }
 
+#ifdef USE_TOOLKIT_SCROLL_BARS
+  if (NILP (bar->track_top))
+    {
+      ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar);
+      Rect r0, r1;
+
+      BLOCK_INPUT;
+
+      SetControl32BitMinimum (ch, 0);
+      SetControl32BitMaximum (ch, 1);
+      SetControlViewSize (ch, 1);
+
+      /* Move the scroll bar thumb to the top.  */
+      SetControl32BitValue (ch, 0);
+      get_control_part_bound (ch, kControlIndicatorPart, &r0);
+
+      /* Move the scroll bar thumb to the bottom.  */
+      SetControl32BitValue (ch, 1);
+      get_control_part_bound (ch, kControlIndicatorPart, &r1);
+
+      UnionRect (&r0, &r1, &r0);
+      XSETINT (bar->track_top, r0.top);
+      XSETINT (bar->track_height, r0.bottom - r0.top);
+
+      UNBLOCK_INPUT;
+    }
+
+  x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole);
+#else /* not USE_TOOLKIT_SCROLL_BARS */
   /* Set the scroll bar's current state, unless we're currently being
      dragged.  */
   if (NILP (bar->dragging))
@@ -4444,6 +4760,7 @@
 	  x_scroll_bar_set_handle (bar, start, end, 0);
 	}
     }
+#endif /* not USE_TOOLKIT_SCROLL_BARS */
 }
 
 
@@ -4625,6 +4942,7 @@
   XSETINT (bufp->y, top_range);
 }
 
+#ifndef USE_TOOLKIT_SCROLL_BARS
 
 /* Handle some mouse motion while someone is dragging the scroll bar.
 
@@ -4659,6 +4977,7 @@
     }
 }
 
+#endif /* !USE_TOOLKIT_SCROLL_BARS */
 
 /* Return information to the user about the current position of the
    mouse on the scroll bar.  */
@@ -8675,6 +8994,9 @@
 		    SInt16 control_part_code;
 		    ControlHandle ch;
 		    Point mouse_loc = er.where;
+#ifdef MAC_OSX
+		    ControlKind control_kind;
+#endif
 
 		    f = mac_window_to_frame (window_ptr);
 		    /* convert to local coordinates of new window */
@@ -8684,6 +9006,10 @@
 #if TARGET_API_MAC_CARBON
 		    ch = FindControlUnderMouse (mouse_loc, window_ptr,
 						&control_part_code);
+#ifdef MAC_OSX
+		    if (ch)
+		      GetControlKind (ch, &control_kind);
+#endif
 #else
 		    control_part_code = FindControl (mouse_loc, window_ptr,
 						     &ch);
@@ -8702,19 +9028,42 @@
 		    /* ticks to milliseconds */
 
 		    if (dpyinfo->grabbed && tracked_scroll_bar
+			|| ch != 0
+#ifndef USE_TOOLKIT_SCROLL_BARS
 			/* control_part_code becomes kControlNoPart if
-			   a progress indicator is clicked.  */
-			|| ch != 0 && control_part_code != kControlNoPart)
+ 			   a progress indicator is clicked.  */
+			&& control_part_code != kControlNoPart
+#else  /* USE_TOOLKIT_SCROLL_BARS */
+#ifdef MAC_OSX
+			&& control_kind.kind == kControlKindScrollBar
+#endif	/* MAC_OSX */
+#endif	/* USE_TOOLKIT_SCROLL_BARS */
+			)
 		      {
 			struct scroll_bar *bar;
 
 			if (dpyinfo->grabbed && tracked_scroll_bar)
 			  {
 			    bar = tracked_scroll_bar;
+#ifndef USE_TOOLKIT_SCROLL_BARS
 			    control_part_code = kControlIndicatorPart;
+#endif
 			  }
 			else
 			  bar = (struct scroll_bar *) GetControlReference (ch);
+#ifdef USE_TOOLKIT_SCROLL_BARS
+			/* Make the "Ctrl-Mouse-2 splits window" work
+			   for toolkit scroll bars.  */
+			if (er.modifiers & controlKey)
+			  x_scroll_bar_handle_click (bar, control_part_code,
+						     &er, &inev);
+			else if (er.what == mouseDown)
+			  x_scroll_bar_handle_press (bar, control_part_code,
+						     inev.timestamp, &inev);
+			else
+			  x_scroll_bar_handle_release (bar, inev.timestamp,
+						       &inev);
+#else  /* not USE_TOOLKIT_SCROLL_BARS */
 			x_scroll_bar_handle_click (bar, control_part_code,
 						   &er, &inev);
 			if (er.what == mouseDown
@@ -8722,6 +9071,7 @@
 			  tracked_scroll_bar = bar;
 			else
 			  tracked_scroll_bar = NULL;
+#endif  /* not USE_TOOLKIT_SCROLL_BARS */
 		      }
 		    else
 		      {
@@ -8771,15 +9121,18 @@
 			  dpyinfo->grabbed &= ~(1 << inev.code);
 		      }
 
-		    switch (er.what)
-		      {
-		      case mouseDown:
-			inev.modifiers |= down_modifier;
-			break;
-		      case mouseUp:
-			inev.modifiers |= up_modifier;
-			break;
-		      }
+#ifdef USE_TOOLKIT_SCROLL_BARS
+		    if (inev.kind == MOUSE_CLICK_EVENT)
+#endif
+		      switch (er.what)
+			{
+			case mouseDown:
+			  inev.modifiers |= down_modifier;
+			  break;
+			case mouseUp:
+			  inev.modifiers |= up_modifier;
+			  break;
+			}
 		  }
 		break;
 
@@ -8881,10 +9234,16 @@
 		  GlobalToLocal (&mouse_pos);
 
 		  if (dpyinfo->grabbed && tracked_scroll_bar)
+#ifdef USE_TOOLKIT_SCROLL_BARS
+		    x_scroll_bar_handle_drag (wp, tracked_scroll_bar,
+					      mouse_pos, er.when * (1000 / 60),
+					      &inev);
+#else /* not USE_TOOLKIT_SCROLL_BARS */
 		    x_scroll_bar_note_movement (tracked_scroll_bar,
 						mouse_pos.v
 						- XINT (tracked_scroll_bar->top),
-						TickCount() * (1000 / 60));
+						er.when * (1000 / 60));
+#endif /* not USE_TOOLKIT_SCROLL_BARS */
 		  else
 		    {
 		      /* Generate SELECT_WINDOW_EVENTs when needed.  */
@@ -8959,6 +9318,23 @@
 	    else
 	      {
 		/* A window has been deactivated */
+#if USE_TOOLKIT_SCROLL_BARS
+		if (dpyinfo->grabbed && tracked_scroll_bar)
+		  {
+		    struct input_event event;
+
+		    EVENT_INIT (event);
+		    event.kind = NO_EVENT;
+		    x_scroll_bar_handle_release (tracked_scroll_bar,
+						 er.when * (1000 / 60),
+						 &event);
+		    if (event.kind != NO_EVENT)
+		      {
+			kbd_buffer_store_event_hold (&event, hold_quit);
+			count++;
+		      }
+		  }
+#endif
 		dpyinfo->grabbed = 0;
 
 		x_detect_focus_change (dpyinfo, &er, &inev);
@@ -9737,42 +10113,6 @@
   /* Try to use interrupt input; if we can't, then start polling.  */
   Fset_input_mode (Qt, Qnil, Qt, Qnil);
 
-#ifdef USE_X_TOOLKIT
-  XtToolkitInitialize ();
-  Xt_app_con = XtCreateApplicationContext ();
-  XtAppSetFallbackResources (Xt_app_con, Xt_default_resources);
-
-  /* Install an asynchronous timer that processes Xt timeout events
-     every 0.1s.  This is necessary because some widget sets use
-     timeouts internally, for example the LessTif menu bar, or the
-     Xaw3d scroll bar.  When Xt timouts aren't processed, these
-     widgets don't behave normally.  */
-  {
-    EMACS_TIME interval;
-    EMACS_SET_SECS_USECS (interval, 0, 100000);
-    start_atimer (ATIMER_CONTINUOUS, interval, x_process_timeouts, 0);
-  }
-#endif
-
-#if USE_TOOLKIT_SCROLL_BARS
-  xaw3d_arrow_scroll = False;
-  xaw3d_pick_top = True;
-#endif
-
-#if 0
-  /* Note that there is no real way portable across R3/R4 to get the
-     original error handler.  */
-  XSetErrorHandler (x_error_handler);
-  XSetIOErrorHandler (x_io_error_quitter);
-
-  /* Disable Window Change signals;  they are handled by X events.  */
-#ifdef SIGWINCH
-  signal (SIGWINCH, SIG_DFL);
-#endif /* ! defined (SIGWINCH) */
-
-  signal (SIGPIPE, x_connection_signal);
-#endif
-
   BLOCK_INPUT;
 
 #if TARGET_API_MAC_CARBON
@@ -9849,7 +10189,11 @@
 
   DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars,
 	       doc: /* If not nil, Emacs uses toolkit scroll bars.  */);
+#ifdef USE_TOOLKIT_SCROLL_BARS
   Vx_toolkit_scroll_bars = Qt;
+#else
+  Vx_toolkit_scroll_bars = Qnil;
+#endif
 
   DEFVAR_BOOL ("x-use-underline-position-properties",
                &x_use_underline_position_properties,
--- a/src/macterm.h	Thu May 12 02:47:44 2005 +0000
+++ b/src/macterm.h	Thu May 12 03:41:19 2005 +0000
@@ -495,6 +495,12 @@
      place where the user grabbed it.  If the handle isn't currently
      being dragged, this is Qnil.  */
   Lisp_Object dragging;
+
+#ifdef USE_TOOLKIT_SCROLL_BARS
+  /* The position and size of the scroll bar handle track area in
+     pixels, relative to the frame.  */
+  Lisp_Object track_top, track_height;
+#endif
 };
 
 /* The number of elements a vector holding a struct scroll_bar needs.  */
--- a/src/sysselect.h	Thu May 12 02:47:44 2005 +0000
+++ b/src/sysselect.h	Thu May 12 03:41:19 2005 +0000
@@ -19,7 +19,13 @@
 Boston, MA 02111-1307, USA.  */
 
 #ifdef HAVE_SYS_SELECT_H
+#if defined (DARWIN) || defined (MAC_OSX)
+#undef init_process
+#endif
 #include <sys/select.h>
+#if defined (DARWIN) || defined (MAC_OSX)
+#define init_process emacs_init_process
+#endif
 #endif
 
 #ifdef FD_SET
--- a/src/xfns.c	Thu May 12 02:47:44 2005 +0000
+++ b/src/xfns.c	Thu May 12 03:41:19 2005 +0000
@@ -20,7 +20,6 @@
 Boston, MA 02111-1307, USA.  */
 
 #include <config.h>
-#include <signal.h>
 #include <stdio.h>
 #include <math.h>
 
@@ -4368,6 +4367,10 @@
   EMACS_TIME delay;
   int secs, usecs = 0;
 
+  /* Don't bother for ttys.  */
+  if (NILP (Vwindow_system))
+    return;
+
   cancel_hourglass ();
 
   if (INTEGERP (Vhourglass_delay)
--- a/src/xmenu.c	Thu May 12 02:47:44 2005 +0000
+++ b/src/xmenu.c	Thu May 12 03:41:19 2005 +0000
@@ -33,8 +33,10 @@
 
 #include <config.h>
 
+#if 0  /* Why was this included?  And without syssignal.h?  */
 /* On 4.3 this loses if it comes after xterm.h.  */
 #include <signal.h>
+#endif
 
 #include <stdio.h>
 
@@ -767,7 +769,14 @@
 With this form of menu, the return value is VALUE from the chosen item.
 
 If POSITION is nil, don't display the menu at all, just precalculate the
-cached information about equivalent key sequences.  */)
+cached information about equivalent key sequences.
+
+If the user gets rid of the menu without making a valid choice, for
+instance by clicking the mouse away from a valid choice or by typing
+keyboard input, then this normally results in a quit and
+`x-popup-menu' does not return.  But if POSITION is a mouse button
+event (indicating that the user invoked the menu with the mouse) then
+no quit occurs and `x-popup-menu' returns nil.  */)
      (position, menu)
      Lisp_Object position, menu;
 {
@@ -1005,7 +1014,11 @@
 An ITEM may also be just a string--that makes a nonselectable item.
 An ITEM may also be nil--that means to put all preceding items
 on the left of the dialog box and all following items on the right.
-\(By default, approximately half appear on each side.)  */)
+\(By default, approximately half appear on each side.)
+
+If the user gets rid of the dialog box without making a valid choice,
+for instance using the window manager, then this produces a quit and
+`x-popup-dialog' does not return.  */)
      (position, contents)
      Lisp_Object position, contents;
 {
--- a/src/xterm.c	Thu May 12 02:47:44 2005 +0000
+++ b/src/xterm.c	Thu May 12 03:41:19 2005 +0000
@@ -7769,6 +7769,12 @@
 #define NO_INLINE
 #endif
 
+/* Some versions of GNU/Linux define noinline in their headers.  */
+
+#ifdef noinline
+#undef noinline
+#endif
+
 /* On older GCC versions, just putting x_error_quitter
    after x_error_handler prevents inlining into the former.  */