changeset 90100:72cf6261961e

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-11 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-69 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-71 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-72 src/dispextern.h (xassert): Enable unconditionally. * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-73 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-81 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-82 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-12 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-13 Update from CVS
author Miles Bader <miles@gnu.org>
date Sun, 06 Feb 2005 12:06:02 +0000
parents fa9654493afb (current diff) 0b36e2f36bf5 (diff)
children 19a035ba05a8
files admin/FOR-RELEASE etc/ChangeLog etc/NEWS etc/TODO etc/emacs.bash lib-src/ChangeLog lib-src/movemail.c lisp/ChangeLog lisp/calc/calc-embed.el lisp/calc/calc-lang.el lisp/case-table.el lisp/emacs-lisp/lisp-mode.el lisp/faces.el lisp/font-core.el lisp/gnus/ChangeLog lisp/gnus/gnus-art.el lisp/help-fns.el lisp/help.el lisp/hi-lock.el lisp/international/mule-cmds.el lisp/net/ldap.el lisp/progmodes/gdb-ui.el lisp/progmodes/gud.el lisp/textmodes/ispell.el lisp/textmodes/reftex.el lisp/x-dnd.el lispref/ChangeLog lispref/buffers.texi lispref/commands.texi lispref/edebug.texi lispref/files.texi lispref/frames.texi lispref/text.texi lispref/windows.texi mac/inc/config.h mac/inc/s-mac.h man/ChangeLog man/basic.texi man/buffers.texi man/cmdargs.texi man/dired.texi man/files.texi man/fixit.texi man/frames.texi man/text.texi man/windows.texi src/ChangeLog src/buffer.c src/casefiddle.c src/dispextern.h src/dispnew.c src/gtkutil.c src/insdel.c src/mac.c src/macfns.c src/macterm.c src/sysdep.c src/undo.c src/xdisp.c src/xfaces.c src/xfns.c src/xmenu.c src/xselect.c src/xterm.c
diffstat 64 files changed, 1001 insertions(+), 415 deletions(-) [+]
line wrap: on
line diff
--- a/admin/FOR-RELEASE	Wed Feb 02 01:54:00 2005 +0000
+++ b/admin/FOR-RELEASE	Sun Feb 06 12:06:02 2005 +0000
@@ -181,7 +181,7 @@
 man/abbrevs.texi
 man/anti.texi
 man/basic.texi      "Luc Teirlinck"
-man/buffers.texi    "Luc Teirlinck"
+man/buffers.texi    "Luc Teirlinck"  Chong Yidong
 man/building.texi   "Ted Zlatanov" <tzz@lifelogs.com>
 man/calendar.texi    Joakim Verona <joakim@verona.se>
 man/cmdargs.texi
@@ -191,9 +191,9 @@
 man/display.texi    "Luc Teirlinck"
 man/emacs.texi      "Luc Teirlinck"
 man/entering.texi   "Luc Teirlinck"
-man/files.texi      "Luc Teirlinck"
+man/files.texi      "Luc Teirlinck"  Chong Yidong
 man/fixit.texi      "Luc Teirlinck"
-man/frames.texi     "Luc Teirlinck"
+man/frames.texi     "Luc Teirlinck"  Chong Yidong
 man/glossary.texi
 man/help.texi       "Luc Teirlinck"
 man/indent.texi     "Luc Teirlinck"
@@ -215,9 +215,9 @@
 man/screen.texi     "Luc Teirlinck"
 man/search.texi     "Luc Teirlinck"
 man/sending.texi
-man/text.texi       "Luc Teirlinck"
+man/text.texi       "Luc Teirlinck"   Chong Yidong
 man/trouble.texi
-man/windows.texi    "Luc Teirlinck"
+man/windows.texi    "Luc Teirlinck"   Chong Yidong
 man/xresources.texi
 
 ** Check the Emacs Lisp manual.
@@ -233,7 +233,7 @@
 lispref/advice.texi	 Joakim Verona <joakim@verona.se>
 lispref/anti.texi
 lispref/backups.texi     "Luc Teirlinck"
-lispref/buffers.texi     "Luc Teirlinck"
+lispref/buffers.texi     "Luc Teirlinck"   Chong Yidong
 lispref/calendar.texi    Joakim Verona <joakim@verona.se>
 lispref/commands.texi    "Luc Teirlinck"
 lispref/compile.texi     "Luc Teirlinck"
@@ -245,8 +245,8 @@
 lispref/elisp.texi       "Luc Teirlinck"
 lispref/errors.texi      "Luc Teirlinck"
 lispref/eval.texi        "Luc Teirlinck"
-lispref/files.texi       "Luc Teirlinck"
-lispref/frames.texi      "Luc Teirlinck"
+lispref/files.texi       "Luc Teirlinck"   Chong Yidong
+lispref/frames.texi      "Luc Teirlinck"   Chong Yidong
 lispref/functions.texi	 "Luc Teirlinck"
 lispref/hash.texi	 "Luc Teirlinck"
 lispref/help.texi	 "Luc Teirlinck"
@@ -274,10 +274,10 @@
 lispref/strings.texi	 "Luc Teirlinck"
 lispref/symbols.texi	 "Luc Teirlinck"
 lispref/syntax.texi	 "Luc Teirlinck"
-lispref/text.texi
+lispref/text.texi        Chong Yidong
 lispref/tips.texi	 "Luc Teirlinck"
 lispref/variables.texi	 "Luc Teirlinck"
-lispref/windows.texi     "Luc Teirlinck"
+lispref/windows.texi     "Luc Teirlinck"   Chong Yidong
 
 
 Local variables:
--- a/etc/ChangeLog	Wed Feb 02 01:54:00 2005 +0000
+++ b/etc/ChangeLog	Sun Feb 06 12:06:02 2005 +0000
@@ -1,3 +1,7 @@
+2005-02-05  Frederik Fouvry  <fouvry@CoLi.Uni-SB.DE>
+
+	* emacs.bash: Update the name of the socket of the Emacs server.
+
 2005-01-22  David Kastrup  <dak@gnu.org>
 
 	* NEWS: Mention alias `find-grep' for `grep-find'.
