changeset 83308:63b7247f4be6

Merged from miles@gnu.org--gnu-2005 (patch 70-73, 320-331) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-320 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-321 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-322 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-323 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-324 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-325 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-326 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-327 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-328 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-329 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-330 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-331 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-70 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-71 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-72 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-73 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-348
author Karoly Lorentey <lorentey@elte.hu>
date Sat, 28 May 2005 21:04:38 +0000
parents 21eea50897a7 (current diff) 787677122f52 (diff)
children 6aee1e9b0bd7
files admin/FOR-RELEASE lisp/ChangeLog lisp/bindings.el lisp/calendar/todo-mode.el lisp/emacs-lisp/bytecomp.el lisp/faces.el lisp/files.el lisp/font-lock.el lisp/forms.el lisp/progmodes/ada-mode.el lisp/progmodes/autoconf.el lisp/progmodes/delphi.el lisp/progmodes/gdb-ui.el lisp/progmodes/idlw-shell.el lisp/progmodes/idlwave.el lisp/progmodes/vhdl-mode.el lisp/simple.el lisp/startup.el lisp/subr.el lisp/vc-cvs.el lisp/vc.el lispref/ChangeLog man/ChangeLog src/alloc.c src/buffer.c src/fileio.c src/keyboard.c src/lisp.h src/process.c src/window.c src/xdisp.c src/xmenu.c src/xterm.c
diffstat 216 files changed, 3341 insertions(+), 1435 deletions(-) [+]
line wrap: on
line diff
--- a/admin/FOR-RELEASE	Fri May 20 17:44:36 2005 +0000
+++ b/admin/FOR-RELEASE	Sat May 28 21:04:38 2005 +0000
@@ -88,23 +88,26 @@
 
 ** Add missing years in copyright notices of all files.
 
+Policy document admin/notes/years must be updated before
+making further progress on this task!!!
+
 Please record your name here and say which part of the distribution
 you're going to handle.
 
 DIRECTORY		STATUS		IN CHARGE
 ---------		------		---------
 leim			working		Kenichi Handa
-lisp/calc		done		Thien-Thi Nguyen
+lisp/calc		working		Thien-Thi Nguyen
 lisp/calendar		working		Glenn Morris
-lisp/emulation		done		Thien-Thi Nguyen
+lisp/emulation		working		Thien-Thi Nguyen
 lisp/eshell		working		Thien-Thi Nguyen
 lisp/international	done		Kenichi Handa
 lisp/languages		done		Kenichi Handa
-lisp/mh-e		done		Thien-Thi Nguyen
-lisp/net		done		Thien-Thi Nguyen
-lisp/play		done		Thien-Thi Nguyen
-lisp/term		done		Thien-Thi Nguyen
-lisp/toolbar		done		Thien-Thi Nguyen
+lisp/mh-e		working		Thien-Thi Nguyen
+lisp/net		working		Thien-Thi Nguyen
+lisp/play		working		Thien-Thi Nguyen
+lisp/term		working		Thien-Thi Nguyen
+lisp/toolbar		working		Thien-Thi Nguyen
 lisp/url		working		Thien-Thi Nguyen
 
 ** Update AUTHORS.
@@ -132,7 +135,7 @@
 man/custom.texi     Chong Yidong
 man/dired.texi      Chong Yidong     joakim@verona.se
 man/display.texi    "Luc Teirlinck"  Chong Yidong
-man/emacs.texi      "Luc Teirlinck"
+man/emacs.texi      "Luc Teirlinck"  Lute Kamstra
 man/entering.texi   "Luc Teirlinck"  Chong Yidong
 man/files.texi      "Luc Teirlinck"  Chong Yidong
 man/fixit.texi      "Luc Teirlinck"  Chong Yidong
--- a/admin/notes/years	Fri May 20 17:44:36 2005 +0000
+++ b/admin/notes/years	Sat May 28 21:04:38 2005 +0000
@@ -1,3 +1,10 @@
+
+
+  THIS DOCUMENT IS UNDER REVIEW.
+
+  DO NOT FOLLOW THESE INSTRUCTIONS -- THEY ARE NOT CORRECT.
+
+
 How to Maintain Copyright Years for GNU Emacs
 
 
--- a/etc/NEWS	Fri May 20 17:44:36 2005 +0000
+++ b/etc/NEWS	Sat May 28 21:04:38 2005 +0000
@@ -732,7 +732,7 @@
 If value is `left' or `right', both angle and arrow bitmaps are
 displayed in the left or right fringe, resp.
 
-The value can also be an alist which specifies the presense and
+The value can also be an alist which specifies the presence and
 position of each bitmap individually.
 
 For example, ((top . left) (t .  right)) places the top angle bitmap
@@ -2994,6 +2994,10 @@
 
 * Incompatible Lisp Changes in Emacs 22.1
 
+---
+** The variables post-command-idle-hook and post-command-idle-delay have
+    been removed.  Use run-with-idle-timer instead.
+
 +++
 ** `suppress-keymap' now works by remapping `self-insert-command' to
 the command `undefined'.  (In earlier Emacs versions, it used
@@ -3012,10 +3016,6 @@
 
 ** General Lisp changes:
 
----
-*** The variables post-command-idle-hook and post-command-idle-delay have
-    been removed.  Use run-with-idle-timer instead.
-
 +++
 *** The function `eql' is now available without requiring the CL package.
 
@@ -3630,6 +3630,7 @@
 `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
@@ -4770,6 +4771,11 @@
 to display the size of the accessible part of the buffer on the mode
 line.
 
+*** Mouse-face on mode-line (and header-line) is now supported.
+`mode-line-highlight' is the standard face indicating mouse sensitive
+elements on mode-line (and header-line) like `highlight' face on text
+areas.
+
 ** Menu manipulation changes:
 
 ---
@@ -14247,7 +14253,7 @@
 ----------------------------------------------------------------------
 Copyright information:
 
-Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
 
    Permission is granted to anyone to make or distribute verbatim copies
    of this document as received, in any medium, provided that the
--- a/lib-src/ChangeLog	Fri May 20 17:44:36 2005 +0000
+++ b/lib-src/ChangeLog	Sat May 28 21:04:38 2005 +0000
@@ -1,3 +1,8 @@
+2005-05-25  Thien-Thi Nguyen  <ttn@gnu.org>
+
+	* yow.c (setup_yow): Use EXIT_FAILURE in case no separators found.
+	(yow): Use EXIT_FAILURE in case of memory error.
+
 2005-05-13  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
 	* make-docfile.c (DIRECTORY_SEP): New macro.
--- a/lib-src/yow.c	Fri May 20 17:44:36 2005 +0000
+++ b/lib-src/yow.c	Sat May 28 21:04:38 2005 +0000
@@ -104,7 +104,7 @@
   while ((c = getc(fp)) != SEP) {
     if (c == EOF) {
       fprintf(stderr, "yow: file contains no separators\n");
-      exit(2);
+      exit(EXIT_FAILURE);
     }
   }
   header_len = ftell(fp);
@@ -157,7 +157,7 @@
   buf = (char *) malloc(bufsize);
   if (buf == (char *)0) {
     fprintf(stderr, "yow: virtual memory exhausted\n");
-    exit (3);
+    exit (EXIT_FAILURE);
   }
 
   buf[i++] = c;
@@ -170,7 +170,7 @@
       buf = (char *) realloc(buf, bufsize);
       if (buf == (char *)0) {
 	fprintf(stderr, "yow: virtual memory exhausted\n");
-	exit (3);
+	exit (EXIT_FAILURE);
       }
     }
   }
--- a/lisp/ChangeLog	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/ChangeLog	Sat May 28 21:04:38 2005 +0000
@@ -1,5 +1,538 @@
+2005-05-28  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gdb-ui.el (gdb-all-registers): New variable.
+	(gdb-registers-buffer, toggle-gdb-all-registers):
+	Toggle display of floating point registers.
+	(gdb-registers-mode-map): Bind SPC to toggle-gdb-all-registers.
+
+	* progmodes/gud.el (gud-goto-info): Use info. Don't use require.
+	(toggle-gud-tooltip-dereference):
+	Rename from gud-toggle-tooltip-dereference.
+
+2005-05-27  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* info.el (Info-goto-node): Revert autoload addition (2004-06-12).
+
+2005-05-27  Jay Belanger  <belanger@truman.edu>
+
+	* calc/calc-prog.el (calc-kbd-report): Remove.
+	(calc-kbd-query): Rewrite.
+
+2005-05-27  Juanma Barranquero  <lekktu@gmail.com>
+
+	* image.el (image-library-alist): Move to image.c.
+	(image-type-available-p): Doc fix.
+
+2005-05-27  Lute Kamstra  <lute@gnu.org>
+
+	* calc/calc.el (calc):
+	* outline.el (outline-1, outline-2, outline-3, outline-4)
+	(outline-5, outline-6, outline-7, outline-8):
+	* textmodes/dns-mode.el (dns-mode):
+	* textmodes/sgml-mode.el (sgml-namespace-face):
+	* textmodes/tex-mode.el (superscript, subscript, tex-math-face)
+	(tex-verbatim-face, tex-use-reftex):
+	* textmodes/texinfo.el (texinfo-heading-face):
+	Specify customization group.
+
+	* longlines.el: Don't require easy-mmode.
+	(longlines-visible-face): Specify customization group.
+
+2005-05-27  Kenichi Handa  <handa@m17n.org>
+
+	* language/cyrillic.el: Add cyrillic-iso8859-5 characters in the
+	encoding table of windows-1251.
+
+	* international/ucs-tables.el (ucs-set-table-for-input):
+	If translation-table-for-input of a coding system is a symbol, get
+	its translation-table property.
+
+	* international/code-pages.el: Don't register a coding system into
+	non-iso-charset-alist more than once.
+	(cp-make-coding-system): Likewise.
+
+2005-05-26  John Wiegley  <johnw@newartisans.com>
+
+	* eshell/esh-cmd.el (eshell-eval-command): If the return value of
+	`eshell-resume-eval' is wrapped in a list, it indicates that the
+	command was run asynchronously.  In that case, unwrap the value
+	before checking the delimiter value.
+
+	* eshell/em-cmpl.el (eshell-complete-parse-arguments): If the
+	character before a space at the end of a line is \, assume the space
+	is part of the last argument rather than a final argument separator.
+
+	* eshell/esh-io.el (eshell-get-target): If `eshell-buffer-shorthand'
+	is in use, and the target is `t' or `nil' (which are the most common
+	values), don't assume that the symbol target is a buffer.
+
+2005-05-26  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* calendar/calendar.el (calendar-mode-line-format):
+	Use mode-line-highlight as mouse-face.
+
+	* time.el (display-time-string-forms, display-time-update):
+	Use mode-line-highlight as mouse-face.
+
+2005-05-26  Jay Belanger  <belanger@truman.edu>
+
+	* calc/calc.el (calc-language-alist): Remove extra defvar.
+
+2005-05-26  Lute Kamstra  <lute@gnu.org>
+
+	* arc-mode.el (archive-mode):
+	* bookmark.el (bookmark-read-annotation-mode)
+	(bookmark-edit-annotation-mode, bookmark-bmenu-mode):
+	* bs.el (bs-mode):
+	* calc/calc-yank.el (calc-edit-mode):
+	* calc/calc.el (calc-mode, calc-trail-mode):
+	* calculator.el (calculator-mode):
+	* chistory.el (command-history-mode):
+	* comint.el:
+	* cus-edit.el (custom-mode):
+	* descr-text.el (describe-text-mode):
+	* ebuff-menu.el (Electric-buffer-menu-mode):
+	* ediff-util.el (ediff-mode):
+	* emacs-lisp/re-builder.el (reb-mode):
+	* emulation/vi.el (vi-mode-setup):
+	* emulation/ws-mode.el (wordstar-mode):
+	* eshell/esh-mode.el (eshell-mode):
+	* forms.el (forms-mode):
+	* help-mode.el (help-mode):
+	* hexl.el (hexl-mode):
+	* ibuffer.el (ibuffer-mode):
+	* ielm.el (inferior-emacs-lisp-mode):
+	* info.el (Info-mode, Info-edit-mode):
+	* international/swedish.el:
+	* ledit.el (ledit-from-lisp-mode):
+	* locate.el (locate-mode):
+	* mail/rmail.el (rmail-mode):
+	* mail/rmailedit.el (rmail-edit-mode):
+	* mail/rmailsum.el (rmail-summary-mode):
+	* mail/supercite.el (sc-electric-mode):
+	* net/eudc.el (eudc-mode):
+	* net/quickurl.el (quickurl-list-mode):
+	* net/snmp-mode.el (snmp-mode, snmpv2-mode):
+	* obsolete/ooutline.el (outline-mode):
+	* obsolete/options.el (Edit-options-mode):
+	* obsolete/rnews.el (news-mode):
+	* obsolete/rnewspost.el (news-reply-mode):
+	* play/5x5.el (5x5-mode):
+	* play/decipher.el (decipher-mode, decipher-stats-mode):
+	* play/gomoku.el (gomoku-mode):
+	* play/snake.el (snake-mode):
+	* play/solitaire.el (solitaire-mode):
+	* play/tetris.el (tetris-mode):
+	* progmodes/ada-mode.el (ada-mode):
+	* progmodes/antlr-mode.el (antlr-mode):
+	* progmodes/autoconf.el (autoconf-mode):
+	* progmodes/dcl-mode.el (dcl-mode):
+	* progmodes/delphi.el (delphi-mode):
+	* progmodes/ebrowse.el (ebrowse-tree-mode)
+	(ebrowse-electric-list-mode, ebrowse-member-mode)
+	(ebrowse-electric-position-mode):
+	* progmodes/f90.el (f90-mode):
+	* progmodes/fortran.el (fortran-mode):
+	* progmodes/icon.el (icon-mode):
+	* progmodes/idlw-help.el (idlwave-help-mode):
+	* progmodes/idlw-shell.el (idlwave-shell-mode):
+	* progmodes/idlwave.el (idlwave-mode):
+	* progmodes/inf-lisp.el (inferior-lisp-mode):
+	* progmodes/m4-mode.el (m4-mode):
+	* progmodes/meta-mode.el (metafont-mode, metapost-mode):
+	* progmodes/modula2.el (modula-2-mode):
+	* progmodes/octave-inf.el (inferior-octave-mode):
+	* progmodes/octave-mod.el (octave-mode):
+	* progmodes/pascal.el (pascal-mode):
+	* progmodes/sh-script.el (sh-mode):
+	* progmodes/sql.el (sql-mode, sql-interactive-mode):
+	* progmodes/vhdl-mode.el (vhdl-mode):
+	* progmodes/xscheme.el (scheme-interaction-mode):
+	* replace.el (occur-mode):
+	* ses.el (ses-mode):
+	* simple.el (completion-list-mode):
+	* skeleton.el:
+	* speedbar.el (speedbar-mode):
+	* term.el (term-mode):
+	* terminal.el (terminal-edit-mode):
+	* textmodes/reftex-index.el (reftex-index-mode)
+	(reftex-index-phrases-mode):
+	* textmodes/reftex-sel.el (reftex-select-label-mode)
+	(reftex-select-bib-mode):
+	* textmodes/reftex-toc.el (reftex-toc-mode):
+	* wdired.el (wdired-change-to-wdired-mode):
+	* wid-browse.el (widget-browse-mode):
+	Use run-mode-hooks.
+
+	* array.el (array-mode):
+	* calendar/todo-mode.el (todo-mode):
+	* man.el (Man-mode):
+	* play/landmark.el (lm-mode):
+	* play/mpuz.el (mpuz-mode):
+	Use kill-all-local-variables and run-mode-hooks.
+
+	* subr.el (delay-mode-hooks): Specify indentation.
+
+2005-05-26  Mark A. Hershberger  <mah@everybody.org>
+
+	* xml.el (xml-substitute-special): Don't die for undefined xml entities.
+
+2005-05-26  Jay Belanger  <belanger@truman.edu>
+
+	* calc/calc-prog.el (calc-user-define-edit): Don't find substring
+	of nil.
+
+2005-05-27  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gdb-ui.el (gdb-frame-address):
+	Rename from gdb-current-address.
+	(gdb-previous-frame-address): Rename from gdb-previous-address.
+	(gdb-selected-frame): Rename from gdb-current-frame.
+	(gdb-get-selected-frame): Rename from gdb-get-current-frame.
+	(gdb-frame-number): Rename from gdb-current-stack-level.
+	(gdb-ann3): Match new mode-name for disassembly buffer.
+	Extend initialisation of variables.
+	(gdb-post-prompt): Update disassembly from gdb-frame-handler.
+	(gdb-memory-mode): Use mouse-face in header line.
+	(gdb-assembler-buffer-name): Call it disassembly and give frame
+	in mode line.
+	(gdb-source-spec-regexp, gdb-assembler-custom)
+	(gdb-invalidate-assembler, gdb-frame-handler):
+	Make robust to leading zeroes in address format.
+
+2005-05-26  Carsten Dominik  <dominik@science.uva.nl>
+
+	* textmodes/org.el (org-mode): Use `define-derived-mode' to
+	define `org-mode'.
+	(org-agenda-mode): Use `run-mode-hooks' instead of `run-hooks'.
+
+2005-05-26  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* log-edit.el (log-edit-changelog-entries): Distinguish between
+	filenames like xfns.c and fns.c.
+
+2005-05-25  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* buff-menu.el (Buffer-menu-revert-function): Improve handling of
+	point after reverting.
+	(Buffer-menu-make-sort-button): Handle the case where
+	`Buffer-menu-use-header-line' is nil.
+
+2005-05-25  Thien-Thi Nguyen  <ttn@gnu.org>
+
+	* vms-patch.el (vms-magic-right-square-brace, vms-magic-colon):
+	New funcs.  In minibuffer-local-completion-map bind `]', `/'
+	and `:' to them.
+
+2005-05-25  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* startup.el (normal-top-level): Allow modification of load-path while
+	we're iterating over it.
+
+2005-05-25  Juanma Barranquero  <lekktu@gmail.com>
+
+	* thumbs.el (thumbs-thumbsdir-max-size, thumbs-temp-file)
+	(thumbs-cleanup-thumbsdir, thumbs-call-convert)
+	(thumbs-resize-interactive, thumbs-insert-image)
+	(thumbs-insert-thumb, thumbs-dired-show-marked)
+	(thumbs-find-image-at-point, thumbs-delete-images)
+	(thumbs-rename-images, thumbs-next-image, thumbs-dired-setroot)
+	(thumbs-increment-image-size, thumbs-decrement-image-size):
+	Fix typos in docstrings.
+
+2005-05-24  Andre Spiegel  <spiegel@gnu.org>
+
+	* progmodes/cperl-mode.el (cperl-vc-header-alist): Obsolete.
+	(cperl-vc-rcs-header, cperl-vc-sccs-header): New user options.
+	(cperl-mode): Use them.
+
+2005-05-24  Juanma Barranquero  <lekktu@gmail.com>
+
+	* window.el (quit-window, shrink-window-if-larger-than-buffer):
+	Doc fixes.
+
+2005-05-24  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gdb-ui.el (gdb-inferior-io-mode-map):
+	Bind C-d to gdb-inferior-io-eof.
+
+	* dired.el (dired-dnd-popup-notice): Use message-box.
+
+2005-05-23  Masatake YAMATO  <jet@gyve.org>
+
+	* bindings.el (mode-line-major-mode-keymap):
+	Bind [mode-line down-mouse-1] to `mouse-major-mode-menu'.
+
+	* faces.el (mode-line-highlight): New face.
+
+	* ruler-mode.el (ruler-mode-ruler): Use mode-line-highlight
+	as mouse-face.
+
+	* bindings.el (top-level, help-echo, mode-line-modified)
+	(mode-line-mule-info, mode-line-eol-desc): Use mode-line-highlight
+	as mouse-face.
+
+2005-05-23  Juanma Barranquero  <lekktu@gmail.com>
+
+	* progmodes/cc-engine.el (c-guess-basic-syntax):
+	Remove spurious call to `zerop'.
+
+	* emacs-lisp/cl.el (acons, pairlis): Add docstring.
+
+2005-05-23  Martin Stjernholm  <bug-cc-mode@gnu.org>
+
+	CC Mode update to 5.30.10:
+
+	* cc-fonts.el (c-font-lock-declarators): Fix bug where the point
+	could go past the limit in decoration level 2, thereby causing
+	errors during interactive fontification.
+
+	* cc-mode.el (c-make-inherited-keymap): Fix cc-bytecomp bug when
+	the file is evaluated interactively.
+
+	* cc-engine.el (c-guess-basic-syntax): Handle operator
+	declarations somewhat better in C++.
+
+	* cc-styles.el, cc-mode.el (c-run-mode-hooks): New helper macro to
+	make use of `run-mode-hooks' which has been added in Emacs 21.1.
+	(c-mode, c++-mode, objc-mode, java-mode, idl-mode, pike-mode)
+	(awk-mode): Use it.
+	(make-local-hook): Suppress warning about obsoleteness.
+
+	* cc-engine.el, cc-align.el, cc-cmds.el
+	(c-append-backslashes-forward, c-delete-backslashes-forward)
+	(c-find-decl-spots, c-semi&comma-no-newlines-before-nonblanks):
+	Compensate for return value from `forward-line' when it has moved
+	but not to a different line due to eob.
+
+	* cc-engine.el (c-guess-basic-syntax): Fix anchoring in
+	`objc-method-intro' and `objc-method-args-cont'.
+
+2005-05-23  Alan Mackenzie  <bug-cc-mode@gnu.org>
+
+	CC Mode update to 5.30.10:
+
+	* cc-mode.el, cc-engine.el, cc-align.el: Change the FSF's address
+	in the copyright statement.  Incidentally, change "along with GNU
+	Emacs" to "along with this program" where it occurs.
+
+	* cc-mode.el: Add a fourth parameter `t' to the awk-mode autoload,
+	so that it is interactive, hence can be found by M-x awk-mode
+	whilst cc-mode is yet to be loaded.  Reported by Glenn Morris
+	<gmorris+emacs@ast.cam.ac.uk>.
+
+	* cc-awk.el: Add character classes (e.g. "[:alpha:]") into AWK
+	Mode's regexps.
+
+2005-05-23  Kevin Ryde  <user42@zip.com.au>
+
+	* cc-align.el (c-lineup-argcont): Ignore conses for {} pairs from
+	c-parse-state, to avoid a lisp error (on bad code).
+
+2005-05-23  Lute Kamstra  <lute@gnu.org>
+
+	* subr.el (font-lock-defaults): Remove defvar as it's already
+	defined in font-core.el.
+
+	* font-lock.el (font-lock-beginning-of-syntax-function): Fix docstring.
+
+2005-05-23  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gdb-ui.el (gdb-info-locals-handler): Make regexps
+	more general and work when GDB variable "print pretty" is on,
+	as with Emacs, for example.
+
+2005-05-22  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* font-core.el: Update comment.
+
+	* emacs-lisp/easy-mmode.el (define-global-minor-mode):
+	Use `after-change-major-mode-hook' instead of `find-file-hook'.
+
+	* buff-menu.el (Buffer-menu-mode): Use `run-mode-hooks'.
+
+2005-05-22  Eli Zaretskii  <eliz@gnu.org>
+
+	* simple.el (yank, yank-pop): Mention `yank-excluded-properties'
+	and `yank-handler' in the doc strings.
+
+2005-05-22  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* emacs-lisp/cl.el (eql): Remove.  It's a builtin already.
+
+2005-05-22  Richard M. Stallman  <rms@gnu.org>
+
+	* help.el (describe-key): Move print-help-return-message call
+	out of conditional.
+
+	* progmodes/etags.el (list-tags): Use with-no-warnings.
+
+	* mail/smtpmail.el (smtpmail-open-stream): Use with-no-warnings.
+	(smtpmail-send-queued-mail): Avoid beginning-of-buffer.
+	(starttls-extra-args, starttls-extra-arguments): Add defvars.
+
+	* mail/mailalias.el (mail-get-names): Avoid beginning-of-buffer.
+
+	* language/viet-util.el (viet-viscii-nonascii-translation-table):
+	Add defvar.
+
+	* emulation/viper-ex.el (viper-ex-work-buf, viper-ex-print-buf):
+	Use defvar, not defconst.
+
+	* hexl.el (hexl-follow-line): Use with-no-warnings.
+
+	* emulation/tpu-extras.el: Use write-file-functions instead of
+	write-file-hooks.
+
+	* dired.el (dired-font-lock-keywords): Fontify files with junk
+	extensions even if marked by -F.
+
+2005-05-22  Juanma Barranquero  <lekktu@gmail.com>
+
+	* emacs-lisp/cl.el (pushnew, cl-macroexpand, floatp-safe, plusp)
+	(minusp, oddp, evenp, mapcar*, list*, copy-list, adjoin, subst):
+	* emacs-lisp/cl-extra.el (coerce, map, maplist, cl-mapc, mapl)
+	(mapcan, mapcon, some, every, notany, notevery, signum, isqrt)
+	(concatenate, list-length, get*, getf, cl-remprop):
+	* emacs-lisp/cl-macs.el (function*, case, ecase, typecase)
+	(etypecase, progv, lexical-let, lexical-let*)
+	(multiple-value-bind, multiple-value-setq, shiftf):
+	Improve argument/docstring consistency.
+
+	* subr.el (focus-frame, unfocus-frame):
+	Revert deletion on 2005-05-01.
+
+2005-05-22  Andre Spiegel  <spiegel@gnu.org>
+
+	* vc-cvs.el (vc-cvs-checkout-model): Handle the case where FILE
+	doesn't exist.
+
+	* vc.el (vc-trunk-p): Add autoload cookie.  The function is used in
+	vc-rcs.el when vc-mistrust-permissions is t, which is not the default.
+
+2005-05-22  Nick Roberts  <nickrob@snap.net.nz>
+
+	* emacs-lisp/bytecomp.el: Remove make-obsolete-variable for
+	already deleted variables: auto-fill-hook, blink-paren-hook,
+	lisp-indent-hook, inhibit-local-variables, unread-command-event
+	suspend-hooks, comment-indent-hook, meta-flag,
+	before-change-function, after-change-function,
+	font-lock-doc-string-face.
+
+2005-05-21  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* emacs-lisp/derived.el (define-derived-mode): Doc fix.
+
+2005-05-21  Eli Zaretskii  <eliz@gnu.org>
+
+	* mail/rmail.el (rmail-reply): Filter the list in reply-to through
+	rmail-dont-reply-to.
+
+2005-05-21  Frederik Fouvry  <fouvry@CoLi.Uni-SB.DE>
+
+	* mail/sendmail.el (mail-send): Use [[:space:]] instead of a
+	literal blank when splitting new-header-values.
+
+2005-05-21  Matt Hodges  <MPHodges@member.fsf.org>
+
+	* calendar/cal-menu.el (cal-menu-update): Add separator as a
+	string so that tmm doesn't create a completion entry for it.
+
+	* textmodes/table.el (table-disable-menu): Ditto.
+
+2005-05-21  Richard M. Stallman  <rms@gnu.org>
+
+	* progmodes/idlwave.el (idlwave-doc-header): Use insert-file-contents.
+
+	* progmodes/flymake.el (flymake-makehash): Use with-no-warnings.
+
+	* net/rcompile.el (remote-compile): Use compilation-start.
+
+	* tmm.el (tmm-shortcut): Avoid using beginning-of-buffer.
+
+2005-05-21  Daniel Pfeiffer  <occitan@esperanto.org>
+
+	* files.el (auto-mode-alist): Check GNUmakefile before makefile.
+	Default to makefile-bsdmake-mode on BSD systems.
+
+	* imenu.el (imenu-generic-expression, imenu--generic-function'):
+	REGEXP may also be a search function now.  The part of doc-string
+	for describing the structure was 95% identical to that of
+	`imenu--generic-function'.  Unify it there.
+
+	* progmodes/make-mode.el (makefile-imenu-generic-expression):
+	Use function to find dependencies, because regexp alone is so complex,
+	it easily goes into an endless loop.
+	(makefile-makepp-mode): Also add submenu for Perl functions
+	defined in the makefile.
+	(makefile-bsdmake-mode): Special imenu-generic-expression no
+	longer needed, due to function call.
+	(makefile-match-dependency): Take BOUND into account when checking
+	if we're through.
+
+2005-05-20  Jay Belanger  <belanger@truman.edu>
+
+	* calc/calc-units.el (calc-invalidate-units-table):
+	Use inhibit-read-only.
+	(math-build-units-table-buffer): Use view-mode.
+
+2005-05-20  David Kastrup  <dak@gnu.org>
+
+	* emacs-lisp/easymenu.el (easy-menu-add): Correct docstring since
+	easy-menu-add is not a nop on Emacs; and clarify when to call it.
+
+2005-05-20  Lute Kamstra  <lute@gnu.org>
+
+	* diff-mode.el (diff-header-face, diff-file-header-face)
+	(diff-index-face, diff-hunk-header-face, diff-removed-face)
+	(diff-added-face, diff-changed-face, diff-function-face)
+	(diff-context-face, diff-nonexistent-face): Put them in the
+	diff-mode customization group.
+
+2005-05-20  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* progmodes/vhdl-mode.el (vhdl-font-lock-match-item): Simplify regexp.
+
+	* progmodes/sh-script.el (sh-mode, sh-get-word): Minor regexp fixes.
+
+	* font-lock.el (lisp-font-lock-keywords-2): Don't error.
+	Minor regexp-optimization.
+
+2005-05-20  Carsten Dominik  <dominik@science.uva.nl>
+
+	* textmodes/org.el (org-agenda-toggle-time-grid): New command.
+	(org-agenda-use-time-grid, org-agenda-time-grid): New options.
+	(org-agenda-add-time-grid-maybe): New function.
+	(org-agenda): Call `org-agenda-add-time-grid-maybe'.
+	(org-table-create): `dotimes' instead of `mapcar'.
+	(org-xor): Simplify implementation.
+	(org-agenda): `inhibit-redisplay' turned on.
+	(org-agenda-change-all-lines): Use `org-format-agenda-item' to get
+	a consistent line after a state change.
+	(org-agenda-remove-times-when-in-prefix): New option.
+	(org-prefix-has-time): New variable.
+	(org-parse-time-string): Optional argument NODEFAULT.
+	(org-format-agenda-item): Parse items for time-of-day
+	specifications and move these into the prefix if possible.
+	(org-agenda-priority): Get current heading, not previous heading
+	during agenda remote editing.
+
 2005-05-20  Juanma Barranquero  <lekktu@gmail.com>
 
+	* emacs-lisp/cl-seq.el (reduce, fill, replace, remove*)
+	(remove-if, remove-if-not, delete*, delete-if, delete-if-not)
+	(remove-duplicates, delete-duplicates, substitute)
+	(substitute-if, substitute-if-not, nsubstitute, nsubstitute-if)
+	(nsubstitute-if-not, find, find-if, find-if-not, position)
+	(position-if, position-if-not, count, count-if, count-if-not)
+	(mismatch, search, sort*, stable-sort, merge, member*)
+	(member-if, member-if-not, assoc*, assoc-if, assoc-if-not)
+	(rassoc*, rassoc-if, rassoc-if-not, union, nunion)
+	(intersection, nintersection, set-difference, nset-difference)
+	(set-exclusive-or, nset-exclusive-or, subsetp, subst-if)
+	(subst-if-not, nsubst, nsubst-if, nsubst-if-not, sublis)
+	(nsublis, tree-equal): Improve argument/docstring consistency.
+
 	* subr.el (send-string, send-region):
 	Remove obsolescence declaration.
 	(window-dot, set-window-dot, read-input, show-buffer)
@@ -68,6 +601,7 @@
 	(left-fringe-p): Function deleted.
 
 	* buff-menu.el (Buffer-menu-buffer-face): In group Buffer-menu.
+	(list-buffers-noselect): Set `font-lock-face' property, not `face'.
 
 	* dired-aux.el (dired-copy-file-recursive): Handle symlinks
 	in recursive copy.
@@ -89,7 +623,7 @@
 
 2005-05-19  Carsten Dominik  <dominik@science.uva.nl>
 
-	* textmodes/reftex.el (reftex-isearch-minor-mode): Moved the
+	* textmodes/reftex.el (reftex-isearch-minor-mode): Move the
 	definition of this variable from reftex-global.el to reftex.el,
 	because it is needed in the menu.
 
@@ -112,8 +646,8 @@
 	(makefile-add-this-line-macro): Simplify and integrate into
 	`makefile-pickup-macros.
 	(makefile-pickup-filenames-as-targets): Simplify.
-	(makefile-previous-dependency, makefile-match-dependency): Don't
-	stumble over `::'.
+	(makefile-previous-dependency, makefile-match-dependency):
+	Don't stumble over `::'.
 
 2005-05-19  Nick Roberts  <nickrob@snap.net.nz>
 
@@ -127,8 +661,8 @@
 	* help-fns.el (describe-variable): Remove hyperlinks in a
 	variable's value as these are quite frequently inappropriate.
 
-	* follow.el (follow-submit-feedback, follow-mode): Remove
-	references to post-command-idle-hook.
+	* follow.el (follow-submit-feedback, follow-mode):
+	Remove references to post-command-idle-hook.
 
 2005-05-18  Daniel Pfeiffer  <occitan@esperanto.org>
 
@@ -138,8 +672,8 @@
 
 2005-05-18  Jay Belanger  <belanger@truman.edu>
 
-	* calc/calc-help.el (calc-s-prefix-help): Add
-	`calc-copy-special-constant' to help string.
+	* calc/calc-help.el (calc-s-prefix-help):
+	Add `calc-copy-special-constant' to help string.
 
 2005-05-18  Luc Teirlinck  <teirllm@auburn.edu>
 
@@ -152,8 +686,8 @@
 
 2005-05-18  Carsten Dominik  <dominik@science.uva.nl>
 
-	* textmodes/reftex-vars.el (reftex-cite-format-builtin): Support
-	for jurabib.
+	* textmodes/reftex-vars.el (reftex-cite-format-builtin):
+	Support for jurabib.
 
 	* textmodes/reftex.el (featurep): Define aliases for overlay
 	commands, for XEmacs compatibility, and use these aliases in
@@ -164,8 +698,8 @@
 	(reftex-access-search-path): Use `reftex-uniquify' instead of
 	`reftex-uniq'
 
-	* textmodes/reftex-sel.el (reftex-select-unmark): Overlay
-	`before-string' property modification enables for Emacs as well.
+	* textmodes/reftex-sel.el (reftex-select-unmark):
+	Overlay `before-string' property modification enables for Emacs as well.
 	(reftex-select-item): Use `reftex-delete-overlay'.
 	(reftex-select-mark): Use `reftex-make-overlay' and
 	`reftex-overlay-put'.
@@ -200,8 +734,7 @@
 
 	* progmodes/prolog.el (inferior-prolog-mode): Doc fix.
 	(prolog-consult-region): Replace `send-string' by
-	`process-send-string'; replace `send-region' by
-	`process-send-region'.
+	`process-send-string'; replace `send-region' by `process-send-region'.
 
 	* progmodes/delphi.el (delphi-log-msg):
 	Replace `set-window-dot' by `set-window-point'.
@@ -232,8 +765,8 @@
 	loop.  It should also be more efficient, because first it only
 	searches for `:', instead of applying the very complex regexp.
 	(makefile-mode): Cancel `font-lock-support-mode', because blocks
-	to be fontified in one piece can be too long for JIT.  Makefiles
-	are never *that* big.
+	to be fontified in one piece can be too long for JIT.
+	Makefiles are never *that* big.
 
 2005-05-17  Reiner Steib  <Reiner.Steib@gmx.de>
 
@@ -259,8 +792,8 @@
 
 2005-05-16  Daniel Pfeiffer  <occitan@esperanto.org>
 
-	* font-lock.el (lisp-font-lock-keywords-1): Set
-	`font-lock-negation-char-face' for [^...] char group.
+	* font-lock.el (lisp-font-lock-keywords-1):
+	Set `font-lock-negation-char-face' for [^...] char group.
 	(lisp-font-lock-keywords-2): Highlight regexp's \\( \\| \\).
 
 	* progmodes/make-mode.el (makefile-dependency-regex): Turn it into
@@ -274,11 +807,10 @@
 	might be the same one to be skipped by the initial [^$], leading
 	to an overlooked variable use.
 	(makefile-make-font-lock-keywords): Remove two parameters, which
-	are now variables that some of the modes set locally.  Handle
-	dependency and rule action matching through functions, because
+	are now variables that some of the modes set locally.
+	Handle dependency and rule action matching through functions, because
 	regexps alone match too often.  Dependency matching now comes
-	last, so it can check, whether a colon already matched something
-	else.
+	last, so it can check, whether a colon already matched something else.
 	(makefile-mode): Inform that font-lock improves makefile parsing
 	capabilities.
 	(makefile-match-dependency, makefile-match-action): New functions.
@@ -363,8 +895,8 @@
 	(reftex-bib-sort-year-reverse, reftex-format-citation):
 	* textmodes/reftex-parse.el (reftex-init-section-numbers)
 	(reftex-section-number):
-	* textmodes/texinfmt.el (texinfo-paragraphindent): Replace
-	`string-to-int' by `string-to-number'.
+	* textmodes/texinfmt.el (texinfo-paragraphindent):
+	Replace `string-to-int' by `string-to-number'.
 
 	* international/latexenc.el: Add page marker to force the "Local
 	Variables:" string out of the last page.
@@ -472,23 +1004,22 @@
 	(tramp-pre-connection): Add parameter CHUNKSIZE.  Make local
 	variable `tramp-chunksize'.  Change callees.
 	(tramp-open-connection-setup-interactive-shell): Check remote host
-	for buggy `send-process-string' implementation.  Set
-	`tramp-chunksize' if found.  Reported by Michael Kifer
+	for buggy `send-process-string' implementation.
+	Set `tramp-chunksize' if found.  Reported by Michael Kifer
 	<kifer@cs.sunysb.edu> (and a lot of other people all the years).
 	(tramp-handle-shell-command): `insert-buffer' cannot be used
 	because the contents of the Tramp buffer is changed before
 	insertion (`expand-file' and alike).  Reported by Fr,Ai(Bd,Ai(Bric Bothamy
 	<frederic.bothamy@free.fr>.
 	(tramp-set-auto-save): Actions should be done for Tramp file name
-	handler only.  Ange-FTP has its own auto-save mechanism.  Reported
-	by Richard G. Bielawski <Richard.G.Bielawski@wellsfargo.com>.
+	handler only.  Ange-FTP has its own auto-save mechanism.
+	Reported by Richard G. Bielawski <Richard.G.Bielawski@wellsfargo.com>.
 	(tramp-set-auto-save-file-modes): Set file modes of
 	`buffer-auto-save-file-name' to ?\600 as fallback solution.
 	Reported by Ferenc Wagner <wferi@tba.elte.hu>.
 	(tramp-bug): Remove obsolete variable.
 	(tramp-append-tramp-buffers): Rewrite partly.  More suitable check
-	for presence of `mml-mode'.  Make it running for older Emacsen as
-	well.
+	for presence of `mml-mode'.  Make it running for older Emacsen as well.
 
 2005-05-14  John Paul Wallington  <jpw@pobox.com>
 
@@ -540,15 +1071,14 @@
 
 2005-05-13  Matt Hodges  <MPHodges@member.fsf.org>
 
-	* tmm.el (tmm-get-keymap): Include only active menus and menu
-	items.
+	* tmm.el (tmm-get-keymap): Include only active menus and menu items.
 
 	* emacs-lisp/easymenu.el (easy-menu-define): Doc fixes.
 
 2005-05-13  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
 
 	* dired.el (dired-mode): make-variable-buffer-local =>
-	make-local-variable
+	make-local-variable.
 
 2005-05-13  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
@@ -9597,7 +10127,7 @@
 	(Info-build-toc): Don't check for special Info file names.
 	Set main-file to nil if Info-find-file returns a symbol.
 
-2004-10-05  Emilio C. Lopes  <eclig@gmx.net>:
+2004-10-05  Emilio C. Lopes  <eclig@gmx.net>
 
 	* calendar/calendar.el (calendar-goto-iso-week): Add autoload.
 	(calendar-mode-map): Add binding for `calendar-goto-iso-week'.
--- a/lisp/arc-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/arc-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -672,7 +672,7 @@
 	(setq major-mode 'archive-mode)
 	(setq mode-name (concat typename "-Archive"))
 	;; Run archive-foo-mode-hook and archive-mode-hook
-	(run-hooks (archive-name "mode-hook") 'archive-mode-hook)
+	(run-mode-hooks (archive-name "mode-hook") 'archive-mode-hook)
 	(use-local-map archive-mode-map))
 
       (make-local-variable 'archive-proper-file-start)
--- a/lisp/array.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/array.el	Sat May 28 21:04:38 2005 +0000
@@ -872,6 +872,7 @@
 Entering array mode calls the function `array-mode-hook'."
 
   (interactive)
+  (kill-all-local-variables)
   ;; Number of rows in the array.
   (make-local-variable 'array-max-row)
   ;; Number of columns in the array.
@@ -907,7 +908,7 @@
   (setq truncate-lines t)
   (setq overwrite-mode 'overwrite-mode-textual)
   (use-local-map array-mode-map)
-  (run-hooks 'array-mode-hook))
+  (run-mode-hooks 'array-mode-hook))
 
 
 
--- a/lisp/bindings.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/bindings.el	Sat May 28 21:04:38 2005 +0000
@@ -165,7 +165,8 @@
 	     (eval-when-compile
 	       (let ((map (make-sparse-keymap)))
 		 (define-key map [mode-line mouse-3] 'mode-line-change-eol)
-		 map))))
+		 map))
+	     'mouse-face 'mode-line-highlight))
       (push (cons eol (cons mnemonic desc)) mode-line-eol-desc-cache)
       desc)))
 
@@ -177,7 +178,8 @@
 			     "Input method: "
 			     current-input-method
 			     ".  mouse-2: disable, mouse-3: describe")
-		  local-map ,mode-line-input-method-map))
+		  local-map ,mode-line-input-method-map
+		  mouse-face mode-line-highlight))
     ,(propertize
       "%z"
       'help-echo
@@ -191,6 +193,7 @@
 			  " buffer; mouse-3: describe coding system")
 		(concat "Unibyte " (symbol-name buffer-file-coding-system)
 			" buffer")))))
+      'mouse-face 'mode-line-highlight
       'local-map mode-line-coding-system-map)
     (:eval (mode-line-eol-desc)))
   "Mode-line control for displaying information of multilingual environment.
@@ -235,7 +238,8 @@
 					    "Not r")))))
 	 'local-map (purecopy (make-mode-line-mouse-map
 			       'mouse-3
-			       #'mode-line-toggle-read-only)))
+			       #'mode-line-toggle-read-only))
+	 'mouse-face 'mode-line-highlight)
 	(propertize
 	 "%1+"
 	 'help-echo  (purecopy (lambda (window object point)
@@ -246,7 +250,8 @@
 					     "M"
 					   "Not m")))))
 	 'local-map (purecopy (make-mode-line-mouse-map
-			       'mouse-3 #'mode-line-toggle-modified))))
+			       'mouse-3 #'mode-line-toggle-modified))
+	 'mouse-face 'mode-line-highlight))
   "Mode-line control for displaying whether current buffer is modified.")
 
 (make-variable-buffer-local 'mode-line-modified)
@@ -262,6 +267,7 @@
 
 (defvar mode-line-major-mode-keymap
   (let ((map (make-sparse-keymap)))
+    (define-key map [mode-line down-mouse-1] 'mouse-major-mode-menu)
     (define-key map [mode-line mouse-2] 'describe-mode)
     (define-key map [mode-line down-mouse-3] 'mode-line-mode-menu-1)
     map) "\
@@ -303,13 +309,16 @@
     (list
      (propertize "%[(" 'help-echo help-echo)
      `(:propertize ("" mode-name)
-		   help-echo "mouse-2: help for current major mode"
+		   help-echo "mouse-1: major-mode-menu mouse-2: help for current major mode"
+		   mouse-face mode-line-highlight
 		   local-map ,mode-line-major-mode-keymap)
      '("" mode-line-process)
      `(:propertize ("" minor-mode-alist)
+		   mouse-face mode-line-highlight
 		   help-echo "mouse-2: help for minor modes, mouse-3: minor mode menu"
 		   local-map ,mode-line-minor-mode-keymap)
      (propertize "%n" 'help-echo "mouse-2: widen"
+		 'mouse-face 'mode-line-highlight
 		 'local-map (make-mode-line-mouse-map
 			     'mouse-2 #'mode-line-widen))
      (propertize ")%]--" 'help-echo help-echo)))
@@ -465,6 +474,7 @@
 		    'face 'Buffer-menu-buffer-face
 		    'help-echo
 		    (purecopy "mouse-1: previous buffer, mouse-3: next buffer")
+		    'mouse-face 'mode-line-highlight
 		    'local-map mode-line-buffer-identification-keymap)))
 
 (setq-default mode-line-buffer-identification
--- a/lisp/bookmark.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/bookmark.el	Sat May 28 21:04:38 2005 +0000
@@ -866,7 +866,7 @@
   (use-local-map bookmark-read-annotation-mode-map)
   (setq major-mode 'bookmark-read-annotation-mode)
   (insert (funcall bookmark-read-annotation-text-func bookmark))
-  (run-hooks 'text-mode-hook))
+  (run-mode-hooks 'text-mode-hook))
 
 
 (defun bookmark-read-annotation (parg bookmark)
@@ -903,7 +903,7 @@
   (let ((annotation (bookmark-get-annotation bookmark)))
     (if (and annotation (not (string-equal annotation "")))
 	(insert annotation)))
-  (run-hooks 'text-mode-hook))
+  (run-mode-hooks 'text-mode-hook))
 
 
 (defun bookmark-send-edited-annotation ()
@@ -1618,7 +1618,7 @@
   (setq buffer-read-only t)
   (setq major-mode 'bookmark-bmenu-mode)
   (setq mode-name "Bookmark Menu")
-  (run-hooks 'bookmark-bmenu-mode-hook))
+  (run-mode-hooks 'bookmark-bmenu-mode-hook))
 
 
 (defun bookmark-bmenu-toggle-filenames (&optional show)
--- a/lisp/bs.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/bs.el	Sat May 28 21:04:38 2005 +0000
@@ -656,7 +656,7 @@
 	truncate-lines t
 	font-lock-defaults '(bs-mode-font-lock-keywords t)
 	font-lock-verbose nil)
-  (run-hooks 'bs-mode-hook))
+  (run-mode-hooks 'bs-mode-hook))
 
 (defun bs-kill ()
   "Let buffer disappear and reset window-configuration."
--- a/lisp/buff-menu.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/buff-menu.el	Sat May 28 21:04:38 2005 +0000
@@ -1,7 +1,7 @@
 ;;; buff-menu.el --- buffer menu main function and support functions -*- coding:utf-8 -*-
 
 ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 2000, 2001, 2002, 2003,
-;;   2004  Free Software Foundation, Inc.
+;;   2004, 2005  Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: convenience
@@ -190,7 +190,7 @@
        #'(lambda (&optional noconfirm) 'fast))
   (setq truncate-lines t)
   (setq buffer-read-only t)
-  (run-hooks 'buffer-menu-mode-hook))
+  (run-mode-hooks 'buffer-menu-mode-hook))
 
 ;; This function exists so we can make the doc string of Buffer-menu-mode
 ;; look nice.
@@ -203,17 +203,21 @@
   (or (eq buffer-undo-list t)
       (setq buffer-undo-list nil))
   ;; We can not use save-excursion here.  The buffer gets erased.
-  (let ((ocol (current-column))
+  (let ((opoint (point))
+	(eobp (eobp))
+	(ocol (current-column))
 	(oline (progn (move-to-column 4)
 		      (get-text-property (point) 'buffer)))
 	(prop (point-min))
 	;; do not make undo records for the reversion.
 	(buffer-undo-list t))
     (list-buffers-noselect Buffer-menu-files-only)
-    (while (setq prop (next-single-property-change prop 'buffer))
-      (when (eq (get-text-property prop 'buffer) oline)
-	(goto-char prop)
-	(move-to-column ocol)))))
+    (if oline
+	(while (setq prop (next-single-property-change prop 'buffer))
+	  (when (eq (get-text-property prop 'buffer) oline)
+	    (goto-char prop)
+	    (move-to-column ocol)))
+      (goto-char (if eobp (point-max) opoint)))))
 
 (defun Buffer-menu-toggle-files-only (arg)
   "Toggle whether the current buffer-menu displays only file buffers.
@@ -633,15 +637,29 @@
   (if (equal column Buffer-menu-sort-column) (setq column nil))
   (propertize name
 	      'help-echo (if column
-			     (concat "mouse-2: sort by " (downcase name))
-			   "mouse-2: sort by visited order")
+			     (if Buffer-menu-use-header-line
+				 (concat "mouse-2: sort by " (downcase name))
+			       (concat "mouse-2, RET: sort by "
+				       (downcase name)))
+			   (if Buffer-menu-use-header-line
+			       "mouse-2: sort by visited order"
+			     "mouse-2, RET: sort by visited order"))
 	      'mouse-face 'highlight
 	      'keymap (let ((map (make-sparse-keymap)))
-			(define-key map [header-line mouse-2]
-			  `(lambda (e)
-			     (interactive "e")
-			     (save-window-excursion
+			(if Buffer-menu-use-header-line
+			    (define-key map [header-line mouse-2]
+			      `(lambda (e)
+				 (interactive "e")
+				 (save-window-excursion
+				   (if e (mouse-select-window e))
+				   (Buffer-menu-sort ,column))))
+			  (define-key map [mouse-2]
+			    `(lambda (e)
+			       (interactive "e")
 			       (if e (mouse-select-window e))
+			       (Buffer-menu-sort ,column)))
+			  (define-key map "\C-m"
+			    `(lambda () (interactive)
 			       (Buffer-menu-sort ,column))))
 			map)))
 
--- a/lisp/calc/calc-prog.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/calc/calc-prog.el	Sat May 28 21:04:38 2005 +0000
@@ -702,7 +702,7 @@
 			       (get func 'calc-user-defn)))
                     (kys (concat "z" (char-to-string (car def))))
                     (intcmd (symbol-name (cdr def)))
-                    (algcmd (substring (symbol-name func) 9)))
+                    (algcmd (if func (substring (symbol-name func) 9) "")))
 	       (if (and defn (calc-valid-formula-func func))
 		   (let ((niceexpr (math-format-nice-expr defn (frame-width))))
 		     (calc-wrapper
@@ -1446,15 +1446,22 @@
     (error "Unbalanced Z' in keyboard macro")))
 
 
-(defun calc-kbd-report (msg)
-  (interactive "sMessage: ")
-  (calc-wrapper
-   (math-working msg (calc-top-n 1))))
+;; (defun calc-kbd-report (msg)
+;;   (interactive "sMessage: ")
+;;   (calc-wrapper
+;;    (math-working msg (calc-top-n 1))))
 
-(defun calc-kbd-query (msg)
-  (interactive "sPrompt: ")
-  (calc-wrapper
-   (calc-alg-entry nil (and (not (equal msg "")) msg))))
+(defun calc-kbd-query ()
+  (interactive)
+  (let ((defining-kbd-macro nil)
+        (executing-kbd-macro nil)
+        (msg (calc-top 1)))
+    (if (not (eq (car-safe msg) 'vec))
+        (error "No prompt string provided")
+      (setq msg (math-vector-to-string msg))
+      (calc-wrapper
+       (calc-pop-stack 1)
+       (calc-alg-entry nil (and (not (equal msg "")) msg))))))
 
 ;;;; Logical operations.
 
--- a/lisp/calc/calc-units.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/calc/calc-units.el	Sat May 28 21:04:38 2005 +0000
@@ -555,7 +555,7 @@
 	   (save-excursion
 	     (goto-char (point-min))
 	     (if (looking-at "Calculator Units Table")
-		 (let ((buffer-read-only nil))
+		 (let ((inhibit-read-only t))
 		   (insert "(Obsolete) "))))))))
 
 (defun calc-get-unit-definition (uname)
@@ -1310,65 +1310,65 @@
 	(save-excursion
 	  (message "Formatting units table...")
 	  (set-buffer buf)
-	  (setq buffer-read-only nil)
-	  (erase-buffer)
-	  (insert "Calculator Units Table:\n\n")
-	  (insert "Unit    Type  Definition                  Description\n\n")
-	  (while uptr
-	    (setq u (car uptr)
-		  name (nth 2 u))
-	    (when (eq (car u) 'm)
-	      (setq std t))
-	    (setq shadowed (and std (assq (car u) math-additional-units)))
-	    (when (and name
-		       (> (length name) 1)
-		       (eq (aref name 0) ?\*))
-	      (unless (eq uptr math-units-table)
-		(insert "\n"))
-	      (setq name (substring name 1)))
-	    (insert " ")
-	    (and shadowed (insert "("))
-	    (insert (symbol-name (car u)))
-	    (and shadowed (insert ")"))
-	    (if (nth 3 u)
-		(progn
-		  (indent-to 10)
-		  (insert (symbol-name (nth 3 u))))
-	      (or std
-		  (progn
-		    (indent-to 10)
-		    (insert "U"))))
-	    (indent-to 14)
-	    (and shadowed (insert "("))
-	    (if (nth 1 u)
-		(insert (math-format-value (nth 1 u) 80))
-	      (insert (symbol-name (car u))))
-	    (and shadowed (insert ")"))
-	    (indent-to 41)
-	    (insert " ")
-	    (when name
-	      (insert name))
-	    (if shadowed
-		(insert " (redefined above)")
-	      (unless (nth 1 u)
-		(insert " (base unit)")))
-	    (insert "\n")
-	    (setq uptr (cdr uptr)))
-	  (insert "\n\nUnit Prefix Table:\n\n")
-	  (setq uptr math-unit-prefixes)
-	  (while uptr
-	    (setq u (car uptr))
-	    (insert " " (char-to-string (car u)))
-	    (if (equal (nth 1 u) (nth 1 (nth 1 uptr)))
-		(insert " " (char-to-string (car (car (setq uptr (cdr uptr)))))
-			"   ")
-	      (insert "     "))
-	    (insert "10^" (int-to-string (nth 2 (nth 1 u))))
-	    (indent-to 15)
-	    (insert "   " (nth 2 u) "\n")
-	    (while (eq (car (car (setq uptr (cdr uptr)))) 0)))
-	  (insert "\n")
-	  (setq buffer-read-only t)
+          (let ((inhibit-read-only t))
+            (erase-buffer)
+            (insert "Calculator Units Table:\n\n")
+            (insert "Unit    Type  Definition                  Description\n\n")
+            (while uptr
+              (setq u (car uptr)
+                    name (nth 2 u))
+              (when (eq (car u) 'm)
+                (setq std t))
+              (setq shadowed (and std (assq (car u) math-additional-units)))
+              (when (and name
+                         (> (length name) 1)
+                         (eq (aref name 0) ?\*))
+                (unless (eq uptr math-units-table)
+                  (insert "\n"))
+                (setq name (substring name 1)))
+              (insert " ")
+              (and shadowed (insert "("))
+              (insert (symbol-name (car u)))
+              (and shadowed (insert ")"))
+              (if (nth 3 u)
+                  (progn
+                    (indent-to 10)
+                    (insert (symbol-name (nth 3 u))))
+                (or std
+                    (progn
+                      (indent-to 10)
+                      (insert "U"))))
+              (indent-to 14)
+              (and shadowed (insert "("))
+              (if (nth 1 u)
+                  (insert (math-format-value (nth 1 u) 80))
+                (insert (symbol-name (car u))))
+              (and shadowed (insert ")"))
+              (indent-to 41)
+              (insert " ")
+              (when name
+                (insert name))
+              (if shadowed
+                  (insert " (redefined above)")
+                (unless (nth 1 u)
+                  (insert " (base unit)")))
+              (insert "\n")
+              (setq uptr (cdr uptr)))
+            (insert "\n\nUnit Prefix Table:\n\n")
+            (setq uptr math-unit-prefixes)
+            (while uptr
+              (setq u (car uptr))
+              (insert " " (char-to-string (car u)))
+              (if (equal (nth 1 u) (nth 1 (nth 1 uptr)))
+                  (insert " " (char-to-string (car (car (setq uptr (cdr uptr)))))
+                          "   ")
+                (insert "     "))
+              (insert "10^" (int-to-string (nth 2 (nth 1 u))))
+              (indent-to 15)
+              (insert "   " (nth 2 u) "\n")
+              (while (eq (car (car (setq uptr (cdr uptr)))) 0)))
+            (insert "\n"))
+	  (view-mode)
 	  (message "Formatting units table...done"))
 	(setq math-units-table-buffer-valid t)
 	(let ((oldbuf (current-buffer)))
--- a/lisp/calc/calc-yank.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/calc/calc-yank.el	Sat May 28 21:04:38 2005 +0000
@@ -447,7 +447,7 @@
     (setq truncate-lines nil)
     (setq major-mode 'calc-edit-mode)
     (setq mode-name "Calc Edit")
-    (run-hooks 'calc-edit-mode-hook)
+    (run-mode-hooks 'calc-edit-mode-hook)
     (make-local-variable 'calc-original-buffer)
     (setq calc-original-buffer oldbuf)
     (make-local-variable 'calc-return-buffer)
--- a/lisp/calc/calc.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/calc/calc.el	Sat May 28 21:04:38 2005 +0000
@@ -209,7 +209,8 @@
 (defgroup calc nil
   "GNU Calc"
   :prefix "calc-"
-  :tag    "Calc")
+  :tag    "Calc"
+  :group  'applications)
 
 ;;;###autoload
 (defcustom calc-settings-file 
@@ -830,20 +831,6 @@
 (defvar var-gamma '(special-const (math-gamma-const)))
 (defvar var-Modes '(special-const (math-get-modes-vec)))
 
-(defvar calc-language-alist
-  '((latex-mode . latex)
-    (tex-mode   . tex)
-    (plain-tex-mode . tex)
-    (context-mode . tex)
-    (nroff-mode . eqn)
-    (pascal-mode . pascal)
-    (c-mode . c)
-    (c++-mode . c)
-    (fortran-mode . fortran)
-    (f90-mode . fortran))
-  "Alist of major modes with appropriate Calc languages.")
-
-
 (mapcar (lambda (v) (or (boundp v) (set v nil)))
 	  calc-local-var-list)
 
@@ -1131,7 +1118,7 @@
 	   (string-match "full" (nth 1 p))
 	   (setq calc-standalone-flag t))
       (setq p (cdr p))))
-  (run-hooks 'calc-mode-hook)
+  (run-mode-hooks 'calc-mode-hook)
   (calc-refresh t)
   (calc-set-mode-line)
   (calc-check-defines))
@@ -1181,7 +1168,7 @@
       (insert (propertize (concat "Emacs Calculator v" calc-version
 				  " by Dave Gillespie\n")
 			  'font-lock-face 'italic))))
-  (run-hooks 'calc-trail-mode-hook))
+  (run-mode-hooks 'calc-trail-mode-hook))
 
 (defun calc-create-buffer ()
   (set-buffer (get-buffer-create "*Calculator*"))
--- a/lisp/calculator.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/calculator.el	Sat May 28 21:04:38 2005 +0000
@@ -4,7 +4,7 @@
 
 ;; Author: Eli Barzilay <eli@barzilay.org>
 ;; Keywords: tools, convenience
-;; Time-stamp: <2002-07-13 01:14:35 eli>
+;; Time-stamp: <26 May 2005, 14:32:34, Lute Kamstra, pijl>
 
 ;; This file is part of GNU Emacs.
 
@@ -680,7 +680,7 @@
   (setq major-mode 'calculator-mode)
   (setq mode-name "Calculator")
   (use-local-map calculator-mode-map)
-  (run-hooks 'calculator-mode-hook))
+  (run-mode-hooks 'calculator-mode-hook))
 
 (eval-when-compile (require 'electric) (require 'ehelp))
 
--- a/lisp/calendar/cal-menu.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/calendar/cal-menu.el	Sat May 28 21:04:38 2005 +0000
@@ -221,7 +221,7 @@
                            l)))
             (setq l (cons ["Mark Holidays" mark-calendar-holidays t]
                           (cons ["Unmark Calendar" calendar-unmark t]
-                                (cons ["--" '("--") t] l))))
+                                (cons "--" l))))
             (define-key calendar-mode-map [menu-bar Holidays]
 	      (cons "Holidays" (easy-menu-create-menu "Holidays" (nreverse l))))
             (define-key calendar-mode-map [menu-bar Holidays separator]
--- a/lisp/calendar/calendar.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/calendar/calendar.el	Sat May 28 21:04:38 2005 +0000
@@ -2335,6 +2335,7 @@
    (propertize (substitute-command-keys
 		"\\<calendar-mode-map>\\[scroll-calendar-left]")
 	       'help-echo "mouse-2: scroll left"
+	       'mouse-face 'mode-line-highlight
 	       'keymap (make-mode-line-mouse-map 'mouse-2
 						 'mouse-scroll-calendar-left))
    "Calendar"
@@ -2343,12 +2344,14 @@
      (substitute-command-keys
       "\\<calendar-mode-map>\\[calendar-goto-info-node] info")
      'help-echo "mouse-2: read Info on Calendar"
+     'mouse-face 'mode-line-highlight
      'keymap (make-mode-line-mouse-map 'mouse-2 'calendar-goto-info-node))
     "/"
     (propertize
      (substitute-command-keys
      "\\<calendar-mode-map>\\[calendar-other-month] other")
      'help-echo "mouse-2: choose another month"
+     'mouse-face 'mode-line-highlight
      'keymap (make-mode-line-mouse-map
 	      'mouse-2 'mouse-calendar-other-month))
     "/"
@@ -2356,11 +2359,13 @@
      (substitute-command-keys
      "\\<calendar-mode-map>\\[calendar-goto-today] today")
      'help-echo "mouse-2: go to today's date"
+     'mouse-face 'mode-line-highlight
      'keymap (make-mode-line-mouse-map 'mouse-2 #'calendar-goto-today)))
    '(calendar-date-string (calendar-current-date) t)
    (propertize (substitute-command-keys
 		"\\<calendar-mode-map>\\[scroll-calendar-right]")
 	       'help-echo "mouse-2: scroll right"
+	       'mouse-face 'mode-line-highlight
 	       'keymap (make-mode-line-mouse-map
 			'mouse-2 'mouse-scroll-calendar-right)))
   "The mode line of the calendar buffer.
--- a/lisp/calendar/todo-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/calendar/todo-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -904,11 +904,12 @@
 
 \\{todo-mode-map}"
   (interactive)
+  (kill-all-local-variables)
   (setq major-mode 'todo-mode)
   (setq mode-name "TODO")
   (use-local-map todo-mode-map)
   (easy-menu-add todo-menu)
-  (run-hooks 'todo-mode-hook))
+  (run-mode-hooks 'todo-mode-hook))
 
 (eval-when-compile
   (defvar date)
--- a/lisp/chistory.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/chistory.el	Sat May 28 21:04:38 2005 +0000
@@ -145,7 +145,7 @@
   (setq major-mode 'command-history-mode)
   (setq mode-name "Command History")
   (use-local-map command-history-map)
-  (run-hooks 'command-history-mode-hook))
+  (run-mode-hooks 'command-history-mode-hook))
 
 (defun Command-history-setup ()
   (kill-all-local-variables)
--- a/lisp/comint.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/comint.el	Sat May 28 21:04:38 2005 +0000
@@ -3437,7 +3437,7 @@
 ;;   (make-local-variable 'shell-directory-stack)
 ;;   (setq shell-directory-stack nil)
 ;;   (add-hook 'comint-input-filter-functions 'shell-directory-tracker)
-;;   (run-hooks 'shell-mode-hook))
+;;   (run-mode-hooks 'shell-mode-hook))
 ;;
 ;;
 ;; Completion for comint-mode users
--- a/lisp/cus-edit.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/cus-edit.el	Sat May 28 21:04:38 2005 +0000
@@ -4276,7 +4276,7 @@
     (set (make-local-variable 'widget-link-prefix) "")
     (set (make-local-variable 'widget-link-suffix) ""))
   (add-hook 'widget-edit-functions 'custom-state-buffer-message nil t)
-  (run-hooks 'custom-mode-hook))
+  (run-mode-hooks 'custom-mode-hook))
 
 (put 'custom-mode 'mode-class 'special)
 
--- a/lisp/descr-text.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/descr-text.el	Sat May 28 21:04:38 2005 +0000
@@ -61,7 +61,7 @@
   (use-local-map describe-text-mode-map)
   (widget-setup)
   (add-hook 'change-major-mode-hook 'font-lock-defontify nil t)
-  (run-hooks 'describe-text-mode-hook))
+  (run-mode-hooks 'describe-text-mode-hook))
 
 ;;; Describe-Text Utilities.
 
--- a/lisp/diff-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/diff-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -185,7 +185,8 @@
     (((class color) (background dark))
      :foreground "green" :weight bold)
     (t :weight bold))
-  "`diff-mode' face inherited by hunk and index header faces.")
+  "`diff-mode' face inherited by hunk and index header faces."
+  :group 'diff-mode)
 (defvar diff-header-face 'diff-header-face)
 
 (defface diff-file-header-face
@@ -198,27 +199,32 @@
     (((class color) (background dark))
      :foreground "cyan" :weight bold)
     (t :weight bold))			; :height 1.3
-  "`diff-mode' face used to highlight file header lines.")
+  "`diff-mode' face used to highlight file header lines."
+  :group 'diff-mode)
 (defvar diff-file-header-face 'diff-file-header-face)
 
 (defface diff-index-face
   '((t :inherit diff-file-header-face))
-  "`diff-mode' face used to highlight index header lines.")
+  "`diff-mode' face used to highlight index header lines."
+  :group 'diff-mode)
 (defvar diff-index-face 'diff-index-face)
 
 (defface diff-hunk-header-face
   '((t :inherit diff-header-face))
-  "`diff-mode' face used to highlight hunk header lines.")
+  "`diff-mode' face used to highlight hunk header lines."
+  :group 'diff-mode)
 (defvar diff-hunk-header-face 'diff-hunk-header-face)
 
 (defface diff-removed-face
   '((t :inherit diff-changed-face))
-  "`diff-mode' face used to highlight removed lines.")
+  "`diff-mode' face used to highlight removed lines."
+  :group 'diff-mode)
 (defvar diff-removed-face 'diff-removed-face)
 
 (defface diff-added-face
   '((t :inherit diff-changed-face))
-  "`diff-mode' face used to highlight added lines.")
+  "`diff-mode' face used to highlight added lines."
+  :group 'diff-mode)
 (defvar diff-added-face 'diff-added-face)
 
 (defface diff-changed-face
@@ -226,12 +232,14 @@
      :foreground "magenta" :weight bold :slant italic)
     (((type tty pc) (class color) (background dark))
      :foreground "yellow" :weight bold :slant italic))
-  "`diff-mode' face used to highlight changed lines.")
+  "`diff-mode' face used to highlight changed lines."
+  :group 'diff-mode)
 (defvar diff-changed-face 'diff-changed-face)
 
 (defface diff-function-face
   '((t :inherit diff-context-face))
-  "`diff-mode' face used to highlight function names produced by \"diff -p\".")
+  "`diff-mode' face used to highlight function names produced by \"diff -p\"."
+  :group 'diff-mode)
 (defvar diff-function-face 'diff-function-face)
 
 (defface diff-context-face
@@ -239,12 +247,14 @@
      :foreground "grey50")
     (((class color) (background dark))
      :foreground "grey70"))
-  "`diff-mode' face used to highlight context and other side-information.")
+  "`diff-mode' face used to highlight context and other side-information."
+  :group 'diff-mode)
 (defvar diff-context-face 'diff-context-face)
 
 (defface diff-nonexistent-face
   '((t :inherit diff-file-header-face))
-  "`diff-mode' face used to highlight nonexistent files in recursive diffs.")
+  "`diff-mode' face used to highlight nonexistent files in recursive diffs."
+  :group 'diff-mode)
 (defvar diff-nonexistent-face 'diff-nonexistent-face)
 
 (defconst diff-yank-handler '(diff-yank-function))
--- a/lisp/dired.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/dired.el	Sat May 28 21:04:38 2005 +0000
@@ -418,7 +418,24 @@
      ;; It is quicker to first find just an extension, then go back to the
      ;; start of that file name.  So we do this complex MATCH-ANCHORED form.
      (list (concat "\\(" (regexp-opt completion-ignored-extensions) "\\|#\\)$")
-	   '(".+" (dired-move-to-filename) nil (0 dired-ignored-face)))))
+	   '(".+" (dired-move-to-filename) nil (0 dired-ignored-face))))
+   ;;
+   ;; Files suffixed with `completion-ignored-extensions'
+   ;; plus a character put in by -F.
+   '(eval .
+     (list (concat "\\(" (regexp-opt completion-ignored-extensions)
+		   "\\|#\\)[*=|]$")
+	   '(".+" (progn
+		    (end-of-line)
+		    ;; If the last character is not part of the filename,
+		    ;; move back to the start of the filename
+		    ;; so it can be fontified.
+		    ;; Otherwise, leave point at the end of the line;
+		    ;; that way, nothing is fontified.
+		    (unless (get-text-property (1- (point)) 'mouse-face)
+		      (dired-move-to-filename)))
+	     nil (0 dired-ignored-face))))
+)
   "Additional expressions to highlight in Dired mode.")
 
 ;;; Macros must be defined before they are used, for the byte compiler.
@@ -3163,10 +3180,8 @@
   :group 'dired)
 
 (defun dired-dnd-popup-notice ()
-  (x-popup-dialog
-   t
-   '("Recursive copies not enabled.\nSee variable dired-recursive-copies."
-     ("Ok" . nil))))
+  (message-box
+   "Recursive copies not enabled.\nSee variable dired-recursive-copies."))
 
 
 (defun dired-dnd-do-ask-action (uri)
--- a/lisp/ebuff-menu.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/ebuff-menu.el	Sat May 28 21:04:38 2005 +0000
@@ -162,7 +162,7 @@
   (setq major-mode 'Electric-buffer-menu-mode)
   (goto-char (point-min))
   (if (search-forward "\n." nil t) (forward-char -1))
-  (run-hooks 'electric-buffer-menu-mode-hook))
+  (run-mode-hooks 'electric-buffer-menu-mode-hook))
 
 ;; generally the same as Buffer-menu-mode-map
 ;;  (except we don't indirect to global-map)
--- a/lisp/ediff-util.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/ediff-util.el	Sat May 28 21:04:38 2005 +0000
@@ -1,6 +1,7 @@
 ;;; ediff-util.el --- the core commands and utilities of ediff
 
-;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 04 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+;;   2004 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 
@@ -116,7 +117,7 @@
   (kill-all-local-variables)
   (setq major-mode 'ediff-mode)
   (setq mode-name "Ediff")
-  (run-hooks 'ediff-mode-hook))
+  (run-mode-hooks 'ediff-mode-hook))
 
 
 
--- a/lisp/emacs-lisp/bytecomp.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/emacs-lisp/bytecomp.el	Sat May 28 21:04:38 2005 +0000
@@ -4055,27 +4055,6 @@
     (setq command-line-args-left (cdr command-line-args-left)))
   (kill-emacs 0))
 
-
-(make-obsolete-variable 'auto-fill-hook 'auto-fill-function "before 19.15")
-(make-obsolete-variable 'blink-paren-hook 'blink-paren-function "before 19.15")
-(make-obsolete-variable 'lisp-indent-hook 'lisp-indent-function "before 19.15")
-(make-obsolete-variable 'inhibit-local-variables
-		"use enable-local-variables (with the reversed sense)."
-		"before 19.15")
-(make-obsolete-variable 'unread-command-event
-  "use unread-command-events; which is a list of events rather than a single event."
-  "before 19.15")
-(make-obsolete-variable 'suspend-hooks 'suspend-hook "before 19.15")
-(make-obsolete-variable 'comment-indent-hook 'comment-indent-function "before 19.15")
-(make-obsolete-variable 'meta-flag "use the set-input-mode function instead." "before 19.34")
-(make-obsolete-variable 'before-change-function
-  "use before-change-functions; which is a list of functions rather than a single function."
-  "before 19.34")
-(make-obsolete-variable 'after-change-function
-  "use after-change-functions; which is a list of functions rather than a single function."
-  "before 19.34")
-(make-obsolete-variable 'font-lock-doc-string-face 'font-lock-string-face "before 19.34")
-
 (provide 'byte-compile)
 (provide 'bytecomp)
 
--- a/lisp/emacs-lisp/cl-extra.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/emacs-lisp/cl-extra.el	Sat May 28 21:04:38 2005 +0000
@@ -46,7 +46,8 @@
 
 (defun coerce (x type)
   "Coerce OBJECT to type TYPE.
-TYPE is a Common Lisp type specifier."
+TYPE is a Common Lisp type specifier.
+\n(fn OBJECT TYPE)"
   (cond ((eq type 'list) (if (listp x) x (append x nil)))
 	((eq type 'vector) (if (vectorp x) x (vconcat x)))
 	((eq type 'string) (if (stringp x) x (concat x)))
@@ -120,16 +121,17 @@
       (nreverse cl-res))))
 
 (defun map (cl-type cl-func cl-seq &rest cl-rest)
-  "Map a function across one or more sequences, returning a sequence.
-TYPE is the sequence type to return, FUNC is the function, and SEQS
-are the argument sequences."
+  "Map a FUNCTION across one or more SEQUENCEs, returning a sequence.
+TYPE is the sequence type to return.
+\n(fn TYPE FUNCTION SEQUENCE...)"
   (let ((cl-res (apply 'mapcar* cl-func cl-seq cl-rest)))
     (and cl-type (coerce cl-res cl-type))))
 
 (defun maplist (cl-func cl-list &rest cl-rest)
-  "Map FUNC to each sublist of LIST or LISTS.
+  "Map FUNCTION to each sublist of LIST or LISTs.
 Like `mapcar', except applies to lists and their cdr's rather than to
-the elements themselves."
+the elements themselves.
+\n(fn FUNCTION LIST...)"
   (if cl-rest
       (let ((cl-res nil)
 	    (cl-args (cons cl-list (copy-sequence cl-rest)))
@@ -146,14 +148,16 @@
       (nreverse cl-res))))
 
 (defun cl-mapc (cl-func cl-seq &rest cl-rest)
-  "Like `mapcar', but does not accumulate values returned by the function."
+  "Like `mapcar', but does not accumulate values returned by the function.
+\n(fn FUNCTION SEQUENCE...)"
   (if cl-rest
       (progn (apply 'map nil cl-func cl-seq cl-rest)
 	     cl-seq)
     (mapc cl-func cl-seq)))
 
 (defun mapl (cl-func cl-list &rest cl-rest)
-  "Like `maplist', but does not accumulate values returned by the function."
+  "Like `maplist', but does not accumulate values returned by the function.
+\n(fn FUNCTION LIST...)"
   (if cl-rest
       (apply 'maplist cl-func cl-list cl-rest)
     (let ((cl-p cl-list))
@@ -161,16 +165,19 @@
   cl-list)
 
 (defun mapcan (cl-func cl-seq &rest cl-rest)
-  "Like `mapcar', but nconc's together the values returned by the function."
+  "Like `mapcar', but nconc's together the values returned by the function.
+\n(fn FUNCTION SEQUENCE...)"
   (apply 'nconc (apply 'mapcar* cl-func cl-seq cl-rest)))
 
 (defun mapcon (cl-func cl-list &rest cl-rest)
-  "Like `maplist', but nconc's together the values returned by the function."
+  "Like `maplist', but nconc's together the values returned by the function.
+\n(fn FUNCTION LIST...)"
   (apply 'nconc (apply 'maplist cl-func cl-list cl-rest)))
 
 (defun some (cl-pred cl-seq &rest cl-rest)
   "Return true if PREDICATE is true of any element of SEQ or SEQs.
-If so, return the true (non-nil) value returned by PREDICATE."
+If so, return the true (non-nil) value returned by PREDICATE.
+\n(fn PREDICATE SEQ...)"
   (if (or cl-rest (nlistp cl-seq))
       (catch 'cl-some
 	(apply 'map nil
@@ -183,7 +190,8 @@
       cl-x)))
 
 (defun every (cl-pred cl-seq &rest cl-rest)
-  "Return true if PREDICATE is true of every element of SEQ or SEQs."
+  "Return true if PREDICATE is true of every element of SEQ or SEQs.
+\n(fn PREDICATE SEQ...)"
   (if (or cl-rest (nlistp cl-seq))
       (catch 'cl-every
 	(apply 'map nil
@@ -195,11 +203,13 @@
     (null cl-seq)))
 
 (defun notany (cl-pred cl-seq &rest cl-rest)
-  "Return true if PREDICATE is false of every element of SEQ or SEQs."
+  "Return true if PREDICATE is false of every element of SEQ or SEQs.
+\n(fn PREDICATE SEQ...)"
   (not (apply 'some cl-pred cl-seq cl-rest)))
 
 (defun notevery (cl-pred cl-seq &rest cl-rest)
-  "Return true if PREDICATE is false of some element of SEQ or SEQs."
+  "Return true if PREDICATE is false of some element of SEQ or SEQs.
+\n(fn PREDICATE SEQ...)"
   (not (apply 'every cl-pred cl-seq cl-rest)))
 
 ;;; Support for `loop'.
@@ -332,16 +342,16 @@
 	  (setq a (* (/ a (gcd a b)) b))))
       a)))
 
-(defun isqrt (a)
+(defun isqrt (x)
   "Return the integer square root of the argument."
-  (if (and (integerp a) (> a 0))
-      (let ((g (cond ((<= a 100) 10) ((<= a 10000) 100)
-		     ((<= a 1000000) 1000) (t a)))
+  (if (and (integerp x) (> x 0))
+      (let ((g (cond ((<= x 100) 10) ((<= x 10000) 100)
+		     ((<= x 1000000) 1000) (t x)))
 	    g2)
-	(while (< (setq g2 (/ (+ g (/ a g)) 2)) g)
+	(while (< (setq g2 (/ (+ g (/ x g)) 2)) g)
 	  (setq g g2))
 	g)
-    (if (eq a 0) 0 (signal 'arith-error nil))))
+    (if (eq x 0) 0 (signal 'arith-error nil))))
 
 (defun floor* (x &optional y)
   "Return a list of the floor of X and the fractional part of X.
@@ -388,9 +398,9 @@
   "The remainder of X divided by Y, with the same sign as X."
   (nth 1 (truncate* x y)))
 
-(defun signum (a)
-  "Return 1 if A is positive, -1 if negative, 0 if zero."
-  (cond ((> a 0) 1) ((< a 0) -1) (t 0)))
+(defun signum (x)
+  "Return 1 if X is positive, -1 if negative, 0 if zero."
+  (cond ((> x 0) 1) ((< x 0) -1) (t 0)))
 
 
 ;; Random numbers.
@@ -514,7 +524,8 @@
 	       res))))))
 
 (defun concatenate (type &rest seqs)
-  "Concatenate, into a sequence of type TYPE, the argument SEQUENCES."
+  "Concatenate, into a sequence of type TYPE, the argument SEQUENCEs.
+\n(fn TYPE SEQUENCE...)"
   (cond ((eq type 'vector) (apply 'vconcat seqs))
 	((eq type 'string) (apply 'concat seqs))
 	((eq type 'list) (apply 'append (append seqs '(nil))))
@@ -532,7 +543,7 @@
   (nconc (nreverse x) y))
 
 (defun list-length (x)
-  "Return the length of a list.  Return nil if list is circular."
+  "Return the length of list X.  Return nil if list is circular."
   (let ((n 0) (fast x) (slow x))
     (while (and (cdr fast) (not (and (eq fast slow) (> n 0))))
       (setq n (+ n 2) fast (cdr (cdr fast)) slow (cdr slow)))
@@ -550,7 +561,8 @@
 ;;; Property lists.
 
 (defun get* (sym tag &optional def)    ; See compiler macro in cl-macs.el
-  "Return the value of SYMBOL's PROPNAME property, or DEFAULT if none."
+  "Return the value of SYMBOL's PROPNAME property, or DEFAULT if none.
+\n(fn SYMBOL PROPNAME &optional DEFAULT)"
   (or (get sym tag)
       (and def
 	   (let ((plist (symbol-plist sym)))
@@ -560,7 +572,8 @@
 
 (defun getf (plist tag &optional def)
   "Search PROPLIST for property PROPNAME; return its value or DEFAULT.
-PROPLIST is a list of the sort returned by `symbol-plist'."
+PROPLIST is a list of the sort returned by `symbol-plist'.
+\n(fn PROPLIST PROPNAME &optional DEFAULT)"
   (setplist '--cl-getf-symbol-- plist)
   (or (get '--cl-getf-symbol-- tag)
       ;; Originally we called get* here,
@@ -582,7 +595,8 @@
     (and (cdr p) (progn (setcdr p (cdr (cdr (cdr p)))) t))))
 
 (defun cl-remprop (sym tag)
-  "Remove from SYMBOL's plist the property PROP and its value."
+  "Remove from SYMBOL's plist the property PROPNAME and its value.
+\n(fn SYMBOL PROPNAME)"
   (let ((plist (symbol-plist sym)))
     (if (and plist (eq tag (car plist)))
 	(progn (setplist sym (cdr (cdr plist))) t)
--- a/lisp/emacs-lisp/cl-macs.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/emacs-lisp/cl-macs.el	Sat May 28 21:04:38 2005 +0000
@@ -207,8 +207,8 @@
 
 (defmacro function* (func)
   "Introduce a function.
-Like normal `function', except that if argument is a lambda form, its
-ARGLIST allows full Common Lisp conventions."
+Like normal `function', except that if argument is a lambda form,
+its argument list allows full Common Lisp conventions."
   (if (eq (car-safe func) 'lambda)
       (let* ((res (cl-transform-lambda (cdr func) 'cl-none))
 	     (form (list 'function (cons 'lambda (cdr res)))))
@@ -488,13 +488,14 @@
 ;;; Conditional control structures.
 
 (defmacro case (expr &rest clauses)
-  "Eval EXPR and choose from CLAUSES on that value.
+  "Eval EXPR and choose among clauses on that value.
 Each clause looks like (KEYLIST BODY...).  EXPR is evaluated and compared
 against each key in each KEYLIST; the corresponding BODY is evaluated.
 If no clause succeeds, case returns nil.  A single atom may be used in
 place of a KEYLIST of one atom.  A KEYLIST of t or `otherwise' is
 allowed only in the final clause, and matches if no other keys match.
-Key values are compared by `eql'."
+Key values are compared by `eql'.
+\n(fn EXPR (KEYLIST BODY...)...)"
   (let* ((temp (if (cl-simple-expr-p expr 3) expr (make-symbol "--cl-var--")))
 	 (head-list nil)
 	 (body (cons
@@ -522,15 +523,17 @@
 
 (defmacro ecase (expr &rest clauses)
   "Like `case', but error if no case fits.
-`otherwise'-clauses are not allowed."
+`otherwise'-clauses are not allowed.
+\n(fn EXPR (KEYLIST BODY...)...)"
   (list* 'case expr (append clauses '((ecase-error-flag)))))
 
 (defmacro typecase (expr &rest clauses)
-  "Evals EXPR, chooses from CLAUSES on that value.
+  "Evals EXPR, chooses among clauses on that value.
 Each clause looks like (TYPE BODY...).  EXPR is evaluated and, if it
 satisfies TYPE, the corresponding BODY is evaluated.  If no clause succeeds,
 typecase returns nil.  A TYPE of t or `otherwise' is allowed only in the
-final clause, and matches if no other keys match."
+final clause, and matches if no other keys match.
+\n(fn EXPR (TYPE BODY...)...)"
   (let* ((temp (if (cl-simple-expr-p expr 3) expr (make-symbol "--cl-var--")))
 	 (type-list nil)
 	 (body (cons
@@ -552,7 +555,8 @@
 
 (defmacro etypecase (expr &rest clauses)
   "Like `typecase', but error if no case fits.
-`otherwise'-clauses are not allowed."
+`otherwise'-clauses are not allowed.
+\n(fn EXPR (TYPE BODY...)...)"
   (list* 'typecase expr (append clauses '((ecase-error-flag)))))
 
 
@@ -1273,7 +1277,7 @@
 (defmacro progv (symbols values &rest body)
   "Bind SYMBOLS to VALUES dynamically in BODY.
 The forms SYMBOLS and VALUES are evaluated, and must evaluate to lists.
-Each SYMBOL in the first list is bound to the corresponding VALUE in the
+Each symbol in the first list is bound to the corresponding value in the
 second list (or made unbound if VALUES is shorter than SYMBOLS); then the
 BODY forms are executed and their result is returned.  This is much like
 a `let' form, except that the list of symbols can be computed at run-time."
@@ -1284,7 +1288,7 @@
 
 ;;; This should really have some way to shadow 'byte-compile properties, etc.
 (defmacro flet (bindings &rest body)
-  "Make temporary function defns.
+  "Make temporary function definitions.
 This is an analogue of `let' that operates on the function cell of FUNC
 rather than its value cell.  The FORMs are evaluated with the specified
 function definitions in place, then the definitions are undone (the FUNCs
@@ -1311,7 +1315,7 @@
 	 body))
 
 (defmacro labels (bindings &rest body)
-  "Make temporary func bindings.
+  "Make temporary function bindings.
 This is like `flet', except the bindings are lexical instead of dynamic.
 Unlike `flet', this macro is fully compliant with the Common Lisp standard.
 
@@ -1369,7 +1373,8 @@
 (defmacro lexical-let (bindings &rest body)
   "Like `let', but lexically scoped.
 The main visible difference is that lambdas inside BODY will create
-lexical closures as in Common Lisp."
+lexical closures as in Common Lisp.
+\n(fn VARLIST BODY)"
   (let* ((cl-closure-vars cl-closure-vars)
 	 (vars (mapcar (function
 			(lambda (x)
@@ -1411,7 +1416,8 @@
 (defmacro lexical-let* (bindings &rest body)
   "Like `let*', but lexically scoped.
 The main visible difference is that lambdas inside BODY will create
-lexical closures as in Common Lisp."
+lexical closures as in Common Lisp.
+\n(fn VARLIST BODY)"
   (if (null bindings) (cons 'progn body)
     (setq bindings (reverse bindings))
     (while bindings
@@ -1435,7 +1441,7 @@
 simulate true multiple return values.  For compatibility, (values A B C) is
 a synonym for (list A B C).
 
-\(fn (SYM SYM...) FORM BODY)"
+\(fn (SYM...) FORM BODY)"
   (let ((temp (make-symbol "--cl-var--")) (n -1))
     (list* 'let* (cons (list temp form)
 		       (mapcar (function
@@ -1451,7 +1457,7 @@
 `multiple-value-setq' macro, using lists to simulate true multiple return
 values.  For compatibility, (values A B C) is a synonym for (list A B C).
 
-\(fn (SYM SYM...) FORM)"
+\(fn (SYM...) FORM)"
   (cond ((null vars) (list 'progn form nil))
 	((null (cdr vars)) (list 'setq (car vars) (list 'car form)))
 	(t
@@ -1967,7 +1973,7 @@
 Example: (shiftf A B C) sets A to B, B to C, and returns the old A.
 Each PLACE may be a symbol, or any generalized variable allowed by `setf'.
 
-\(fn PLACE PLACE... VAL)"
+\(fn PLACE... VAL)"
   (cond
    ((null args) place)
    ((symbolp place) `(prog1 ,place (setq ,place (shiftf ,@args))))
--- a/lisp/emacs-lisp/cl-seq.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/emacs-lisp/cl-seq.el	Sat May 28 21:04:38 2005 +0000
@@ -125,8 +125,9 @@
 
 
 (defun reduce (cl-func cl-seq &rest cl-keys)
-  "Reduce two-argument FUNCTION across SEQUENCE.
-Keywords supported:  :start :end :from-end :initial-value :key"
+  "Reduce two-argument FUNCTION across SEQ.
+\nKeywords supported:  :start :end :from-end :initial-value :key
+\n(fn FUNCTION SEQ [KEYWORD VALUE]...)"
   (cl-parsing-keywords (:from-end (:start 0) :end :initial-value :key) ()
     (or (listp cl-seq) (setq cl-seq (append cl-seq nil)))
     (setq cl-seq (subseq cl-seq cl-start cl-end))
@@ -145,7 +146,8 @@
 
 (defun fill (seq item &rest cl-keys)
   "Fill the elements of SEQ with ITEM.
-Keywords supported:  :start :end"
+\nKeywords supported:  :start :end
+\n(fn SEQ ITEM [KEYWORD VALUE]...)"
   (cl-parsing-keywords ((:start 0) :end) ()
     (if (listp seq)
 	(let ((p (nthcdr cl-start seq))
@@ -164,7 +166,8 @@
 (defun replace (cl-seq1 cl-seq2 &rest cl-keys)
   "Replace the elements of SEQ1 with the elements of SEQ2.
 SEQ1 is destructively modified, then returned.
-Keywords supported:  :start1 :end1 :start2 :end2"
+\nKeywords supported:  :start1 :end1 :start2 :end2
+\n(fn SEQ1 SEQ2 [KEYWORD VALUE]...)"
   (cl-parsing-keywords ((:start1 0) :end1 (:start2 0) :end2) ()
     (if (and (eq cl-seq1 cl-seq2) (<= cl-start2 cl-start1))
 	(or (= cl-start1 cl-start2)
@@ -206,7 +209,8 @@
   "Remove all occurrences of ITEM in SEQ.
 This is a non-destructive function; it makes a copy of SEQ if necessary
 to avoid corrupting the original SEQ.
-Keywords supported:  :test :test-not :key :count :start :end :from-end"
+\nKeywords supported:  :test :test-not :key :count :start :end :from-end
+\n(fn ITEM SEQ [KEYWORD VALUE]...)"
   (cl-parsing-keywords (:test :test-not :key :if :if-not :count :from-end
 			(:start 0) :end) ()
     (if (<= (or cl-count (setq cl-count 8000000)) 0)
@@ -250,20 +254,23 @@
   "Remove all items satisfying PREDICATE in SEQ.
 This is a non-destructive function; it makes a copy of SEQ if necessary
 to avoid corrupting the original SEQ.
-Keywords supported:  :key :count :start :end :from-end"
+\nKeywords supported:  :key :count :start :end :from-end
+\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
   (apply 'remove* nil cl-list :if cl-pred cl-keys))
 
 (defun remove-if-not (cl-pred cl-list &rest cl-keys)
   "Remove all items not satisfying PREDICATE in SEQ.
 This is a non-destructive function; it makes a copy of SEQ if necessary
 to avoid corrupting the original SEQ.
-Keywords supported:  :key :count :start :end :from-end"
+\nKeywords supported:  :key :count :start :end :from-end
+\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
   (apply 'remove* nil cl-list :if-not cl-pred cl-keys))
 
 (defun delete* (cl-item cl-seq &rest cl-keys)
   "Remove all occurrences of ITEM in SEQ.
 This is a destructive function; it reuses the storage of SEQ whenever possible.
-Keywords supported:  :test :test-not :key :count :start :end :from-end"
+\nKeywords supported:  :test :test-not :key :count :start :end :from-end
+\n(fn ITEM SEQ [KEYWORD VALUE]...)"
   (cl-parsing-keywords (:test :test-not :key :if :if-not :count :from-end
 			(:start 0) :end) ()
     (if (<= (or cl-count (setq cl-count 8000000)) 0)
@@ -305,23 +312,27 @@
 (defun delete-if (cl-pred cl-list &rest cl-keys)
   "Remove all items satisfying PREDICATE in SEQ.
 This is a destructive function; it reuses the storage of SEQ whenever possible.
-Keywords supported:  :key :count :start :end :from-end"
+\nKeywords supported:  :key :count :start :end :from-end
+\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
   (apply 'delete* nil cl-list :if cl-pred cl-keys))
 
 (defun delete-if-not (cl-pred cl-list &rest cl-keys)
   "Remove all items not satisfying PREDICATE in SEQ.
 This is a destructive function; it reuses the storage of SEQ whenever possible.
-Keywords supported:  :key :count :start :end :from-end"
+\nKeywords supported:  :key :count :start :end :from-end
+\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
   (apply 'delete* nil cl-list :if-not cl-pred cl-keys))
 
 (defun remove-duplicates (cl-seq &rest cl-keys)
   "Return a copy of SEQ with all duplicate elements removed.
-Keywords supported:  :test :test-not :key :start :end :from-end"
+\nKeywords supported:  :test :test-not :key :start :end :from-end
+\n(fn SEQ [KEYWORD VALUE]...)"
   (cl-delete-duplicates cl-seq cl-keys t))
 
 (defun delete-duplicates (cl-seq &rest cl-keys)
   "Remove all duplicate elements from SEQ (destructively).
-Keywords supported:  :test :test-not :key :start :end :from-end"
+\nKeywords supported:  :test :test-not :key :start :end :from-end
+\n(fn SEQ [KEYWORD VALUE]...)"
   (cl-delete-duplicates cl-seq cl-keys nil))
 
 (defun cl-delete-duplicates (cl-seq cl-keys cl-copy)
@@ -368,7 +379,8 @@
   "Substitute NEW for OLD in SEQ.
 This is a non-destructive function; it makes a copy of SEQ if necessary
 to avoid corrupting the original SEQ.
-Keywords supported:  :test :test-not :key :count :start :end :from-end"
+\nKeywords supported:  :test :test-not :key :count :start :end :from-end
+\n(fn NEW OLD SEQ [KEYWORD VALUE]...)"
   (cl-parsing-keywords (:test :test-not :key :if :if-not :count
 			(:start 0) :end :from-end) ()
     (if (or (eq cl-old cl-new)
@@ -388,20 +400,23 @@
   "Substitute NEW for all items satisfying PREDICATE in SEQ.
 This is a non-destructive function; it makes a copy of SEQ if necessary
 to avoid corrupting the original SEQ.
-Keywords supported:  :key :count :start :end :from-end"
+\nKeywords supported:  :key :count :start :end :from-end
+\n(fn NEW PREDICATE SEQ [KEYWORD VALUE]...)"
   (apply 'substitute cl-new nil cl-list :if cl-pred cl-keys))
 
 (defun substitute-if-not (cl-new cl-pred cl-list &rest cl-keys)
   "Substitute NEW for all items not satisfying PREDICATE in SEQ.
 This is a non-destructive function; it makes a copy of SEQ if necessary
 to avoid corrupting the original SEQ.
-Keywords supported:  :key :count :start :end :from-end"
+\nKeywords supported:  :key :count :start :end :from-end
+\n(fn NEW PREDICATE SEQ [KEYWORD VALUE]...)"
   (apply 'substitute cl-new nil cl-list :if-not cl-pred cl-keys))
 
 (defun nsubstitute (cl-new cl-old cl-seq &rest cl-keys)
   "Substitute NEW for OLD in SEQ.
 This is a destructive function; it reuses the storage of SEQ whenever possible.
-Keywords supported:  :test :test-not :key :count :start :end :from-end"
+\nKeywords supported:  :test :test-not :key :count :start :end :from-end
+\n(fn NEW OLD SEQ [KEYWORD VALUE]...)"
   (cl-parsing-keywords (:test :test-not :key :if :if-not :count
 			(:start 0) :end :from-end) ()
     (or (eq cl-old cl-new) (<= (or cl-count (setq cl-count 8000000)) 0)
@@ -433,38 +448,44 @@
 (defun nsubstitute-if (cl-new cl-pred cl-list &rest cl-keys)
   "Substitute NEW for all items satisfying PREDICATE in SEQ.
 This is a destructive function; it reuses the storage of SEQ whenever possible.
-Keywords supported:  :key :count :start :end :from-end"
+\nKeywords supported:  :key :count :start :end :from-end
+\n(fn NEW PREDICATE SEQ [KEYWORD VALUE]...)"
   (apply 'nsubstitute cl-new nil cl-list :if cl-pred cl-keys))
 
 (defun nsubstitute-if-not (cl-new cl-pred cl-list &rest cl-keys)
   "Substitute NEW for all items not satisfying PREDICATE in SEQ.
 This is a destructive function; it reuses the storage of SEQ whenever possible.
-Keywords supported:  :key :count :start :end :from-end"
+\nKeywords supported:  :key :count :start :end :from-end
+\n(fn NEW PREDICATE SEQ [KEYWORD VALUE]...)"
   (apply 'nsubstitute cl-new nil cl-list :if-not cl-pred cl-keys))
 
 (defun find (cl-item cl-seq &rest cl-keys)
-  "Find the first occurrence of ITEM in LIST.
+  "Find the first occurrence of ITEM in SEQ.
 Return the matching ITEM, or nil if not found.
-Keywords supported:  :test :test-not :key :start :end :from-end"
+\nKeywords supported:  :test :test-not :key :start :end :from-end
+\n(fn ITEM SEQ [KEYWORD VALUE]...)"
   (let ((cl-pos (apply 'position cl-item cl-seq cl-keys)))
     (and cl-pos (elt cl-seq cl-pos))))
 
 (defun find-if (cl-pred cl-list &rest cl-keys)
-  "Find the first item satisfying PREDICATE in LIST.
-Return the matching ITEM, or nil if not found.
-Keywords supported:  :key :start :end :from-end"
+  "Find the first item satisfying PREDICATE in SEQ.
+Return the matching item, or nil if not found.
+\nKeywords supported:  :key :start :end :from-end
+\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
   (apply 'find nil cl-list :if cl-pred cl-keys))
 
 (defun find-if-not (cl-pred cl-list &rest cl-keys)
-  "Find the first item not satisfying PREDICATE in LIST.
-Return the matching ITEM, or nil if not found.
-Keywords supported:  :key :start :end :from-end"
+  "Find the first item not satisfying PREDICATE in SEQ.
+Return the matching item, or nil if not found.
+\nKeywords supported:  :key :start :end :from-end
+\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
   (apply 'find nil cl-list :if-not cl-pred cl-keys))
 
 (defun position (cl-item cl-seq &rest cl-keys)
-  "Find the first occurrence of ITEM in LIST.
+  "Find the first occurrence of ITEM in SEQ.
 Return the index of the matching item, or nil if not found.
-Keywords supported:  :test :test-not :key :start :end :from-end"
+\nKeywords supported:  :test :test-not :key :start :end :from-end
+\n(fn ITEM SEQ [KEYWORD VALUE]...)"
   (cl-parsing-keywords (:test :test-not :key :if :if-not
 			(:start 0) :end :from-end) ()
     (cl-position cl-item cl-seq cl-start cl-end cl-from-end)))
@@ -491,20 +512,23 @@
       (and (< cl-start cl-end) cl-start))))
 
 (defun position-if (cl-pred cl-list &rest cl-keys)
-  "Find the first item satisfying PREDICATE in LIST.
+  "Find the first item satisfying PREDICATE in SEQ.
 Return the index of the matching item, or nil if not found.
-Keywords supported:  :key :start :end :from-end"
+\nKeywords supported:  :key :start :end :from-end
+\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
   (apply 'position nil cl-list :if cl-pred cl-keys))
 
 (defun position-if-not (cl-pred cl-list &rest cl-keys)
-  "Find the first item not satisfying PREDICATE in LIST.
+  "Find the first item not satisfying PREDICATE in SEQ.
 Return the index of the matching item, or nil if not found.
-Keywords supported:  :key :start :end :from-end"
+\nKeywords supported:  :key :start :end :from-end
+\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
   (apply 'position nil cl-list :if-not cl-pred cl-keys))
 
 (defun count (cl-item cl-seq &rest cl-keys)
-  "Count the number of occurrences of ITEM in LIST.
-Keywords supported:  :test :test-not :key :start :end"
+  "Count the number of occurrences of ITEM in SEQ.
+\nKeywords supported:  :test :test-not :key :start :end
+\n(fn ITEM SEQ [KEYWORD VALUE]...)"
   (cl-parsing-keywords (:test :test-not :key :if :if-not (:start 0) :end) ()
     (let ((cl-count 0) cl-x)
       (or cl-end (setq cl-end (length cl-seq)))
@@ -516,20 +540,23 @@
       cl-count)))
 
 (defun count-if (cl-pred cl-list &rest cl-keys)
-  "Count the number of items satisfying PREDICATE in LIST.
-Keywords supported:  :key :start :end"
+  "Count the number of items satisfying PREDICATE in SEQ.
+\nKeywords supported:  :key :start :end
+\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
   (apply 'count nil cl-list :if cl-pred cl-keys))
 
 (defun count-if-not (cl-pred cl-list &rest cl-keys)
-  "Count the number of items not satisfying PREDICATE in LIST.
-Keywords supported:  :key :start :end"
+  "Count the number of items not satisfying PREDICATE in SEQ.
+\nKeywords supported:  :key :start :end
+\n(fn PREDICATE SEQ [KEYWORD VALUE]...)"
   (apply 'count nil cl-list :if-not cl-pred cl-keys))
 
 (defun mismatch (cl-seq1 cl-seq2 &rest cl-keys)
   "Compare SEQ1 with SEQ2, return index of first mismatching element.
 Return nil if the sequences match.  If one sequence is a prefix of the
 other, the return value indicates the end of the shorter sequence.
-Keywords supported:  :test :test-not :key :start1 :end1 :start2 :end2 :from-end"
+\nKeywords supported:  :test :test-not :key :start1 :end1 :start2 :end2 :from-end
+\n(fn SEQ1 SEQ2 [KEYWORD VALUE]...)"
   (cl-parsing-keywords (:test :test-not :key :from-end
 			(:start1 0) :end1 (:start2 0) :end2) ()
     (or cl-end1 (setq cl-end1 (length cl-seq1)))
@@ -558,7 +585,8 @@
   "Search for SEQ1 as a subsequence of SEQ2.
 Return the index of the leftmost element of the first match found;
 return nil if there are no matches.
-Keywords supported:  :test :test-not :key :start1 :end1 :start2 :end2 :from-end"
+\nKeywords supported:  :test :test-not :key :start1 :end1 :start2 :end2 :from-end
+\n(fn SEQ1 SEQ2 [KEYWORD VALUE]...)"
   (cl-parsing-keywords (:test :test-not :key :from-end
 			(:start1 0) :end1 (:start2 0) :end2) ()
     (or cl-end1 (setq cl-end1 (length cl-seq1)))
@@ -580,9 +608,10 @@
 	(and (< cl-start2 cl-end2) cl-pos)))))
 
 (defun sort* (cl-seq cl-pred &rest cl-keys)
-  "Sort the argument SEQUENCE according to PREDICATE.
-This is a destructive function; it reuses the storage of SEQUENCE if possible.
-Keywords supported:  :key"
+  "Sort the argument SEQ according to PREDICATE.
+This is a destructive function; it reuses the storage of SEQ if possible.
+\nKeywords supported:  :key
+\n(fn SEQ PREDICATE [KEYWORD VALUE]...)"
   (if (nlistp cl-seq)
       (replace cl-seq (apply 'sort* (append cl-seq nil) cl-pred cl-keys))
     (cl-parsing-keywords (:key) ()
@@ -593,16 +622,18 @@
 					  (funcall cl-key cl-y)))))))))
 
 (defun stable-sort (cl-seq cl-pred &rest cl-keys)
-  "Sort the argument SEQUENCE stably according to PREDICATE.
-This is a destructive function; it reuses the storage of SEQUENCE if possible.
-Keywords supported:  :key"
+  "Sort the argument SEQ stably according to PREDICATE.
+This is a destructive function; it reuses the storage of SEQ if possible.
+\nKeywords supported:  :key
+\n(fn SEQ PREDICATE [KEYWORD VALUE]...)"
   (apply 'sort* cl-seq cl-pred cl-keys))
 
 (defun merge (cl-type cl-seq1 cl-seq2 cl-pred &rest cl-keys)
   "Destructively merge the two sequences to produce a new sequence.
-TYPE is the sequence type to return, SEQ1 and SEQ2 are the two
-argument sequences, and PRED is a `less-than' predicate on the elements.
-Keywords supported:  :key"
+TYPE is the sequence type to return, SEQ1 and SEQ2 are the two argument
+sequences, and PREDICATE is a `less-than' predicate on the elements.
+\nKeywords supported:  :key
+\n(fn TYPE SEQ1 SEQ2 PREDICATE [KEYWORD VALUE]...)"
   (or (listp cl-seq1) (setq cl-seq1 (append cl-seq1 nil)))
   (or (listp cl-seq2) (setq cl-seq2 (append cl-seq2 nil)))
   (cl-parsing-keywords (:key) ()
@@ -618,7 +649,8 @@
 (defun member* (cl-item cl-list &rest cl-keys)
   "Find the first occurrence of ITEM in LIST.
 Return the sublist of LIST whose car is ITEM.
-Keywords supported:  :test :test-not :key"
+\nKeywords supported:  :test :test-not :key
+\n(fn ITEM LIST [KEYWORD VALUE]...)"
   (if cl-keys
       (cl-parsing-keywords (:test :test-not :key :if :if-not) ()
 	(while (and cl-list (not (cl-check-test cl-item (car cl-list))))
@@ -631,13 +663,15 @@
 (defun member-if (cl-pred cl-list &rest cl-keys)
   "Find the first item satisfying PREDICATE in LIST.
 Return the sublist of LIST whose car matches.
-Keywords supported:  :key"
+\nKeywords supported:  :key
+\n(fn PREDICATE LIST [KEYWORD VALUE]...)"
   (apply 'member* nil cl-list :if cl-pred cl-keys))
 
 (defun member-if-not (cl-pred cl-list &rest cl-keys)
   "Find the first item not satisfying PREDICATE in LIST.
 Return the sublist of LIST whose car matches.
-Keywords supported:  :key"
+\nKeywords supported:  :key
+\n(fn PREDICATE LIST [KEYWORD VALUE]...)"
   (apply 'member* nil cl-list :if-not cl-pred cl-keys))
 
 (defun cl-adjoin (cl-item cl-list &rest cl-keys)
@@ -649,7 +683,8 @@
 ;;; See compiler macro in cl-macs.el
 (defun assoc* (cl-item cl-alist &rest cl-keys)
   "Find the first item whose car matches ITEM in LIST.
-Keywords supported:  :test :test-not :key"
+\nKeywords supported:  :test :test-not :key
+\n(fn ITEM LIST [KEYWORD VALUE]...)"
   (if cl-keys
       (cl-parsing-keywords (:test :test-not :key :if :if-not) ()
 	(while (and cl-alist
@@ -663,17 +698,20 @@
 
 (defun assoc-if (cl-pred cl-list &rest cl-keys)
   "Find the first item whose car satisfies PREDICATE in LIST.
-Keywords supported:  :key"
+\nKeywords supported:  :key
+\n(fn PREDICATE LIST [KEYWORD VALUE]...)"
   (apply 'assoc* nil cl-list :if cl-pred cl-keys))
 
 (defun assoc-if-not (cl-pred cl-list &rest cl-keys)
   "Find the first item whose car does not satisfy PREDICATE in LIST.
-Keywords supported:  :key"
+\nKeywords supported:  :key
+\n(fn PREDICATE LIST [KEYWORD VALUE]...)"
   (apply 'assoc* nil cl-list :if-not cl-pred cl-keys))
 
 (defun rassoc* (cl-item cl-alist &rest cl-keys)
   "Find the first item whose cdr matches ITEM in LIST.
-Keywords supported:  :test :test-not :key"
+\nKeywords supported:  :test :test-not :key
+\n(fn ITEM LIST [KEYWORD VALUE]...)"
   (if (or cl-keys (numberp cl-item))
       (cl-parsing-keywords (:test :test-not :key :if :if-not) ()
 	(while (and cl-alist
@@ -685,12 +723,14 @@
 
 (defun rassoc-if (cl-pred cl-list &rest cl-keys)
   "Find the first item whose cdr satisfies PREDICATE in LIST.
-Keywords supported:  :key"
+\nKeywords supported:  :key
+\n(fn PREDICATE LIST [KEYWORD VALUE]...)"
   (apply 'rassoc* nil cl-list :if cl-pred cl-keys))
 
 (defun rassoc-if-not (cl-pred cl-list &rest cl-keys)
   "Find the first item whose cdr does not satisfy PREDICATE in LIST.
-Keywords supported:  :key"
+\nKeywords supported:  :key
+\n(fn PREDICATE LIST [KEYWORD VALUE]...)"
   (apply 'rassoc* nil cl-list :if-not cl-pred cl-keys))
 
 (defun union (cl-list1 cl-list2 &rest cl-keys)
@@ -698,7 +738,8 @@
 The result list contains all items that appear in either LIST1 or LIST2.
 This is a non-destructive function; it makes a copy of the data if necessary
 to avoid corrupting the original LIST1 and LIST2.
-Keywords supported:  :test :test-not :key"
+\nKeywords supported:  :test :test-not :key
+\n(fn LIST1 LIST2 [KEYWORD VALUE]...)"
   (cond ((null cl-list1) cl-list2) ((null cl-list2) cl-list1)
 	((equal cl-list1 cl-list2) cl-list1)
 	(t
@@ -717,7 +758,8 @@
 The result list contains all items that appear in either LIST1 or LIST2.
 This is a destructive function; it reuses the storage of LIST1 and LIST2
 whenever possible.
-Keywords supported:  :test :test-not :key"
+\nKeywords supported:  :test :test-not :key
+\n(fn LIST1 LIST2 [KEYWORD VALUE]...)"
   (cond ((null cl-list1) cl-list2) ((null cl-list2) cl-list1)
 	(t (apply 'union cl-list1 cl-list2 cl-keys))))
 
@@ -726,7 +768,8 @@
 The result list contains all items that appear in both LIST1 and LIST2.
 This is a non-destructive function; it makes a copy of the data if necessary
 to avoid corrupting the original LIST1 and LIST2.
-Keywords supported:  :test :test-not :key"
+\nKeywords supported:  :test :test-not :key
+\n(fn LIST1 LIST2 [KEYWORD VALUE]...)"
   (and cl-list1 cl-list2
        (if (equal cl-list1 cl-list2) cl-list1
 	 (cl-parsing-keywords (:key) (:test :test-not)
@@ -747,7 +790,8 @@
 The result list contains all items that appear in both LIST1 and LIST2.
 This is a destructive function; it reuses the storage of LIST1 and LIST2
 whenever possible.
-Keywords supported:  :test :test-not :key"
+\nKeywords supported:  :test :test-not :key
+\n(fn LIST1 LIST2 [KEYWORD VALUE]...)"
   (and cl-list1 cl-list2 (apply 'intersection cl-list1 cl-list2 cl-keys)))
 
 (defun set-difference (cl-list1 cl-list2 &rest cl-keys)
@@ -755,7 +799,8 @@
 The result list contains all items that appear in LIST1 but not LIST2.
 This is a non-destructive function; it makes a copy of the data if necessary
 to avoid corrupting the original LIST1 and LIST2.
-Keywords supported:  :test :test-not :key"
+\nKeywords supported:  :test :test-not :key
+\n(fn LIST1 LIST2 [KEYWORD VALUE]...)"
   (if (or (null cl-list1) (null cl-list2)) cl-list1
     (cl-parsing-keywords (:key) (:test :test-not)
       (let ((cl-res nil))
@@ -773,7 +818,8 @@
 The result list contains all items that appear in LIST1 but not LIST2.
 This is a destructive function; it reuses the storage of LIST1 and LIST2
 whenever possible.
-Keywords supported:  :test :test-not :key"
+\nKeywords supported:  :test :test-not :key
+\n(fn LIST1 LIST2 [KEYWORD VALUE]...)"
   (if (or (null cl-list1) (null cl-list2)) cl-list1
     (apply 'set-difference cl-list1 cl-list2 cl-keys)))
 
@@ -782,7 +828,8 @@
 The result list contains all items that appear in exactly one of LIST1, LIST2.
 This is a non-destructive function; it makes a copy of the data if necessary
 to avoid corrupting the original LIST1 and LIST2.
-Keywords supported:  :test :test-not :key"
+\nKeywords supported:  :test :test-not :key
+\n(fn LIST1 LIST2 [KEYWORD VALUE]...)"
   (cond ((null cl-list1) cl-list2) ((null cl-list2) cl-list1)
 	((equal cl-list1 cl-list2) nil)
 	(t (append (apply 'set-difference cl-list1 cl-list2 cl-keys)
@@ -793,7 +840,8 @@
 The result list contains all items that appear in exactly one of LIST1, LIST2.
 This is a destructive function; it reuses the storage of LIST1 and LIST2
 whenever possible.
-Keywords supported:  :test :test-not :key"
+\nKeywords supported:  :test :test-not :key
+\n(fn LIST1 LIST2 [KEYWORD VALUE]...)"
   (cond ((null cl-list1) cl-list2) ((null cl-list2) cl-list1)
 	((equal cl-list1 cl-list2) nil)
 	(t (nconc (apply 'nset-difference cl-list1 cl-list2 cl-keys)
@@ -802,7 +850,8 @@
 (defun subsetp (cl-list1 cl-list2 &rest cl-keys)
   "Return true if LIST1 is a subset of LIST2.
 I.e., if every element of LIST1 also appears in LIST2.
-Keywords supported:  :test :test-not :key"
+\nKeywords supported:  :test :test-not :key
+\n(fn LIST1 LIST2 [KEYWORD VALUE]...)"
   (cond ((null cl-list1) t) ((null cl-list2) nil)
 	((equal cl-list1 cl-list2) t)
 	(t (cl-parsing-keywords (:key) (:test :test-not)
@@ -815,38 +864,44 @@
 (defun subst-if (cl-new cl-pred cl-tree &rest cl-keys)
   "Substitute NEW for elements matching PREDICATE in TREE (non-destructively).
 Return a copy of TREE with all matching elements replaced by NEW.
-Keywords supported:  :key"
+\nKeywords supported:  :key
+\n(fn NEW PREDICATE TREE [KEYWORD VALUE]...)"
   (apply 'sublis (list (cons nil cl-new)) cl-tree :if cl-pred cl-keys))
 
 (defun subst-if-not (cl-new cl-pred cl-tree &rest cl-keys)
   "Substitute NEW for elts not matching PREDICATE in TREE (non-destructively).
 Return a copy of TREE with all non-matching elements replaced by NEW.
-Keywords supported:  :key"
+\nKeywords supported:  :key
+\n(fn NEW PREDICATE TREE [KEYWORD VALUE]...)"
   (apply 'sublis (list (cons nil cl-new)) cl-tree :if-not cl-pred cl-keys))
 
 (defun nsubst (cl-new cl-old cl-tree &rest cl-keys)
   "Substitute NEW for OLD everywhere in TREE (destructively).
 Any element of TREE which is `eql' to OLD is changed to NEW (via a call
 to `setcar').
-Keywords supported:  :test :test-not :key"
+\nKeywords supported:  :test :test-not :key
+\n(fn NEW OLD TREE [KEYWORD VALUE]...)"
   (apply 'nsublis (list (cons cl-old cl-new)) cl-tree cl-keys))
 
 (defun nsubst-if (cl-new cl-pred cl-tree &rest cl-keys)
   "Substitute NEW for elements matching PREDICATE in TREE (destructively).
 Any element of TREE which matches is changed to NEW (via a call to `setcar').
-Keywords supported:  :key"
+\nKeywords supported:  :key
+\n(fn NEW PREDICATE TREE [KEYWORD VALUE]...)"
   (apply 'nsublis (list (cons nil cl-new)) cl-tree :if cl-pred cl-keys))
 
 (defun nsubst-if-not (cl-new cl-pred cl-tree &rest cl-keys)
   "Substitute NEW for elements not matching PREDICATE in TREE (destructively).
 Any element of TREE which matches is changed to NEW (via a call to `setcar').
-Keywords supported:  :key"
+\nKeywords supported:  :key
+\n(fn NEW PREDICATE TREE [KEYWORD VALUE]...)"
   (apply 'nsublis (list (cons nil cl-new)) cl-tree :if-not cl-pred cl-keys))
 
 (defun sublis (cl-alist cl-tree &rest cl-keys)
   "Perform substitutions indicated by ALIST in TREE (non-destructively).
 Return a copy of TREE with all matching elements replaced.
-Keywords supported:  :test :test-not :key"
+\nKeywords supported:  :test :test-not :key
+\n(fn ALIST TREE [KEYWORD VALUE]...)"
   (cl-parsing-keywords (:test :test-not :key :if :if-not) ()
     (cl-sublis-rec cl-tree)))
 
@@ -867,7 +922,8 @@
 (defun nsublis (cl-alist cl-tree &rest cl-keys)
   "Perform substitutions indicated by ALIST in TREE (destructively).
 Any matching element of TREE is changed via a call to `setcar'.
-Keywords supported:  :test :test-not :key"
+\nKeywords supported:  :test :test-not :key
+\n(fn ALIST TREE [KEYWORD VALUE]...)"
   (cl-parsing-keywords (:test :test-not :key :if :if-not) ()
     (let ((cl-hold (list cl-tree)))
       (cl-nsublis-rec cl-hold)
@@ -888,9 +944,10 @@
 	(setq cl-tree (cdr cl-tree))))))
 
 (defun tree-equal (cl-x cl-y &rest cl-keys)
-  "Return t if trees X and Y have `eql' leaves.
+  "Return t if trees TREE1 and TREE2 have `eql' leaves.
 Atoms are compared by `eql'; cons cells are compared recursively.
-Keywords supported:  :test :test-not :key"
+\nKeywords supported:  :test :test-not :key
+\n(fn TREE1 TREE2 [KEYWORD VALUE]...)"
   (cl-parsing-keywords (:test :test-not :key) ()
     (cl-tree-equal-rec cl-x cl-y)))
 
--- a/lisp/emacs-lisp/cl.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/emacs-lisp/cl.el	Sat May 28 21:04:38 2005 +0000
@@ -112,16 +112,6 @@
 (defun cl-cannot-unload ()
   (error "Cannot unload the feature `cl'"))
 
-;;; Predicates.
-
-(defun eql (a b)    ; See compiler macro in cl-macs.el
-  "Return t if the two args are the same Lisp object.
-Floating-point numbers of equal value are `eql', but they may not be `eq'."
-  (if (numberp a)
-      (equal a b)
-    (eq a b)))
-
-
 ;;; Generalized variables.  These macros are defined here so that they
 ;;; can safely be used in .emacs files.
 
@@ -162,7 +152,8 @@
   "(pushnew X PLACE): insert X at the head of the list if not already there.
 Like (push X PLACE), except that the list is unmodified if X is `eql' to
 an element already on the list.
-Keywords supported:  :test :test-not :key"
+\nKeywords supported:  :test :test-not :key
+\n(fn X PLACE [KEYWORD VALUE]...)"
   (if (symbolp place) (list 'setq place (list* 'adjoin x place keys))
     (list* 'callf2 'adjoin x place keys)))
 
@@ -256,7 +247,8 @@
 in place of FORM.  When a non-macro-call results, it is returned.
 
 The second optional arg ENVIRONMENT specifies an environment of macro
-definitions to shadow the loaded ones for use in file byte-compilation."
+definitions to shadow the loaded ones for use in file byte-compilation.
+\n(fn FORM &optional ENVIRONMENT)"
   (let ((cl-macro-environment cl-env))
     (while (progn (setq cl-macro (funcall cl-old-macroexpand cl-macro cl-env))
 		  (and (symbolp cl-macro)
@@ -300,27 +292,27 @@
 
 ;;; Numbers.
 
-(defun floatp-safe (x)
+(defun floatp-safe (object)
   "Return t if OBJECT is a floating point number.
 On Emacs versions that lack floating-point support, this function
 always returns nil."
-  (and (numberp x) (not (integerp x))))
+  (and (numberp object) (not (integerp object))))
 
-(defun plusp (x)
+(defun plusp (number)
   "Return t if NUMBER is positive."
-  (> x 0))
+  (> number 0))
 
-(defun minusp (x)
+(defun minusp (number)
   "Return t if NUMBER is negative."
-  (< x 0))
+  (< number 0))
 
-(defun oddp (x)
+(defun oddp (integer)
   "Return t if INTEGER is odd."
-  (eq (logand x 1) 1))
+  (eq (logand integer 1) 1))
 
-(defun evenp (x)
+(defun evenp (integer)
   "Return t if INTEGER is even."
-  (eq (logand x 1) 0))
+  (eq (logand integer 1) 0))
 
 (defvar *random-state* (vector 'cl-random-state-tag -1 30 (cl-random-time)))
 
@@ -344,7 +336,8 @@
 If there are several SEQs, FUNCTION is called with that many arguments,
 and mapping stops as soon as the shortest list runs out.  With just one
 SEQ, this is like `mapcar'.  With several, it is like the Common Lisp
-`mapcar' function extended to arbitrary sequence types."
+`mapcar' function extended to arbitrary sequence types.
+\n(fn FUNCTION SEQ...)"
   (if cl-rest
       (if (or (cdr cl-rest) (nlistp cl-x) (nlistp (car cl-rest)))
 	  (cl-mapcar-many cl-func (cons cl-x cl-rest))
@@ -503,9 +496,10 @@
 ;;    x))
 
 (defun list* (arg &rest rest)   ; See compiler macro in cl-macs.el
-  "Return a new list with specified args as elements, consed to last arg.
+  "Return a new list with specified ARGs as elements, consed to last ARG.
 Thus, `(list* A B C D)' is equivalent to `(nconc (list A B C) D)', or to
-`(cons A (cons B (cons C D)))'."
+`(cons A (cons B (cons C D)))'.
+\n(fn ARG...)"
   (cond ((not rest) arg)
 	((not (cdr rest)) (cons arg (car rest)))
 	(t (let* ((n (length rest))
@@ -522,8 +516,8 @@
     (nreverse res)))
 
 (defun copy-list (list)
-  "Return a copy of a list, which may be a dotted list.
-The elements of the list are not copied, just the list structure itself."
+  "Return a copy of LIST, which may be a dotted list.
+The elements of LIST are not copied, just the list structure itself."
   (if (consp list)
       (let ((res nil))
 	(while (consp list) (push (pop list) res))
@@ -544,7 +538,8 @@
 (defun adjoin (cl-item cl-list &rest cl-keys)  ; See compiler macro in cl-macs
   "Return ITEM consed onto the front of LIST only if it's not already there.
 Otherwise, return LIST unmodified.
-Keywords supported:  :test :test-not :key"
+\nKeywords supported:  :test :test-not :key
+\n(fn ITEM LIST [KEYWORD VALUE]...)"
   (cond ((or (equal cl-keys '(:test eq))
 	     (and (null cl-keys) (not (numberp cl-item))))
 	 (if (memq cl-item cl-list) cl-list (cons cl-item cl-list)))
@@ -555,7 +550,8 @@
 (defun subst (cl-new cl-old cl-tree &rest cl-keys)
   "Substitute NEW for OLD everywhere in TREE (non-destructively).
 Return a copy of TREE with all elements `eql' to OLD replaced by NEW.
-Keywords supported:  :test :test-not :key"
+\nKeywords supported:  :test :test-not :key
+\n(fn NEW OLD TREE [KEYWORD VALUE]...)"
   (if (or cl-keys (and (numberp cl-old) (not (integerp cl-old))))
       (apply 'sublis (list (cons cl-old cl-new)) cl-tree cl-keys)
     (cl-do-subst cl-new cl-old cl-tree)))
@@ -569,8 +565,17 @@
 	       cl-tree (cons a d))))
 	(t cl-tree)))
 
-(defun acons (a b c) (cons (cons a b) c))
-(defun pairlis (a b &optional c) (nconc (mapcar* 'cons a b) c))
+(defun acons (key value alist)
+  "Add KEY and VALUE to ALIST.
+Return a new list with (cons KEY VALUE) as car and ALIST as cdr."
+  (cons (cons key value) alist))
+
+(defun pairlis (keys values &optional alist)
+  "Make an alist from KEYS and VALUES.
+Return a new alist composed by associating KEYS to corresponding VALUES;
+the process stops as soon as KEYS or VALUES run out.
+If ALIST is non-nil, the new pairs are prepended to it."
+  (nconc (mapcar* 'cons keys values) alist))
 
 
 ;;; Miscellaneous.
@@ -699,5 +704,5 @@
 
 (run-hooks 'cl-load-hook)
 
-;;; arch-tag: 5f07fa74-f153-4524-9303-21f5be125851
+;; arch-tag: 5f07fa74-f153-4524-9303-21f5be125851
 ;;; cl.el ends here
--- a/lisp/emacs-lisp/derived.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/emacs-lisp/derived.el	Sat May 28 21:04:38 2005 +0000
@@ -132,6 +132,7 @@
   arguments are currently understood:
 :group GROUP
 	Declare the customization group that corresponds to this mode.
+	The command `customize-mode' uses this.
 :syntax-table TABLE
 	Use TABLE instead of the default.
 	A nil value means to simply use the same syntax-table as the parent.
--- a/lisp/emacs-lisp/easy-mmode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/emacs-lisp/easy-mmode.el	Sat May 28 21:04:38 2005 +0000
@@ -172,7 +172,7 @@
       (setq group
 	    `(:group ',(intern (replace-regexp-in-string
 				"-mode\\'" "" mode-name)))))
-    
+
     `(progn
        ;; Define the variable to enable or disable the mode.
        ,(if (not globalp)
@@ -306,9 +306,9 @@
 	 ;; Setup hook to handle future mode changes and new buffers.
 	 (if ,global-mode
 	     (progn
-	       (add-hook 'find-file-hook ',buffers)
+	       (add-hook 'after-change-major-mode-hook ',buffers)
 	       (add-hook 'change-major-mode-hook ',cmmh))
-	   (remove-hook 'find-file-hook ',buffers)
+	   (remove-hook 'after-change-major-mode-hook ',buffers)
 	   (remove-hook 'change-major-mode-hook ',cmmh))
 
 	 ;; Go through existing buffers.
--- a/lisp/emacs-lisp/easymenu.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/emacs-lisp/easymenu.el	Sat May 28 21:04:38 2005 +0000
@@ -471,11 +471,15 @@
 
 (defun easy-menu-add (menu &optional map)
   "Add the menu to the menubar.
-This is a nop on Emacs since menus are automatically activated when the
-corresponding keymap is activated.  On XEmacs this is needed to actually
-add the menu to the current menubar.
-Maybe precalculate equivalent key bindings.
-Do it only if `easy-menu-precalculate-equivalent-keybindings' is on."
+On Emacs, menus are already automatically activated when the
+corresponding keymap is activated.  On XEmacs this is needed to
+actually add the menu to the current menubar.
+
+This also precalculates equivalent key bindings when
+`easy-menu-precalculate-equivalent-keybindings' is on.
+
+You should call this once the menu and keybindings are set up
+completely and menu filter functions can be expected to work."
   (when easy-menu-precalculate-equivalent-keybindings
     (if (and (symbolp menu) (not (keymapp menu)) (boundp menu))
 	(setq menu (symbol-value menu)))
--- a/lisp/emacs-lisp/re-builder.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/emacs-lisp/re-builder.el	Sat May 28 21:04:38 2005 +0000
@@ -254,7 +254,7 @@
         mode-name "RE Builder")
   (use-local-map reb-mode-map)
   (reb-mode-common)
-  (run-hooks 'reb-mode-hook))
+  (run-mode-hooks 'reb-mode-hook))
 
 (define-derived-mode reb-lisp-mode
   emacs-lisp-mode "RE Builder Lisp"
--- a/lisp/emulation/tpu-extras.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/emulation/tpu-extras.el	Sat May 28 21:04:38 2005 +0000
@@ -144,9 +144,9 @@
   "Eliminate whitespace at ends of lines, if the cursor is free."
   (if (and (buffer-modified-p) tpu-cursor-free) (tpu-trim-line-ends)))
 
-(or (memq 'tpu-write-file-hook write-file-hooks)
-    (setq write-file-hooks
-	  (cons 'tpu-write-file-hook write-file-hooks)))
+(or (memq 'tpu-write-file-hook write-file-functions)
+    (setq write-file-functions
+	  (cons 'tpu-write-file-hook write-file-functions)))
 
 
 ;;;  Utility routines for implementing scroll margins
--- a/lisp/emulation/vi.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/emulation/vi.el	Sat May 28 21:04:38 2005 +0000
@@ -403,7 +403,7 @@
   (make-local-variable 'vi-mode-old-mode-name)
   (make-local-variable 'vi-mode-old-major-mode)
   (make-local-variable 'vi-mode-old-case-fold)
-  (run-hooks 'vi-mode-hook))
+  (run-mode-hooks 'vi-mode-hook))
 
 ;;;###autoload
 (defun vi-mode ()
--- a/lisp/emulation/viper-ex.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/emulation/viper-ex.el	Sat May 28 21:04:38 2005 +0000
@@ -67,10 +67,10 @@
 ;;; Variables
 
 (defconst viper-ex-work-buf-name " *ex-working-space*")
-(defconst viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name))
+(defvar viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name))
 (defconst viper-ex-tmp-buf-name " *ex-tmp*")
 (defconst viper-ex-print-buf-name " *ex-print*")
-(defconst viper-ex-print-buf (get-buffer-create viper-ex-print-buf-name))
+(defvar viper-ex-print-buf (get-buffer-create viper-ex-print-buf-name))
 
 
 ;;; ex-commands...
--- a/lisp/emulation/ws-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/emulation/ws-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -294,7 +294,7 @@
   (use-local-map wordstar-mode-map)
   (setq mode-name "WordStar")
   (setq major-mode 'wordstar-mode)
-  (run-hooks 'wordstar-mode-hook))
+  (run-mode-hooks 'wordstar-mode-hook))
 
 
 (defun wordstar-center-paragraph ()
--- a/lisp/eshell/em-cmpl.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/eshell/em-cmpl.el	Sat May 28 21:04:38 2005 +0000
@@ -370,7 +370,8 @@
 	   (setq args (nthcdr (1+ l) args)
 		 posns (nthcdr (1+ l) posns))))
     (assert (= (length args) (length posns)))
-    (when (and args (eq (char-syntax (char-before end)) ? ))
+    (when (and args (eq (char-syntax (char-before end)) ? )
+	       (not (eq (char-before (1- end)) ?\\)))
       (nconc args (list ""))
       (nconc posns (list (point))))
     (cons (mapcar
--- a/lisp/eshell/esh-cmd.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/eshell/esh-cmd.el	Sat May 28 21:04:38 2005 +0000
@@ -757,7 +757,7 @@
 
 (defmacro eshell-do-subjob (object)
   "Evaluate a command OBJECT as a subjob.
-We indicate thet the process was run in the background by returned it
+We indicate that the process was run in the background by returning it
 ensconced in a list."
   `(let ((eshell-current-subjob-p t))
      ,object))
@@ -1006,11 +1006,10 @@
 		   (eshell-resume-eval))))
       ;; On systems that don't support async subprocesses, eshell-resume
       ;; can return t.  Don't treat that as an error.
+      (if (listp delim)
+	  (setq delim (car delim)))
       (if (and delim (not (eq delim t)))
-	  (error "Unmatched delimiter: %c"
-		 (if (listp delim)
-		     (car delim)
-		   delim))))))
+	  (error "Unmatched delimiter: %c" delim)))))
 
 (defun eshell-resume-command (proc status)
   "Resume the current command when a process ends."
--- a/lisp/eshell/esh-io.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/eshell/esh-io.el	Sat May 28 21:04:38 2005 +0000
@@ -353,7 +353,8 @@
    ((or (bufferp target)
 	(and (boundp 'eshell-buffer-shorthand)
 	     (symbol-value 'eshell-buffer-shorthand)
-	     (symbolp target)))
+	     (symbolp target)
+	     (not (memq target '(t nil)))))
     (let ((buf (if (bufferp target)
 		   target
 		 (get-buffer-create
--- a/lisp/eshell/esh-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/eshell/esh-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -435,7 +435,7 @@
 
   (if eshell-first-time-p
       (run-hooks 'eshell-first-time-mode-hook))
-  (run-hooks 'eshell-mode-hook)
+  (run-mode-hooks 'eshell-mode-hook)
   (run-hooks 'eshell-post-command-hook))
 
 (put 'eshell-mode 'mode-class 'special)
--- a/lisp/faces.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/faces.el	Sat May 28 21:04:38 2005 +0000
@@ -1874,9 +1874,22 @@
   :group 'modeline
   :group 'basic-faces)
 
+(defface mode-line-highlight
+  '((((class color) (min-colors 88) (background light))
+      :background "RoyalBlue4" :foreground "white")
+     (((class color) (min-colors 88) (background dark))
+      :background "light sky blue" :foreground "black")
+     (t
+     :inverse-video t))
+  "Basic mode line face for highlighting."
+  :version "22.1"
+  :group 'modeline
+  :group 'basic-faces)
+
 ;; Make `modeline' an alias for `mode-line', for compatibility.
 (put 'modeline 'face-alias 'mode-line)
 (put 'modeline-inactive 'face-alias 'mode-line-inactive)
+(put 'modeline-higilight 'face-alias 'mode-line-highlight)
 
 (defface header-line
   '((default
--- a/lisp/files.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/files.el	Sat May 28 21:04:38 2005 +0000
@@ -1744,7 +1744,7 @@
   (mapc
    (lambda (elt)
      (cons (purecopy (car elt)) (cdr elt)))
-   '(;; do this first, so that .html.pl is Polish html, not Perl
+   `(;; do this first, so that .html.pl is Polish html, not Perl
      ("\\.s?html?\\(\\.[a-zA-Z_]+\\)?\\'" . html-mode)
      ("\\.te?xt\\'" . text-mode)
      ("\\.[tT]e[xX]\\'" . tex-mode)
@@ -1762,9 +1762,12 @@
      ("\\.ad[abs]\\'" . ada-mode)
      ("\\.ad[bs].dg\\'" . ada-mode)
      ("\\.\\([pP]\\([Llm]\\|erl\\|od\\)\\|al\\)\\'" . perl-mode)
-     ("\\.mk\\'" . makefile-gmake-mode)	; Might be any make, give Gnu the host advantage
-     ("[Mm]akefile\\'" . makefile-mode)
      ("GNUmakefile\\'" . makefile-gmake-mode)
+     ,@(if (memq system-type '(berkeley-unix next-mach darwin))
+	   '(("\\.mk\\'" . makefile-bsdmake-mode)
+	     ("[Mm]akefile\\'" . makefile-bsdmake-mode))
+	 '(("\\.mk\\'" . makefile-gmake-mode)	; Might be any make, give Gnu the host advantage
+	   ("[Mm]akefile\\'" . makefile-mode)))
      ("Makeppfile\\'" . makefile-makepp-mode)
      ("\\.am\\'" . makefile-automake-mode)
      ;; Less common extensions come here
--- a/lisp/font-core.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/font-core.el	Sat May 28 21:04:38 2005 +0000
@@ -231,24 +231,20 @@
 ;; hook is run, the major mode is in the process of being changed and we do not
 ;; know what the final major mode will be.  So, `font-lock-change-major-mode'
 ;; only (a) notes the name of the current buffer, and (b) adds our function
-;; `turn-on-font-lock-if-enabled' to the hook variables `find-file-hook' and
-;; `post-command-hook' (for buffers that are not visiting files).  By the time
+;; `turn-on-font-lock-if-enabled' to the hook variables
+;; `after-change-major-mode-hook' and `post-command-hook' (for modes
+;; that do not yet run `after-change-major-mode-hook').  By the time
 ;; the functions on the first of these hooks to be run are run, the new major
 ;; mode is assumed to be in place.  This way we get a Font Lock function run
 ;; when a major mode is turned on, without knowing major modes or their hooks.
 ;;
-;; Naturally this requires that (a) major modes run `kill-all-local-variables',
-;; as they are supposed to do, and (b) the major mode is in place after the
-;; file is visited or the command that ran `kill-all-local-variables' has
-;; finished, whichever the sooner.  Arguably, any major mode that does not
-;; follow the convension (a) is broken, and I can't think of any reason why (b)
-;; would not be met (except `gnudoit' on non-files).  However, it is not clean.
-;;
-;; Probably the cleanest solution is to have each major mode function run some
-;; hook, e.g., `major-mode-hook', but maybe implementing that change is
-;; impractical.  I am personally against making `setq' a macro or be advised,
-;; or have a special function such as `set-major-mode', but maybe someone can
-;; come up with another solution?
+;; Naturally this requires that major modes run `kill-all-local-variables'
+;; and `after-change-major-mode-hook', as they are supposed to.  For modes
+;; that do not run `after-change-major-mode-hook' yet, `post-command-hook'
+;; takes care of things if the mode is set directly or indirectly by
+;; an interactive command; however, problems can occur if the mode is
+;; set by a timer or process: in that case, proper handling of Font Lock mode
+;; may be delayed until the next interactive command.
 
 ;; User interface.
 ;;
--- a/lisp/font-lock.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/font-lock.el	Sat May 28 21:04:38 2005 +0000
@@ -563,11 +563,11 @@
 a place such that any bracket-pairs outside it can be ignored for Emacs
 syntax analysis and fontification).
 
-If this is nil, the beginning of the buffer is used, which is
-always correct but tends to be slow.
-This is normally set via `font-lock-defaults'.
-This variable is semi-obsolete; we recommend setting
-`syntax-begin-function' instead.")
+If this is nil, Font Lock uses `syntax-begin-function' to move back
+outside of any comment, string, or sexp.  This variable is semi-obsolete;
+we recommend setting `syntax-begin-function' instead.
+
+This is normally set via `font-lock-defaults'.")
 
 (defvar font-lock-mark-block-function nil
   "*Non-nil means use this function to mark a block of text.
@@ -2053,19 +2053,22 @@
        ("\\<:\\sw+\\>" 0 font-lock-builtin-face)
        ;; ELisp and CLisp `&' keywords as types.
        ("\\&\\sw+\\>" . font-lock-type-face)
-       ;; Make regexp grouping constructs bold, so they stand out, but only in strings.
+       ;; Make regexp grouping constructs bold, so they stand out, but only
+       ;; in strings.
        ((lambda (bound)
-	  (if (re-search-forward "\\([\\][\\]\\)\\([(|)]\\)\\(\\?:\\)?" bound)
+	  (if (re-search-forward "\\(\\\\\\\\\\)\\([(|)]\\)\\(\\?:\\)?" bound t)
 	       (let ((face (get-text-property (1- (point)) 'face)))
 		 (if (listp face)
 		     (memq 'font-lock-string-face face)
 		   (eq 'font-lock-string-face face)))))
-	(1 font-lock-comment-face prepend) ; Should we introduce a lowlight face for this?
-					; Ideally that would retain the color, dimmed 50%.
+        ;; Should we introduce a lowlight face for this?
+        ;; Ideally that would retain the color, dimmed.
+	(1 font-lock-comment-face prepend)
 	(2 'bold prepend)
 	(3 font-lock-type-face prepend t))
-       ;; Underline innermost grouping, so that you can more easily see what belongs together.
-       ;; 2005-05-12: Font-lock can go into an unbreakable endless loop on this -- something's broken.
+       ;; Underline innermost grouping, so that you can more easily see what
+       ;; belongs together.  2005-05-12: Font-lock can go into an
+       ;; unbreakable endless loop on this -- something's broken.
        ;;("[\\][\\][(]\\(?:\\?:\\)?\\(\\(?:[^\\\"]+\\|[\\]\\(?:[^\\]\\|[\\][^(]\\)\\)+?\\)[\\][\\][)]"
 	 ;;1 'underline prepend)
 ;;;  This is too general -- rms.
--- a/lisp/forms.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/forms.el	Sat May 28 21:04:38 2005 +0000
@@ -713,7 +713,7 @@
 
   ;; user customising
   ;;(message "forms: proceeding setup (user hooks)...")
-  (run-hooks 'forms-mode-hook 'forms-mode-hooks)
+  (run-mode-hooks 'forms-mode-hook 'forms-mode-hooks)
   ;;(message "forms: setting up... done.")
 
   ;; be helpful
--- a/lisp/gnus/ChangeLog	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/gnus/ChangeLog	Sat May 28 21:04:38 2005 +0000
@@ -1,3 +1,85 @@
+2005-05-27  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* gnus-util.el (gnus-run-mode-hooks): New function.
+
+	* score-mode.el (gnus-score-mode): Use gnus-run-mode-hooks.
+
+2005-05-26  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* gnus-agent.el (gnus-agent-make-mode-line-string):
+	Use mode-line-highlight as mouse-face.
+
+2005-05-17  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* canlock.el (canlock): Change the parent group to news.
+
+	* deuglify.el (gnus-outlook-deuglify): Add :group.
+
+	* dig.el (dig): Add :group.
+
+	* gnus-art.el (gnus-inhibit-mime-unbuttonizing): Add :group.
+
+	* gnus-cite.el (gnus-cite-attribution-face): Add :group.
+	(gnus-cite-face-1, gnus-cite-face-2, gnus-cite-face-3): Ditto.
+	(gnus-cite-face-4, gnus-cite-face-5, gnus-cite-face-6): Ditto.
+	(gnus-cite-face-7, gnus-cite-face-8, gnus-cite-face-9): Ditto.
+	(gnus-cite-face-10, gnus-cite-face-11): Ditto.
+
+	* gnus-diary.el (gnus-diary): Add :group.
+
+	* gnus.el (gnus-group-news-1-face): Add :group.
+	(gnus-group-news-1-empty-face): Ditto.
+	(gnus-group-news-2-face, gnus-group-news-2-empty-face): Ditto.
+	(gnus-group-news-3-face, gnus-group-news-3-empty-face): Ditto.
+	(gnus-group-news-4-face, gnus-group-news-4-empty-face): Ditto.
+	(gnus-group-news-5-face, gnus-group-news-5-empty-face): Ditto.
+	(gnus-group-news-6-face, gnus-group-news-6-empty-face): Ditto.
+	(gnus-group-news-low-face, gnus-group-news-low-empty-face): Ditto.
+	(gnus-group-mail-1-face, gnus-group-mail-1-empty-face): Ditto.
+	(gnus-group-mail-2-face, gnus-group-mail-2-empty-face): Ditto.
+	(gnus-group-mail-3-face, gnus-group-mail-3-empty-face): Ditto.
+	(gnus-group-mail-low-face, gnus-group-mail-low-empty-face): Ditto.
+	(gnus-summary-selected-face, gnus-summary-cancelled-face): Ditto.
+	(gnus-summary-high-ticked-face): Ditto.
+	(gnus-summary-low-ticked-face): Ditto.
+	(gnus-summary-normal-ticked-face): Ditto.
+	(gnus-summary-high-ancient-face): Ditto.
+	(gnus-summary-low-ancient-face): Ditto.
+	(gnus-summary-normal-ancient-face): Ditto.
+	(gnus-summary-high-undownloaded-face): Ditto.
+	(gnus-summary-low-undownloaded-face): Ditto.
+	(gnus-summary-normal-undownloaded-face): Ditto.
+	(gnus-summary-high-unread-face): Ditto.
+	(gnus-summary-low-unread-face): Ditto.
+	(gnus-summary-normal-unread-face): Ditto.
+	(gnus-summary-high-read-face, gnus-summary-low-read-face): Diito
+	(gnus-summary-normal-read-face, gnus-splash-face): Ditto.
+
+	* message.el (message-minibuffer-local-map): Add :group.
+
+	* sieve-manage.el (sieve-manage-log): Add :group.
+	(sieve-manage-default-user): Diito.
+	(sieve-manage-server-eol, sieve-manage-client-eol): Ditto.
+	(sieve-manage-streams, sieve-manage-stream-alist): Ditto.
+	(sieve-manage-authenticators): Ditto.
+	(sieve-manage-authenticator-alist): Ditto
+	(sieve-manage-default-port): Ditto.
+
+	* sieve-mode.el (sieve-control-commands-face): Add :group.
+	(sieve-action-commands-face): Ditto.
+	(sieve-test-commands-face): Ditto.
+	(sieve-tagged-arguments-face): Ditto.
+
+	* smime.el (smime): Add :group.
+
+	* spam-report.el (spam-report): Add :group.
+
+	* spam.el (spam, spam-face): Add :group.
+
+2005-05-26  Lute Kamstra  <lute@gnu.org>
+
+	* score-mode.el (gnus-score-mode): Use run-mode-hooks.
+
 2005-05-16  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* gnus-art.el: Don't autoload mail-extract-address-components.
--- a/lisp/gnus/canlock.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/gnus/canlock.el	Sat May 28 21:04:38 2005 +0000
@@ -1,6 +1,6 @@
 ;;; canlock.el --- functions for Cancel-Lock feature
 
-;; Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004
+;; Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Katsumi Yamaoka <yamaoka@jpl.org>
@@ -50,7 +50,7 @@
 
 (defgroup canlock nil
   "The Cancel-Lock feature."
-  :group 'applications)
+  :group 'news)
 
 (defcustom canlock-password nil
   "Password to use when signing a Cancel-Lock or a Cancel-Key header."
--- a/lisp/gnus/deuglify.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/gnus/deuglify.el	Sat May 28 21:04:38 2005 +0000
@@ -1,6 +1,6 @@
 ;;; deuglify.el --- deuglify broken Outlook (Express) articles
 
-;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 ;; Copyright (C) 2001, 2002 Raymond Scholz
 
 ;; Author: Raymond Scholz <rscholz@zonix.de>
@@ -231,7 +231,8 @@
 
 (defgroup gnus-outlook-deuglify nil
   "Deuglify articles generated by broken user agents like MS Outlook (Express)."
-  :version "22.1")
+  :version "22.1"
+  :group 'gnus)
 
 ;;;###autoload
 (defcustom gnus-outlook-deuglify-unwrap-min 45
--- a/lisp/gnus/dig.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/gnus/dig.el	Sat May 28 21:04:38 2005 +0000
@@ -1,5 +1,5 @@
 ;;; dig.el --- Domain Name System dig interface
-;; Copyright (c) 2000, 2001, 2003 Free Software Foundation, Inc.
+;; Copyright (c) 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
 
 ;; Author: Simon Josefsson <simon@josefsson.org>
 ;; Keywords: DNS BIND dig
@@ -40,7 +40,8 @@
 (eval-when-compile (require 'cl))
 
 (defgroup dig nil
-  "Dig configuration.")
+  "Dig configuration."
+  :group 'comm)
 
 (defcustom dig-program "dig"
   "Name of dig (domain information groper) binary."
--- a/lisp/gnus/gnus-agent.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/gnus/gnus-agent.el	Sat May 28 21:04:38 2005 +0000
@@ -561,7 +561,8 @@
   (if (and (fboundp 'propertize)
 	   (fboundp 'make-mode-line-mouse-map))
       (propertize string 'local-map
-		  (make-mode-line-mouse-map mouse-button mouse-func))
+		  (make-mode-line-mouse-map mouse-button mouse-func)
+		  'mouse-face 'mode-line-highlight)
     string))
 
 (defun gnus-agent-toggle-plugged (set-to)
--- a/lisp/gnus/gnus-art.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/gnus/gnus-art.el	Sat May 28 21:04:38 2005 +0000
@@ -814,6 +814,7 @@
 as described by the variables `gnus-buttonized-mime-types' and
 `gnus-unbuttonized-mime-types'."
   :version "22.1"
+  :group 'gnus-article-mime
   :type 'boolean)
 
 (defcustom gnus-body-boundary-delimiter "_"
--- a/lisp/gnus/gnus-cite.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/gnus/gnus-cite.el	Sat May 28 21:04:38 2005 +0000
@@ -1,6 +1,7 @@
 ;;; gnus-cite.el --- parse citations in articles for Gnus
 
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+;; 2005
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Per Abhiddenware
@@ -138,7 +139,8 @@
 
 (defface gnus-cite-attribution-face '((t
 				       (:italic t)))
-  "Face used for attribution lines.")
+  "Face used for attribution lines."
+  :group 'gnus-cite)
 
 (defcustom gnus-cite-attribution-face 'gnus-cite-attribution-face
   "Face used for attribution lines.
@@ -155,7 +157,8 @@
 			     (:foreground "MidnightBlue"))
 			    (t
 			     (:italic t)))
-  "Citation face.")
+  "Citation face."
+  :group 'gnus-cite)
 
 (defface gnus-cite-face-2 '((((class color)
 			      (background dark))
@@ -165,7 +168,8 @@
 			     (:foreground "firebrick"))
 			    (t
 			     (:italic t)))
-  "Citation face.")
+  "Citation face."
+  :group 'gnus-cite)
 
 (defface gnus-cite-face-3 '((((class color)
 			      (background dark))
@@ -175,7 +179,8 @@
 			     (:foreground "dark green"))
 			    (t
 			     (:italic t)))
-  "Citation face.")
+  "Citation face."
+  :group 'gnus-cite)
 
 (defface gnus-cite-face-4 '((((class color)
 			      (background dark))
@@ -185,7 +190,8 @@
 			     (:foreground "OrangeRed"))
 			    (t
 			     (:italic t)))
-  "Citation face.")
+  "Citation face."
+  :group 'gnus-cite)
 
 (defface gnus-cite-face-5 '((((class color)
 			      (background dark))
@@ -195,7 +201,8 @@
 			     (:foreground "dark khaki"))
 			    (t
 			     (:italic t)))
-  "Citation face.")
+  "Citation face."
+  :group 'gnus-cite)
 
 (defface gnus-cite-face-6 '((((class color)
 			      (background dark))
@@ -205,7 +212,8 @@
 			     (:foreground "dark violet"))
 			    (t
 			     (:italic t)))
-  "Citation face.")
+  "Citation face."
+  :group 'gnus-cite)
 
 (defface gnus-cite-face-7 '((((class color)
 			      (background dark))
@@ -215,7 +223,8 @@
 			     (:foreground "SteelBlue4"))
 			    (t
 			     (:italic t)))
-  "Citation face.")
+  "Citation face."
+  :group 'gnus-cite)
 
 (defface gnus-cite-face-8 '((((class color)
 			      (background dark))
@@ -225,7 +234,8 @@
 			     (:foreground "magenta"))
 			    (t
 			     (:italic t)))
-  "Citation face.")
+  "Citation face."
+  :group 'gnus-cite)
 
 (defface gnus-cite-face-9 '((((class color)
 			      (background dark))
@@ -235,7 +245,8 @@
 			     (:foreground "violet"))
 			    (t
 			     (:italic t)))
-  "Citation face.")
+  "Citation face."
+  :group 'gnus-cite)
 
 (defface gnus-cite-face-10 '((((class color)
 			       (background dark))
@@ -245,7 +256,8 @@
 			      (:foreground "medium purple"))
 			     (t
 			      (:italic t)))
-  "Citation face.")
+  "Citation face."
+  :group 'gnus-cite)
 
 (defface gnus-cite-face-11 '((((class color)
 			       (background dark))
@@ -255,7 +267,8 @@
 			      (:foreground "turquoise"))
 			     (t
 			      (:italic t)))
-  "Citation face.")
+  "Citation face."
+  :group 'gnus-cite)
 
 (defcustom gnus-cite-face-list
   '(gnus-cite-face-1 gnus-cite-face-2 gnus-cite-face-3 gnus-cite-face-4
--- a/lisp/gnus/gnus-diary.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/gnus/gnus-diary.el	Sat May 28 21:04:38 2005 +0000
@@ -1,6 +1,6 @@
 ;;; gnus-diary.el --- Wrapper around the NNDiary Gnus backend
 
-;; Copyright (c) 2001, 2002, 2003 Free Software Foundation, Inc.
+;; Copyright (c) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 ;; Copyright (C) 1999, 2000, 2001 Didier Verna.
 
 ;; Author:        Didier Verna <didier@xemacs.org>
@@ -103,7 +103,8 @@
 
 (defgroup gnus-diary nil
   "Utilities on top of the nndiary backend for Gnus."
-  :version "22.1")
+  :version "22.1"
+  :group 'gnus)
 
 (defcustom gnus-diary-summary-line-format "%U%R%z %uD: %(%s%) (%ud)\n"
   "*Summary line format for nndiary groups."
--- a/lisp/gnus/gnus-util.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/gnus/gnus-util.el	Sat May 28 21:04:38 2005 +0000
@@ -1015,6 +1015,12 @@
   (save-current-buffer
     (apply 'run-hooks funcs)))
 
+(defun gnus-run-mode-hooks (&rest funcs)
+  "Run `run-mode-hooks' if it is available.  Otherwise run `run-hooks'."
+  (if (fboundp 'run-mode-hooks)
+      (apply 'run-mode-hooks funcs)
+    (apply 'run-hooks funcs)))
+
 ;;; Various
 
 (defvar gnus-group-buffer)		; Compiler directive
--- a/lisp/gnus/gnus.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/gnus/gnus.el	Sat May 28 21:04:38 2005 +0000
@@ -366,7 +366,8 @@
      (:foreground "ForestGreen" :bold t))
     (t
      ()))
-  "Level 1 newsgroup face.")
+  "Level 1 newsgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-news-1-empty-face
   '((((class color)
@@ -377,7 +378,8 @@
      (:foreground "ForestGreen"))
     (t
      ()))
-  "Level 1 empty newsgroup face.")
+  "Level 1 empty newsgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-news-2-face
   '((((class color)
@@ -388,7 +390,8 @@
      (:foreground "CadetBlue4" :bold t))
     (t
      ()))
-  "Level 2 newsgroup face.")
+  "Level 2 newsgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-news-2-empty-face
   '((((class color)
@@ -399,7 +402,8 @@
      (:foreground "CadetBlue4"))
     (t
      ()))
-  "Level 2 empty newsgroup face.")
+  "Level 2 empty newsgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-news-3-face
   '((((class color)
@@ -410,7 +414,8 @@
      (:bold t))
     (t
      ()))
-  "Level 3 newsgroup face.")
+  "Level 3 newsgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-news-3-empty-face
   '((((class color)
@@ -421,7 +426,8 @@
      ())
     (t
      ()))
-  "Level 3 empty newsgroup face.")
+  "Level 3 empty newsgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-news-4-face
   '((((class color)
@@ -432,7 +438,8 @@
      (:bold t))
     (t
      ()))
-  "Level 4 newsgroup face.")
+  "Level 4 newsgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-news-4-empty-face
   '((((class color)
@@ -443,7 +450,8 @@
      ())
     (t
      ()))
-  "Level 4 empty newsgroup face.")
+  "Level 4 empty newsgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-news-5-face
   '((((class color)
@@ -454,7 +462,8 @@
      (:bold t))
     (t
      ()))
-  "Level 5 newsgroup face.")
+  "Level 5 newsgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-news-5-empty-face
   '((((class color)
@@ -465,7 +474,8 @@
      ())
     (t
      ()))
-  "Level 5 empty newsgroup face.")
+  "Level 5 empty newsgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-news-6-face
   '((((class color)
@@ -476,7 +486,8 @@
      (:bold t))
     (t
      ()))
-  "Level 6 newsgroup face.")
+  "Level 6 newsgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-news-6-empty-face
   '((((class color)
@@ -487,7 +498,8 @@
      ())
     (t
      ()))
-  "Level 6 empty newsgroup face.")
+  "Level 6 empty newsgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-news-low-face
   '((((class color)
@@ -498,7 +510,8 @@
      (:foreground "DarkGreen" :bold t))
     (t
      ()))
-  "Low level newsgroup face.")
+  "Low level newsgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-news-low-empty-face
   '((((class color)
@@ -509,7 +522,8 @@
      (:foreground "DarkGreen"))
     (t
      ()))
-  "Low level empty newsgroup face.")
+  "Low level empty newsgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-mail-1-face
   '((((class color)
@@ -520,7 +534,8 @@
      (:foreground "DeepPink3" :bold t))
     (t
      (:bold t)))
-  "Level 1 mailgroup face.")
+  "Level 1 mailgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-mail-1-empty-face
   '((((class color)
@@ -531,7 +546,8 @@
      (:foreground "DeepPink3"))
     (t
      (:italic t :bold t)))
-  "Level 1 empty mailgroup face.")
+  "Level 1 empty mailgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-mail-2-face
   '((((class color)
@@ -542,7 +558,8 @@
      (:foreground "HotPink3" :bold t))
     (t
      (:bold t)))
-  "Level 2 mailgroup face.")
+  "Level 2 mailgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-mail-2-empty-face
   '((((class color)
@@ -553,7 +570,8 @@
      (:foreground "HotPink3"))
     (t
      (:bold t)))
-  "Level 2 empty mailgroup face.")
+  "Level 2 empty mailgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-mail-3-face
   '((((class color)
@@ -564,7 +582,8 @@
      (:foreground "magenta4" :bold t))
     (t
      (:bold t)))
-  "Level 3 mailgroup face.")
+  "Level 3 mailgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-mail-3-empty-face
   '((((class color)
@@ -575,7 +594,8 @@
      (:foreground "magenta4"))
     (t
      ()))
-  "Level 3 empty mailgroup face.")
+  "Level 3 empty mailgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-mail-low-face
   '((((class color)
@@ -586,7 +606,8 @@
      (:foreground "DeepPink4" :bold t))
     (t
      (:bold t)))
-  "Low level mailgroup face.")
+  "Low level mailgroup face."
+  :group 'gnus-group)
 
 (defface gnus-group-mail-low-empty-face
   '((((class color)
@@ -597,18 +618,21 @@
      (:foreground "DeepPink4"))
     (t
      (:bold t)))
-  "Low level empty mailgroup face.")
+  "Low level empty mailgroup face."
+  :group 'gnus-group)
 
 ;; Summary mode faces.
 
 (defface gnus-summary-selected-face '((t
 				       (:underline t)))
-  "Face used for selected articles.")
+  "Face used for selected articles."
+  :group 'gnus-summary)
 
 (defface gnus-summary-cancelled-face
   '((((class color))
      (:foreground "yellow" :background "black")))
-  "Face used for cancelled articles.")
+  "Face used for cancelled articles."
+  :group 'gnus-summary)
 
 (defface gnus-summary-high-ticked-face
   '((((class color)
@@ -619,7 +643,8 @@
      (:foreground "firebrick" :bold t))
     (t
      (:bold t)))
-  "Face used for high interest ticked articles.")
+  "Face used for high interest ticked articles."
+  :group 'gnus-summary)
 
 (defface gnus-summary-low-ticked-face
   '((((class color)
@@ -630,7 +655,8 @@
      (:foreground "firebrick" :italic t))
     (t
      (:italic t)))
-  "Face used for low interest ticked articles.")
+  "Face used for low interest ticked articles."
+  :group 'gnus-summary)
 
 (defface gnus-summary-normal-ticked-face
   '((((class color)
@@ -641,7 +667,8 @@
      (:foreground "firebrick"))
     (t
      ()))
-  "Face used for normal interest ticked articles.")
+  "Face used for normal interest ticked articles."
+  :group 'gnus-summary)
 
 (defface gnus-summary-high-ancient-face
   '((((class color)
@@ -652,7 +679,8 @@
      (:foreground "RoyalBlue" :bold t))
     (t
      (:bold t)))
-  "Face used for high interest ancient articles.")
+  "Face used for high interest ancient articles."
+  :group 'gnus-summary)
 
 (defface gnus-summary-low-ancient-face
   '((((class color)
@@ -663,7 +691,8 @@
      (:foreground "RoyalBlue" :italic t))
     (t
      (:italic t)))
-  "Face used for low interest ancient articles.")
+  "Face used for low interest ancient articles."
+  :group 'gnus-summary)
 
 (defface gnus-summary-normal-ancient-face
   '((((class color)
@@ -674,7 +703,8 @@
      (:foreground "RoyalBlue"))
     (t
      ()))
-  "Face used for normal interest ancient articles.")
+  "Face used for normal interest ancient articles."
+  :group 'gnus-summary)
 
 (defface gnus-summary-high-undownloaded-face
    '((((class color)
@@ -683,7 +713,8 @@
      (((class color) (background dark))
       (:bold t :foreground "LightGray"))
      (t (:inverse-video t :bold t)))
-  "Face used for high interest uncached articles.")
+  "Face used for high interest uncached articles."
+  :group 'gnus-summary)
 
 (defface gnus-summary-low-undownloaded-face
    '((((class color)
@@ -692,7 +723,8 @@
      (((class color) (background dark))
       (:italic t :foreground "LightGray" :bold nil))
      (t (:inverse-video t :italic t)))
-  "Face used for low interest uncached articles.")
+  "Face used for low interest uncached articles."
+  :group 'gnus-summary)
 
 (defface gnus-summary-normal-undownloaded-face
    '((((class color)
@@ -701,22 +733,26 @@
      (((class color) (background dark))
       (:foreground "LightGray" :bold nil))
      (t (:inverse-video t)))
-  "Face used for normal interest uncached articles.")
+  "Face used for normal interest uncached articles."
+  :group 'gnus-summary)
 
 (defface gnus-summary-high-unread-face
   '((t
      (:bold t)))
-  "Face used for high interest unread articles.")
+  "Face used for high interest unread articles."
+  :group 'gnus-summary)
 
 (defface gnus-summary-low-unread-face
   '((t
      (:italic t)))
-  "Face used for low interest unread articles.")
+  "Face used for low interest unread articles."
+  :group 'gnus-summary)
 
 (defface gnus-summary-normal-unread-face
   '((t
      ()))
-  "Face used for normal interest unread articles.")
+  "Face used for normal interest unread articles."
+  :group 'gnus-summary)
 
 (defface gnus-summary-high-read-face
   '((((class color)
@@ -729,7 +765,8 @@
 		  :bold t))
     (t
      (:bold t)))
-  "Face used for high interest read articles.")
+  "Face used for high interest read articles."
+  :group 'gnus-summary)
 
 (defface gnus-summary-low-read-face
   '((((class color)
@@ -742,7 +779,8 @@
 		  :italic t))
     (t
      (:italic t)))
-  "Face used for low interest read articles.")
+  "Face used for low interest read articles."
+  :group 'gnus-summary)
 
 (defface gnus-summary-normal-read-face
   '((((class color)
@@ -753,7 +791,8 @@
      (:foreground "DarkGreen"))
     (t
      ()))
-  "Face used for normal interest read articles.")
+  "Face used for normal interest read articles."
+  :group 'gnus-summary)
 
 
 ;;;
@@ -806,7 +845,8 @@
      (:foreground "#888888"))
     (t
      ()))
-  "Face for the splash screen.")
+  "Face for the splash screen."
+  :group 'gnus)
 
 (defun gnus-splash ()
   (save-excursion
--- a/lisp/gnus/message.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/gnus/message.el	Sat May 28 21:04:38 2005 +0000
@@ -842,7 +842,8 @@
     (set-keymap-parent map minibuffer-local-map)
     map)
   "Keymap for `message-read-from-minibuffer'."
-  :version "22.1")
+  :version "22.1"
+  :group 'message-various)
 
 ;;;###autoload
 (defcustom message-citation-line-function 'message-insert-citation-line
--- a/lisp/gnus/score-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/gnus/score-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -1,6 +1,6 @@
 ;;; score-mode.el --- mode for editing Gnus score files
 
-;; Copyright (C) 1996, 2001, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2001, 2004, 2005 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news, mail
@@ -28,7 +28,7 @@
 
 (eval-when-compile (require 'cl))
 (require 'mm-util)			; for mm-universal-coding-system
-(require 'gnus-util)			; for gnus-pp
+(require 'gnus-util)			; for gnus-pp, gnus-run-mode-hooks
 
 (defvar gnus-score-mode-hook nil
   "*Hook run in score mode buffers.")
@@ -71,7 +71,7 @@
   (setq mode-name "Score")
   (lisp-mode-variables nil)
   (make-local-variable 'gnus-score-edit-exit-function)
-  (run-hooks 'emacs-lisp-mode-hook 'gnus-score-mode-hook))
+  (gnus-run-mode-hooks 'emacs-lisp-mode-hook 'gnus-score-mode-hook))
 
 (defun gnus-score-make-menu-bar ()
   (unless (boundp 'gnus-score-menu)
--- a/lisp/gnus/sieve-manage.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/gnus/sieve-manage.el	Sat May 28 21:04:38 2005 +0000
@@ -86,22 +86,27 @@
 
 (defcustom sieve-manage-log "*sieve-manage-log*"
   "Name of buffer for managesieve session trace."
-  :type 'string)
+  :type 'string
+  :group 'sieve-manage)
 
 (defcustom sieve-manage-default-user (user-login-name)
   "Default username to use."
-  :type 'string)
+  :type 'string
+  :group 'sieve-manage)
 
 (defcustom sieve-manage-server-eol "\r\n"
   "The EOL string sent from the server."
-  :type 'string)
+  :type 'string
+  :group 'sieve-manage)
 
 (defcustom sieve-manage-client-eol "\r\n"
   "The EOL string we send to the server."
-  :type 'string)
+  :type 'string
+  :group 'sieve-manage)
 
 (defcustom sieve-manage-streams '(network starttls shell)
-  "Priority of streams to consider when opening connection to server.")
+  "Priority of streams to consider when opening connection to server."
+  :group 'sieve-manage)
 
 (defcustom sieve-manage-stream-alist
   '((network   sieve-manage-network-p          sieve-manage-network-open)
@@ -113,10 +118,12 @@
 
 NAME names the stream, CHECK is a function returning non-nil if the
 server support the stream and OPEN is a function for opening the
-stream.")
+stream."
+  :group 'sieve-manage)
 
 (defcustom sieve-manage-authenticators '(cram-md5 plain)
-  "Priority of authenticators to consider when authenticating to server.")
+  "Priority of authenticators to consider when authenticating to server."
+  :group 'sieve-manage)
 
 (defcustom sieve-manage-authenticator-alist
   '((cram-md5   sieve-manage-cram-md5-p       sieve-manage-cram-md5-auth)
@@ -127,11 +134,13 @@
 
 NAME names the authenticator.  CHECK is a function returning non-nil if
 the server support the authenticator and AUTHENTICATE is a function
-for doing the actual authentication.")
+for doing the actual authentication."
+  :group 'sieve-manage)
 
 (defcustom sieve-manage-default-port 2000
   "Default port number for managesieve protocol."
-  :type 'integer)
+  :type 'integer
+  :group 'sieve-manage)
 
 ;; Internal variables:
 
--- a/lisp/gnus/sieve-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/gnus/sieve-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -1,5 +1,5 @@
 ;;; sieve-mode.el --- Sieve code editing commands for Emacs
-;; Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
 
 ;; Author: Simon Josefsson <simon@josefsson.org>
 
@@ -75,7 +75,8 @@
     (((class color) (background light)) (:foreground "Orchid"))
     (((class color) (background dark)) (:foreground "LightSteelBlue"))
     (t (:bold t)))
-  "Face used for Sieve Control Commands.")
+  "Face used for Sieve Control Commands."
+  :group 'sieve)
 
 (defvar sieve-action-commands-face 'sieve-action-commands-face
   "Face name used for Sieve Action Commands.")
@@ -85,7 +86,8 @@
     (((class color) (background light)) (:foreground "Blue"))
     (((class color) (background dark)) (:foreground "LightSkyBlue"))
     (t (:inverse-video t :bold t)))
-  "Face used for Sieve Action Commands.")
+  "Face used for Sieve Action Commands."
+  :group 'sieve)
 
 (defvar sieve-test-commands-face 'sieve-test-commands-face
   "Face name used for Sieve Test Commands.")
@@ -99,7 +101,8 @@
     (((class color) (background light)) (:foreground "CadetBlue"))
     (((class color) (background dark)) (:foreground "Aquamarine"))
     (t (:bold t :underline t)))
-  "Face used for Sieve Test Commands.")
+  "Face used for Sieve Test Commands."
+  :group 'sieve)
 
 (defvar sieve-tagged-arguments-face 'sieve-tagged-arguments-face
   "Face name used for Sieve Tagged Arguments.")
@@ -111,7 +114,8 @@
     (((class color) (background light)) (:foreground "Purple"))
     (((class color) (background dark)) (:foreground "Cyan"))
     (t (:bold t)))
-  "Face used for Sieve Tagged Arguments.")
+  "Face used for Sieve Tagged Arguments."
+  :group 'sieve)
 
 
 (defconst sieve-font-lock-keywords
--- a/lisp/gnus/smime.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/gnus/smime.el	Sat May 28 21:04:38 2005 +0000
@@ -122,7 +122,8 @@
 (eval-when-compile (require 'cl))
 
 (defgroup smime nil
-  "S/MIME configuration.")
+  "S/MIME configuration."
+  :group 'mime)
 
 (defcustom smime-keys nil
   "*Map mail addresses to a file containing Certificate (and private key).
--- a/lisp/gnus/spam-report.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/gnus/spam-report.el	Sat May 28 21:04:38 2005 +0000
@@ -1,5 +1,5 @@
 ;;; spam-report.el --- Reporting spam
-;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
 ;; Author: Teodor Zlatanov <tzz@lifelogs.com>
 ;; Keywords: network
@@ -35,7 +35,9 @@
   (autoload 'mm-url-insert "mm-url"))
 
 (defgroup spam-report nil
-  "Spam reporting configuration.")
+  "Spam reporting configuration."
+  :group 'mail
+  :group 'news)
 
 (defcustom spam-report-gmane-regex nil
   "Regexp matching Gmane newsgroups, e.g. \"^nntp\\+.*:gmane\\.\"
--- a/lisp/gnus/spam.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/gnus/spam.el	Sat May 28 21:04:38 2005 +0000
@@ -1,5 +1,5 @@
 ;;; spam.el --- Identifying spam
-;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: network
@@ -77,7 +77,9 @@
 
 (defgroup spam nil
   "Spam configuration."
-  :version "22.1")
+  :version "22.1"
+  :group 'mail
+  :group 'news)
 
 (defcustom spam-directory (nnheader-concat gnus-directory "spam/")
   "Directory for spam whitelists and blacklists."
@@ -308,7 +310,8 @@
     (((class color) (background light))
      (:foreground "ivory4"))
     (t :inverse-video t))
-  "Face for spam-marked articles.")
+  "Face for spam-marked articles."
+  :group 'spam)
 
 (defcustom spam-face 'spam-face
   "Face for spam-marked articles."
--- a/lisp/help-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/help-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -196,7 +196,7 @@
   (view-mode)
   (make-local-variable 'view-no-disable-on-exit)
   (setq view-no-disable-on-exit t)
-  (run-hooks 'help-mode-hook))
+  (run-mode-hooks 'help-mode-hook))
 
 ;;;###autoload
 (defun help-mode-setup ()
--- a/lisp/help.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/help.el	Sat May 28 21:04:38 2005 +0000
@@ -698,8 +698,8 @@
 		    (princ " runs the command ")
 		    (prin1 defn)
 		    (princ "\n   which is ")
-		    (describe-function-1 defn))))
-	    (print-help-return-message))))))))
+		    (describe-function-1 defn)))))
+	    (print-help-return-message)))))))
 
 
 (defun describe-mode (&optional buffer)
--- a/lisp/hexl.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/hexl.el	Sat May 28 21:04:38 2005 +0000
@@ -291,7 +291,7 @@
 			  "hexl-current-address")
 
     (if hexl-follow-ascii (hexl-follow-ascii 1)))
-  (run-hooks 'hexl-mode-hook))
+  (run-mode-hooks 'hexl-mode-hook))
 
 
 (defun hexl-isearch-search-function ()
@@ -926,10 +926,11 @@
   "Activate `hl-line-mode'"
   (require 'frame)
   (require 'hl-line)
-  (set (make-local-variable 'hl-line-range-function)
-       'hexl-highlight-line-range)
-  (set (make-local-variable 'hl-line-face) 
-       'highlight)
+  (with-no-warnings
+    (set (make-local-variable 'hl-line-range-function)
+	 'hexl-highlight-line-range)
+    (set (make-local-variable 'hl-line-face) 
+	 'highlight))
   (hl-line-mode 1))
 
 (defun hexl-highlight-line-range ()
--- a/lisp/ibuffer.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/ibuffer.el	Sat May 28 21:04:38 2005 +0000
@@ -2511,7 +2511,7 @@
   (when ibuffer-default-directory
     (setq default-directory ibuffer-default-directory))
   (add-hook 'change-major-mode-hook 'font-lock-defontify nil t)
-  (run-hooks 'ibuffer-mode-hook)
+  (run-mode-hooks 'ibuffer-mode-hook)
   ;; called after mode hooks to allow the user to add filters
   (ibuffer-update-mode-name))
 
--- a/lisp/ielm.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/ielm.el	Sat May 28 21:04:38 2005 +0000
@@ -548,7 +548,7 @@
     (set-marker comint-last-input-start (ielm-pm))
     (set-process-filter (get-buffer-process (current-buffer)) 'comint-output-filter))
 
-  (run-hooks 'ielm-mode-hook))
+  (run-mode-hooks 'ielm-mode-hook))
 
 (defun ielm-get-old-input nil
   ;; Return the previous input surrounding point
--- a/lisp/image.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/image.el	Sat May 28 21:04:38 2005 +0000
@@ -48,20 +48,6 @@
 with one argument, a string containing the image data.  If PREDICATE returns
 a non-nil value, TYPE is the image's type.")
 
-;;;###autoload
-(defvar image-library-alist nil
-  "Alist of image types vs external libraries needed to display them.
-
-Each element is a list (IMAGE-TYPE LIBRARY...), where the car is a symbol
-representing a supported image type, and the rest are strings giving
-alternate filenames for the corresponding external libraries.
-
-Emacs tries to load the libraries in the order they appear on the
-list; if none is loaded, the running session of Emacs won't
-support the image type.  Types 'pbm and 'xbm don't need to be
-listed; they're always supported.")
-;;;###autoload (put 'image-library-alist 'risky-local-variable t)
-
 (defun image-jpeg-p (data)
   "Value is non-nil if DATA, a string, consists of JFIF image data.
 We accept the tag Exif because that is the same format."
@@ -122,7 +108,7 @@
 
 ;;;###autoload
 (defun image-type-available-p (type)
-  "Value is non-nil if image type TYPE is available.
+  "Return non-nil if image type TYPE is available.
 Image types are symbols like `xbm' or `jpeg'."
   (and (fboundp 'init-image-library)
        (init-image-library type image-library-alist)))
--- a/lisp/imenu.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/imenu.el	Sat May 28 21:04:38 2005 +0000
@@ -192,32 +192,9 @@
 (defvar imenu-generic-expression nil
   "The regex pattern to use for creating a buffer index.
 
-If non-nil this pattern is passed to `imenu--generic-function'
-to create a buffer index.
-
-The value should be an alist with elements that look like this:
- (MENU-TITLE REGEXP INDEX)
-or like this:
- (MENU-TITLE REGEXP INDEX FUNCTION ARGUMENTS...)
-with zero or more ARGUMENTS.  The former format creates a simple element in
-the index alist when it matches; the latter creates a special element
-of the form  (NAME POSITION-MARKER FUNCTION ARGUMENTS...)
-with FUNCTION and ARGUMENTS copied from `imenu-generic-expression'.
-
-MENU-TITLE is a string used as the title for the submenu or nil if the
-entries are not nested.
-
-REGEXP is a regexp that should match a construct in the buffer that is
-to be displayed in the menu; i.e., function or variable definitions,
-etc.  It contains a substring which is the name to appear in the
-menu.  See the info section on Regexps for more information.
-
-INDEX points to the substring in REGEXP that contains the name (of the
-function, variable or type) that is to appear in the menu.
-
-The variable `imenu-case-fold-search' determines whether or not the
-regexp matches are case sensitive, and `imenu-syntax-alist' can be
-used to alter the syntax table for the search.
+If non-nil this pattern is passed to `imenu--generic-function' to
+create a buffer index.  Look there for the documentation of this
+pattern's structure.
 
 For example, see the value of `fortran-imenu-generic-expression' used by
 `fortran-mode' with `imenu-syntax-alist' set locally to give the
@@ -750,21 +727,33 @@
   "Return an index of the current buffer as an alist.
 
 PATTERNS is an alist with elements that look like this:
- (MENU-TITLE REGEXP INDEX).
+ (MENU-TITLE REGEXP INDEX)
 or like this:
  (MENU-TITLE REGEXP INDEX FUNCTION ARGUMENTS...)
-with zero or more ARGUMENTS.
+with zero or more ARGUMENTS.  The former format creates a simple
+element in the index alist when it matches; the latter creates a
+special element of the form (NAME POSITION-MARKER FUNCTION
+ARGUMENTS...)  with FUNCTION and ARGUMENTS copied from
+`imenu-generic-expression'.
 
-MENU-TITLE is a string used as the title for the submenu or nil if the
-entries are not nested.
+MENU-TITLE is a string used as the title for the submenu or nil
+if the entries are not nested.
 
-REGEXP is a regexp that should match a construct in the buffer that is
-to be displayed in the menu; i.e., function or variable definitions,
-etc.  It contains a substring which is the name to appear in the
-menu.  See the info section on Regexps for more information.
+REGEXP is a regexp that should match a construct in the buffer
+that is to be displayed in the menu; i.e., function or variable
+definitions, etc.  It contains a substring which is the name to
+appear in the menu.  See the info section on Regexps for more
+information.  REGEXP may also be a function, called without
+arguments.  It is expected to search backwards.  It shall return
+true and set `match-data' iff it finds another element.
 
-INDEX points to the substring in REGEXP that contains the name (of the
-function, variable or type) that is to appear in the menu.
+INDEX points to the substring in REGEXP that contains the
+name (of the function, variable or type) that is to appear in the
+menu.
+
+The variable `imenu-case-fold-search' determines whether or not the
+regexp matches are case sensitive, and `imenu-syntax-alist' can be
+used to alter the syntax table for the search.
 
 See `lisp-imenu-generic-expression' for an example of PATTERNS.
 
@@ -811,7 +800,9 @@
 		  start beg)
 	      ;; Go backwards for convenience of adding items in order.
 	      (goto-char (point-max))
-	      (while (and (re-search-backward regexp nil t)
+	      (while (and (if (functionp regexp)
+			      (funcall regexp)
+			    (re-search-backward regexp nil t))
 			  ;; Exit the loop if we get an empty match,
 			  ;; because it means a bad regexp was specified.
 			  (not (= (match-beginning 0) (match-end 0))))
--- a/lisp/info.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/info.el	Sat May 28 21:04:38 2005 +0000
@@ -1,7 +1,7 @@
 ;;; info.el --- info package for Emacs
 
-;; Copyright (C) 1985,86,92,93,94,95,96,97,98,99,2000,01,02,03,04,2005
-;;  Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1986, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+;;   2000, 2001, 2002, 2003, 2004, 2005  Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: help
@@ -515,9 +515,10 @@
       ;; since the argument will then be parsed improperly.  This also
       ;; has the added benefit of allowing node names to be included
       ;; following the parenthesized filename.
-      (if (and (stringp file) (string-match "(.*)" file))
-	  (Info-goto-node file)
-	(Info-goto-node (concat "(" file ")")))
+      (Info-goto-node
+       (if (and (stringp file) (string-match "(.*)" file))
+           file
+         (concat "(" file ")")))
     (if (zerop (buffer-size))
         (Info-directory))))
 
@@ -1344,7 +1345,9 @@
 ;; Go to an info node specified with a filename-and-nodename string
 ;; of the sort that is found in pointers in nodes.
 
-;;;###autoload
+;; Don't autoload this function: the correct entry point for other packages
+;; to use is `info'.  --Stef
+;; ;;;###autoload
 (defun Info-goto-node (nodename &optional fork)
   "Go to info node named NODENAME.  Give just NODENAME or (FILENAME)NODENAME.
 If NODENAME is of the form (FILENAME)NODENAME, the node is in the Info file
@@ -3259,7 +3262,7 @@
   (set (make-local-variable 'search-whitespace-regexp)
        Info-search-whitespace-regexp)
   (Info-set-mode-line)
-  (run-hooks 'Info-mode-hook))
+  (run-mode-hooks 'Info-mode-hook))
 
 ;; When an Info buffer is killed, make sure the associated tags buffer
 ;; is killed too.
@@ -3301,7 +3304,7 @@
   (setq buffer-read-only nil)
   (force-mode-line-update)
   (buffer-enable-undo (current-buffer))
-  (run-hooks 'Info-edit-mode-hook))
+  (run-mode-hooks 'Info-edit-mode-hook))
 
 (defun Info-edit ()
   "Edit the contents of this Info node.
@@ -4127,5 +4130,5 @@
 
 (provide 'info)
 
-;;; arch-tag: f2480fe2-2139-40c1-a49b-6314991164ac
+;; arch-tag: f2480fe2-2139-40c1-a49b-6314991164ac
 ;;; info.el ends here
--- a/lisp/international/code-pages.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/international/code-pages.el	Sat May 28 21:04:38 2005 +0000
@@ -193,15 +193,18 @@
 	      ;; a separate table that only translates the coding
 	      ;; system's safe-chars.
 	      (cons 'translation-table-for-input 'ucs-mule-to-mule-unicode)))
-       (push (list ',name
-		   nil			; charset list
-		   ',decoder
-		   (let (l)		; code range
-		     (dolist (elt (reverse codes))
-		       (push (cdr elt) l)
-		       (push (car elt) l))
-		     (list l)))
-	     non-iso-charset-alist))))
+       (let ((slot (assq ',name non-iso-charset-alist))
+	     (elt (list nil			; charset list
+			',decoder
+			(let (l)		; code range
+			  (dolist (elt (reverse codes))
+			    (push (cdr elt) l)
+			    (push (car elt) l))
+			  (list l)))))
+	 (if (not slot)
+	     (push (cons ',name elt) non-iso-charset-alist)
+	   (setcdr slot elt)
+	   non-iso-charset-alist)))))
 
 (eval-when-compile (defvar non-iso-charset-alist))
 
@@ -4502,11 +4505,14 @@
     ;; Define cp125* as aliases for all windows-125*, so on Windows
     ;; we can just concat "cp" to the ANSI codepage we get from the system
     ;; and not have to worry about whether it should be "cp" or "windows-".
-    (if (coding-system-p w)
-	(define-coding-system-alias c w))
-    ;; Compatibility with codepage.el, though cp... are not the
-    ;; canonical names.
-    (push (assoc w non-iso-charset-alist) non-iso-charset-alist)))
+    (when (coding-system-p w)
+      (define-coding-system-alias c w)
+      ;; Compatibility with codepage.el, though cp... are not the
+      ;; canonical names.
+      (if (not (assq c non-iso-charset-alist))
+	  (let ((slot (assq w non-iso-charset-alist)))
+	    (if slot
+		(push (cons c (cdr slot)) non-iso-charset-alist)))))))
 
 (provide 'code-pages)
 
--- a/lisp/international/swedish.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/international/swedish.el	Sat May 28 21:04:38 2005 +0000
@@ -131,7 +131,7 @@
 ;   (setq major-mode 'swedish-mode)
 ;   (setq local-abbrev-table swedish-mode-abbrev-table)
 ;   (set-syntax-table text-mode-syntax-table)
-;   (run-hooks 'text-mode-hook))
+;   (run-mode-hooks 'text-mode-hook))
 
 ;(defun indented-swedish-mode ()
 ;   "Major mode for editing indented Swedish text intended for
@@ -149,7 +149,7 @@
 ;   (use-local-map indented-text-mode-map)
 ;   (setq mode-name "Indented Swedish")
 ;   (setq major-mode 'indented-swedish-mode)
-;   (run-hooks 'text-mode-hook))
+;   (run-mode-hooks 'text-mode-hook))
 
 (provide 'swedish)
 
--- a/lisp/international/ucs-tables.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/international/ucs-tables.el	Sat May 28 21:04:38 2005 +0000
@@ -2517,7 +2517,9 @@
 	(if (and table (symbolp table))
 	    (setq table (get table 'translation-table)))
 	(unless (char-table-p table)
-	  (setq table (coding-system-get cs 'translation-table-for-input)))
+	  (setq table (coding-system-get cs 'translation-table-for-input))
+	  (if (and table (symbolp table))
+	      (setq table (get table 'translation-table))))
 	(when (char-table-p table)
 	  (if buffer
 	      (with-current-buffer buffer
--- a/lisp/language/cyrillic.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/language/cyrillic.el	Sat May 28 21:04:38 2005 +0000
@@ -475,6 +475,23 @@
 	 ?\$,1(V(B ?\$,1(W(B ?\$,1(X(B ?\$,1(Y(B ?\$,1(Z(B ?\$,1([(B ?\$,1(\(B ?\$,1(](B ?\$,1(^(B ?\$,1(_(B ?\$,1(`(B ?\$,1(a(B ?\$,1(b(B ?\$,1(c(B ?\$,1(d(B ?\$,1(e(B ?\$,1(f(B
 	 ?\$,1(g(B ?\$,1(h(B ?\$,1(i(B ?\$,1(j(B ?\$,1(k(B ?\$,1(l(B ?\$,1(m(B ?\$,1(n(B ?\$,1(o(B] nil ?b)))
 
+;; Register cyrillic-iso8859-5 characters in the encode table of
+;; windows-1251.
+(let ((table (get 'encode-windows-1251 'translation-table))
+      ;; Nth element is a cyrillic-iso8859-5 character encoded to a
+      ;; code (128 + N), or nil.
+      (vec [?\,L"(B ?\,L#(B nil ?\,Ls(B nil nil nil nil nil nil ?\,L)(B nil ?\,L*(B ?\,L,(B ?\,L+(B ?\,L/(B
+	    ?\,Lr(B nil nil nil nil nil nil nil nil nil ?\,Ly(B nil ?\,Lz(B ?\,L|(B ?\,L{(B ?\,L(B
+	    nil ?\,L.(B ?\,L~(B ?\,L((B nil nil nil nil ?\,L!(B nil ?\,L$(B nil nil nil nil ?\,L'(B
+	    nil nil ?\,L&(B ?\,Lv(B nil nil nil nil ?\,Lq(B ?\,Lp(B ?\,Lt(B nil ?\,Lx(B ?\,L%(B ?\,Lu(B ?\,Lw(B
+	    ?\,L0(B ?\,L1(B ?\,L2(B ?\,L3(B ?\,L4(B ?\,L5(B ?\,L6(B ?\,L7(B ?\,L8(B ?\,L9(B ?\,L:(B ?\,L;(B ?\,L<(B ?\,L=(B ?\,L>(B ?\,L?(B
+	    ?\,L@(B ?\,LA(B ?\,LB(B ?\,LC(B ?\,LD(B ?\,LE(B ?\,LF(B ?\,LG(B ?\,LH(B ?\,LI(B ?\,LJ(B ?\,LK(B ?\,LL(B ?\,LM(B ?\,LN(B ?\,LO(B
+	    ?\,LP(B ?\,LQ(B ?\,LR(B ?\,LS(B ?\,LT(B ?\,LU(B ?\,LV(B ?\,LW(B ?\,LX(B ?\,LY(B ?\,LZ(B ?\,L[(B ?\,L\(B ?\,L](B ?\,L^(B ?\,L_(B
+	    ?\,L`(B ?\,La(B ?\,Lb(B ?\,Lc(B ?\,Ld(B ?\,Le(B ?\,Lf(B ?\,Lg(B ?\,Lh(B ?\,Li(B ?\,Lj(B ?\,Lk(B ?\,Ll(B ?\,Lm(B ?\,Ln(B ?\,Lo(B]))
+  (dotimes (i (length vec))
+    (if (aref vec i)
+	(aset table (aref vec i) (+ 128 i)))))
+
 (define-coding-system-alias 'cp1251 'windows-1251)
 
 (let ((elt `("microsoft-cp1251" windows-1251 1
--- a/lisp/language/viet-util.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/language/viet-util.el	Sat May 28 21:04:38 2005 +0000
@@ -38,6 +38,8 @@
 
 ;;; Code:
 
+(defvar viet-viscii-nonascii-translation-table)
+
 ;;;###autoload
 (defun viet-encode-viscii-char (char)
   "Return VISCII character code of CHAR if appropriate."
--- a/lisp/ledit.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/ledit.el	Sat May 28 21:04:38 2005 +0000
@@ -152,7 +152,7 @@
   (use-local-map ledit-mode-map)
   (setq mode-name "Ledit")
   (setq major-mode 'ledit-mode)
-  (run-hooks 'ledit-mode-hook))
+  (run-mode-hooks 'ledit-mode-hook))
 
 (provide 'ledit)
 
--- a/lisp/locate.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/locate.el	Sat May 28 21:04:38 2005 +0000
@@ -393,7 +393,7 @@
   (make-local-variable 'revert-buffer-function)
   (setq revert-buffer-function 'locate-update)
   (set (make-local-variable 'page-delimiter) "\n\n")
-  (run-hooks 'locate-mode-hook))
+  (run-mode-hooks 'locate-mode-hook))
 
 (defun locate-do-setup (search-string)
   (goto-char (point-min))
--- a/lisp/log-edit.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/log-edit.el	Sat May 28 21:04:38 2005 +0000
@@ -607,8 +607,12 @@
 			   (search-forward pattern nil t))))
 		(setq pattern (file-name-nondirectory file)))
 
+            (setq pattern (concat "\\(^\\|[^[:alnum:]]\\)"
+                                  pattern
+                                  "\\($\\|[^[:alnum:]]\\)"))
+
 	    (let (texts)
-	      (while (search-forward pattern nil t)
+	      (while (re-search-forward pattern nil t)
 		(let ((entry (log-edit-changelog-entry)))
 		  (push entry texts)
 		  (goto-char (elt entry 1))))
@@ -646,5 +650,5 @@
 
 (provide 'log-edit)
 
-;;; arch-tag: 8089b39c-983b-4e83-93cd-ed0a64c7fdcc
+;; arch-tag: 8089b39c-983b-4e83-93cd-ed0a64c7fdcc
 ;;; log-edit.el ends here
--- a/lisp/longlines.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/longlines.el	Sat May 28 21:04:38 2005 +0000
@@ -39,8 +39,6 @@
 
 ;;; Code:
 
-(require 'easy-mmode)
-
 (defgroup longlines nil
   "Automatic wrapping of long lines when loading files."
   :group 'fill)
@@ -157,7 +155,8 @@
 
 (defface longlines-visible-face
   '((t (:background "red")))
-  "Face used to make hard newlines visible in `longlines-mode'.")
+  "Face used to make hard newlines visible in `longlines-mode'."
+  :group 'longlines)
 
 (defun longlines-show-hard-newlines (&optional arg)
   "Make hard newlines visible by adding a face.
--- a/lisp/mail/mailalias.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/mail/mailalias.el	Sat May 28 21:04:38 2005 +0000
@@ -435,7 +435,7 @@
 	(if mail-passwd-command
 	    (call-process shell-file-name nil t nil
 			  shell-command-switch mail-passwd-command))
-	(beginning-of-buffer)
+	(goto-char (point-min))
 	(setq mail-local-names nil)
 	(while (not (eobp))
 	  ;;Recognize lines like
--- a/lisp/mail/rmail.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/mail/rmail.el	Sat May 28 21:04:38 2005 +0000
@@ -1156,7 +1156,7 @@
       (when rmail-display-summary
 	(rmail-summary))
       (rmail-construct-io-menu))
-    (run-hooks 'rmail-mode-hook)))
+    (run-mode-hooks 'rmail-mode-hook)))
 
 (defun rmail-mode-2 ()
   (kill-all-local-variables)
@@ -3444,7 +3444,11 @@
      ;; I don't know whether there are other mailers that still
      ;; need the names to be stripped.
 ;;;     (mail-strip-quoted-names reply-to)
-     reply-to
+     ;; Remove unwanted names from reply-to, since Mail-Followup-To
+     ;; header causes all the names in it to wind up in reply-to, not
+     ;; in cc.  But if what's left is an empty list, use the original.
+     (let* ((reply-to-list (rmail-dont-reply-to reply-to)))
+       (if (string= reply-to-list "") reply-to reply-to-list))
      subject
      (rmail-make-in-reply-to-field from date message-id)
      (if just-sender
--- a/lisp/mail/rmailedit.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/mail/rmailedit.el	Sat May 28 21:04:38 2005 +0000
@@ -68,7 +68,7 @@
       (save-excursion
 	(set-buffer rmail-summary-buffer)
 	(rmail-summary-disable)))
-  (run-hooks 'rmail-edit-mode-hook))
+  (run-mode-hooks 'rmail-edit-mode-hook))
 
 (defvar rmail-old-pruned nil)
 (put 'rmail-old-pruned 'permanent-local t)
--- a/lisp/mail/rmailsum.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/mail/rmailsum.el	Sat May 28 21:04:38 2005 +0000
@@ -760,7 +760,7 @@
   (make-local-variable 'font-lock-defaults)
   (setq font-lock-defaults '(rmail-summary-font-lock-keywords t))
   (rmail-summary-enable)
-  (run-hooks 'rmail-summary-mode-hook))
+  (run-mode-hooks 'rmail-summary-mode-hook))
 
 ;; Summary features need to be disabled during edit mode.
 (defun rmail-summary-disable ()
--- a/lisp/mail/sendmail.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/mail/sendmail.el	Sat May 28 21:04:38 2005 +0000
@@ -810,7 +810,8 @@
 			     '(lambda (e)
 				(unless (member e l)
 				  (push e l)))
-			     (split-string new-header-values ", +" t))
+			     (split-string new-header-values
+					   ",[[:space:]]+" t))
 			    (mapconcat 'identity l ", "))
 			  "\n"))
 		;; Add Mail-Reply-To if none yet
--- a/lisp/mail/smtpmail.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/mail/smtpmail.el	Sat May 28 21:04:38 2005 +0000
@@ -396,7 +396,7 @@
     ;;; mail, send it, etc...
     (let ((file-msg ""))
       (insert-file-contents smtpmail-queue-index)
-      (beginning-of-buffer)
+      (goto-char (point-min))
       (while (not (eobp))
 	(setq file-msg (buffer-substring (point) (line-end-position)))
 	(load file-msg)
@@ -465,11 +465,14 @@
 	(push el2 result)))
     (nreverse result)))
 
+(defvar starttls-extra-args)
+(defvar starttls-extra-arguments)
+
 (defun smtpmail-open-stream (process-buffer host port)
   (let ((cred (smtpmail-find-credentials
 	       smtpmail-starttls-credentials host port)))
     (if (null (and cred (condition-case ()
-			    (progn
+			    (with-no-warnings
 			      (require 'starttls)
 			      (call-process (if starttls-use-gnutls
 						starttls-gnutls-program
--- a/lisp/mail/supercite.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/mail/supercite.el	Sat May 28 21:04:38 2005 +0000
@@ -1667,7 +1667,7 @@
 	      (major-mode 'sc-electric-mode))
 	  (use-local-map sc-electric-mode-map)
 	  (sc-eref-show sc-eref-style)
-	  (run-hooks 'sc-electric-mode-hook)
+	  (run-mode-hooks 'sc-electric-mode-hook)
 	  (recursive-edit)
 	  )))
 
--- a/lisp/man.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/man.el	Sat May 28 21:04:38 2005 +0000
@@ -1061,6 +1061,7 @@
 The following key bindings are currently in effect in the buffer:
 \\{Man-mode-map}"
   (interactive)
+  (kill-all-local-variables)
   (setq major-mode 'Man-mode
 	mode-name "Man"
 	buffer-auto-save-file-name nil
@@ -1069,7 +1070,7 @@
 	      " {" 'Man-page-mode-string "}")
 	truncate-lines t
 	buffer-read-only t)
-  (buffer-disable-undo (current-buffer))
+  (buffer-disable-undo)
   (auto-fill-mode -1)
   (use-local-map Man-mode-map)
   (set-syntax-table man-mode-syntax-table)
@@ -1080,7 +1081,7 @@
   (Man-strip-page-headers)
   (Man-unindent)
   (Man-goto-page 1)
-  (run-hooks 'Man-mode-hook))
+  (run-mode-hooks 'Man-mode-hook))
 
 (defsubst Man-build-section-alist ()
   "Build the association list of manpage sections."
--- a/lisp/mh-e/ChangeLog	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/mh-e/ChangeLog	Sat May 28 21:04:38 2005 +0000
@@ -1,3 +1,8 @@
+2005-05-26  Lute Kamstra  <lute@gnu.org>
+
+	* mh-utils.el (mh-show-mode): 
+	* mh-pick.el (mh-pick-mode): Remove spurious run-hooks.
+
 2005-04-08  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	* mh-customize.el (mh-speedbar-selected-folder-face): Special case
--- a/lisp/mh-e/mh-pick.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/mh-e/mh-pick.el	Sat May 28 21:04:38 2005 +0000
@@ -140,8 +140,7 @@
   (make-local-variable 'mh-searching-function)
   (make-local-variable 'mh-help-messages)
   (easy-menu-add mh-pick-menu)
-  (setq mh-help-messages mh-pick-mode-help-messages)
-  (run-hooks 'mh-pick-mode-hook))
+  (setq mh-help-messages mh-pick-mode-help-messages))
 
 ;;;###mh-autoload
 (defun mh-pick-do-search ()
--- a/lisp/mh-e/mh-utils.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/mh-e/mh-utils.el	Sat May 28 21:04:38 2005 +0000
@@ -1129,8 +1129,7 @@
   (make-local-variable 'mh-show-folder-buffer)
   (buffer-disable-undo)
   (setq buffer-read-only t)
-  (use-local-map mh-show-mode-map)
-  (run-hooks 'mh-show-mode-hook))
+  (use-local-map mh-show-mode-map))
 
 (defun mh-show-addr ()
   "Use `goto-address'."
--- a/lisp/net/eudc.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/net/eudc.el	Sat May 28 21:04:38 2005 +0000
@@ -670,8 +670,7 @@
   (if eudc-emacs-p
       (easy-menu-define eudc-emacs-menu eudc-mode-map "" (eudc-menu))
     (setq mode-popup-menu (eudc-menu)))
-  (run-hooks 'eudc-mode-hook)
-  )
+  (run-mode-hooks 'eudc-mode-hook))
 
 ;;}}}
 
--- a/lisp/net/quickurl.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/net/quickurl.el	Sat May 28 21:04:38 2005 +0000
@@ -458,7 +458,7 @@
   (use-local-map quickurl-list-mode-map)
   (setq major-mode 'quickurl-list-mode
         mode-name  "quickurl list")
-  (run-hooks 'quickurl-list-mode-hook)
+  (run-mode-hooks 'quickurl-list-mode-hook)
   (setq buffer-read-only t
         truncate-lines   t))
 
--- a/lisp/net/rcompile.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/net/rcompile.el	Sat May 28 21:04:38 2005 +0000
@@ -168,7 +168,7 @@
                   compile-command)))
     (setq remote-compile-host host)
     (save-some-buffers nil nil)
-    (compile-internal compile-command "No more errors")
+    (compilation-start compile-command)
     ;; Set comint-file-name-prefix in the compilation buffer so
     ;; compilation-parse-errors will find referenced files by ange-ftp.
     (with-current-buffer compilation-last-buffer
--- a/lisp/net/snmp-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/net/snmp-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -393,8 +393,7 @@
   (setq snmp-mode-status-list snmp-rfc1212-status)
 
   ;; Run hooks
-  (run-hooks 'snmp-common-mode-hook)
-  (run-hooks 'snmp-mode-hook))
+  (run-mode-hooks 'snmp-common-mode-hook 'snmp-mode-hook))
 
 
 ;;;###autoload
@@ -429,8 +428,7 @@
   (setq snmp-mode-status-list snmp-rfc1902-status)
 
   ;; Run hooks
-  (run-hooks 'snmp-common-mode-hook)
-  (run-hooks 'snmpv2-mode-hook))
+  (run-mode-hooks 'snmp-common-mode-hook 'snmpv2-mode-hook))
 
 
 ;;;----------------------------------------------------------------------------
--- a/lisp/obsolete/ooutline.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/obsolete/ooutline.el	Sat May 28 21:04:38 2005 +0000
@@ -224,7 +224,7 @@
   (setq font-lock-defaults '(outline-font-lock-keywords t))
   (make-local-variable 'change-major-mode-hook)
   (add-hook 'change-major-mode-hook 'show-all)
-  (run-hooks 'text-mode-hook 'outline-mode-hook))
+  (run-mode-hooks 'text-mode-hook 'outline-mode-hook))
 
 (defcustom outline-minor-mode-prefix "\C-c@"
   "*Prefix key to use for Outline commands in Outline minor mode.
--- a/lisp/obsolete/options.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/obsolete/options.el	Sat May 28 21:04:38 2005 +0000
@@ -109,7 +109,7 @@
   (setq truncate-lines t)
   (setq major-mode 'Edit-options-mode)
   (setq mode-name "Options")
-  (run-hooks 'Edit-options-mode-hook))
+  (run-mode-hooks 'Edit-options-mode-hook))
 
 (defun Edit-options-set () (interactive)
   (Edit-options-modify
--- a/lisp/obsolete/rnews.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/obsolete/rnews.el	Sat May 28 21:04:38 2005 +0000
@@ -375,7 +375,7 @@
   (set-syntax-table text-mode-syntax-table)
   (use-local-map news-mode-map)
   (setq local-abbrev-table text-mode-abbrev-table)
-  (run-hooks 'news-mode-hook))
+  (run-mode-hooks 'news-mode-hook))
 
 (defun string-subst-char (new old string)
   (let (index)
--- a/lisp/obsolete/rnewspost.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/obsolete/rnewspost.el	Sat May 28 21:04:38 2005 +0000
@@ -130,7 +130,7 @@
   (setq mode-name "News Reply")
   (make-local-variable 'paragraph-separate)
   (make-local-variable 'paragraph-start)
-  (run-hooks 'text-mode-hook 'news-reply-mode-hook))
+  (run-mode-hooks 'text-mode-hook 'news-reply-mode-hook))
 
 (defvar news-reply-yank-from ""
   "Save `From:' field for `news-reply-yank-original'.")
--- a/lisp/outline.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/outline.el	Sat May 28 21:04:38 2005 +0000
@@ -1,6 +1,6 @@
 ;;; outline.el --- outline mode commands for Emacs
 
-;; Copyright (C) 1986, 93, 94, 95, 97, 2000, 01, 2004
+;; Copyright (C) 1986, 1993, 1994, 1995, 1997, 2000, 2001, 2004
 ;;   Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
@@ -167,14 +167,45 @@
 		  0 '(outline-font-lock-face) nil t)))
   "Additional expressions to highlight in Outline mode.")
 
-(defface outline-1 '((t :inherit font-lock-function-name-face)) "Level 1.")
-(defface outline-2 '((t :inherit font-lock-variable-name-face)) "Level 2.")
-(defface outline-3 '((t :inherit font-lock-keyword-face)) "Level 3.")
-(defface outline-4 '((t :inherit font-lock-builtin-face)) "Level 4.")
-(defface outline-5 '((t :inherit font-lock-comment-face)) "Level 5.")
-(defface outline-6 '((t :inherit font-lock-constant-face)) "Level 6.")
-(defface outline-7 '((t :inherit font-lock-type-face)) "Level 7.")
-(defface outline-8 '((t :inherit font-lock-string-face)) "Level 8.")
+(defface outline-1
+  '((t :inherit font-lock-function-name-face))
+  "Level 1."
+  :group 'outlines)
+
+(defface outline-2
+  '((t :inherit font-lock-variable-name-face))
+  "Level 2."
+  :group 'outlines)
+
+(defface outline-3
+  '((t :inherit font-lock-keyword-face))
+  "Level 3."
+  :group 'outlines)
+
+(defface outline-4
+  '((t :inherit font-lock-builtin-face))
+  "Level 4."
+  :group 'outlines)
+
+(defface outline-5
+  '((t :inherit font-lock-comment-face))
+  "Level 5."
+  :group 'outlines)
+
+(defface outline-6
+  '((t :inherit font-lock-constant-face))
+  "Level 6."
+  :group 'outlines)
+
+(defface outline-7
+  '((t :inherit font-lock-type-face))
+  "Level 7."
+  :group 'outlines)
+
+(defface outline-8
+  '((t :inherit font-lock-string-face))
+  "Level 8."
+  :group 'outlines)
 
 (defvar outline-font-lock-faces
   [outline-1 outline-2 outline-3 outline-4
--- a/lisp/play/5x5.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/play/5x5.el	Sat May 28 21:04:38 2005 +0000
@@ -178,10 +178,10 @@
   (use-local-map 5x5-mode-map)
   (setq major-mode '5x5-mode
         mode-name  "5x5")
-  (run-hooks '5x5-mode-hook)
+  (run-mode-hooks '5x5-mode-hook)
   (setq buffer-read-only t
         truncate-lines   t)
-  (buffer-disable-undo (current-buffer)))
+  (buffer-disable-undo))
 
 ;;;###autoload
 (defun 5x5 (&optional size)
--- a/lisp/play/decipher.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/play/decipher.el	Sat May 28 21:04:38 2005 +0000
@@ -314,7 +314,7 @@
             (lambda () (setq buffer-read-only nil
                              buffer-undo-list nil))
             nil t)
-  (run-hooks 'decipher-mode-hook)
+  (run-mode-hooks 'decipher-mode-hook)
   (setq buffer-read-only t))
 (put 'decipher-mode 'mode-class 'special)
 
@@ -998,7 +998,7 @@
         major-mode       'decipher-stats-mode
         mode-name        "Decipher-Stats")
   (use-local-map decipher-stats-mode-map)
-  (run-hooks 'decipher-stats-mode-hook))
+  (run-mode-hooks 'decipher-stats-mode-hook))
 (put 'decipher-stats-mode 'mode-class 'special)
 
 ;;--------------------------------------------------------------------
--- a/lisp/play/gomoku.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/play/gomoku.el	Sat May 28 21:04:38 2005 +0000
@@ -206,7 +206,7 @@
   (make-local-variable 'font-lock-defaults)
   (setq font-lock-defaults '(gomoku-font-lock-keywords t))
   (toggle-read-only t)
-  (run-hooks 'gomoku-mode-hook))
+  (run-mode-hooks 'gomoku-mode-hook))
 
 ;;;
 ;;; THE BOARD.
--- a/lisp/play/landmark.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/play/landmark.el	Sat May 28 21:04:38 2005 +0000
@@ -248,6 +248,7 @@
 Entry to this mode calls the value of `lm-mode-hook' if that value
 is non-nil.  One interesting value is `turn-on-font-lock'."
   (interactive)
+  (kill-all-local-variables)
   (setq major-mode 'lm-mode
 	mode-name "Lm")
   (lm-display-statistics)
@@ -255,7 +256,7 @@
   (make-local-variable 'font-lock-defaults)
   (setq font-lock-defaults '(lm-font-lock-keywords t))
   (toggle-read-only t)
-  (run-hooks 'lm-mode-hook))
+  (run-mode-hooks 'lm-mode-hook))
 
 
 ;;;_ +  THE SCORE TABLE.
--- a/lisp/play/mpuz.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/play/mpuz.el	Sat May 28 21:04:38 2005 +0000
@@ -129,11 +129,12 @@
 Then you may resume the game with M-x mpuz.
 You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]."
   (interactive)
+  (kill-all-local-variables)
   (setq major-mode 'mpuz-mode
 	mode-name  "Mult Puzzle"
 	tab-width 30)
   (use-local-map mpuz-mode-map)
-  (run-hooks 'mpuz-mode-hook))
+  (run-mode-hooks 'mpuz-mode-hook))
 
 
 ;; Some variables for statistics
--- a/lisp/play/snake.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/play/snake.el	Sat May 28 21:04:38 2005 +0000
@@ -385,7 +385,7 @@
 
   (gamegrid-init (snake-display-options))
 
-  (run-hooks 'snake-mode-hook))
+  (run-mode-hooks 'snake-mode-hook))
 
 ;;;###autoload
 (defun snake ()
--- a/lisp/play/solitaire.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/play/solitaire.el	Sat May 28 21:04:38 2005 +0000
@@ -105,7 +105,7 @@
   (setq truncate-lines t)
   (setq major-mode 'solitaire-mode)
   (setq mode-name "Solitaire")
-  (run-hooks 'solitaire-mode-hook))
+  (run-mode-hooks 'solitaire-mode-hook))
 
 (defvar solitaire-stones 0
   "Counter for the stones that are still there.")
--- a/lisp/play/tetris.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/play/tetris.el	Sat May 28 21:04:38 2005 +0000
@@ -616,7 +616,7 @@
 
   (gamegrid-init (tetris-display-options))
 
-  (run-hooks 'tetris-mode-hook))
+  (run-mode-hooks 'tetris-mode-hook))
 
 ;;;###autoload
 (defun tetris ()
--- a/lisp/progmodes/ada-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/ada-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -1369,7 +1369,7 @@
 	      (min ada-indent (current-column))))))
   (add-hook 'skeleton-end-hook  'ada-adjust-case-skeleton nil t)
 
-  (run-hooks 'ada-mode-hook)
+  (run-mode-hooks 'ada-mode-hook)
 
   ;;  To be run after the hook, in case the user modified
   ;;  ada-fill-comment-prefix
--- a/lisp/progmodes/antlr-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/antlr-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -2624,7 +2624,7 @@
        (imenu-add-to-menubar
 	(if (stringp antlr-imenu-name) antlr-imenu-name "Index")))
   (antlr-set-tabs)
-  (run-hooks 'antlr-mode-hook))
+  (run-mode-hooks 'antlr-mode-hook))
 
 ;; A smarter version of `group-buffers-menu-by-mode-then-alphabetically' (in
 ;; XEmacs) could use the following property.  The header of the submenu would
--- a/lisp/progmodes/autoconf.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/autoconf.el	Sat May 28 21:04:38 2005 +0000
@@ -103,7 +103,7 @@
   (set (make-local-variable 'indent-line-function) #'indent-relative)
   (set (make-local-variable 'add-log-current-defun-function)
 	#'autoconf-current-defun-function)
-  (run-hooks 'autoconf-mode-hook))
+  (run-mode-hooks 'autoconf-mode-hook))
 
 (provide 'autoconf-mode)
 
--- a/lisp/progmodes/cc-align.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/cc-align.el	Sat May 28 21:04:38 2005 +0000
@@ -24,9 +24,9 @@
 ;; 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.
+;; along with this program; see the file COPYING.  If not, write to
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -175,7 +175,8 @@
       (let ((open-paren (elt c-syntactic-element 2))
 	    (paren-state (c-parse-state)))
 	(while (not (eq (car paren-state) open-paren))
-	  (goto-char (car paren-state))
+	  (unless (consp (car paren-state)) ;; ignore matched braces
+	    (goto-char (car paren-state)))
 	  (setq paren-state (cdr paren-state)))))
 
     (let ((start (point)) c)
@@ -1171,6 +1172,7 @@
 	     ;;(/= (point-max)
 	     ;;    (save-excursion (skip-syntax-forward " ") (point))
 	     (zerop (forward-line 1))
+	     (bolp)			; forward-line has funny behavior at eob.
 	     (not (looking-at "^[ \t]*$")))
 	'stop
       nil)))
--- a/lisp/progmodes/cc-awk.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/cc-awk.el	Sat May 28 21:04:38 2005 +0000
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 1988,94,96,2000,01,02,03  Free Software Foundation, Inc.
 
-;; Author: Alan Mackenzie (originally based on awk-mode.el)
+;; Author: Alan Mackenzie <acm@muc.de> (originally based on awk-mode.el)
 ;; Maintainer: FSF
 ;; Keywords: AWK, cc-mode, unix, languages
 
@@ -526,13 +526,22 @@
 ;;   Matches any AWK regexp character which doesn't require special analysis.
 (defconst c-awk-escaped-newlines*-re "\\(\\\\[\n\r]\\)*")
 ;;   Matches a (possibly empty) sequence of escaped newlines.
+
+;; NOTE: In what follows, "[asdf]" in a regexp will be called a "character
+;; list", and "[:alpha:]" inside a character list will be known as a
+;; "character class".  These terms for these things vary between regexp
+;; descriptions .
 (defconst c-awk-regexp-char-class-re
+  "\\[:[a-z]+:\\]")
+  ;; Matches a character class spec (e.g. [:alpha:]).
+(defconst c-awk-regexp-char-list-re
   (concat "\\[" c-awk-escaped-newlines*-re "^?" c-awk-escaped-newlines*-re "]?"
-          "\\(" c-awk-esc-pair-re "\\|" "[^]\n\r]" "\\)*" "\\(]\\|$\\)"))
-;;   Matches a regexp char class, up to (but not including) EOL if the ] is
+          "\\(" c-awk-esc-pair-re "\\|" c-awk-regexp-char-class-re
+	  "\\|" "[^]\n\r]" "\\)*" "\\(]\\|$\\)"))
+;;   Matches a regexp char list, up to (but not including) EOL if the ] is
 ;;   missing.
 (defconst c-awk-regexp-innards-re
-  (concat "\\(" c-awk-esc-pair-re "\\|" c-awk-regexp-char-class-re
+  (concat "\\(" c-awk-esc-pair-re "\\|" c-awk-regexp-char-list-re
           "\\|" c-awk-regexp-normal-re "\\)*"))
 ;;   Matches the inside of an AWK regexp (i.e. without the enclosing /s)
 (defconst c-awk-regexp-without-end-re
@@ -549,7 +558,7 @@
 ;;   A "neutral" char(pair).  Doesn't change the "state" of a subsequent /.
 ;; This is space/tab, braces, an auto-increment/decrement operator or an
 ;; escaped character.  Or one of the (illegal) characters @ or `.  But NOT an
-;; end of line (even if escpaed).
+;; end of line (even if escaped).
 (defconst c-awk-neutrals*-re
   (concat "\\(" c-awk-neutral-re "\\)*"))
 ;;   A (possibly empty) string of neutral characters (or character pairs).
--- a/lisp/progmodes/cc-cmds.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/cc-cmds.el	Sat May 28 21:04:38 2005 +0000
@@ -2441,7 +2441,8 @@
 		      (delete-region (point) end)
 		      (indent-to column 1)))
 
-	       (= (forward-line 1) 0))))
+	       (zerop (forward-line 1)))
+	     (bolp)))			; forward-line has funny behavior at eob.
 
       ;; Make sure there are backslashes with at least one space in
       ;; front of them.
@@ -2466,7 +2467,8 @@
 		   (insert ?\\)
 		 (insert ?\  ?\\)))
 
-	     (= (forward-line 1) 0)))))))
+	     (zerop (forward-line 1)))
+	   (bolp))))))			; forward-line has funny behavior at eob.
 
 (defun c-delete-backslashes-forward (to-mark point-pos)
   ;; This function does not do any hidden buffer changes.
@@ -2481,7 +2483,8 @@
 			 (skip-chars-backward " \t" (if (>= (point) point-pos)
 							point-pos))
 			 (point))))
-	     (= (forward-line 1) 0)))))
+	     (zerop (forward-line 1)))
+	   (bolp))))			; forward-line has funny behavior at eob.
 
 
 
--- a/lisp/progmodes/cc-defs.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/cc-defs.el	Sat May 28 21:04:38 2005 +0000
@@ -104,7 +104,7 @@
 
 ;;; Variables also used at compile time.
 
-(defconst c-version "5.30.9"
+(defconst c-version "5.30.10"
   "CC Mode version number.")
 
 (defconst c-version-sym (intern c-version))
--- a/lisp/progmodes/cc-engine.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/cc-engine.el	Sat May 28 21:04:38 2005 +0000
@@ -24,9 +24,9 @@
 ;; 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.
+;; along with this program; see the file COPYING.  If not, write to
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -3198,6 +3198,7 @@
       ;; when font-lock refontifies the current line only.
       (when (save-excursion
 	      (and (= (forward-line 1) 0)
+		   (bolp)		; forward-line has funny behavior at eob.
 		   (or (< (c-point 'eol) cfd-limit)
 		       (progn (backward-char)
 			      (not (eq (char-before) ?\\))))))
@@ -4551,7 +4552,7 @@
 		 ;; operator token preceded by "operator".
 		 (save-excursion
 		   (and (c-safe (c-backward-sexp) t)
-			(looking-at "operator\\([^_]\\|$\\)")))
+			(looking-at "operator\\>\\([^_]\\|$\\)")))
 		 (and (eq (char-before) ?<)
 		      (c-with-syntax-table c++-template-syntax-table
 			(if (c-safe (goto-char (c-up-list-forward (point))))
@@ -6104,7 +6105,12 @@
 		;; Note: We use the fact that lim is always after any
 		;; preceding brace sexp.
 		(while (and (zerop (c-backward-token-2 1 t lim))
-			    (not (looking-at "[;<,=]"))))
+			    (or (not (looking-at "[;<,=]"))
+				(and c-overloadable-operators-regexp
+				     (looking-at c-overloadable-operators-regexp)
+				     (save-excursion
+				       (c-backward-token-2 1 nil lim)
+				       (looking-at "operator\\>[^_]"))))))
 		(or (memq (char-after) '(?, ?=))
 		    (and (c-major-mode-is 'c++-mode)
 			 (zerop (c-backward-token-2 1 nil lim))
@@ -6237,7 +6243,15 @@
 	   ;; CASE 5I: ObjC method definition.
 	   ((and c-opt-method-key
 		 (looking-at c-opt-method-key))
-	    (c-beginning-of-statement-1 lim)
+	    (c-beginning-of-statement-1 nil t)
+	    (if (= (point) indent-point)
+		;; Handle the case when it's the first (non-comment)
+		;; thing in the buffer.  Can't look for a 'same return
+		;; value from cbos1 since ObjC directives currently
+		;; aren't recognized fully, so that we get 'same
+		;; instead of 'previous if it moved over a preceding
+		;; directive.
+		(goto-char (point-min)))
 	    (c-add-syntax 'objc-method-intro (c-point 'boi)))
            ;; CASE 5P: AWK pattern or function or continuation
            ;; thereof.
@@ -6316,11 +6330,13 @@
 	   ;; CASE 5K: we are at an ObjC method definition
 	   ;; continuation line.
 	   ((and c-opt-method-key
-		 (progn
+		 (save-excursion
+		   (goto-char indent-point)
 		   (c-beginning-of-statement-1 lim)
 		   (beginning-of-line)
-		   (looking-at c-opt-method-key)))
-	    (c-add-syntax 'objc-method-args-cont (point)))
+		   (when (looking-at c-opt-method-key)
+		     (setq placeholder (point)))))
+	    (c-add-syntax 'objc-method-args-cont placeholder))
 	   ;; CASE 5L: we are at the first argument of a template
 	   ;; arglist that begins on the previous line.
 	   ((eq (char-before) ?<)
--- a/lisp/progmodes/cc-fonts.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/cc-fonts.el	Sat May 28 21:04:38 2005 +0000
@@ -875,7 +875,7 @@
 	       ;; with array initializers.  Otherwise stop at braces
 	       ;; to avoid going past full function and class blocks.
 	       (and (if (and (eq got-init ?=)
-			     (= (c-forward-token-2) 0)
+			     (= (c-forward-token-2 1 nil limit) 0)
 			     (looking-at "{"))
 			(c-safe (c-forward-sexp) t)
 		      t)
--- a/lisp/progmodes/cc-langs.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/cc-langs.el	Sat May 28 21:04:38 2005 +0000
@@ -1186,7 +1186,7 @@
 (c-lang-defvar c-brace-list-key (c-lang-const c-brace-list-key))
 
 (c-lang-defconst c-other-block-decl-kwds
-  "Keywords where the following block (if any) contain another
+  "Keywords where the following block (if any) contains another
 declaration level that should not be considered a class.
 
 If any of these also are on `c-type-list-kwds', `c-ref-list-kwds',
--- a/lisp/progmodes/cc-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/cc-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -24,9 +24,9 @@
 ;; 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.
+;; along with this program; see the file COPYING.  If not, write to
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -91,10 +91,12 @@
 (cc-require 'cc-align)
 (cc-require 'cc-menus)
 
-;; SILENCE the compiler.
+;; Silence the compiler.
 (cc-bytecomp-defvar comment-line-break-function) ; (X)Emacs 20+
 (cc-bytecomp-defvar adaptive-fill-first-line-regexp) ; Emacs 20+
 (cc-bytecomp-defun set-keymap-parents)	; XEmacs
+(cc-bytecomp-defun run-mode-hooks)	; Emacs 21.1+
+(cc-bytecomp-obsolete-fun make-local-hook) ; Marked obsolete in Emacs 21.1.
 
 ;; We set these variables during mode init, yet we don't require
 ;; font-lock.
@@ -201,12 +203,15 @@
 
 (defun c-make-inherited-keymap ()
   (let ((map (make-sparse-keymap)))
+    ;; Necessary to use `cc-bytecomp-fboundp' below since this
+    ;; function is called from top-level forms that are evaluated
+    ;; while cc-bytecomp is active when one does M-x eval-buffer.
     (cond
      ;; XEmacs
-     ((fboundp 'set-keymap-parents)
+     ((cc-bytecomp-fboundp 'set-keymap-parents)
       (set-keymap-parents map c-mode-base-map))
      ;; Emacs
-     ((fboundp 'set-keymap-parent)
+     ((cc-bytecomp-fboundp 'set-keymap-parent)
       (set-keymap-parent map c-mode-base-map))
      ;; incompatible
      (t (error "CC Mode is incompatible with this version of Emacs")))
@@ -587,6 +592,13 @@
 
 (add-hook 'hack-local-variables-hook 'c-postprocess-file-styles)
 
+(defmacro c-run-mode-hooks (&rest hooks)
+  ;; Emacs 21.1 has introduced a system with delayed mode hooks that
+  ;; require the use of the new function `run-mode-hooks'.
+  (if (cc-bytecomp-fboundp 'run-mode-hooks)
+      `(run-mode-hooks ,@hooks)
+    `(progn ,@(mapcar (lambda (hook) `(run-hooks ,hook)) hooks))))
+
 
 ;; Support for C
 
@@ -667,7 +679,7 @@
   (c-common-init 'c-mode)
   (easy-menu-add c-c-menu)
   (cc-imenu-init cc-imenu-c-generic-expression)
-  (run-mode-hooks 'c-mode-common-hook 'c-mode-hook)
+  (c-run-mode-hooks 'c-mode-common-hook 'c-mode-hook)
   (c-update-modeline))
 
 
@@ -730,7 +742,7 @@
   (c-common-init 'c++-mode)
   (easy-menu-add c-c++-menu)
   (cc-imenu-init cc-imenu-c++-generic-expression)
-  (run-mode-hooks 'c-mode-common-hook 'c++-mode-hook)
+  (c-run-mode-hooks 'c-mode-common-hook 'c++-mode-hook)
   (c-update-modeline))
 
 
@@ -794,7 +806,7 @@
   (c-common-init 'objc-mode)
   (easy-menu-add c-objc-menu)
   (cc-imenu-init nil 'cc-imenu-objc-function)
-  (run-mode-hooks 'c-mode-common-hook 'objc-mode-hook)
+  (c-run-mode-hooks 'c-mode-common-hook 'objc-mode-hook)
   (c-update-modeline))
 
 
@@ -864,7 +876,7 @@
   (c-common-init 'java-mode)
   (easy-menu-add c-java-menu)
   (cc-imenu-init cc-imenu-java-generic-expression)
-  (run-mode-hooks 'c-mode-common-hook 'java-mode-hook)
+  (c-run-mode-hooks 'c-mode-common-hook 'java-mode-hook)
   (c-update-modeline))
 
 
@@ -922,7 +934,7 @@
   (c-common-init 'idl-mode)
   (easy-menu-add c-idl-menu)
   ;;(cc-imenu-init cc-imenu-idl-generic-expression) ;TODO
-  (run-mode-hooks 'c-mode-common-hook 'idl-mode-hook)
+  (c-run-mode-hooks 'c-mode-common-hook 'idl-mode-hook)
   (c-update-modeline))
 
 
@@ -984,7 +996,7 @@
   (c-common-init 'pike-mode)
   (easy-menu-add c-pike-menu)
   ;;(cc-imenu-init cc-imenu-pike-generic-expression) ;TODO
-  (run-mode-hooks 'c-mode-common-hook 'pike-mode-hook)
+  (c-run-mode-hooks 'c-mode-common-hook 'pike-mode-hook)
   (c-update-modeline))
 
 
@@ -1076,7 +1088,7 @@
     ;; in cc-engine.el, just before (defun c-fast-in-literal ...
     (defalias 'c-in-literal 'c-slow-in-literal)
 
-    (run-mode-hooks 'c-mode-common-hook 'awk-mode-hook)
+    (c-run-mode-hooks 'c-mode-common-hook 'awk-mode-hook)
     (c-update-modeline))
 ) ;; closes the (if (not (memq 'syntax-properties c-emacs-features))
 
--- a/lisp/progmodes/cc-styles.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/cc-styles.el	Sat May 28 21:04:38 2005 +0000
@@ -48,6 +48,7 @@
 
 ;; Silence the compiler.
 (cc-bytecomp-defvar adaptive-fill-first-line-regexp) ; Emacs
+(cc-bytecomp-obsolete-fun make-local-hook) ; Marked obsolete in Emacs 21.1.
 
 
 (defvar c-style-alist
--- a/lisp/progmodes/cperl-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/cperl-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -342,10 +342,19 @@
   :type 'integer
   :group 'cperl-indentation-details)
 
-(defcustom cperl-vc-header-alist '((SCCS "($sccs) = ('%W\%' =~ /(\\d+(\\.\\d+)+)/) ;")
-				   (RCS "($rcs) = (' $Id\$ ' =~ /(\\d+(\\.\\d+)+)/) ;"))
-  "*What to use as `vc-header-alist' in CPerl."
-  :type '(repeat (list symbol string))
+(defvar cperl-vc-header-alist nil)
+(make-obsolete-variable 
+ 'cperl-vc-header-alist
+ "use cperl-vc-rcs-header or cperl-vc-sccs-header instead.")
+
+(defcustom cperl-vc-sccs-header '("($sccs) = ('%W\%' =~ /(\\d+(\\.\\d+)+)/) ;")
+  "*Special version of `vc-sccs-header' that is used in CPerl mode buffers."
+  :type '(repeat string)
+  :group 'cperl)
+
+(defcustom cperl-vc-rcs-header '("($rcs) = (' $Id\$ ' =~ /(\\d+(\\.\\d+)+)/) ;")
+  "*Special version of `vc-rcs-header' that is used in CPerl mode buffers."
+  :type '(repeat string)
   :group 'cperl)
 
 (defcustom cperl-clobber-mode-lists
@@ -1485,8 +1494,10 @@
 	(function cperl-imenu--create-perl-index))
   (make-local-variable 'imenu-sort-function)
   (setq imenu-sort-function nil)
-  (make-local-variable 'vc-header-alist)
-  (set 'vc-header-alist cperl-vc-header-alist) ; Avoid warning
+  (make-local-variable 'vc-rcs-header)
+  (set 'vc-rcs-header cperl-vc-rcs-header)
+  (make-local-variable 'vc-sccs-header)
+  (set 'vc-sccs-header cperl-vc-sccs-header)
   (make-local-variable 'font-lock-defaults)
   (setq	font-lock-defaults
 	(cond
--- a/lisp/progmodes/dcl-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/dcl-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -641,7 +641,7 @@
   (setq mode-name "DCL")
   (use-local-map dcl-mode-map)
   (tempo-use-tag-list 'dcl-tempo-tags)
-  (run-hooks 'dcl-mode-hook))
+  (run-mode-hooks 'dcl-mode-hook))
 
 
 ;;; *** Movement commands ***************************************************
--- a/lisp/progmodes/delphi.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/delphi.el	Sat May 28 21:04:38 2005 +0000
@@ -2002,7 +2002,7 @@
        (delphi-parse-region (point-min) (point-max))
        (delphi-progress-done))))
 
-  (run-hooks 'delphi-mode-hook))
+  (run-mode-hooks 'delphi-mode-hook))
 
 ;;; arch-tag: 410e192d-e9b5-4397-ad62-12340fc3fa41
 ;;; delphi.el ends here
--- a/lisp/progmodes/ebrowse.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/ebrowse.el	Sat May 28 21:04:38 2005 +0000
@@ -1162,7 +1162,7 @@
     (when tree
       (ebrowse-redraw-tree)
       (set-buffer-modified-p nil))
-    (run-hooks 'ebrowse-tree-mode-hook)))
+    (run-mode-hooks 'ebrowse-tree-mode-hook)))
 
 
 
@@ -2026,7 +2026,7 @@
 	truncate-lines t
 	buffer-read-only t
 	major-mode 'ebrowse-electric-list-mode)
-  (run-hooks 'ebrowse-electric-list-mode-hook))
+  (run-mode-hooks 'ebrowse-electric-list-mode-hook))
 
 
 (defun ebrowse-list-tree-buffers ()
@@ -2277,7 +2277,7 @@
 	ebrowse--const-display-flag nil
 	ebrowse--pure-display-flag nil)
   (modify-syntax-entry ?_ (char-to-string (char-syntax ?a)))
-  (run-hooks 'ebrowse-member-mode-hook))
+  (run-mode-hooks 'ebrowse-member-mode-hook))
 
 
 
@@ -3987,7 +3987,7 @@
 	truncate-lines t
 	buffer-read-only t
 	major-mode 'ebrowse-electric-position-mode)
-  (run-hooks 'ebrowse-electric-position-mode-hook))
+  (run-mode-hooks 'ebrowse-electric-position-mode-hook))
 
 
 (defun ebrowse-draw-position-buffer ()
--- a/lisp/progmodes/etags.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/etags.el	Sat May 28 21:04:38 2005 +0000
@@ -1858,7 +1858,8 @@
 	    (error "File %s not in current tags tables" file)))))
   (with-current-buffer "*Tags List*"
     (require 'apropos)
-    (apropos-mode)
+    (with-no-warnings
+      (apropos-mode))
     (setq buffer-read-only t)))
 
 ;;;###autoload
--- a/lisp/progmodes/f90.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/f90.el	Sat May 28 21:04:38 2005 +0000
@@ -830,7 +830,7 @@
   (set (make-local-variable 'end-of-defun-function) 'f90-end-of-subprogram)
   (set (make-local-variable 'add-log-current-defun-function)
        #'f90-current-defun)
-  (run-hooks 'f90-mode-hook))
+  (run-mode-hooks 'f90-mode-hook))
 
 
 ;; Inline-functions.
--- a/lisp/progmodes/flymake.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/flymake.el	Sat May 28 21:04:38 2005 +0000
@@ -47,7 +47,8 @@
 (defsubst flymake-makehash (&optional test)
   (if (fboundp 'make-hash-table)
       (if test (make-hash-table :test test) (make-hash-table))
-    (makehash test)))
+    (with-no-warnings
+      (makehash test))))
 
 (defalias 'flymake-float-time
   (if (fboundp 'float-time)
--- a/lisp/progmodes/fortran.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/fortran.el	Sat May 28 21:04:38 2005 +0000
@@ -799,7 +799,7 @@
        #'fortran-current-defun)
   (set (make-local-variable 'dabbrev-case-fold-search) 'case-fold-search)
   (set (make-local-variable 'gud-find-expr-function) 'fortran-gud-find-expr)
-  (run-hooks 'fortran-mode-hook))
+  (run-mode-hooks 'fortran-mode-hook))
 
 
 (defun fortran-gud-find-expr ()
--- a/lisp/progmodes/gdb-ui.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/gdb-ui.el	Sat May 28 21:04:38 2005 +0000
@@ -66,15 +66,16 @@
 
 (require 'gud)
 
-(defvar gdb-current-address "main" "Initialisation for Assembler buffer.")
-(defvar gdb-previous-address nil)
+(defvar gdb-frame-address "main" "Initialisation for Assembler buffer.")
+(defvar gdb-previous-frame-address nil)
 (defvar gdb-memory-address "main")
 (defvar gdb-previous-frame nil)
-(defvar gdb-current-frame nil)
-(defvar gdb-current-stack-level nil)
+(defvar gdb-selected-frame nil)
+(defvar gdb-frame-number nil)
 (defvar gdb-current-language nil)
 (defvar gdb-var-list nil "List of variables in watch window.")
 (defvar gdb-var-changed nil "Non-nil means that gdb-var-list has changed.")
+(defvar gdb-main-file nil "Source file from which program execution begins.")
 (defvar gdb-buffer-type nil)
 (defvar gdb-overlay-arrow-position nil)
 (defvar gdb-server-prefix nil)
@@ -211,11 +212,18 @@
   :version "22.1")
 
 (defcustom gdb-cpp-define-alist-flags ""
-  "*Preprocessor flags for `gdb-cpp-define-alist-program'."
+  "Preprocessor flags for `gdb-cpp-define-alist-program'."
   :type 'string
   :group 'gud
   :version "22.1")
 
+(defcustom gdb-show-main nil
+  "Non-nil means display source file containing the main routine at startup.
+Also display the main routine in the disassembly buffer if present."
+  :type 'boolean
+  :group 'gud
+  :version "22.1")
+
 (defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.")
 
 (defun gdb-create-define-alist ()
@@ -295,7 +303,7 @@
   (set (make-local-variable 'gud-minor-mode) 'gdba)
   (set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter)
   ;;
-  (gud-def gud-break (if (not (string-equal mode-name "Machine"))
+  (gud-def gud-break (if (not (string-match "Machine" mode-name))
 			 (gud-call "break %f:%l" arg)
 		       (save-excursion
 			 (beginning-of-line)
@@ -303,7 +311,7 @@
 			 (gud-call "break *%a" arg)))
 	   "\C-b" "Set breakpoint at current line or address.")
   ;;
-  (gud-def gud-remove (if (not (string-equal mode-name "Machine"))
+  (gud-def gud-remove (if (not (string-match "Machine" mode-name))
 			  (gud-call "clear %f:%l" arg)
 			(save-excursion
 			  (beginning-of-line)
@@ -311,7 +319,7 @@
 			  (gud-call "clear *%a" arg)))
 	   "\C-d" "Remove breakpoint at current line or address.")
   ;;
-  (gud-def gud-until  (if (not (string-equal mode-name "Machine"))
+  (gud-def gud-until  (if (not (string-match "Machine" mode-name))
 			  (gud-call "until %f:%l" arg)
 			(save-excursion
 			  (beginning-of-line)
@@ -332,25 +340,26 @@
   (setq comint-input-sender 'gdb-send)
   ;;
   ;; (re-)initialize
-  (setq gdb-current-address "main")
-  (setq gdb-previous-address nil)
-  (setq gdb-memory-address "main")
-  (setq gdb-previous-frame nil)
-  (setq gdb-current-frame nil)
-  (setq gdb-current-stack-level nil)
-  (setq gdb-var-list nil)
-  (setq gdb-var-changed nil)
-  (setq gdb-first-prompt nil)
-  (setq gdb-prompting nil)
-  (setq gdb-input-queue nil)
-  (setq gdb-current-item nil)
-  (setq gdb-pending-triggers nil)
-  (setq gdb-output-sink 'user)
-  (setq gdb-server-prefix "server ")
-  (setq gdb-flush-pending-output nil)
-  (setq gdb-location-alist nil)
-  (setq gdb-find-file-unhook nil)
-  (setq gdb-macro-info nil)
+  (setq gdb-frame-address (if gdb-show-main "main" nil))
+  (setq gdb-previous-frame-address nil
+	gdb-memory-address "main"
+	gdb-previous-frame nil
+	gdb-selected-frame nil
+	gdb-current-language nil
+	gdb-frame-number nil
+	gdb-var-list nil
+	gdb-var-changed nil
+	gdb-first-prompt nil
+	gdb-prompting nil
+	gdb-input-queue nil
+	gdb-current-item nil
+	gdb-pending-triggers nil
+	gdb-output-sink 'user
+	gdb-server-prefix "server "
+	gdb-flush-pending-output nil
+	gdb-location-alist nil
+	gdb-find-file-unhook nil
+	gdb-macro-info nil)
   ;;
   (setq gdb-buffer-type 'gdba)
   ;;
@@ -380,8 +389,8 @@
   (require 'tooltip)
   (let ((expr (tooltip-identifier-from-point (point))))
     (if (and (string-equal gdb-current-language "c")
-	     gdb-use-colon-colon-notation gdb-current-frame)
-	(setq expr (concat gdb-current-frame "::" expr)))
+	     gdb-use-colon-colon-notation gdb-selected-frame)
+	(setq expr (concat gdb-selected-frame "::" expr)))
     (catch 'already-watched
       (dolist (var gdb-var-list)
 	(if (string-equal expr (car var)) (throw 'already-watched nil)))
@@ -698,6 +707,7 @@
     (define-key map "\C-c\C-z" 'gdb-inferior-io-stop)
     (define-key map "\C-c\C-\\" 'gdb-inferior-io-quit)
     (define-key map "\C-c\C-d" 'gdb-inferior-io-eof)
+    (define-key map "\C-d" 'gdb-inferior-io-eof)
     map))
 
 (define-derived-mode gdb-inferior-io-mode comint-mode "Inferior I/O"
@@ -861,7 +871,7 @@
   (setq gdb-prompting t))
 
 (defconst gdb-source-spec-regexp
-  "\\(.*\\):\\([0-9]*\\):[0-9]*:[a-z]*:\\(0x[a-f0-9]*\\)")
+  "\\(.*\\):\\([0-9]*\\):[0-9]*:[a-z]*:0x0*\\([a-f0-9]*\\)")
 
 ;; Do not use this except as an annotation handler.
 (defun gdb-source (args)
@@ -871,7 +881,7 @@
 	(cons
 	 (match-string 1 args)
 	 (string-to-number (match-string 2 args))))
-  (setq gdb-current-address (match-string 3 args))
+  (setq gdb-frame-address (match-string 3 args))
   ;; cover for auto-display output which comes *before*
   ;; stopped annotation
   (if (eq gdb-output-sink 'inferior) (setq gdb-output-sink 'user)))
@@ -953,7 +963,7 @@
 directives."
   (setq gdb-active-process nil)
   (gdb-stopping ignored))
- 
+
 (defun gdb-frame-begin (ignored)
   (let ((sink gdb-output-sink))
     (cond
@@ -984,10 +994,12 @@
 This begins the collection of output from the current command if that
 happens to be appropriate."
   (unless gdb-pending-triggers
-	(gdb-get-current-frame)
+	(gdb-get-selected-frame)
 	(gdb-invalidate-frames)
 	(gdb-invalidate-breakpoints)
-	(gdb-invalidate-assembler)
+	;; Do this through gdb-get-selected-frame -> gdb-frame-handler
+	;; so gdb-frame-address is updated.
+	;; (gdb-invalidate-assembler)
 	(gdb-invalidate-registers)
 	(gdb-invalidate-memory)
 	(gdb-invalidate-locals)
@@ -1303,7 +1315,8 @@
 		      (looking-at "\\(\\S-+\\):\\([0-9]+\\)")
 		      (let ((line (match-string 2)) (buffer-read-only nil)
 			    (file (match-string 1)))
-			(add-text-properties (point-at-bol) (point-at-eol)
+			(add-text-properties (line-beginning-position)
+					     (line-end-position)
 			 '(mouse-face highlight
 			   help-echo "mouse-2, RET: visit breakpoint"))
 			(unless (file-exists-p file)
@@ -1504,13 +1517,13 @@
       (let ((buffer-read-only nil))
 	(goto-char (point-min))
 	(while (< (point) (point-max))
-	  (add-text-properties (point-at-bol) (point-at-eol)
+	  (add-text-properties (line-beginning-position) (line-end-position)
 			     '(mouse-face highlight
 			       help-echo "mouse-2, RET: Select frame"))
 	  (beginning-of-line)
 	  (when (and (looking-at "^#\\([0-9]+\\)")
-		     (equal (match-string 1) gdb-current-stack-level))
-	    (put-text-property (point-at-bol) (point-at-eol)
+		     (equal (match-string 1) gdb-frame-number))
+	    (put-text-property (line-beginning-position) (line-end-position)
 			       'face '(:inverse-video t)))
 	  (forward-line 1))))))
 
@@ -1588,7 +1601,7 @@
     (let ((buffer-read-only nil))
       (goto-char (point-min))
       (while (< (point) (point-max))
-	(add-text-properties (point-at-bol) (point-at-eol)
+	(add-text-properties (line-beginning-position) (line-end-position)
 			     '(mouse-face highlight
 			       help-echo "mouse-2, RET: select thread"))
 	(forward-line 1)))))
@@ -1646,13 +1659,20 @@
 
 ;; Registers buffer.
 ;;
+(defcustom gdb-all-registers nil
+  "Non-nil means include floating-point registers."
+  :type 'boolean
+  :group 'gud
+  :version "22.1")
+
 (gdb-set-buffer-rules 'gdb-registers-buffer
 		      'gdb-registers-buffer-name
 		      'gdb-registers-mode)
 
 (def-gdb-auto-updated-buffer gdb-registers-buffer
   gdb-invalidate-registers
-  (concat gdb-server-prefix "info registers\n")
+  (concat
+   gdb-server-prefix "info " (if gdb-all-registers "all-") "registers\n")
   gdb-info-registers-handler
   gdb-info-registers-custom)
 
@@ -1661,6 +1681,7 @@
 (defvar gdb-registers-mode-map
   (let ((map (make-sparse-keymap)))
     (suppress-keymap map)
+    (define-key map " " 'toggle-gdb-all-registers)
     (define-key map "q" 'kill-this-buffer)
      map))
 
@@ -1670,7 +1691,7 @@
 \\{gdb-registers-mode-map}"
   (kill-all-local-variables)
   (setq major-mode 'gdb-registers-mode)
-  (setq mode-name "Registers")
+  (setq mode-name "Registers:")
   (setq buffer-read-only t)
   (use-local-map gdb-registers-mode-map)
   (run-mode-hooks 'gdb-registers-mode-hook)
@@ -1693,6 +1714,20 @@
 	(special-display-frame-alist gdb-frame-parameters))
     (display-buffer (gdb-get-create-buffer 'gdb-registers-buffer))))
 
+(defun toggle-gdb-all-registers ()
+  "Toggle the display of floating-point registers."
+  (interactive)
+  (if gdb-all-registers
+      (progn
+	(setq gdb-all-registers nil)
+	(with-current-buffer (gdb-get-buffer 'gdb-registers-buffer)
+	  (setq mode-name "Registers:")))
+	(setq gdb-all-registers t)
+	(with-current-buffer (gdb-get-buffer 'gdb-registers-buffer)
+	  (setq mode-name "Registers:All")))
+  (gdb-invalidate-registers))
+
+
 ;; Memory buffer.
 ;;
 (defcustom gdb-memory-repeat-count 32
@@ -1913,6 +1948,7 @@
 	   (propertize gdb-memory-address
 		       'face font-lock-warning-face
 		       'help-echo "mouse-1: Set memory address"
+		       'mouse-face 'mode-line-highlight
 		       'local-map (gdb-make-header-line-mouse-map
 				   'mouse-1
 				   #'gdb-memory-set-address))
@@ -1920,6 +1956,7 @@
 	   (propertize (number-to-string gdb-memory-repeat-count)
 		       'face font-lock-warning-face
 		       'help-echo "mouse-1: Set repeat count"
+		       'mouse-face 'mode-line-highlight
 		       'local-map (gdb-make-header-line-mouse-map
 				   'mouse-1
 				   #'gdb-memory-set-repeat-count))
@@ -1927,11 +1964,13 @@
 	   (propertize gdb-memory-format
 		       'face font-lock-warning-face
 		       'help-echo "mouse-3: Select display format"
+		       'mouse-face 'mode-line-highlight
 		       'local-map gdb-memory-format-keymap)
 	   "  Unit Size: "
 	   (propertize gdb-memory-unit
 		       'face font-lock-warning-face
 		       'help-echo "mouse-3: Select unit size"
+		       'mouse-face 'mode-line-highlight
 		       'local-map gdb-memory-unit-keymap))))
   (run-mode-hooks 'gdb-memory-mode-hook)
   'gdb-invalidate-memory)
@@ -1974,14 +2013,14 @@
   (let ((buf (gdb-get-buffer 'gdb-partial-output-buffer)))
     (with-current-buffer buf
       (goto-char (point-min))
-      (while (re-search-forward "^ .*\n" nil t)
+      (while (re-search-forward "^[ }].*\n" nil t)
 	(replace-match "" nil nil))
       (goto-char (point-min))
-      (while (re-search-forward "{[-0-9, {}\]*\n" nil t)
-	(replace-match "(array);\n" nil nil))
+      (while (re-search-forward "{\\(.*=.*\n\\|\n\\)" nil t)
+	(replace-match "(structure);\n" nil nil))
       (goto-char (point-min))
-      (while (re-search-forward "{.*=.*\n" nil t)
-	(replace-match "(structure);\n" nil nil))))
+      (while (re-search-forward "\\s-*{.*\n" nil t)
+	(replace-match " (array);\n" nil nil))))
   (let ((buf (gdb-get-buffer 'gdb-locals-buffer)))
     (and buf (with-current-buffer buf
 	       (let ((p (point))
@@ -2007,7 +2046,7 @@
 \\{gdb-locals-mode-map}"
   (kill-all-local-variables)
   (setq major-mode 'gdb-locals-mode)
-  (setq mode-name (concat "Locals:" gdb-current-frame))
+  (setq mode-name (concat "Locals:" gdb-selected-frame))
   (setq buffer-read-only t)
   (use-local-map gdb-locals-mode-map)
   (run-mode-hooks 'gdb-locals-mode-hook)
@@ -2067,7 +2106,8 @@
   (define-key menu [gdb] '("Gdb" . gdb-display-gdb-buffer))
   (define-key menu [threads] '("Threads" . gdb-display-threads-buffer))
   (define-key menu [memory] '("Memory" . gdb-display-memory-buffer))
-  (define-key menu [assembler] '("Machine" . gdb-display-assembler-buffer))
+  (define-key menu [disassembly]
+    '("Disassembly" . gdb-display-assembler-buffer))
   (define-key menu [registers] '("Registers" . gdb-display-registers-buffer))
   (define-key menu [inferior]
     '(menu-item "Inferior IO" gdb-display-inferior-io-buffer
@@ -2084,7 +2124,7 @@
   (define-key menu [gdb] '("Gdb" . gdb-frame-gdb-buffer))
   (define-key menu [threads] '("Threads" . gdb-frame-threads-buffer))
   (define-key menu [memory] '("Memory" . gdb-frame-memory-buffer))
-  (define-key menu [assembler] '("Machine" . gdb-frame-assembler-buffer))
+  (define-key menu [disassembly] '("Disassembiy" . gdb-frame-assembler-buffer))
   (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer))
   (define-key menu [inferior]
     '(menu-item "Inferior IO" gdb-frame-inferior-io-buffer
@@ -2127,14 +2167,6 @@
   (gdb-display-buffer
    (gdb-get-create-buffer 'gdba)))
 
-(defvar gdb-main-file nil "Source file from which program execution begins.")
-
-(defcustom gdb-show-main nil
-  "Nil means don't display source file containing the main routine."
-  :type 'boolean
-  :group 'gud
-  :version "22.1")
-
 (defun gdb-set-window-buffer (name)
   (set-window-buffer (selected-window) (get-buffer name))
   (set-window-dedicated-p (selected-window) t))
@@ -2316,8 +2348,8 @@
 	  (delete-overlay overlay))))
 
 (defun gdb-put-breakpoint-icon (enabled bptno)
-  (let ((start (progn (beginning-of-line) (- (point) 1)))
-	(end (progn (end-of-line) (+ (point) 1)))
+  (let ((start (- (line-beginning-position) 1))
+	(end (+ (line-end-position) 1))
 	(putstring (if enabled "B" "b")))
     (add-text-properties
      0 1 '(help-echo "mouse-1: set/clear bkpt, mouse-3: enable/disable bkpt")
@@ -2397,7 +2429,9 @@
 
 (def-gdb-auto-updated-buffer gdb-assembler-buffer
   gdb-invalidate-assembler
-  (concat gdb-server-prefix "disassemble " gdb-current-address "\n")
+  (concat gdb-server-prefix "disassemble " 
+	  (if (member gdb-frame-address '(nil "main")) nil "0x")
+	  gdb-frame-address "\n")
   gdb-assembler-handler
   gdb-assembler-custom)
 
@@ -2405,10 +2439,11 @@
   (let ((buffer (gdb-get-buffer 'gdb-assembler-buffer))
 	(pos 1) (address) (flag) (bptno))
     (with-current-buffer buffer
-      (if (not (equal gdb-current-address "main"))
+      (if (not (equal gdb-frame-address "main"))
 	  (progn
 	    (goto-char (point-min))
-	    (if (re-search-forward gdb-current-address nil t)
+	    (if (and gdb-frame-address
+		     (re-search-forward gdb-frame-address nil t))
 		(progn
 		  (setq pos (point))
 		  (beginning-of-line)
@@ -2425,18 +2460,15 @@
 	(if (looking-at "[^\t].*breakpoint")
 	    (progn
 	      (looking-at
-	       "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+0x\\(\\S-+\\)")
+	    "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+0x0*\\(\\S-+\\)")
 	      (setq bptno (match-string 1))
 	      (setq flag (char-after (match-beginning 2)))
 	      (setq address (match-string 3))
-	      ;; remove leading 0s from output of info break.
-	      (if (string-match "^0+\\(.*\\)" address)
-		  (setq address (match-string 1 address)))
 	      (with-current-buffer buffer
 		  (goto-char (point-min))
 		  (if (re-search-forward address nil t)
 		      (gdb-put-breakpoint-icon (eq flag ?y) bptno)))))))
-    (if (not (equal gdb-current-address "main"))
+    (if (not (equal gdb-frame-address "main"))
 	(set-window-point (get-buffer-window buffer 0) pos))))
 
 (defvar gdb-assembler-mode-map
@@ -2466,7 +2498,7 @@
 \\{gdb-assembler-mode-map}"
   (kill-all-local-variables)
   (setq major-mode 'gdb-assembler-mode)
-  (setq mode-name "Machine")
+  (setq mode-name (concat "Machine:" gdb-selected-frame))
   (setq gdb-overlay-arrow-position nil)
   (add-to-list 'overlay-arrow-variable-list 'gdb-overlay-arrow-position)
   (setq fringes-outside-margins t)
@@ -2480,7 +2512,7 @@
 
 (defun gdb-assembler-buffer-name ()
   (with-current-buffer gud-comint-buffer
-    (concat "*Machine Code " (gdb-get-target-string) "*")))
+    (concat "*Disassembly of " (gdb-get-target-string) "*")))
 
 (defun gdb-display-assembler-buffer ()
   "Display disassembly view."
@@ -2495,18 +2527,19 @@
 	(special-display-frame-alist gdb-frame-parameters))
     (display-buffer (gdb-get-create-buffer 'gdb-assembler-buffer))))
 
-;; modified because if gdb-current-address has changed value a new command
+;; modified because if gdb-frame-address has changed value a new command
 ;; must be enqueued to update the buffer with the new output
 (defun gdb-invalidate-assembler (&optional ignored)
   (if (gdb-get-buffer 'gdb-assembler-buffer)
       (progn
-	(unless (string-equal gdb-current-frame gdb-previous-frame)
+	(unless (and gdb-selected-frame
+		     (string-equal gdb-selected-frame gdb-previous-frame))
 	  (if (or (not (member 'gdb-invalidate-assembler
 			       gdb-pending-triggers))
-		  (not (string-equal gdb-current-address
-				     gdb-previous-address)))
+		  (not (string-equal gdb-frame-address
+				     gdb-previous-frame-address)))
 	  (progn
-	    ;; take previous disassemble command off the queue
+	    ;; take previous disassemble command, if any, off the queue
 	    (with-current-buffer gud-comint-buffer
 	      (let ((queue gdb-input-queue))
 		(dolist (item queue)
@@ -2514,46 +2547,46 @@
 		      (setq gdb-input-queue
 			    (delete item gdb-input-queue))))))
 	    (gdb-enqueue-input
-	     (list (concat gdb-server-prefix "disassemble "
-			   gdb-current-address "\n")
+	     (list
+	      (concat gdb-server-prefix "disassemble "
+		      (if (member gdb-frame-address '(nil "main")) nil "0x")
+			   gdb-frame-address "\n")
 		   'gdb-assembler-handler))
 	    (push 'gdb-invalidate-assembler gdb-pending-triggers)
-	    (setq gdb-previous-address gdb-current-address)
-	    (setq gdb-previous-frame gdb-current-frame)))))))
+	    (setq gdb-previous-frame-address gdb-frame-address)
+	    (setq gdb-previous-frame gdb-selected-frame)))))))
 
-(defun gdb-get-current-frame ()
-  (if (not (member 'gdb-get-current-frame gdb-pending-triggers))
+(defun gdb-get-selected-frame ()
+  (if (not (member 'gdb-get-selected-frame gdb-pending-triggers))
       (progn
 	(gdb-enqueue-input
 	 (list (concat gdb-server-prefix "info frame\n") 'gdb-frame-handler))
-	(push 'gdb-get-current-frame
+	(push 'gdb-get-selected-frame
 	       gdb-pending-triggers))))
 
 (defun gdb-frame-handler ()
   (setq gdb-pending-triggers
-   (delq 'gdb-get-current-frame gdb-pending-triggers))
+	(delq 'gdb-get-selected-frame gdb-pending-triggers))
   (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
     (goto-char (point-min))
-    (if (looking-at "Stack level \\([0-9]+\\)")
-	(setq gdb-current-stack-level (match-string 1)))
-    (forward-line)
-    (if (looking-at ".*=\\s-+0x\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*?\\);? ")
+    (if (re-search-forward  "Stack level \\([0-9]+\\)" nil t)
+	(setq gdb-frame-number (match-string 1)))
+    (goto-char (point-min))
+    (if (re-search-forward
+	 ".*=\\s-+0x0*\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*?\\);? " nil t)
 	(progn
-	  (setq gdb-current-frame (match-string 2))
+	  (setq gdb-selected-frame (match-string 2))
 	  (if (gdb-get-buffer 'gdb-locals-buffer)
 	      (with-current-buffer (gdb-get-buffer 'gdb-locals-buffer)
-		(setq mode-name (concat "Locals:" gdb-current-frame))))
-	  (let ((address (match-string 1)))
-	    ;; remove leading 0s from output of info frame command.
-	    (if (string-match "^0+\\(.*\\)" address)
-		(setq gdb-current-address
-		      (concat "0x" (match-string 1 address)))
-	      (setq gdb-current-address (concat "0x" address))))
-	  (if (not (re-search-forward "(\\S-*:[0-9]*);" nil t))
-		;;update with new frame for machine code if necessary
-		(gdb-invalidate-assembler)))))
+		(setq mode-name (concat "Locals:" gdb-selected-frame))))
+	  (if (gdb-get-buffer 'gdb-assembler-buffer)
+	      (with-current-buffer (gdb-get-buffer 'gdb-assembler-buffer)
+		(setq mode-name (concat "Machine:" gdb-selected-frame))))
+	  (setq gdb-frame-address (match-string 1))))
+    (goto-char (point-min))
     (if (re-search-forward " source language \\(\\S-*\\)\." nil t)
 	(setq gdb-current-language (match-string 1))))
+    (gdb-invalidate-assembler))
 
 (provide 'gdb-ui)
 
--- a/lisp/progmodes/gud.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/gud.el	Sat May 28 21:04:38 2005 +0000
@@ -25,17 +25,17 @@
 
 ;;; Commentary:
 
-;; The ancestral gdb.el was by W. Schelter <wfs@rascal.ics.utexas.edu>
-;; It was later rewritten by rms.  Some ideas were due to Masanobu.
-;; Grand Unification (sdb/dbx support) by Eric S. Raymond <esr@thyrsus.com>
-;; The overloading code was then rewritten by Barry Warsaw <bwarsaw@cen.com>,
-;; who also hacked the mode to use comint.el.  Shane Hartman <shane@spr.com>
-;; added support for xdb (HPUX debugger).  Rick Sladkey <jrs@world.std.com>
-;; wrote the GDB command completion code.  Dave Love <d.love@dl.ac.uk>
-;; added the IRIX kluge, re-implemented the Mips-ish variant and added
-;; a menu. Brian D. Carlstrom <bdc@ai.mit.edu> combined the IRIX kluge with
-;; the gud-xdb-directories hack producing gud-dbx-directories.  Derek L. Davies
-;; <ddavies@world.std.com> added support for jdb (Java debugger.)
+;; The ancestral gdb.el was by W. Schelter <wfs@rascal.ics.utexas.edu> It was
+;; later rewritten by rms.  Some ideas were due to Masanobu.  Grand
+;; Unification (sdb/dbx support) by Eric S. Raymond <esr@thyrsus.com> Barry
+;; Warsaw <bwarsaw@cen.com> hacked the mode to use comint.el.  Shane Hartman
+;; <shane@spr.com> added support for xdb (HPUX debugger).  Rick Sladkey
+;; <jrs@world.std.com> wrote the GDB command completion code.  Dave Love
+;; <d.love@dl.ac.uk> added the IRIX kluge, re-implemented the Mips-ish variant
+;; and added a menu. Brian D. Carlstrom <bdc@ai.mit.edu> combined the IRIX
+;; kluge with the gud-xdb-directories hack producing gud-dbx-directories.
+;; Derek L. Davies <ddavies@world.std.com> added support for jdb (Java
+;; debugger.)
 
 ;;; Code:
 
@@ -107,11 +107,10 @@
 		(setq same-window-regexps nil)
 		(throw 'info-found nil))))
        nil 0)
-      (require 'info)
       (select-frame (make-frame)))
     (if (memq gud-minor-mode '(gdbmi gdba))
-	(Info-goto-node "(emacs)GDB Graphical Interface")
-      (Info-goto-node "(emacs)Debuggers"))))
+	(info "(emacs)GDB Graphical Interface")
+      (info "(emacs)Debuggers"))))
 
 (easy-mmode-defmap gud-menu-map
   '(([help]     "Info" . gud-goto-info)
@@ -343,13 +342,13 @@
 
 (defvar gud-speedbar-menu-items
   ;; Note to self.  Add expand, and turn off items when not available.
-  '(["Jump to stack frame" speedbar-edit-line 
+  '(["Jump to stack frame" speedbar-edit-line
      (with-current-buffer gud-comint-buffer
        (not (memq gud-minor-mode '(gdbmi gdba))))]
-    ["Edit value" speedbar-edit-line 
+    ["Edit value" speedbar-edit-line
      (with-current-buffer gud-comint-buffer
        (not (memq gud-minor-mode '(gdbmi gdba))))]
-    ["Delete expression" gdb-var-delete 
+    ["Delete expression" gdb-var-delete
      (with-current-buffer gud-comint-buffer
        (not (memq gud-minor-mode '(gdbmi gdba))))])
   "Additional menu items to add to the speedbar frame.")
@@ -3192,7 +3191,7 @@
   "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 ()
+(defun toggle-gud-tooltip-dereference ()
   "Toggle whether tooltips should show `* expr' or `expr'."
   (interactive)
   (setq gud-tooltip-dereference (not gud-tooltip-dereference))
@@ -3201,7 +3200,7 @@
 	     (if gud-tooltip-dereference "on" "off"))))
 
 (define-obsolete-function-alias 'tooltip-gud-toggle-dereference
-                                'gud-tooltip-toggle-dereference "22.1")
+                                'toggle-gud-tooltip-dereference "22.1")
 
 (define-minor-mode gud-tooltip-mode
   "Toggle the display of GUD tooltips."
--- a/lisp/progmodes/icon.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/icon.el	Sat May 28 21:04:38 2005 +0000
@@ -205,7 +205,7 @@
 	  (cons '(icon-mode  "\\<procedure\\>" "\\<end\\>" nil
 			     icon-forward-sexp-function)
 		hs-special-modes-alist)))
-  (run-hooks 'icon-mode-hook))
+  (run-mode-hooks 'icon-mode-hook))
 
 ;; This is used by indent-for-comment to decide how much to
 ;; indent a comment in Icon code based on its context.
--- a/lisp/progmodes/idlw-help.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/idlw-help.el	Sat May 28 21:04:38 2005 +0000
@@ -278,7 +278,7 @@
   (set (make-local-variable 'idlwave-help-def-pos) nil)
   (set (make-local-variable 'idlwave-help-args) nil)
   (set (make-local-variable 'idlwave-help-in-header) nil)
-  (run-hooks 'idlwave-help-mode-hook))
+  (run-mode-hooks 'idlwave-help-mode-hook))
 
 (defun idlwave-html-help-location ()
   "Return the help directory where HTML files are, or nil if that is unknown."
--- a/lisp/progmodes/idlw-shell.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/idlw-shell.el	Sat May 28 21:04:38 2005 +0000
@@ -1055,7 +1055,7 @@
   (set (make-local-variable 'tool-bar-map) nil)
 
   ;; Run the hooks.
-  (run-hooks 'idlwave-shell-mode-hook)
+  (run-mode-hooks 'idlwave-shell-mode-hook)
   (idlwave-shell-send-command idlwave-shell-initial-commands nil 'hide)
   ;; Turn off IDL's ^d interpreting, and define a system
   ;; variable which knows the version of IDLWAVE
--- a/lisp/progmodes/idlwave.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/idlwave.el	Sat May 28 21:04:38 2005 +0000
@@ -1954,7 +1954,7 @@
   (idlwave-new-buffer-update)
 
   ;; Run the mode hook
-  (run-hooks 'idlwave-mode-hook))
+  (run-mode-hooks 'idlwave-mode-hook))
 
 (defvar idlwave-setup-done nil)
 (defun idlwave-setup ()
@@ -3548,7 +3548,7 @@
   (let ((pos (point)))
     (if idlwave-file-header
 	(cond ((car idlwave-file-header)
-	       (insert-file (car idlwave-file-header)))
+	       (insert-file-contents (car idlwave-file-header)))
 	      ((stringp (car (cdr idlwave-file-header)))
 	       (insert (car (cdr idlwave-file-header))))))
     (goto-char pos)))
--- a/lisp/progmodes/inf-lisp.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/inf-lisp.el	Sat May 28 21:04:38 2005 +0000
@@ -269,7 +269,7 @@
   (use-local-map inferior-lisp-mode-map)    ;c-c c-k for "kompile" file
   (setq comint-get-old-input (function lisp-get-old-input))
   (setq comint-input-filter (function lisp-input-filter))
-  (run-hooks 'inferior-lisp-mode-hook))
+  (run-mode-hooks 'inferior-lisp-mode-hook))
 
 (defun lisp-get-old-input ()
   "Return a string containing the sexp ending at point."
--- a/lisp/progmodes/m4-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/m4-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -147,7 +147,7 @@
 	font-lock-defaults '(m4-font-lock-keywords nil)
 	)
   (set-syntax-table m4-mode-syntax-table)
-  (run-hooks 'm4-mode-hook))
+  (run-mode-hooks 'm4-mode-hook))
 
 (provide 'm4-mode)
 ;;stuff to play with for debugging
--- a/lisp/progmodes/make-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/make-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -484,7 +484,7 @@
     ("\\\\\n" 0 ".")))
 
 (defvar makefile-imenu-generic-expression
-  `(("Dependencies" ,makefile-dependency-regex 1)
+  `(("Dependencies" makefile-previous-dependency 1)
     ("Macro Assignment" ,makefile-macroassign-regex 1))
   "Imenu generic expression for Makefile mode.  See `imenu-generic-expression'.")
 
@@ -854,7 +854,10 @@
 	"^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|[-@]+\\)[ \t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.+\\\\\n\\)*.+\\)")
 
   (setq font-lock-defaults
-	`(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults))))
+	`(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults))
+	imenu-generic-expression
+	`(("Functions" "^[ \t]*\\(?:make\\)?sub[ \t]+\\([A-Za-z0-9_]+\\)" 1)
+	  ,@imenu-generic-expression)))
 
 ;;;###autoload
 (define-derived-mode makefile-bsdmake-mode makefile-mode "BSDmakefile"
@@ -866,10 +869,7 @@
   (set (make-local-variable 'makefile-rule-action-regex)
        "^\t[ \t]*\\([-+@]*\\)[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)")
   (setq font-lock-defaults
-	`(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults))
-	imenu-generic-expression
-	`(("Dependencies" ,makefile-dependency-regex 1)
-	  ,@(cdr imenu-generic-expression))))
+	`(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults))))
 
 
 
@@ -1682,7 +1682,7 @@
   (catch 'found
     (let ((pt (point)))
       (while (progn (skip-chars-forward makefile-dependency-skip bound)
-		    (not (eobp)))
+		    (< (point) (or bound (point-max))))
 	(forward-char)
 	(or (eq (char-after) ?=)
 	    (get-text-property (1- (point)) 'face)
--- a/lisp/progmodes/meta-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/meta-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -998,7 +998,7 @@
   (setq meta-complete-list
         (list (list "\\<\\(\\sw+\\)" 1 'meta-symbol-list)
               (list "" 'ispell-complete-word)))
-  (run-hooks 'meta-common-mode-hook 'metafont-mode-hook))
+  (run-mode-hooks 'meta-common-mode-hook 'metafont-mode-hook))
 
 ;;;###autoload
 (defun metapost-mode ()
@@ -1023,7 +1023,7 @@
   (setq meta-complete-list
         (list (list "\\<\\(\\sw+\\)" 1 'meta-symbol-list)
               (list "" 'ispell-complete-word)))
-  (run-hooks 'meta-common-mode-hook 'metapost-mode-hook))
+  (run-mode-hooks 'meta-common-mode-hook 'metapost-mode-hook))
 
 
 ;;; Just in case ...
--- a/lisp/progmodes/modula2.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/modula2.el	Sat May 28 21:04:38 2005 +0000
@@ -172,7 +172,7 @@
 	  ;; Obsoleted by Emacs 19.35 parse-partial-sexp's COMMENTSTOP.
 	  ;(font-lock-comment-start-regexp . "(\\*")
 	  ))
-  (run-hooks 'm2-mode-hook))
+  (run-mode-hooks 'm2-mode-hook))
 
 ;; Regexps written with help from Ron Forrester <ron@orcad.com>
 ;; and Spencer Allain <sallain@teknowledge.com>.
--- a/lisp/progmodes/octave-inf.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/octave-inf.el	Sat May 28 21:04:38 2005 +0000
@@ -158,7 +158,7 @@
 	inferior-octave-dynamic-complete-functions)
   (comint-read-input-ring t)
 
-  (run-hooks 'inferior-octave-mode-hook))
+  (run-mode-hooks 'inferior-octave-mode-hook))
 
 ;;;###autoload
 (defun inferior-octave (&optional arg)
--- a/lisp/progmodes/octave-mod.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/octave-mod.el	Sat May 28 21:04:38 2005 +0000
@@ -555,7 +555,7 @@
 
   (octave-add-octave-menu)
   (octave-initialize-completions)
-  (run-hooks 'octave-mode-hook))
+  (run-mode-hooks 'octave-mode-hook))
 
 ;;; Miscellaneous useful functions
 (defun octave-describe-major-mode ()
--- a/lisp/progmodes/pascal.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/pascal.el	Sat May 28 21:04:38 2005 +0000
@@ -383,7 +383,7 @@
   (make-local-variable 'imenu-generic-expression)
   (setq imenu-generic-expression pascal-imenu-generic-expression)
   (setq imenu-case-fold-search t)
-  (run-hooks 'pascal-mode-hook))
+  (run-mode-hooks 'pascal-mode-hook))
 
 
 
--- a/lisp/progmodes/sh-script.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/sh-script.el	Sat May 28 21:04:38 2005 +0000
@@ -1389,10 +1389,10 @@
 	   (cond ((looking-at "#![ \t]?\\([^ \t\n]*/bin/env[ \t]\\)?\\([^ \t\n]+\\)")
 		  (match-string 2))
 		 ((and buffer-file-name
-		       (string-match "\\.m?spec$" buffer-file-name))
+		       (string-match "\\.m?spec\\'" buffer-file-name))
 		  "rpm")))))
     (sh-set-shell (or interpreter sh-shell-file) nil nil))
-  (run-hooks 'sh-mode-hook))
+  (run-mode-hooks 'sh-mode-hook))
 
 ;;;###autoload
 (defalias 'shell-script-mode 'sh-mode)
@@ -2290,7 +2290,7 @@
 	(if (looking-at "[\"'`]")
 	    (sh-safe-forward-sexp)
 	  ;; (> (skip-chars-forward "^ \t\n\"'`") 0)
-	  (> (skip-chars-forward "-_a-zA-Z\$0-9") 0)
+	  (> (skip-chars-forward "-_a-zA-Z$0-9") 0)
 	  ))
     (buffer-substring start (point))
     ))
--- a/lisp/progmodes/sql.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/sql.el	Sat May 28 21:04:38 2005 +0000
@@ -2249,7 +2249,7 @@
   (setq local-abbrev-table sql-mode-abbrev-table)
   (setq abbrev-all-caps 1)
   ;; Run hook
-  (run-hooks 'sql-mode-hook)
+  (run-mode-hooks 'sql-mode-hook)
   ;; Catch changes to sql-product and highlight accordingly
   (sql-highlight-product)
   (add-hook 'hack-local-variables-hook 'sql-highlight-product t t))
@@ -2367,7 +2367,7 @@
   (make-local-variable 'sql-input-ring-separator)
   (make-local-variable 'sql-input-ring-file-name)
   ;; Run hook.
-  (run-hooks 'sql-interactive-mode-hook)
+  (run-mode-hooks 'sql-interactive-mode-hook)
   ;; Set comint based on user overrides.
   (setq comint-prompt-regexp sql-prompt-regexp)
   (setq left-margin sql-prompt-length)
--- a/lisp/progmodes/vhdl-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/vhdl-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -4622,7 +4622,7 @@
 	   (if noninteractive "" "  See menu for documentation and release notes."))
 
   ;; run hooks
-  (run-hooks 'vhdl-mode-hook))
+  (run-mode-hooks 'vhdl-mode-hook))
 
 (defun vhdl-activate-customizations ()
   "Activate all customizations on local variables."
@@ -12364,8 +12364,8 @@
 	  (save-match-data
 	    (goto-char (match-end 1))
 	    ;; move to next item
-	    (if (looking-at "\\(\\s-*,\\)")
-		(goto-char (match-end 1))
+	    (if (looking-at "\\s-*,")
+		(goto-char (match-end 0))
 	      (end-of-line) t))))
     (error t)))
 
@@ -12736,7 +12736,7 @@
 	 '(font-lock-syntactic-keywords . vhdl-font-lock-syntactic-keywords)))
   (when (fboundp 'font-lock-unset-defaults)
     (font-lock-unset-defaults))		; not implemented in XEmacs
-  (font-lock-set-defaults)
+  (font-lock-set-defaults)              ;What for?  --Stef
   (font-lock-mode nil)
   (font-lock-mode t))
 
--- a/lisp/progmodes/xscheme.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/progmodes/xscheme.el	Sat May 28 21:04:38 2005 +0000
@@ -338,7 +338,7 @@
                 (setq xscheme-previous-process-state (cons nil nil)))))))
   (scheme-interaction-mode-initialize)
   (scheme-mode-variables)
-  (run-hooks 'scheme-mode-hook 'scheme-interaction-mode-hook))
+  (run-mode-hooks 'scheme-mode-hook 'scheme-interaction-mode-hook))
 
 (defun exit-scheme-interaction-mode ()
   "Take buffer out of scheme interaction mode"
--- a/lisp/replace.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/replace.el	Sat May 28 21:04:38 2005 +0000
@@ -693,7 +693,7 @@
   (make-local-variable 'occur-revert-arguments)
   (add-hook 'change-major-mode-hook 'font-lock-defontify nil t)
   (setq next-error-function 'occur-next-error)
-  (run-hooks 'occur-mode-hook))
+  (run-mode-hooks 'occur-mode-hook))
 
 (defun occur-revert-function (ignore1 ignore2)
   "Handle `revert-buffer' for Occur mode buffers."
--- a/lisp/ruler-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/ruler-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -697,6 +697,9 @@
         (put-text-property
          i (1+ i) 'face 'ruler-mode-goal-column-face
          ruler)
+	(put-text-property
+         i (1+ i) 'mouse-face 'mode-line-highlight
+         ruler)
         (put-text-property
          i (1+ i) 'help-echo ruler-mode-goal-column-help-echo
          ruler))
@@ -706,6 +709,9 @@
         (put-text-property
          i (1+ i) 'face 'ruler-mode-comment-column-face
          ruler)
+	(put-text-property
+         i (1+ i) 'mouse-face 'mode-line-highlight
+         ruler)
         (put-text-property
          i (1+ i) 'help-echo ruler-mode-comment-column-help-echo
          ruler))
@@ -715,6 +721,9 @@
         (put-text-property
          i (1+ i) 'face 'ruler-mode-fill-column-face
          ruler)
+	(put-text-property
+         i (1+ i) 'mouse-face 'mode-line-highlight
+         ruler)
         (put-text-property
          i (1+ i) 'help-echo ruler-mode-fill-column-help-echo
          ruler))
--- a/lisp/ses.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/ses.el	Sat May 28 21:04:38 2005 +0000
@@ -1552,7 +1552,7 @@
     (setq ses--deferred-narrow 'ses-mode)
     (1value (add-hook 'post-command-hook 'ses-command-hook nil t))
     (run-with-idle-timer 0.01 nil 'ses-command-hook)
-    (run-hooks 'ses-mode-hook)))
+    (run-mode-hooks 'ses-mode-hook)))
 
 (put 'ses-mode 'mode-class 'special)
 
--- a/lisp/simple.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/simple.el	Sat May 28 21:04:38 2005 +0000
@@ -2572,7 +2572,11 @@
 If N is negative, this is a more recent kill.
 
 The sequence of kills wraps around, so that after the oldest one
-comes the newest one."
+comes the newest one.
+
+When this command inserts killed text into the buffer, it honors
+`yank-excluded-properties' and `yank-handler' as described in the
+doc string for `insert-for-yank-1', which see."
   (interactive "*p")
   (if (not (eq last-command 'yank))
       (error "Previous command was not a yank"))
@@ -2604,6 +2608,11 @@
 With just \\[universal-argument] as argument, same but put point at beginning (and mark at end).
 With argument N, reinsert the Nth most recently killed stretch of killed
 text.
+
+When this command inserts killed text into the buffer, it honors
+`yank-excluded-properties' and `yank-handler' as described in the
+doc string for `insert-for-yank-1', which see.
+
 See also the command \\[yank-pop]."
   (interactive "*P")
   (setq yank-window-start (window-start))
@@ -4757,7 +4766,7 @@
   (setq major-mode 'completion-list-mode)
   (make-local-variable 'completion-base-size)
   (setq completion-base-size nil)
-  (run-hooks 'completion-list-mode-hook))
+  (run-mode-hooks 'completion-list-mode-hook))
 
 (defun completion-list-mode-finish ()
   "Finish setup of the completions buffer.
--- a/lisp/skeleton.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/skeleton.el	Sat May 28 21:04:38 2005 +0000
@@ -557,7 +557,7 @@
 ;;      (aset map i nil)
 ;;      (aset map (+ i 128) nil)
 ;;      (setq i (1+ i))))
-;;  (run-hooks 'mirror-mode-hook))
+;;  (run-mode-hooks 'mirror-mode-hook))
 
 (provide 'skeleton)
 
--- a/lisp/speedbar.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/speedbar.el	Sat May 28 21:04:38 2005 +0000
@@ -1306,7 +1306,7 @@
       (if speedbar-track-mouse-flag
 	  (set (make-local-variable 'track-mouse) t))	;this could be messy.
       (setq auto-show-mode nil))	;no auto-show for Emacs
-    (run-hooks 'speedbar-mode-hook))
+    (run-mode-hooks 'speedbar-mode-hook))
   (speedbar-update-contents)
   speedbar-buffer)
 
--- a/lisp/startup.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/startup.el	Sat May 28 21:04:38 2005 +0000
@@ -375,11 +375,17 @@
     ;; of that dir into load-path,
     ;; Look for a leim-list.el file too.  Loading it will register
     ;; available input methods.
-    (dolist (dir load-path)
-      (let ((default-directory dir))
-	(load (expand-file-name "subdirs.el") t t t))
-      (let ((default-directory dir))
-	(load (expand-file-name "leim-list.el") t t t)))
+    (let ((tail load-path) dir)
+      (while tail
+        (setq dir (car tail))
+        (let ((default-directory dir))
+          (load (expand-file-name "subdirs.el") t t t))
+        (let ((default-directory dir))
+          (load (expand-file-name "leim-list.el") t t t))
+        ;; We don't use a dolist loop and we put this "setq-cdr" command at
+        ;; the end, because the subdirs.el files may add elements to the end
+        ;; of load-path and we want to take it into account.
+        (setq tail (cdr tail))))
     (unless (eq system-type 'vax-vms)
       ;; If the PWD environment variable isn't accurate, delete it.
       (let ((pwd (getenv "PWD")))
--- a/lisp/subr.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/subr.el	Sat May 28 21:04:38 2005 +0000
@@ -784,6 +784,12 @@
   baud-rate)
 (make-obsolete 'baud-rate "use the `baud-rate' variable instead." "before 19.15")
 
+;; These are used by VM and some old programs
+(defalias 'focus-frame 'ignore "")
+(make-obsolete 'focus-frame "it does nothing." "22.1")
+(defalias 'unfocus-frame 'ignore "")
+(make-obsolete 'unfocus-frame "it does nothing." "22.1")
+
 
 ;;;; Obsolescence declarations for variables, and aliases.
 
@@ -1452,10 +1458,6 @@
 
 ;;;; Miscellanea.
 
-;; A number of major modes set this locally.
-;; Give it a global value to avoid compiler warnings.
-(defvar font-lock-defaults nil)
-
 (defvar suspend-hook nil
   "Normal hook run by `suspend-emacs', before suspending.")
 
@@ -1863,7 +1865,7 @@
 These hooks will be executed by the first following call to
 `run-mode-hooks' that occurs outside any `delayed-mode-hooks' form.
 Only affects hooks run in the current buffer."
-  (declare (debug t))
+  (declare (debug t) (indent 0))
   `(progn
      (make-local-variable 'delay-mode-hooks)
      (let ((delay-mode-hooks t))
--- a/lisp/term.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/term.el	Sat May 28 21:04:38 2005 +0000
@@ -1102,7 +1102,7 @@
   (make-local-variable 'term-current-face)
   (make-local-variable 'term-pending-frame)
   (setq term-pending-frame nil)
-  (run-hooks 'term-mode-hook)
+  (run-mode-hooks 'term-mode-hook)
   (term-if-xemacs
    (set-buffer-menubar
     (append current-menubar (list term-terminal-menu))))
@@ -4179,7 +4179,7 @@
 ;;;   (make-local-variable 'shell-directory-stack)
 ;;;   (setq shell-directory-stack nil)
 ;;;   (add-hook 'term-input-filter-functions 'shell-directory-tracker)
-;;;   (run-hooks 'shell-mode-hook))
+;;;   (run-mode-hooks 'shell-mode-hook))
 ;;;
 ;;;
 ;;; Completion for term-mode users
--- a/lisp/terminal.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/terminal.el	Sat May 28 21:04:38 2005 +0000
@@ -1,6 +1,6 @@
 ;;; terminal.el --- terminal emulator for GNU Emacs
 
-;; Copyright (C) 1986,87,88,89,93,94 Free Software Foundation, Inc.
+;; Copyright (C) 1986, 1987, 1988, 1989, 1993, 1994 Free Software Foundation, Inc.
 
 ;; Author: Richard Mlynarik <mly@eddie.mit.edu>
 ;; Maintainer: FSF
@@ -537,7 +537,7 @@
   (setq mode-name "Terminal Edit")
   (setq mode-line-modified (default-value 'mode-line-modified))
   (setq mode-line-process nil)
-  (run-hooks 'terminal-edit-mode-hook))
+  (run-mode-hooks 'terminal-edit-mode-hook))
 
 (defun te-edit ()
   "Start editing the terminal emulator buffer with ordinary Emacs commands."
--- a/lisp/textmodes/dns-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/textmodes/dns-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -48,7 +48,8 @@
 ;;; Code:
 
 (defgroup dns-mode nil
-  "DNS master file mode configuration.")
+  "DNS master file mode configuration."
+  :group 'data)
 
 (defconst dns-mode-classes '("IN" "CS" "CH" "HS")
   "List of strings with known DNS classes.")
--- a/lisp/textmodes/org.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/textmodes/org.el	Sat May 28 21:04:38 2005 +0000
@@ -5,7 +5,7 @@
 ;; Author: Carsten Dominik <dominik at science dot uva dot nl>
 ;; Keywords: outlines, hypermedia, calendar
 ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
-;; Version: 3.08
+;; Version: 3.10
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -31,27 +31,30 @@
 ;; project planning with a fast and effective plain-text system.
 ;;
 ;; Org-mode develops organizational tasks around a NOTES file that contains
-;; information about projects as plain text.  Org-mode is implemented on
-;; top of outline-mode - ideal to keep the content of large files well
-;; structured.  It supports ToDo items, deadlines and time stamps, which
-;; magically appear in the diary listing of the Emacs calendar.  Tables are
-;; easily created with a built-in table editor.  Plain text URL-like links
-;; connect to websites, emails (VM,RMAIL,WANDERLUST), Usenet messages (Gnus),
-;; BBDB entries, and any files related to the projects.  For printing and
-;; sharing of notes, an Org-mode file (or a part of it) can be exported as
-;; a structured ASCII file, or as HTML.
+;; information about projects as plain text.  Org-mode is implemented on top
+;; of outline-mode - ideal to keep the content of large files well structured.
+;; It supports ToDo items, deadlines and time stamps, which can be extracted
+;; to create a daily/weekly agenda that also integrates the diary of the Emacs
+;; calendar.  Tables are easily created with a built-in table editor.  Plain
+;; text URL-like links connect to websites, emails (VM, RMAIL, WANDERLUST),
+;; Usenet messages (Gnus), BBDB entries, and any files related to the
+;; projects.  For printing and sharing of notes, an Org-mode file (or a part
+;; of it) can be exported as a structured ASCII file, or as HTML.
 ;;
 ;; Installation
 ;; ------------
-;; The instruction below assume that you have downloaded Org-mode from the
-;; web.  If Org-mode is part of the Emacs distribution or an XEmacs package,
-;; you only need to add to .emacs the last three lines of Lisp code listed
-;; below, i.e. the `auto-mode-alist' modification and the global key bindings.
+;; If Org-mode is part of the Emacs distribution or an XEmacs package, you
+;; only need to copy the following lines to your .emacs file.  The last two
+;; lines define *global* keys for the commands `org-store-link' and
+;; `org-agenda' - please choose suitable keys yourself.
 ;;
-;; Byte-compile org.el and put it on your load path.  Then copy the
-;; following lines into .emacs.  The last two lines define *global*
-;; keys for the commands `org-store-link' and `org-agenda' - please
-;; choose suitable keys yourself.
+;;    (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
+;;    (define-key global-map "\C-cl" 'org-store-link)
+;;    (define-key global-map "\C-ca" 'org-agenda)
+;;
+;; If you have downloaded Org-mode from the Web, you must byte-compile
+;; org.el and put it on your load path.  In addition to the Emacs Lisp
+;; lines above, you also need to add the following lines to .emacs:
 ;;
 ;;    (autoload 'org-mode "org" "Org mode" t)
 ;;    (autoload 'org-diary "org" "Diary entries from Org mode")
@@ -59,12 +62,9 @@
 ;;    (autoload 'org-store-link "org" "Store a link to the current location" t)
 ;;    (autoload 'orgtbl-mode "org" "Org tables as a minor mode" t)
 ;;    (autoload 'turn-on-orgtbl "org" "Org tables as a minor mode")
-;;    (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
-;;    (define-key global-map "\C-cl" 'org-store-link)
-;;    (define-key global-map "\C-ca" 'org-agenda)
 ;;
-;; This will put all files with extension ".org" into Org-mode.  As an
-;; alternative, make the first line of a file look like this:
+;; This setup will put all files with extension ".org" into Org-mode.  As
+;; an alternative, make the first line of a file look like this:
 ;;
 ;;     MY PROJECTS    -*- mode: org; -*-
 ;;
@@ -73,12 +73,21 @@
 ;;
 ;; Documentation
 ;; -------------
-;; The documentation of Org-mode can be found in the TeXInfo file.
-;; The distribution also contains a PDF version of it.  At the homepage
-;; of Org-mode, you can read the same text online as HTML.
+;; The documentation of Org-mode can be found in the TeXInfo file.  The
+;; distribution also contains a PDF version of it.  At the homepage of
+;; Org-mode, you can read the same text online as HTML.  There is also an
+;; excellent reference card made by Philip Rooke.
 ;;
 ;; Changes:
 ;; -------
+;; Version 3.10
+;;    - Using `define-derived-mode' to derive `org-mode' from `outline-mode'.
+;;
+;; Version 3.09
+;;    - Time-of-day specifications in agenda are extracted and placed
+;;      into the prefix.  Timed entries can be placed into a time grid for
+;;      day.
+;;
 ;; Version 3.08
 ;;    - "|" no longer allowed as part of a link, to allow links in tables.
 ;;    - The prefix of items in the agenda buffer can be configured.
@@ -136,7 +145,7 @@
 ;;      warnings about upcoming deadlines/overdue scheduled items.
 ;;      That functionality is now limited to the (multifile) agenda.
 ;;    - When reading a date, the calendar can be manipulated with keys.
-;;    - Link support for RMAIL and Wanderlust (from planner.el, untested)
+;;    - Link support for RMAIL and Wanderlust (from planner.el, untested).
 ;;    - Minor bug fixes and documentation improvements.
 
 ;;; Code:
@@ -145,19 +154,20 @@
 (require 'outline)
 (require 'time-date)
 (require 'easymenu)
+(or (fboundp 'run-mode-hooks)
+    (defalias 'run-mode-hooks 'run-hooks))
 
 ;;; Customization variables
 
-(defvar org-version "3.08"
+(defvar org-version "3.10"
   "The version number of the file org.el.")
 (defun org-version ()
   (interactive)
   (message "Org-mode version %s" org-version))
 
-;; The following two constants are for compatibility with different 
-;; Emacs versions (Emacs versus XEmacs) and with different versions of
-;; outline.el.  All the compatibility code in org.el is based on these two
-;; constants.
+;; The following two constants are for compatibility with different Emacs
+;; versions (Emacs versus XEmacs) and with different versions of outline.el.
+;; The compatibility code in org.el is based on these two constants.
 (defconst org-xemacs-p (featurep 'xemacs)
   "Are we running xemacs?")
 (defconst org-noutline-p (featurep 'noutline)
@@ -367,7 +377,11 @@
 
    -*- mode: org; org-category: \"ELisp\"
 
-If the file does not specify a category, the file's base name
+or contain a special line
+
+#+CATEGORY: ELisp
+
+If the file does not specify a category, then file's base name
 is used instead.")
 
 (defun org-set-regexps-and-options ()
@@ -570,7 +584,7 @@
 the sequence given in `org-agenda-files'.  Within each category sort by
 priority.
 
-Leaving out the `category-keep' would mean that items will be sorted across
+Leaving out `category-keep' would mean that items will be sorted across
 categories by priority."
   :group 'org-agenda
   :type '(repeat 
@@ -583,7 +597,7 @@
            (const priority-up)
            (const priority-down))))
 
-(defcustom org-agenda-prefix-format "  %-12:c% s"
+(defcustom org-agenda-prefix-format "  %-12:c%?-12t% s"
   "Format specification for the prefix of items in the agenda buffer.
 This format works similar to a printf format, with the following meaning:
 
@@ -593,22 +607,39 @@
        format HH:MM
   %s   Scheduling/Deadline information, a short string
 
-In addition to the normal printf field modifiers like field width and
-padding instructions, in this format you can also add an additional
-punctuation or whitespace character just before the final format letter.
-This character will be appended to the field value if the value is not
-empty.  For example, the format \"%-12:c\" leads to \"Diary:    \" if
-the category is \"Diary\".  If the category were be empty, no additional
-colon would be interted.
-
-Including `%t' in the format string leads to a double time specification
-because the headline/diary item will contain the time specification as
-well.  However, using `%t' in the format will result in a canonical 24
-hour time specification at a consistent position in the prefix, while the
-time specification in the headline/diary item may be at any position and in
-various formats.
-Example:
-  (setq org-agenda-prefix-format \"  %-12:c% t% s\")"
+All specifiers work basically like the standard `%s' of printf, but may
+contain two additional characters:  A question mark just after the `%' and
+a whitespace/punctuation character just before the final letter.
+
+If the first character after `%' is a question mark, the entire field
+will only be included if the corresponding value applies to the
+current entry.  This is useful for fields which should have fixed
+width when present, but zero width when absent.  For example,
+\"%?-12t\" will result in a 12 character time field if a time of the
+day is specified, but will completely disappear in entries which do
+not contain a time.
+
+If there is punctuation or whitespace character just before the final
+format letter, this character will be appended to the field value if
+the value is not empty.  For example, the format \"%-12:c\" leads to
+\"Diary: \" if the category is \"Diary\".  If the category were be
+empty, no additional colon would be interted.
+
+The default value of this option is \"  %-12:c%?-12t% s\", meaning:
+- Indent the line with two space characters
+- Give the category in a 12 chars wide field, padded with whitespace on
+  the right (because of `-').  Append a colon if there is a category
+  (because of `:').
+- If there is a time-of-day, put it into a 12 chars wide field.  If no
+  time, don't put in an empty field, just skip it (because of '?').
+- Finally, put the scheduling information and append a whitespace.
+
+As another example, if you don't want the time-of-day of entries in
+the prefix, you could use:
+
+  (setq org-agenda-prefix-format \"  %-11:c% s\")
+
+See also the variable `org-agenda-remove-times-when-in-prefix'."
   :type 'string
   :group 'org-agenda)
 
@@ -618,13 +649,64 @@
   :group 'org-agenda)
 
 (defvar org-prefix-format-compiled nil
-  "The compiled version of `org-???-prefix-format'.")
+  "The compiled version of the most recently used prefix format.
+Depending on which command was used last, this may be the compiled version
+of `org-agenda-prefix-format' or `org-timeline-prefix-format'.")
+
+(defcustom org-agenda-use-time-grid t
+  "Non-nil means, show a time grid in the agenda schedule.
+A time grid is a set of lines for specific times (like every two hours between
+8:00 and 20:00.  The items scheduled for a day at specific times are
+sorted in between these lines.
+For deails about when the grid will be shown, and what it will look like, see
+the variable `org-agenda-time-grid'."
+  :group 'org-agenda
+  :type 'boolean)
+
+(defcustom org-agenda-time-grid 
+  '((daily today require-timed)
+    "----------------"
+    (800 1000 1200 1400 1600 1800 2000))
+
+  "FIXME: document"
+  :group 'org-agenda
+  :type 
+  '(list
+    (set :greedy t :tag "Grid Display Options"
+         (const :tag "Show grid in single day agenda display" daily)
+         (const :tag "Show grid in weekly agenda display" weekly)
+         (const :tag "Always show grid for today" today)
+         (const :tag "Show grid only if any timed entries are present"
+                require-timed)
+         (const :tag "Skip grid times already present in an entry"
+                remove-match))
+    (string :tag "Grid String")
+    (repeat :tag "Grid Times" (integer :tag "Time"))))
+
+(defcustom org-agenda-remove-times-when-in-prefix t
+  "Non-nil means, remove duplicate time specifications in agenda items.
+When the format `org-agenda-prefix-format' contains a `%t' specifier, a
+time-of-day specification in a headline or diary entry is extracted and
+placed into the prefix.  If this option is non-nil, the original specification
+\(a timestamp or -range, or just a plain time(range) specification like
+11:30-4pm) will be removed for agenda display.  This makes the agenda less
+cluttered.
+The option can be t or nil.  It may also be the symbol `beg', indicating
+that the time should only be removed what it is located at the beginning of
+the headline/diary entry."
+  :group 'org-agenda
+  :type '(choice
+          (const :tag "Always" t)
+          (const :tag "Never" nil)
+          (const :tag "When at beginning of entry" beg)))
 
 (defcustom org-sort-agenda-notime-is-late t
   "Non-nil means, items without time are considered late.
 This is only relevant for sorting.  When t, items which have no explicit
 time like 15:30 will be considered as 24:01, i.e. later than any items which
-do have a time.  When nil, the default time is before 0:00."
+do have a time.  When nil, the default time is before 0:00.  You can use this
+option to decide if the schedule for today should come before or after timeless
+agenda entries."
   :group 'org-agenda
   :type 'boolean)
 
@@ -1370,6 +1452,14 @@
   "Face used for tables."
   :group 'org-faces)
 
+(defface org-time-grid-face ;; font-lock-variable-name-face
+  '((((type tty) (class color)) (:foreground "yellow" :weight light))
+    (((class color) (background light)) (:foreground "DarkGoldenrod"))
+    (((class color) (background dark)) (:foreground "LightGoldenrod"))
+    (t (:bold t :italic t)))
+  "Face used for level 2 headlines."
+  :group 'org-faces)
+
 (defvar org-level-faces
   '(
     org-level-1-face
@@ -1444,7 +1534,7 @@
 
 
 ;;;###autoload
-(defun org-mode (&optional arg)
+(define-derived-mode org-mode outline-mode "Org"
   "Outline-based notes management and organizer, alias 
 \"Carstens outline-mode for keeping track of everything.\"
 
@@ -1457,16 +1547,11 @@
 Plain text URL-like links connect to websites, emails (VM), Usenet
 messages (Gnus), BBDB entries, and any files related to the project.
 For printing and sharing of notes, an Org-mode file (or a part of it)
-can be exported as a well-structured ASCII or HTML file.
+can be exported as a structured ASCII or HTML file.
 
 The following commands are available:
 
 \\{org-mode-map}"
-  (interactive "P")
-  (outline-mode)
-  (setq major-mode 'org-mode)
-  (setq mode-name "Org")
-  (use-local-map org-mode-map)
   (easy-menu-add org-org-menu)
   (org-install-agenda-files-menu)
   (setq outline-regexp "\\*+")
@@ -1488,15 +1573,10 @@
                     (if org-enable-table-editor "|" "")
                    (if org-enable-fixed-width-editor ":"  "")
                    "]"))))
-  ;; Hook, and startup actions
-  (if (or arg
-          (and org-insert-mode-line-in-empty-file
-               (interactive-p)
-               (= (point-min) (point-max))))
-      (save-excursion
-        (goto-char (point-min))
-        (insert "    -*- mode: org -*-\n\n")))
-  (run-hooks 'org-mode-hook)       ;FIXME: Should be run-mode-hooks.
+  (if (and org-insert-mode-line-in-empty-file
+           (interactive-p)
+           (= (point-min) (point-max)))
+      (insert "    -*- mode: org -*-\n\n"))
   (unless org-inhibit-startup
     (if org-startup-with-deadline-check
         (call-interactively 'org-check-deadlines)
@@ -1560,12 +1640,11 @@
                                    'keymap org-mouse-map))
         t)))
 
-
 (defun org-font-lock-level ()
   (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 ()
@@ -2844,13 +2923,17 @@
 (defun org-time-string-to-time (s)
   (apply 'encode-time (org-parse-time-string s)))
 
-(defun org-parse-time-string (s)
+(defun org-parse-time-string (s &optional nodefault)
   "Parse the standard Org-mode time string.
-This should be a lot faster than the normal `parse-time-string'."
+This should be a lot faster than the normal `parse-time-string'.
+If time is not given, defaults to 0:00.  However, with optional NODEFAULT,
+hour and minute fields will be nil if not given."
   (if (string-match org-ts-regexp1 s)
       (list 0
-            (string-to-number (or (match-string 8 s) "0"))
-            (string-to-number (or (match-string 7 s) "0"))
+            (if (or (match-beginning 8) (not nodefault))
+                (string-to-number (or (match-string 8 s) "0")))
+            (if (or (match-beginning 7) (not nodefault))
+                (string-to-number (or (match-string 7 s) "0")))
             (string-to-number (match-string 4 s))
             (string-to-number (match-string 3 s))
             (string-to-number (match-string 2 s))
@@ -3035,7 +3118,7 @@
      "--")
    (mapcar 'org-file-menu-entry org-agenda-files)))
   (org-agenda-set-mode-name)
-  (run-hooks 'org-agenda-mode-hook))
+  (run-mode-hooks 'org-agenda-mode-hook))
 
 (define-key org-agenda-mode-map [(tab)] 'org-agenda-goto)
 (define-key org-agenda-mode-map [(return)] 'org-agenda-switch-to)
@@ -3056,6 +3139,7 @@
 
 (define-key org-agenda-mode-map "f" 'org-agenda-follow-mode)
 (define-key org-agenda-mode-map "d" 'org-agenda-toggle-diary)
+(define-key org-agenda-mode-map "g" 'org-agenda-toggle-time-grid)
 (define-key org-agenda-mode-map "r" 'org-agenda-redo)
 (define-key org-agenda-mode-map "q" 'org-agenda-quit)
 (define-key org-agenda-mode-map "x" 'org-agenda-exit)
@@ -3115,7 +3199,7 @@
      ["Decrease Priority" org-agenda-priority-down t]
      ["Show Priority" org-agenda-show-priority t])
     "--"
-    ["Rebuild" org-agenda-redo t]
+    ["Rebuild buffer" org-agenda-redo t]
     ["Goto Today" org-agenda-goto-today t]
     ["Next Dates" org-agenda-later (local-variable-p 'starting-day)]
     ["Previous Dates" org-agenda-earlier (local-variable-p 'starting-day)]
@@ -3124,6 +3208,8 @@
      (local-variable-p 'starting-day)]
     ["Include Diary" org-agenda-toggle-diary
      :style toggle :selected org-agenda-include-diary :active t]
+    ["Use Time Grid" org-agenda-toggle-time-grid
+     :style toggle :selected org-agenda-use-time-grid :active t]
     "--"
     ["New Diary Entry" org-agenda-diary-entry t]
     ("Calendar Commands"
@@ -3294,11 +3380,13 @@
                          (d (- nt n1)))
                     (- sd (+ (if (< d 0) 7 0) d)))))
          (day-numbers (list start))
-         s e rtn rtnall file date d start-pos end-pos)
+         (inhibit-redisplay t)
+         s e rtn rtnall file date d start-pos end-pos todayp nd)
     (setq org-agenda-redo-command 
           (list 'org-agenda include-all start-day ndays))
     ;; Make the list of days
-    (setq ndays (or ndays org-agenda-ndays))
+    (setq ndays (or ndays org-agenda-ndays)
+          nd ndays)
     (while (> ndays 1)
       (push (1+ (car day-numbers)) day-numbers)
       (setq ndays (1- ndays)))
@@ -3324,11 +3412,15 @@
                 rtn (org-agenda-get-day-entries
                      file date :todo))
           (setq rtnall (append rtnall rtn))))
-      (if rtnall (insert (org-finalize-agenda-entries rtnall) "\n")))
+      (when rtnall 
+        (insert "ALL CURRENTLY OPEN TODO ITEMS:\n")
+        (add-text-properties (point-min) (1- (point))
+                             (list 'face 'org-link-face))
+        (insert (org-finalize-agenda-entries rtnall) "\n")))
     (while (setq d (pop day-numbers))
       (setq date (calendar-gregorian-from-absolute d)
             s (point))
-      (if (or (= d today)
+      (if (or (setq todayp (= d today))
               (and (not start-pos) (= d sd)))
           (setq start-pos (point))
         (if (and start-pos (not end-pos))
@@ -3347,14 +3439,18 @@
             (setq rtnall (append rtnall rtn))))
       (if (or rtnall org-agenda-show-all-dates)
           (progn
-            (insert (format "%-9s %2d %-9s %4d\n"
+            (insert (format "%-9s %2d %s %4d\n"
                             (calendar-day-name date)
                             (extract-calendar-day date)
                             (calendar-month-name (extract-calendar-month date))
                             (extract-calendar-year date)))
             (put-text-property s (1- (point)) 'face
                                'org-link-face)
-            (if rtnall (insert (org-finalize-agenda-entries rtnall) "\n"))
+            (if rtnall (insert 
+                        (org-finalize-agenda-entries ;; FIXME: condition needed
+                         (org-agenda-add-time-grid-maybe
+                          rtnall nd todayp))
+                        "\n"))
             (put-text-property s (1- (point)) 'day d))))            
     (goto-char (point-min))
     (setq buffer-read-only t)
@@ -3502,6 +3598,15 @@
   (message "Diary inclusion turned %s"
            (if org-agenda-include-diary "on" "off")))
 
+(defun org-agenda-toggle-time-grid ()
+  "Toggle follow mode in an agenda buffer."
+  (interactive)
+  (setq org-agenda-use-time-grid (not org-agenda-use-time-grid))
+  (org-agenda-redo)
+  (org-agenda-set-mode-name)
+  (message "Time-grid turned %s"
+           (if org-agenda-use-time-grid "on" "off")))
+
 (defun org-agenda-set-mode-name ()
   "Set the mode name to indicate all the small mode settings."
   (setq mode-name
@@ -3509,7 +3614,8 @@
                 (if (equal org-agenda-ndays 1) " Day"    "")
                 (if (equal org-agenda-ndays 7) " Week"   "")
                 (if org-agenda-follow-mode     " Follow" "")
-                (if org-agenda-include-diary   " Diary"  "")))
+                (if org-agenda-include-diary   " Diary"  "")
+                (if org-agenda-use-time-grid   " Grid"   "")))
   (force-mode-line-update))
 
 (defun org-agenda-post-command-hook ()
@@ -3524,7 +3630,7 @@
   "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
          (org-disable-diary t))
@@ -3551,7 +3657,7 @@
       (setq entries 
             (mapcar 
              (lambda (x)
-               (setq x (org-format-agenda-item "" x "Diary"))
+               (setq x (org-format-agenda-item "" x "Diary" 'time))
                ;; Extend the text properties to the beginning of the line
                (add-text-properties 
                 0 (length x)
@@ -3764,7 +3870,7 @@
          arg results rtn)
     (if (not buffer)
         ;; If file does not exist, make sure an error message ends up in diary
-        (format "ORG-AGENDA-ERROR: No such org-file %s" file)
+        (list (format "ORG-AGENDA-ERROR: No such org-file %s" file))
       (with-current-buffer buffer
         (unless (eq major-mode 'org-mode)
           (error "Agenda file %s is not in `org-mode'" file))
@@ -3796,8 +3902,8 @@
                  ((and (eq arg :deadline)
                        (equal date (calendar-current-date)))
                   (setq rtn (org-agenda-get-deadlines))
-                  (setq results (append results rtn))))))))))
-    results))
+                  (setq results (append results rtn))))))))
+        results))))
 
 (defun org-entry-is-done-p ()
   "Is the current entry marked DONE?"
@@ -3876,7 +3982,7 @@
                            (list 0 0 0 (nth 1 date) (car date) (nth 2 date))))
                    0 11)))
          marker hdmarker deadlinep scheduledp donep tmp priority
-         ee txt)
+         ee txt timestr)
     (goto-char (point-min))
     (while (re-search-forward regexp nil t)
       (if (not (save-match-data (org-at-date-range-p)))
@@ -3886,9 +3992,13 @@
                                              (- (match-beginning 0)
                                                 org-ds-keyword-length))
                                         (match-beginning 0))
+                  timestr (buffer-substring (match-beginning 0) (point-at-eol))
                   deadlinep (string-match org-deadline-regexp tmp)
                   scheduledp (string-match org-scheduled-regexp tmp)
                   donep (org-entry-is-done-p))
+            (if (string-match ">" timestr)
+                ;; substring should only run to end of time stamp
+                (setq timestr (substring timestr 0 (match-end 0))))
             (save-excursion
               (if (re-search-backward "\\(^\\|\r\\)\\*+" nil t)
                   (progn
@@ -3899,7 +4009,7 @@
                                (format "%s%s"
                                        (if deadlinep  "Deadline:  " "")
                                        (if scheduledp "Scheduled: " ""))
-                               (match-string 1))))
+                               (match-string 1) nil timestr)))
                 (setq txt org-agenda-no-heading-message))
               (setq priority (org-get-priority txt))
               (add-text-properties
@@ -4044,10 +4154,11 @@
                               (abbreviate-file-name (buffer-file-name)))))
          (regexp org-tr-regexp)
          (d0 (calendar-absolute-from-gregorian date))
-         marker hdmarker ee txt d1 d2 s1 s2)
+         marker hdmarker ee txt d1 d2 s1 s2 timestr)
     (goto-char (point-min))
     (while (re-search-forward regexp nil t)
-      (setq s1 (match-string 1)
+      (setq timestr (match-string 0)
+            s1 (match-string 1)
             s2 (match-string 2)
             d1 (time-to-days (org-time-string-to-time s1))
             d2 (time-to-days (org-time-string-to-time s2)))
@@ -4062,9 +4173,9 @@
                   (goto-char (match-end 1))
                   (looking-at "\\*+[ \t]*\\([^\r\n]+\\)")
                   (setq txt (org-format-agenda-item 
-                             (format "(%d/%d): "
+                             (format (if (= d1 d2) "" "(%d/%d): ")
                                      (1+ (- d0 d1)) (1+ (- d2 d1)))
-                             (match-string 1))))
+                             (match-string 1) nil (if (= d0 d1) timestr))))
               (setq txt org-agenda-no-heading-message))
             (add-text-properties
              0 (length txt) (append (list 'org-marker marker
@@ -4077,66 +4188,187 @@
     ;; Sort the entries by expiration date.
     (nreverse ee)))
 
-(defun org-format-agenda-item (prefix txt &optional category)
+
+
+(defconst org-plain-time-of-day-regexp
+  (concat
+   "\\(\\<[012]?[0-9]"
+   "\\(\\(:\\([0-5][0-9]\\([AaPp][Mm]\\)?\\)\\)\\|\\([AaPp][Mm]\\)\\)\\>\\)"
+   "\\(--?"
+   "\\(\\<[012]?[0-9]"
+   "\\(\\(:\\([0-5][0-9]\\([AaPp][Mm]\\)?\\)\\)\\|\\([AaPp][Mm]\\)\\)\\>\\)"
+   "\\)?")
+  "Regular expression to match a plain time or time range.
+Examples:  11:45 or 8am-13:15 or 2:45-2:45pm.  After a match, the following
+groups carry important information:
+0  the full match
+1  the first time, range or not
+8  the second time, if it is a range.")
+
+(defconst org-stamp-time-of-day-regexp
+  (concat
+   "<\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} +[a-zA-Z]+ +\\)"
+   "\\([012][0-9]:[0-5][0-9]\\)>"
+   "\\(--?"
+   "<\\1\\([012][0-9]:[0-5][0-9]\\)>\\)?")
+  "Regular expression to match a timestamp time or time range.
+After a match, the following groups carry important information:
+0  the full match
+1  date plus weekday, for backreferencing to make sure both times on same day
+2  the first time, range or not
+4  the second time, if it is a range.")
+
+(defvar org-prefix-has-time nil
+  "A flag, set by `org-compile-prefix-format'.
+The flag is set if the currently compiled format contains a `%t'.")
+
+(defun org-format-agenda-item (extra txt &optional category dotime noprefix)
   "Format TXT to be inserted into the agenda buffer.
-In particular, this indents the line and adds a category."
-  (let* ((category (or category
-                       org-category
-                       (file-name-sans-extension
-                        (file-name-nondirectory (buffer-file-name)))))
-         (extra prefix)
-         (time-of-day (org-get-time-of-day txt))
-         (t1 (if time-of-day (concat "0" (int-to-string time-of-day)) "0000"))
-         (time (if time-of-day
-                   (concat (substring t1 -4 -2)
-                           ":" (substring t1 -2))
-                 ""))
-         rtn)
-    (if (symbolp category) (setq category (symbol-name category)))
-    (setq rtn (concat (eval org-prefix-format-compiled) txt))
-    (add-text-properties
-     0 (length rtn) (list 'category (downcase category)
-                          'prefix-length (- (length rtn) (length txt))
-                          'time-of-day time-of-day)
-     rtn)
-    rtn))
-  
+In particular, it adds the prefix and corresponding text properties.  EXTRA
+must be a string and replaces the `%s' specifier in the prefix format.
+CATEGORY (string, symbol or nil) may be used to overule the default
+category taken from local variable or file name. It will replace the `%c'
+specifier in the format.  DOTIME, when non-nil, indicates that a
+time-of-day should be extracted from TXT for sorting of this entry, and for
+the `%t' specifier in the format.  When DOTIME is a string, this string is
+searched for a time before TXT is.  NOPREFIX is a flag and indicates that
+only the correctly processes TXT should be returned - this is used by
+`org-agenda-change-all-lines'."
+  (save-match-data
+    ;; Diary entries sometimes have extra whitespace at the beginning
+    (if (string-match "^ +" txt) (setq txt (replace-match "" nil nil txt)))
+    (let* ((category (or category
+                         org-category
+                         (if (buffer-file-name)
+                             (file-name-sans-extension
+                              (file-name-nondirectory (buffer-file-name)))
+                           "")))
+           time              ;; needed for the eval of the prefix format
+           (ts (if dotime (concat (if (stringp dotime) dotime "") txt)))
+           (time-of-day (and dotime (org-get-time-of-day ts)))
+           stamp plain s0 s1 s2 rtn)
+      (when (and dotime time-of-day org-prefix-has-time)
+        ;; Extract starting and ending time and move them to prefix
+        (when (or (setq stamp (string-match org-stamp-time-of-day-regexp ts))
+                  (setq plain (string-match org-plain-time-of-day-regexp ts)))
+          (setq s0 (match-string 0 ts)
+                s1 (match-string (if plain 1 2) ts)
+                s2 (match-string (if plain 8 4) ts))
+          
+          ;; If the times are in TXT (not in DOTIMES), and the prefix will list
+          ;; them, we might want to remove them there to avoid duplication.
+          ;; The user can turn this off with a variable.
+          (if (and org-agenda-remove-times-when-in-prefix (or stamp plain)
+                   (string-match (concat (regexp-quote s0) " *") txt)
+                   (if (eq org-agenda-remove-times-when-in-prefix 'beg)
+                       (= (match-beginning 0) 0)
+                     t))
+              (setq txt (replace-match "" nil nil txt))))
+        ;; Normalize the time(s) to 24 hour
+        (if s1 (setq s1 (org-get-time-of-day s1 'string)))
+        (if s2 (setq s2 (org-get-time-of-day s2 'string))))
+      
+      ;; Create the final string
+      (if noprefix
+          (setq rtn txt)
+        ;; Prepare the variables needed in the eval of the compiled format
+        (setq time (cond (s2 (concat s1 "-" s2))
+                         (s1 (concat s1 "......"))
+                         (t ""))
+              extra (or extra "")
+              category (if (symbolp category) (symbol-name category) category))
+        ;; Evaluate the compiled format
+        (setq rtn (concat (eval org-prefix-format-compiled) txt)))
+      
+      ;; And finally add the text properties
+      (add-text-properties
+       0 (length rtn) (list 'category (downcase category)
+                            'prefix-length (- (length rtn) (length txt))
+                            'time-of-day time-of-day
+                            'dotime dotime)
+       rtn)
+      rtn)))
+
+(defun org-agenda-add-time-grid-maybe (list ndays todayp)
+  (catch 'exit
+    (cond ((not org-agenda-use-time-grid) (throw 'exit list))
+          ((and todayp (member 'today (car org-agenda-time-grid))))
+          ((and (= ndays 1) (member 'daily (car org-agenda-time-grid))))
+          ((member 'weekly (car org-agenda-time-grid)))
+          (t (throw 'exit list)))
+    (let* ((have (delq nil (mapcar
+                            (lambda (x) (get-text-property 1 'time-of-day x))
+                            list)))
+           (string (nth 1 org-agenda-time-grid))
+           (gridtimes (nth 2 org-agenda-time-grid))
+           (req (car org-agenda-time-grid))
+           (remove (member 'remove-match req))
+           new time)
+      (if (and (member 'require-timed req) (not have))
+          ;; don't show empty grid
+          (throw 'exit list))
+      (while (setq time (pop gridtimes))
+        (unless (and remove (member time have))
+          (setq time (int-to-string time))
+          (push (org-format-agenda-item 
+                 nil string "" ;; FIXME: put a category?
+                 (concat (substring time 0 -2) ":" (substring time -2)))
+                new)
+          (put-text-property 
+           1 (length (car new)) 'face 'org-time-grid-face (car new))))
+      (if (member 'time-up org-agenda-sorting-strategy)
+          (append new list)
+        (append list new)))))
+
 (defun org-compile-prefix-format (format)
   "Compile the prefix format into a Lisp form that can be evaluated.
 The resulting form is returned and stored in the variable
 `org-prefix-format-compiled'."
-  (let ((start 0) varform vars (s format) c)
-    (while (string-match "%\\([-+]?[0-9.]*\\)\\([ .;,:!?=|/<>]?\\)\\([cts]\\)"
+  (setq org-prefix-has-time nil)
+  (let ((start 0) varform vars var (s format) c f opt)
+    (while (string-match "%\\(\\?\\)?\\([-+]?[0-9.]*\\)\\([ .;,:!?=|/<>]?\\)\\([cts]\\)"
                          s start)
-      (setq var (cdr (assoc (match-string 3 s)
+      (setq var (cdr (assoc (match-string 4 s)
                             '(("c" . category) ("t" . time) ("s" . extra))))
-            c (match-string 2 s)
+            c (or (match-string 3 s) "")
+            opt (match-beginning 1)
             start (1+ (match-beginning 0)))
-      (if (= (length c) 1)
-          (setq varform `(if (equal "" ,var) "" (concat ,var ,c)))
-        (setq varform var))
-      (setq s (replace-match "%\\1s" t nil s))
+      (if (equal var 'time) (setq org-prefix-has-time t))
+      (setq f (concat "%" (match-string 2 s) "s"))
+      (if opt
+          (setq varform
+                `(if (equal "" ,var)
+                     ""
+                   (format ,f (if (equal "" ,var) "" (concat ,var ,c)))))
+        (setq varform `(format ,f (if (equal ,var "") "" (concat ,var ,c)))))
+      (setq s (replace-match "%s" t nil s))
       (push varform vars))
     (setq vars (nreverse vars))
     (setq org-prefix-format-compiled `(format ,s ,@vars))))
 
-(defun org-get-time-of-day (s)
+(defun org-get-time-of-day (s &optional string)
   "Check string S for a time of day.
 If found, return it as a military time number between 0 and 2400.
-If not found, return nil."
+If not found, return nil.
+The optional STRING argument forces conversion into a 5 character wide string
+HH:MM."
   (save-match-data
-    (when (or
-           (string-match
-            "\\<\\([012]?[0-9]\\)\\(:\\([0-5][0-9]\\)\\)\\([AaPp][Mm]\\)?\\>" s)
-           (string-match
-            "\\<\\([012]?[0-9]\\)\\(:\\([0-5][0-9]\\)\\)?\\([AaPp][Mm]\\)\\>" s))
-      (+ (* 100 (+ (string-to-number (match-string 1 s))
-                   (if (and (match-beginning 4)
-                            (equal (downcase (match-string 4 s)) "pm"))
-                       12 0)))
-         (if (match-beginning 3)
-             (string-to-number (match-string 3 s))
-           0)))))
+    (when 
+     (or
+      (string-match
+       "\\<\\([012]?[0-9]\\)\\(:\\([0-5][0-9]\\)\\)\\([AaPp][Mm]\\)?\\> *" s)
+      (string-match
+       "\\<\\([012]?[0-9]\\)\\(:\\([0-5][0-9]\\)\\)?\\([AaPp][Mm]\\)\\> *" s))
+     (let* ((t0 (+ (* 100
+                      (+ (string-to-number (match-string 1 s))
+                         (if (and (match-beginning 4)
+                                  (equal (downcase (match-string 4 s)) "pm"))
+                             12 0)))
+                   (if (match-beginning 3)
+                       (string-to-number (match-string 3 s))
+                     0)))
+            (t1 (concat " " (int-to-string t0))))
+       (if string (concat (substring t1 -4 -2) ":" (substring t1 -2)) t0)))))
 
 (defun org-finalize-agenda-entries (list)
   "Sort and concatenate the agenda items."
@@ -4295,23 +4527,30 @@
 
 (defun org-agenda-change-all-lines (newhead hdmarker &optional fixface)
   "Change all lines in the agenda buffer which match hdmarker.
-The new content of the line will be NEWHEAD.  HDMARKER is checked with
-`equal' against all `org-hd-marker' text properties in the file."
-  (let* (props m pl undone-face done-face)
+The new content of the line will be NEWHEAD (as modified by
+`org-format-agenda-item').  HDMARKER is checked with
+`equal' against all `org-hd-marker' text properties in the file.
+If FIXFACE is non-nil, the face of each item is modified acording to
+the new TODO state."
+  (let* (props m pl undone-face done-face finish new dotime)
+;    (setq newhead (org-format-agenda-item "x" newhead "x" nil 'noprefix))
     (save-excursion
       (goto-char (point-max))
       (beginning-of-line 1)
-      (while (not (bobp))
+      (while (not finish)
+        (setq finish (bobp))
         (when (and (setq m (get-text-property (point) 'org-hd-marker))
                    (equal m hdmarker))
           (setq props (text-properties-at (point))
+                dotime (get-text-property (point) 'dotime)
+                new (org-format-agenda-item "x" newhead "x" dotime 'noprefix)
                 pl (get-text-property (point) 'prefix-length)
                 undone-face (get-text-property (point) 'undone-face)
                 done-face (get-text-property (point) 'done-face))
           (move-to-column pl)
           (if (looking-at ".*")
               (progn
-                (replace-match newhead t t)
+                (replace-match new t t)
                 (beginning-of-line 1)
                 (add-text-properties (point-at-bol) (point-at-eol) props)
                 (if fixface
@@ -4355,6 +4594,7 @@
         (and (outline-next-heading)
              (org-flag-heading nil)))   ; show the next heading
       (funcall 'org-priority force-direction)
+      (end-of-line 1)
       (setq newhead (org-get-heading)))
     (org-agenda-change-all-lines newhead hdmarker)
     (beginning-of-line 1)))
@@ -4519,7 +4759,7 @@
              "ISO:        " (calendar-iso-date-string date) "\n"
              "Day of Yr:  " (calendar-day-of-year-string date) "\n"
              "Julian:     " (calendar-julian-date-string date) "\n"
-             "Astronomic: " (calendar-astro-date-string date)
+             "Astron. JD: " (calendar-astro-date-string date)
              " (Julian date number at noon UTC)\n"
              "Hebrew:     " (calendar-hebrew-date-string date) " (until sunset)\n"
              "Islamic:    " (calendar-islamic-date-string date) " (until sunset)\n"
@@ -4865,10 +5105,11 @@
                          ((fboundp 'gnus-group-name)
                           (gnus-group-name))
                          (t "???"))))
-        (setq link (concat (if (org-xor arg org-usenet-links-prefer-google)
-                               "http://groups.google.com/groups?group="
-                             "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))
@@ -4919,9 +5160,7 @@
 
 (defun org-xor (a b)
   "Exclusive or."
-  ;; (if a (not b) b)
-  (or (and a (not b))
-      (and b (not a))))
+  (if a (not b) b))
 
 (defun org-get-header (header)
   "Find a header field in the current buffer."
@@ -5217,7 +5456,8 @@
                                   (point-at-bol) (point)))
         (beginning-of-line 1)
       (newline))
-    (mapcar (lambda (x) (insert line)) (make-list rows t))
+    ;; (mapcar (lambda (x) (insert line)) (make-list rows t))
+    (dotimes (i rows) (insert line))
     (goto-char pos)
     (if (> rows 1)
         ;; Insert a hline after the first row.
@@ -5285,8 +5525,7 @@
     (unless (or (not (file-exists-p file))
                 (y-or-n-p (format "Overwrite file %s? " file)))
       (error "Abort"))
-    (save-excursion
-      (find-file file)
+    (with-current-buffer (find-file-noselect file)
       (setq buf (current-buffer))
       (erase-buffer)
       (fundamental-mode)
@@ -5406,12 +5645,18 @@
     (setq rfmt (concat rfmt "\n")
           hfmt (concat (substring hfmt 0 -1) "|\n"))
     ;; Produce the new table
-    (while lines
-      (setq l (pop lines))
-      (if l
-          (setq new (concat new (apply 'format rfmt
-                                       (append (pop fields) emptystrings))))
-        (setq new (concat new hfmt))))
+    ;;(while lines
+    ;;  (setq l (pop lines))
+    ;;  (if l
+    ;;      (setq new (concat new (apply 'format rfmt
+    ;;                                   (append (pop fields) emptystrings))))
+    ;;    (setq new (concat new hfmt))))
+    (setq new (mapconcat
+               (lambda (l)
+                 (if l (apply 'format rfmt
+                              (append (pop fields) emptystrings))
+                   hfmt))
+               lines ""))
     ;; Replace the old one
     (delete-region beg end)
     (move-marker end nil)
@@ -6453,7 +6698,7 @@
                  (concat "\\([ \t]*|\\|" auto-fill-inhibit-regexp)
                "[ \t]*|"))
         (easy-menu-add orgtbl-mode-menu)
-        (run-hooks (quote orgtbl-mode-hook)))
+        (run-hooks 'orgtbl-mode-hook))
     (setq auto-fill-inhibit-regexp org-old-auto-fill-inhibit-regexp)
     (remove-hook 'before-change-functions 'org-before-change-function t)
     (easy-menu-remove orgtbl-mode-menu)
@@ -8186,7 +8431,7 @@
 
 ;;; Menu entries
 
-;; First, remove the outline menus.
+;; First, remove the outline menus.  Org-mode does not neede these commands.
 (if org-xemacs-p
     (add-hook 'org-mode-hook
               (lambda ()
@@ -8195,7 +8440,7 @@
                 (delete-menu-item '("Hide"))
                 (set-menubar-dirty-flag)))
   (setq org-mode-map (delq (assoc 'menu-bar (cdr org-mode-map))
-                             org-mode-map)))
+                           org-mode-map)))
 
 ;; Define the Org-mode menus
 (easy-menu-define org-org-menu org-mode-map "Org menu"
@@ -8480,9 +8725,7 @@
         (get-char-property (point) 'invisible))
     (save-excursion
       (skip-chars-backward "^\r\n")
-      (if (bobp)
-          nil
-        (equal (char-before) ?\r)))))
+      (equal (char-before) ?\r))))
 
 (defun org-back-to-heading (&optional invisible-ok)
   "Move to previous heading line, or beg of this line if it's a heading.
--- a/lisp/textmodes/reftex-index.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/textmodes/reftex-index.el	Sat May 28 21:04:38 2005 +0000
@@ -310,7 +310,7 @@
   (easy-menu-add reftex-index-menu reftex-index-map)
   (add-hook 'post-command-hook 'reftex-index-post-command-hook nil t)
   (add-hook 'pre-command-hook  'reftex-index-pre-command-hook nil t)
-  (run-hooks 'reftex-index-mode-hook))
+  (run-mode-hooks 'reftex-index-mode-hook))
 
 (defconst reftex-index-help
 "                      AVAILABLE KEYS IN INDEX BUFFER
@@ -1308,7 +1308,7 @@
        reftex-index-phrases-font-lock-defaults)
   (easy-menu-add reftex-index-phrases-menu reftex-index-phrases-map)
   (set (make-local-variable 'reftex-index-phrases-marker) (make-marker))
-  (run-hooks 'reftex-index-phrases-mode-hook))
+  (run-mode-hooks 'reftex-index-phrases-mode-hook))
 (add-hook 'reftex-index-phrases-mode-hook 'turn-on-font-lock)
 
 ;; Font Locking stuff
--- a/lisp/textmodes/reftex-sel.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/textmodes/reftex-sel.el	Sat May 28 21:04:38 2005 +0000
@@ -60,7 +60,7 @@
   (when (syntax-table-p reftex-latex-syntax-table)
     (set-syntax-table reftex-latex-syntax-table))
   ;; We do not set a local map - reftex-select-item does this.
-  (run-hooks 'reftex-select-label-mode-hook))
+  (run-mode-hooks 'reftex-select-label-mode-hook))
 
 (defvar reftex-select-bib-map nil
   "Keymap used for *RefTeX Select* buffer, when selecting a BibTeX entry.
@@ -88,7 +88,7 @@
         mode-name "BSelect")
   (set (make-local-variable 'reftex-select-marked) nil)
   ;; We do not set a local map - reftex-select-item does this.
-  (run-hooks 'reftex-select-bib-mode-hook))
+  (run-mode-hooks 'reftex-select-bib-mode-hook))
 
 ;;; (defun reftex-get-offset (buf here-am-I &optional typekey toc index file)
 ;;;   ;; Find the correct offset data, like insert-docstruct would, but faster.
--- a/lisp/textmodes/reftex-toc.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/textmodes/reftex-toc.el	Sat May 28 21:04:38 2005 +0000
@@ -73,7 +73,7 @@
   (add-hook 'post-command-hook 'reftex-toc-post-command-hook nil t)
   (add-hook 'pre-command-hook  'reftex-toc-pre-command-hook nil t)
   (easy-menu-add reftex-toc-menu reftex-toc-map)
-  (run-hooks 'reftex-toc-mode-hook))
+  (run-mode-hooks 'reftex-toc-mode-hook))
 
 (defvar reftex-last-toc-file nil
   "Stores the file name from which `reftex-toc' was called.  For redo command.")
--- a/lisp/textmodes/sgml-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/textmodes/sgml-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -250,7 +250,8 @@
 
 (defface sgml-namespace-face
   '((t (:inherit font-lock-builtin-face)))
-  "`sgml-mode' face used to highlight the namespace part of identifiers.")
+  "`sgml-mode' face used to highlight the namespace part of identifiers."
+  :group 'sgml)
 (defvar sgml-namespace-face 'sgml-namespace-face)
 
 ;; internal
--- a/lisp/textmodes/table.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/textmodes/table.el	Sat May 28 21:04:38 2005 +0000
@@ -1272,7 +1272,7 @@
   (if (featurep 'xemacs)
       (progn
 	(easy-menu-add-item nil '("Tools") table-global-menu-map))
-    (easy-menu-add-item (current-global-map) '("menu-bar" "tools") '("--"))
+    (easy-menu-add-item (current-global-map) '("menu-bar" "tools") "--")
     (easy-menu-add-item (current-global-map) '("menu-bar" "tools") table-global-menu-map)))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--- a/lisp/textmodes/tex-mode.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/textmodes/tex-mode.el	Sat May 28 21:04:38 2005 +0000
@@ -643,19 +643,23 @@
 
 (defface superscript
   '((t :height 0.8)) ;; :raise 0.3
-  "Face used for superscripts.")
+  "Face used for superscripts."
+  :group 'tex)
 (defface subscript
   '((t :height 0.8)) ;; :raise -0.3
-  "Face used for subscripts.")
+  "Face used for subscripts."
+  :group 'tex)
 
 (defface tex-math-face
   '((t :inherit font-lock-string-face))
-  "Face used to highlight TeX math expressions.")
+  "Face used to highlight TeX math expressions."
+  :group 'tex)
 (defvar tex-math-face 'tex-math-face)
 (defface tex-verbatim-face
   ;; '((t :inherit font-lock-string-face))
   '((t :family "courier"))
-  "Face used to highlight TeX verbatim environments.")
+  "Face used to highlight TeX verbatim environments."
+  :group 'tex)
 (defvar tex-verbatim-face 'tex-verbatim-face)
 
 ;; Use string syntax but math face for $...$.
@@ -1623,7 +1627,8 @@
 
 (defcustom tex-use-reftex t
   "If non-nil, use RefTeX's list of files to determine what command to use."
-  :type 'boolean)
+  :type 'boolean
+  :group 'tex)
 
 (defvar tex-compile-commands
   '(((concat "pdf" tex-command
--- a/lisp/textmodes/texinfo.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/textmodes/texinfo.el	Sat May 28 21:04:38 2005 +0000
@@ -345,7 +345,8 @@
 
 (defface texinfo-heading-face
   '((t (:inherit font-lock-function-name-face)))
-  "Face used for section headings in `texinfo-mode'.")
+  "Face used for section headings in `texinfo-mode'."
+  :group 'texinfo)
 (defvar texinfo-heading-face 'texinfo-heading-face)
 
 (defvar texinfo-font-lock-keywords
--- a/lisp/thumbs.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/thumbs.el	Sat May 28 21:04:38 2005 +0000
@@ -83,7 +83,7 @@
 
 (defcustom thumbs-thumbsdir-max-size 50000000
   "Max size for thumbnails directory.
-When it reach that size (in bytes), a warning is send."
+When it reachs that size (in bytes), a warning is sent."
   :type 'string
   :group 'thumbs)
 
@@ -142,7 +142,7 @@
 ;; Initialize some variable, for later use.
 (defvar thumbs-temp-file
   (concat thumbs-temp-dir thumbs-temp-prefix)
-  "Temporary filesname for images.")
+  "Temporary filename for images.")
 
 (defvar thumbs-current-tmp-filename
   nil
@@ -188,8 +188,8 @@
 
 (defun thumbs-cleanup-thumbsdir ()
   "Clean the thumbnails directory.
-If the total size of all files in 'thumbs-thumbsdir' is bigger than
-'thumbs-thumbsdir-max-size', files are deleted until the max size is
+If the total size of all files in `thumbs-thumbsdir' is bigger than
+`thumbs-thumbsdir-max-size', files are deleted until the max size is
 reached."
   (let* ((filesL
 	  (sort
@@ -217,11 +217,11 @@
 FILEIN is the input file,
 FILEOUT is the output file,
 ACTION is the command to send to convert.
-Optional argument are:
+Optional arguments are:
 ARG any arguments to the ACTION command,
-OUTPUT-FORMAT is the file format to output, default is jpeg
+OUTPUT-FORMAT is the file format to output (default is jpeg),
 ACTION-PREFIX is the symbol to place before the ACTION command
-              (default to '-' but can sometime be '+')."
+              (defaults to '-' but can sometimes be '+')."
   (let ((command (format "%s %s%s %s \"%s\" \"%s:%s\""
 			 thumbs-conversion-program
 			 (or action-prefix "-")
@@ -241,7 +241,7 @@
   (round (- n (/ (* d n) 100))))
 
 (defun thumbs-increment-image-size (s)
-  "Increment S (a cons of width x heigh)."
+  "Increment S (a cons of width x height)."
   (cons
    (thumbs-increment-image-size-element (car s)
 					thumbs-image-resizing-step)
@@ -249,7 +249,7 @@
 					thumbs-image-resizing-step)))
 
 (defun thumbs-decrement-image-size (s)
-  "Decrement S (a cons of width x heigh)."
+  "Decrement S (a cons of width x height)."
   (cons
    (thumbs-decrement-image-size-element (car s)
 					thumbs-image-resizing-step)
@@ -349,7 +349,7 @@
   "Insert image IMG at point.
 TYPE and RELIEF will be used in constructing the image; see `image'
 in the emacs-lisp manual for further documentation.
-if MARKED is non-nil, the image is marked."
+If MARKED is non-nil, the image is marked."
   (let ((i `(image :type ,type
 		   :file ,img
 		   :relief ,relief
@@ -361,7 +361,7 @@
 
 (defun thumbs-insert-thumb (img &optional marked)
   "Insert the thumbnail for IMG at point.
-if MARKED is non-nil, the image is marked"
+If MARKED is non-nil, the image is marked."
   (thumbs-insert-image
    (thumbs-make-thumb img) 'jpeg thumbs-relief marked)
   (put-text-property (1- (point)) (point)
@@ -403,7 +403,7 @@
 
 ;;;###autoload
 (defun thumbs-dired-show-marked ()
-  "In Dired, make a thumbs buffer with all marked files."
+  "In dired, make a thumbs buffer with all marked files."
   (interactive)
   (thumbs-show-thumbs-list (dired-get-marked-files) nil t))
 
@@ -435,7 +435,7 @@
 
 (defun thumbs-find-image-at-point (&optional img otherwin)
   "Display image IMG for thumbnail at point.
-use another window it OTHERWIN is t."
+Use another window if OTHERWIN is t."
   (interactive)
   (let* ((i (or img (thumbs-current-image))))
     (thumbs-find-image i (point) otherwin)))
@@ -499,7 +499,7 @@
       (nreverse list))))
 
 (defun thumbs-delete-images ()
-  "Delete the image at point (and it's thumbnail) (or marked files if any)."
+  "Delete the image at point (and its thumbnail) (or marked files if any)."
   (interactive)
   (let ((files (or thumbs-markedL (list (thumbs-current-image)))))
     (if (yes-or-no-p (format "Really delete %d files? " (length files)))
@@ -520,7 +520,7 @@
 		      (delq x thumbs-markedL)))))))))
 
 (defun thumbs-rename-images (newfile)
-  "Rename the image at point (and it's thumbnail) (or marked files if any)."
+  "Rename the image at point (and its thumbnail) (or marked files if any)."
   (interactive "FRename to file or directory: ")
   (let ((files (or thumbs-markedL (list (thumbs-current-image))))
 	failures)
@@ -574,7 +574,7 @@
 	    thumbs-current-image-filename i))))
 
 (defun thumbs-next-image ()
-  "Show next image."
+  "Show the next image."
   (interactive)
   (let* ((i (1+ thumbs-image-num))
 	 (list (thumbs-file-alist))
@@ -782,7 +782,7 @@
 
 ;;;###autoload
 (defun thumbs-dired-setroot ()
-  "In dired, Call the setroot program on the image at point."
+  "In dired, call the setroot program on the image at point."
   (interactive)
   (thumbs-call-setroot-command (dired-get-filename)))
 
--- a/lisp/time.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/time.el	Sat May 28 21:04:38 2005 +0000
@@ -200,6 +200,7 @@
 				  (list :background bg)))))
 	  'face display-time-mail-face
 	  'help-echo "You have new mail; mouse-2: Read mail"
+	  'mouse-face 'mode-line-highlight
 	  'local-map (make-mode-line-mouse-map 'mouse-2
 					       read-mail-command)))
       ""))
@@ -293,6 +294,7 @@
 			  (concat (substring str 0 -2) "." (substring str -2))
 			  'local-map (make-mode-line-mouse-map
 				      'mouse-2 'display-time-next-load-average)
+			  'mouse-face 'mode-line-highlight
 			  'help-echo (concat
 				      "System load average for past "
 				      (if (= 0 display-time-load-average)
--- a/lisp/tmm.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/tmm.el	Sat May 28 21:04:38 2005 +0000
@@ -362,7 +362,7 @@
     (if (memq c tmm-short-cuts)
 	(if (equal (buffer-name) "*Completions*")
 	    (progn
-	      (beginning-of-buffer)
+	      (goto-char (point-min))
 	      (re-search-forward
 	       (concat "\\(^\\|[ \t]\\)" (char-to-string c) tmm-mid-prompt))
 	      (choose-completion))
--- a/lisp/vc-cvs.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/vc-cvs.el	Sat May 28 21:04:38 2005 +0000
@@ -236,16 +236,19 @@
 
 (defun vc-cvs-checkout-model (file)
   "CVS-specific version of `vc-checkout-model'."
-  (if (or (getenv "CVSREAD")
-          ;; If the file is not writable (despite CVSREAD being
-          ;; undefined), this is probably because the file is being
-          ;; "watched" by other developers.
-          ;; (If vc-mistrust-permissions was t, we actually shouldn't
-          ;; trust this, but there is no other way to learn this from CVS
-          ;; at the moment (version 1.9).)
-          (string-match "r-..-..-." (nth 8 (file-attributes file))))
+  (if (getenv "CVSREAD")
       'announce
-    'implicit))
+    (let ((attrib (file-attributes file)))
+      (if (and attrib ;; don't check further if FILE doesn't exist
+               ;; If the file is not writable (despite CVSREAD being
+               ;; undefined), this is probably because the file is being
+               ;; "watched" by other developers.
+               ;; (If vc-mistrust-permissions was t, we actually shouldn't
+               ;; trust this, but there is no other way to learn this from CVS
+               ;; at the moment (version 1.9).)
+               (string-match "r-..-..-." (nth 8 attrib)))
+          'announce
+        'implicit))))
 
 (defun vc-cvs-mode-line-string (file)
   "Return string for placement into the modeline for FILE.
--- a/lisp/vc.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/vc.el	Sat May 28 21:04:38 2005 +0000
@@ -46,7 +46,8 @@
 
 ;; This mode is fully documented in the Emacs user's manual.
 ;;
-;; Supported version-control systems presently include SCCS, RCS, and CVS.
+;; Supported version-control systems presently include CVS, RCS, GNU Arch,
+;; Subversion, Meta-CVS, and SCCS (or its free replacement, CSSC).
 ;;
 ;; Some features will not work with old RCS versions.  Where
 ;; appropriate, VC finds out which version you have, and allows or
@@ -68,7 +69,7 @@
 ;;
 ;; The vc code maintains some internal state in order to reduce expensive
 ;; version-control operations to a minimum.  Some names are only computed
-;; once.  If you perform version control operations with RCS/SCCS/CVS while
+;; once.  If you perform version control operations with the backend while
 ;; vc's back is turned, or move/rename master files while vc is running,
 ;; vc may get seriously confused.  Don't do these things!
 ;;
@@ -737,6 +738,7 @@
 ;; functions that operate on RCS revision numbers.  This code should
 ;; also be moved into the backends.  It stays for now, however, since
 ;; it is used in code below.
+;;;###autoload
 (defun vc-trunk-p (rev)
   "Return t if REV is a revision on the trunk."
   (not (eq nil (string-match "\\`[0-9]+\\.[0-9]+\\'" rev))))
--- a/lisp/vms-patch.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/vms-patch.el	Sat May 28 21:04:38 2005 +0000
@@ -193,5 +193,72 @@
 All other Emacs commands are still available."
   t)
 
+;;;
+;;; Filename handling in the minibuffer
+;;;
+(defun vms-magic-right-square-brace ()
+  "\
+Insert a right square brace, but do other things first depending on context.
+During filename completion, when point is at the end of the line and the
+character before is not a right square brace, do one of three things before
+inserting the brace:
+ - If there are already two left square braces preceding, do nothing special.
+ - If there is a previous right-square-brace, convert it to dot.
+ - If the character before is dot, delete it.
+Additionally, if the preceding chars are right-square-brace followed by
+either \"-\" or \"..\", strip one level of directory hierarchy."
+  (interactive)
+  (when (and minibuffer-completing-file-name
+	     (= (point) (point-max))
+	     (not (= 93 (char-before))))
+    (cond
+     ;; Avoid clobbering: user:[one.path][another.path
+     ((search-backward "[" (field-beginning) t 2))
+     ((search-backward "]" (field-beginning) t)
+      (delete-char 1)
+      (insert ".")
+      (goto-char (point-max)))
+     ((= ?. (char-before))
+      (delete-char -1)))
+    (goto-char (point-max))
+    (let ((specs '(".." "-"))
+	  (pmax (point-max)))
+      (while specs
+	(let* ((up (car specs))
+	       (len (length up))
+	       (cut (- (point) len)))
+	  (when (and (< (1+ len) pmax)
+		     (= ?. (char-before cut))
+		     (string= up (buffer-substring cut (point))))
+	    (delete-char (- (1+ len)))
+	    (while (not (let ((c (char-before)))
+			  (or (= ?. c) (= 91 c))))
+	      (delete-char -1))
+	    (when (= ?. (char-before)) (delete-char -1))
+	    (setq specs nil)))
+	(setq specs (cdr specs)))))
+  (insert "]"))
+
+(defun vms-magic-colon ()
+  "\
+Insert a colon, but do other things first depending on context.
+During filename completion, when point is at the end of the line
+and the line contains a right square brace, remove all characters
+from the beginning of the line up to and including such brace.
+This enables one to type a new filespec without having to delete
+the old one."
+  (interactive)
+  (when (and minibuffer-completing-file-name
+	     (= (point) (point-max))
+             (search-backward "]" (field-beginning) t))
+    (delete-region (field-beginning) (1+ (point)))
+    (goto-char (point-max)))
+  (insert ":"))
+
+(let ((m minibuffer-local-completion-map))
+  (define-key m "]" 'vms-magic-right-square-brace)
+  (define-key m "/" 'vms-magic-right-square-brace)
+  (define-key m ":" 'vms-magic-colon))
+
 ;;; arch-tag: c178494e-2c37-4d02-99b7-e47e615656cf
 ;;; vms-patch.el ends here
--- a/lisp/wdired.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/wdired.el	Sat May 28 21:04:38 2005 +0000
@@ -263,7 +263,7 @@
   (buffer-enable-undo) ; Performance hack. See above.
   (set-buffer-modified-p nil)
   (setq buffer-undo-list nil)
-  (run-hooks 'wdired-mode-hook)
+  (run-mode-hooks 'wdired-mode-hook)
   (message (substitute-command-keys "Press \\[wdired-finish-edit] when finished \
 or \\[wdired-abort-changes] to abort changes")))
 
--- a/lisp/wid-browse.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/wid-browse.el	Sat May 28 21:04:38 2005 +0000
@@ -82,7 +82,7 @@
   (use-local-map widget-browse-mode-map)
   (easy-menu-add widget-browse-mode-customize-menu)
   (easy-menu-add widget-browse-mode-menu)
-  (run-hooks 'widget-browse-mode-hook))
+  (run-mode-hooks 'widget-browse-mode-hook))
 
 (put 'widget-browse-mode 'mode-class 'special)
 
--- a/lisp/window.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/window.el	Sat May 28 21:04:38 2005 +0000
@@ -543,8 +543,7 @@
 Do nothing if the buffer contains more lines than the present window height,
 or if some of the window's contents are scrolled out of view,
 or if shrinking this window would also shrink another window.
-or if the window is the only window of its frame.
-Return non-nil if the window was shrunk."
+or if the window is the only window of its frame."
   (interactive)
   (when (null window)
     (setq window (selected-window)))
@@ -583,7 +582,7 @@
 
 (defun quit-window (&optional kill window)
   "Quit the current buffer.  Bury it, and maybe delete the selected frame.
-\(The frame is deleted if it is contains a dedicated window for the buffer.)
+\(The frame is deleted if it contains a dedicated window for the buffer.)
 With a prefix argument, kill the buffer instead.
 
 Noninteractively, if KILL is non-nil, then kill the current buffer,
--- a/lisp/xml.el	Fri May 20 17:44:36 2005 +0000
+++ b/lisp/xml.el	Sat May 28 21:04:38 2005 +0000
@@ -84,6 +84,9 @@
 ;;**
 ;;*******************************************************************
 
+(defconst xml-undefined-entity "?"
+  "What to substitute for undefined entities")
+
 (defvar xml-entity-alist
   '(("lt"   . "<")
     ("gt"   . ">")
@@ -745,9 +748,10 @@
 		    ((eq (length this-part) 0)
 		     (error "XML: (Not Well-Formed) No entity given"))
 		    (t
-		     (when xml-validating-parser
+		     (if xml-validating-parser
 			 (error "XML: (Validity) Undefined entity `%s'"
-				this-part))))))
+				this-part)
+		       xml-undefined-entity)))))
 
 	(cond ((null children)
 	       ;; FIXME: If we have an entity that expands into XML, this won't work.
--- a/lispref/ChangeLog	Fri May 20 17:44:36 2005 +0000
+++ b/lispref/ChangeLog	Sat May 28 21:04:38 2005 +0000
@@ -1,3 +1,42 @@
+2005-05-24  Richard M. Stallman  <rms@gnu.org>
+
+	* frames.texi (Dialog Boxes): Minor fixes.
+
+2005-05-25  Masatake YAMATO  <jet@gyve.org>
+
+	* display.texi (Standard Faces): Write about `mode-line-highlight'.
+
+2005-05-24  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* frames.texi (Dialog Boxes): HEADER argument to `x-popup-dialog'
+	is optional.
+
+2005-05-24  Nick Roberts  <nickrob@snap.net.nz>
+
+	* frames.texi (Dialog Boxes): Descibe new optional argument.
+
+2005-05-23  Lute Kamstra  <lute@gnu.org>
+
+	* modes.texi (Font Lock Basics, Syntactic Font Lock): Recommend
+	syntax-begin-function over font-lock-beginning-of-syntax-function.
+
+2005-05-21  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* minibuf.texi (Reading File Names): Update description of
+	`read-directory-name'.
+
+	* modes.texi (Derived Modes): Clarify :group keyword.
+
+2005-05-21  Eli Zaretskii  <eliz@gnu.org>
+
+	* files.texi (Locating Files): New subsection.  Describe
+	locate-file and executable-find.
+
+2005-05-21  Kevin Ryde  <user42@zip.com.au>
+
+	* frames.texi (Initial Parameters): Update cross reference to
+	"Emacs Invocation".
+
 2005-05-19  Luc Teirlinck  <teirllm@auburn.edu>
 
 	* keymaps.texi (Active Keymaps): Add anchor.
--- a/lispref/display.texi	Fri May 20 17:44:36 2005 +0000
+++ b/lispref/display.texi	Sat May 28 21:04:38 2005 +0000
@@ -1727,6 +1727,11 @@
 @kindex highlight @r{(face name)}
 This face is meant to be used for highlighting for various purposes.
 
+@item mode-line-highlight
+@kindex mode-line-highlight @r{(face name)}
+This face is used for highlighting something on @code{mode-line} or
+@code{header-line} for various purposes.
+
 @item trailing-whitespace
 @kindex trailing-whitespace @r{(face name)}
 This face is used to display excess whitespace at the end of a line,
--- a/lispref/files.texi	Fri May 20 17:44:36 2005 +0000
+++ b/lispref/files.texi	Sat May 28 21:04:38 2005 +0000
@@ -735,16 +735,18 @@
 @section Information about Files
 
   The functions described in this section all operate on strings that
-designate file names.  All the functions have names that begin with the
-word @samp{file}.  These functions all return information about actual
-files or directories, so their arguments must all exist as actual files
-or directories unless otherwise noted.
+designate file names.  With a few exceptions, all the functions have
+names that begin with the word @samp{file}.  These functions all
+return information about actual files or directories, so their
+arguments must all exist as actual files or directories unless
+otherwise noted.
 
 @menu
 * Testing Accessibility::   Is a given file readable?  Writable?
 * 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.
+* Locating Files::          How to find a file in standard places.
 @end menu
 
 @node Testing Accessibility
@@ -1254,6 +1256,67 @@
 @end table
 @end defun
 
+@node Locating Files
+@subsection How to Locate Files in Standard Places
+@cindex locate files
+@cindex find files
+
+  Sometimes, you need to find a file that could reside in one of the
+standard directories.  One example is when you need to look for a
+program's executable file, e.g., to find out whether a given program
+is installed on the user's system.  Another example is the search for
+Lisp libraries (@pxref{Library Search}).  Such searches generally need
+to try several alternative file name extensions, in addition to
+looking in every standard directory where the file could be found.
+Emacs provides a function for such a generalized search for a file.
+
+@defun locate-file filename path &optional suffixes predicate
+This function searches for the file whose name is @var{filename} in
+a list of directories given by @var{path}.  If it finds the file, it
+returns its full @dfn{absolute file name} (@pxref{Relative File
+Names}); if the file is not found, the function returns @code{nil}.
+
+The optional argument @var{suffixes} gives the list of file-name
+suffixes to append to @var{filename} when searching.  If
+@var{suffixes} is @code{nil}, it's equivalent to passing a list with a
+single element that is an empty string @code{""}.
+
+Typical values of @var{path} are @code{exec-path} (@pxref{Subprocess
+Creation, exec-path}) when looking for executable programs or
+@code{load-path} (@pxref{Library Search, load-path}) when looking for
+Lisp files.  Use @code{("/")} to disable the path search (e.g., if
+@var{filename} already includes the leading directories), but still
+try the extensions in @var{suffixes}.
+
+Typical values of @var{suffixes} are @code{exec-suffixes}
+(@pxref{Subprocess Creation, exec-suffixes}) and @code{load-suffixes}
+(@pxref{Library Search, load-suffixes}).
+
+The optional argument @var{predicate}, if non-@code{nil}, specifies
+the predicate function to use for testing whether a candidate file is
+suitable.  The predicate function is passed the candidate file name as
+its single argument.  If @var{predicate} is @code{nil} or unspecified,
+@code{locate-file} uses @code{file-readable-p} as the default
+predicate.  Useful non-default predicates include
+@code{file-executable-p}, @code{file-directory-p}, and other
+predicates described in @ref{Kinds of Files}.
+
+For compatibility, @var{predicate} can also be one of the symbols
+@code{executable}, @code{readable}, @code{writable}, @code{exists}, or
+a list of one or more of these symbols.
+@end defun
+
+@cindex find executable program
+@defun executable-find program
+This function searches for the executable file of the named
+@var{program} and returns the full absolute name of the executable,
+including its file-name extensions, if any.  It returns @code{nil} if
+the file is not found.  The functions searches in all the directories
+in @code{exec-path} and tries all the file-name extensions in
+@code{exec-suffixes}.
+@end defun
+
+
 @node Changing Files
 @section Changing File Names and Attributes
 @cindex renaming files
--- a/lispref/frames.texi	Fri May 20 17:44:36 2005 +0000
+++ b/lispref/frames.texi	Sat May 28 21:04:38 2005 +0000
@@ -304,8 +304,8 @@
 If you use options that specify window appearance when you invoke Emacs,
 they take effect by adding elements to @code{default-frame-alist}.  One
 exception is @samp{-geometry}, which adds the specified position to
-@code{initial-frame-alist} instead.  @xref{Command Arguments,,, emacs,
-The GNU Emacs Manual}.
+@code{initial-frame-alist} instead.  @xref{Emacs Invocation,, Command
+Line Arguments for Emacs Invocation, emacs, The GNU Emacs Manual}.
 
 @node Window Frame Parameters
 @subsection Window Frame Parameters
@@ -1438,13 +1438,14 @@
 
   A dialog box is a variant of a pop-up menu---it looks a little
 different, it always appears in the center of a frame, and it has just
-one level and one pane.  The main use of dialog boxes is for asking
-questions that the user can answer with ``yes'', ``no'', and a few other
-alternatives.  The functions @code{y-or-n-p} and @code{yes-or-no-p} use
-dialog boxes instead of the keyboard, when called from commands invoked
-by mouse clicks.
+one level and one or more buttons.  The main use of dialog boxes is
+for asking questions that the user can answer with ``yes'', ``no'',
+and a few other alternatives.  With a single button, they can also
+force the user to acknowledge important information.  The functions
+@code{y-or-n-p} and @code{yes-or-no-p} use dialog boxes instead of the
+keyboard, when called from commands invoked by mouse clicks.
 
-@defun x-popup-dialog position contents
+@defun x-popup-dialog position contents &optional header
 This function displays a pop-up dialog box and returns an indication of
 what selection the user makes.  The argument @var{contents} specifies
 the alternatives to offer; it has this format:
@@ -1474,6 +1475,10 @@
 @code{x-popup-menu}, but the precise coordinates or the individual
 window don't matter; only the frame matters.
 
+If @var{header} is non-@code{nil}, the frame title for the box is
+@samp{Information}, otherwise it is @samp{Question}.  The former is used
+for @code{message-box} (@pxref{The Echo Area}).
+
 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.
--- a/lispref/minibuf.texi	Fri May 20 17:44:36 2005 +0000
+++ b/lispref/minibuf.texi	Sat May 28 21:04:38 2005 +0000
@@ -1309,9 +1309,9 @@
 @code{read-directory-name} constructs a substitute default by
 combining @var{directory} (or the current buffer's default directory
 if @var{directory} is @code{nil}) and @var{initial}.  If both
-@var{default} and @var{initial} are @code{nil}, this function uses the
-current buffer's default directory as substitute default, ignoring
-@var{directory}.
+@var{default} and @var{initial} are @code{nil}, this function uses
+@var{directory} as substitute default, or the current buffer's default
+directory if @var{directory} is @code{nil}.
 @end defun
 
 @defopt insert-default-directory
--- a/lispref/modes.texi	Fri May 20 17:44:36 2005 +0000
+++ b/lispref/modes.texi	Sat May 28 21:04:38 2005 +0000
@@ -1032,9 +1032,6 @@
 are evaluated.  The following keywords are currently supported:
 
 @table @code
-@item :group
-If this is specified, it is the customization group for this mode.
-
 @item :syntax-table
 You can use this to explicitly specify a syntax table for the new
 mode.  If you specify a @code{nil} value, the new mode uses the same
@@ -1049,6 +1046,13 @@
 abbrev table as @var{parent}, or @code{fundamental-mode-abbrev-table}
 if @var{parent} is @code{nil}.  (Again, a @code{nil} value is
 @emph{not} equivalent to not specifying this keyword.)
+
+@item :group
+If this is specified, the value should be the customization group for
+this mode.  (Not all major modes have one.)  Only the (still
+experimental and unadvertised) command @code{customize-mode} currently
+uses this.  @code{define-derived-mode} does @emph{not} automatically
+define the specified customization group.
 @end table
 
 Here is a hypothetical example:
@@ -2364,7 +2368,9 @@
 resulting syntax table is stored in @code{font-lock-syntax-table}.
 
 The fifth element, @var{syntax-begin}, specifies the value of
-@code{font-lock-beginning-of-syntax-function}.
+@code{font-lock-beginning-of-syntax-function}.  We recommend setting
+this variable to @code{nil} and using @code{syntax-begin-function}
+instead.
 
 All the remaining elements (if any) are collectively called
 @var{other-vars}.  Each of these elements should have the form
@@ -2876,10 +2882,6 @@
 @code{font-lock-defaults}.
 @end defvar
 
-@c ???
-@c The docstring says that font-lock-syntax-table is semi-obsolete.
-@c How the alternative should be used is not clear.  --lute
-
 @defvar font-lock-beginning-of-syntax-function
 If this variable is non-@code{nil}, it should be a function to move
 point back to a position that is syntactically at ``top level'' and
@@ -2892,9 +2894,10 @@
 be outside a syntactic block), or @code{beginning-of-defun} for
 programming modes, or @code{backward-paragraph} for textual modes.
 
-If the value is @code{nil}, the beginning of the buffer is used as a
-position outside of a syntactic block.  This cannot be wrong, but it
-can be slow.
+If the value is @code{nil}, Font Lock uses
+@code{syntax-begin-function} to move back outside of any comment,
+string, or sexp.  This variable is semi-obsolete; we recommend setting
+@code{syntax-begin-function} instead.
 
 Specify this variable using @var{syntax-begin} in
 @code{font-lock-defaults}.
--- a/man/ChangeLog	Fri May 20 17:44:36 2005 +0000
+++ b/man/ChangeLog	Sat May 28 21:04:38 2005 +0000
@@ -1,3 +1,62 @@
+2005-05-27  Jay Belanger  <belanger@truman.edu>
+
+	* calc.texi (Queries in Keyboard Macros): Rewrite to reflect
+	current behavior.
+
+2005-05-27  Nick Roberts  <nickrob@snap.net.nz>
+
+	* files.texi (Log Buffer): Merge in description of Log Edit
+	mode from pcl-cvs.texi.
+
+2005-05-26  Richard M. Stallman  <rms@gnu.org>
+
+	* building.texi (Lisp Eval): C-M-x with arg runs Edebug.
+
+2005-05-25  Jay Belanger  <belanger@truman.edu>
+
+	* calc.texi: Change Calc version number throughout.
+	(Keypad Mode): Change location in info output.
+	(Keypad mode overview): Move picture of keypad.
+
+2005-05-24  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* fixit.texi (Spelling): Delete confusing sentence; flyspell is
+	not enabled by default.
+	When not on a word, `ispell-word' by default checks the word
+	before point.
+
+2005-05-24  Nick Roberts  <nickrob@snap.net.nz>
+
+	* building.texi (Debugger Operation): Simplify last sentence.
+
+2005-05-23  Lute Kamstra  <lute@gnu.org>
+
+	* emacs.texi: Update FSF's address throughout.
+	(Preface): Use @cite.
+	(Distrib): Add cross reference to the node "Copying".  Mention the
+	FDL.  Don't refer to etc/{FTP,ORDERS}.  Mention the sale of
+	printed manuals.
+	(Intro): Use @xref for the Emacs Lisp Intro.
+
+2005-05-21  Jay Belanger  <belanger@truman.edu>
+
+	* calc.texi (Storing variables): Mention that only most variables
+	are void to begin with.
+
+2005-05-21  Kevin Ryde  <user42@zip.com.au>
+
+	* widget.texi (Basic Types): Update cross ref from "Enabling
+	Mouse-1 to Follow Links" to "Links and Mouse-1" per recent
+	lispref/text.texi change.
+
+2005-05-20  Carsten Dominik  <dominik@science.uva.nl>
+
+	* org.texi: Version 3.09
+
+2005-05-18  Carsten Dominik  <dominik@science.uva.nl>
+
+	* reftex.texi: Version 4.28
+
 2005-05-18  Luc Teirlinck  <teirllm@auburn.edu>
 
 	* buffers.texi (Select Buffer): Document `C-u M-g M-g'.
--- a/man/building.texi	Fri May 20 17:44:36 2005 +0000
+++ b/man/building.texi	Sat May 28 21:04:38 2005 +0000
@@ -518,7 +518,7 @@
 With GDB in text command mode (@pxref{GDB Graphical Interface}),
 it is possible that use of GUD tooltips can cause a function to be
 called with harmful side-effects.  In this case, Emacs disables
-gud-tooltip-mode.
+them.
 
 @node Commands of GUD
 @subsection Commands of GUD
@@ -1149,10 +1149,11 @@
 @kbd{C-x C-e} a second time to display the value of the integer result
 in additional formats (octal, hexadecimal, and character).
 
-  If @kbd{C-M-x}, @kbd{C-x C-e}, or @kbd{M-:} is given a numeric
-argument, it inserts the value into the current buffer at point, rather
-than displaying it in the echo area.  The argument's value does not
-matter.
+  If @kbd{C-x C-e}, or @kbd{M-:} is given a numeric argument, it
+inserts the value into the current buffer at point, rather than
+displaying it in the echo area.  The argument's value does not matter.
+@kbd{C-M-x} with a numeric argument instruments the function
+definition for Edebug (@pxref{Instrumenting, Instrumenting for Edebug,, elisp, the Emacs Lisp Reference Manual}).
 
 @findex eval-region
 @findex eval-current-buffer
--- a/man/calc.texi	Fri May 20 17:44:36 2005 +0000
+++ b/man/calc.texi	Sat May 28 21:04:38 2005 +0000
@@ -162,6 +162,7 @@
 * Store and Recall::      Storing and recalling variables.
 * Graphics::              Commands for making graphs of data.
 * Kill and Yank::         Moving data into and out of Calc.
+* Keypad Mode::           Operating Calc from a keypad.
 * Embedded Mode::         Working with formulas embedded in a file.
 * Programming::           Calc as a programmable calculator.
 
@@ -1028,7 +1029,7 @@
 
 ...
 --**-Emacs: myfile             (Fundamental)----All----------------------
---- Emacs Calculator Mode ---                   |Emacs Calc Mode v2.00...
+--- Emacs Calculator Mode ---                   |Emacs Calc Mode v2.1 ...
 2:  17.3                                        |    17.3
 1:  -5                                          |    3
     .                                           |    2
@@ -1149,28 +1150,30 @@
 \medskip
 @end tex
 @smallexample
-                                        |--- Emacs Calculator Mode ---
-                                        |2:  17.3
-                                        |1:  -5
-                                        |    .
-                                        |--%%-Calc: 12 Deg       (Calcul
-                                        |----+-----Calc 2.00-----+----1
-                                        |FLR |CEIL|RND |TRNC|CLN2|FLT |
-                                        |----+----+----+----+----+----|
-                                        | LN |EXP |    |ABS |IDIV|MOD |
-                                        |----+----+----+----+----+----|
-                                        |SIN |COS |TAN |SQRT|y^x |1/x |
-                                        |----+----+----+----+----+----|
-                                        |  ENTER  |+/- |EEX |UNDO| <- |
-                                        |-----+---+-+--+--+-+---++----|
-                                        | INV |  7  |  8  |  9  |  /  |
-                                        |-----+-----+-----+-----+-----|
-                                        | HYP |  4  |  5  |  6  |  *  |
-                                        |-----+-----+-----+-----+-----|
-                                        |EXEC |  1  |  2  |  3  |  -  |
-                                        |-----+-----+-----+-----+-----|
-                                        | OFF |  0  |  .  | PI  |  +  |
-                                        |-----+-----+-----+-----+-----+
+@group
+|--- Emacs Calculator Mode ---
+|2:  17.3
+|1:  -5
+|    .
+|--%%-Calc: 12 Deg       (Calcul
+|----+-----Calc 2.1------+----1
+|FLR |CEIL|RND |TRNC|CLN2|FLT |
+|----+----+----+----+----+----|
+| LN |EXP |    |ABS |IDIV|MOD |
+|----+----+----+----+----+----|
+|SIN |COS |TAN |SQRT|y^x |1/x |
+|----+----+----+----+----+----|
+|  ENTER  |+/- |EEX |UNDO| <- |
+|-----+---+-+--+--+-+---++----|
+| INV |  7  |  8  |  9  |  /  |
+|-----+-----+-----+-----+-----|
+| HYP |  4  |  5  |  6  |  *  |
+|-----+-----+-----+-----+-----|
+|EXEC |  1  |  2  |  3  |  -  |
+|-----+-----+-----+-----+-----|
+| OFF |  0  |  .  | PI  |  +  |
+|-----+-----+-----+-----+-----+
+@end group
 @end smallexample
 
 Keypad mode is much easier for beginners to learn, because there
@@ -10010,7 +10013,6 @@
 * Numeric Entry::
 * Algebraic Entry::
 * Quick Calculator::
-* Keypad Mode::
 * Prefix Arguments::
 * Undo::
 * Error Messages::
@@ -28292,9 +28294,9 @@
 @pindex calc-unstore
 @cindex Void variables
 @cindex Un-storing variables
-Until you store something in them, variables are ``void,'' that is, they
-contain no value at all.  If they appear in an algebraic formula they
-will be left alone even if you press @kbd{=} (@code{calc-evaluate}).
+Until you store something in them, most variables are ``void,'' that is,
+they contain no value at all.  If they appear in an algebraic formula
+they will be left alone even if you press @kbd{=} (@code{calc-evaluate}).
 The @kbd{s u} (@code{calc-unstore}) command returns a variable to the
 void state.
 
@@ -29649,7 +29651,7 @@
 just by double-clicking on it in the shell, then middle-clicking
 in the Calc window.
 
-@node Keypad Mode, Embedded Mode, Kill and Yank, Introduction
+@node Keypad Mode, Embedded Mode, Kill and Yank, Top
 @chapter Keypad Mode
 
 @noindent
@@ -29706,7 +29708,7 @@
 
 @smallexample
 @group
-|----+-----Calc 2.00-----+----1
+|----+-----Calc 2.1------+----1
 |FLR |CEIL|RND |TRNC|CLN2|FLT |
 |----+----+----+----+----+----|
 | LN |EXP |    |ABS |IDIV|MOD |
@@ -31393,23 +31395,35 @@
 @node Queries in Macros, , Local Values in Macros, Keyboard Macros
 @subsection Queries in Keyboard Macros
 
-@noindent
-@kindex Z =
-@pindex calc-kbd-report
-The @kbd{Z =} (@code{calc-kbd-report}) command displays an informative
-message including the value on the top of the stack.  You are prompted
-to enter a string.  That string, along with the top-of-stack value,
-is displayed unless @kbd{m w} (@code{calc-working}) has been used
-to turn such messages off.
-
+@c @noindent
+@c @kindex Z =
+@c @pindex calc-kbd-report
+@c The @kbd{Z =} (@code{calc-kbd-report}) command displays an informative
+@c message including the value on the top of the stack.  You are prompted
+@c to enter a string.  That string, along with the top-of-stack value,
+@c is displayed unless @kbd{m w} (@code{calc-working}) has been used
+@c to turn such messages off.
+
+@noindent
 @kindex Z #
 @pindex calc-kbd-query
-The @kbd{Z #} (@code{calc-kbd-query}) command displays a prompt message
-(which you enter during macro definition), then does an algebraic entry
-which takes its input from the keyboard, even during macro execution.
-This command allows your keyboard macros to accept numbers or formulas
-as interactive input.  All the normal conventions of algebraic input,
-including the use of @kbd{$} characters, are supported.
+The @kbd{Z #} (@code{calc-kbd-query}) command prompts for an algebraic
+entry which takes its input from the keyboard, even during macro
+execution.  All the normal conventions of algebraic input, including the
+use of @kbd{$} characters, are supported.  The prompt message itself is
+taken from the top of the stack, and so must be entered (as a string)
+before the @kbd{Z #} command.  (Recall, as a string it can be entered by
+pressing the @kbd{"} key and will appear as a vector when it is put on
+the stack.  The prompt message is only put on the stack to provide a
+prompt for the @kbd{Z #} command; it will not play any role in any
+subsequent calculations.)  This command allows your keyboard macros to
+accept numbers or formulas as interactive input.
+
+As an example, 
+@kbd{2 @key{RET} "Power: " @key{RET} Z # 3 @key{RET} ^} will prompt for
+input with ``Power: '' in the minibuffer, then return 2 to the provided
+power.  (The response to the prompt that's given, 3 in this example,
+will not be part of the macro.)
 
 @xref{Keyboard Macro Query, , , emacs, the Emacs Manual}, for a description of
 @kbd{C-x q} (@code{kbd-macro-query}), the standard Emacs way to accept
@@ -35020,7 +35034,7 @@
 @appendix Calc Summary
 
 @noindent
-This section includes a complete list of Calc 2.02 keystroke commands.
+This section includes a complete list of Calc 2.1 keystroke commands.
 Each line lists the stack entries used by the command (top-of-stack
 last), the keystrokes themselves, the prompts asked by the command,
 and the result of the command (also with top-of-stack last).
@@ -35867,8 +35881,7 @@
 @c
 @r{       @:      Z `   @:             @:        @:calc-kbd-push@:}
 @r{       @:      Z '   @:             @:        @:calc-kbd-pop@:}
-@r{      a@:      Z =   @:message      @:    28  @:calc-kbd-report@:}
-@r{       @:      Z #   @:prompt       @:        @:calc-kbd-query@:}
+@r{       @:      Z #   @:             @:        @:calc-kbd-query@:}
 
 @c
 @r{   comp@:      Z C   @:func, args   @:    50  @:calc-user-define-composition@:}
--- a/man/display.texi	Fri May 20 17:44:36 2005 +0000
+++ b/man/display.texi	Sat May 28 21:04:38 2005 +0000
@@ -1084,7 +1084,7 @@
 The @var{indicator} must be one of @code{top}, @code{bottom},
 @code{up}, @code{down}, or @code{t} which specifies the default
 position for the indicators not present in the alist.
-The @var{position} is one of @code{left}, @code{right}, or @code{ni}
+The @var{position} is one of @code{left}, @code{right}, or @code{nil}
 which specifies not to show this indicator.
 
   For example, @code{((top . left) (t . right))} places the top angle
--- a/man/emacs.texi	Fri May 20 17:44:36 2005 +0000
+++ b/man/emacs.texi	Sat May 28 21:04:38 2005 +0000
@@ -65,8 +65,8 @@
 @sp 2
 ISBN 1-882114-06-X @*
 Published by the Free Software Foundation @*
-59 Temple Place, Suite 330 @*
-Boston, MA  02111-1307 USA
+51 Franklin Street, Fifth Floor @*
+Boston, MA 02110-1301 USA
 
 @sp 2
 Cover art by Etienne Suvasa.
@@ -951,11 +951,11 @@
   GNU Emacs is a member of the Emacs editor family.  There are many Emacs
 editors, all sharing common principles of organization.  For information on
 the underlying philosophy of Emacs and the lessons learned from its
-development, write for a copy of AI memo 519a, ``Emacs, the Extensible,
-Customizable Self-Documenting Display Editor,'' to Publications Department,
+development, write for a copy of AI memo 519a, @cite{Emacs, the Extensible,
+Customizable Self-Documenting Display Editor}, to Publications Department,
 Artificial Intelligence Lab, 545 Tech Square, Cambridge, MA 02139, USA@.  At
 last report they charge $2.25 per copy.  Another useful publication is LCS
-TM-165, ``A Cookbook for an Emacs,'' by Craig Finseth, available from
+TM-165, @cite{A Cookbook for an Emacs}, by Craig Finseth, available from
 Publications Department, Laboratory for Computer Science, 545 Tech Square,
 Cambridge, MA 02139, USA@.  The price today is $3.
 
@@ -971,20 +971,25 @@
 @unnumbered Distribution
 
 GNU Emacs is @dfn{free software}; this means that everyone is free to
-use it and free to redistribute it on certain conditions.  GNU Emacs is
-not in the public domain; it is copyrighted and there are restrictions
-on its distribution, but these restrictions are designed to permit
-everything that a good cooperating citizen would want to do.  What is
-not allowed is to try to prevent others from further sharing any version
-of GNU Emacs that they might get from you.  The precise conditions are
-found in the GNU General Public License that comes with Emacs and also
-appears following this section.
+use it and free to redistribute it on certain conditions.  GNU Emacs
+is not in the public domain; it is copyrighted and there are
+restrictions on its distribution, but these restrictions are designed
+to permit everything that a good cooperating citizen would want to do.
+What is not allowed is to try to prevent others from further sharing
+any version of GNU Emacs that they might get from you.  The precise
+conditions are found in the GNU General Public License that comes with
+Emacs and also appears in this manual@footnote{This manual is itself
+covered by the GNU Free Documentation License.  This license is
+similar in spirit to the General Public License, but is more suitable
+for documentation.  @xref{GNU Free Documentation License}.}.
+@xref{Copying}.
 
-One way to get a copy of GNU Emacs is from someone else who has it.  You
-need not ask for our permission to do so, or tell any one else; just
-copy it.  If you have access to the Internet, you can get the latest
-distribution version of GNU Emacs by anonymous FTP; see the file
-@file{etc/FTP} in the Emacs distribution for more information.
+One way to get a copy of GNU Emacs is from someone else who has it.
+You need not ask for our permission to do so, or tell any one else;
+just copy it.  If you have access to the Internet, you can get the
+latest distribution version of GNU Emacs by anonymous FTP; see
+@url{http://www.gnu.org/software/emacs} on our website for more
+information.
 
 You may also receive GNU Emacs when you buy a computer.  Computer
 manufacturers are free to distribute copies on the same terms that apply to
@@ -995,17 +1000,17 @@
 when you get it, not just free for the manufacturer.
 
 You can also order copies of GNU Emacs from the Free Software
-Foundation.  This is a convenient and reliable way to get a copy; it
-is also a good way to help fund our work.  (The Foundation has always
-received most of its funds in this way.)  An order form is included in
-the file @file{etc/ORDERS} in the Emacs distribution, and on our web
-site in @url{http://www.gnu.org/order/order.html}.  For further
-information, write to
+Foundation.  This is a convenient and reliable way to get a copy; it is
+also a good way to help fund our work.  We also sell hardcopy versions
+of this manual and @cite{An Introduction to Programming in Emacs Lisp},
+by Robert J. Chassell.  You can find an order form on our web site at
+@url{http://www.gnu.org/order/order.html}.  For further information,
+write to
 
 @display
 Free Software Foundation
-59 Temple Place, Suite 330
-Boston, MA  02111-1307 USA
+51 Franklin Street, Fifth Floor
+Boston, MA 02110-1301
 USA
 @end display
 
@@ -1137,10 +1142,9 @@
 separate copy of all of Emacs.  Most of the editing commands of Emacs
 are written in Lisp; the few exceptions could have been written
 in Lisp but are written in C for efficiency.  Although only a programmer
-can write an extension, anybody can use it afterward.  If you want to
-learn Emacs Lisp programming, we recommend the @cite{Introduction to
-Emacs Lisp} by Robert J. Chassell, also published by the Free Software
-Foundation.
+can write an extension, anybody can use it afterward.  @xref{Top,
+Emacs Lisp Intro, Preface, eintr, An Introduction to Programming in
+Emacs Lisp}, if you want to learn Emacs Lisp programming.
 
    When run under the X Window System, Emacs provides its own menus and
 convenient bindings to mouse buttons.  But Emacs can provide many of the
@@ -1189,7 +1193,7 @@
 
 @display
 Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
-59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.
@@ -1535,7 +1539,7 @@
 
 You should have received a copy of the GNU General Public License along
 with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 @end smallexample
 
 Also add information on how to contact you by electronic and paper mail.
--- a/man/files.texi	Fri May 20 17:44:36 2005 +0000
+++ b/man/files.texi	Sat May 28 21:04:38 2005 +0000
@@ -1526,8 +1526,29 @@
 
   When you check in changes, @kbd{C-x v v} first reads a log entry.  It
 pops up a buffer called @samp{*VC-Log*} for you to enter the log entry.
-When you are finished, type @kbd{C-c C-c} in the @samp{*VC-Log*} buffer.
-That is when check-in really happens.
+
+Sometimes the @samp{*VC-Log*} buffer contains default text when you enter it,
+typically the last log message entered.  If it does, mark and point
+are set around the entire contents of the buffer so that it is easy to
+kill the contents of the buffer with @kbd{C-w}.
+
+@findex log-edit-insert-changelog
+If you work by writing entries in the @file{ChangeLog}
+(@pxref{Change Log}) and then commit the change under revision
+control, you can generate the Log Edit text from the ChangeLog using
+@kbd{C-c C-a} (@kbd{log-edit-insert-changelog}).  This looks for
+entries for the file(s) concerned in the top entry in the ChangeLog
+and uses those paragraphs as the log text.  This text is only inserted
+if the top entry was made under your user name on the current date.
+@xref{Change Logs and VC}, for the opposite way of
+working---generating ChangeLog entries from the revision control log.
+
+In the @samp{*VC-Log*} buffer, @kbd{C-c C-f} (@kbd{M-x log-edit-show-files})
+shows the list of files to be committed in case you need to check
+that.
+
+When you have finished editing the log message, type @kbd{C-c C-c} to
+exit the buffer and commit the change.
 
   To abort check-in, just @strong{don't} type @kbd{C-c C-c} in that
 buffer.  You can switch buffers and do other editing.  As long as you
--- a/man/fixit.texi	Fri May 20 17:44:36 2005 +0000
+++ b/man/fixit.texi	Sat May 28 21:04:38 2005 +0000
@@ -203,13 +203,11 @@
 enable or disable this mode in the current buffer.
 
   The other Emacs spell-checking features check or look up words when
-you give an explicit command to do so.  Checking all or part of the
-buffer is useful when you have text that was written outside of this
-Emacs session and might contain any number of misspellings.
+you give an explicit command to do so.
 
 @kindex M-$
 @findex ispell-word
-  To check the spelling of the word around or next to point, and
+  To check the spelling of the word around or before point, and
 optionally correct it as well, use the command @kbd{M-$}
 (@code{ispell-word}).  If the word is not correct, the command offers
 you various alternatives for what to do about it.
--- a/man/org.texi	Fri May 20 17:44:36 2005 +0000
+++ b/man/org.texi	Sat May 28 21:04:38 2005 +0000
@@ -4,8 +4,8 @@
 @setfilename ../info/org
 @settitle Org Mode Manual
 
-@set VERSION 3.08
-@set DATE April 2005
+@set VERSION 3.10
+@set DATE May 2005
 
 @dircategory Emacs
 @direntry
@@ -156,7 +156,7 @@
 
 * Completion::                  M-TAB knows what you need
 * Customization::               Adapting Org-mode to your taste
-* Tips and Tricks::             An author-imposed FAQ, sort of
+* FAQ::                         Frequently asked questions
 * Interaction::                 Other Emacs packages
 * Acknowledgments::             These people provided feedback and more
 * Bugs::                        Things which do not work perfectly
@@ -224,19 +224,23 @@
 @cindex global keybindings
 @cindex keybindings, global
 
-The instructions below assume that you have downloaded Org-mode from
-the web.  If Org-mode is part of the Emacs distribution or an XEmacs
-package, you only need to add to @file{.emacs} the last three Lisp
-lines below - all the rest will be taken care of automatically.
+If Org-mode is part of the Emacs distribution or an XEmacs package,
+you only need to copy the following lines to your @file{.emacs} file.
+The last two lines define @emph{global} keys for the commands
+@command{org-store-link} and @command{org-agenda} - please choose
+suitable keys yourself.
 
-Byte-compile @file{org.el} and put it on your load path.  If you'd
-like to use the Info documentation, copy the file @file{org} into the
-directory containing info files and run the command @code{install-info
-org}.
+@lisp
+;; The following lines are always needed.  Choose your own keys.
+(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
+(define-key global-map "\C-cl" 'org-store-link)
+(define-key global-map "\C-ca" 'org-agenda)
+@end lisp
 
-Then copy the following lines into @file{.emacs}.  The last two lines
-define @emph{global} keys for the commands @command{org-store-link}
-and @command{org-agenda} - please choose suitable keys yourself.
+If you have downloaded Org-mode from the Web, you must byte-compile
+@file{org.el} and put it on your load path.  In addition to the Emacs
+Lisp lines above, you also need to add the following lines to
+@file{.emacs}:
 
 @lisp
 ;; These lines only if org-mode is not part of the X/Emacs distribution.
@@ -246,17 +250,12 @@
 (autoload 'org-store-link "org" "Store a link to the current location" t)
 (autoload 'orgtbl-mode "org" "Org tables as a minor mode" t)
 (autoload 'turn-on-orgtbl "org" "Org tables as a minor mode")
-
-;; The following lines are always needed.  Choose your own keys.
-(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
-(define-key global-map "\C-cl" 'org-store-link)
-(define-key global-map "\C-ca" 'org-agenda)
 @end lisp
 
 @cindex org-mode, turning on
-@noindent
-This will put all files with extension @samp{.org} into Org-mode.  As
-an alternative, make the first line of a file look like this:
+With this setup, all files with extension @samp{.org} will be put into
+Org-mode.  As an alternative, make the first line of a file look like
+this:
 
 @example
 MY PROJECTS    -*- mode: org; -*-
@@ -290,7 +289,6 @@
 @end enumerate
 @noindent Thanks for helping to improve this mode.
 
-
 @node Document Structure, Tables, Introduction, Top
 @chapter Document Structure
 @cindex document structure
@@ -500,7 +498,8 @@
 @emph{sparse trees} for selected information in an outline tree.  A
 sparse tree means that the entire document is folded as much as
 possible, but the selected information is made visible along with the
-headline structure above it.  Just try it out and you will see
+headline structure above it@footnote{See also the variable
+@code{org-show-following-heading}}.  Just try it out and you will see
 immediately how it works.
 
 Org-mode contains several commands creating such trees.  The most
@@ -1394,8 +1393,8 @@
 @cindex agenda
 
 An agenda can be compiled from one or more org files.  The main
-purpose of this command is to act like a planner, in order to show you
-what tasks are up for the current week, similar to a paper agenda.
+purpose of this command is to act like a paper agenda, showing you all
+the tasks for the current day or week.
 
 The Org-mode files to be processed in order to generate the agenda are
 listed in the variable @code{org-agenda-files}.  You can customize
@@ -1441,7 +1440,7 @@
 which is derived from the file name.  The category can also be set
 with a special line anywhere in the buffer, looking like this:
 @example
-#+CATEGORY: Cheops
+#+CATEGORY: Thesis
 @end example
 @noindent
 After changing this line, press @kbd{C-c C-c} with the cursor still in
@@ -1452,6 +1451,53 @@
 The display in the agenda buffer looks best if the category is not
 longer than 10 characters.
 
+@subsection Time Specifications
+
+Org-mode checks each agenda item for a time specification.  The time
+can be part of the time stamp that triggered inclusion into the agenda,
+for example as in @w{@samp{<2005-05-10 Tue 19:00>}}.  Time ranges can
+be specified with two time stamps, like
+@c
+@w{@samp{<2005-05-10 Tue 20:30>--<2005-05-10 Tue 22:15>}}.
+
+In the headline of the entry itself, a time(range) may also appear as
+plain text (like @samp{12:45} or a @samp{8:30-1pm}.  If the agenda
+integrates the Emacs diary (@pxref{Calendar/Diary integration}), time
+specifications in diary entries are recognized as well.
+
+For agenda display, Org-mode extracts the time and displays it in a
+standard 24 hour format as part of the prefix.  The example times in
+the previous paragraphs would end up in the agenda like this:
+
+@example
+    8:30-13:00 Arthur Dent lies in front of the bulldozer
+   12:45...... Ford Prefect arrives and takes Arthur to the pub
+   19:00...... The Vogon reads his poem
+   20:30-22:15 Marwin escorts the Hitchhikers to the bridge
+@end example
+
+If the agenda is in single-day mode, or for the display of today, the
+timed entries are embedded in a time grid, like
+
+@example
+    8:00...... ------------------
+    8:30-13:00 Arthur Dent lies in front of the bulldozer
+   10:00...... ------------------
+   12:00...... ------------------
+   12:45...... Ford Prefect arrives and takes Arthur to the pub
+   14:00...... ------------------
+   16:00...... ------------------
+   18:00...... ------------------
+   19:00...... The Vogon reads his poem
+   20:00...... ------------------
+   20:30-22:15 Marwin escorts the Hitchhikers to the bridge
+@end example
+
+The time grid can be turned on and off with the variable
+@code{org-agenda-use-time-grid}, and can be configured with
+@code{org-agenda-time-grid}.
+
+
 @subsection Sorting of agenda items
 @cindex sorting, of agenda items
 @cindex priorities, of agenda items
@@ -1462,13 +1508,6 @@
 categories, in the sequence given by @code{org-agenda-files}.  Within
 each category, items are sorted by priority (@pxref{Priorities}).
 
-A time-of-day specification looks like @samp{12:45} or @samp{3pm} and
-must appear in the headline.  For example, a timestamp in a headline
-that contains not only a date but also a time will trigger this
-mechanism.  Specifications of a time in diary entries are recognized
-as well, so the schedule will be mixed from diary entries and Org-mode
-files.
-
 The priority is a numerical quantity composed of the base priority
 (2000 for priority @samp{A}, 1000 for @samp{B}, and 0 for @samp{C}),
 plus additional increments for overdue scheduled or deadline items.
@@ -1539,6 +1578,11 @@
 @item d
 Toggle the inclusion of diary entries.  See @ref{Calendar/Diary integration}.
 
+@kindex g
+@item g
+Toggle the time grid on and off.  See also the variables
+@code{org-agenda-use-time-grid} and @code{org-agenda-time-grid}.
+
 @kindex r
 @item r
 Recreate the agenda buffer, for example to reflect the changes
@@ -1914,7 +1958,7 @@
 @menu
 * Completion::                  M-TAB knows what you need
 * Customization::               Adapting Org-mode to your taste
-* Tips and Tricks::             An author-imposed FAQ, sort of
+* FAQ::                         Frequently asked questions
 * Interaction::                 Other Emacs packages
 * Acknowledgments::             These people provided feedback and more
 * Bugs::                        Things which do not work perfectly
@@ -1950,7 +1994,7 @@
 @end itemize
 @end table
 
-@node Customization, Tips and Tricks, Completion, Miscellaneous
+@node Customization, FAQ, Completion, Miscellaneous
 @section Customization
 @cindex customization
 @cindex options, for customization
@@ -1962,64 +2006,36 @@
 variables, use @kbd{M-x org-customize}.  Or select @code{Browse Org
 Group} from the @code{Org->Customization} menu.
 
-@node Tips and Tricks, Interaction, Customization, Miscellaneous
-@section Tips and Tricks
+@node FAQ, Interaction, Customization, Miscellaneous
+@section Frequently asked questions
 
-@itemize @bullet
-@cindex README files
-@item
-I find Org-mode very useful for the many @file{README} files I have
-scattered through my directories.  So I turn on @file{org-mode} for
-all @file{README} files with
-
+@enumerate
+@item @b{Org-mode seems to be useful default mode for the various
+@file{README} files I have scattered through my directories.  How do I
+turn it on for all @file{README} files?}
 @example
 (add-to-list 'auto-mode-alist '("README$" . org-mode))
 @end example
 
-@ignore
-@cindex files, adding automatically
-@item
-If you would like to add all org files you ever create to the list of
-agenda files@footnote{Think twice.  Do you @emph{really} want this?},
-you could do so with
-
-@lisp
-(add-hook 'org-mode-hook 'org-add-file)
-@end lisp
-
-If you would like to add only a selection, for example everything
-except the @file{README} files, this could be achieved in the
-following way:
-
-@lisp
-(add-hook 'org-mode-hook
-          (lambda ()
-             (or (string-match "README\\'" (buffer-file-name))
-                 (org-add-file))))
-@end lisp
-@end ignore
-
+@item @b{I would like to have two windows on the same Org-mode
+file, but with different outline visibility.  Is that possible?}@*
 @cindex @code{make-indirect-buffer}
 @cindex indirect buffers
-@item
-It can be useful to have two different windows showing the same
-Org-mode file.  However, a problem here is that changes to the
-visibility in one window immediately affect the other window.  On
-Emacs (not on XEmacs because it uses the old outline-mode) a way out
-is the use of @emph{indirect buffers}, which visit the same file, but
-have separate settings, also for outline visibility.  See the
-documentation on the command @code{make-indirect-buffer}.
+In GNU Emacs, you may use @emph{indirect buffers} which do exactly
+this.  See the documentation on the command
+@code{make-indirect-buffer}.  In XEmacs, this is currently not
+possible because of the different outline implementation., which visit
+the same file, but have separate settings, also for outline
+visibility.
 
+@item @b{Is there an easy way to insert links to web locations?}@*
 @cindex URL, paste into buffer
-@item
-Paste URLs into Org-mode whenever this seems useful.  For example, if
-you are writing notes about a paper which is available on the web, put
-the corresponding URL there and a direct look at the paper is only a
-mouse click away.  If you have a local copy of the paper, use a
-file:path link.
+Sure, just paste them into the buffer.  A plain-text URL-like string
+is directly interpreted as a link.
 
-@cindex headline levels, for export
-@item
+@item @b{When I export my TODO list, every TODO item becomes a
+separate section.  How do I enforce these items to be exported as an
+itemized list?}@*
 If you plan to use ASCII or HTML export, make sure things you want to
 be exported as item lists are level 4 at least, even if that does mean
 there is a level jump.  For example
@@ -2039,44 +2055,34 @@
 +OPTIONS:   H:2; ...
 @end example
 
+@item @b{I would like to export only a subtree of my file to HTML.  How?}@*
 @cindex exporting a subtree
-@item
 If you want to export a subtree, mark the subtree as region and then
 export.  Marking can be done with @kbd{C-c @@ C-x C-x}, for example.
 
+@item @b{Is there an easy way to insert an empty table template with a
+default number of rows and columns?}@*
 @cindex table, empty template
-@item
 To insert an empty table template, just type @samp{|-} and use
-@key{TAB}.
-
-@item
-In a table, to add a new column at the end, just type some text
-anywhere after the final @samp{|}.  Upon the next re-align, a new
-column will be created.
-
-@item
-In tables, @key{TAB} creates new rows before horizontal separator lines.  If
-the cursor is at @samp{Age} in the following table,
+@key{TAB}.  The default size can be changed with the variable
+@code{org-table-default-size}. 
 
-@example
-| Name  | Phone | Age |
-|-------+-------+-----|
-|       |       |     |
-@end example
+@item @b{When I am in the last column of a table and just above a
+horizontal line in the table, pressing TAB creates a new table line
+@i{before} the horizontal line.  How can I quickly move to the line
+@i{below} the horizontal line instead?}@*
+Press @key{down} (to get on the separator line) and then @key{TAB}.
 
-the next @key{TAB} would create a second header line.  If you want
-instead to go to the first empty field below the horizontal line,
-press @key{down} (to get on the separator line) and then @key{TAB}.
-
+@item @b{How can I change the indentation of an entire table without
+fixing every line by hand?}@*
 @cindex indentation, of tables
-@item
-To change the indentation of a table, just change the first line and
-realign with @key{TAB}.
+The indentation of a table is set by the first line.  So just fix the
+indentation of the first line and realign with @key{TAB}.
 
-@end itemize
+@end enumerate
 
 
-@node Interaction, Acknowledgments, Tips and Tricks, Miscellaneous
+@node Interaction, Acknowledgments, FAQ, Miscellaneous
 @section Interaction with other packages
 @cindex packages, interaction with other
 @cindex @file{planner.el}
@@ -2143,6 +2149,9 @@
 Carsten Wimmer suggested some changes and helped fix a bug in linking
 to GNUS.
 @item
+Pavel Chalmoviansky reported bugs and suggested improvements related
+to the agenda treatment of items with specifed time.
+@item
 Stefan Monnier provided a patch with lots of little fixes to keep the
 Emacs-Lisp compiler happy.
 @end itemize
--- a/man/widget.texi	Fri May 20 17:44:36 2005 +0000
+++ b/man/widget.texi	Sat May 28 21:04:38 2005 +0000
@@ -596,7 +596,7 @@
 @vindex follow-link@r{ keyword}
 @item :follow-link
 Specifies how to interpret a @key{mouse-1} click on the widget.
-@xref{Enabling Mouse-1 to Follow Links,,, elisp, the Emacs Lisp Reference Manual}.
+@xref{Links and Mouse-1,,, elisp, the Emacs Lisp Reference Manual}.
 
 @vindex indent@r{ keyword}
 @item :indent
--- a/nt/ChangeLog	Fri May 20 17:44:36 2005 +0000
+++ b/nt/ChangeLog	Sat May 28 21:04:38 2005 +0000
@@ -1,3 +1,10 @@
+2005-05-24  Juanma Barranquero  <lekktu@gmail.com>
+
+	* INSTALL: Add more pointers to ports of Unix tools to Windows,
+	and to the Emacs Wiki (which contains building instructions for
+	Windows).  Reword image library instructions and remove obsolete
+	incompatibility information.
+
 2005-04-23  David Hunter  <hunterd42@comcast.net>  (tiny change)
 
 	* config.nt (HAVE_PWD_H): Undef.
--- a/nt/INSTALL	Fri May 20 17:44:36 2005 +0000
+++ b/nt/INSTALL	Sat May 28 21:04:38 2005 +0000
@@ -1,7 +1,7 @@
 		      Building and Installing Emacs
 		on Windows NT/2K/XP and Windows 95/98/ME
 
-  Copyright (c) 2001,2004 Free Software Foundation, Inc.
+  Copyright (c) 2001,2004,2005 Free Software Foundation, Inc.
   See the end of the file for copying permissions.
 
   If you used WinZip to unpack the distribution, we suggest to
@@ -21,9 +21,9 @@
   in your path, and that it will create files that do not yet exist.
 
   To compile Emacs, you will need either Microsoft Visual C++ 2.0 or
-  later and nmake, or a Windows port of GCC 2.95 or later with Mingw
+  later and nmake, or a Windows port of GCC 2.95 or later with MinGW
   and W32 API support and a port of GNU make.  You can use the Cygwin
-  ports of GCC, but Emacs requires the Mingw headers and libraries to
+  ports of GCC, but Emacs requires the MinGW headers and libraries to
   build (latest versions of the Cygwin toolkit, at least since v1.3.3,
   include the MinGW headers and libraries as an integral part).
 
@@ -34,14 +34,22 @@
   like this, we recommend the use of the supported compilers mentioned
   in the previous paragraph.
 
-  You will also need a copy of the Posix cp, rm and mv programs. These
-  and other useful Posix utilities can be obtained from the Mingw or
-  Cygwin projects.
+  You will also need a copy of the Posix cp, rm and mv programs.  These
+  and other useful Posix utilities can be obtained from one of several
+  projects:
+
+  * http://www.mingw.org/                         ( MinGW    )
+  * http://www.cygwin.com/                        ( Cygwin   )
+  * http://unxutils.sourceforge.net/              ( UnxUtils )
+  * http://gnuwin32.sourceforge.net/              ( GnuWin32 )
 
   If you build Emacs on Windows 9X or ME, not on Windows 2K/XP or
   Windows NT, we suggest to install the Cygwin port of Bash.
 
-  Please see http://www.mingw.org for pointers to GCC/Mingw and binaries.
+  Additional instructions and help for building Emacs on Windows can be
+  found at the Emacs Wiki:
+
+  http://www.emacswiki.org/cgi-bin/wiki/WThirtyTwoInstallationKit
 
   For reference, here is a list of which builds of GNU make are known
   to work or not, and whether they work in the presence and/or absence
@@ -109,9 +117,13 @@
   able to detect the headers.
 
   To use the external image support, the DLLs implementing the
-  functionality must be found when Emacs is started, either on the PATH,
-  or in the same directory as emacs.exe.  Failure to find a library is
-  not an error; the associated image format will simply be unavailable.
+  functionality must be found when Emacs first needs them, either on the
+  PATH, or in the same directory as emacs.exe.  Failure to find a
+  library is not an error; the associated image format will simply be
+  unavailable.  Note that once Emacs has determined that a library can
+  not be found, there's no way to force it to try again, other than
+  restarting.  See the variable `image-library-alist' to configure the
+  expected names of the libraries.
 
   Some image libraries have dependencies on one another, or on zlib.
   For example, tiff support depends on the jpeg library.  If you did not
@@ -120,14 +132,8 @@
   compatible (for example, that they were built with the same compiler).
 
   Binaries for the image libraries (among many others) can be found at
-  GnuWin32 (http://gnuwin32.sourceforge.net).  These are built with
-  MinGW, and so are very compatible with GCC/MinGW builds of Emacs (like
-  the official binary tarballs for Windows).  Compatibility with MSVC,
-  on the other hand, is still weak and should not be trusted in
-  production environments; if you really need an MSVC-compiled Emacs
-  with image support, you should try to build the required libraries
-  with the same compiler (though it can be extremely non-trivial, and
-  we'll be interested on hearing of any such effort).
+  the GnuWin32 project.  These are built with MinGW, but they can be
+  used with both GCC/MinGW and MSVC builds of Emacs.
 
 * Building
 
@@ -162,7 +168,7 @@
 * Trouble-shooting
 
   The main problems that are likely to be encountered when building
-  Emacs stem from using an old version of GCC, or old Mingw or W32 API
+  Emacs stem from using an old version of GCC, or old MinGW or W32 API
   headers.  Additionally, cygwin ports of GNU make may require the Emacs
   source tree to be mounted with text!=binary, because the makefiles
   generated by configure.bat necessarily use DOS line endings.  Also,
--- a/src/ChangeLog	Fri May 20 17:44:36 2005 +0000
+++ b/src/ChangeLog	Sat May 28 21:04:38 2005 +0000
@@ -1,6 +1,110 @@
+2005-05-28  Masatake YAMATO  <jet@gyve.org>
+
+	* xdisp.c (note_mode_line_or_margin_highlight): Change the
+	pointer to a hand cursor when hoovering over a mouse-face.
+
+2005-05-27  Kenichi Handa  <handa@m17n.org>
+
+	* xterm.c (x_encode_char): Call check_ccl_update in advance.
+
+	* ccl.c: Now an element of Vccl_program_table is a vector of
+	length 4, not 3.
+	(ccl_get_compiled_code): New arg idx.  Caller changed.  Adjusted
+	for the change of Vccl_program_table.
+	(setup_ccl_program): Adjusted for the change of
+	Vccl_program_table.
+	(check_ccl_update): New function.
+	(Fregister_ccl_program): Use ASET to set an element of a vector.
+	Adjusted for the change of Vccl_program_table.
+
+	* ccl.h (struct ccl_program): New member idx.
+	(check_ccl_update): Extern it.
+
+2005-05-27  Juanma Barranquero  <lekktu@gmail.com>
+
+	* image.c (Vimage_library_alist): Moved from image.el.
+	(syms_of_image): Defvar it.
+	(lookup_image_type): Use it.
+
+	* buffer.c (Fbuffer_local_value): Make argument name match its use
+	in docstring.
+
+2005-05-26  Juanma Barranquero  <lekktu@gmail.com>
+
+	* keyboard.c (Frecursive_edit): Fix typo in docstring.
+	(Fposn_at_x_y): Make argument name match its use in docstring.
+
+2005-05-26  Lute Kamstra  <lute@gnu.org>
+
+	* eval.c (Frun_hooks): Mention run-mode-hooks in docstring.
+
+2005-05-24  Masatake YAMATO  <jet@gyve.org>
+
+	* xdisp.c (note_mode_line_or_margin_highlight): Use b and e
+	as loop sentinels.
+
+2005-05-24  Nick Roberts  <nickrob@snap.net.nz>
+
+	* xmenu.c (Fx_popup_dialog): Add a third boolean argument to
+	select frame title ("Question"/"Information").
+	(xdialog_show): Use it.
+
+	* macmenu.c (Fx_popup_dialog, mac_dialog_show): As for xmenu.c.
+
+	* w32menu.c (Fx_popup_dialog, w32_dialog_show): As for xmenu.c.
+
+	* fns.c (Fyes_or_no_p, Fy_or_n_p): Call Fx_popup_dialog with
+	a third argument (Qnil).
+
+	* lisp.h: x-popup-dialog can have three arguments.
+
+	* editfns.c (Fmessage_box): Use "Information" for frame title.
+
+2005-05-23  Thien-Thi Nguyen  <ttn@gnu.org>
+
+	* termcap.c [VMS]: Include <starlet.h>.
+
+2005-05-23  Masatake YAMATO  <jet@gyve.org>
+
+	* xdisp.c (note_mode_line_or_margin_highlight): Add code
+	for mouse-face.  Change the type of the first argument from `window'
+	to `Lisp_Object'.
+	(note_mouse_highlight): Call note_mode_line_or_margin_highlight with
+	window instead of w.
+
+2005-05-22  Andreas Schwab  <schwab@suse.de>
+
+	* process.c (send_process): Move misplaced volatile.
+
+2005-05-21  Richard M. Stallman  <rms@gnu.org>
+
+	* xdisp.c (display_mode_element): If we're processing a list and
+	padding is specified, put it after the last element.
+
+2005-05-21  Eli Zaretskii  <eliz@gnu.org>
+
+	* fileio.c (Fexpand_file_name) [DOS_NT]: Don't try to support
+	"superroot" on DOS_NT systems.
+
+2005-05-21  David Hunter  <hunterd42@comcast.net>  (tiny change)
+
+	* process.c (send_process): Restore the SIGPIPE handler if we
+	catch a SIGPIPE.
+
+2005-05-20  Juanma Barranquero  <lekktu@gmail.com>
+
+	* image.c (lookup_image, png_read_from_memory): Remove hacks (and
+	misleading comments).
+	(DEF_IMGLIB_FN): Use C calling convention for image libraries.
+
+2005-05-20  KOBAYASHI Yasuhiro  <kobayays@otsukakj.co.jp>
+
+	* window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges):
+	Correct the right value.
+
 2005-05-19  Nick Roberts  <nickrob@snap.net.nz>
 
-	* keyboard.c (syms_of_keyboard): Remove lisp variables
+	* keyboard.c (syms_of_keyboard): Remove Lisp variables
 	post-command-idle-hook and post-command-idle-delay.
 	(command_loop_1): Don't try to execute post-command-idle-hook.
 
--- a/src/alloc.c	Fri May 20 17:44:36 2005 +0000
+++ b/src/alloc.c	Sat May 28 21:04:38 2005 +0000
@@ -1685,7 +1685,7 @@
 
 /* We check for overrun in string data blocks by appending a small
    "cookie" after each allocated string data block, and check for the
-   presense of this cookie during GC.  */
+   presence of this cookie during GC.  */
 
 #define GC_STRING_OVERRUN_COOKIE_SIZE	4
 static char string_overrun_cookie[GC_STRING_OVERRUN_COOKIE_SIZE] =
--- a/src/buffer.c	Fri May 20 17:44:36 2005 +0000
+++ b/src/buffer.c	Sat May 28 21:04:38 2005 +0000
@@ -877,20 +877,20 @@
        Sbuffer_local_value, 2, 2, 0,
        doc: /* Return the value of VARIABLE in BUFFER.
 If VARIABLE does not have a buffer-local binding in BUFFER, the value
-is the default binding of variable. */)
-     (symbol, buffer)
-     register Lisp_Object symbol;
+is the default binding of the variable. */)
+     (variable, buffer)
+     register Lisp_Object variable;
      register Lisp_Object buffer;
 {
   register struct buffer *buf;
   register Lisp_Object result;
 
-  CHECK_SYMBOL (symbol);
+  CHECK_SYMBOL (variable);
   CHECK_BUFFER (buffer);
   buf = XBUFFER (buffer);
 
   /* Look in local_var_list */
-  result = Fassoc (symbol, buf->local_var_alist);
+  result = Fassoc (variable, buf->local_var_alist);
   if (NILP (result))
     {
       int offset, idx;
@@ -905,7 +905,7 @@
 	  idx = PER_BUFFER_IDX (offset);
 	  if ((idx == -1 || PER_BUFFER_VALUE_P (buf, idx))
 	      && SYMBOLP (PER_BUFFER_SYMBOL (offset))
-	      && EQ (PER_BUFFER_SYMBOL (offset), symbol))
+	      && EQ (PER_BUFFER_SYMBOL (offset), variable))
 	    {
 	      result = PER_BUFFER_VALUE (buf, offset);
 	      found = 1;
@@ -914,7 +914,7 @@
 	}
 
       if (!found)
-	result = Fdefault_value (symbol);
+	result = Fdefault_value (variable);
     }
   else
     {
@@ -922,7 +922,7 @@
       Lisp_Object current_alist_element;
 
       /* What binding is loaded right now?  */
-      valcontents = SYMBOL_VALUE (symbol);
+      valcontents = SYMBOL_VALUE (variable);
       current_alist_element
 	= XCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr);
 
@@ -939,7 +939,7 @@
     }
 
   if (EQ (result, Qunbound))
-    return Fsignal (Qvoid_variable, Fcons (symbol, Qnil));
+    return Fsignal (Qvoid_variable, Fcons (variable, Qnil));
 
   return result;
 }
@@ -5276,19 +5276,19 @@
 		     doc: /* Default value of `ctl-arrow' for buffers that do not override it.
 This is the same as (default-value 'ctl-arrow).  */);
 
-   DEFVAR_LISP_NOPRO ("default-direction-reversed",
-		      &buffer_defaults.direction_reversed,
-		      doc: /* Default value of `direction-reversed' for buffers that do not override it.
+  DEFVAR_LISP_NOPRO ("default-direction-reversed",
+                     &buffer_defaults.direction_reversed,
+                     doc: /* Default value of `direction-reversed' for buffers that do not override it.
 This is the same as (default-value 'direction-reversed).  */);
 
-   DEFVAR_LISP_NOPRO ("default-enable-multibyte-characters",
-		      &buffer_defaults.enable_multibyte_characters,
-		      doc: /* *Default value of `enable-multibyte-characters' for buffers not overriding it.
+  DEFVAR_LISP_NOPRO ("default-enable-multibyte-characters",
+                     &buffer_defaults.enable_multibyte_characters,
+                     doc: /* *Default value of `enable-multibyte-characters' for buffers not overriding it.
 This is the same as (default-value 'enable-multibyte-characters).  */);
 
-   DEFVAR_LISP_NOPRO ("default-buffer-file-coding-system",
-		      &buffer_defaults.buffer_file_coding_system,
-		      doc: /* Default value of `buffer-file-coding-system' for buffers not overriding it.
+  DEFVAR_LISP_NOPRO ("default-buffer-file-coding-system",
+                     &buffer_defaults.buffer_file_coding_system,
+                     doc: /* Default value of `buffer-file-coding-system' for buffers not overriding it.
 This is the same as (default-value 'buffer-file-coding-system).  */);
 
   DEFVAR_LISP_NOPRO ("default-truncate-lines",
--- a/src/ccl.c	Fri May 20 17:44:36 2005 +0000
+++ b/src/ccl.c	Sat May 28 21:04:38 2005 +0000
@@ -49,10 +49,12 @@
 Lisp_Object Qccl_program_idx;
 
 /* Table of registered CCL programs.  Each element is a vector of
-   NAME, CCL_PROG, and RESOLVEDP where NAME (symbol) is the name of
-   the program, CCL_PROG (vector) is the compiled code of the program,
-   RESOLVEDP (t or nil) is the flag to tell if symbols in CCL_PROG is
-   already resolved to index numbers or not.  */
+   NAME, CCL_PROG, RESOLVEDP, and UPDATEDP, where NAME (symbol) is the
+   name of the program, CCL_PROG (vector) is the compiled code of the
+   program, RESOLVEDP (t or nil) is the flag to tell if symbols in
+   CCL_PROG is already resolved to index numbers or not, UPDATEDP (t
+   or nil) is the flat to tell if the CCL program is updated after it
+   was once used.  */
 Lisp_Object Vccl_program_table;
 
 /* Vector of registered hash tables for translation.  */
@@ -2028,14 +2030,16 @@
    symbols, return Qnil.  */
 
 static Lisp_Object
-ccl_get_compiled_code (ccl_prog)
+ccl_get_compiled_code (ccl_prog, idx)
      Lisp_Object ccl_prog;
+     int *idx;
 {
   Lisp_Object val, slot;
 
   if (VECTORP (ccl_prog))
     {
       val = resolve_symbol_ccl_program (ccl_prog);
+      *idx = -1;
       return (VECTORP (val) ? val : Qnil);
     }
   if (!SYMBOLP (ccl_prog))
@@ -2047,9 +2051,10 @@
     return Qnil;
   slot = AREF (Vccl_program_table, XINT (val));
   if (! VECTORP (slot)
-      || ASIZE (slot) != 3
+      || ASIZE (slot) != 4
       || ! VECTORP (AREF (slot, 1)))
     return Qnil;
+  *idx = XINT (val);
   if (NILP (AREF (slot, 2)))
     {
       val = resolve_symbol_ccl_program (AREF (slot, 1));
@@ -2078,7 +2083,7 @@
     {
       struct Lisp_Vector *vp;
 
-      ccl_prog = ccl_get_compiled_code (ccl_prog);
+      ccl_prog = ccl_get_compiled_code (ccl_prog, &ccl->idx);
       if (! VECTORP (ccl_prog))
 	return -1;
       vp = XVECTOR (ccl_prog);
@@ -2086,6 +2091,13 @@
       ccl->prog = vp->contents;
       ccl->eof_ic = XINT (vp->contents[CCL_HEADER_EOF]);
       ccl->buf_magnification = XINT (vp->contents[CCL_HEADER_BUF_MAG]);
+      if (ccl->idx >= 0)
+	{
+	  Lisp_Object slot;
+
+	  slot = AREF (Vccl_program_table, ccl->idx);
+	  ASET (slot, 3, Qnil);
+	}
     }
   ccl->ic = CCL_HEADER_MAIN;
   for (i = 0; i < 8; i++)
@@ -2100,6 +2112,33 @@
   return 0;
 }
 
+
+/* Check if CCL is updated or not.  If not, re-setup members of CCL.  */
+
+int
+check_ccl_update (ccl)
+     struct ccl_program *ccl;
+{
+  struct Lisp_Vector *vp;
+  Lisp_Object slot, ccl_prog;
+
+  if (ccl->idx < 0)
+    return 0;
+  slot = AREF (Vccl_program_table, ccl->idx);
+  if (NILP (AREF (slot, 3)))
+    return 0;
+  ccl_prog = ccl_get_compiled_code (AREF (slot, 0), &ccl->idx);
+  if (! VECTORP (ccl_prog))
+    return -1;
+  ccl->size = ASIZE (ccl_prog);
+  ccl->prog = XVECTOR (ccl_prog)->contents;
+  ccl->eof_ic = XINT (AREF (ccl_prog, CCL_HEADER_EOF));
+  ccl->buf_magnification = XINT (AREF (ccl_prog, CCL_HEADER_BUF_MAG));
+  ASET (slot, 3, Qnil);
+  return 0;
+}
+
+
 DEFUN ("ccl-program-p", Fccl_program_p, Sccl_program_p, 1, 1, 0,
        doc: /* Return t if OBJECT is a CCL program name or a compiled CCL program code.
 See the documentation of  `define-ccl-program' for the detail of CCL program.  */)
@@ -2298,8 +2337,9 @@
       if (EQ (name, AREF (slot, 0)))
 	{
 	  /* Update this slot.  */
-	  AREF (slot, 1) = ccl_prog;
-	  AREF (slot, 2) = resolved;
+	  ASET (slot, 1, ccl_prog);
+	  ASET (slot, 2, resolved);
+	  ASET (slot, 3, Qt);
 	  return make_number (idx);
 	}
     }
@@ -2312,19 +2352,19 @@
 
       new_table = Fmake_vector (make_number (len * 2), Qnil);
       for (j = 0; j < len; j++)
-	AREF (new_table, j)
-	  = AREF (Vccl_program_table, j);
+	ASET (new_table, j, AREF (Vccl_program_table, j));
       Vccl_program_table = new_table;
     }
 
   {
     Lisp_Object elt;
 
-    elt = Fmake_vector (make_number (3), Qnil);
-    AREF (elt, 0) = name;
-    AREF (elt, 1) = ccl_prog;
-    AREF (elt, 2) = resolved;
-    AREF (Vccl_program_table, idx) = elt;
+    elt = Fmake_vector (make_number (4), Qnil);
+    ASET (elt, 0, name);
+    ASET (elt, 1, ccl_prog);
+    ASET (elt, 2, resolved);
+    ASET (elt, 3, Qt);
+    ASET (Vccl_program_table, idx, elt);
   }
 
   Fput (name, Qccl_program_idx, make_number (idx));
--- a/src/ccl.h	Fri May 20 17:44:36 2005 +0000
+++ b/src/ccl.h	Sat May 28 21:04:38 2005 +0000
@@ -33,6 +33,10 @@
 /* Structure to hold information about running CCL code.  Read
    comments in the file ccl.c for the detail of each field.  */
 struct ccl_program {
+  int idx;			/* Index number of the CCL program.
+				   -1 means that the program was given
+				   by a vector, not by a program
+				   name.  */
   int size;			/* Size of the compiled code.  */
   Lisp_Object *prog;		/* Pointer into the compiled code.  */
   int ic;			/* Instruction Counter (index for PROG).  */
@@ -90,6 +94,9 @@
    execution of ccl program CCL_PROG (symbol or vector).  */
 extern int setup_ccl_program P_ ((struct ccl_program *, Lisp_Object));
 
+/* Check if CCL is updated or not.  If not, re-setup members of CCL.  */
+extern int check_ccl_update P_ ((struct ccl_program *));
+
 extern int ccl_driver P_ ((struct ccl_program *, unsigned char *,
 			   unsigned char *, int, int, int *));
 
--- a/src/editfns.c	Fri May 20 17:44:36 2005 +0000
+++ b/src/editfns.c	Sat May 28 21:04:38 2005 +0000
@@ -3175,7 +3175,7 @@
 	pane = Fcons (Fcons (build_string ("OK"), Qt), Qnil);
 	GCPRO1 (pane);
 	menu = Fcons (val, pane);
-	obj = Fx_popup_dialog (Qt, menu);
+	obj = Fx_popup_dialog (Qt, menu, Qt);
 	UNGCPRO;
 	return val;
       }
--- a/src/eval.c	Fri May 20 17:44:36 2005 +0000
+++ b/src/eval.c	Sat May 28 21:04:38 2005 +0000
@@ -2292,7 +2292,7 @@
 					   enum run_hooks_condition));
 
 DEFUN ("run-hooks", Frun_hooks, Srun_hooks, 0, MANY, 0,
-       doc: /* Run each hook in HOOKS.  Major mode functions use this.
+       doc: /* Run each hook in HOOKS.
 Each argument should be a symbol, a hook variable.
 These symbols are processed in the order specified.
 If a hook symbol has a non-nil value, that value may be a function
@@ -2300,6 +2300,9 @@
 If the value is a function, it is called with no arguments.
 If it is a list, the elements are called, in order, with no arguments.
 
+Major modes should not use this function directly to run their mode
+hook; they should use `run-mode-hooks' instead.
+
 Do not use `make-local-variable' to make a hook variable buffer-local.
 Instead, use `add-hook' and specify t for the LOCAL argument.
 usage: (run-hooks &rest HOOKS)  */)
--- a/src/fileio.c	Fri May 20 17:44:36 2005 +0000
+++ b/src/fileio.c	Sat May 28 21:04:38 2005 +0000
@@ -1653,8 +1653,16 @@
 	  p += 2;
 	}
       else if (IS_DIRECTORY_SEP (p[0]) && p[1] == '.' && p[2] == '.'
-	       /* `/../' is the "superroot" on certain file systems.  */
+	       /* `/../' is the "superroot" on certain file systems.
+		  Turned off on DOS_NT systems because they have no
+		  "superroot" and because this causes us to produce
+		  file names like "d:/../foo" which fail file-related
+		  functions of the underlying OS.  (To reproduce, try a
+		  long series of "../../" in default_directory, longer
+		  than the number of levels from the root.)  */
+#ifndef DOS_NT
 	       && o != target
+#endif
 	       && (IS_DIRECTORY_SEP (p[3]) || p[3] == 0))
 	{
 	  while (o != target && (--o) && !IS_DIRECTORY_SEP (*o))
--- a/src/fns.c	Fri May 20 17:44:36 2005 +0000
+++ b/src/fns.c	Sat May 28 21:04:38 2005 +0000
@@ -3276,7 +3276,7 @@
 			Fcons (Fcons (build_string ("No"), Qnil),
 			       Qnil));
 	  menu = Fcons (prompt, pane);
-	  obj = Fx_popup_dialog (Qt, menu);
+	  obj = Fx_popup_dialog (Qt, menu, Qnil);
 	  answer = !NILP (obj);
 	  break;
 	}
@@ -3408,7 +3408,7 @@
 			   Qnil));
       GCPRO1 (pane);
       menu = Fcons (prompt, pane);
-      obj = Fx_popup_dialog (Qt, menu);
+      obj = Fx_popup_dialog (Qt, menu, Qnil);
       UNGCPRO;
       return obj;
     }
--- a/src/image.c	Fri May 20 17:44:36 2005 +0000
+++ b/src/image.c	Sat May 28 21:04:38 2005 +0000
@@ -616,6 +616,10 @@
 
 Lisp_Object Vimage_types;
 
+/* An alist of image types and libraries that implement the type.  */
+
+Lisp_Object Vimage_library_alist;
+
 /* Cache for delayed-loading image types.  */
 
 static Lisp_Object Vimage_type_cache;
@@ -696,7 +700,7 @@
   struct image_type *type;
 
   /* We must initialize the image-type if it hasn't been already.  */
-  if (NILP (Finit_image_library (symbol, Qnil)))
+  if (NILP (Finit_image_library (symbol, Vimage_library_alist)))
     return 0;			/* unimplemented */
 
   for (type = image_types; type; type = type->next)
@@ -1631,11 +1635,6 @@
      Lisp_Object spec;
 {
   struct image_cache *c = FRAME_X_IMAGE_CACHE (f);
-#ifdef _MSC_VER
-  /* Work around a problem with MinGW builds of graphics libraries
-     not honoring calling conventions.  */
-  static
-#endif
   struct image *img;
   int i;
   unsigned hash;
@@ -1815,7 +1814,7 @@
 #ifdef HAVE_NTGUI
 
 /* Macro for defining functions that will be loaded from image DLLs.  */
-#define DEF_IMGLIB_FN(func) FARPROC fn_##func
+#define DEF_IMGLIB_FN(func) int (FAR CDECL *fn_##func)()
 
 /* Macro for loading those image functions from the library.  */
 #define LOAD_IMGLIB_FN(lib,func) {					\
@@ -5744,12 +5743,6 @@
    PNG_PTR is a pointer to the PNG control structure.  Copy LENGTH
    bytes from the input to DATA.  */
 
-#ifdef _MSC_VER
-  /* Work around a problem with MinGW builds of graphics libraries
-     not honoring calling conventions.  */
-#pragma optimize("g", off)
-#endif
-
 static void
 png_read_from_memory (png_ptr, data, length)
      png_structp png_ptr;
@@ -5766,10 +5759,6 @@
   tbr->index = tbr->index + length;
 }
 
-#ifdef _MSC_VER
-/* Restore normal optimization, as specified on the command line.  */
-#pragma optimize("", on)
-#endif
 
 /* Load PNG image IMG for use on frame F.  Value is non-zero if
    successful.  */
@@ -8000,6 +7989,8 @@
 void
 syms_of_image ()
 {
+  extern Lisp_Object Qrisky_local_variable;   /* Syms_of_xdisp has already run.  */
+
   /* Must be defined now becase we're going to update it below, while
      defining the supported image types.  */
   DEFVAR_LISP ("image-types", &Vimage_types,
@@ -8008,6 +7999,20 @@
 To check whether it is really supported, use `image-type-available-p'.  */);
   Vimage_types = Qnil;
 
+  DEFVAR_LISP ("image-library-alist", &Vimage_library_alist,
+    doc: /* Alist of image types vs external libraries needed to display them.
+
+Each element is a list (IMAGE-TYPE LIBRARY...), where the car is a symbol
+representing a supported image type, and the rest are strings giving
+alternate filenames for the corresponding external libraries.
+
+Emacs tries to load the libraries in the order they appear on the
+list; if none is loaded, the running session of Emacs won't
+support the image type.  Types 'pbm and 'xbm don't need to be
+listed; they're always supported.  */);
+  Vimage_library_alist = Qnil;
+  Fput (intern ("image-library-alist"), Qrisky_local_variable, Qt);
+
   Vimage_type_cache = Qnil;
   staticpro (&Vimage_type_cache);
 
--- a/src/keyboard.c	Fri May 20 17:44:36 2005 +0000
+++ b/src/keyboard.c	Sat May 28 21:04:38 2005 +0000
@@ -1009,7 +1009,7 @@
        doc: /* Invoke the editor command loop recursively.
 To get out of the recursive edit, a command can do `(throw 'exit nil)';
 that tells this function to return.
-Alternately, `(throw 'exit t)' makes this function signal an error.
+Alternatively, `(throw 'exit t)' makes this function signal an error.
 This function is called by the editor initialization to begin editing.  */)
      ()
 {
@@ -10677,7 +10677,7 @@
 DEFUN ("posn-at-x-y", Fposn_at_x_y, Sposn_at_x_y, 2, 4, 0,
        doc: /* Return position information for pixel coordinates X and Y.
 By default, X and Y are relative to text area of the selected window.
-Optional third arg FRAME_OR_WINDOW non-nil specifies frame or window.
+Optional third arg FRAME-OR-WINDOW non-nil specifies frame or window.
 If optional fourth arg WHOLE is non-nil, X is relative to the left
 edge of the window.
 
@@ -10983,7 +10983,7 @@
   staticpro (&Qdrag_n_drop);
 
   Qsave_session = intern ("save-session");
-  staticpro(&Qsave_session);
+  staticpro (&Qsave_session);
 
   Qusr1_signal = intern ("usr1-signal");
   staticpro (&Qusr1_signal);
--- a/src/lisp.h	Fri May 20 17:44:36 2005 +0000
+++ b/src/lisp.h	Sat May 28 21:04:38 2005 +0000
@@ -3099,7 +3099,7 @@
 
 /* defined in xmenu.c */
 EXFUN (Fx_popup_menu, 2);
-EXFUN (Fx_popup_dialog, 2);
+EXFUN (Fx_popup_dialog, 3);
 extern void syms_of_xmenu P_ ((void));
 
 /* defined in termchar.h */
--- a/src/macmenu.c	Fri May 20 17:44:36 2005 +0000
+++ b/src/macmenu.c	Sat May 28 21:04:38 2005 +0000
@@ -823,7 +823,7 @@
 
 #ifdef HAVE_MENUS
 
-DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 2, 0,
+DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0,
        doc: /* Pop up a dialog box and return user's selection.
 POSITION specifies which frame to use.
 This is normally a mouse button event or a window or frame.
@@ -838,9 +838,12 @@
 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.)  */)
-  (position, contents)
-     Lisp_Object position, contents;
+\(By default, approximately half appear on each side.)
+
+If HEADER is non-nil, the frame title for the box is "Information",
+otherwise it is "Question". */)
+  (position, contents, header)
+     Lisp_Object position, contents, header;
 {
   FRAME_PTR f = NULL;
   Lisp_Object window;
@@ -927,7 +930,7 @@
 
     /* Display them in a dialog box.  */
     BLOCK_INPUT;
-    selection = mac_dialog_show (f, 0, title, &error_name);
+    selection = mac_dialog_show (f, 0, title, header, &error_name);
     UNBLOCK_INPUT;
 
     discard_menu_items ();
@@ -2046,10 +2049,10 @@
   "button6", "button7", "button8", "button9", "button10" };
 
 static Lisp_Object
-mac_dialog_show (f, keymaps, title, error)
+mac_dialog_show (f, keymaps, title, header, error)
      FRAME_PTR f;
      int keymaps;
-     Lisp_Object title;
+     Lisp_Object title, header;
      char **error;
 {
   int i, nb_buttons=0;
@@ -2152,11 +2155,17 @@
     wv->name = dialog_name;
     wv->help = Qnil;
 
+    /*  Frame title: 'Q' = Question, 'I' = Information.
+        Can also have 'E' = Error if, one day, we want
+        a popup for errors. */
+    if (NILP(header))
+      dialog_name[0] = 'Q';
+    else
+      dialog_name[0] = 'I';
+
     /* Dialog boxes use a really stupid name encoding
        which specifies how many buttons to use
-       and how many buttons are on the right.
-       The Q means something also.  */
-    dialog_name[0] = 'Q';
+       and how many buttons are on the right. */
     dialog_name[1] = '0' + nb_buttons;
     dialog_name[2] = 'B';
     dialog_name[3] = 'R';
--- a/src/process.c	Fri May 20 17:44:36 2005 +0000
+++ b/src/process.c	Sat May 28 21:04:38 2005 +0000
@@ -5134,6 +5134,7 @@
   int rv;
   struct coding_system *coding;
   struct gcpro gcpro1;
+  SIGTYPE (*volatile old_sigpipe) ();
 
   GCPRO1 (object);
 
@@ -5258,7 +5259,6 @@
       while (len > 0)
 	{
 	  int this = len;
-	  SIGTYPE (*old_sigpipe)();
 
 	  /* Decide how much data we can send in one batch.
 	     Long lines need to be split into multiple batches.  */
@@ -5401,6 +5401,7 @@
 #endif /* not VMS */
   else
     {
+      signal (SIGPIPE, old_sigpipe);
 #ifndef VMS
       proc = process_sent_to;
       p = XPROCESS (proc);
--- a/src/termcap.c	Fri May 20 17:44:36 2005 +0000
+++ b/src/termcap.c	Sat May 28 21:04:38 2005 +0000
@@ -458,6 +458,7 @@
 #include <rmsdef.h>
 #include <fab.h>
 #include <nam.h>
+#include <starlet.h>
 
 static int
 valid_filename_p (fn)
--- a/src/w32menu.c	Fri May 20 17:44:36 2005 +0000
+++ b/src/w32menu.c	Sat May 28 21:04:38 2005 +0000
@@ -845,7 +845,7 @@
 
 #ifdef HAVE_MENUS
 
-DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 2, 0,
+DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0,
        doc: /* Pop up a dialog box and return user's selection.
 POSITION specifies which frame to use.
 This is normally a mouse button event or a window or frame.
@@ -860,9 +860,12 @@
 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.)  */)
-  (position, contents)
-     Lisp_Object position, contents;
+\(By default, approximately half appear on each side.)
+
+If HEADER is non-nil, the frame title for the box is "Information",
+otherwise it is "Question". */)
+  (position, contents, header)
+     Lisp_Object position, contents, header;
 {
   FRAME_PTR f = NULL;
   Lisp_Object window;
@@ -949,7 +952,7 @@
 
     /* Display them in a dialog box.  */
     BLOCK_INPUT;
-    selection = w32_dialog_show (f, 0, title, &error_name);
+    selection = w32_dialog_show (f, 0, title, header, &error_name);
     UNBLOCK_INPUT;
 
     discard_menu_items ();
@@ -1995,10 +1998,10 @@
   "button6", "button7", "button8", "button9", "button10" };
 
 static Lisp_Object
-w32_dialog_show (f, keymaps, title, error)
+w32_dialog_show (f, keymaps, title, header, error)
      FRAME_PTR f;
      int keymaps;
-     Lisp_Object title;
+     Lisp_Object title, header;
      char **error;
 {
   int i, nb_buttons=0;
@@ -2099,11 +2102,17 @@
     wv->name = dialog_name;
     wv->help = Qnil;
 
+    /*  Frame title: 'Q' = Question, 'I' = Information.
+        Can also have 'E' = Error if, one day, we want
+        a popup for errors. */
+    if (NILP(header))
+      dialog_name[0] = 'Q';
+    else
+      dialog_name[0] = 'I';
+
     /* Dialog boxes use a really stupid name encoding
        which specifies how many buttons to use
-       and how many buttons are on the right.
-       The Q means something also.  */
-    dialog_name[0] = 'Q';
+       and how many buttons are on the right. */
     dialog_name[1] = '0' + nb_buttons;
     dialog_name[2] = 'B';
     dialog_name[3] = 'R';
--- a/src/window.c	Fri May 20 17:44:36 2005 +0000
+++ b/src/window.c	Sat May 28 21:04:38 2005 +0000
@@ -546,7 +546,7 @@
 			     + WINDOW_LEFT_FRINGE_COLS (w)),
 		make_number (WINDOW_TOP_EDGE_LINE (w)
 			     + WINDOW_HEADER_LINE_LINES (w)),
-		make_number (WINDOW_RIGHT_EDGE_COL (w)
+		make_number (WINDOW_BOX_RIGHT_EDGE_COL (w)
 			     - WINDOW_RIGHT_MARGIN_COLS (w)
 			     - WINDOW_RIGHT_FRINGE_COLS (w)),
 		make_number (WINDOW_BOTTOM_EDGE_LINE (w)
@@ -570,7 +570,7 @@
 			     + WINDOW_LEFT_FRINGE_WIDTH (w)),
 		make_number (WINDOW_TOP_EDGE_Y (w)
 			     + WINDOW_HEADER_LINE_HEIGHT (w)),
-		make_number (WINDOW_RIGHT_EDGE_X (w)
+		make_number (WINDOW_BOX_RIGHT_EDGE_X (w)
 			     - WINDOW_RIGHT_MARGIN_WIDTH (w)
 			     - WINDOW_RIGHT_FRINGE_WIDTH (w)),
 		make_number (WINDOW_BOTTOM_EDGE_Y (w)
--- a/src/xdisp.c	Fri May 20 17:44:36 2005 +0000
+++ b/src/xdisp.c	Sat May 28 21:04:38 2005 +0000
@@ -16041,7 +16041,12 @@
 		   && --limit > 0
 		   && (precision <= 0 || n < precision))
 	      {
-		n += display_mode_element (it, depth, field_width - n,
+		n += display_mode_element (it, depth,
+					   /* Do padding only after the last
+					      element in the list.  */
+					   (! CONSP (XCDR (elt))
+					    ? field_width - n
+					    : 0),
 					   precision - n, XCAR (elt),
 					   props, risky);
 		elt = XCDR (elt);
@@ -21238,11 +21243,12 @@
    position relative to the start of the mode line.  */
 
 static void
-note_mode_line_or_margin_highlight (w, x, y, area)
-     struct window *w;
+note_mode_line_or_margin_highlight (window, x, y, area)
+     Lisp_Object window;
      int x, y;
      enum window_part area;
 {
+  struct window *w = XWINDOW (window);
   struct frame *f = XFRAME (w->frame);
   Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
   Cursor cursor = FRAME_X_OUTPUT (f)->nontext_cursor;
@@ -21251,9 +21257,38 @@
   Lisp_Object string, object = Qnil;
   Lisp_Object pos, help;
 
+  Lisp_Object mouse_face;
+  int original_x_pixel = x;
+  struct glyph * glyph = NULL;
+  struct glyph_row *row;
+
   if (area == ON_MODE_LINE || area == ON_HEADER_LINE)
-    string = mode_line_string (w, area, &x, &y, &charpos,
-			       &object, &dx, &dy, &width, &height);
+    {
+      int x0;
+      struct glyph *end;
+
+      string = mode_line_string (w, area, &x, &y, &charpos,
+				 &object, &dx, &dy, &width, &height);
+
+      row = (area == ON_MODE_LINE
+	     ? MATRIX_MODE_LINE_ROW (w->current_matrix)
+	     : MATRIX_HEADER_LINE_ROW (w->current_matrix));
+
+      /* Find glyph */
+      if (row->mode_line_p && row->enabled_p)
+	{
+	  glyph = row->glyphs[TEXT_AREA];
+	  end = glyph + row->used[TEXT_AREA];
+
+	  for (x0 = original_x_pixel;
+	       glyph < end && x0 >= glyph->pixel_width;
+	       ++glyph)
+	    x0 -= glyph->pixel_width;
+
+	  if (glyph >= end)
+	    glyph = NULL;
+	}
+    }
   else
     {
       x -= WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (w);
@@ -21331,6 +21366,94 @@
 	  if (!KEYMAPP (map))
 	    cursor = dpyinfo->vertical_scroll_bar_cursor;
 	}
+
+     /* Change the mouse face according to what is under X/Y.  */
+      mouse_face = Fget_text_property (pos, Qmouse_face, string);
+      if (!NILP (mouse_face)
+	  && ((area == ON_MODE_LINE) || (area == ON_HEADER_LINE))
+	  && glyph)
+	{
+	  Lisp_Object b, e;
+
+	  struct glyph * tmp_glyph;
+
+	  int gpos;
+	  int gseq_length;
+	  int total_pixel_width;
+	  int ignore;
+
+
+	  if (clear_mouse_face (dpyinfo))
+	    cursor = No_Cursor;
+
+	  b = Fprevious_single_property_change (make_number (charpos + 1),
+						Qmouse_face, string, Qnil);
+	  if (NILP (b))
+	    b = make_number (0);
+
+	  e = Fnext_single_property_change (pos, Qmouse_face, string, Qnil);
+	  if (NILP (e))
+	    e = make_number (SCHARS (string));
+
+	  /* Calculate the position(glyph position: GPOS) of GLYPH in
+	     displayed string. GPOS is different from CHARPOS.
+
+	     CHARPOS is the position of glyph in internal string
+	     object. A mode line string format has structures which
+	     is converted to a flatten by emacs lisp interpreter.
+	     The internal string is an element of the structures.
+	     The displayed string is the flatten string. */
+	  for (tmp_glyph = glyph - 1, gpos = 0;
+	       tmp_glyph->charpos >= XINT (b);
+	       tmp_glyph--, gpos++)
+	    {
+	      if (tmp_glyph->object != glyph->object)
+		break;
+	    }
+
+	  /* Calculate the lenght(glyph sequence length: GSEQ_LENGTH) of
+	     displayed string holding GLYPH.
+
+	     GSEQ_LENGTH is different from SCHARS (STRING).
+	     SCHARS (STRING) returns the length of the internal string. */
+	  for (tmp_glyph = glyph, gseq_length = gpos;
+	       tmp_glyph->charpos < XINT (e);
+	       tmp_glyph++, gseq_length++)
+	      {
+		if (tmp_glyph->object != glyph->object)
+		  break;
+	      }
+
+	  total_pixel_width = 0;
+	  for (tmp_glyph = glyph - gpos; tmp_glyph != glyph; tmp_glyph++)
+	    total_pixel_width += tmp_glyph->pixel_width;
+
+	  dpyinfo->mouse_face_beg_col = (x - gpos);
+	  dpyinfo->mouse_face_beg_row = (area == ON_MODE_LINE
+					 ? (w->current_matrix)->nrows - 1
+					 : 0);
+
+	  dpyinfo->mouse_face_beg_x   = original_x_pixel - (total_pixel_width + dx);
+	  dpyinfo->mouse_face_beg_y   = 0;
+
+	  dpyinfo->mouse_face_end_col = (x - gpos) + gseq_length;
+	  dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_beg_row;
+
+	  dpyinfo->mouse_face_end_x   = 0;
+	  dpyinfo->mouse_face_end_y   = 0;
+
+	  dpyinfo->mouse_face_past_end = 0;
+	  dpyinfo->mouse_face_window  = window;
+
+	  dpyinfo->mouse_face_face_id = face_at_string_position (w, string,
+								 charpos,
+								 0, 0, 0, &ignore,
+								 glyph->face_id, 1);
+	  show_mouse_face (dpyinfo, DRAW_MOUSE_FACE);
+
+	  if (NILP (pointer))
+	    pointer = Qhand;
+	}
     }
 
   define_frame_cursor1 (f, cursor, pointer);
@@ -21411,7 +21534,7 @@
   if (part == ON_MODE_LINE || part == ON_HEADER_LINE
       || part == ON_LEFT_MARGIN || part == ON_RIGHT_MARGIN)
     {
-      note_mode_line_or_margin_highlight (w, x, y, part);
+      note_mode_line_or_margin_highlight (window, x, y, part);
       return;
     }
 
@@ -21671,6 +21794,7 @@
 		b = make_number (0);
 	      if (NILP (e))
 		e = make_number (SCHARS (object) - 1);
+
 	      fast_find_string_pos (w, XINT (b), object,
 				    &dpyinfo->mouse_face_beg_col,
 				    &dpyinfo->mouse_face_beg_row,
--- a/src/xmenu.c	Fri May 20 17:44:36 2005 +0000
+++ b/src/xmenu.c	Sat May 28 21:04:38 2005 +0000
@@ -116,7 +116,8 @@
 extern void set_frame_menubar P_ ((FRAME_PTR, int, int));
 extern XtAppContext Xt_app_con;
 
-static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, char **));
+static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, Lisp_Object,
+				     char **));
 static void popup_get_selection P_ ((XEvent *, struct x_display_info *,
                                      LWLIB_ID, int));
 
@@ -129,7 +130,8 @@
 #include "gtkutil.h"
 #define HAVE_BOXES 1
 extern void set_frame_menubar P_ ((FRAME_PTR, int, int));
-static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, char **));
+static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, Lisp_Object,
+				     char **));
 #endif
 
 /* This is how to deal with multibyte text if HAVE_MULTILINGUAL_MENU
@@ -999,7 +1001,7 @@
 
 #ifdef HAVE_MENUS
 
-DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 2, 0,
+DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0,
        doc: /* Pop up a dialog box and return user's selection.
 POSITION specifies which frame to use.
 This is normally a mouse button event or a window or frame.
@@ -1007,7 +1009,7 @@
 The dialog box appears in the middle of the specified frame.
 
 CONTENTS specifies the alternatives to display in the dialog box.
-It is a list of the form (TITLE ITEM1 ITEM2...).
+It is a list of the form (DIALOG ITEM1 ITEM2...).
 Each ITEM is a cons cell (STRING . VALUE).
 The return value is VALUE from the chosen item.
 
@@ -1016,11 +1018,14 @@
 on the left of the dialog box and all following items on the right.
 \(By default, approximately half appear on each side.)
 
+If HEADER is non-nil, the frame title for the box is "Information",
+otherwise it is "Question".
+
 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;
+     (position, contents, header)
+     Lisp_Object position, contents, header;
 {
   FRAME_PTR f = NULL;
   Lisp_Object window;
@@ -1115,7 +1120,7 @@
 
     /* Display them in a dialog box.  */
     BLOCK_INPUT;
-    selection = xdialog_show (f, 0, title, &error_name);
+    selection = xdialog_show (f, 0, title, header, &error_name);
     UNBLOCK_INPUT;
 
     unbind_to (specpdl_count, Qnil);
@@ -3020,11 +3025,11 @@
   "button6", "button7", "button8", "button9", "button10" };
 
 static Lisp_Object
-xdialog_show (f, keymaps, title, error)
+xdialog_show (f, keymaps, title, header, error_name)
      FRAME_PTR f;
      int keymaps;
-     Lisp_Object title;
-     char **error;
+     Lisp_Object title, header;
+     char **error_name;
 {
   int i, nb_buttons=0;
   char dialog_name[6];
@@ -3036,11 +3041,11 @@
   /* 1 means we've seen the boundary between left-hand elts and right-hand.  */
   int boundary_seen = 0;
 
-  *error = NULL;
+  *error_name = NULL;
 
   if (menu_items_n_panes > 1)
     {
-      *error = "Multiple panes in dialog box";
+      *error_name = "Multiple panes in dialog box";
       return Qnil;
     }
 
@@ -3077,7 +3082,7 @@
 	if (NILP (item_name))
 	  {
 	    free_menubar_widget_value_tree (first_wv);
-	    *error = "Submenu in dialog items";
+	    *error_name = "Submenu in dialog items";
 	    return Qnil;
 	  }
 	if (EQ (item_name, Qquote))
@@ -3091,7 +3096,7 @@
 	if (nb_buttons >= 9)
 	  {
 	    free_menubar_widget_value_tree (first_wv);
-	    *error = "Too many dialog items";
+	    *error_name = "Too many dialog items";
 	    return Qnil;
 	  }
 
@@ -3121,11 +3126,18 @@
     wv = xmalloc_widget_value ();
     wv->name = dialog_name;
     wv->help = Qnil;
+
+    /*  Frame title: 'Q' = Question, 'I' = Information.
+        Can also have 'E' = Error if, one day, we want
+        a popup for errors. */
+    if (NILP(header))
+      dialog_name[0] = 'Q';
+    else
+      dialog_name[0] = 'I';
+
     /* Dialog boxes use a really stupid name encoding
        which specifies how many buttons to use
-       and how many buttons are on the right.
-       The Q means something also.  */
-    dialog_name[0] = 'Q';
+       and how many buttons are on the right. */
     dialog_name[1] = '0' + nb_buttons;
     dialog_name[2] = 'B';
     dialog_name[3] = 'R';
--- a/src/xterm.c	Fri May 20 17:44:36 2005 +0000
+++ b/src/xterm.c	Sat May 28 21:04:38 2005 +0000
@@ -915,6 +915,7 @@
       /* It's a program.  */
       struct ccl_program *ccl = font_info->font_encoder;
 
+      check_ccl_update (ccl);
       if (CHARSET_DIMENSION (charset) == 1)
 	{
 	  ccl->reg[0] = charset;