--- a/etc/NEWS	Wed Feb 02 01:54:00 2005 +0000
+++ b/etc/NEWS	Sun Feb 06 12:06:02 2005 +0000
@@ -201,22 +201,23 @@
 boundries etc.  For more info, see the documentation of the variable
 `calculator-radix-grouping-mode'.
 
++++
 ** You can now follow links by clicking Mouse-1 on the link.
 
 Traditionally, Emacs uses a Mouse-1 click to set point and a Mouse-2
 click to follow a link, whereas most other applications use a Mouse-1
 click for both purposes, depending on whether you click outside or
-inside a link.  With release 21.4, the behaviour of a Mouse-1 click
-has been changed to match this context-sentitive dual behaviour.
+inside a link.  Now the behavior of a Mouse-1 click has been changed
+to match this context-sentitive dual behavior.
 
 Depending on the current mode, a Mouse-2 click in Emacs may do much
-more than just follow a link, so the new Mouse-1 behaviour is only
+more than just follow a link, so the new Mouse-1 behavior is only
 activated for modes which explicitly mark a clickable text as a "link"
-(see the new function `mouse-on-link-p' for details).  The lisp
+(see the new function `mouse-on-link-p' for details).  The Lisp
 packages that are included in release 21.4 have been adapted to do
 this, but external packages may not yet support this.  However, there
 is no risk in using such packages, as the worst thing that could
-happen is that you get the original Mouse-1 behaviour when you click
+happen is that you get the original Mouse-1 behavior when you click
 on a link, which typically means that you set point where you click.
 
 If you want to get the original Mouse-1 action also inside a link, you
@@ -227,7 +228,7 @@
 Dragging the Mouse-1 inside a link still performs the original
 drag-mouse-1 action, typically copy the text.
 
-You can customize the new Mouse-1 behaviour via the new user option
+You can customize the new Mouse-1 behavior via the new user option
 `mouse-1-click-follows-link'.
 
 +++
@@ -551,7 +552,7 @@
 cursor will be displayed in the fringe when positioned on that newline.
 
 The new user option 'overflow-newline-into-fringe' may be set to nil to
-revert to the old behaviour of continuing such lines.
+revert to the old behavior of continuing such lines.
 
 +++
 ** The buffer boundaries (i.e. first and last line in the buffer) may
@@ -1613,7 +1614,7 @@
 
 ** Unexpected yanking of text due to accidental clicking on the mouse
 wheel button (typically mouse-2) during wheel scrolling is now avoided.
-This behaviour can be customized via the mouse-wheel-click-event and
+This behavior can be customized via the mouse-wheel-click-event and
 mouse-wheel-inhibit-click-time variables.
 
 +++
@@ -2445,7 +2446,7 @@
 
 In addition, when ending or calling a macro with C-x e, the macro can
 be repeated immediately by typing just the `e'.  You can customize
-this behaviour via the variable kmacro-call-repeat-key and
+this behavior via the variable kmacro-call-repeat-key and
 kmacro-call-repeat-with-arg.
 
 Keyboard macros can now be debugged and edited interactively.
@@ -3227,7 +3228,7 @@
 buffer is multibyte, the output of the process is at first converted
 to multibyte by `string-to-multibyte' then inserted in the buffer.
 Previously, it was converted to multibyte by `string-as-multibyte',
-which was not compatible with the behaviour of file reading.
+which was not compatible with the behavior of file reading.
 
 +++
 ** New function `string-to-multibyte' converts a unibyte string to a
@@ -3715,7 +3716,7 @@
 The `insert-for-yank' function looks for a yank-handler property on
 the first character on its string argument (typically the first
 element on the kill-ring).  If a yank-handler property is found,
-the normal behaviour of `insert-for-yank' is modified in various ways:
+the normal behavior of `insert-for-yank' is modified in various ways:
 
   When FUNCTION is present and non-nil, it is called instead of `insert'
 to insert the string.  FUNCTION takes one argument--the object to insert.
@@ -3803,7 +3804,7 @@
 
 On some systems, when emacs reads the output from a subprocess, the
 output data is read in very small blocks, potentially resulting in
-very poor performance.  This behaviour can be remedied to some extent
+very poor performance.  This behavior can be remedied to some extent
 by setting the new variable process-adaptive-read-buffering to a
 non-nil value (the default), as it will automatically delay reading
 from such processes, to allowing them to produce more output before
@@ -4317,7 +4318,7 @@
 If you want the old behavior, set selection-coding-system to
 compound-text, which may be significantly more efficient.  Using
 compound-text-with-extensions seems to be necessary only for decoding
-text from applications under XFree86 4.2, whose behaviour is actually
+text from applications under XFree86 4.2, whose behavior is actually
 contrary to the compound text specification.
 
 
--- a/etc/TODO	Wed Feb 02 01:54:00 2005 +0000
+++ b/etc/TODO	Sun Feb 06 12:06:02 2005 +0000
@@ -24,6 +24,9 @@
   It should not generate :require.  Or :require in defcustom
   should not be recorded in the user's custom-set-variables call.
 
+** The buttons at the top of a custom buffer should not omit
+  variables whose values are currently hidden.
+
 * Important features:
 
 ** Provide user-friendly ways to list all available font families,
--- a/etc/emacs.bash	Wed Feb 02 01:54:00 2005 +0000
+++ b/etc/emacs.bash	Sun Feb 06 12:06:02 2005 +0000
@@ -22,7 +22,7 @@
  if [ -n "${windowsys:+set}" ]; then
     # Do not just test if these files are sockets.  On some systems
     # ordinary files or fifos are used instead.  Just see if they exist.
-    if [ -e "${HOME}/.emacs_server" -o -e "/tmp/esrv${UID}-"* ]; then
+    if [ -e "${HOME}/.emacs_server" -o -e "/tmp/emacs${UID}/server" ]; then
        emacsclient "$@"
        return $?
     else
--- a/lib-src/ChangeLog	Wed Feb 02 01:54:00 2005 +0000
+++ b/lib-src/ChangeLog	Sun Feb 06 12:06:02 2005 +0000
@@ -1,3 +1,13 @@
+2005-02-04  Andreas Schwab  <schwab@suse.de>
+
+	* movemail.c (fatal): Accept third parameter and pass down to
+	error.
+	(pfatal_with_name): Pass error string as format parameter instead
+	of as part of format string.
+	(pfatal_and_delete): Likewise.
+	(main): Adjust call to fatal.
+	(xmalloc): Likewise.
+
 2005-01-29  Richard M. Stallman  <rms@gnu.org>
 
 	* movemail.c (popmail): Don't use Errmsg as format string.
--- a/lib-src/movemail.c	Wed Feb 02 01:54:00 2005 +0000
+++ b/lib-src/movemail.c	Sun Feb 06 12:06:02 2005 +0000
@@ -245,7 +245,7 @@
 #endif
 
   if (*outname == 0)
-    fatal ("Destination file name is empty", 0);
+    fatal ("Destination file name is empty", 0, 0);
 
   /* Check access to output file.  */
   if (access (outname, F_OK) == 0 && access (outname, W_OK) != 0)
@@ -601,12 +601,12 @@
 /* Print error message and exit.  */
 
 void
-fatal (s1, s2)
-     char *s1, *s2;
+fatal (s1, s2, s3)
+     char *s1, *s2, *s3;
 {
   if (delete_lockname)
     unlink (delete_lockname);
-  error (s1, s2, 0);
+  error (s1, s2, s3);
   exit (EXIT_FAILURE);
 }
 
@@ -631,17 +631,16 @@
 pfatal_with_name (name)
      char *name;
 {
-  char *s = concat ("", strerror (errno), " for %s");
-  fatal (s, name);
+  fatal ("%s for %s", strerror (errno), name);
 }
 
 void
 pfatal_and_delete (name)
      char *name;
 {
-  char *s = concat ("", strerror (errno), " for %s");
+  char *s = strerror (errno);
   unlink (name);
-  fatal (s, name);
+  fatal ("%s for %s", s, name);
 }
 
 /* Return a newly-allocated string whose contents concatenate those of s1, s2, s3.  */
@@ -669,7 +668,7 @@
 {
   long *result = (long *) malloc (size);
   if (!result)
-    fatal ("virtual memory exhausted", 0);
+    fatal ("virtual memory exhausted", 0, 0);
   return result;
 }
 
--- a/lisp/ChangeLog	Wed Feb 02 01:54:00 2005 +0000
+++ b/lisp/ChangeLog	Sun Feb 06 12:06:02 2005 +0000
@@ -1,3 +1,107 @@
+2005-02-05  Arne_J,Ax(Brgensen  <arne@arnested.dk>  (tiny change)
+
+	* net/ldap.el (ldap-search-internal): Support attributes with
+	optional descriptions separated by a semi-colon, as in
+	"userCertificate;binary".
+
+2005-02-05  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
+
+	* x-dnd.el (x-dnd-handle-xdnd): Handle the case where the flags
+	isn't a cons (i.e. the version is 0).
+
+2005-02-05  Eli Zaretskii  <eliz@gnu.org>
+
+	* help.el (help-for-help): Doc fix.
+
+2005-02-05  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gdb-ui.el: Update copyright. Put GDB-Frames before
+	GDB-Windows on the menu-bar as this works better.
+
+2005-02-04  Jay Belanger  <belanger@truman.edu>
+
+	* calc/calc-embed.el (calc-embedded-update): Don't put in
+	unnecessary newlines. Adjust the end of formula marker.
+
+	* calc/calc-lang.el (math-latex-parse-frac): Don't use arguments.
+	(math-latex-parse-two-args): New function.
+
+2005-02-03  Lute Kamstra  <lute@gnu.org>
+
+	* help-fns.el (help-with-tutorial): Make sure that users cannot
+	remove the entire text of the tutorial by means of `undo'.
+
+2005-02-03  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* textmodes/ispell.el (ispell-internal-change-dictionary): Fix problem
+	in recent changes, where the ispell process was repeatedly
+	killed & restarted.
+
+	* international/mule-cmds.el (set-locale-environment): Set file-name
+	coding system to utf-8 on Darwin systems.
+	(set-default-coding-systems): Don't set default-file-name-coding-system
+	on Darwin systems.
+
+2005-02-03  Richard M. Stallman  <rms@gnu.org>
+
+	* hi-lock.el (hi-lock-mode): Turning on Hi-Lock turns on Font-Lock.
+
+2005-02-03  Matt Hodges  <MPHodges@member.fsf.org>
+
+	* faces.el (list-faces-display): Add optional argument.
+
+2005-02-02  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* font-core.el (font-lock-default-function): Handle the rare case where
+	only font-lock-keywords is set.
+
+2005-02-02  Kenichi Handa  <handa@m17n.org>
+
+	* international/characters.el: Cancel previous change for
+	I-WITH-DOT-ABOVE and DOTLESS-i.
+
+	* international/latin-5.el: Cancel previous change.
+
+2005-02-02  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gud.el: Correction to syntax in gud-menu-map.
+
+2005-02-02  Kenichi Handa  <handa@m17n.org>
+
+	* international/latin-5.el (tbl): Setup cases of I-WITH-DOT-ABOVE,
+	DOTLESS-i.
+
+	* international/characters.el: Setup cases of GREEK-FINAL-SIGMA,
+	Y-WITH-DIAERESIS, I-WITH-DOT-ABOVE, DOTLESS-i.
+
+	* case-table.el (get-upcase-table): New function.
+	(copy-case-table): Copy upcaes table too if non-nil.
+	(set-case-syntax-delims): Maintain upcase table too.
+	(set-case-syntax-pair): Likewise.
+	(set-upcase-syntax, set-downcase-syntax): New functions.
+	(set-case-syntax): Maintain upcase table too.
+
+2005-02-02  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gdb-ui.el: (gdb-goto-info): Delete.
+
+	* progmodes/gud.el (gud-goto-info): New function.
+	(gud-tool-bar-map): Use correct icon.
+
+2005-02-01  Thien-Thi Nguyen  <ttn@gnu.org>
+
+	* emacs-lisp/lisp-mode.el (lisp-indent-function): Fix bug:
+	When delegating, order args in the funcall correctly.
+
+2005-02-01  Thien-Thi Nguyen  <ttn@gnu.org>
+
+	* emacs-lisp/lisp-mode.el (lisp-indent-function): Doc fix.
+
+2005-02-01  Carsten Dominik  <dominik@science.uva.nl>
+
+	* textmodes/reftex.el (reftex-access-scan-info): Error out in a
+	buffer not visiting a file.
+
 2005-01-31  Jay Belanger  <belanger@truman.edu>
 
 	* calc/calc-embed.el (calc-embedded-find-bounds): Set the formula
@@ -111,7 +215,7 @@
 
 2005-01-29  Richard M. Stallman  <rms@gnu.org>
 
-	* ses.el (undo-more): defadvice deleted.
+	* ses.el (undo-more): Delete defadvice.
 	(ses-begin-change): Doc fix.
 
 	* dired.el (dired-mode-map): Remap `undo' and `advertised-undo'
@@ -129,7 +233,7 @@
 
 	* simple.el (undo): Fix the test for continuing a series of undos.
 	(undo-more): Set pending-undo-list to t when we reach end.
-	(pending-undo-list): defvar moved up.
+	(pending-undo-list): Move up defvar.
 
 	* wid-edit.el (widget-button-click):
 	Shorten the range of the track-mouse binding.
@@ -154,6 +258,20 @@
 	(gdb-assembler-custom): Update to recognise breakpoint information
 	added on 2005-01-19.
 
+2005-01-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* progmodes/scheme.el (scheme-mode-variables): Set comment-add.
+	(dsssl-mode): Use define-derived-mode.
+	(scheme-mode-initialize): Remove.
+	(scheme-mode): Use run-mode-hooks.
+
+	* cus-edit.el (customize-group-other-window)
+	(custom-buffer-create-other-window): Don't override special-display-*.
+	(custom-mode-map): Make it dense.
+
+	* emacs-lisp/lisp-mode.el (eval-defun-1): Make sure `defvar' always
+	sets the default value.
+
 2005-01-28  Eli Zaretskii  <eliz@gnu.org>
 
 	* descr-text.el: Add more keywords.
--- a/lisp/calc/calc-embed.el	Wed Feb 02 01:54:00 2005 +0000
+++ b/lisp/calc/calc-embed.el	Sun Feb 06 12:06:02 2005 +0000
@@ -967,19 +967,24 @@
 		  (calc-embedded-original-buffer t info)
 		  (or (equal str (aref info 6))
 		      (let ((delta (- (aref info 5) (aref info 3)))
+                            (adjbot 0)
 			    (buffer-read-only nil))
 			(goto-char (aref info 2))
 			(delete-region (point) (aref info 3))
 			(and (> (nth 1 entry) (1+ extra))
 			     (aref info 7)
 			     (progn
-			       (aset info 7 nil)
 			       (delete-horizontal-space)
-			       (insert "\n\n")
-			       (delete-horizontal-space)
-			       (backward-char 1)))
+                               (if (looking-at "\n")
+                                   ;; If there's a newline there, don't add one
+                                   (insert "\n")
+                                 (insert "\n\n")
+                                 (delete-horizontal-space)
+                                 (setq adjbot 1)
+;                               (setq delta (1+ delta))
+                                 (backward-char 1))))
 			(insert str)
-			(set-marker (aref info 3) (point))
+			(set-marker (aref info 3) (+ (point) adjbot))
 			(set-marker (aref info 5) (+ (point) delta))
 			(aset info 6 str))))))
 	  (if (eq (car-safe val) 'calcFunc-evalto)
--- a/lisp/calc/calc-lang.el	Wed Feb 02 01:54:00 2005 +0000
+++ b/lisp/calc/calc-lang.el	Sun Feb 06 12:06:02 2005 +0000
@@ -469,12 +469,12 @@
 (put 'latex 'math-function-table
      (append
       (get 'tex 'math-function-table)
-      '(( \\frac      . (math-latex-parse-frac /))
-        ( \\tfrac     . (math-latex-parse-frac /))
-        ( \\dfrac     . (math-latex-parse-frac /))
-        ( \\binom     . (math-latex-parse-frac calcFunc-choose))
-        ( \\tbinom    . (math-latex-parse-frac calcFunc-choose))
-        ( \\dbinom    . (math-latex-parse-frac calcFunc-choose))
+      '(( \\frac      . (math-latex-parse-frac))
+        ( \\tfrac     . (math-latex-parse-frac))
+        ( \\dfrac     . (math-latex-parse-frac))
+        ( \\binom     . (math-latex-parse-two-args calcFunc-choose))
+        ( \\tbinom    . (math-latex-parse-two-args calcFunc-choose))
+        ( \\dbinom    . (math-latex-parse-two-args calcFunc-choose))
         ( \\phi	      . calcFunc-totient )
         ( \\mu	      . calcFunc-moebius ))))
 
@@ -487,12 +487,23 @@
 
 (put 'latex 'math-complex-format 'i)
 
+
 (defun math-latex-parse-frac (f val)
   (let (numer denom)
-    (setq args (math-read-expr-list))
+    (setq numer (car (math-read-expr-list)))
     (math-read-token)
-    (setq margs (math-read-factor))
-    (list (nth 2 f) (car args) margs)))
+    (setq denom (math-read-factor))
+    (if (and (Math-num-integerp numer)
+             (Math-num-integerp denom))
+        (list 'frac numer denom)
+      (list '/ numer denom))))
+
+(defun math-latex-parse-two-args (f val)
+  (let (first second)
+    (setq first (car (math-read-expr-list)))
+    (math-read-token)
+    (setq second (math-read-factor))
+    (list (nth 2 f) first second)))
 
 (defun math-latex-print-frac (a fn)
   (list 'horiz (nth 1 fn) "{" (math-compose-expr (nth 1 a) -1)
--- a/lisp/case-table.el	Wed Feb 02 01:54:00 2005 +0000
+++ b/lisp/case-table.el	Sun Feb 06 12:06:02 2005 +0000
@@ -1,6 +1,6 @@
 ;;; case-table.el --- code to extend the character set and support case tables
 
-;; Copyright (C) 1988, 1994 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 1994, 2005 Free Software Foundation, Inc.
 
 ;; Author: Howard Gayle
 ;; Maintainer: FSF
@@ -60,11 +60,26 @@
        (describe-vector description)
        (help-mode)))))
 
+(defun get-upcase-table (case-table)
+  "Return the upcase table of CASE-TABLE."
+  (or (char-table-extra-slot case-table 0)
+      ;; Setup all extra slots of CASE-TABLE by temporarily selecting
+      ;; it as the standard case table.
+      (let ((old (standard-case-table)))
+	(unwind-protect
+	    (progn
+	      (set-standard-case-table case-table)
+	      (char-table-extra-slot case-table 0))
+	  (or (eq case-table old)
+	      (set-standard-case-table old))))))
+
 (defun copy-case-table (case-table)
-  (let ((copy (copy-sequence case-table)))
-    ;; Clear out the extra slots so that they will be
-    ;; recomputed from the main (downcase) table.
-    (set-char-table-extra-slot copy 0 nil)
+  (let ((copy (copy-sequence case-table))
+	(up (char-table-extra-slot case-table 0)))
+    ;; Clear out the extra slots (except for upcase table) so that
+    ;; they will be recomputed from the main (downcase) table.
+    (if up
+	(set-char-table-extra-slot copy 0 (copy-sequence up)))
     (set-char-table-extra-slot copy 1 nil)
     (set-char-table-extra-slot copy 2 nil)
     copy))
@@ -77,9 +92,11 @@
 indicate left and right delimiters."
   (aset table l l)
   (aset table r r)
+  (let ((up (get-upcase-table table)))
+    (aset up l l)
+    (aset up r r))
   ;; Clear out the extra slots so that they will be
-  ;; recomputed from the main (downcase) table.
-  (set-char-table-extra-slot table 0 nil)
+  ;; recomputed from the main (downcase) table and upcase table.
   (set-char-table-extra-slot table 1 nil)
   (set-char-table-extra-slot table 2 nil)
   (modify-syntax-entry l (concat "(" (char-to-string r) "  ")
@@ -110,9 +127,10 @@
 It also modifies `standard-syntax-table'.
 SYNTAX should be \" \", \"w\", \".\" or \"_\"."
   (aset table c c)
+  (let ((up (get-upcase-table table)))
+    (aset up c c))
   ;; Clear out the extra slots so that they will be
-  ;; recomputed from the main (downcase) table.
-  (set-char-table-extra-slot table 0 nil)
+  ;; recomputed from the main (downcase) table and upcase table.
   (set-char-table-extra-slot table 1 nil)
   (set-char-table-extra-slot table 2 nil)
   (modify-syntax-entry c syntax (standard-syntax-table)))
--- a/lisp/emacs-lisp/lisp-mode.el	Wed Feb 02 01:54:00 2005 +0000
+++ b/lisp/emacs-lisp/lisp-mode.el	Sun Feb 06 12:06:02 2005 +0000
@@ -881,11 +881,11 @@
 that specifies how to do the indentation.  The property value can be
 * `defun', meaning indent `defun'-style;
 * an integer N, meaning indent the first N arguments specially
-like ordinary function arguments and then indent any further
-aruments like a body;
+  like ordinary function arguments and then indent any further
+  arguments like a body;
 * a function to call just as this function was called.
-If that function returns nil, that means it doesn't specify
-the indentation.
+  If that function returns nil, that means it doesn't specify
+  the indentation.
 
 This function also returns nil meaning don't specify the indentation."
   (let ((normal-indent (current-column)))
@@ -921,7 +921,7 @@
 	       (lisp-indent-specform method state
 				     indent-point normal-indent))
 	      (method
-		(funcall method state indent-point)))))))
+		(funcall method indent-point state)))))))
 
 (defvar lisp-body-indent 2
   "Number of columns to indent the second line of a `(def...)' form.")
--- a/lisp/faces.el	Wed Feb 02 01:54:00 2005 +0000
+++ b/lisp/faces.el	Sun Feb 06 12:06:02 2005 +0000
@@ -1143,15 +1143,26 @@
 ;; conflict with Lucid, which uses that name differently.
 
 (defvar help-xref-stack)
-(defun list-faces-display ()
+(defun list-faces-display (&optional regexp)
   "List all faces, using the same sample text in each.
 The sample text is a string that comes from the variable
-`list-faces-sample-text'."
-  (interactive)
+`list-faces-sample-text'.
+
+If REGEXP is non-nil, list only those faces with names matching
+this regular expression.  When called interactively with a prefix
+arg, prompt for a regular expression."
+  (interactive (list (and current-prefix-arg
+                          (read-string "List faces matching regexp: "))))
   (let ((faces (sort (face-list) #'string-lessp))
-	(face nil)
 	(frame (selected-frame))
 	disp-frame window face-name)
+    (when (> (length regexp) 0)
+      (setq faces
+            (delq nil
+                  (mapcar (lambda (f)
+                            (when (string-match regexp (symbol-name f))
+                              f))
+                          faces))))
     (with-output-to-temp-buffer "*Faces*"
       (save-excursion
 	(set-buffer standard-output)
@@ -1164,9 +1175,7 @@
 	   "\\[help-follow] on a face name to customize it\n"
 	   "or on its sample text for a description of the face.\n\n")))
 	(setq help-xref-stack nil)
-	(while faces
-	  (setq face (car faces))
-	  (setq faces (cdr faces))
+	(dolist (face faces)
 	  (setq face-name (symbol-name face))
 	  (insert (format "%25s " face-name))
 	  ;; Hyperlink to a customization buffer for the face.  Using
@@ -1208,6 +1217,7 @@
 	    (copy-face (car faces) (car faces) frame disp-frame)
 	    (setq faces (cdr faces)))))))
 
+
 (defun describe-face (face &optional frame)
   "Display the properties of face FACE on FRAME.
 Interactively, FACE defaults to the faces of the character after point
--- a/lisp/font-core.el	Wed Feb 02 01:54:00 2005 +0000
+++ b/lisp/font-core.el	Sun Feb 06 12:06:02 2005 +0000
@@ -1,7 +1,7 @@
 ;;; font-core.el --- Core interface to font-lock
 
-;; Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999, 2000, 2001, 02, 2003
-;;  Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+;;   2002, 2003, 2005  Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: languages, faces
@@ -202,6 +202,7 @@
   ;; Only do hard work if the mode has specified stuff in
   ;; `font-lock-defaults'.
   (when (or font-lock-defaults
+	    (and (boundp 'font-lock-keywords) font-lock-keywords)
 	    (cdr (assq major-mode font-lock-defaults-alist)))
     (font-lock-mode-internal mode)))
 
@@ -295,6 +296,5 @@
 
 (provide 'font-core)
 
+;; arch-tag: f8c286e1-02f7-41d9-b89b-1b67780aed71
 ;;; font-core.el ends here
-
-;;; arch-tag: f8c286e1-02f7-41d9-b89b-1b67780aed71
--- a/lisp/gnus/ChangeLog	Wed Feb 02 01:54:00 2005 +0000
+++ b/lisp/gnus/ChangeLog	Sun Feb 06 12:06:02 2005 +0000
@@ -1,3 +1,8 @@
+2005-02-03  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* gnus-art.el (gnus-mime-inline-part): Show the raw contents if a
+	prefix arg is neither nil nor a number, as info specifies.
+
 2005-01-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* gnus-art.el (gnus-article-mode): Turn off the "\ " non-break space.
--- a/lisp/gnus/gnus-art.el	Wed Feb 02 01:54:00 2005 +0000
+++ b/lisp/gnus/gnus-art.el	Sun Feb 06 12:06:02 2005 +0000
@@ -4354,7 +4354,16 @@
 	  (setq charset
 		(or (cdr (assq arg
 			       gnus-summary-show-article-charset-alist))
-		    (mm-read-coding-system "Charset: ")))))
+		    (mm-read-coding-system "Charset: "))))
+	 (t
+	  (if (mm-handle-undisplayer handle)
+	      (mm-remove-part handle))
+	  (setq contents
+		(if (fboundp 'string-to-multibyte)
+		    (string-to-multibyte contents)
+		  (mapconcat
+		   (lambda (ch) (mm-string-as-multibyte (char-to-string ch)))
+		   contents "")))))
 	(forward-line 2)
 	(mm-insert-inline handle
 			  (if (and charset
--- a/lisp/help-fns.el	Wed Feb 02 01:54:00 2005 +0000
+++ b/lisp/help-fns.el	Sun Feb 06 12:06:02 2005 +0000
@@ -97,6 +97,7 @@
 	  (forward-line 1)
 	  (newline (- n (/ n 2)))))
       (goto-char (point-min))
+      (setq buffer-undo-list nil)
       (set-buffer-modified-p nil))))
 
 ;;;###autoload
--- a/lisp/help.el	Wed Feb 02 01:54:00 2005 +0000
+++ b/lisp/help.el	Sun Feb 06 12:06:02 2005 +0000
@@ -186,7 +186,7 @@
 \(Use SPC or DEL to scroll through this text.  Type \\<help-map>\\[help-quit] to exit the Help command.)
 
 a  command-apropos.  Give a substring, and see a list of commands
-	(functions interactively callable) that contain
+	(functions that are interactively callable) that contain
 	that substring.  See also the  apropos  command.
 b  describe-bindings.  Display table of all key bindings.
 c  describe-key-briefly.  Type a command key sequence;
@@ -194,24 +194,28 @@
 C  describe-coding-system.  This describes either a specific coding system
         (if you type its name) or the coding systems currently in use
 	(if you type just RET).
-e  view-echo-area-messages.  Show the `*Messages*' buffer.
-f  describe-function.  Type a function name and get documentation of it.
+e  view-echo-area-messages.  Show the buffer where the echo-area messages
+	are stored.
+f  describe-function.  Type a function name and get its documentation.
 F  Info-goto-emacs-command-node.  Type a function name;
-	it takes you to the Info node for that command.
+	it takes you to the on-line manual's section that describes
+	the command.
 h  Display the HELLO file which illustrates various scripts.
-i  info. The  info  documentation reader.
+i  info. The Info documentation reader: read on-line manuals.
 I  describe-input-method.  Describe a specific input method (if you type
 	its name) or the current input method (if you type just RET).
 k  describe-key.  Type a command key sequence;
-	it displays the full documentation.
+	it displays the full documentation for that key sequence.
 K Info-goto-emacs-key-command-node.  Type a command key sequence;
-	it takes you to the Info node for the command bound to that key.
+	it takes you to the on-line manual's section that describes
+	the command bound to that key.
 l  view-lossage.  Show last 100 characters you typed.
 L  describe-language-environment.  This describes either a
 	specific language environment (if you type its name)
 	or the current language environment (if you type just RET).
-m  describe-mode.  Print documentation of current minor modes,
+m  describe-mode.  Display documentation of current minor modes,
 	and the current major mode, including their special commands.
+n  view-emacs-news.  Display news of recent Emacs changes.
 p  finder-by-keyword. Find packages matching a given topic keyword.
 s  describe-syntax.  Display contents of syntax table, plus explanations.
 S  info-lookup-symbol.  Display the definition of a specific symbol
--- a/lisp/hi-lock.el	Wed Feb 02 01:54:00 2005 +0000
+++ b/lisp/hi-lock.el	Sun Feb 06 12:06:02 2005 +0000
@@ -294,6 +294,10 @@
     (when (and (not hi-lock-mode-prev) hi-lock-mode)
       (add-hook 'find-file-hooks 'hi-lock-find-file-hook)
       (add-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook)
+      (when (eq nil font-lock-defaults)
+	(setq font-lock-defaults '(nil)))
+      (unless font-lock-mode
+	(font-lock-mode 1))
       (define-key-after menu-bar-edit-menu [hi-lock]
         (cons "Regexp Highlighting" hi-lock-menu))
       (dolist (buffer (buffer-list))
--- a/lisp/international/mule-cmds.el	Wed Feb 02 01:54:00 2005 +0000
+++ b/lisp/international/mule-cmds.el	Sun Feb 06 12:06:02 2005 +0000
@@ -332,7 +332,8 @@
 	(or (local-variable-p 'buffer-file-coding-system buffer)
 	    (ucs-set-table-for-input buffer))))
 
-  (if default-enable-multibyte-characters
+  (if (and default-enable-multibyte-characters (not (eq system-type 'darwin)))
+      ;; The file-name coding system on Darwin systems is always utf-8.
       (setq default-file-name-coding-system coding-system))
   ;; If coding-system is nil, honor that on MS-DOS as well, so
   ;; that they could reset the terminal coding system.
@@ -1647,6 +1648,8 @@
 
   (set-default-coding-systems nil)
   (setq default-sendmail-coding-system 'iso-latin-1)
+  ;; On Darwin systems, this should be utf-8, but when this file is loaded
+  ;; utf-8 is not yet defined, so we set it in set-locale-environment instead.
   (setq default-file-name-coding-system 'iso-latin-1)
   ;; Preserve eol-type from existing default-process-coding-systems.
   ;; On non-unix-like systems in particular, these may have been set
@@ -2411,6 +2414,10 @@
 	  (set-keyboard-coding-system code-page-coding)
 	  (set-terminal-coding-system code-page-coding))))
 
+    ;; On Darwin, file names are always encoded in utf-8, no matter the locale.
+    (when (eq system-type 'darwin)
+      (setq default-file-name-coding-system 'utf-8))
+
     ;; Default to A4 paper if we're not in a C, POSIX or US locale.
     ;; (See comments in Flocale_info.)
     (let ((locale locale)
--- a/lisp/net/ldap.el	Wed Feb 02 01:54:00 2005 +0000
+++ b/lisp/net/ldap.el	Sun Feb 06 12:06:02 2005 +0000
@@ -579,9 +579,9 @@
 					       (end-of-line)
 					       (point))))
 	  (forward-line 1)
-	  (while (looking-at "^\\(\\w*\\)[=:\t ]+\\(<[\t ]*file://\\)?\\(.*\\)$")
+	  (while (looking-at "^\\(\\w*\\)\\(;\\w*\\)?[=:\t ]+\\(<[\t ]*file://\\)?\\(.*\\)$")
 	    (setq name (match-string 1)
-		  value (match-string 3))
+		  value (match-string 4))
             ;; Need to handle file:///D:/... as generated by OpenLDAP
             ;; on DOS/Windows as local files.
             (if (and (memq system-type '(windows-nt ms-dos))
--- a/lisp/progmodes/gdb-ui.el	Wed Feb 02 01:54:00 2005 +0000
+++ b/lisp/progmodes/gdb-ui.el	Sun Feb 06 12:06:02 2005 +0000
@@ -4,7 +4,7 @@
 ;; Maintainer: FSF
 ;; Keywords: unix, tools
 
-;; Copyright (C) 2002, 2003, 2004  Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005  Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
@@ -289,13 +289,6 @@
 	     `(lambda () (gdb-var-create-handler ,expr))))))
   (select-window (get-buffer-window gud-comint-buffer 0)))
 
-(defun gdb-goto-info ()
-  "Go to Emacs info node: GDB Graphical Interface."
-  (interactive)
-  (select-frame (make-frame))
-  (require 'info)
-  (Info-goto-node "(emacs)GDB Graphical Interface"))
-
 (defconst gdb-var-create-regexp
   "name=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\",type=\"\\(.*?\\)\"")
 
@@ -1897,6 +1890,18 @@
 
 ;;; Shared keymap initialization:
 
+(let ((menu (make-sparse-keymap "GDB-Windows")))
+  (define-key gud-menu-map [displays]
+    `(menu-item "GDB-Windows" ,menu :visible (eq gud-minor-mode 'gdba)))
+  (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 [registers] '("Registers" . gdb-display-registers-buffer))
+  (define-key menu [locals] '("Locals" . gdb-display-locals-buffer))
+  (define-key menu [frames] '("Stack" . gdb-display-stack-buffer))
+  (define-key menu [breakpoints] '("Breakpoints" . gdb-display-breakpoints-buffer)))
+
 (let ((menu (make-sparse-keymap "GDB-Frames")))
   (define-key gud-menu-map [frames]
     `(menu-item "GDB-Frames" ,menu :visible (eq gud-minor-mode 'gdba)))
@@ -1909,27 +1914,15 @@
   (define-key menu [frames] '("Stack" . gdb-frame-stack-buffer))
   (define-key menu [breakpoints] '("Breakpoints" . gdb-frame-breakpoints-buffer)))
 
-(let ((menu (make-sparse-keymap "GDB-Windows")))
-  (define-key gud-menu-map [displays]
-    `(menu-item "GDB-Windows" ,menu :visible (eq gud-minor-mode 'gdba)))
-  (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 [registers] '("Registers" . gdb-display-registers-buffer))
-  (define-key menu [locals] '("Locals" . gdb-display-locals-buffer))
-  (define-key menu [frames] '("Stack" . gdb-display-stack-buffer))
-  (define-key menu [breakpoints] '("Breakpoints" . gdb-display-breakpoints-buffer)))
-
 (let ((menu (make-sparse-keymap "GDB-UI")))
   (define-key gud-menu-map [ui]
     `(menu-item "GDB-UI" ,menu :visible (eq gud-minor-mode 'gdba)))
   (define-key menu [gdb-restore-windows]
-    '("Restore window layout" . gdb-restore-windows))
+    '("Restore Window Layout" . gdb-restore-windows))
   (define-key menu [gdb-many-windows]
     (menu-bar-make-toggle gdb-many-windows gdb-many-windows
-			  "Display other windows" "Many Windows %s"
-			  "Display locals, stack and breakpoint information")))
+     "Display Other Windows" "Many windows %s"
+     "Toggle display of locals, stack and breakpoint information")))
 
 (defun gdb-frame-gdb-buffer ()
   "Display GUD buffer in a new frame."
--- a/lisp/progmodes/gud.el	Wed Feb 02 01:54:00 2005 +0000
+++ b/lisp/progmodes/gud.el	Sun Feb 06 12:06:02 2005 +0000
@@ -91,9 +91,17 @@
   "Non-nil if debuggee is running.
 Used to grey out relevant toolbar icons.")
 
+(defun gud-goto-info ()
+  "Go to relevant Emacs info node."
+  (interactive)
+  (select-frame (make-frame))
+  (require 'info)
+  (if (memq gud-minor-mode '(gdbmi gdba))
+      (Info-goto-node "(emacs)GDB Graphical Interface")
+    (Info-goto-node "(emacs)Debuggers")))
+
 (easy-mmode-defmap gud-menu-map
-  '(([help]     menu-item "Help" gdb-goto-info
-                  :enable (memq gud-minor-mode '(gdbmi gdba)))
+  '(([help]     "Info" . gud-goto-info)
     ([refresh]	"Refresh" . gud-refresh)
     ([run]	menu-item "Run" gud-run
                   :enable (and (not gud-running)
@@ -172,7 +180,7 @@
 		     (gud-nexti . "gud-ni")
 		     (gud-up . "gud-up")
 		     (gud-down . "gud-down")
-		     (gdb-goto-info . "help"))
+		     (gud-goto-info . "info"))
 		   map)
 	  (tool-bar-local-item-from-menu
 	   (car x) (cdr x) map gud-minor-mode-map)))))
--- a/lisp/textmodes/ispell.el	Wed Feb 02 01:54:00 2005 +0000
+++ b/lisp/textmodes/ispell.el	Sun Feb 06 12:06:02 2005 +0000
@@ -1,6 +1,7 @@
 ;;; ispell.el --- interface to International Ispell Versions 3.1 and 3.2
 
-;; Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
+;;           Free Software Foundation, Inc.
 
 ;; Author:           Ken Stevens <k.stevens@ieee.org>
 ;; Maintainer:       Ken Stevens <k.stevens@ieee.org>
@@ -2419,7 +2420,7 @@
   "Update the dictionary actually used by Ispell.
 This may kill the Ispell process; if so,
 a new one will be started when needed."
-  (let ((dict (or ispell-local-dictionary ispell-dictionary "default")))
+  (let ((dict (or ispell-local-dictionary ispell-dictionary)))
     (unless (equal ispell-current-dictionary dict)
       (setq ispell-current-dictionary dict)
       (ispell-kill-ispell t))))
--- a/lisp/textmodes/reftex.el	Wed Feb 02 01:54:00 2005 +0000
+++ b/lisp/textmodes/reftex.el	Sun Feb 06 12:06:02 2005 +0000
@@ -1228,6 +1228,11 @@
   ;; But, when RESCAN is -1, don't rescan even if docstruct is empty.
   ;; When FILE is non-nil, parse only from that file.
 
+  ;; Error out in a buffer without a file.
+  (if (and reftex-mode
+	   (not (buffer-file-name)))
+      (error "RefTeX works only in buffers visiting a file."))
+
   ;; Make sure we have the symbols tied
   (if (eq reftex-docstruct-symbol nil)
       ;; Symbols are not yet tied: Tie them.
--- a/lisp/x-dnd.el	Wed Feb 02 01:54:00 2005 +0000
+++ b/lisp/x-dnd.el	Sun Feb 06 12:06:02 2005 +0000
@@ -557,18 +557,20 @@
 WINDOW is the window within FRAME where the mouse is now.
 FORMAT is 32 (not used).  MESSAGE is the data part of an XClientMessageEvent."
   (cond ((equal "XdndEnter" message)
-	 (let ((version (ash (car (aref data 1)) -8))
-	       (more-than-3 (cdr (aref data 1)))
-	       (dnd-source (aref data 0)))
-	   (x-dnd-save-state 
-	    window nil nil
-	    (if (> more-than-3 0)
-		(x-window-property "XdndTypeList"
-				   frame "AnyPropertyType"
-				   dnd-source nil t)
-	      (vector (x-get-atom-name (aref data 2))
-		      (x-get-atom-name (aref data 3))
-		      (x-get-atom-name (aref data 4)))))))
+	 (let* ((flags (aref data 1))
+		(version (and (consp flags) (ash (car flags) -8)))
+		(more-than-3 (and (consp flags) (cdr flags)))
+		(dnd-source (aref data 0)))
+	   (if version  ;; If flags is bad, version will be nil.
+	       (x-dnd-save-state
+		window nil nil
+		(if (> more-than-3 0)
+		    (x-window-property "XdndTypeList"
+				       frame "AnyPropertyType"
+				       dnd-source nil t)
+		  (vector (x-get-atom-name (aref data 2))
+			  (x-get-atom-name (aref data 3))
+			  (x-get-atom-name (aref data 4))))))))
 
 	((equal "XdndPosition" message)
 	 (let* ((x (car (aref data 2)))
--- a/lispref/ChangeLog	Wed Feb 02 01:54:00 2005 +0000
+++ b/lispref/ChangeLog	Sun Feb 06 12:06:02 2005 +0000
@@ -1,8 +1,62 @@
-2005-01-31  Luc Teirlinck  <teirllm@auburn.edu>
+2005-02-05  Lute Kamstra  <lute@gnu.org>
+
+	* text.texi (Maintaining Undo): Remove obsolete function.
+
+2005-02-05  Eli Zaretskii  <eliz@gnu.org>
+
+	* frames.texi (Color Names): Add pointer to the X docs about RGB
+	color specifications.  Improve indexing
+	(Text Terminal Colors): Replace the description of RGB values by
+	an xref to "Color Names".
+
+2005-02-03  Richard M. Stallman  <rms@gnu.org>
+
+	* windows.texi (Basic Windows): Add cursor-in-non-selected-windows.
+	Clarify.
+	(Selecting Windows): Clarify save-selected-window.
+	(Cyclic Window Ordering): Clarify walk-windows.
+	(Window Point): Clarify.
+	(Window Start): Add comment to example.
+	(Resizing Windows): Add `interactive' specs in examples.
+	Document fit-window-to-buffer.
+
+	* text.texi (User-Level Deletion): just-one-space takes numeric arg.
+	(Undo, Maintaining Undo): Clarify last change.
+	(Sorting): In sort-numeric-fields, explain about octal and hex.
+	Mention sort-numeric-base.
+	(Format Properties): Add xref for hard newlines.
+
+	* frames.texi (Window Frame Parameters): Explain pixel=char on tty.
+	(Pop-Up Menus): Fix typo.
+	(Color Names): Explain all types of color names.
+	Explain color-values on B&W terminal.
+	(Text Terminal Colors): Explain "rgb values" are lists.  Fix arg names.
+
+	* files.texi (File Locks): Not supported on MS systems.
+	(Testing Accessibility): Clarify.
+
+	* edebug.texi (Printing in Edebug): Fix edebug-print-circle.
+	(Coverage Testing): Fix typo.
+
+	* commands.texi (Misc Events): Remove stray space.
+
+	* buffers.texi (Buffer Names): Clarify generate-new-buffer-name.
+	(Modification Time): Clarify when visited-file-modtime returns 0.
+	(The Buffer List): Clarify bury-buffer.
+	(Killing Buffers): Clarify.
+	(Indirect Buffers): Add clone-indirect-buffer.
+
+2005-02-02  Matt Hodges  <MPHodges@member.fsf.org>
+
+	* edebug.texi (Printing in Edebug): Fix default value of
+	edebug-print-circle.
+	(Coverage Testing): Fix displayed frequency count data.
+
+2005-02-02  Luc Teirlinck  <teirllm@auburn.edu>
 
 	* text.texi (Maintaining Undo): Add `undo-outer-limit'.
 
-2005-02-01  Kim F. Storm  <storm@cua.dk>
+2005-02-02  Kim F. Storm  <storm@cua.dk>
 
 	* text.texi (Undo) <buffer-undo-list>: Describe `apply' elements.
 
--- a/lispref/buffers.texi	Wed Feb 02 01:54:00 2005 +0000
+++ b/lispref/buffers.texi	Sun Feb 06 12:06:02 2005 +0000
@@ -344,11 +344,11 @@
 incrementing the number until it is not the name of an existing buffer.
 
 If the optional second argument @var{ignore} is non-@code{nil}, it
-should be a string; it makes a difference if it is a name in the
-sequence of names to be tried.  That name will be considered acceptable,
-if it is tried, even if a buffer with that name exists.  Thus, if
-buffers named @samp{foo}, @samp{foo<2>}, @samp{foo<3>} and @samp{foo<4>}
-exist,
+should be a string, a potential buffer name.  It means to consider
+that potential buffer acceptable, if it is tried, even it is the name
+of an existing buffer (which would normally be rejected).  Thus, if
+buffers named @samp{foo}, @samp{foo<2>}, @samp{foo<3>} and
+@samp{foo<4>} exist,
 
 @example
 (generate-new-buffer-name "foo")
@@ -629,16 +629,13 @@
 (This is the same format that @code{file-attributes} uses to return
 time values; see @ref{File Attributes}.)
 
-The function returns zero if the buffer has no recorded last
-modification time, which can happen, for instance, if the record has
-been explicitly cleared by @code{clear-visited-file-modtime} or if the
-buffer is not visiting a file.  Note, however, that
-@code{visited-file-modtime} can return a non-zero value for some
-buffers that are not visiting files, but are nevertheless closely
-associated with a file.  This happens, for instance, with dired
-buffers listing a directory.  For such buffers,
-@code{visited-file-modtime} returns the last modification time of that
-directory, as recorded by dired.
+If the buffer has no recorded last modification time, this function
+returns zero.  This case occurs, for instance, if the buffer is not
+visiting a file or if the time has been explicitly cleared by
+@code{clear-visited-file-modtime}.  Note, however, that
+@code{visited-file-modtime} returns a list for some non-file buffers
+too.  For instance, in a Dired buffer listing a directory, it returns
+the last modification time of that directory, as recorded by Dired.
 
 For a new buffer visiting a not yet existing file, @var{high} is
 @minus{}1 and @var{low} is 65535, that is,
@@ -857,7 +854,8 @@
 This function puts @var{buffer-or-name} at the end of the buffer list,
 without changing the order of any of the other buffers on the list.
 This buffer therefore becomes the least desirable candidate for
-@code{other-buffer} to return.
+@code{other-buffer} to return.  The argument can be either a buffer
+itself or the name of one.
 
 @code{bury-buffer} operates on each frame's @code{buffer-list} parameter
 as well as the frame-independent Emacs buffer list; therefore, the
@@ -949,8 +947,8 @@
 @cindex killing buffers
 @cindex buffers, killing
 
-  @dfn{Killing a buffer} makes its name unknown to Emacs and makes its
-text space available for other use.
+  @dfn{Killing a buffer} makes its name unknown to Emacs and makes the
+memory space it occupied available for other use.
 
   The buffer object for the buffer that has been killed remains in
 existence as long as anything refers to it, but it is specially marked
@@ -1101,6 +1099,18 @@
 buffer, not from @var{base-buffer}.
 @end deffn
 
+@defun clone-indirect-buffer newname display-flag &optional norecord
+This function creates and returns a new indirect buffer that shares
+the current buffer's base buffer and copies the rest of the current
+buffer's attributes.  (If the current buffer is not indirect, it is
+used as the base buffer.)
+
+If @var{display-flag} is non-@code{nil}, that means to display the new
+buffer by calling @code{pop-to-buffer}.  If @var{norecord} is
+non-@code{nil}, that means not to put the new buffer to the front of
+the buffer list.
+@end defun
+
 @defun buffer-base-buffer &optional buffer
 This function returns the base buffer of @var{buffer}, which defaults
 to the current buffer.  If @var{buffer} is not indirect, the value is
--- a/lispref/commands.texi	Wed Feb 02 01:54:00 2005 +0000
+++ b/lispref/commands.texi	Sun Feb 06 12:06:02 2005 +0000
@@ -1554,7 +1554,7 @@
 The generated event has this form:
 
 @example
- (help-echo @var{frame} @var{help} @var{window} @var{object} @var{pos})
+(help-echo @var{frame} @var{help} @var{window} @var{object} @var{pos})
 @end example
 
 @noindent
--- a/lispref/edebug.texi	Wed Feb 02 01:54:00 2005 +0000
+++ b/lispref/edebug.texi	Sun Feb 06 12:06:02 2005 +0000
@@ -801,7 +801,7 @@
 
 @defopt edebug-print-circle
 If non-@code{nil}, Edebug binds @code{print-circle} to this value while
-printing results.  The default value is @code{nil}.
+printing results.  The default value is @code{t}.
 @end defopt
 
   Other programs can also use custom printing; see @file{cust-print.el}
@@ -909,7 +909,7 @@
 @example
 (defun fac (n)
   (if (= n 0) (edebug))
-;#6           1      0 =5
+;#6           1      = =5
   (if (< 0 n)
 ;#5         =
       (* n (fac (1- n)))
--- a/lispref/files.texi	Wed Feb 02 01:54:00 2005 +0000
+++ b/lispref/files.texi	Sun Feb 06 12:06:02 2005 +0000
@@ -646,9 +646,10 @@
 @section File Locks
 @cindex file locks
 
-  When two users edit the same file at the same time, they are likely to
-interfere with each other.  Emacs tries to prevent this situation from
-arising by recording a @dfn{file lock} when a file is being modified.
+  When two users edit the same file at the same time, they are likely
+to interfere with each other.  Emacs tries to prevent this situation
+from arising by recording a @dfn{file lock} when a file is being
+modified.  (File locks are not implemented on Microsoft systems.)
 Emacs can then detect the first attempt to modify a buffer visiting a
 file that is locked by another Emacs job, and ask the user what to do.
 The file lock is really a file, a symbolic link with a special name,
@@ -680,14 +681,15 @@
 This function locks the file @var{filename}, if the current buffer is
 modified.  The argument @var{filename} defaults to the current buffer's
 visited file.  Nothing is done if the current buffer is not visiting a
-file, or is not modified.
+file, or is not modified, or if the system does not support locking.
 @end defun
 
 @defun unlock-buffer
 This function unlocks the file being visited in the current buffer,
 if the buffer is modified.  If the buffer is not modified, then
 the file should not be locked, so this function does nothing.  It also
-does nothing if the current buffer is not visiting a file.
+does nothing if the current buffer is not visiting a file, or if the
+system does not support locking.
 @end defun
 
   File locking is not supported on some systems.  On systems that do not
@@ -834,10 +836,11 @@
 @c Emacs 19 feature
 @defun file-accessible-directory-p dirname
 This function returns @code{t} if you have permission to open existing
-files in the directory whose name as a file is @var{dirname}; otherwise
-(or if there is no such directory), it returns @code{nil}.  The value
-of @var{dirname} may be either a directory name or the file name of a
-file which is a directory.
+files in the directory whose name as a file is @var{dirname};
+otherwise (or if there is no such directory), it returns @code{nil}.
+The value of @var{dirname} may be either a directory name (such as
+@file{/foo/}) or the file name of a file which is a directory
+(such as @file{/foo}, without the final slash).
 
 Example: after the following,
 
--- a/lispref/frames.texi	Wed Feb 02 01:54:00 2005 +0000
+++ b/lispref/frames.texi	Sun Feb 06 12:06:02 2005 +0000
@@ -310,12 +310,14 @@
 @node Window Frame Parameters
 @subsection Window Frame Parameters
 
-Just what parameters a frame has depends on what display mechanism it
+  Just what parameters a frame has depends on what display mechanism it
 uses.  Here is a table of the parameters that have special meanings in a
 window frame; of these, @code{name}, @code{title}, @code{height},
 @code{width}, @code{buffer-list} and @code{buffer-predicate} provide
 meaningful information in terminal frames, and @code{tty-color-mode}
-is meaningful @emph{only} in terminal frames.
+is meaningful @emph{only} in terminal frames.  Frame parameter whose
+values measured in pixels, when used on text-only terminals, count
+characters or lines instead.
 
 @table @code
 @item display
@@ -1407,7 +1409,7 @@
 submenu using @code{x-popup-menu}, it cannot work with the menu bar in
 an integrated fashion.  This is why all menu bar submenus are
 implemented with menu keymaps within the parent menu, and never with
-@code{x-popup-menu}.  @xref{Menu Bar},
+@code{x-popup-menu}.  @xref{Menu Bar}.
 
   If you want a menu bar submenu to have contents that vary, you should
 still use a menu keymap to implement it.  To make the contents vary, add
@@ -1586,6 +1588,22 @@
 @node Color Names
 @section Color Names
 
+@cindex color names
+@cindex specify color
+@cindex numerical RGB color specification
+  A color name is text (usually in a string) that specifies a color.
+Symbolic names such as @samp{black}, @samp{white}, @samp{red}, etc.,
+are allowed; use @kbd{M-x list-colors-display} to see a list of
+defined names.  You can also specify colors numerically in forms such
+as @samp{#@var{rgb}} and @samp{RGB:@var{r}/@var{g}/@var{b}}, where
+@var{r} specifies the red level, @var{g} specifies the green level,
+and @var{b} specifies the blue level.  You can use either one, two,
+three, or four hex digits for @var{r}; then you must use the same
+number of hex digits for all @var{g} and @var{b} as well, making
+either 3, 6, 9 or 12 hex digits in all.  (See the documentation of the
+X Window System for more details about numerical RGB specification of
+colors.)
+
   These functions provide a way to determine which color names are
 valid, and what they look like.  In some cases, the value depends on the
 @dfn{selected frame}, as described below; see @ref{Input Focus}, for the
@@ -1644,12 +1662,14 @@
 
 @defun color-values color &optional frame
 @tindex color-values
+@cindex rgb value
 This function returns a value that describes what @var{color} should
 ideally look like on @var{frame}.  If @var{color} is defined, the
 value is a list of three integers, which give the amount of red, the
 amount of green, and the amount of blue.  Each integer ranges in
 principle from 0 to 65535, but some displays may not use the full
-range.  This kind of three-element list is called an @dfn{rgb value}.
+range.  This three-element list is called the @dfn{rgb values} of the
+color.
 
 If @var{color} is not defined, the value is @code{nil}.
 
@@ -1666,9 +1686,10 @@
      @result{} nil
 @end example
 
-The color values are returned for @var{frame}'s display.  If @var{frame}
-is omitted or @code{nil}, the information is returned for the selected
-frame's display.
+The color values are returned for @var{frame}'s display.  If
+@var{frame} is omitted or @code{nil}, the information is returned for
+the selected frame's display.  If the frame cannot display colors, the
+value is @code{nil}.
 
 @findex x-color-values
 This function used to be called @code{x-color-values},
@@ -1690,37 +1711,34 @@
   The functions described in this section control how terminal colors
 are used by Emacs.
 
-@cindex rgb value
-  Several of these functions use or return @dfn{rgb values}.  An rgb
-value is a list of three integers, which give the amount of red, the
-amount of green, and the amount of blue.  Each integer ranges in
-principle from 0 to 65535, but some displays may not use the full range.  .
+  Several of these functions use or return @dfn{rgb values}, described
+in @ref{Color Names}.
 
   These functions accept a display (either a frame or the name of a
 terminal) as an optional argument.  We hope in the future to make Emacs
 support more than one text-only terminal at one time; then this argument
 will specify which terminal to operate on (the default being the
 selected frame's terminal; @pxref{Input Focus}).  At present, though,
-the @var{display} argument has no effect.
+the @var{frame} argument has no effect.
 
-@defun tty-color-define name number &optional rgb display
+@defun tty-color-define name number &optional rgb frame
 @tindex tty-color-define
 This function associates the color name @var{name} with
 color number @var{number} on the terminal.
 
-The optional argument @var{rgb}, if specified, is an rgb value; it says
-what the color actually looks like.  If you do not specify @var{rgb},
-then this color cannot be used by @code{tty-color-approximate} to
-approximate other colors, because Emacs does not know what it looks
-like.
+The optional argument @var{rgb}, if specified, is an rgb value, a list
+of three numbers that specify what what the color actually looks like.
+If you do not specify @var{rgb}, then this color cannot be used by
+@code{tty-color-approximate} to approximate other colors, because
+Emacs will not know what it looks like.
 @end defun
 
-@defun tty-color-clear &optional display
+@defun tty-color-clear &optional frame
 @tindex tty-color-clear
 This function clears the table of defined colors for a text-only terminal.
 @end defun
 
-@defun tty-color-alist &optional display
+@defun tty-color-alist &optional frame
 @tindex tty-color-alist
 This function returns an alist recording the known colors supported by a
 text-only terminal.
@@ -1728,26 +1746,23 @@
 Each element has the form @code{(@var{name} @var{number} . @var{rgb})}
 or @code{(@var{name} @var{number})}.  Here, @var{name} is the color
 name, @var{number} is the number used to specify it to the terminal.
-If present, @var{rgb} is an rgb value that says what the color
-actually looks like.
+If present, @var{rgb} is a list of three color values (for red, green,
+and blue) that says what the color actually looks like.
 @end defun
 
-@defun tty-color-approximate rgb &optional display
+@defun tty-color-approximate rgb &optional frame
 @tindex tty-color-approximate
-This function finds the closest color, among the known colors supported
-for @var{display}, to that described by the rgb value @var{rgb}.
-The return value is an element of @code{tty-color-alist}.
+This function finds the closest color, among the known colors
+supported for @var{display}, to that described by the rgb value
+@var{rgb} (a list of color values).  The return value is an element of
+@code{tty-color-alist}.
 @end defun
 
-@defun tty-color-translate color &optional display
+@defun tty-color-translate color &optional frame
 @tindex tty-color-translate
 This function finds the closest color to @var{color} among the known
 colors supported for @var{display} and returns its index (an integer).
 If the name @var{color} is not defined, the value is @code{nil}.
-
-@var{color} can be an X-style @code{"#@var{xxxyyyzzz}"} specification
-instead of an actual name.  The format
-@code{"RGB:@var{xx}/@var{yy}/@var{zz}"} is also supported.
 @end defun
 
 @node Resources
--- a/lispref/text.texi	Wed Feb 02 01:54:00 2005 +0000
+++ b/lispref/text.texi	Sun Feb 06 12:06:02 2005 +0000
@@ -1,7 +1,7 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
 @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999,
-@c 2000, 2001, 2004
+@c 2000, 2001, 2004, 2005
 @c   Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../info/text
@@ -720,10 +720,11 @@
 @end smallexample
 @end deffn
 
-@deffn Command just-one-space
+@deffn Command just-one-space &optional n
 @comment !!SourceFile simple.el
 This command replaces any spaces and tabs around point with a single
-space.  It returns @code{nil}.
+space, or @var{n} spaces if @var{n} is specified.  It returns
+@code{nil}.
 @end deffn
 
 @deffn Command delete-blank-lines
@@ -1218,7 +1219,8 @@
 and @var{end} is buffer positions of the range affected by this change
 and @var{delta} is an integer value which is the number of bytes added
 or deleted in that range by this change.  This kind of element
-supports undo in an active region
+enables undo limited to a region to determine whether the element
+pertains to that region.
 
 @item (@var{marker} . @var{adjustment})
 This kind of element records the fact that the marker @var{marker} was
@@ -1303,7 +1305,6 @@
 @end deffn
 
 @deffn Command buffer-disable-undo &optional buffer-or-name
-@deffnx Command buffer-flush-undo &optional buffer-or-name
 @cindex disable undo
 This function discards the undo list of @var{buffer-or-name}, and disables
 further recording of undo information.  As a result, it is no longer
@@ -1312,9 +1313,6 @@
 has no effect.
 
 This function returns @code{nil}.
-
-The name @code{buffer-flush-undo} is not considered obsolete, but the
-preferred name is @code{buffer-disable-undo}.
 @end deffn
 
   As editing continues, undo lists get longer and longer.  To prevent
@@ -1339,8 +1337,8 @@
 
 @defopt undo-outer-limit
 If at garbage collection time the undo info for the current command
-exceeds this limit, Emacs discards the info and prints a warning
-message.  This is a last ditch limit to prevent memory overflow.
+exceeds this limit, Emacs discards the info and displays a warning.
+This is a last ditch limit to prevent memory overflow.
 @end defopt
 
 @node Filling
@@ -1915,19 +1913,27 @@
 
 @deffn Command sort-numeric-fields field start end
 This command sorts lines in the region between @var{start} and
-@var{end}, comparing them numerically by the @var{field}th field of each
-line.  The specified field must contain a number in each line of the
-region.  Fields are separated by whitespace and numbered starting from
-1.  If @var{field} is negative, sorting is by the
-@w{@minus{}@var{field}th} field from the end of the line.  This command
-is useful for sorting tables.
+@var{end}, comparing them numerically by the @var{field}th field of
+each line.  Fields are separated by whitespace and numbered starting
+from 1.  The specified field must contain a number in each line of the
+region.  Numbers starting with 0 are treated as octal, and numbers
+starting with @samp{0x} are treated as hexadecimal.
+
+If @var{field} is negative, sorting is by the
+@w{@minus{}@var{field}th} field from the end of the line.  This
+command is useful for sorting tables.
 @end deffn
 
+@defopt sort-numeric-base
+This variable specifies the default radix for
+@code{sort-numeric-fields} to parse numbers.
+@end defopt
+
 @deffn Command sort-columns reverse &optional beg end
 This command sorts the lines in the region between @var{beg} and
-@var{end}, comparing them alphabetically by a certain range of columns.
-The column positions of @var{beg} and @var{end} bound the range of
-columns to sort on.
+@var{end}, comparing them alphabetically by a certain range of
+columns.  The column positions of @var{beg} and @var{end} bound the
+range of columns to sort on.
 
 If @var{reverse} is non-@code{nil}, the sort is in reverse order.
 
@@ -3119,8 +3125,9 @@
 @item hard
 If a newline character has this property, it is a ``hard'' newline.
 The fill commands do not alter hard newlines and do not move words
-across them.  However, this property takes effect only if the variable
-@code{use-hard-newlines} is non-@code{nil}.
+across them.  However, this property takes effect only if the
+@code{use-hard-newlines} minor mode is enabled.  @xref{Hard and Soft
+Newlines,, Hard and Soft Newlines, emacs, The GNU Emacs Manual}.
 
 @item right-margin
 This property specifies an extra right margin for filling this part of the
--- a/lispref/windows.texi	Wed Feb 02 01:54:00 2005 +0000
+++ b/lispref/windows.texi	Sun Feb 06 12:06:02 2005 +0000
@@ -53,11 +53,17 @@
 
   In each frame, at any time, one and only one window is designated as
 @dfn{selected within the frame}.  The frame's cursor appears in that
-window.  At any time, one frame is the selected frame; and the window
-selected within that frame is @dfn{the selected window}.  The selected
-window's buffer is usually the current buffer (except when
+window, but the other windows have ``non-selected'' cursors, normally
+less visible.  At any time, one frame is the selected frame; and the
+window selected within that frame is @dfn{the selected window}.  The
+selected window's buffer is usually the current buffer (except when
 @code{set-buffer} has been used).  @xref{Current Buffer}.
 
+@defvar cursor-in-non-selected-windows
+If this variable is @code{nil}, Emacs displays only one cursor,
+in the selected window.  Other windows have no cursor at all.
+@end defvar
+
   For practical purposes, a window exists only while it is displayed in
 a frame.  Once removed from the frame, the window is effectively deleted
 and should not be used, @emph{even though there may still be references
@@ -455,10 +461,10 @@
 @end defun
 
 @defmac save-selected-window forms@dots{}
-This macro records the selected window, as well as the selected window
+This macro records the selected frame, as well as the selected window
 of each frame, executes @var{forms} in sequence, then restores the
-earlier selected windows.  It returns the value of the last form in
-@var{forms}.
+earlier selected frame and windows It returns the value of the last
+form in @var{forms}.
 
 This macro does not save or restore anything about the sizes,
 arrangement or contents of windows; therefore, if the @var{forms}
@@ -648,8 +654,9 @@
 
 @c Emacs 19 feature
 @defun walk-windows proc &optional minibuf all-frames
-This function cycles through all windows, calling @code{proc}
-once for each window with the window as its sole argument.
+This function cycles through all windows.  It calls the function
+@code{proc} once for each window, with the window as its sole
+argument.
 
 The optional arguments @var{minibuf} and @var{all-frames} specify the
 set of windows to include in the scan.  See @code{next-window}, above,
@@ -1175,10 +1182,10 @@
 @item
 As long as the selected window displays the current buffer, the window's
 point and the buffer's point always move together; they remain equal.
+@end itemize
 
-@item
+@noindent
 @xref{Positions}, for more details on buffer positions.
-@end itemize
 
   As far as the user is concerned, point is where the cursor is, and
 when the user switches to another buffer, the cursor jumps to the
@@ -1356,6 +1363,7 @@
 
 @example
 @group
+;; @r{If point is off the screen now, recenter it now.}
 (or (pos-visible-in-window-p
      (point) (selected-window))
     (recenter 0))
@@ -1984,6 +1992,7 @@
 @example
 @group
 (defun enlarge-window-horizontally (columns)
+  (interactive "p")
   (enlarge-window columns t))
 @end group
 @end example
@@ -2006,16 +2015,29 @@
 @example
 @group
 (defun shrink-window-horizontally (columns)
+  (interactive "p")
   (shrink-window columns t))
 @end group
 @end example
 @end deffn
 
+@defun fit-window-to-buffer &optional window max-height min-height
+This function makes @var{window} the right height to display its
+contents exactly.  If @var{window} is omitted or @code{nil}, it uses
+the selected window.
+
+The argument @var{max-height} specifies the maximum height the window
+is allowed to be; @code{nil} means use the frame height.  The argument
+@var{min-height} specifies the minimum height for the window;
+@code{nil} means use @code{window-min-height}.  All these height
+values include the mode-line and/or header-line.
+@end defun
+
 @deffn Command shrink-window-if-larger-than-buffer &optional window
-This command shrinks @var{window} to be as small as possible while still
-showing the full contents of its buffer---but not less than
-@code{window-min-height} lines.  If @var{window} is not given,
-it defaults to the selected window.
+This command shrinks @var{window} vertically to be as small as
+possible while still showing the full contents of its buffer---but not
+less than @code{window-min-height} lines.  If @var{window} is not
+given, it defaults to the selected window.
 
 However, the command does nothing if the window is already too small to
 display the whole text of the buffer, or if part of the contents are
--- a/mac/inc/config.h	Wed Feb 02 01:54:00 2005 +0000
+++ b/mac/inc/config.h	Sun Feb 06 12:06:02 2005 +0000
@@ -1,4 +1,4 @@
-/* Handcrafted Emacs site configuration file for Mac OS.  -*- C -*- */
+/* Handcrafted Emacs site configuration file for Mac OS 9.  -*- C -*- */
 
 /* GNU Emacs site configuration template file.  -*- C -*-
    Copyright (C) 1988, 1993, 1994, 1999, 2000 Free Software Foundation, Inc.
--- a/mac/inc/s-mac.h	Wed Feb 02 01:54:00 2005 +0000
+++ b/mac/inc/s-mac.h	Sun Feb 06 12:06:02 2005 +0000
@@ -1,4 +1,4 @@
-/* Handcrafted s-mac.h file for building GNU Emacs on the Macintosh.
+/* Handcrafted s-mac.h file for building GNU Emacs on Mac OS 9.
    Copyright (C) 1999, 2000 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
--- a/man/ChangeLog	Wed Feb 02 01:54:00 2005 +0000
+++ b/man/ChangeLog	Sun Feb 06 12:06:02 2005 +0000
@@ -1,4 +1,54 @@
-2005-01-31  Luc Teirlinck  <teirllm@auburn.edu>
+2005-02-05  Eli Zaretskii  <eliz@gnu.org>
+
+	* frames.texi (Frame Parameters): Add an xref to the description
+	of list-colors-display.  Add a pointer to the X docs about colors.
+
+	* cmdargs.texi (Colors): Mention 16-, 88- and 256-color modes.
+	Impove docs of list-colors-display.
+
+2005-02-03  Lute Kamstra  <lute@gnu.org>
+
+	* frames.texi (Frames, Drag and Drop): Fix typos.
+
+2005-02-03  Richard M. Stallman  <rms@gnu.org>
+
+	* windows.texi (Basic Window): Mention color-change in mode line.
+	(Change Window): Explain dragging vertical boundaries.
+
+	* text.texi (Sentences): Clarify.
+	(Paragraphs): Explain M-a and blank lines.
+	(Outline Mode): Clarify text and menu.
+	(Hard and Soft Newlines): Mention use-hard-newlines.
+
+	* frames.texi (Frames): Delete unnecessary mention of Windows.
+	(Mouse Commands): Likewise.  Mention xterm mouse support.
+	(Clipboard): Clarify.
+	(Mouse References): Mention use of Mouse-1 for following links.
+	(Menu Mouse Clicks): Clarify.
+	(Mode Line Mouse): Clarify.
+	(Drag and Drop): Rewrite.
+
+	* fixit.texi (Spelling): Fix typo.
+
+	* files.texi (File Names): Clarify.
+	(Visiting): Update conditions for use of file dialog.  Clarify.
+	(Saving): Doc d as answer in save-some-buffers.
+	(Remote Files): Clean up the text.
+
+	* dired.texi (Misc Dired Commands): Delete dired-marked-files.
+
+	* buffers.texi (Select Buffer): Doc next-buffer and prev-buffer.
+	(List Buffers): Clarify.
+	(Several Buffers): Doc T command.
+	(Buffer Convenience): Clarify menu.
+
+	* basic.texi (Undo): Clarify last change.
+
+2005-02-02  Matt Hodges  <MPHodges@member.fsf.org>
+
+	* fixit.texi (Spelling): Fix typo.
+
+2005-02-01  Luc Teirlinck  <teirllm@auburn.edu>
 
 	* basic.texi (Undo): Update description of `undo-outer-limit'.
 
--- a/man/basic.texi	Wed Feb 02 01:54:00 2005 +0000
+++ b/man/basic.texi	Sun Feb 06 12:06:02 2005 +0000
@@ -400,7 +400,7 @@
   Regardless of the values of those variables, the most recent change
 is never discarded unless it gets bigger than @code{undo-outer-limit}
 (normally 3,000,000).  At that point, Emacs discards the undo data and
-warns you about it.  This is the only situation in which you can not
+warns you about it.  This is the only situation in which you cannot
 undo the last command.  If this happens, you can increase the value of
 @code{undo-outer-limit} to make it even less likely to happen in the
 future.  But if you didn't expect the command to create such large
--- a/man/buffers.texi	Wed Feb 02 01:54:00 2005 +0000
+++ b/man/buffers.texi	Sun Feb 06 12:06:02 2005 +0000
@@ -67,6 +67,10 @@
 @table @kbd
 @item C-x b @var{buffer} @key{RET}
 Select or create a buffer named @var{buffer} (@code{switch-to-buffer}).
+@item C-x @key{LEFT}
+Select the previous buffer in the list of existing buffers.
+@item C-x @key{RIGHT}
+Select the next buffer in the list of existing buffers.
 @item C-x 4 b @var{buffer} @key{RET}
 Similar, but select @var{buffer} in another window
 (@code{switch-to-buffer-other-window}).
@@ -84,6 +88,16 @@
 specifies the buffer that was current most recently among those not
 now displayed in any window.
 
+@kindex C-x @key{LEFT}
+@kindex C-x @key{RIGHT}
+@findex next-buffer
+@findex prev-buffer
+  For conveniently switching between a few buffers, use the commands
+@kbd{C-x @key{LEFT}} and @kbd{C-x @key{RIGHT}}.  @kbd{C-x @key{RIGHT}}
+(@code{prev-buffer}) selects the previous buffer (following the order
+of most recent selection), while @kbd{C-x @key{LEFT}}
+(@code{next-buffer}) moves through buffers in the reverse direction.
+
 @kindex C-x 4 b
 @findex switch-to-buffer-other-window
 @vindex even-window-heights
@@ -141,9 +155,9 @@
 @cindex listing current buffers
 @kindex C-x C-b
 @findex list-buffers
-  To display a list of all the buffers that exist, type @kbd{C-x C-b}.
-Each line in the list shows one buffer's name, major mode and visited
-file.  The buffers are listed in the order that they were current; the
+  To display a list of existing buffers, type @kbd{C-x C-b}.  Each
+line in the list shows one buffer's name, major mode and visited file.
+The buffers are listed in the order that they were current; the
 buffers that were current most recently come first.
 
   @samp{*} in the first field of a line indicates the buffer is ``modified.''
@@ -171,7 +185,7 @@
 visiting files by giving the command a prefix; for instance, by typing
 @kbd{C-u C-x C-b}.
 
-@code{list-buffers} omits buffers whose name begins with a blank,
+  @code{list-buffers} omits buffers whose names begin with a space,
 unless they visit files: such buffers are used internally by Emacs.
 
 @need 2000
@@ -332,8 +346,9 @@
 buffers@footnote{Buffers which don't visit files and whose names begin
 with a space are omitted: these are used internally by Emacs.} into the
 buffer @samp{*Buffer List*}, and selects that buffer in Buffer Menu
-mode.  The list in the @samp{*Buffer List*} buffer looks exactly as
-described in @ref{List Buffers}.  The buffer is read-only, and can be
+mode.
+
+  The buffer is read-only, and can be
 changed only through the special commands described in this section.
 The usual Emacs cursor motion commands can be used in the @samp{*Buffer
 List*} buffer.  The following commands apply to the buffer described on
@@ -411,21 +426,32 @@
 marked any buffers, this command is equivalent to @kbd{1}.
 @end table
 
-  All that @code{buffer-menu} does directly is create and switch to a
-suitable buffer, and turn on Buffer Menu mode.  Everything else
+  There is also a command that affects the entire buffer list:
+
+@table @kbd
+@item T
+Delete, or reinsert, lines for non-file buffers.  This command toggles
+the inclusion of such buffers in the buffer list.
+@end table
+
+  What @code{buffer-menu} actually does is create and switch to a
+suitable buffer, and turn on Buffer Menu mode in it.  Everything else
 described above is implemented by the special commands provided in
 Buffer Menu mode.  One consequence of this is that you can switch from
-the @samp{*Buffer List*} buffer to another Emacs buffer, and edit there.
-You can reselect the @samp{*Buffer List*} buffer later, to perform the
-operations already requested, or you can kill it, or pay no further
-attention to it.
+the @samp{*Buffer List*} buffer to another Emacs buffer, and edit
+there.  You can reselect the @samp{*Buffer List*} buffer later, to
+perform the operations already requested, or you can kill it, or pay
+no further attention to it.
 
-  The only difference between @code{buffer-menu} and @code{list-buffers}
-is that @code{buffer-menu} switches to the @samp{*Buffer List*} buffer
-in the selected window; @code{list-buffers} displays it in another
-window.  If you run @code{list-buffers} (that is, type @kbd{C-x C-b})
-and select the buffer list manually, you can use all of the commands
-described here.
+  The list in the @samp{*Buffer List*} buffer looks exactly like the
+buffer list described in @ref{List Buffers}, because they really are
+the same.  The only difference between @code{buffer-menu} and
+@code{list-buffers} is that @code{buffer-menu} switches to the
+@samp{*Buffer List*} buffer in the selected window;
+@code{list-buffers} displays the same buffer in another window.  If
+you run @code{list-buffers} (that is, type @kbd{C-x C-b}) and select
+the buffer list manually, you can use all of the commands described
+here.
 
   Normally, the buffer @samp{*Buffer List*} is not updated automatically when
 buffers are created and killed; its contents are just text.  If you have
@@ -506,7 +532,7 @@
 convenient to switch between buffers.
 
 @menu
-* Uniquify::               Buffer names can contain directory parts.
+* Uniquify::               Making buffer names unique with directory parts.
 * Iswitchb::               Switching between buffers with substrings.
 * Buffer Menus::           Configurable buffer menu.
 @end menu
--- a/man/cmdargs.texi	Wed Feb 02 01:54:00 2005 +0000
+++ b/man/cmdargs.texi	Sun Feb 06 12:06:02 2005 +0000
@@ -874,6 +874,9 @@
 parts of the Emacs display.  To find out what colors are available on
 your system, type @kbd{M-x list-colors-display}, or press
 @kbd{C-Mouse-2} and select @samp{Display Colors} from the pop-up menu.
+(A particular window system might support many more colors, but the
+list displayed by @code{list-colors-display} shows their portable
+subset that can be safely used on any display supported by Emacs.)
 If you do not specify colors, on windowed displays the default for the
 background is white and the default for all other colors is black.  On a
 monochrome display, the foreground is black, the background is white,
@@ -947,7 +950,9 @@
 Use color mode for @var{num} colors.  If @var{num} is -1, turn off
 color support (equivalent to @samp{never}); if it is 0, use the
 default color support for this terminal (equivalent to @samp{auto});
-otherwise use an appropriate standard mode for @var{num} colors.  If
+otherwise use an appropriate standard mode for @var{num} colors.
+Depending on your terminal's capabilities, Emacs might be able to turn
+on a color mode for 8, 16, 88, or 256 as the value of @var{num}.  If
 there is no mode that supports @var{num} colors, Emacs acts as if
 @var{num} were 0, i.e.@: it uses the terminal's default color support
 mode.
--- a/man/dired.texi	Wed Feb 02 01:54:00 2005 +0000
+++ b/man/dired.texi	Sun Feb 06 12:06:02 2005 +0000
@@ -1116,13 +1116,10 @@
 point is on a directory headerline, @kbd{w} gives you the name of that
 directory without looking for marked files.
 
-@vindex dired-marked-files
 The main purpose of the @kbd{w} command is so that you can yank the
 file names into arguments for other Emacs commands.  It also displays
 what was pushed onto the kill ring, so you can use it to display the
-list of currently marked files in the echo area.  It also stores the
-list of names in the variable @code{dired-marked-files}, for use in
-Lisp expressions.
+list of currently marked files in the echo area.
 @end table
 
 @ignore
--- a/man/files.texi	Wed Feb 02 01:54:00 2005 +0000
+++ b/man/files.texi	Sun Feb 06 12:06:02 2005 +0000
@@ -120,7 +120,7 @@
 only when done before Emacs is started.
 
 @cindex home directory shorthand
-  You can use the @file{~/} in a file name to mean your home directory,
+  You can use @file{~/} in a file name to mean your home directory,
 or @file{~@var{user-id}/} to mean the home directory of a user whose
 login name is @code{user-id}.  (On DOS and Windows systems, where a user
 doesn't have a home directory, Emacs substitutes @file{~/} with the
@@ -208,11 +208,13 @@
 about this, see @ref{Completion Options}.
 
 @cindex file selection dialog
-  When Emacs is built with a suitable GUI toolkit, it pops up the
-standard File Selection dialog of that toolkit instead of prompting for
-the file name in the minibuffer.  On Unix and GNU/Linux platforms, Emacs
-does that when built with LessTif and Motif toolkits; on MS-Windows, the
-GUI version does that by default.
+  When Emacs is built with a suitable GUI toolkit, commands invoked
+with the mouse or the menu bar use the toolkit's standard File
+Selection dialog instead of prompting for the file name in the
+minibuffer.  On Unix and GNU/Linux platforms, Emacs does that when
+built with GTK, LessTif, and Motif toolkits; on MS-Windows, the GUI
+version does that by default.  @xref{Dialog Boxes}, for info
+on customization of this.
 
   Your confirmation that @kbd{C-x C-f} has completed successfully is the
 appearance of new text on the screen and a new buffer name in the mode
@@ -253,10 +255,10 @@
 @vindex find-file-run-dired
   If the file you specify is actually a directory, @kbd{C-x C-f} invokes
 Dired, the Emacs directory browser, so that you can ``edit'' the contents
-of the directory (@pxref{Dired}).  Dired is a convenient way to delete,
-look at, or operate on the files in the directory.  However, if the
-variable @code{find-file-run-dired} is @code{nil}, then it is an error
-to try to visit a directory.
+of the directory (@pxref{Dired}).  Dired is a convenient way to view, delete,
+or operate on the files in the directory.  However, if the variable
+@code{find-file-run-dired} is @code{nil}, then it is an error to try
+to visit a directory.
 
   Files which are actually collections of other files, or @dfn{file
 archives}, are visited in special modes which invoke a Dired-like
@@ -407,6 +409,9 @@
 View the buffer that you are currently being asked about.  When you exit
 View mode, you get back to @code{save-some-buffers}, which asks the
 question again.
+@item d
+Diff the buffer against its corresponding file, so you can see
+what changes you would be saving.
 @item C-h
 Display a help message about these options.
 @end table
@@ -3085,26 +3090,24 @@
 @end example
 
 @noindent
-When you do this, Emacs may use the FTP program to access files on the
-remote host, or Emacs may use a remote-login program (such as
-@command{ssh}, @command{rlogin}, or @command{telnet}) to do this.
-
-You can always specify in the file name which method should be used to
-access the remote files, for example
+To carry out this request, Emacs uses either the FTP program or a
+remote-login program such as @command{ssh}, @command{rlogin}, or
+@command{telnet}.  You can always specify in the file name which
+method to use---for example,
 @file{/ftp:@var{user}@@@var{host}:@var{filename}} uses FTP, whereas
 @file{/ssh:@var{user}@@@var{host}:@var{filename}} uses @command{ssh}.
-When you don't specify a method in the file name, Emacs determines a
-default method according to the following rules:
+When you don't specify a method in the file name, Emacs chooses
+the method as follows:
 
 @enumerate
 @item
-If the host name starts with @samp{ftp.} (with dot), then Emacs assumes
-the @command{ftp} method.
+If the host name starts with @samp{ftp.} (with dot), then Emacs uses
+FTP.
 @item
-If the user name is @samp{ftp} or @samp{anonymous}, then Emacs assumes
-the @command{ftp} method.
+If the user name is @samp{ftp} or @samp{anonymous}, then Emacs uses
+FTP.
 @item
-Otherwise, Emacs assumes the @command{ssh} method.
+Otherwise, Emacs uses @command{ssh}.
 @end enumerate
 
 @noindent
--- a/man/fixit.texi	Wed Feb 02 01:54:00 2005 +0000
+++ b/man/fixit.texi	Sun Feb 06 12:06:02 2005 +0000
@@ -159,7 +159,7 @@
 @table @kbd
 @item M-x flyspell-mode
 Enable Flyspell mode, which highlights all misspelled words.
-@item M-x flyspell-progmode
+@item M-x flyspell-prog-mode
 Enable Flyspell mode for comments and strings only.
 @item M-$
 Check and correct spelling of the word at point (@code{ispell-word}).
--- a/man/frames.texi	Wed Feb 02 01:54:00 2005 +0000
+++ b/man/frames.texi	Sun Feb 06 12:06:02 2005 +0000
@@ -29,10 +29,6 @@
 so that you can use many of the features described in this chapter.
 @xref{MS-DOS Input}, for more information.
 
-@cindex MS Windows
-  Emacs compiled for MS Windows mostly supports the same features as
-under X.
-
 @menu
 * Mouse Commands::      Moving, cutting, and pasting, with the mouse.
 * Secondary Selection:: Cutting without altering point and mark.
@@ -48,7 +44,7 @@
 * Frame Parameters::    Changing the colors and other modes of frames.
 * Scroll Bars::	        How to enable and disable scroll bars; how to use them.
 * Wheeled Mice::        Using mouse wheels for scrolling.
-* Drag and drop::       Using drag and drop to open files and insert text.
+* Drag and Drop::       Using drag and drop to open files and insert text.
 * Menu Bars::	        Enabling and disabling the menu bar.
 * Tool Bars::           Enabling and disabling the tool bar.
 * Dialog Boxes::        Controlling use of dialog boxes.
@@ -64,7 +60,9 @@
 
   The mouse commands for selecting and copying a region are mostly
 compatible with the @code{xterm} program.  You can use the same mouse
-commands for copying between Emacs and other X client programs.
+commands for copying between Emacs and other window-based programs.
+Most of these commands also work in Emacs when you run it under an
+@code{xterm} terminal.
 
 @kindex DELETE @r{(and mouse selection)}
   If you select a region with any of these mouse commands, and then
@@ -188,8 +186,6 @@
 system for X selections, use @kbd{C-x @key{RET} x} or @kbd{C-x
 @key{RET} X}.  @xref{Specify Coding}.
 
-  These cutting and pasting commands also work on MS-Windows.
-
 @cindex primary selection
 @cindex cut buffer
 @cindex selection, primary
@@ -270,7 +266,7 @@
 @cindex OpenWindows
 @cindex Gnome
 
-  As well as the primary and secondary selection types, X supports a
+  Apart from the primary and secondary selection types, X supports a
 @dfn{clipboard} selection type which is used by some applications,
 particularly under OpenWindows and Gnome.
 
@@ -287,28 +283,42 @@
 
 @node Mouse References
 @section Following References with the Mouse
+@kindex Mouse-1 @r{(selection)}
 @kindex Mouse-2 @r{(selection)}
 
-  Some Emacs buffers display lists of various sorts.  These include
-lists of files, of buffers, of possible completions, of matches for
-a pattern, and so on.
+  Some read-only Emacs buffers include references you can follow, or
+commands you can activate.  These include names of files, of buffers,
+of possible completions, of matches for a pattern, as well as the
+buttons in Help buffers and customization buffers.  You can follow the
+reference or activate the command by moving point to it and typing
+@key{RET}.  You can also do this with the mouse, using either
+@kbd{Mouse-1} or @kbd{Mouse-2}.
 
-  Since yanking text into these buffers is not very useful, most of them
-define @kbd{Mouse-2} specially, as a command to use or view the item you
-click on.
+  Since yanking text into a read-only buffer is not allowed, these
+buffers generally define @kbd{Mouse-2} to follow a reference or
+activate a command.  For example, if you click @kbd{Mouse-2} on a file
+name in a Dired buffer, you visit that file.  If you click
+@kbd{Mouse-2} on an error message in the @samp{*Compilation*} buffer,
+you go to the source code for that error message.  If you click
+@kbd{Mouse-2} on a completion in the @samp{*Completions*} buffer, you
+choose that completion.
 
-  For example, if you click @kbd{Mouse-2} on a file name in a Dired
-buffer, you visit that file.  If you click @kbd{Mouse-2} on an error
-message in the @samp{*Compilation*} buffer, you go to the source code
-for that error message.  If you click @kbd{Mouse-2} on a completion in
-the @samp{*Completions*} buffer, you choose that completion.
+@vindex mouse-1-click-follows-link
+  However, most applications use @kbd{Mouse-1} to do this sort of
+thing, so Emacs implements this too.  If you click @kbd{Mouse-1}
+quickly on a reference or button, it follows or activates.  If you
+click slowly, it moves point as usual.  Dragging, meaning moving the
+mouse while it is held down, also has its usual behavior of setting
+the region.  The variable @code{mouse-1-click-follows-link} controls
+whether @kbd{Mouse-1} has this behavior.
 
 @vindex mouse-highlight
-  You can usually tell when @kbd{Mouse-2} has this special sort of
-meaning because the sensitive text highlights when you move the mouse
-over it.  The variable @code{mouse-highlight} controls whether to do
-this highlighting always (even when such text appears where the mouse
-already is), never, or only immediately after you move the mouse.
+  You can usually tell when @kbd{Mouse-1} and @kbd{Mouse-2} have this
+special sort of meaning because the sensitive text highlights when you
+move the mouse over it.  The variable @code{mouse-highlight} controls
+whether to do this highlighting always (even when such text appears
+where the mouse already is), never, or only immediately after you move
+the mouse.
 
 @node Menu Mouse Clicks
 @section Mouse Clicks for Menus
@@ -331,16 +341,17 @@
 
 @item C-Mouse-3
 @kindex C-Mouse-3
-This menu is mode-specific.  For most modes if Menu-bar mode is on, this
-menu has the same items as all the mode-specific menu-bar menus put
-together.  Some modes may specify a different menu for this
+This menu is mode-specific.  For most modes if Menu-bar mode is on,
+this menu has the same items as all the mode-specific menu-bar menus
+put together.  Some modes may specify a different menu for this
 button.@footnote{Some systems use @kbd{Mouse-3} for a mode-specific
 menu.  We took a survey of users, and found they preferred to keep
-@kbd{Mouse-3} for selecting and killing regions.  Hence the decision to
-use @kbd{C-Mouse-3} for this menu.}  If Menu-bar mode is off, this menu
-contains all the items which would be present in the menu bar---not just
-the mode-specific ones---so that you can access them without having to
-display the menu bar.
+@kbd{Mouse-3} for selecting and killing regions.  Hence the decision
+to use @kbd{C-Mouse-3} for this menu.  To use @kbd{Mouse-3} instead,
+do @code{(global-set-key [mouse-3] 'mouse-popup-menubar-stuff)}.}  If
+Menu-bar mode is off, this menu contains all the items which would be
+present in the menu bar---not just the mode-specific ones---so that
+you can access them without having to display the menu bar.
 
 @item S-Mouse-1
 This menu is for specifying the frame's principal font.
@@ -357,9 +368,9 @@
 @table @kbd
 @item Mouse-1
 @kindex Mouse-1 @r{(mode line)}
-@kbd{Mouse-1} on a mode line selects the window above.  By dragging
-@kbd{Mouse-1} on the mode line, you can move it, thus changing the
-height of the windows above and below.
+@kbd{Mouse-1} on a mode line selects the window it belongs to.  By
+dragging @kbd{Mouse-1} on the mode line, you can move it, thus
+changing the height of the windows above and below.
 
 @item Mouse-2
 @kindex Mouse-2 @r{(mode line)}
@@ -367,9 +378,9 @@
 
 @item Mouse-3
 @kindex Mouse-3 @r{(mode line)}
-@kbd{Mouse-3} on a mode line deletes the window above.  If the frame has
-only one window, it buries the current buffer instead and switches to
-another buffer.
+@kbd{Mouse-3} on a mode line deletes the window it belongs to.  If the
+frame has only one window, it buries the current buffer instead, and
+switches to another buffer.
 
 @item C-Mouse-2
 @kindex C-mouse-2 @r{(mode line)}
@@ -639,7 +650,6 @@
 
 @node Frame Parameters
 @section Setting Frame Parameters
-@cindex colors
 @cindex Auto-Raise mode
 @cindex Auto-Lower mode
 
@@ -653,10 +663,16 @@
 @findex set-border-color
 @findex auto-raise-mode
 @findex auto-lower-mode
+@cindex colors
 @table @kbd
 @item M-x set-foreground-color @key{RET} @var{color} @key{RET}
 Specify color @var{color} for the foreground of the selected frame.
-(This also changes the foreground color of the default face.)
+(This also changes the foreground color of the default face.)  You can
+specify @var{color} either by its symbolic name or by its RGB
+numerical specification@footnote{
+See the X Window System documentation for more details.  On a typical
+GNU or Unix system, the command @kbd{man 7 X} or @kbd{man -s 7 X} will
+display the X manual page that explains how to specify colors.}.
 
 @item M-x set-background-color @key{RET} @var{color} @key{RET}
 Specify color @var{color} for the background of the selected frame.
@@ -674,7 +690,8 @@
 
 @item M-x list-colors-display
 Display the defined color names and show what the colors look like.
-This command is somewhat slow.
+This command is somewhat slow.  @xref{Colors, list-colors-display,
+Display available colors}.
 
 @item M-x auto-raise-mode
 Toggle whether or not the selected frame should auto-raise.  Auto-raise
@@ -798,19 +815,24 @@
 @code{mouse-wheel-scroll-amount} determine where and by how much
 buffers are scrolled.
 
-@node Drag and drop
-@section Drag and drop in Emacs.
-
+@node Drag and Drop
+@section Drag and Drop
 @cindex drag and drop
-  Emacs supports drag and drop so that dropping of files and text is handled.
-Currently supported drag and drop protocols are XDND, Motif and the old
-KDE 1.x protocol.  There is no drag support yet.
-When text is dropped on Emacs, Emacs inserts the text where it is dropped.
-When a file is dragged from a file manager to Emacs, Emacs opens that file.
-As a special case, if a file is dropped on a dired buffer the file is
-copied or moved (depends on exactly how it is dragged and the application
-it was dragged from) to the directory the dired buffer is displaying.
+
+  Emacs supports @dfn{drag and drop} using the mouse.  For instance,
+dropping text onto an Emacs frame inserts the text where it is dropped.
+Dropping a file onto an Emacs frame visits that file.  As a special
+case, dropping the file on a Dired buffer moves or copies the file
+(according to the conventions of the application it came from) into the
+directory displayed in that buffer.
 
+@vindex x-dnd-open-file-other-window
+  Dropping a file normally visits it in the window you drop it on.  If
+you prefer to visit the file in a new window in such cases, customize
+the variable @code{x-dnd-open-file-other-window}.
+
+@ignore
+@c ??? To Lisp manual
 @vindex x-dnd-test-function
 @vindex x-dnd-known-types
   When a user drags something from another application over Emacs, that other
@@ -822,26 +844,24 @@
 @code{x-dnd-known-types} if you want Emacs to accept or reject drops based
 on some other criteria.
 
-@vindex x-dnd-open-file-other-window
-  A file is normally opened in the window it is dropped on, but if you
-prefer the file to be opened in a new window you can customize the variable
-@code{x-dnd-open-file-other-window}.
-
 @vindex x-dnd-types-alist
   If you want to change the way Emacs handles drop of different types
-or add a new type, you shall customize @code{x-dnd-types-alist}.  This
-requires detailed knowledge of what types other applications use
-for drag and drop.
+or add a new type, customize @code{x-dnd-types-alist}.  This requires
+detailed knowledge of what types other applications use for drag and
+drop.
 
 @vindex x-dnd-protocol-alist
   When an URL is dropped on Emacs it may be a file, but it may also be
 another URL type (ftp, http, etc.).  Emacs first checks
-@code{x-dnd-protocol-alist} to determine what to do with the URL.  If there
-is no match there and if @code{browse-url-browser-function} is an alist,
-Emacs looks for a match there.  If no match is found the text for the URL
-is inserted.  If you want to alter Emacs behaviour you can customize these
-variables.
+@code{x-dnd-protocol-alist} to determine what to do with the URL.  If
+there is no match there and if @code{browse-url-browser-function} is
+an alist, Emacs looks for a match there.  If no match is found the
+text for the URL is inserted.  If you want to alter Emacs behavior,
+you can customize these variables.
+@end ignore
 
+  The drag and drop protocols XDND, Motif and the
+old KDE 1.x protocol are currently supported.
 
 @node Menu Bars
 @section Menu Bars
@@ -873,20 +893,20 @@
 @cindex mode, Tool Bar
 @cindex icons, toolbar
 
-The @dfn{tool bar} is a line (or multiple lines) of icons at the top
-of the Emacs window.  You can click on these icons with the mouse
-to do various jobs.
+  The @dfn{tool bar} is a line (or lines) of icons at the top of the
+Emacs window, just below the menu bar.  You can click on these icons
+with the mouse to do various jobs.
 
-The global tool bar contains general commands.  Some major modes
+  The global tool bar contains general commands.  Some major modes
 define their own tool bars to replace it.  A few ``special'' modes
 that are not designed for ordinary editing remove some items from the
 global tool bar.
 
-Tool bars work only on a graphical display.  The tool bar uses colored
+  Tool bars work only on a graphical display.  The tool bar uses colored
 XPM icons if Emacs was built with XPM support.  Otherwise, the tool
 bar uses monochrome icons (PBM or XBM format).
 
-You can turn display of tool bars on or off with @kbd{M-x
+  You can turn display of tool bars on or off with @kbd{M-x
 tool-bar-mode}.
 
 @node Dialog Boxes
--- a/man/text.texi	Wed Feb 02 01:54:00 2005 +0000
+++ b/man/text.texi	Sun Feb 06 12:06:02 2005 +0000
@@ -185,9 +185,9 @@
   The commands @kbd{M-a} and @kbd{M-e} (@code{backward-sentence} and
 @code{forward-sentence}) move to the beginning and end of the current
 sentence, respectively.  They were chosen to resemble @kbd{C-a} and
-@kbd{C-e}, which move to the beginning and end of a line.  Unlike them,
-@kbd{M-a} and @kbd{M-e} if repeated or given numeric arguments move over
-successive sentences.
+@kbd{C-e}, which move to the beginning and end of a line.  Unlike
+them, @kbd{M-a} and @kbd{M-e} move over successive sentences if
+repeated.
 
   Moving backward over a sentence places point just before the first
 character of the sentence; moving forward places point right after the
@@ -238,11 +238,10 @@
 @end example
 
 @noindent
-You should also set the variable @code{sentence-end-double-space} to
-@code{nil} so that the fill commands expect and leave just one space at
-the end of a sentence.  Note that this makes it impossible to
-distinguish between periods that end sentences and those that indicate
-abbreviations.
+This is what setting the variable @code{sentence-end-double-space} to
+@code{nil} automatically does.  But note that this makes it impossible
+to distinguish between periods that end sentences and those that
+indicate abbreviations.
 
 @node Paragraphs
 @section Paragraphs
@@ -269,8 +268,8 @@
 paragraph.  Blank lines and text-formatter command lines separate
 paragraphs and are not considered part of any paragraph.  In Indented
 Text mode, but not in Text mode, an indented line also starts a new
-paragraph.  (If a paragraph is preceded by a blank line, these
-commands treat that blank line as the beginning of the paragraph.)
+paragraph.  If there is a blank line before the paragraph, @kbd{M-@{}
+moves to the blank line, because that is convenient in practice.
 
   In major modes for programs, paragraphs begin and end only at blank
 lines.  This makes the paragraph commands continue to be useful even
@@ -894,11 +893,11 @@
 outline-mode} to switch to Outline mode as the major mode of the current
 buffer.
 
-  When Outline mode makes a line invisible, the line does not appear on
-the screen.  The screen appears exactly as if the invisible line were
-deleted, except that an ellipsis (three periods in a row) appears at the
-end of the previous visible line (only one ellipsis no matter how many
-invisible lines follow).
+  When Outline mode makes a line invisible, the line does not appear
+on the screen.  The screen appears exactly as if the invisible line
+were deleted, except that an ellipsis (three periods in a row) appears
+at the end of the previous visible line.  (Multiple consecutive
+invisible lines produce just one ellipsis.)
 
   Editing commands that operate on lines, such as @kbd{C-n} and
 @kbd{C-p}, treat the text of the invisible line as part of the previous
@@ -929,7 +928,7 @@
                                      outlines.
 * Visibility: Outline Visibility.  Commands to control what is visible.
 * Views: Outline Views.            Outlines and multiple views.
-* Foldout::                        Folding editing.
+* Foldout::                        Folding means zooming in on outlines.
 @end menu
 
 @node Outline Format
@@ -1900,8 +1899,11 @@
 @cindex soft newline
 @cindex newlines, hard and soft
 
+@cindex use-hard-newlines
   In formatted text, Emacs distinguishes between two different kinds of
-newlines, @dfn{hard} newlines and @dfn{soft} newlines.
+newlines, @dfn{hard} newlines and @dfn{soft} newlines.  (You can enable
+or disable this feature separately in any  buffer with the command
+@code{use-hard-newlines}.)
 
   Hard newlines are used to separate paragraphs, or items in a list, or
 anywhere that there should always be a line break regardless of the
--- a/man/windows.texi	Wed Feb 02 01:54:00 2005 +0000
+++ b/man/windows.texi	Sun Feb 06 12:06:02 2005 +0000
@@ -60,8 +60,8 @@
 
   Each window has its own mode line, which displays the buffer name,
 modification status and major and minor modes of the buffer that is
-displayed in the window.  @xref{Mode Line}, for full details on the mode
-line.
+displayed in the window.  The selected window's mode line appears in a
+different color.  @xref{Mode Line}, for full details on the mode line.
 
 @iftex
 @break
@@ -322,9 +322,14 @@
 @kbd{Mouse-3}, and delete all the windows in a frame except one window
 by clicking on that window's mode line with @kbd{Mouse-2}.
 
-  The easiest way to adjust window heights is with a mouse.  If you
-press @kbd{Mouse-1} on a mode line, you can drag that mode line up or
-down, changing the heights of the windows above and below it.
+  You can also adjust window heights and widths with the mouse.  If
+you press @kbd{Mouse-1} on a mode line, you can drag that mode line up
+or down, changing the heights of the windows above and below it.  If
+you press it on the divider between two consecutive mode lines, you
+can drag that divider right or left, changing the widths of the
+windows to either side.  Note that changing heights and widths with
+the mouse never deletes windows, it just refuses to make any window
+smaller than it can be.
 
 @kindex C-x ^
 @findex enlarge-window
--- a/src/ChangeLog	Wed Feb 02 01:54:00 2005 +0000
+++ b/src/ChangeLog	Sun Feb 06 12:06:02 2005 +0000
@@ -1,3 +1,82 @@
+2005-02-05  Andreas Schwab  <schwab@suse.de>
+
+	* sysdep.c (sys_subshell): Properly terminate execlp argument
+	list.
+
+2005-02-05  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
+
+	* xselect.c (Fx_send_client_event, x_handle_dnd_message): Handle
+	the longs in a XClientMessageEvent correctly when long is 64 bits.
+
+2005-02-05  Eli Zaretskii  <eliz@gnu.org>
+
+	* xfaces.c (face_color_supported_p): Use HAVE_WINDOW_SYSTEM
+	instead of HAVE_X_WINDOWS, for non-X windowed sessions.
+
+2005-02-03  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
+
+	* xmenu.c (menubar_selection_callback): Force out GTK buffered
+	events so the menu event comes after them.  This is to prevent sit-for
+	from exiting on buffered events directly after a menu selection,
+	lisp code for Help => About Emacs uses sit-for.
+
+	* gtkutil.c (create_menus): Connect selection-done event instead of
+	the deactivate event to deactivate_cb.  This will make the last
+	leave event come before the call to deactivate_cb, so the leave
+	event does not make sit-for exit after a menu selection.
+
+2005-02-03  Kim F. Storm  <storm@cua.dk>
+
+	* dispnew.c (build_frame_matrix_from_leaf_window)
+	 [!GLYPH_DEBUG]: Fix xassert.
+
+	* xfaces.c (x_free_gc) [!GLYPH_DEBUG]: Fix xassert.
+
+	* xfns.c (unwind_create_frame) [!GLYPH_DEBUG]: Fix xassert.
+
+2005-02-03  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* mac.c: Use MAC_OS_X_VERSION_MAX_ALLOWED to conditionalize by
+	the compiling OS version.
+
+	* macfns.c (x_create_tip_frame): Likewise.
+
+	* macterm.c (mac_draw_string_common, x_make_frame_visible):
+	Likewise.
+
+2005-02-03  Richard M. Stallman  <rms@gnu.org>
+
+	* xterm.c (x_error_quitter): On GCC 3 and up, specify noinline.
+
+	* xdisp.c (echo_area_display): Clear echo_message_buffer.
+
+	* buffer.c (Fbury_buffer): Doc fix.
+
+2005-02-02  Steven Tamm  <steventamm@mac.com>
+
+	* macfns.c (unwind_create_frame): Fixing compile error due to
+	xassert being uncondition, but predicate is.
+	* dispnew.c (update_window): Fixing compile error due to
+	xassert being uncondition, but predicate is.
+
+2005-02-02  Miles Bader  <miles@gnu.org>
+
+	* dispextern.h (xassert): Enable unconditionally.
+
+2005-02-02  Kim F. Storm  <storm@cua.dk>
+
+	* undo.c (Fprimitive_undo): Fix dummy apply undo entry.
+
+2005-02-02  Kenichi Handa  <handa@m17n.org>
+
+	* casefiddle.c (casify_object): Enable changing characters of
+	different byte length.
+	(casify_region): Fix loop condition, args to replace_range_2, and
+	update opoint_byte.
+
+	* insdel.c (replace_range_2): Fix bugs in adjusting markers and
+	point.
+
 2005-02-01  Kim F. Storm  <storm@cua.dk>
 
 	* xdisp.c (back_to_previous_visible_line_start): Reset iterator
--- a/src/buffer.c	Wed Feb 02 01:54:00 2005 +0000
+++ b/src/buffer.c	Sun Feb 06 12:06:02 2005 +0000
@@ -1953,6 +1953,7 @@
        doc: /* Put BUFFER at the end of the list of all buffers.
 There it is the least likely candidate for `other-buffer' to return;
 thus, the least likely buffer for \\[switch-to-buffer] to select by default.
+You can specify a buffer name as BUFFER, or an actual buffer object.
 If BUFFER is nil or omitted, bury the current buffer.
 Also, if BUFFER is nil or omitted, remove the current buffer from the
 selected window if it is displayed there.  */)
--- a/src/casefiddle.c	Wed Feb 02 01:54:00 2005 +0000
+++ b/src/casefiddle.c	Sun Feb 06 12:06:02 2005 +0000
@@ -1,5 +1,5 @@
 /* GNU Emacs case conversion functions.
-   Copyright (C) 1985,94,97,98,99, 2001, 2002, 2004
+   Copyright (C) 1985,94,97,98,99, 2001, 2002, 2004, 2005
    Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
--- a/src/dispextern.h	Wed Feb 02 01:54:00 2005 +0000
+++ b/src/dispextern.h	Sun Feb 06 12:06:02 2005 +0000
@@ -1,5 +1,5 @@
 /* Interface definitions for display code.
-   Copyright (C) 1985,93,94,97,98,99, 2000,01,02,03, 2004
+   Copyright (C) 1985,93,94,97,98,99, 2000,01,02,03, 2004, 2005
      Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -123,12 +123,13 @@
 
 #if GLYPH_DEBUG
 #define IF_DEBUG(X)	X
-#define xassert(X)	do {if (!(X)) abort ();} while (0)
 #else
 #define IF_DEBUG(X)	(void) 0
-#define xassert(X)	(void) 0
 #endif
 
+/* Maybe move this inside the above `#ifdef GLYPH_DEBUG' for release.  */
+#define xassert(X)	do {if (!(X)) abort ();} while (0)
+
 /* Macro for displaying traces of redisplay.  If Emacs was compiled
    with GLYPH_DEBUG != 0, the variable trace_redisplay_p can be set to
    a non-zero value in debugging sessions to activate traces.  */
--- a/src/dispnew.c	Wed Feb 02 01:54:00 2005 +0000
+++ b/src/dispnew.c	Sun Feb 06 12:06:02 2005 +0000
@@ -1,6 +1,6 @@
 /* Updating of data structures for redisplay.
-   Copyright (C) 1985,86,87,88,93,94,95,97,98,1999,2000,01,02,03,04
-       Free Software Foundation, Inc.
+   Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1997, 1998, 1999,
+     2000, 2001, 2002, 2003, 2004, 2005  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -2763,6 +2763,7 @@
 	      SET_CHAR_GLYPH_FROM_GLYPH (*border, right_border_glyph);
 	    }
 
+#if GLYPH_DEBUG
 	  /* Window row window_y must be a slice of frame row
 	     frame_y.  */
 	  xassert (glyph_row_slice_p (window_row, frame_row));
@@ -2770,7 +2771,6 @@
 	  /* If rows are in sync, we don't have to copy glyphs because
 	     frame and window share glyphs.  */
 
-#if GLYPH_DEBUG
 	  strcpy (w->current_matrix->method, w->desired_matrix->method);
 	  add_window_display_history (w, w->current_matrix->method, 0);
 #endif
@@ -4051,11 +4051,11 @@
   extern Lisp_Object do_mouse_tracking;
 #if GLYPH_DEBUG
   struct frame *f = XFRAME (WINDOW_FRAME (w));
-#endif
 
   /* Check that W's frame doesn't have glyph matrices.  */
   xassert (FRAME_WINDOW_P (f));
   xassert (updating_frame != NULL);
+#endif
 
   /* Check pending input the first time so that we can quickly return.  */
   if (redisplay_dont_pause)
--- a/src/gtkutil.c	Wed Feb 02 01:54:00 2005 +0000
+++ b/src/gtkutil.c	Sun Feb 06 12:06:02 2005 +0000
@@ -1905,7 +1905,7 @@
 
       if (deactivate_cb)
         g_signal_connect (G_OBJECT (wmenu),
-                          "deactivate", deactivate_cb, 0);
+                          "selection-done", deactivate_cb, 0);
 
       g_signal_connect (G_OBJECT (wmenu),
                         "grab-notify", G_CALLBACK (menu_grab_callback), 0);
--- a/src/insdel.c	Wed Feb 02 01:54:00 2005 +0000
+++ b/src/insdel.c	Sun Feb 06 12:06:02 2005 +0000
@@ -1,5 +1,5 @@
 /* Buffer insertion/deletion and gap motion for GNU Emacs.
-   Copyright (C) 1985, 86,93,94,95,97,98, 1999, 2000, 01, 2003
+   Copyright (C) 1985, 86,93,94,95,97,98, 1999, 2000, 01, 2003, 2005
    Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -1778,17 +1778,21 @@
 
   /* Adjust markers for the deletion and the insertion.  */
   if (markers
-      && ! (nchars_del == 1 && inschars == 1))
+      && ! (nchars_del == 1 && inschars == 1 && nbytes_del == insbytes))
     adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del,
 				inschars, insbytes);
 
   offset_intervals (current_buffer, from, inschars - nchars_del);
 
   /* Relocate point as if it were a marker.  */
-  if (from < PT && nchars_del != inschars)
-    adjust_point ((from + inschars - (PT < to ? PT : to)),
-		  (from_byte + insbytes
-		   - (PT_BYTE < to_byte ? PT_BYTE : to_byte)));
+  if (from < PT && (nchars_del != inschars || nbytes_del != insbytes))
+    {
+      if (PT < to)
+	/* PT was within the deleted text.  Move it to FROM.  */
+	adjust_point (from - PT, from_byte - PT_BYTE);
+      else
+	adjust_point (inschars - nchars_del, insbytes - nbytes_del);
+    }
 
   if (insbytes == 0)
     evaporate_overlays (from);
--- a/src/mac.c	Wed Feb 02 01:54:00 2005 +0000
+++ b/src/mac.c	Sun Feb 06 12:06:02 2005 +0000
@@ -2858,7 +2858,7 @@
   return r;
 }
 
-#ifndef MAC_OS_X_VERSION_10_2
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1020
 #undef SELECT_INVALIDATE_CFSOCKET
 #endif
 
--- a/src/macfns.c	Wed Feb 02 01:54:00 2005 +0000
+++ b/src/macfns.c	Sun Feb 06 12:06:02 2005 +0000
@@ -2527,9 +2527,11 @@
 
       x_free_frame_resources (f);
 
+#if GLYPH_DEBUG
       /* Check that reference counts are indeed correct.  */
       xassert (dpyinfo->reference_count == dpyinfo_refcount);
       xassert (dpyinfo->image_cache->refcount == image_cache_refcount);
+#endif
       return Qt;
     }
 
@@ -3880,7 +3882,7 @@
     SetRect (&r, 0, 0, 1, 1);
 #if TARGET_API_MAC_CARBON
     if (CreateNewWindow (kHelpWindowClass,
-#ifdef MAC_OS_X_VERSION_10_2
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020
 			 kWindowIgnoreClicksAttribute |
 #endif
 			 kWindowNoUpdatesAttribute |
--- a/src/macterm.c	Wed Feb 02 01:54:00 2005 +0000
+++ b/src/macterm.c	Sun Feb 06 12:06:02 2005 +0000
@@ -731,7 +731,7 @@
      int nchars, mode, bytes_per_char;
 {
   SetPortWindowPort (w);
-#ifdef MAC_OS_X_VERSION_10_2
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020
   UInt32 textFlags, savedFlags;
   if (!NILP(Vmac_use_core_graphics)) {
     textFlags = kQDUseCGTextRendering;
@@ -748,7 +748,7 @@
 
   MoveTo (x, y);
   DrawText (buf, 0, nchars * bytes_per_char);
-#ifdef MAC_OS_X_VERSION_10_2
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020
   if (!NILP(Vmac_use_core_graphics))
     SwapQDTextFlags(savedFlags);
 #endif
@@ -5468,7 +5468,7 @@
 	  else
 	    RepositionWindow (FRAME_MAC_WINDOW (f),
 			      FRAME_MAC_WINDOW (sf),
-#ifdef MAC_OS_X_VERSION_10_2
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020
 			      kWindowCascadeStartAtParentWindowScreen
 #else
 			      kWindowCascadeOnParentWindowScreen
--- a/src/sysdep.c	Wed Feb 02 01:54:00 2005 +0000
+++ b/src/sysdep.c	Sun Feb 06 12:06:02 2005 +0000
@@ -1,6 +1,6 @@
 /* Interfaces to system-dependent kernel and library entries.
    Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1999, 2000, 2001,
-     2003, 2004  Free Software Foundation, Inc.
+     2003, 2004, 2005  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -869,7 +869,7 @@
       if (pid == -1)
 	write (1, "Can't execute subshell", 22);
 #else   /* not WINDOWSNT */
-      execlp (sh, sh, 0);
+      execlp (sh, sh, (char *) 0);
       write (1, "Can't execute subshell", 22);
       _exit (1);
 #endif  /* not WINDOWSNT */
--- a/src/undo.c	Wed Feb 02 01:54:00 2005 +0000
+++ b/src/undo.c	Sun Feb 06 12:06:02 2005 +0000
@@ -560,12 +560,13 @@
 		    }
 		  cdr = Fcdr (cdr);
 		  apply1 (car, cdr);
+
 		  /* Make sure this produces at least one undo entry,
 		     so the test in `undo' for continuing an undo series
 		     will work right.  */
 		  if (EQ (oldlist, current_buffer->undo_list))
 		    current_buffer->undo_list
-		      = Fcons (list2 (Qcdr, Qnil), current_buffer->undo_list);
+		      = Fcons (list3 (Qapply, Qcdr, Qnil), current_buffer->undo_list);
 		}
 	      else if (STRINGP (car) && INTEGERP (cdr))
 		{
--- a/src/xdisp.c	Wed Feb 02 01:54:00 2005 +0000
+++ b/src/xdisp.c	Sun Feb 06 12:06:02 2005 +0000
@@ -8200,6 +8200,8 @@
 
   /* Last displayed message is now the current message.  */
   echo_area_buffer[1] = echo_area_buffer[0];
+  /* Inform read_char that we're not echoing.  */
+  echo_message_buffer = Qnil;
 
   /* Prevent redisplay optimization in redisplay_internal by resetting
      this_line_start_pos.  This is done because the mini-buffer now
--- a/src/xfaces.c	Wed Feb 02 01:54:00 2005 +0000
+++ b/src/xfaces.c	Sun Feb 06 12:06:02 2005 +0000
@@ -1,5 +1,5 @@
 /* xfaces.c -- "Face" primitives.
-   Copyright (C) 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+   Copyright (C) 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
    Free Software Foundation.
 
 This file is part of GNU Emacs.
@@ -738,7 +738,7 @@
      GC gc;
 {
   BLOCK_INPUT;
-  xassert (--ngcs >= 0);
+  IF_DEBUG (xassert (--ngcs >= 0));
   XFreeGC (FRAME_X_DISPLAY (f), gc);
   UNBLOCK_INPUT;
 }
@@ -771,7 +771,7 @@
      GC gc;
 {
   BLOCK_INPUT;
-  xassert (--ngcs >= 0);
+  IF_DEBUG (xassert (--ngcs >= 0));
   xfree (gc);
   UNBLOCK_INPUT;
 }
@@ -1511,7 +1511,7 @@
 
   XSETFRAME (frame, f);
   return
-#ifdef HAVE_X_WINDOWS
+#ifdef HAVE_WINDOW_SYSTEM
     FRAME_WINDOW_P (f)
     ? (!NILP (Fxw_display_color_p (frame))
        || xstricmp (color_name, "black") == 0
--- a/src/xfns.c	Wed Feb 02 01:54:00 2005 +0000
+++ b/src/xfns.c	Sun Feb 06 12:06:02 2005 +0000
@@ -1,6 +1,6 @@
 /* Functions for the X window system.
-   Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 99, 2000,01,02,03,04
-     Free Software Foundation.
+   Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+     2001, 2002, 2003, 2004, 2005  Free Software Foundation.
 
 This file is part of GNU Emacs.
 
@@ -2843,9 +2843,11 @@
 
       x_free_frame_resources (f);
 
+#if GLYPH_DEBUG
       /* Check that reference counts are indeed correct.  */
       xassert (dpyinfo->reference_count == dpyinfo_refcount);
       xassert (dpyinfo->image_cache->refcount == image_cache_refcount);
+#endif
       return Qt;
     }
 
@@ -4071,7 +4073,7 @@
 
   if (! NILP (outer_p)) w = FRAME_OUTER_WINDOW (f);
   else w = FRAME_X_WINDOW (f);
- 
+
   XChangeProperty (FRAME_X_DISPLAY (f), w,
 		   prop_atom, target_type, element_format, PropModeReplace,
 		   data, nelements);
@@ -5240,7 +5242,7 @@
           if (keysym == XK_g && (event.xkey.state & ControlMask) != 0)
             XtUnmanageChild (dialog);
         }
-  
+
       (void) x_dispatch_event (&event, FRAME_X_DISPLAY (f));
     }
 
--- a/src/xmenu.c	Wed Feb 02 01:54:00 2005 +0000
+++ b/src/xmenu.c	Sun Feb 06 12:06:02 2005 +0000
@@ -1445,9 +1445,9 @@
 /* Find the menu selection and store it in the keyboard buffer.
    F is the frame the menu is on.
    MENU_BAR_ITEMS_USED is the length of VECTOR.
-   VECTOR is an array of menu events for the whole menu.
- */
-void
+   VECTOR is an array of menu events for the whole menu.  */
+
+static void
 find_and_call_menu_selection (f, menu_bar_items_used, vector, client_data)
      FRAME_PTR f;
      EMACS_INT menu_bar_items_used;
@@ -1554,6 +1554,17 @@
   if (! cb_data || ! cb_data->cl_data || ! cb_data->cl_data->f)
     return;
 
+  /* When a menu is popped down, X generates a focus event (i.e. focus
+     goes back to the frame below the menu).  Since GTK buffers events,
+     we force it out here before the menu selection event.  Otherwise
+     sit-for will exit at once if the focus event follows the menu selection
+     event.  */
+
+  BLOCK_INPUT;
+  while (gtk_events_pending ())
+    gtk_main_iteration ();
+  UNBLOCK_INPUT;
+
   find_and_call_menu_selection (cb_data->cl_data->f,
                                 cb_data->cl_data->menu_bar_items_used,
                                 cb_data->cl_data->menu_bar_vector,
--- a/src/xselect.c	Wed Feb 02 01:54:00 2005 +0000
+++ b/src/xselect.c	Sun Feb 06 12:06:02 2005 +0000
@@ -2536,7 +2536,7 @@
                                       data, size*format/8, type, format);
 }
 
-/* Get the mouse position frame relative coordinates.  */
+/* Get the mouse position in frame relative coordinates.  */
 
 static void
 mouse_position_for_drop (f, x, y)
@@ -2635,16 +2635,31 @@
   Lisp_Object frame;
   unsigned long size = (8*sizeof (event->data))/event->format;
   int x, y;
+  unsigned char *data = (unsigned char *) event->data.b;
+  int idata[5];
 
   XSETFRAME (frame, f);
 
+  /* On a 64 bit machine, the event->data.l array members are 64 bits (long),
+     but the x_property_data_to_lisp (or rather selection_data_to_lisp_data)
+     function expects them to be of size int (i.e. 32).  So to be able to
+     use that function, put the data in the form it expects if format is 32. */
+
+  if (event->format == 32 && event->format < BITS_PER_LONG)
+    {
+      int i;
+      for (i = 0; i < 5; ++i) /* There are only 5 longs in a ClientMessage. */
+        idata[i] = (int) event->data.l[i];
+      data = (unsigned char *) idata;
+    }
+
   vec = Fmake_vector (make_number (4), Qnil);
   AREF (vec, 0) = SYMBOL_NAME (x_atom_to_symbol (FRAME_X_DISPLAY (f),
                                                  event->message_type));
   AREF (vec, 1) = frame;
   AREF (vec, 2) = make_number (event->format);
   AREF (vec, 3) = x_property_data_to_lisp (f,
-                                           event->data.b,
+                                           data,
                                            event->message_type,
                                            event->format,
                                            size);
@@ -2697,6 +2712,8 @@
   struct frame *f = check_x_frame (from);
   int count;
   int to_root;
+  int idata[5];
+  void *data;
 
   CHECK_STRING (message_type);
   CHECK_NUMBER (format);
@@ -2756,10 +2773,31 @@
      when sending to the root window.  */
   event.xclient.window = to_root ? FRAME_OUTER_WINDOW (f) : wdest;
 
-  memset (event.xclient.data.b, 0, sizeof (event.xclient.data.b));
-  x_fill_property_data (dpyinfo->display, values, event.xclient.data.b,
-                        event.xclient.format);
-
+  
+  if (event.xclient.format == 32 && event.xclient.format < BITS_PER_LONG)
+    {
+      /* x_fill_property_data expects data to hold 32 bit values when
+         format == 32, but on a 64 bit machine long is 64 bits.
+         event.xclient.l is an array of long, so we must compensate. */
+
+      memset (idata, 0, sizeof (idata));
+      data = idata;
+    }
+  else
+    {
+      memset (event.xclient.data.b, 0, sizeof (event.xclient.data.b));
+      data = event.xclient.data.b;
+    }
+
+  x_fill_property_data (dpyinfo->display, values, data, event.xclient.format);
+
+  if (data == idata)
+    {
+      int i;
+      for (i = 0; i < 5; ++i) /* There are only 5 longs in a ClientMessage. */
+        event.xclient.data.l[i] = (long) idata[i];
+    }
+  
   /* If event mask is 0 the event is sent to the client that created
      the destination window.  But if we are sending to the root window,
      there is no such client.  Then we set the event mask to 0xffff.  The
--- a/src/xterm.c	Wed Feb 02 01:54:00 2005 +0000
+++ b/src/xterm.c	Sun Feb 06 12:06:02 2005 +0000
@@ -7777,10 +7777,18 @@
    It kills all frames on the display that we got the error for.
    If that was the only one, it prints an error message and kills Emacs.  */
 
-/* It is after x_error_handler so that it won't get inlined in
-   x_error_handler.  */
-
-static void
+/* .gdbinit puts a breakpoint here, so make sure it is not inlined.  */
+
+#if __GNUC__ >= 3  /* On GCC 3.0 we might get a warning.  */
+#define NO_INLINE __attribute__((noinline))
+#else
+#define NO_INLINE
+#endif
+
+/* On older GCC versions, just putting x_error_quitter
+   after x_error_handler prevents inlining into the former.  */
+
+static void NO_INLINE
 x_error_quitter (display, error)
      Display *display;
      XErrorEvent *error;