changeset 83263:1f334cdd7020

Merged from miles@gnu.org--gnu-2005 (patch 34-36, 142-158) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-142 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-143 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-144 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-145 (make-text-button): Default button type if not specified * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-146 quick-install-emacs: Use mkdir --verbose only when requested * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-147 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-148 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-149 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-150 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-151 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-152 Add info/dir to arch branch * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-153 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-154 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-155 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-156 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-157 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-158 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-34 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-35 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-36 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-303
author Karoly Lorentey <lorentey@elte.hu>
date Sun, 06 Mar 2005 13:31:20 +0000
parents 92c8be21e2c3 (current diff) f13a9378709a (diff)
children 3b1209720d0e
files ChangeLog admin/FOR-RELEASE lisp/ChangeLog lisp/frame.el lisp/progmodes/gdb-ui.el lisp/simple.el lisp/startup.el lispref/ChangeLog mac/makefile.MPW man/ChangeLog src/dispextern.h src/emacs.c src/fileio.c src/keyboard.c src/macterm.c src/macterm.h src/xdisp.c
diffstat 67 files changed, 1311 insertions(+), 488 deletions(-) [+]
line wrap: on
line diff
--- a/.arch-inventory	Mon Feb 28 15:15:44 2005 +0000
+++ b/.arch-inventory	Sun Mar 06 13:31:20 2005 +0000
@@ -1,9 +1,6 @@
 # Generated files
 precious ^(config\.status|config\.cache)$
 
-# Build-in-place makes these directories, so just ignore them
-precious ^(info)$
-
 # Install-in-place makes these directories, so just ignore them
 backup ^(bin|data|lock|site-lisp)$
 
--- a/ChangeLog	Mon Feb 28 15:15:44 2005 +0000
+++ b/ChangeLog	Sun Mar 06 13:31:20 2005 +0000
@@ -1,3 +1,8 @@
+2005-03-04  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
+
+	* configure.in: Added --enable-asserts.
+	* configure: Regenerate.
+
 2005-02-09  Kim F. Storm  <storm@cua.dk>
 
 	Change release version from 21.4 to 22.1 throughout.
--- a/admin/ChangeLog	Mon Feb 28 15:15:44 2005 +0000
+++ b/admin/ChangeLog	Sun Mar 06 13:31:20 2005 +0000
@@ -1,3 +1,9 @@
+2005-03-02  Miles Bader  <miles@gnu.org>
+
+	* quick-install-emacs: Only use the mkdir --verbose option if the
+	script's --verbose option was specified (this avoids problems with
+	default usage on systems where mkdir doesn't support that option).
+
 2005-02-15  Jason Rumney  <jasonr@gnu.org>
 
 	* nt/makedist.bat: Do not rely on non-standard behaviour of
--- a/admin/FOR-RELEASE	Mon Feb 28 15:15:44 2005 +0000
+++ b/admin/FOR-RELEASE	Sun Mar 06 13:31:20 2005 +0000
@@ -37,9 +37,6 @@
 
 ** Fix up url-ldap.el.
 
-** url/*.el has lots of `(declare (special ...))' which
-are meaningless.  What's that trying to do?
-
 * BUGS
 
 ** Ange-ftp should ignore irrelevant IPv6 errors:
@@ -242,7 +239,7 @@
 lispref/compile.texi     "Luc Teirlinck"   Chong Yidong
 lispref/control.texi     "Luc Teirlinck"   Chong Yidong
 lispref/customize.texi
-lispref/debugging.texi   Joakim Verona <joakim@verona.se>
+lispref/debugging.texi   Joakim Verona <joakim@verona.se>   Lute Kamstra
 lispref/display.texi
 lispref/edebug.texi
 lispref/elisp.texi       "Luc Teirlinck"
--- a/admin/quick-install-emacs	Mon Feb 28 15:15:44 2005 +0000
+++ b/admin/quick-install-emacs	Sun Mar 06 13:31:20 2005 +0000
@@ -19,15 +19,16 @@
 
 me="`basename $0`"
 
-# Install commands (these commands are also expected to understand the
-# GNU -v (--verbose) option)
+# Install commands (if the user specifies the `--verbose' option, it is
+# passed to these commands, so that feature only works if these commands
+# implement it too)
 LINK='cp -lf'
 COPY='cp -f'
 REMOVE='rm -r'
+MKDIR='mkdir -p'
 
 # Used to execute commands once once we create them
 EXEC='sh'
-MKDIR='mkdir --verbose -p'
 
 NAWK=/usr/bin/nawk
 
@@ -157,7 +158,7 @@
 maybe_mkdir ()
 {
   if ! test -d "$1"; then
-    $MKDIR "$1" 2>&1 | sed "s/^mkdir:/$me:/" 1>&2
+    $MKDIR $VERBOSE "$1" 2>&1 | sed "s/^mkdir:/$me:/" 1>&2
   fi
 }
 
--- a/configure	Mon Feb 28 15:15:44 2005 +0000
+++ b/configure	Sun Mar 06 13:31:20 2005 +0000
@@ -856,6 +856,7 @@
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-carbon-app[=DIR]  [DIR=/Application]
                           specify install directory for Emacs.app on Mac OS X
+  --enable-asserts        compile code with asserts enabled
   --enable-maintainer-mode enable make rules and dependencies not useful
                           (and sometimes confusing) to the casual installer
   --disable-largefile     omit support for large files
@@ -1520,6 +1521,14 @@
    carbon_appdir_x=${enableval}
 fi;
 
+# Check whether --enable-asserts or --disable-asserts was given.
+if test "${enable_asserts+set}" = set; then
+  enableval="$enable_asserts"
+  USE_XASSERTS=$enableval
+else
+  USE_XASSERTS=no
+fi;
+
 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
 if test "${enable_maintainer_mode+set}" = set; then
   enableval="$enable_maintainer_mode"
@@ -21976,28 +21985,14 @@
 echo "  Does Emacs use X toolkit scroll bars?                   ${USE_TOOLKIT_SCROLL_BARS}"
 echo
 
-if test "$emacs_cv_randomheap" = warn; then
-  { echo "$as_me:$LINENO: WARNING:
-**********************************************************************
-
-Heap start address is randomized and no workaround is known.
-Emacs will probably dump core when temacs is run in the build phase.
-Maybe exec-shield is turned on.  Read about exec-shield in \`etc/PROBLEMS'
-for further information.
-
-**********************************************************************
-" >&5
-echo "$as_me: WARNING:
-**********************************************************************
-
-Heap start address is randomized and no workaround is known.
-Emacs will probably dump core when temacs is run in the build phase.
-Maybe exec-shield is turned on.  Read about exec-shield in \`etc/PROBLEMS'
-for further information.
-
-**********************************************************************
-" >&2;}
-fi
+if test $USE_XASSERTS = yes; then
+   echo "  Compiling with asserts turned on."
+   CFLAGS="$CFLAGS -DXASSERTS=1"
+   CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
+   echo
+fi
+
+
 
 # Remove any trailing slashes in these variables.
 test "${prefix}" != NONE &&
--- a/configure.in	Mon Feb 28 15:15:44 2005 +0000
+++ b/configure.in	Sun Mar 06 13:31:20 2005 +0000
@@ -125,6 +125,11 @@
                           specify install directory for Emacs.app on Mac OS X]],
 [ carbon_appdir_x=${enableval}])
 
+AC_ARG_ENABLE(asserts,
+[  --enable-asserts        compile code with asserts enabled],
+      USE_XASSERTS=$enableval,
+      USE_XASSERTS=no)
+
 AC_ARG_ENABLE(maintainer-mode,
 [  --enable-maintainer-mode enable make rules and dependencies not useful
                           (and sometimes confusing) to the casual installer],
@@ -3096,19 +3101,15 @@
 echo "  Does Emacs use X toolkit scroll bars?                   ${USE_TOOLKIT_SCROLL_BARS}"
 echo
 
-if test "$emacs_cv_randomheap" = warn; then 
-  AC_MSG_WARN([
-**********************************************************************
-
-Heap start address is randomized and no workaround is known.
-Emacs will probably dump core when temacs is run in the build phase.
-Maybe exec-shield is turned on.  Read about exec-shield in `etc/PROBLEMS'
-for further information.
-
-**********************************************************************
-])
+if test $USE_XASSERTS = yes; then
+   echo "  Compiling with asserts turned on."
+   CFLAGS="$CFLAGS -DXASSERTS=1"
+   CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
+   echo
 fi
 
+
+
 # Remove any trailing slashes in these variables.
 [test "${prefix}" != NONE &&
   prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
--- a/etc/ChangeLog	Mon Feb 28 15:15:44 2005 +0000
+++ b/etc/ChangeLog	Sun Mar 06 13:31:20 2005 +0000
@@ -1,3 +1,11 @@
+2005-03-05  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* NEWS: Mention Carbon build on Mac OS 9.
+	
+2005-03-01  David Kastrup  <dak@gnu.org>
+
+	* DEBUG: Add information about `-fno-crossjumping' for GCC.
+
 2005-02-14  Lute Kamstra  <lute@gnu.org>
 
 	* TODO: Remove battery.el entry (DONE).
--- a/etc/DEBUG	Mon Feb 28 15:15:44 2005 +0000
+++ b/etc/DEBUG	Sun Mar 06 13:31:20 2005 +0000
@@ -1,5 +1,5 @@
 Debugging GNU Emacs
-Copyright (c) 1985, 2000, 2001 Free Software Foundation, Inc.
+Copyright (c) 1985, 2000, 2001, 2005 Free Software Foundation, Inc.
 
    Permission is granted to anyone to make or distribute verbatim copies
    of this document as received, in any medium, provided that the
@@ -20,6 +20,13 @@
 where the executable was made.  That directory has a .gdbinit file
 that defines various "user-defined" commands for debugging Emacs.
 
+** When you are trying to analyze failed assertions, it will be
+essential to compile Emacs either completely without optimizations or
+at least (when using GCC) with the -fno-crossjumping option.  Failure
+to do so may make the compiler recycle the same abort call for all
+assertions in a given function, rendering the stack backtrace useless
+for identifying the specific failed assertion.
+
 ** It is a good idea to run Emacs under GDB (or some other suitable
 debugger) *all the time*.  Then, when Emacs crashes, you will be able
 to debug the live process, not just a core dump.  (This is especially
--- a/etc/NEWS	Mon Feb 28 15:15:44 2005 +0000
+++ b/etc/NEWS	Sun Mar 06 13:31:20 2005 +0000
@@ -89,6 +89,10 @@
 ---
 ** Support for GNU/Linux systems on X86-64 machines was added.
 
+** Mac OS 9 port now uses the Carbon API by default.  You can also
+create non-Carbon build by specifying `NonCarbon' as a target.  See
+the files mac/README and mac/INSTALL for build instructions.
+
 ---
 ** A French translation of the `Emacs Survival Guide' is available.
 
@@ -99,6 +103,12 @@
 
 * Changes in Emacs 22.1
 
+** C-u M-x goto-line now switches to the most recent previous buffer,
+and goes to the specified line in that buffer.
+
+When goto-line starts to execute, if there's a number in the buffer at
+point then it acts as the default argument for the minibuffer.
+
 ** Emacs now responds to mouse-clicks on the mode-line, header-line and
 display margin, when run in an xterm.
 
@@ -280,6 +290,10 @@
 the menu-bar, the tool-bar, the scroll-bars, tool tips, the blinking
 cursor, and the fancy startup screen.
 
++++
+** New command line option -nbc or --no-blinking-cursor disables
+the blinking cursor on graphical terminals.
+
 ** C-h v and C-h f commands now include a hyperlink to the C source for
 variables and functions defined in C (if the C source is available).
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/info/.arch-inventory	Sun Mar 06 13:31:20 2005 +0000
@@ -0,0 +1,19 @@
+# Only two real source files: "dir", and this file, ".arch-inventory"
+source ^(dir|\.arch-inventory)$
+
+# Everything else is generated at compile time.  Unfortunately, the "backup"
+# category overrides the "source" category, so we have to have horrible
+# regexp that matches everything _except_ "dir"...
+
+# 1 or 2 characters long
+backup ^[-_.a-zA-Z0-9][-_.a-zA-Z0-9]?$
+# 4 or more characters long
+backup ^[-_.a-zA-Z0-9][-_.a-zA-Z0-9][-_.a-zA-Z0-9][-_.a-zA-Z0-9]+$
+# 3 chars long, but 1st char not "d"
+backup ^[-_.abce-zA-Z0-9][-_.a-zA-Z0-9][-_.a-zA-Z0-9]$
+# 3 chars long, but 2nd char not "i"
+backup ^[-_.a-zA-Z0-9][-_.a-hj-zA-Z0-9][-_.a-zA-Z0-9]$
+# 3 chars long, but 3rd char not "r"
+backup ^[-_.a-zA-Z0-9][-_.a-zA-Z0-9][-_.a-qs-zA-Z0-9]$
+
+# arch-tag: 60144ab9-cdc1-45b6-8193-b9683c80ec86
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/info/dir	Sun Mar 06 13:31:20 2005 +0000
@@ -0,0 +1,77 @@
+-*- Text -*-
+This is the file .../info/dir, which contains the topmost node of the
+Info hierarchy.  The first time you invoke Info you start off
+looking at that node, which is (dir)Top.
+
+File: dir	Node: Top	This is the top of the INFO tree
+
+The Info Directory
+******************
+
+  The Info Directory is the top-level menu of major Info topics.
+  Type "d" in Info to return to the Info Directory.  Type "q" to exit Info.
+  Type "?" for a list of Info commands, or "h" to visit an Info tutorial.
+  Type "m" to choose a menu item--for instance,
+    "mEmacs<Return>" visits the Emacs manual.
+  In Emacs Info, you can click mouse button 2 on a menu item
+  or cross reference to follow it to its target.
+  Each menu line that starts with a * is a topic you can select with "m".
+  Every third topic has a red * to help pick the right number to type.
+
+* Menu:
+
+* Info: (info).		How to use the documentation browsing system.
+
+Emacs
+* Emacs: (emacs).	The extensible self-documenting text editor.
+* Emacs FAQ: (efaq).	Frequently Asked Questions about Emacs.
+* Emacs Lisp Introduction: (eintr).
+  			A simple introduction to Emacs Lisp programming.
+* Elisp: (elisp).	The Emacs Lisp Reference Manual.
+
+* CL: (cl).		Partial Common Lisp support for Emacs Lisp.
+* Dired-X: (dired-x).   Dired Extra Features.
+* Ediff: (ediff).	A visual interface for comparing and merging programs.
+* Emacs-Xtra: (emacs-xtra).    Specialized Emacs features.
+* Org Mode: (org).	Outline-based notes management and organizer.
+* PCL-CVS: (pcl-cvs).	Emacs front-end to CVS.
+* Speedbar: (speedbar).	File/Tag summarizing utility.
+
+* Ada mode: (ada-mode). Emacs mode for editing Ada code.
+* CC mode: (ccmode).	Emacs mode for editing C, C++, Objective-C,
+			  Java, Pike, and IDL code.
+* Ebrowse: (ebrowse).	A C++ class browser for Emacs.
+* Flymake: (flymake).   An on-the-fly syntax checker for Emacs.
+* IDLWAVE: (idlwave).	Major mode and shell for IDL and WAVE/CL files.
+
+* Gnus: (gnus).		The news reader Gnus.
+* Message: (message).	Mail and news composition mode that goes with Gnus.
+* MH-E: (mh-e).		Emacs interface to the MH mail system.
+* MIME: (emacs-mime).   Emacs MIME de/composition library.
+* PGG: (pgg).   	Emacs interface to various PGP implementations.
+* SC: (sc).		Supercite lets you cite parts of messages you're
+			  replying to, in flexible ways.
+* SMTP: (smtpmail).     Emacs library for sending mail via SMTP.
+* Sieve: (sieve).       Managing Sieve scripts in Emacs.
+
+* Autotype: (autotype). Convenient features for text that you enter frequently
+                          in Emacs.
+* Calc: (calc). 	Advanced desk calculator and mathematical tool.
+* Eshell: (eshell).	A command shell implemented in Emacs Lisp.
+* EUDC: (eudc).		An Emacs client for directory servers (LDAP, PH).
+* Forms: (forms).	Emacs package for editing data bases
+			  by filling in forms.
+* RefTeX: (reftex).	Emacs support for LaTeX cross-references and citations.
+* SES: (ses).           Simple Emacs Spreadsheet
+* Tramp: (tramp).	Transparent Remote (file) Access, Multiple Protocol.
+                          Edit remote files via a remote shell (rsh,
+                          ssh, telnet).
+* URL: (url).           URL loading package.
+* Widget: (widget).     The "widget" package used by the Emacs Customization
+                          facility.
+* WoMan: (woman).       Browse UN*X Manual Pages "Wo (without) Man".
+
+* VIPER: (viper).       The newest Emacs VI-emulation mode.
+                          (also, A VI Plan for Emacs Rescue
+                           or the VI PERil.)
+* VIP: (vip).		An older VI-emulation for Emacs.
--- a/lib-src/ChangeLog	Mon Feb 28 15:15:44 2005 +0000
+++ b/lib-src/ChangeLog	Sun Mar 06 13:31:20 2005 +0000
@@ -1,3 +1,7 @@
+2005-03-04  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* make-docfile.c: Undo previous change.
+
 2005-02-04  Andreas Schwab  <schwab@suse.de>
 
 	* movemail.c (fatal): Accept third parameter and pass down to
--- a/lib-src/make-docfile.c	Mon Feb 28 15:15:44 2005 +0000
+++ b/lib-src/make-docfile.c	Sun Mar 06 13:31:20 2005 +0000
@@ -43,11 +43,11 @@
 #undef chdir
 
 #include <stdio.h>
-#include <stdlib.h>
 #ifdef MSDOS
 #include <fcntl.h>
 #endif /* MSDOS */
 #ifdef WINDOWSNT
+#include <stdlib.h>
 #include <fcntl.h>
 #include <direct.h>
 #endif /* WINDOWSNT */
--- a/lisp/ChangeLog	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/ChangeLog	Sun Mar 06 13:31:20 2005 +0000
@@ -1,7 +1,147 @@
+2005-03-05  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* simple.el (goto-line): Remove unbalanced final parenthesis.
+
+2005-03-05  Richard M. Stallman  <rms@gnu.org>
+
+	* simple.el (goto-line): Use a number at point as the default.
+	With C-u as arg, switch buffers.
+
+2005-03-05  Juri Linkov  <juri@jurta.org>
+
+	* frame.el (blink-cursor-mode): Replace `emacs-quick-startup'
+	with `no-blinking-cursor'.
+
+	* startup.el (no-blinking-cursor): New defvar.
+	(command-line): Add `--no-blinking-cursor' to longopts.
+	Set `no-blinking-cursor' to t for command line arguments
+	-Q, -nbc, --no-blinking-cursor.  Replace `emacs-quick-startup'
+	with `no-blinking-cursor' in the condition for calling
+	`blink-cursor-mode'.
+
+2005-03-04  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* menu-bar.el (menu-bar-make-mm-toggle): Doc fix.
+	(menu-bar-options-save): Add blink-cursor-mode.
+	(menu-bar-options-menu): Add blink-cursor-mode.
+
+2005-03-04  Ulf Jasper  <ulf.jasper@web.de>
+
+	* calendar/icalendar.el (icalendar-version): Increase to 0.11.
+	(icalendar-export-file, icalendar-export-region)
+	(icalendar-import-file, icalendar-import-buffer): Add autoload
+	cookies.
+	(icalendar--convert-ical-to-diary): Fix problem with DURATION.
+
+2005-03-04  Lute Kamstra  <lute@gnu.org>
+
+	* emacs-lisp/debug.el (debugger-step-after-exit): Make it a
+	defvar.
+	(debug-function-list): Ditto.
+
+2005-03-04  Robert J. Chassell  <bob@rattlesnake.com>
+
+	* textmodes/texinfmt.el (texinfo-append-refill):
+	Redefine the types of line to which @refill
+	is not appended by replacing a search for `@refill\\|@bye' with
+	`@refill\\|^[ \t]*@'.  The intent is to solve both the `@end
+	itemize@refill' bug and the unfilled long lines bug.
+	(texinfmt-version): update number and date.
+
+2005-03-04  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* international/code-pages.el (windows-1250, windows-125[2-8])
+	(iso-8859-10, -13, -16, georgian-ps): Add autoload cookies.
+
+2005-03-03  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* frame.el (blink-cursor-mode): `emacs-quick-startup' may not be
+	bound yet.
+
+2005-03-02  Romain Francoise  <romain@orebokech.com>
+
+	* ibuf-ext.el (ibuffer-filter-disable): Move back to the current
+	buffer after removing limits.
+	(ibuffer-pop-filter): Ditto.
+	Update copyright.
+
+2005-03-02  Miles Bader  <miles@gnu.org>
+
+	* button.el (make-text-button): If the user doesn't specify a
+	type, use the default.  Rewrite to use `add-text-properties' and
+	plist functions.
+
+2005-03-01  Lute Kamstra  <lute@gnu.org>
+
+	* emacs-lisp/debug.el (inhibit-debug-on-entry): Add docstring.
+	(debugger-jumping-flag): New var.
+	(debug-entry-code): Use it.
+	(debugger-jump): Use debugger-jumping-flag and add
+	debugger-reenable to post-command-hook.
+	(debugger-reenable): Use debugger-jumping-flag and remove itself
+	from post-command-hook.
+	(debug, debug-on-entry, cancel-debug-on-entry): Remove call to
+	debugger-reenable.
+
+2005-03-01  Robert J. Chassell  <bob@rattlesnake.com>
+
+	* textmodes/texinfmt.el (texinfo-no-refill-regexp): Comment out
+	inclusion of "itemize\\|", which may be unnecessary, is certainly
+	inelegant, and stops refilling in itemize lists when formatting
+	Japanese Texinfo files to Info.
+	Update copyright to 2005.
+
+2005-03-01  Nick Roberts  <nickrob@snap.net.nz>
+
+	* progmodes/gdb-ui.el (gdb-get-location): Use a warning instead
+	of an error if GDB can't find the source file.
+
+2005-03-01  Glenn Morris  <gmorris@ast.cam.ac.uk>
+
+	* calendar/calendar.el (redraw-calendar): Work from any buffer,
+	not just the calendar.
+
+	* calendar/diary-lib.el (mark-diary-entries): Remove any old marks
+	first.
+	(diary-redraw-calendar): New function.
+	(make-diary-entry): Add diary-redraw-calendar to local
+	write-contents-functions.  Turn off selective display before
+	inserting in diary.
+
+2005-03-01  Kim F. Storm  <storm@cua.dk>
+
+	* emacs-lisp/copyright.el (copyright-fix-years): New command.
+
+2005-03-01  Lute Kamstra  <lute@gnu.org>
+
+	* emacs-lisp/debug.el (debug-on-entry-1): Reimplement to make sure
+	that debug-entry-code can be safely removed from a function while
+	this code is being evaluated.  Revert the 2005-02-27 change as the
+	new implementation no longer requires it.  Make sure that a
+	function body containing just a string is not mistaken for a
+	docstring.
+	(debug): Skip one more frame in case of debug on entry.
+	(debugger-setup-buffer): Delete one more frame line in case of
+	debug on entry.
+	(debugger-frame-number): Update to use the new text introduced by
+	the 1999-11-03 change.  Skip one more frame in case of debug on entry.
+
+2005-02-28  Kim F. Storm  <storm@cua.dk>
+
+	* double.el (double-translate-key): Call force-window-update after
+	read-event to avoid crash in redisplay.
+
+2005-02-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* emacs-lisp/debug.el (inhibit-debug-on-entry): New var.
+	(debug): Use it.  Move the inhibit-trace earlier.
+	(debug-entry-code): New const.
+	(debug-on-entry-1): Use it.
+
 2005-02-28  Chong Yidong" <cyd@stupidchicken.com> (tiny change)
 
-	* international/utf-16.el (ccl-encode-mule-utf-16le): Fix
-	BUFFER_MAGNIFICATION to 2.
+	* international/utf-16.el (ccl-encode-mule-utf-16le):
+	Fix BUFFER_MAGNIFICATION to 2.
 	(ccl-encode-mule-utf-16be): Likewise.
 
 2005-02-28  Kenichi Handa  <handa@m17n.org>
--- a/lisp/button.el	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/button.el	Sun Mar 06 13:31:20 2005 +0000
@@ -1,6 +1,6 @@
 ;;; button.el --- clickable buttons
 ;;
-;; Copyright (C) 2001 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2005 Free Software Foundation, Inc.
 ;;
 ;; Author: Miles Bader <miles@gnu.org>
 ;; Keywords: extensions
@@ -298,24 +298,23 @@
 `make-text-button'.
 
 Also see `insert-text-button'."
-  (let (prop val)
-    (while properties
-      (setq prop (pop properties))
-      (setq val (pop properties))
-      ;; Note that all the following code is basically equivalent to
-      ;; `button-put', but we can do it much more efficiently since we
-      ;; already have BEG and END.
-      (cond ((memq prop '(type :type))
-	     ;; We translate a `type' property into a `category'
-	     ;; property, since that's what's actually used by
-	     ;; text-properties for inheritance.
-	     (setq prop 'category)
-	     (setq val (button-category-symbol val)))
-	    ((eq prop 'category)
-	     ;; Disallow setting the `category' property directly.
-	     (error "Button `category' property may not be set directly")))
-      ;; Add the property.
-      (put-text-property beg end prop val)))
+  (let ((type-entry
+	 (or (plist-member properties 'type)
+	     (plist-member properties :type))))
+    ;; Disallow setting the `category' property directly.
+    (when (plist-get properties 'category)
+      (error "Button `category' property may not be set directly"))
+    (if (null type-entry)
+	;; The user didn't specify a `type' property, use the default.
+	(setq properties (cons 'category (cons 'default-button properties)))
+      ;; The user did specify a `type' property.  Translate it into a
+      ;; `category' property, which is what's actually used by
+      ;; text-properties for inheritance.
+      (setcar type-entry 'category)
+      (setcar (cdr type-entry)
+	      (button-category-symbol (car (cdr type-entry))))))
+  ;; Now add all the text properties at once
+  (add-text-properties beg end properties)
   ;; Return something that can be used to get at the button.
   beg)
 
--- a/lisp/calendar/calendar.el	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/calendar/calendar.el	Sun Mar 06 13:31:20 2005 +0000
@@ -2169,11 +2169,13 @@
   t)
 
 (defun redraw-calendar ()
-  "Redraw the calendar display."
+  "Redraw the calendar display, if `calendar-buffer' is live."
   (interactive)
-  (let ((cursor-date (calendar-cursor-to-nearest-date)))
-    (generate-calendar-window displayed-month displayed-year)
-    (calendar-cursor-to-visible-date cursor-date)))
+  (if (get-buffer calendar-buffer)
+      (with-current-buffer calendar-buffer
+        (let ((cursor-date (calendar-cursor-to-nearest-date)))
+          (generate-calendar-window displayed-month displayed-year)
+          (calendar-cursor-to-visible-date cursor-date)))))
 
 (defcustom calendar-debug-sexp nil
   "*Turn debugging on when evaluating a sexp in the diary or holiday list."
--- a/lisp/calendar/diary-lib.el	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/calendar/diary-lib.el	Sun Mar 06 13:31:20 2005 +0000
@@ -1,6 +1,6 @@
 ;;; diary-lib.el --- diary functions
 
-;; Copyright (C) 1989, 1990, 1992, 1993, 1994, 1995, 2003, 2004
+;; Copyright (C) 1989, 1990, 1992, 1993, 1994, 1995, 2003, 2004, 2005
 ;;           Free Software Foundation, Inc.
 
 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
@@ -841,6 +841,10 @@
 After the entries are marked, the hooks `nongregorian-diary-marking-hook' and
 `mark-diary-entries-hook' are run."
   (interactive)
+  ;; To remove any deleted diary entries.
+  (when mark-diary-entries-in-calendar
+    (setq mark-diary-entries-in-calendar nil)
+    (redraw-calendar))
   (let ((marking-diary-entries t)
         file-glob-attrs marks)
     (save-excursion
@@ -1647,11 +1651,26 @@
           (append diary-entries-list
                   (list (list date string specifier marker globcolor))))))
 
+(defun diary-redraw-calendar ()
+  "If `calendar-buffer' is live and diary entries are marked, redraw it."
+  (and mark-diary-entries-in-calendar
+       (redraw-calendar))
+  ;; Return value suitable for `write-contents-functions'.
+  nil)
+
 (defun make-diary-entry (string &optional nonmarking file)
   "Insert a diary entry STRING which may be NONMARKING in FILE.
-If omitted, NONMARKING defaults to nil and FILE defaults to `diary-file'."
+If omitted, NONMARKING defaults to nil and FILE defaults to
+`diary-file'.  Adds `diary-redraw-calendar' to
+`write-contents-functions' for FILE, so that the calendar will be
+redrawn with the new entry marked, if necessary."
   (let ((pop-up-frames (window-dedicated-p (selected-window))))
     (find-file-other-window (substitute-in-file-name (or file diary-file))))
+  (add-hook 'write-contents-functions 'diary-redraw-calendar nil t)
+  (when selective-display
+    (subst-char-in-region (point-min) (point-max) ?\^M ?\n t)
+    (setq selective-display nil)
+    (kill-local-variable 'mode-line-format))
   (widen)
   (goto-char (point-max))
   (when (let ((case-fold-search t))
--- a/lisp/calendar/icalendar.el	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/calendar/icalendar.el	Sun Mar 06 13:31:20 2005 +0000
@@ -90,7 +90,7 @@
 
 ;;; Code:
 
-(defconst icalendar-version 0.10
+(defconst icalendar-version 0.11
   "Version number of icalendar.el.")
 
 ;; ======================================================================
@@ -415,8 +415,10 @@
   "Return ISODURATIONSTRING in format like `decode-time'.
 Converts from ISO-8601 to Emacs representation.  If ISODURATIONSTRING
 specifies UTC time (trailing letter Z) the decoded time is given in
-the local time zone! FIXME: TZID-attributes are ignored....! FIXME:
-multiple comma-separated values should be allowed!"
+the local time zone!
+
+FIXME: TZID-attributes are ignored....!
+FIXME: multiple comma-separated values should be allowed!"
   (if isodurationstring
       (save-match-data
         (string-match
@@ -672,7 +674,7 @@
 ;; Export -- convert emacs-diary to icalendar
 ;; ======================================================================
 
-;; User function
+;;;###autoload
 (defun icalendar-export-file (diary-filename ical-filename)
   "Export diary file to iCalendar format.
 All diary entries in the file DIARY-FILENAME are converted to iCalendar
@@ -686,7 +688,7 @@
 (defalias 'icalendar-convert-diary-to-ical 'icalendar-export-file)
 (make-obsolete 'icalendar-convert-diary-to-ical 'icalendar-export-file)
 
-;; User function
+;;;###autoload
 (defun icalendar-export-region (min max ical-filename)
   "Export region in diary file to iCalendar format.
 All diary entries in the region from MIN to MAX in the current buffer are
@@ -1112,7 +1114,7 @@
 ;; Import -- convert icalendar to emacs-diary
 ;; ======================================================================
 
-;; User function
+;;;###autoload
 (defun icalendar-import-file (ical-filename diary-filename
                                             &optional non-marking)
   "Import a iCalendar file and append to a diary file.
@@ -1129,7 +1131,7 @@
     (set-buffer (find-file ical-filename))
     (icalendar-import-buffer diary-filename t non-marking)))
 
-;; User function
+;;;###autoload
 (defun icalendar-import-buffer (&optional diary-file do-not-ask
                                           non-marking)
   "Extract iCalendar events from current buffer.
@@ -1423,10 +1425,7 @@
              ((not (string= start-d end-d))
               (icalendar--dmsg "non-recurring event")
               (let ((ds (icalendar--datetime-to-diary-date dtstart))
-                    (de (icalendar--datetime-to-diary-date
-                         (icalendar--decode-isodatetime
-                          (icalendar--get-event-property e 'DTEND)
-                          -1))))
+                    (de (icalendar--datetime-to-diary-date dtend)))
                 (setq diary-string
                       (format "%%%%(and (diary-block %s %s))"
                               ds de)))
--- a/lisp/double.el	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/double.el	Sun Mar 06 13:31:20 2005 +0000
@@ -116,6 +116,7 @@
 	   ;; End of generated event.  See if he will repeat it...
 	   (let ((new (double-read-event prompt))
 		 (entry (assoc double-last-event double-map)))
+	     (force-window-update (selected-window))
 	     (if (eq new double-last-event)
 		 (progn
 		   (setq unread-command-events
--- a/lisp/emacs-lisp/copyright.el	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/emacs-lisp/copyright.el	Sun Mar 06 13:31:20 2005 +0000
@@ -1,6 +1,6 @@
 ;;; copyright.el --- update the copyright notice in current buffer
 
-;; Copyright (C) 1991, 92, 93, 94, 95, 1998, 2001, 2003, 2004
+;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1998, 2001, 2003, 2004, 2005
 ;;           Free Software Foundation, Inc.
 
 ;; Author: Daniel Pfeiffer <occitan@esperanto.org>
@@ -178,6 +178,41 @@
 
 
 ;;;###autoload
+(defun copyright-fix-years ()
+  "Convert 2 digit years to 4 digit years.
+Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
+  (interactive)
+  (widen)
+  (goto-char (point-min))
+  (if (re-search-forward copyright-regexp (+ (point) copyright-limit) t)
+      (let ((s (match-beginning 2)) (e (make-marker))
+	    last)
+	(set-marker e (1+ (match-end 2)))
+	(goto-char s)
+	(while (and (< (point) (marker-position e))
+		    (re-search-forward "\\([^0-9]\\)\\([0-9]+\\)[^0-9]"
+				       (marker-position e) t))
+	  (let ((p (point))
+		(sep (match-string 1))
+		(year (string-to-number (match-string 2))))
+	    (goto-char (1+ (match-beginning 0)))
+	    (unless (= (char-syntax (string-to-char sep)) ?\s)
+	      (insert " "))
+	    (if (< year 100)
+		(insert (if (>= year 50) "19" "20")))
+	    (goto-char p)
+	    (setq last p)))
+	(when last
+	  (goto-char last)
+	  (let ((fill-prefix "     "))
+	    (fill-region s last))
+	  )
+	(set-marker e nil)
+	(copyright-update nil t))
+    (message "No copyright message")
+    (goto-char (point-min))))
+
+;;;###autoload
 (define-skeleton copyright
   "Insert a copyright by $ORGANIZATION notice at cursor."
   "Company: "
--- a/lisp/emacs-lisp/debug.el	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/emacs-lisp/debug.el	Sun Mar 06 13:31:20 2005 +0000
@@ -25,7 +25,7 @@
 
 ;;; Commentary:
 
-;; This is a major mode documented in the Emacs manual.
+;; This is a major mode documented in the Emacs Lisp manual.
 
 ;;; Code:
 
@@ -51,15 +51,11 @@
   :group 'debugger
   :version "21.1")
 
-(defcustom debug-function-list nil
-  "List of functions currently set for debug on entry."
-  :type '(repeat function)
-  :group 'debugger)
+(defvar debug-function-list nil
+  "List of functions currently set for debug on entry.")
 
-(defcustom debugger-step-after-exit nil
-  "Non-nil means \"single-step\" after the debugger exits."
-  :type 'boolean
-  :group 'debugger)
+(defvar debugger-step-after-exit nil
+  "Non-nil means \"single-step\" after the debugger exits.")
 
 (defvar debugger-value nil
   "This is the value for the debugger to return, when it returns.")
@@ -93,6 +89,21 @@
 (defvar debugger-outer-inhibit-redisplay)
 (defvar debugger-outer-cursor-in-echo-area)
 
+(defvar inhibit-debug-on-entry nil
+  "Non-nil means that debug-on-entry is disabled.")
+
+(defvar debugger-jumping-flag nil
+  "Non-nil means that debug-on-entry is disabled.
+This variable is used by `debugger-jump' and `debugger-reenable'.")
+
+;; When you change this, you may also need to change the number of
+;; frames that the debugger skips.
+(defconst debug-entry-code
+  '(if (or inhibit-debug-on-entry debugger-jumping-flag)
+       nil
+     (debug 'debug))
+  "Code added to a function to cause it to call the debugger upon entry.")
+
 ;;;###autoload
 (setq debugger 'debug)
 ;;;###autoload
@@ -147,6 +158,8 @@
       (setq overriding-terminal-local-map nil)
       ;; Don't let these magic variables affect the debugger itself.
       (let ((last-command nil) this-command track-mouse
+	    (inhibit-trace t)
+	    (inhibit-debug-on-entry t)
 	    unread-command-events
 	    unread-post-input-method-events
 	    last-input-event last-command-event last-nonmenu-event
@@ -185,12 +198,11 @@
 		  (message "%s" (buffer-string))
 		  (kill-emacs))
 		(if (eq (car debugger-args) 'debug)
-		    ;; Skip the frames for backtrace-debug, byte-code, and debug.
-		    (backtrace-debug 3 t))
-		(debugger-reenable)
+		    ;; Skip the frames for backtrace-debug, byte-code,
+		    ;; and debug-entry-code.
+		    (backtrace-debug 4 t))
 		(message "")
-		(let ((inhibit-trace t)
-		      (standard-output nil)
+		(let ((standard-output nil)
 		      (buffer-read-only t))
 		  (message "")
 		  ;; Make sure we unbind buffer-read-only in the right buffer.
@@ -250,7 +262,9 @@
   (delete-region (point)
 		 (progn
 		   (search-forward "\n  debug(")
-		   (forward-line 1)
+		   (forward-line (if (eq (car debugger-args) 'debug)
+				     2	; Remove debug-entry-code frame.
+				   1))
 		   (point)))
   (insert "Debugger entered")
   ;; lambda is for debug-on-call when a function call is next.
@@ -395,25 +409,17 @@
   "Continue to exit from this frame, with all debug-on-entry suspended."
   (interactive)
   (debugger-frame)
-  ;; Turn off all debug-on-entry functions
-  ;; but leave them in the list.
-  (let ((list debug-function-list))
-    (while list
-      (fset (car list)
-	    (debug-on-entry-1 (car list) (symbol-function (car list)) nil))
-      (setq list (cdr list))))
+  (setq debugger-jumping-flag t)
+  (add-hook 'post-command-hook 'debugger-reenable)
   (message "Continuing through this frame")
   (exit-recursive-edit))
 
 (defun debugger-reenable ()
-  "Turn all debug-on-entry functions back on."
-  (let ((list debug-function-list))
-    (while list
-      (or (consp (symbol-function (car list)))
-	  (debug-convert-byte-code (car list)))
-      (fset (car list)
-	    (debug-on-entry-1 (car list) (symbol-function (car list)) t))
-      (setq list (cdr list)))))
+  "Turn all debug-on-entry functions back on.
+This function is put on `post-command-hook' by `debugger-jump' and
+removes itself from that hook."
+  (setq debugger-jumping-flag nil)
+  (remove-hook 'post-command-hook 'debugger-reenable))
 
 (defun debugger-frame-number ()
   "Return number of frames in backtrace before the one point points at."
@@ -423,14 +429,13 @@
 	  (count 0))
       (while (not (eq (cadr (backtrace-frame count)) 'debug))
 	(setq count (1+ count)))
+      ;; Skip debug-entry-code frame.
+      (when (member '(debug (quote debug)) (cdr (backtrace-frame (1+ count))))
+	(setq count (1+ count)))
       (goto-char (point-min))
-      (if (or (equal (buffer-substring (point) (+ (point) 6))
-		     "Signal")
-	      (equal (buffer-substring (point) (+ (point) 6))
-		     "Return"))
-	  (progn
-	    (search-forward ":")
-	    (forward-sexp 1)))
+      (when (looking-at "Debugger entered--\\(Lisp error\\|returning value\\):")
+	(goto-char (match-end 0))
+	(forward-sexp 1))
       (forward-line 1)
       (while (progn
 	       (forward-char 2)
@@ -476,8 +481,6 @@
 	(insert ? )))
   (beginning-of-line))
 
-
-
 (put 'debugger-env-macro 'lisp-indent-function 0)
 (defmacro debugger-env-macro (&rest body)
   "Run BODY in original environment."
@@ -626,7 +629,6 @@
 Use \\[cancel-debug-on-entry] to cancel the effect of this command.
 Redefining FUNCTION also cancels it."
   (interactive "aDebug on entry (to function): ")
-  (debugger-reenable)
   ;; Handle a function that has been aliased to some other function.
   (if (and (subrp (symbol-function function))
 	   (eq (cdr (subr-arity (symbol-function function))) 'unevalled))
@@ -657,7 +659,6 @@
 				 (mapcar 'symbol-name debug-function-list)
 				 nil t nil)))
 	   (if name (intern name)))))
-  (debugger-reenable)
   (if (and function (not (string= function "")))
       (progn
 	(let ((f (debug-on-entry-1 function (symbol-function function) nil)))
@@ -698,22 +699,18 @@
 	(debug-on-entry-1 function (cdr defn) flag)
       (or (eq (car defn) 'lambda)
 	  (error "%s not user-defined Lisp function" function))
-      (let ((tail (cddr defn)))
+      (let ((tail (cdr defn)))
 	;; Skip the docstring.
-	(if (stringp (car tail)) (setq tail (cdr tail)))
+	(when (and (stringp (cadr tail)) (cddr tail))
+	  (setq tail (cdr tail)))
 	;; Skip the interactive form.
-	(if (eq 'interactive (car-safe (car tail))) (setq tail (cdr tail)))
-	(unless (eq flag (equal (car tail) '(debug 'debug)))
-	  ;; If the function has no body, add nil as a body element.
-	  (when (null tail)
-	    (setq tail (list nil))
-	    (nconc defn tail))
+	(when (eq 'interactive (car-safe (cadr tail)))
+	  (setq tail (cdr tail)))
+	(unless (eq flag (equal (cadr tail) debug-entry-code))
 	  ;; Add/remove debug statement as needed.
-	  (if (not flag)
-	      (progn (setcar tail (cadr tail))
-		     (setcdr tail (cddr tail)))
-	    (setcdr tail (cons (car tail) (cdr tail)))
-	    (setcar tail '(debug 'debug))))
+	  (if flag
+	      (setcdr tail (cons debug-entry-code (cdr tail)))
+	    (setcdr tail (cddr tail))))
 	defn))))
 
 (defun debugger-list-functions ()
--- a/lisp/frame.el	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/frame.el	Sun Mar 06 13:31:20 2005 +0000
@@ -1341,7 +1341,7 @@
 displays through a window system, because then Emacs does its own
 cursor display.  On a text-only terminal, this is not implemented."
   :init-value (not (or noninteractive
-		       emacs-quick-startup
+		       (if (boundp 'no-blinking-cursor) no-blinking-cursor)
 		       (eq system-type 'ms-dos)
 		       (not (memq initial-window-system '(x w32)))))
   :group 'cursor
--- a/lisp/gnus/ChangeLog	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/gnus/ChangeLog	Sun Mar 06 13:31:20 2005 +0000
@@ -1,11 +1,37 @@
+2005-03-04  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* message.el: Don't autoload former message-utils variables.
+	(message-strip-subject-trailing-was): Changed doc string.
+
+	* nnweb.el: Fixes for `gnus-group-make-web-group'.
+	(nnweb-type-definition): Don't add "hl=en" in `address'.  Added
+	`base'.
+	(nnweb-google-search): Add "hl=en" here.
+	(nnweb-google-parse-1, nnweb-google-create-mapping): Don't
+	hardcode URL.
+
+2005-03-03  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* message.el (message-get-reply-headers, message-followup):
+	Mention related variables `message-use-followup-to' and
+	`message-use-mail-followup-to', in the information buffer.
+
+	* nnweb.el (nnweb-type-definition): Use groups.google.de instead
+	of broken groups(-beta).google.com.
+
+2005-03-01  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* gnus-sum.el (gnus-summary-exit): Undo last change and fix it in
+	a more conservative way.
+
 2005-02-27  Arne J,Ax(Brgensen  <arne@arnested.dk>
 
 	* mm-decode.el (mm-dissect-buffer): Pass the from field on to
 	`mm-dissect-multipart' and receive the from field as an (optional)
 	argument from `mm-dissect-multipart'.
 	(mm-dissect-multipart): Receive the from field as an argument and
-	pass it on when we call `mm-dissect-buffer' on MIME parts. Fixes
-	verification/decryption of signed/encrypted MIME parts.
+	pass it on when we call `mm-dissect-buffer' on MIME parts.
+	Fixes verification/decryption of signed/encrypted MIME parts.
 
 2005-02-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 
--- a/lisp/gnus/gnus-sum.el	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/gnus/gnus-sum.el	Sun Mar 06 13:31:20 2005 +0000
@@ -6680,11 +6680,13 @@
       (set-buffer gnus-group-buffer)
       (if quit-config
 	  (gnus-handle-ephemeral-exit quit-config)
+	(goto-char group-point)
+	;; If gnus-group-buffer is already displayed, make sure we also move
+	;; the cursor in the window that displays it.
+	(let ((win (get-buffer-window (current-buffer) 0)))
+	  (if win (set-window-point win (point))))
 	(unless leave-hidden
-	  (gnus-configure-windows 'group 'force))
-	;; Move point after calling gnus-configure-windows to make sure it
-	;; moves the window's point as well.
-	(goto-char group-point))
+	  (gnus-configure-windows 'group 'force)))
       ;; Clear the current group name.
       (unless quit-config
 	(setq gnus-newsgroup-name nil)))))
--- a/lisp/gnus/message.el	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/gnus/message.el	Sun Mar 06 13:31:20 2005 +0000
@@ -335,11 +335,8 @@
   :link '(custom-manual "(message)Message Headers")
   :type 'regexp)
 
-;; Fixme: Why are all these things autoloaded?
-
 ;;; marking inserted text
 
-;;;###autoload
 (defcustom message-mark-insert-begin
   "--8<---------------cut here---------------start------------->8---\n"
   "How to mark the beginning of some inserted text."
@@ -348,7 +345,6 @@
   :link '(custom-manual "(message)Insertion Variables")
   :group 'message-various)
 
-;;;###autoload
 (defcustom message-mark-insert-end
   "--8<---------------cut here---------------end--------------->8---\n"
   "How to mark the end of some inserted text."
@@ -357,9 +353,7 @@
   :link '(custom-manual "(message)Insertion Variables")
   :group 'message-various)
 
-;;;###autoload
-(defcustom message-archive-header
-  "X-No-Archive: Yes\n"
+(defcustom message-archive-header "X-No-Archive: Yes\n"
   "Header to insert when you don't want your article to be archived.
 Archives \(such as groups.google.com\) respect this header."
   :version "22.1"
@@ -367,7 +361,6 @@
   :link '(custom-manual "(message)Header Commands")
   :group 'message-various)
 
-;;;###autoload
 (defcustom message-archive-note
   "X-No-Archive: Yes - save http://groups.google.com/"
   "Note to insert why you wouldn't want this posting archived.
@@ -385,7 +378,6 @@
   "Old target for cross-posts or follow-ups.")
 (make-variable-buffer-local 'message-cross-post-old-target)
 
-;;;###autoload
 (defcustom message-cross-post-default t
   "When non-nil `message-cross-post-followup-to' will perform a crosspost.
 If nil, `message-cross-post-followup-to' will only do a followup.  Note that
@@ -395,25 +387,19 @@
   :type 'boolean
   :group 'message-various)
 
-;;;###autoload
-(defcustom message-cross-post-note
-  "Crosspost & Followup-To: "
+(defcustom message-cross-post-note "Crosspost & Followup-To: "
   "Note to insert before signature to notify of cross-post and follow-up."
   :version "22.1"
   :type 'string
   :group 'message-various)
 
-;;;###autoload
-(defcustom message-followup-to-note
-  "Followup-To: "
+(defcustom message-followup-to-note "Followup-To: "
   "Note to insert before signature to notify of follow-up only."
   :version "22.1"
   :type 'string
   :group 'message-various)
 
-;;;###autoload
-(defcustom message-cross-post-note-function
-  'message-cross-post-insert-note
+(defcustom message-cross-post-note-function 'message-cross-post-insert-note
   "Function to use to insert note about Crosspost or Followup-To.
 The function will be called with four arguments.  The function should not only
 insert a note, but also ensure old notes are deleted.  See the documentation
@@ -1766,7 +1752,7 @@
 ;;; Start of functions adopted from `message-utils.el'.
 
 (defun message-strip-subject-trailing-was (subject)
-  "Remove trailing \"(Was: <old subject>)\" from SUBJECT lines.
+  "Remove trailing \"(was: <old subject>)\" from SUBJECT lines.
 Leading \"Re: \" is not stripped by this function.  Use the function
 `message-strip-subject-re' for this."
   (let* ((query message-subject-trailing-was-query)
@@ -5675,7 +5661,10 @@
 fragmented and very difficult to follow.
 
 Also, some source/announcement lists are not intended for discussion;
-responses here are directed to other addresses.")))
+responses here are directed to other addresses.
+
+You may customize the variable `message-use-mail-followup-to', if you
+want to get rid of this query permanently.")))
 	(setq recipients (concat ", " mft)))
        (to-address
 	(setq recipients (concat ", " to-address))
@@ -5871,7 +5860,10 @@
 `Followup-To: poster' sends your response via e-mail instead of news.
 
 A typical situation where `Followup-To: poster' is used is when the poster
-does not read the newsgroup, so he wouldn't see any replies sent to it."))
+does not read the newsgroup, so he wouldn't see any replies sent to it.
+
+You may customize the variable `message-use-followup-to', if you
+want to get rid of this query permanently."))
 		  (progn
 		    (setq message-this-is-news nil)
 		    (cons 'To (or mrt reply-to from "")))
@@ -5894,7 +5886,10 @@
 be fragmented and very difficult to follow.
 
 Also, some source/announcement newsgroups are not intended for discussion;
-responses here are directed to other newsgroups."))
+responses here are directed to other newsgroups.
+
+You may customize the variable `message-use-followup-to', if you
+want to get rid of this query permanently."))
 		  (cons 'Newsgroups followup-to)
 		(cons 'Newsgroups newsgroups))))))
 	  (posted-to
--- a/lisp/gnus/nnweb.el	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/gnus/nnweb.el	Sun Mar 06 13:31:20 2005 +0000
@@ -54,11 +54,12 @@
 (defvar nnweb-type-definition
   '((google
      (article . ignore)
-     (id . "http://groups.google.com/groups?selm=%s&output=gplain")
+     (id . "http://groups.google.de/groups?selm=%s&output=gplain")
      (reference . identity)
      (map . nnweb-google-create-mapping)
      (search . nnweb-google-search)
-     (address . "http://groups.google.com/groups")
+     (address . "http://groups.google.de/groups")
+     (base    . "http://groups.google.de")
      (identifier . nnweb-google-identity))
     (dejanews ;; alias of google
      (article . ignore)
@@ -67,6 +68,7 @@
      (map . nnweb-google-create-mapping)
      (search . nnweb-google-search)
      (address . "http://groups.google.com/groups")
+     (base    . "http://groups.google.com")
      (identifier . nnweb-google-identity))
     (gmane
      (article . nnweb-gmane-wash-article)
@@ -349,7 +351,7 @@
 	    "a href=/groups\\(\\?[^ \">]*selm=\\([^ &\">]+\\)\\)" nil t)
       (setq mid (match-string 2)
 	    url (format
-		 "http://groups.google.com/groups?selm=%s&output=gplain" mid))
+		 (nnweb-definition 'id) mid))
       (narrow-to-region (search-forward ">" nil t)
 			(search-forward "</a>" nil t))
       (mm-url-remove-markup)
@@ -420,7 +422,7 @@
 		    (>= i nnweb-max-hits))
 		(setq more nil)
 	      ;; Yup, there are more articles
-	      (setq more (concat "http://groups.google.com" (match-string 1)))
+	      (setq more (concat (nnweb-definition 'base) (match-string 1)))
 	    (when more
 	      (erase-buffer)
 	      (mm-url-insert more))))
@@ -435,9 +437,9 @@
     "?"
     (mm-url-encode-www-form-urlencoded
      `(("q" . ,search)
-       ("num". "100")
+       ("num" . "100")
        ("hq" . "")
-       ("hl" . "")
+       ("hl" . "en")
        ("lr" . "")
        ("safe" . "off")
        ("sites" . "groups")))))
--- a/lisp/ibuf-ext.el	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/ibuf-ext.el	Sun Mar 06 13:31:20 2005 +0000
@@ -1,6 +1,6 @@
 ;;; ibuf-ext.el --- extensions for ibuffer
 
-;; Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
 ;; Author: Colin Walters <walters@verbum.org>
 ;; Maintainer: John Paul Wallington <jpw@gnu.org>
@@ -753,7 +753,10 @@
   "Disable all filters currently in effect in this buffer."
   (interactive)
   (setq ibuffer-filtering-qualifiers nil)
-  (ibuffer-update nil t))
+  (let ((buf (ibuffer-current-buffer)))
+    (ibuffer-update nil t)
+    (when buf
+      (ibuffer-jump-to-buffer (buffer-name buf)))))
 
 ;;;###autoload
 (defun ibuffer-pop-filter ()
@@ -762,7 +765,10 @@
   (when (null ibuffer-filtering-qualifiers)
     (error "No filters in effect"))
   (pop ibuffer-filtering-qualifiers)
-  (ibuffer-update nil t))
+  (let ((buf (ibuffer-current-buffer)))
+    (ibuffer-update nil t)
+    (when buf
+      (ibuffer-jump-to-buffer (buffer-name buf)))))
 
 (defun ibuffer-push-filter (qualifier)
   "Add QUALIFIER to `ibuffer-filtering-qualifiers'."
--- a/lisp/international/code-pages.el	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/international/code-pages.el	Sun Mar 06 13:31:20 2005 +0000
@@ -1,6 +1,6 @@
 ;;; code-pages.el --- coding systems for assorted codepages  -*-coding: utf-8;-*-
 
-;; Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2003, 2004, 2005  Free Software Foundation, Inc.
 
 ;; Author: Dave Love <fx@gnu.org>
 ;; Keywords: i18n
@@ -2440,6 +2440,7 @@
   nil
   nil])
 
+;;;###autoload(autoload-coding-system 'windows-1250 '(require 'code-pages))
 (cp-make-coding-system
  windows-1250
  [?\€
@@ -2571,6 +2572,7 @@
   ?\Å£
   ?\Ë™])
 
+;;;###autoload(autoload-coding-system 'windows-1253 '(require 'code-pages))
 (cp-make-coding-system
  windows-1253
  [?\€
@@ -2703,6 +2705,7 @@
   nil]
  nil ?g) ;; Greek
 
+;;;###autoload(autoload-coding-system 'windows-1254 '(require 'code-pages))
 (cp-make-coding-system
  windows-1254
  [?\€
@@ -2835,6 +2838,7 @@
   ?\ÿ])
 
 ;; yi_US
+;;;###autoload(autoload-coding-system 'windows-1255 '(require 'code-pages))
 (cp-make-coding-system
  windows-1255
  [?\€
@@ -2967,6 +2971,7 @@
   nil]
  nil ?h) ;; Hebrew
 
+;;;###autoload(autoload-coding-system 'windows-1256 '(require 'code-pages))
 (cp-make-coding-system
  windows-1256
  [?\€
@@ -3099,6 +3104,7 @@
   ?\Û’]
  nil ?a) ;; Arabic
 
+;;;###autoload(autoload-coding-system 'windows-1257 '(require 'code-pages))
 (cp-make-coding-system
  windows-1257
  [?\€
@@ -3230,6 +3236,7 @@
   ?\ž
   nil])
 
+;;;###autoload(autoload-coding-system 'windows-1258 '(require 'code-pages))
 (cp-make-coding-system
  windows-1258
  [?\€
@@ -3652,6 +3659,7 @@
 ;;   ISO 8859-16 was primarily designed for single-byte encoding the Romanian
 ;;   language. The UTF-8 charset is the preferred and in today's MIME software
 ;;   more widely implemented encoding suitable for Romanian.
+;;;###autoload(autoload-coding-system 'iso-8859-16 '(require 'code-pages))
 (cp-make-coding-system
  iso-latin-10				; consistent with, e.g. Latin-1
  [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
@@ -3823,6 +3831,7 @@
  ?6)
 (define-coding-system-alias 'arabic-iso-8bit 'iso-8859-6)
 
+;;;###autoload(autoload-coding-system 'iso-8859-10 '(require 'code-pages))
 (cp-make-coding-system
  iso-latin-6
  [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
@@ -3929,6 +3938,7 @@
 (define-coding-system-alias 'latin-6 'iso-latin-6)
 
 ;; used by lt_LT, lv_LV, mi_NZ
+;;;###autoload(autoload-coding-system 'iso-8859-13 '(require 'code-pages))
 (cp-make-coding-system
  iso-latin-7
  [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
@@ -4039,6 +4049,7 @@
 ;; Fixme: check on the C1 characters which libiconv includes.  They
 ;; are reproduced below, but are probably wrong.  I can't find an
 ;; official definition of georgian-ps.
+;;;###autoload(autoload-coding-system 'georgian-ps '(require 'code-pages))
 (cp-make-coding-system
  georgian-ps				; used by glibc for ka_GE
  [?\€
--- a/lisp/menu-bar.el	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/menu-bar.el	Sun Mar 06 13:31:20 2005 +0000
@@ -590,7 +590,7 @@
 (defmacro menu-bar-make-mm-toggle (fname doc help &optional props)
   "Make a menu-item for a global minor mode toggle.
 FNAME is the minor mode's name (variable and function).
-DOC is the text to use the menu entry.
+DOC is the text to use for the menu entry.
 HELP is the text to use for the tooltip.
 PROPS are additional properties."
   `'(menu-item ,doc ,fname
@@ -637,7 +637,8 @@
     ;; These are set with menu-bar-make-mm-toggle, which does not
     ;; put on a customized-value property.
     (dolist (elt '(line-number-mode column-number-mode cua-mode show-paren-mode
-		   transient-mark-mode global-font-lock-mode))
+		   transient-mark-mode global-font-lock-mode
+		   blink-cursor-mode))
       (and (customize-mark-to-save elt)
 	   (setq need-save t)))
     ;; These are set with `customize-set-variable'.
@@ -959,6 +960,14 @@
 			"Enter Lisp debugger when an error is signaled"))
 (define-key menu-bar-options-menu [debugger-separator]
   '("--"))
+
+(define-key menu-bar-options-menu [blink-cursor-mode]
+  (menu-bar-make-mm-toggle blink-cursor-mode
+			   "Blinking Cursor"
+			   "Whether the cursor blinks (Blink Cursor mode)"))
+(define-key menu-bar-options-menu [cursor-separator]
+  '("--"))
+
 (define-key menu-bar-options-menu [toggle-auto-compression]
   '(menu-item "Automatic File De/compression"
 	      auto-compression-mode
--- a/lisp/progmodes/compile.el	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/progmodes/compile.el	Sun Mar 06 13:31:20 2005 +0000
@@ -514,6 +514,10 @@
       (and (cdr type) (match-end (cdr type)) compilation-info-face)
       compilation-error-face))
 
+;; Internal function for calculating the text properties of a directory
+;; change message.  The directory property is important, because it is
+;; the stack of nested enter-messages.  Relative filenames on the following
+;; lines are relative to the top of the stack.
 (defun compilation-directory-properties (idx leave)
   (if leave (setq leave (match-end leave)))
   ;; find previous stack, and push onto it, or if `leave' pop it
--- a/lisp/progmodes/gdb-ui.el	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/progmodes/gdb-ui.el	Sun Mar 06 13:31:20 2005 +0000
@@ -880,8 +880,7 @@
   "An annotation handler for `post-prompt'.
 This begins the collection of output from the current command if that
 happens to be appropriate."
-  (if (not gdb-pending-triggers)
-      (progn
+  (unless gdb-pending-triggers
 	(gdb-get-current-frame)
 	(gdb-invalidate-frames)
 	(gdb-invalidate-breakpoints)
@@ -897,7 +896,7 @@
 	    (setq gdb-var-changed t)    ; force update
 	    (dolist (var gdb-var-list)
 	      (setcar (nthcdr 5 var) nil))
-	    (gdb-var-update)))))
+	    (gdb-var-update))))
   (let ((sink gdb-output-sink))
     (cond
      ((eq sink 'user) t)
@@ -1211,14 +1210,13 @@
 				  (goto-line (string-to-number line))
 				  (gdb-put-breakpoint-icon (eq flag ?y) bptno)))
 			    (gdb-enqueue-input
-			     (list (concat gdb-server-prefix "list "
+			     (list (concat "list "
 					   (match-string-no-properties 1) ":1\n")
 				   'ignore))
 			    (gdb-enqueue-input
-			     (list (concat gdb-server-prefix "info source\n")
-				   `(lambda ()
-				      (gdb-get-location
-				       ,bptno ,line ,flag)))))))))))
+			     (list "info source\n"
+				   `(lambda () (gdb-get-location
+						,bptno ,line ,flag)))))))))))
 	  (end-of-line)))))
   (if (gdb-get-buffer 'gdb-assembler-buffer) (gdb-assembler-custom)))
 
@@ -2108,22 +2106,29 @@
   "Find the directory containing the relevant source file.
 Put in buffer and place breakpoint icon."
   (goto-char (point-min))
-  (if (search-forward "Located in " nil t)
-      (if (looking-at "\\S-*")
-	  (push (cons bptno (match-string 0)) gdb-location-list))
-    (gdb-resync)
-    (push (cons bptno "File not found") gdb-location-list)
-    (error "Cannot find source file for breakpoint location.
+  (catch 'file-not-found
+    (if (search-forward "Located in " nil t)
+	(if (looking-at "\\S-*")
+	    (push (cons bptno (match-string 0)) gdb-location-list))
+      (gdb-resync)
+      (push (cons bptno "File not found") gdb-location-list)
+      (if (eq window-system 'x)
+	  (x-popup-dialog
+	   t '("Cannot find source file for breakpoint location.\n\
+Add directory to search path for source files using the GDB command, dir."
+	       ("Ok" . nil)))
+	(message "Cannot find source file for breakpoint location.\n\
 Add directory to search path for source files using the GDB command, dir."))
-  (with-current-buffer
-      (find-file-noselect (match-string 0))
-    (save-current-buffer
-      (set (make-local-variable 'gud-minor-mode) 'gdba)
-      (set (make-local-variable 'tool-bar-map) gud-tool-bar-map))
-    ;; only want one breakpoint icon at each location
-    (save-excursion
-      (goto-line (string-to-number line))
-      (gdb-put-breakpoint-icon (eq flag ?y) bptno))))
+      (throw 'file-not-found nil))
+    (with-current-buffer
+	(find-file-noselect (match-string 0))
+      (save-current-buffer
+	(set (make-local-variable 'gud-minor-mode) 'gdba)
+	(set (make-local-variable 'tool-bar-map) gud-tool-bar-map))
+      ;; only want one breakpoint icon at each location
+      (save-excursion
+	(goto-line (string-to-number line))
+	(gdb-put-breakpoint-icon (eq flag ?y) bptno)))))
 
 (add-hook 'find-file-hook 'gdb-find-file-hook)
 
--- a/lisp/simple.el	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/simple.el	Sun Mar 06 13:31:20 2005 +0000
@@ -733,10 +733,48 @@
 
 ;; Counting lines, one way or another.
 
-(defun goto-line (arg)
-  "Goto line ARG, counting from line 1 at beginning of buffer."
-  (interactive "NGoto line: ")
-  (setq arg (prefix-numeric-value arg))
+(defun goto-line (arg &optional buffer)
+  "Goto line ARG, counting from line 1 at beginning of buffer.
+Normally, move point in the curren buffer.
+With just C-u as argument, move point in the most recently displayed
+other buffer, and switch to it.
+
+If there's a number in the buffer at point, it is the default for ARG."
+  (interactive
+   (if (and current-prefix-arg (not (consp current-prefix-arg)))
+       (list (prefix-numeric-value current-prefix-arg))
+     ;; Look for a default, a number in the buffer at point.
+     (let* ((default
+	      (save-excursion
+		(skip-chars-backward "0-9")
+		(if (looking-at "[0-9]")
+		    (buffer-substring-no-properties
+		     (point)
+		     (progn (skip-chars-forward "0-9")
+			    (point))))))
+	    ;; Decide if we're switching buffers.
+	    (buffer
+	     (if (consp current-prefix-arg)
+		 (other-buffer (current-buffer) t)))
+	    (buffer-prompt
+	     (if buffer
+		 (concat " in " (buffer-name buffer))
+	       "")))
+       ;; Read the argument, offering that number (if any) as default.
+       (list (read-from-minibuffer (format (if default "Goto line%s (%s): "
+					     "Goto line%s: ")
+					   buffer-prompt
+					   default)
+				   nil nil t
+				   'minibuffer-history
+				   default)
+	     buffer))))
+  ;; Switch to the desired buffer, one way or another.
+  (if buffer
+      (let ((window (get-buffer-window buffer)))
+	(if window (select-window window)
+	  (switch-to-buffer-other-window buffer))))
+  ;; Move to the specified line number in that buffer.
   (save-restriction
     (widen)
     (goto-char 1)
--- a/lisp/startup.el	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/startup.el	Sun Mar 06 13:31:20 2005 +0000
@@ -290,6 +290,8 @@
 
 (defvar normal-top-level-add-subdirs-inode-list nil)
 
+(defvar no-blinking-cursor nil)
+
 (defvar pure-space-overflow nil
   "Non-nil if building Emacs overflowed pure space.")
 
@@ -674,7 +676,8 @@
     ;; does things.
     (while (and (not done) args)
       (let* ((longopts '(("--no-init-file") ("--no-site-file") ("--user")
-                         ("--debug-init") ("--iconic") ("--icon-type")))
+                         ("--debug-init") ("--iconic") ("--icon-type")
+			 ("--no-blinking-cursor")))
              (argi (pop args))
              (orig-argi argi)
              argval)
@@ -697,6 +700,7 @@
 	 ((equal argi "-Q")
 	  (setq init-file-user nil
 		site-run-file nil
+		no-blinking-cursor t
 		emacs-quick-startup t)
 	  (push '(vertical-scroll-bars . nil) initial-frame-alist))
 	 ((member argi '("-q" "-no-init-file"))
@@ -712,6 +716,8 @@
 	  (push '(visibility . icon) initial-frame-alist))
 	 ((member argi '("-icon-type" "-i" "-itype"))
 	  (push '(icon-type . t) default-frame-alist))
+	 ((member argi '("-nbc" "-no-blinking-cursor"))
+	  (setq no-blinking-cursor t))
 	 ;; Push the popped arg back on the list of arguments.
 	 (t
           (push argi args)
@@ -747,7 +753,7 @@
   ;; you should also change the corresponding expression in the
   ;; defcustom in frame.el, or Custom will be badly confused.
   (unless (or noninteractive
-	      emacs-quick-startup
+	      no-blinking-cursor
               (eq system-type 'ms-dos)
               (not (memq initial-window-system '(x w32))))
     (blink-cursor-mode 1))
--- a/lisp/textmodes/texinfmt.el	Mon Feb 28 15:15:44 2005 +0000
+++ b/lisp/textmodes/texinfmt.el	Sun Mar 06 13:31:20 2005 +0000
@@ -1,7 +1,7 @@
 ;;; texinfmt.el --- format Texinfo files into Info files
 
 ;; Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993,
-;;               1994, 1995, 1996, 1997, 1998, 2000, 2001
+;;               1994, 1995, 1996, 1997, 1998, 2000, 2001, 2005
 ;;    Free Software Foundation, Inc.
 
 ;; Maintainer: Robert J. Chassell <bug-texinfo@gnu.org>
@@ -37,7 +37,7 @@
     (defmacro defcustom (var value doc &rest ignore)
       `(defvar ,var ,value ,doc)))
 
-(defvar texinfmt-version "2.40 of  6 Dec 2002")
+(defvar texinfmt-version "2.41 of  1 Mar 2005")
 
 (defun texinfmt-version (&optional here)
   "Show the version of texinfmt.el in the minibuffer.
@@ -486,7 +486,8 @@
    ;;     I don't know if this causes other problems.
    ;;     I suspect itemized lists don't get filled properly and a
    ;;     more precise fix is required.  Bob
-   "itemize\\|"
+   ;; commented out on 2005 Feb 28 by Bob
+   ;; "itemize\\|"
    "direntry\\|"
    "lisp\\|"
    "smalllisp\\|"
@@ -636,7 +637,7 @@
 	    (forward-char 1)
 	    (unless (re-search-backward "@c[ \t\n]\\|@comment[ \t\n]" line-beg t)
 	      (forward-char -1))
-	    (unless (re-search-backward "@refill\\|@bye" line-beg t)
+	    (unless (re-search-backward "@refill\\|^[ \t]*@" line-beg t)
 	      (insert "@refill")))
           (forward-line 1))))))
 
--- a/lispref/ChangeLog	Mon Feb 28 15:15:44 2005 +0000
+++ b/lispref/ChangeLog	Sun Mar 06 13:31:20 2005 +0000
@@ -1,3 +1,32 @@
+2005-03-05  Richard M. Stallman  <rms@gnu.org>
+
+	* debugging.texi (Error Debugging): Remove stack-trace-on-error.
+
+2005-03-04  Lute Kamstra  <lute@gnu.org>
+
+	* debugging.texi (Error Debugging): Document stack-trace-on-error.
+
+2005-03-03  Lute Kamstra  <lute@gnu.org>
+
+	* edebug.texi (Instrumenting Macro Calls): Fix typo.
+
+2005-03-01  Lute Kamstra  <lute@gnu.org>
+
+	* debugging.texi (Debugger Commands): Update `j'.
+
+2005-02-28  Lute Kamstra  <lute@gnu.org>
+
+	* debugging.texi (Debugging): Fix typo.
+	(Error Debugging): Document eval-expression-debug-on-error.
+	(Function Debugging): Update example.
+	(Using Debugger): Mention starred stack frames.
+	(Debugger Commands): Document `j' and `l'.
+	(Invoking the Debugger): `d' and `j' exit recursive edit too.
+	Update the messages that the debugger displays.
+	(Internals of Debugger): Add cross reference.  Update example.
+	(Excess Open): Minor improvement.
+	(Excess Close): Minor improvement.
+
 2005-02-26  Richard M. Stallman  <rms@gnu.org>
 
 	* tips.texi (Coding Conventions): Clarify.
--- a/lispref/debugging.texi	Mon Feb 28 15:15:44 2005 +0000
+++ b/lispref/debugging.texi	Sun Mar 06 13:31:20 2005 +0000
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1998, 1999
+@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1998, 1999, 2005
 @c   Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../info/debugging
@@ -14,7 +14,7 @@
 @item
 If the problem occurs when you run the program, you can use a Lisp
 debugger to investigate what is happening during execution.  In addition
-to the ordinary debugger, Emacs comes with a source level debugger,
+to the ordinary debugger, Emacs comes with a source-level debugger,
 Edebug.  This chapter describes both of them.
 
 @item
@@ -117,6 +117,15 @@
 @code{debug-ignored-errors} to @code{nil}.
 @end defopt
 
+@defopt eval-expression-debug-on-error
+If you set this variable to a non-@code{nil} value, then
+@code{debug-on-error} will be set to @code{t} when evaluating with the
+command @code{eval-expression}.  If
+@code{eval-expression-debug-on-error} is @code{nil}, then the value of
+@code{debug-on-error} is not changed.  @xref{Lisp Eval,, Evaluating
+Emacs-Lisp Expressions, emacs, The GNU Emacs Manual}.
+@end defopt
+
 @defopt debug-on-signal
 Normally, errors that are caught by @code{condition-case} never run the
 debugger, even if @code{debug-on-error} is non-@code{nil}.  In other
@@ -240,14 +249,12 @@
 
 @group
 ------ Buffer: *Backtrace* ------
-Entering:
+Debugger entered--entering a function:
 * fact(3)
-  eval-region(4870 4878 t)
-  byte-code("...")
+  eval((fact 3))
+  eval-last-sexp-1(nil)
   eval-last-sexp(nil)
-  (let ...)
-  eval-insert-last-sexp(nil)
-* call-interactively(eval-insert-last-sexp)
+  call-interactively(eval-last-sexp)
 ------ Buffer: *Backtrace* ------
 @end group
 
@@ -317,7 +324,9 @@
 place where the Lisp interpreter records information about a particular
 invocation of a function.)  The frame whose line point is on is
 considered the @dfn{current frame}.  Some of the debugger commands
-operate on the current frame.
+operate on the current frame.  If a line starts with a star, that means
+that exiting that frame will call the debugger again.  This is useful
+for examining the return value of a function.
 
   If a function name is underlined, that means the debugger knows
 where its source code is located.  You can click @kbd{Mouse-2} on that
@@ -328,8 +337,6 @@
 itself.  These assumptions are false if the debugger is running
 interpreted.
 
-@need 3000
-
 @node Debugger Commands
 @subsection Debugger Commands
 @cindex debugger command list
@@ -378,6 +385,11 @@
 cancels a @kbd{b} command on that frame.  The visible effect is to
 remove the star from the line in the backtrace buffer.
 
+@item j
+Flag the current frame like @kbd{b}.  Then continue execution like
+@kbd{c}, but temporarily disable break-on-entry for all functions that
+are set up to do so by @code{debug-on-entry}.
+
 @item e
 Read a Lisp expression in the minibuffer, evaluate it, and print the
 value in the echo area.  The debugger alters certain important
@@ -410,6 +422,13 @@
 effect as @kbd{c}, and the specified return value does not matter.
 
 You can't use @kbd{r} when the debugger was entered due to an error.
+
+@item l
+Display a list of functions that will invoke the debugger when called.
+This is a list of functions that are set to break on entry by means of
+@code{debug-on-entry}.  @strong{Warning:} if you redefine such a
+function and thus cancel the effect of @code{debug-on-entry}, it may
+erroneously show up in this list.
 @end table
 
 @node Invoking the Debugger
@@ -425,10 +444,10 @@
 about the stack of Lisp function calls.  It then enters a recursive
 edit, showing the backtrace buffer in Debugger mode.
 
-The Debugger mode @kbd{c} and @kbd{r} commands exit the recursive edit;
-then @code{debug} switches back to the previous buffer and returns to
-whatever called @code{debug}.  This is the only way the function
-@code{debug} can return to its caller.
+The Debugger mode @kbd{c}, @kbd{d}, @kbd{j}, and @kbd{r} commands exit
+the recursive edit; then @code{debug} switches back to the previous
+buffer and returns to whatever called @code{debug}.  This is the only
+way the function @code{debug} can return to its caller.
 
 The use of the @var{debugger-args} is that @code{debug} displays the
 rest of its arguments at the top of the @samp{*Backtrace*} buffer, so
@@ -443,41 +462,41 @@
 @table @code
 @item lambda
 @cindex @code{lambda} in debug
-A first argument of @code{lambda} means @code{debug} was called because
-of entry to a function when @code{debug-on-next-call} was
-non-@code{nil}.  The debugger displays @samp{Entering:} as a line of
-text at the top of the buffer.
+A first argument of @code{lambda} means @code{debug} was called
+because of entry to a function when @code{debug-on-next-call} was
+non-@code{nil}.  The debugger displays @samp{Debugger
+entered--entering a function:} as a line of text at the top of the
+buffer.
 
 @item debug
-@code{debug} as first argument indicates a call to @code{debug} because
-of entry to a function that was set to debug on entry.  The debugger
-displays @samp{Entering:}, just as in the @code{lambda} case.  It also
-marks the stack frame for that function so that it will invoke the
-debugger when exited.
+@code{debug} as first argument indicates a call to @code{debug}
+because of entry to a function that was set to debug on entry.  The
+debugger displays @samp{Debugger entered--entering a function:}, just
+as in the @code{lambda} case.  It also marks the stack frame for that
+function so that it will invoke the debugger when exited.
 
 @item t
 When the first argument is @code{t}, this indicates a call to
 @code{debug} due to evaluation of a list form when
-@code{debug-on-next-call} is non-@code{nil}.  The debugger displays the
-following as the top line in the buffer:
-
-@smallexample
-Beginning evaluation of function call form:
-@end smallexample
+@code{debug-on-next-call} is non-@code{nil}.  The debugger displays
+@samp{Debugger entered--beginning evaluation of function call form:}
+as the top line in the buffer.
 
 @item exit
-When the first argument is @code{exit}, it indicates the exit of a stack
-frame previously marked to invoke the debugger on exit.  The second
-argument given to @code{debug} in this case is the value being returned
-from the frame.  The debugger displays @samp{Return value:} in the top
-line of the buffer, followed by the value being returned.
+When the first argument is @code{exit}, it indicates the exit of a
+stack frame previously marked to invoke the debugger on exit.  The
+second argument given to @code{debug} in this case is the value being
+returned from the frame.  The debugger displays @samp{Debugger
+entered--returning value:} in the top line of the buffer, followed by
+the value being returned.
 
 @item error
 @cindex @code{error} in debug
 When the first argument is @code{error}, the debugger indicates that
-it is being entered because an error or @code{quit} was signaled and not
-handled, by displaying @samp{Signaling:} followed by the error signaled
-and any arguments to @code{signal}.  For example,
+it is being entered because an error or @code{quit} was signaled and
+not handled, by displaying @samp{Debugger entered--Lisp error:}
+followed by the error signaled and any arguments to @code{signal}.
+For example,
 
 @example
 @group
@@ -487,7 +506,7 @@
 
 @group
 ------ Buffer: *Backtrace* ------
-Signaling: (arith-error)
+Debugger entered--Lisp error: (arith-error)
   /(1 0)
 ...
 ------ Buffer: *Backtrace* ------
@@ -522,7 +541,7 @@
 
 The first argument that Lisp hands to the function indicates why it
 was called.  The convention for arguments is detailed in the description
-of @code{debug}.
+of @code{debug} (@pxref{Invoking the Debugger}).
 @end defvar
 
 @deffn Command backtrace
@@ -567,17 +586,14 @@
   (save-excursion ...)
   (let ...)
   (with-output-to-temp-buffer ...)
-  eval-region(1973 2142 #<buffer *scratch*>)
-  byte-code("...  for eval-print-last-sexp ...")
+  eval((with-output-to-temp-buffer ...))
+  eval-last-sexp-1(nil)
 @group
-  eval-print-last-sexp(nil)
-* call-interactively(eval-print-last-sexp)
+  eval-last-sexp(nil)
+  call-interactively(eval-last-sexp)
 ----------- Buffer: backtrace-output ------------
 @end group
 @end smallexample
-
-The character @samp{*} indicates a frame whose debug-on-exit flag is
-set.
 @end deffn
 
 @ignore @c Not worth mentioning
@@ -687,8 +703,8 @@
 
   The first step is to find the defun that is unbalanced.  If there is
 an excess open parenthesis, the way to do this is to go to the end of
-the file and type @kbd{C-u C-M-u}.  This will move you to the beginning
-of the defun that is unbalanced.
+the file and type @kbd{C-u C-M-u}.  This will move you to the
+beginning of the first defun that is unbalanced.
 
   The next step is to determine precisely what is wrong.  There is no
 way to be sure of this except by studying the program, but often the
@@ -719,9 +735,9 @@
 @node Excess Close
 @subsection Excess Close Parentheses
 
-  To deal with an excess close parenthesis, first go to the beginning of
-the file, then type @kbd{C-u -1 C-M-u} to find the end of the unbalanced
-defun.
+  To deal with an excess close parenthesis, first go to the beginning
+of the file, then type @kbd{C-u -1 C-M-u} to find the end of the first
+unbalanced defun.
 
   Then find the actual matching close parenthesis by typing @kbd{C-M-f}
 at the beginning of that defun.  This will leave you somewhere short of
--- a/lispref/edebug.texi	Mon Feb 28 15:15:44 2005 +0000
+++ b/lispref/edebug.texi	Sun Mar 06 13:31:20 2005 +0000
@@ -1,6 +1,6 @@
 @comment -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1992, 1993, 1994, 1998, 1999 Free Software Foundation, Inc.
+@c Copyright (C) 1992, 1993, 1994, 1998, 1999, 2005 Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 
 @c This file can also be used by an independent Edebug User
@@ -1082,7 +1082,7 @@
 (defmacro for (var from init to final do &rest body)
   "Execute a simple \"for\" loop.
 For example, (for i from 1 to 10 do (print i))."
-  (declare (edebug symbolp "from" form "to" form "do" &rest form))
+  (declare (debug symbolp "from" form "to" form "do" &rest form))
   ...)
 @end example
 
--- a/mac/ChangeLog	Mon Feb 28 15:15:44 2005 +0000
+++ b/mac/ChangeLog	Sun Mar 06 13:31:20 2005 +0000
@@ -1,3 +1,17 @@
+2005-03-05  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* INSTALL: Mention new target `NonCarbon'.
+	
+2005-03-04  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* makefile.MPW (NonCarbon): New target.  The target `Emacs' is now
+	used for the Carbon build that defines HAVE_CARBON.
+
+	* inc/config.h (HAVE_STDLIB_H): Define to 1.
+	
+	* src/EmacsMPW.r (SIZE): Increase preferred memory size to 32MB.
+	[HAVE_CARBON] (crfg): New resource for extra stack space.
+
 2004-12-24  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
 	* makefile.MPW: Add dependencies for fringe.c.x, image.c.x, and
--- a/mac/INSTALL	Mon Feb 28 15:15:44 2005 +0000
+++ b/mac/INSTALL	Sun Mar 06 13:31:20 2005 +0000
@@ -182,6 +182,12 @@
   make Emacs -f makefile.MPW > Emacs.MakeScript
   Emacs.MakeScript
 
+The above commands create an executable that uses the Carbon API.  The
+non-Carbon version can also be created by replacing all the
+occurrences of `Emacs' above with `NonCarbon'.  Not that the
+non-Carbon version does not support some features such as file
+dialogs, drag-and-drop, and unicode menus.
+
 To build Emacs using CodeWarrior, start up the CodeWarrior IDE, choose
 File->Import Project...  and select the file cw6-mcp.xml.  When
 prompted to save the project, navigate to same directory as the file
--- a/mac/inc/config.h	Mon Feb 28 15:15:44 2005 +0000
+++ b/mac/inc/config.h	Sun Mar 06 13:31:20 2005 +0000
@@ -184,7 +184,7 @@
 /* #undef HAVE_TERMIOS_H */
 #define HAVE_LIMITS_H 1
 #define HAVE_STRING_H 1
-/* #undef HAVE_STDLIB_H */
+#define HAVE_STDLIB_H 1
 /* #undef HAVE_TERMCAP_H */
 /* #undef HAVE_TERM_H */
 /* #undef HAVE_STDIO_EXT_H */
--- a/mac/makefile.MPW	Mon Feb 28 15:15:44 2005 +0000
+++ b/mac/makefile.MPW	Sun Mar 06 13:31:20 2005 +0000
@@ -21,7 +21,8 @@
 # Boston, MA 02111-1307, USA.  */
 #
 # Defines the following targets:
-#   Emacs (default) - normal Emacs build.
+#   Emacs (default) - normal Carbon Emacs build.
+#   NonCarbon - non-Carbon Emacs build.
 #   Clean - remove all object and executable files to prepare for a fresh build.
 #   Doc - generate the "DOC" file in ~emacs/etc/.
 #   Make-DocFile - build the make-docfile tool, utility for generating "DOC".
@@ -38,7 +39,9 @@
 Make-DocFileDir = {Lib-Src}			# directory containing make-docfile tool
 
 Makefile = makefile.MPW			# self reference
+NonCarbonMakeOut = NonCarbon.MakeOut	# temporary file for non-Carbon build script
 
+CarbonOption = -d HAVE_CARBON
 SymOption = # -sym on			# remove hash mark before "-sym on" to enable source debugging
 OptOption = # -opt speed			# alternatively set to -opt off or -opt size
 
@@ -47,7 +50,7 @@
 PPCCOptions = {SymOption} {OptOption} -noMapCR -enum int -alloca ¶
 	-typecheck relaxed -w off ¶
 	-includes unix -i {Includes},{Src} ¶
-	-d emacs=1 -d HAVE_CONFIG_H -d MAC_OS -d MAC_OS8
+	-d emacs=1 -d HAVE_CONFIG_H -d MAC_OS -d MAC_OS8 {CarbonOption}
 
 LinkOptions = {SymOption} -d
 
@@ -132,29 +135,42 @@
 	"{Src}macmenu.c.x" ¶
 	"{Src}macterm.c.x"
 
+StdLibraries = ¶
+	"{SharedLibraries}CarbonLib" ¶
+	"{SharedLibraries}StdCLib" ¶
+	"{PPCLibraries}StdCRuntime.o" ¶
+	"{PPCLibraries}PPCCRuntime.o"
+
+NonCarbonLibs = ¶
+	"{SharedLibraries}InterfaceLib" ¶
+	"{SharedLibraries}StdCLib" ¶
+	"{SharedLibraries}MathLib" ¶
+	"{SharedLibraries}AppleScriptLib" ¶
+	"{SharedLibraries}TextEncodingConverter" ¶
+	"{SharedLibraries}AppearanceLib" ¶
+	"{SharedLibraries}QuickTimeLib" ¶
+	"{PPCLibraries}StdCRuntime.o" ¶
+	"{PPCLibraries}PPCCRuntime.o" ¶
+	"{PPCLibraries}PPCToolLibs.o"
+
 # The next two are the dependency rules for building Emacs.
 
 Emacs ÄÄ {Makefile} {DocTarget}DOC {EmacsObjects} {MacObjects}
 	PPCLink ¶
 		{LinkOptions} ¶
 		{EmacsObjects} {MacObjects} ¶
-		"{SharedLibraries}InterfaceLib" ¶
-		"{SharedLibraries}StdCLib" ¶
-		"{SharedLibraries}MathLib" ¶
-		"{SharedLibraries}AppleScriptLib" ¶
-		"{SharedLibraries}TextEncodingConverter" ¶
-		"{SharedLibraries}AppearanceLib" ¶
-		"{SharedLibraries}QuickTimeLib" ¶
-		"{PPCLibraries}StdCRuntime.o" ¶
-		"{PPCLibraries}PPCCRuntime.o" ¶
-		"{PPCLibraries}PPCToolLibs.o" ¶
+		{StdLibraries} ¶
 		-o "{EmacsTarget}"
 
 Emacs ÄÄ {Makefile} "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
-	Rez -a "{Source}"Emacs.maclf.r -o "{EmacsTarget}"
-	Rez -a "{Source}"EmacsMPW.maclf.r -o "{EmacsTarget}"
+	Rez {CarbonOption} -a "{Source}"Emacs.maclf.r -o "{EmacsTarget}"
+	Rez {CarbonOption} -a "{Source}"EmacsMPW.maclf.r -o "{EmacsTarget}"
 	SetFile "{EmacsTarget}" -t APPL -c 'EMAx' -a B
 
+NonCarbon Ä
+	Make -f "{Makefile}" -d CarbonOption="" -d StdLibraries='{NonCarbonLibs}' > "{NonCarbonMakeOut}"
+	"{NonCarbonMakeOut}"
+
 # Rez cannot handle files with Unix style end lines at all.  So generate
 # them.  It does not hurt if Emacs.r and EmacsMPW.r already have Mac end
 # lines.
@@ -951,6 +967,7 @@
 	Delete -i stdout stderr
 	Delete -i {Make-DocFile-Objects} {Make-DocFileDir}make-docfile
 	Delete -i "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
+	Delete -i "{NonCarbonMakeOut}"
 
 DistClean Ä Clean
 	Delete -i "Emacs CW"Å
--- a/mac/src/EmacsMPW.r	Mon Feb 28 15:15:44 2005 +0000
+++ b/mac/src/EmacsMPW.r	Sun Mar 06 13:31:20 2005 +0000
@@ -42,6 +42,18 @@
 	reserved,
 	reserved,
 	reserved,
-	16777216,
+	33554432,
 	16777216
 };
+
+#ifdef HAVE_CARBON
+resource 'cfrg' (0) {
+    {
+	kPowerPCCFragArch, kIsCompleteCFrag, kNoVersionNum, kNoVersionNum,
+	311296, /* 48K (default) + 256K (EXTRA_STACK_ALLOC in macterm.c) */
+	kNoAppSubFolder,
+	kApplicationCFrag, kDataForkCFragLocator, kZeroOffset, kCFragGoesToEOF,
+	"",
+    }
+};
+#endif
--- a/man/ChangeLog	Mon Feb 28 15:15:44 2005 +0000
+++ b/man/ChangeLog	Sun Mar 06 13:31:20 2005 +0000
@@ -1,3 +1,37 @@
+2005-03-05  Thien-Thi Nguyen  <ttn@gnu.org>
+
+	* flymake.texi: Refill and tweak style in @lisp blocks.
+
+2005-03-05  Juri Linkov  <juri@jurta.org>
+
+	* cmdargs.texi (Emacs Invocation): Add cindex
+	"invocation (command line arguments)"
+	(Misc X): Add -nbc, --no-blinking-cursor.
+
+2005-03-04  Ulf Jasper  <ulf.jasper@web.de>
+
+	* calendar.texi (iCalendar): No need to require it now.
+
+2005-03-03  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* gnus.texi (Slow/Expensive Connection): Don't abbreviate "very".
+
+2005-03-03  Nick Roberts  <nickrob@snap.net.nz>
+
+	* trouble.texi (Contributing): Mention Savannah. Direct users to
+	emacs-devel.
+
+2005-03-01  Glenn Morris  <gmorris@ast.cam.ac.uk>
+
+	* calendar.texi (Adding to Diary): Mention redrawing of calendar
+	window.
+
+2005-03-01  Jay Belanger  <belanger@truman.edu>
+
+	* calc.texi (Trigonometric and Hyperbolic Functions):
+	Mention additional functions.
+	(Algebraic Simplifications): Mention additional simplifications.
+
 2005-02-27  Matt Hodges  <MPHodges@member.fsf.org>
 
 	* calendar.texi (General Calendar): Document binding of
--- a/man/calc.texi	Mon Feb 28 15:15:44 2005 +0000
+++ b/man/calc.texi	Sun Mar 06 13:31:20 2005 +0000
@@ -18473,6 +18473,25 @@
 vector as an argument and computes @code{arctan2} of the elements.
 (This command does not accept the Hyperbolic flag.)
 
+@pindex calc-sec
+@tindex sec
+@pindex calc-csc
+@tindex csc
+@pindex calc-cot
+@tindex cot
+@pindex calc-sech
+@tindex sech
+@pindex calc-csch
+@tindex csch
+@pindex calc-coth
+@tindex coth
+The remaining trigonometric functions, @code{calc-sec} [@code{sec}],
+@code{calc-csc} [@code{csc}] and @code{calc-sec} [@code{sec}], are also
+available.  With the Hyperbolic flag, these compute their hyperbolic
+counterparts, which are also available separately as @code{calc-sech}
+[@code{sech}], @code{calc-csch} [@code{csch}] and @code{calc-sech}
+[@code{sech}].  (These commmands do not accept the Inverse flag.)
+
 @node Advanced Math Functions, Branch Cuts, Trigonometric and Hyperbolic Functions, Scientific Functions
 @section Advanced Mathematical Functions
 
@@ -22730,18 +22749,27 @@
 \bigskip
 @end tex
 
-Trigonometric functions are simplified in several ways.  First,
-@expr{@tfn{sin}(@tfn{arcsin}(x))} is simplified to @expr{x}, and
-similarly for @code{cos} and @code{tan}.  If the argument to
-@code{sin} is negative-looking, it is simplified to 
-@expr{-@tfn{sin}(x),},  and similarly for @code{cos} and @code{tan}.
-Finally, certain special values of the argument are recognized;
-@pxref{Trigonometric and Hyperbolic Functions}.
-
+Trigonometric functions are simplified in several ways.  Whenever a
+products of two trigonometric functions can be replaced by a single
+function, the replacement is made; for example,
+@expr{@tfn{tan}(x) @tfn{cos}(x)} is simplified to @expr{@tfn{sin}(x)}. 
+Reciprocals of trigonometric functions are replaced by their reciprocal
+function; for example, @expr{1/@tfn{sec}(x)} is simplified to
+@expr{@tfn{cos}(x)}.  The corresponding simplifications for the
+hyperbolic functions are also handled.
+
+Trigonometric functions of their inverse functions are
+simplified. The expression @expr{@tfn{sin}(@tfn{arcsin}(x))} is
+simplified to @expr{x}, and similarly for @code{cos} and @code{tan}.  
 Trigonometric functions of inverses of different trigonometric
 functions can also be simplified, as in @expr{@tfn{sin}(@tfn{arccos}(x))}
 to @expr{@tfn{sqrt}(1 - x^2)}.
 
+If the argument to @code{sin} is negative-looking, it is simplified to
+@expr{-@tfn{sin}(x)}, and similarly for @code{cos} and @code{tan}.
+Finally, certain special values of the argument are recognized;
+@pxref{Trigonometric and Hyperbolic Functions}.
+
 Hyperbolic functions of their inverses and of negative-looking
 arguments are also handled, as are exponentials of inverse
 hyperbolic functions.
--- a/man/calendar.texi	Mon Feb 28 15:15:44 2005 +0000
+++ b/man/calendar.texi	Sun Mar 06 13:31:20 2005 +0000
@@ -1206,7 +1206,10 @@
 For example, @kbd{C-u i w} makes a nonmarking weekly diary entry.
 
   When you modify the diary file, be sure to save the file before
-exiting Emacs.
+exiting Emacs.  Saving the diary file after using any of the above
+insertion commands will automatically update the diary marks in the
+calendar window, if appropriate.  You can use the command
+@code{redraw-calendar} to force an update at any time.
 
 @node Special Diary Entries
 @subsection Special Diary Entries
@@ -1403,8 +1406,6 @@
 most diary entries.  Please note that @file{icalendar.el} is work in
 progress, so usage may evolve in future.
 
-  To activate the package, use @code{(require 'icalendar)}.
-
 @findex icalendar-import-buffer
   The command @code{icalendar-import-buffer} extracts
 iCalendar data from the current buffer and adds it to your (default)
--- a/man/cmdargs.texi	Mon Feb 28 15:15:44 2005 +0000
+++ b/man/cmdargs.texi	Sun Mar 06 13:31:20 2005 +0000
@@ -9,6 +9,7 @@
 @cindex options (command line)
 @cindex switches (command line)
 @cindex startup (command line arguments)
+@cindex invocation (command line arguments)
 
   GNU Emacs supports command line arguments to request various actions
 when invoking Emacs.  These are for compatibility with other editors and
@@ -1211,6 +1212,13 @@
 @opindex --line-spacing
 @cindex line spacing, command-line argument
 Specify @var{pixels} as additional space to put between lines, in pixels.
+
+@item -nbc
+@opindex -nbc
+@itemx --no-blinking-cursor
+@opindex --no-blinking-cursor
+@cindex blinking cursor disable, command-line argument
+Disable the blinking cursor on graphical terminals.
 @end table
 
   The @samp{--xrm} option (@pxref{Resources}) specifies additional
--- a/man/flymake.texi	Mon Feb 28 15:15:44 2005 +0000
+++ b/man/flymake.texi	Sun Mar 06 13:31:20 2005 +0000
@@ -419,19 +419,16 @@
 First, we write the @code{init-function}:
 
 @lisp
-(defun flymake-perl-init(buffer)
-    (let* ((temp-file   (flymake-init-create-temp-buffer-copy
-			     buffer
-			     'flymake-create-temp-inplace))
-		   (local-file  (concat (flymake-build-relative-path
-				  (file-name-directory
-				    (buffer-file-name
-				      (current-buffer)))
-							      (file-name-directory temp-file))
-								(file-name-nondirectory temp-file))))
-	(list "perl" (list "-wc " local-file))
-	)
-)
+(defun flymake-perl-init (buffer)
+  (let* ((temp-file (flymake-init-create-temp-buffer-copy
+                     buffer 'flymake-create-temp-inplace))
+         (local-file  (concat (flymake-build-relative-path
+                               (file-name-directory
+                                (buffer-file-name
+                                 (current-buffer)))
+                               (file-name-directory temp-file))
+                              (file-name-nondirectory temp-file))))
+    (list "perl" (list "-wc " local-file))))
 @end lisp
 
 @code{flymake-perl-init} creates a temporary copy of the buffer
@@ -444,11 +441,11 @@
 
 @lisp
 (setq flymake-allowed-file-name-masks
-	  (cons '(".+\\.pl$"
-	  flymake-perl-init
-	  flymake-simple-cleanup
-	  flymake-get-real-file-name)
-	flymake-allowed-file-name-masks))
+      (cons '(".+\\.pl$"
+              flymake-perl-init
+              flymake-simple-cleanup
+              flymake-get-real-file-name)
+            flymake-allowed-file-name-masks))
 @end lisp
 
 Note that we use standard @code{cleanup-function} and
@@ -458,8 +455,9 @@
 
 @lisp
 (setq flymake-err-line-patterns
-	  (cons '("\\(.*\\) at \\([^ \n]+\\) line \\([0-9]+\\)[,.\n]" 2 3 nil 1)
-			flymake-err-line-patterns))
+      (cons '("\\(.*\\) at \\([^ \n]+\\) line \\([0-9]+\\)[,.\n]"
+              2 3 nil 1)
+            flymake-err-line-patterns))
 @end lisp
 
 @node Example -- Configuring a tool called via make
@@ -475,11 +473,11 @@
 
 @lisp
 (setq flymake-allowed-file-name-masks
-	  (cons '(".+\\.c$"
-	    flymake-simple-make-init
-	    flymake-simple-cleanup
-	    flymake-get-real-file-name)
-      flymake-allowed-file-name-masks))
+      (cons '(".+\\.c$"
+              flymake-simple-make-init
+              flymake-simple-cleanup
+              flymake-get-real-file-name)
+            flymake-allowed-file-name-masks))
 @end lisp
 
 @code{flymake-simple-make-init} builds the following @code{make}
@@ -487,12 +485,11 @@
 
 @lisp
 (list "make"
-    (list "-s"
-		  "-C"
-		   base-dir
-		  (concat "CHK_SOURCES=" source)
-		  "SYNTAX_CHECK_MODE=1"
-		  "check-syntax"))
+      (list "-s" "-C"
+            base-dir
+            (concat "CHK_SOURCES=" source)
+            "SYNTAX_CHECK_MODE=1"
+            "check-syntax"))
 @end lisp
 
 @code{base-dir} is a directory containing @code{Makefile}, see @ref{Locating the buildfile}.
@@ -748,12 +745,11 @@
 @code{flymake-compile}:
 
 @lisp
-(defun flymake-compile()
-    "kill all flymake syntax checks, start compilation"
-    (interactive)
-    (flymake-stop-all-syntax-checks)
-    (call-interactively 'compile)
-)
+(defun flymake-compile ()
+  "Kill all flymake syntax checks then start compilation."
+  (interactive)
+  (flymake-stop-all-syntax-checks)
+  (call-interactively 'compile))
 @end lisp
 
 It just kills all the active syntax check processes before calling
--- a/man/gnus.texi	Mon Feb 28 15:15:44 2005 +0000
+++ b/man/gnus.texi	Sun Mar 06 13:31:20 2005 +0000
@@ -26688,7 +26688,7 @@
 
 @item gnus-read-active-file
 Set this to @code{nil}, which will inhibit Gnus from requesting the
-entire active file from the server.  This file is often v.  large.  You
+entire active file from the server.  This file is often very large.  You
 also have to set @code{gnus-check-new-newsgroups} and
 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
 doesn't suddenly decide to fetch the active file anyway.
--- a/man/trouble.texi	Mon Feb 28 15:15:44 2005 +0000
+++ b/man/trouble.texi	Sun Mar 06 13:31:20 2005 +0000
@@ -1037,17 +1037,22 @@
 
 If you would like to help pretest Emacs releases to assure they work
 well, or if you would like to work on improving Emacs, please contact
-the maintainers at @email{bug-gnu-emacs@@gnu.org}.  A pretester
+the maintainers at @email{emacs-devel@@gnu.org}.  A pretester
 should be prepared to investigate bugs as well as report them.  If you'd
 like to work on improving Emacs, please ask for suggested projects or
 suggest your own ideas.
 
 If you have already written an improvement, please tell us about it.  If
 you have not yet started work, it is useful to contact
-@email{bug-gnu-emacs@@gnu.org} before you start; it might be
+@email{emacs-devel@@gnu.org} before you start; it might be
 possible to suggest ways to make your extension fit in better with the
 rest of Emacs.
 
+The development version of Emacs can be downloaded from the CVS
+repository where it is actively maintained by a group of developers.
+See the Emacs project page http://savannah.gnu.org/projects/emacs/ for
+details.
+
 @node Service, Copying, Contributing, Top
 @section How To Get Help with GNU Emacs
 
--- a/src/ChangeLog	Mon Feb 28 15:15:44 2005 +0000
+++ b/src/ChangeLog	Sun Mar 06 13:31:20 2005 +0000
@@ -1,6 +1,115 @@
+2005-03-05  Juri Linkov  <juri@jurta.org>
+
+	* emacs.c (USAGE1): Replace Info node name "command arguments"
+	with "emacs invocation".
+	(USAGE3): Fix usage of `--color=MODE' which actually doesn't
+	allow arguments `--color' and `MODE' to be separated by space.
+	Add --no-blinking-cursor, -nbc.
+	(standard_args): Add -nbc, --no-blinking-cursor.
+
+2005-03-04  Thien-Thi Nguyen  <ttn@gnu.org>
+
+	* s/vms.h: Define NO_HYPHENS_IN_FILENAMES.
+	* s/vms4-4.h, s/vms5-5.h: Undefine NO_HYPHENS_IN_FILENAMES.
+	* fileio.c (Fexpand_file_name) [VMS]:
+	Use NO_HYPHENS_IN_FILENAMES, not VMS4_4.
+	* doc.c (munge_doc_file_name) [VMS]: Likewise.
+	(Fsnarf_documentation): Call munge_doc_file_name.
+
+2005-03-04  Thien-Thi Nguyen  <ttn@gnu.org>
+
+	* s/vms.h (FILE_SYSTEM_CASE): New macro.
+	* fileio.c (Fexpand_file_name) [VMS]: Don't upcase the name
+	"manually"; this is now handled generally via FILE_SYSTEM_CASE.
+
+2005-03-04  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* emacs.c (main): Change `#ifdef HAVE_CARBON' to `#if
+	defined (MAC_OSX) && defined (HAVE_CARBON)'.
+
+	* image.c [!MAC_OSX && TARGET_API_MAC_CARBON]: Include
+	QuickTime.h.
+
+	* mac.c [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
+	[!MAC_OSX] (select) [TARGET_API_MAC_CARBON]: Use ReceiveNextEvent.
+	(posix_pathname_to_fsspec, fsspec_to_posix_pathname): New
+	functions.
+	(mac_clear_font_name_table): Move extern to macterm.h.
+
+	* macfns.c (install_window_handler): Move extern to macterm.h.
+	(Fx_file_dialog): Check STRINGP (default_filename) to see it is
+	valid.  Don't check !NILP (dir) because it is already checked with
+	CHECK_STRING.
+	(Fx_file_dialog) [!MAC_OSX]: Use FSSpec instead of FSRef for
+	specifying the default location and obtaining the selected
+	filename.
+
+	* macgui.h [!MAC_OSX && HAVE_CARBON]: Include Carbon.h.
+
+	* macmenu.c [TARGET_API_MAC_CARBON]: Don't include headers that
+	are included via Carbon.h.
+
+	* macterm.c [TARGET_API_MAC_CARBON && !MAC_OSX]: Define
+	USE_CARBON_EVENTS to 1.
+	(qd) [__MRC__ && TARGET_API_MAC_CARBON]: Don't declare.
+	(x_free_frame_resources): Call remove_window_handler for
+	non-tooltip windows.
+	[TARGET_API_MAC_CARBON]: Don't include headers that are included
+	via Carbon.h.
+	[TARGET_API_MAC_CARBON] (mac_do_track_dragUPP)
+	(mac_do_receive_dragUPP): New variables.
+	(mac_handle_service_event, init_service_handler): Put declarations
+	and definitions in #ifdef MAC_OSX.
+	(install_window_handler) [TARGET_API_MAC_CARBON]: Create UPPs for
+	drag-and-drop handler functions and register them.
+	(remove_window_handler): New function.
+	(do_ae_open_documents, mac_do_receive_drag) [!MAC_OSX]: Use
+	fsspec_to_posix_pathname.
+	(main): Change #if !TARGET_API_MAC_CARBON to #ifdef MAC_OS8.
+	(XTread_socket) [!MAC_OSX]: Don't pass keyboard events to TSM.
+	[MAC_OS8] (make_mac_terminal_frame) [TARGET_API_MAC_CARBON]: Set
+	default cursors.
+	(mac_initialize) [USE_CARBON_EVENTS && !MAC_OSX] : Don't call
+	init_service_handler or init_quit_char_handler.
+	(mac_initialize) [!MAC_OSX]: Don't call MakeMeTheFrontProcess.
+
+	* macterm.h (install_window_handler, remove_window_handler)
+	(posix_pathname_to_fsspec, fsspec_to_posix_pathname)
+	(mac_clear_font_name_table): New externs.
+
+2005-03-03  Thien-Thi Nguyen  <ttn@gnu.org>
+
+	* fileio.c (FILE_SYSTEM_CASE): Define macro if not already defined.
+	(Ffile_name_directory): Use FILE_SYSTEM_CASE unconditionally.
+	(Fexpand_file_name): Likewise.
+
+2005-03-03  Thien-Thi Nguyen  <ttn@gnu.org>
+
+	* emacs.c (Fkill_emacs): Use EXIT_SUCCESS;
+	no longer special-case VMS.  Add bogus return value.
+
+2005-03-02  Kim F. Storm  <storm@cua.dk>
+
+	* dispextern.h (XASSERTS): Define to 0 if not already defined.
+	(xassert) [!XASSERTS]: Define dummy version.
+
+2005-03-02  Kim F. Storm  <storm@cua.dk>
+
+	* xdisp.c (redisplay_window): YABX (yet another bogus xassert).
+	Reported by David Kastrup.
+
+2005-03-01  Ehud Karni  <ehud@unix.mvs.co.il>
+
+	* xdisp.c (get_next_display_element): Fix control and escape
+	glyph from display vector.
+
+2005-03-01  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* keyboard.c (Fposn_at_x_y): Check integerness of X and Y.
+
 2005-02-27  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
 
-	* gtkutil.c (xg_resize_outer_widget): Removed unneeded call to
+	* gtkutil.c (xg_resize_outer_widget): Remove unneeded call to
 	gtk_window_resize and x_wm_set_size_hint.
 
 2005-02-25  Kim F. Storm  <storm@cua.dk>
@@ -30,7 +139,7 @@
 	* window.c (window_scroll_pixel_based): When scrolling backwards,
 	handle partial visible line at end of window even when we hit PT.
 
-2005-02-21  Stefan  <monnier@iro.umontreal.ca>
+2005-02-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* keymap.h: Declare Fcurrent_active_maps, used in doc.c.
 
@@ -88,8 +197,7 @@
 	(Fx_window_property): Likewise.
 
 	* xselect.c (Fx_disown_selection_internal): Use union of struct
-	input_event and struct selection_input_event to avoid aliasing
-	issues.
+	input_event and struct selection_input_event to avoid aliasing issues.
 
 	* xterm.c (handle_one_xevent): Use union of struct input_event and
 	struct selection_input_event to avoid aliasing issues.
@@ -118,21 +226,20 @@
 	clipboard operations and delayed rendering.
 
 	Drop last_clipboard_text and related code, keep track of
-	ownership via clipboard_owner instead.  Drop old #if0
-	sections.
+	ownership via clipboard_owner instead.  Drop old #if0 sections.
 
 	(DEFAULT_LCID, ANSICP, OEMCP, QUNICODE, QANSICP, QOEMCP)
 	(clipboard_owner, modifying_clipboard, cfg_coding_system)
 	(cfg_codepage, cfg_lcid, cfg_clipboard_type, current_text)
 	(current_coding_system, current_requires_encoding)
-	(current_num_nls, current_clipboard_type, current_lcid): New
-	static variables.
+	(current_num_nls, current_clipboard_type, current_lcid):
+	New static variables.
 
 	(convert_to_handle_as_ascii, convert_to_handle_as_coded)
 	(render, render_all, run_protected, lisp_error_handler)
 	(owner_callback, create_owner, setup_config)
-	(enum_locale_callback, cp_from_locale, coding_from_cp): New
-	local functions.
+	(enum_locale_callback, cp_from_locale, coding_from_cp):
+	New local functions.
 
 	(term_w32select, globals_of_w32select): New global functions.
 
@@ -332,8 +439,7 @@
 	(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.
+	* insdel.c (replace_range_2): Fix bugs in adjusting markers and point.
 
 2005-02-01  Kim F. Storm  <storm@cua.dk>
 
@@ -761,7 +867,7 @@
 	[TARGET_API_MAC_CARBON] (mac_do_track_drag): Likewise.
 	Reject only when there are no filename items.  Set background color
 	before (un)highlighting the window below the dragged items.
-	(XTread_socket) [!USE_CARBON_EVENTS]: Don't call do_window_update.
+	(XTread_socket) [USE_CARBON_EVENTS]: Don't call do_window_update.
 
 2005-01-05  Romain Francoise  <romain@orebokech.com>
 
@@ -11015,9 +11121,9 @@
 	These changes were in part based upon suggestions made by Peter
 	'Luna' Runestig [peter@runestig.com].
 
-	* w32.c (g_b_init_is_windows_9x, g_b_init_open_process_token,
-	g_b_init_get_token_information, g_b_init_lookup_account_sid,
-	g_b_init_get_sid_identifier_authority ): Add several static
+	* w32.c (g_b_init_is_windows_9x, g_b_init_open_process_token)
+	(g_b_init_get_token_information, g_b_init_lookup_account_sid)
+	(g_b_init_get_sid_identifier_authority ): Add several static
 	global variables.
 
 	* w32.c (globals_of_w32): New function.  Used to initialize those
--- a/src/dispextern.h	Mon Feb 28 15:15:44 2005 +0000
+++ b/src/dispextern.h	Sun Mar 06 13:31:20 2005 +0000
@@ -119,6 +119,13 @@
 #define GLYPH_DEBUG 0
 #endif
 
+/* If XASSERTS is non-zero, additional consistency checks are activated.
+   Turn it off by defining the macro XASSERTS to zero.  */
+
+#ifndef XASSERTS
+#define XASSERTS 0
+#endif
+
 /* Macros to include code only if GLYPH_DEBUG != 0.  */
 
 #if GLYPH_DEBUG
@@ -127,8 +134,11 @@
 #define IF_DEBUG(X)	(void) 0
 #endif
 
-/* Maybe move this inside the above `#ifdef GLYPH_DEBUG' for release.  */
+#if XASSERTS
 #define xassert(X)	do {if (!(X)) abort ();} while (0)
+#else
+#define xassert(X)	(void) 0
+#endif
 
 /* Macro for displaying traces of redisplay.  If Emacs was compiled
    with GLYPH_DEBUG != 0, the variable trace_redisplay_p can be set to
--- a/src/doc.c	Mon Feb 28 15:15:44 2005 +0000
+++ b/src/doc.c	Sun Mar 06 13:31:20 2005 +0000
@@ -58,26 +58,24 @@
 extern Lisp_Object Voverriding_local_map;
 
 /* For VMS versions with limited file name syntax,
-   convert the name to something VMS will allow. */
+   convert the name to something VMS will allow.  */
 static void
 munge_doc_file_name (name)
      char *name;
 {
 #ifdef VMS
-#ifndef VMS4_4
-  /* For VMS versions with limited file name syntax,
-     convert the name to something VMS will allow.  */
-  p = name;
+#ifndef NO_HYPHENS_IN_FILENAMES
+  extern char * sys_translate_unix (char *ufile);
+  strcpy (name, sys_translate_unix (name));
+#else /* NO_HYPHENS_IN_FILENAMES */
+  char *p = name;
   while (*p)
     {
       if (*p == '-')
 	*p = '_';
       p++;
     }
-#endif /* not VMS4_4 */
-#ifdef VMS4_4
-  strcpy (name, sys_translate_unix (name));
-#endif /* VMS4_4 */
+#endif /* NO_HYPHENS_IN_FILENAMES */
 #endif /* VMS */
 }
 
@@ -607,21 +605,7 @@
       strcpy (name, SDATA (Vdoc_directory));
     }
   strcat (name, SDATA (filename)); 	/*** Add this line ***/
-#ifdef VMS
-#ifndef VMS4_4
-  /* For VMS versions with limited file name syntax,
-     convert the name to something VMS will allow.  */
-  p = name;
-  while (*p)
-    {
-      if (*p == '-')
-	*p = '_';
-      p++;
-    }
-#else /* VMS4_4 */
-  strcpy (name, sys_translate_unix (name));
-#endif /* VMS4_4 */
-#endif /* VMS */
+  munge_doc_file_name (name);
 
   /* Vbuild_files is nil when temacs is run, and non-nil after that.  */
   if (NILP (Vbuild_files))
--- a/src/emacs.c	Mon Feb 28 15:15:44 2005 +0000
+++ b/src/emacs.c	Sun Mar 06 13:31:20 2005 +0000
@@ -251,7 +251,7 @@
 display editor.  The recommended way to start Emacs for normal editing\n\
 is with no options at all.\n\
 \n\
-Run M-x info RET m emacs RET m command arguments RET inside Emacs to\n\
+Run M-x info RET m emacs RET m emacs invocation RET inside Emacs to\n\
 read the main documentation for these command-line arguments.\n\
 \n\
 Initialization options:\n\
@@ -297,7 +297,7 @@
 --background-color, -bg COLOR   window background color\n\
 --border-color, -bd COLOR       main border color\n\
 --border-width, -bw WIDTH       width of main border\n\
---color MODE                    color mode for character terminals;\n\
+--color, --color=MODE           color mode for character terminals;\n\
                                   MODE defaults to `auto', and can also\n\
                                   be `never', `auto', `always',\n\
                                   or a mode name like `ansi8'\n\
@@ -314,6 +314,7 @@
 --line-spacing, -lsp PIXELS     additional space to put between lines\n\
 --mouse-color, -ms COLOR        mouse cursor color in Emacs window\n\
 --name NAME                     title for initial Emacs frame\n\
+--no-blinking-cursor, -nbc      disable blinking cursor\n\
 --reverse-video, -r, -rv        switch foreground and background\n\
 --title, -T TITLE               title for initial Emacs frame\n\
 --vertical-scroll-bars, -vb     enable vertical scroll bars\n\
@@ -1483,7 +1484,7 @@
   init_ntproc ();	/* must precede init_editfns.  */
 #endif
 
-#ifdef HAVE_CARBON
+#if defined (MAC_OSX) && defined (HAVE_CARBON)
   if (initialized)
     init_mac_osx_environment ();
 #endif
@@ -1627,12 +1628,12 @@
       syms_of_fontset ();
 #endif /* HAVE_NTGUI */
 
-#ifdef HAVE_CARBON
+#if defined (MAC_OSX) && defined (HAVE_CARBON)
       syms_of_macterm ();
       syms_of_macfns ();
       syms_of_macmenu ();
       syms_of_fontset ();
-#endif /* HAVE_CARBON */
+#endif /* MAC_OSX && HAVE_CARBON */
 
 #ifdef SYMS_SYSTEM
       SYMS_SYSTEM;
@@ -1824,6 +1825,7 @@
   { "-ib", "--internal-border", 10, 1 },
   { "-ms", "--mouse-color", 10, 1 },
   { "-cr", "--cursor-color", 10, 1 },
+  { "-nbc", "--no-blinking-cursor", 10, 0 },
   { "-fn", "--font", 10, 1 },
   { "-font", 0, 10, 1 },
   { "-fs", "--fullscreen", 10, 0 },
@@ -2052,14 +2054,9 @@
   if (STRINGP (Vauto_save_list_file_name))
     unlink (SDATA (Vauto_save_list_file_name));
 
-  exit (INTEGERP (arg) ? XINT (arg)
-#ifdef VMS
-	: 1
-#else
-	: 0
-#endif
-	);
+  exit (INTEGERP (arg) ? XINT (arg) : EXIT_SUCCESS);
   /* NOTREACHED */
+  return 0;
 }
 
 
--- a/src/fileio.c	Mon Feb 28 15:15:44 2005 +0000
+++ b/src/fileio.c	Sun Mar 06 13:31:20 2005 +0000
@@ -150,6 +150,10 @@
 #  define lstat stat
 #endif
 
+#ifndef FILE_SYSTEM_CASE
+#define FILE_SYSTEM_CASE(filename)  (filename)
+#endif
+
 /* Nonzero during writing of auto-save files */
 int auto_saving;
 
@@ -415,9 +419,7 @@
   if (!NILP (handler))
     return call2 (handler, Qfile_name_directory, filename);
 
-#ifdef FILE_SYSTEM_CASE
   filename = FILE_SYSTEM_CASE (filename);
-#endif
   beg = SDATA (filename);
 #ifdef DOS_NT
   beg = strcpy (alloca (strlen (beg) + 1), beg);
@@ -1122,14 +1124,7 @@
       UNGCPRO;
     }
 
-#ifdef VMS
-  /* Filenames on VMS are always upper case.  */
-  name = Fupcase (name);
-#endif
-#ifdef FILE_SYSTEM_CASE
   name = FILE_SYSTEM_CASE (name);
-#endif
-
   nm = SDATA (name);
 
 #ifdef DOS_NT
@@ -1229,23 +1224,23 @@
 	    slash = p;
 	  }
 	  if (p[0] == '-')
-#ifndef VMS4_4
-	    /* VMS pre V4.4,convert '-'s in filenames. */
+#ifdef NO_HYPHENS_IN_FILENAMES
 	    if (lbrack == rbrack)
 	      {
-		if (dots < 2)   /* this is to allow negative version numbers */
+                /* Avoid clobbering negative version numbers.  */
+                if (dots < 2)
 		  p[0] = '_';
 	      }
 	    else
-#endif /* VMS4_4 */
+#endif /* NO_HYPHENS_IN_FILENAMES */
 	      if (lbrack > rbrack &&
 		  ((p[-1] == '.' || p[-1] == '[' || p[-1] == '<') &&
 		   (p[1] == '.' || p[1] == ']' || p[1] == '>')))
 		lose = 1;
-#ifndef VMS4_4
+#ifdef NO_HYPHENS_IN_FILENAMES
 	      else
 		p[0] = '_';
-#endif /* VMS4_4 */
+#endif /* NO_HYPHENS_IN_FILENAMES */
 	  /* count open brackets, reset close bracket pointer */
 	  if (p[0] == '[' || p[0] == '<')
 	    lbrack++, brack = 0;
@@ -1625,12 +1620,12 @@
 	}
       else
 	{
-#ifndef VMS4_4
+#ifdef NO_HYPHENS_IN_FILENAMES
 	  if (*p == '-' &&
 	      o[-1] != '[' && o[-1] != '<' && o[-1] != '.' &&
 	      p[1] != ']' && p[1] != '>' && p[1] != '.')
 	    *p = '_';
-#endif /* VMS4_4 */
+#endif /* NO_HYPHENS_IN_FILENAMES */
 	  *o++ = *p++;
 	}
 #else /* not VMS */
@@ -6387,7 +6382,7 @@
     {
        Lisp_Object val1 = double_dollars (val);
        tem = Fsymbol_value (Qfile_name_history);
-       if (history_delete_duplicates) 
+       if (history_delete_duplicates)
 	 XSETCDR (tem, Fdelete (val1, XCDR(tem)));
        XSETCAR (tem, val1);
     }
--- a/src/image.c	Mon Feb 28 15:15:44 2005 +0000
+++ b/src/image.c	Sun Mar 06 13:31:20 2005 +0000
@@ -88,15 +88,19 @@
 #include <alloca.h>
 #include <sys/param.h>
 #endif
+#if TARGET_API_MAC_CARBON
 #ifdef MAC_OSX
 #include <QuickTime/QuickTime.h>
-#else /* not MAC_OSX */
+#else  /* not MAC_OSX */
+#include <QuickTime.h>
+#endif	/* not MAC_OSX */
+#else  /* not TARGET_API_MAC_CARBON */
 #include <Windows.h>
 #include <Gestalt.h>
 #include <TextUtils.h>
 #include <ImageCompression.h>
 #include <QuickTimeComponents.h>
-#endif /* not MAC_OSX */
+#endif	/* not TARGET_API_MAC_CARBON */
 
 /* MAC_TODO : Color tables on Mac.  */
 #undef COLOR_TABLE_SUPPORT
--- a/src/keyboard.c	Mon Feb 28 15:15:44 2005 +0000
+++ b/src/keyboard.c	Sun Mar 06 13:31:20 2005 +0000
@@ -1,6 +1,6 @@
 /* Keyboard and mouse input; editor command loop.
-   Copyright (C) 1985,86,87,88,89,93,94,95,96,97,99,2000,01,02,03,04
-     Free Software Foundation, Inc.
+   Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 1995, 1996, 1997,
+     1999, 2000, 2001, 2002, 2003, 2004, 2005  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -10660,6 +10660,9 @@
   (x, y, frame_or_window, whole)
      Lisp_Object x, y, frame_or_window, whole;
 {
+  CHECK_NATNUM (x);
+  CHECK_NATNUM (y);
+
   if (NILP (frame_or_window))
     frame_or_window = selected_window;
 
--- a/src/mac.c	Mon Feb 28 15:15:44 2005 +0000
+++ b/src/mac.c	Sun Mar 06 13:31:20 2005 +0000
@@ -25,20 +25,8 @@
 #include <stdio.h>
 #include <errno.h>
 #include <time.h>
-#include <utime.h>
-#include <dirent.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <string.h>
-#include <pwd.h>
-#include <grp.h>
-#include <sys/param.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#if __MWERKS__
-#include <unistd.h>
-#endif
-
+
+#ifdef HAVE_CARBON
 #ifdef MAC_OSX
 #undef mktime
 #undef DEBUG
@@ -57,7 +45,12 @@
 #define realloc unexec_realloc
 #undef init_process
 #define init_process emacs_init_process
-#else /* not MAC_OSX */
+#else  /* not MAC_OSX */
+#undef SIGHUP
+#define OLDP2C 1
+#include <Carbon.h>
+#endif	/* not MAC_OSX */
+#else	/* not HAVE_CARBON */
 #include <Files.h>
 #include <MacTypes.h>
 #include <TextUtils.h>
@@ -69,7 +62,24 @@
 #include <OSA.h>
 #include <AppleScript.h>
 #include <Scrap.h>
-#endif /* not MAC_OSX */
+#include <Events.h>
+#include <Processes.h>
+#include <EPPC.h>
+#endif	/* not HAVE_CARBON */
+
+#include <utime.h>
+#include <dirent.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <string.h>
+#include <pwd.h>
+#include <grp.h>
+#include <sys/param.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#if __MWERKS__
+#include <unistd.h>
+#endif
 
 #include "lisp.h"
 #include "process.h"
@@ -812,8 +822,6 @@
 }
 
 
-#include <Events.h>
-
 long target_ticks = 0;
 
 #ifdef __MRC__
@@ -856,7 +864,24 @@
   struct timeval *timeout;
 {
 #if TARGET_API_MAC_CARBON
-  return 1;
+  OSErr err;
+  EventTimeout timeout_sec =
+    (timeout
+     ? (EMACS_SECS (*timeout) * kEventDurationSecond
+	+ EMACS_USECS (*timeout) * kEventDurationMicrosecond)
+     : kEventDurationForever);
+
+  if (FD_ISSET (0, rfds))
+    {
+      BLOCK_INPUT;
+      err = ReceiveNextEvent (0, NULL, timeout_sec, kEventLeaveInQueue, NULL);
+      UNBLOCK_INPUT;
+      if (err == noErr)
+	return 1;
+      else
+	FD_ZERO (rfds);
+    }
+  return 0;
 #else /* not TARGET_API_MAC_CARBON */
   EventRecord e;
   UInt32 sleep_time = EMACS_SECS (*timeout) * 60 +
@@ -1421,6 +1446,39 @@
   return 1;  /* success */
 }
 
+
+OSErr
+posix_pathname_to_fsspec (ufn, fs)
+     const char *ufn;
+     FSSpec *fs;
+{
+  Str255 mac_pathname;
+
+  if (posix_to_mac_pathname (ufn, mac_pathname, sizeof (mac_pathname)) == 0)
+    return fnfErr;
+  else
+    {
+      c2pstr (mac_pathname);
+      return FSMakeFSSpec (0, 0, mac_pathname, fs);
+    }
+}
+
+OSErr
+fsspec_to_posix_pathname (fs, ufn, ufnbuflen)
+     const FSSpec *fs;
+     char *ufn;
+     int ufnbuflen;
+{
+  char mac_pathname[MAXPATHLEN];
+
+  if (path_from_vol_dir_name (mac_pathname, sizeof (mac_pathname) - 1,
+			      fs->vRefNum, fs->parID, fs->name)
+      && mac_to_posix_pathname (mac_pathname, ufn, ufnbuflen))
+    return noErr;
+  else
+    return fnfErr;
+}
+
 #ifndef MAC_OSX
 
 int
@@ -1899,9 +1957,6 @@
 }
 
 
-#include <Processes.h>
-#include <EPPC.h>
-
 /* Event class of HLE sent to subprocess.  */
 const OSType kEmacsSubprocessSend = 'ESND';
 
@@ -2770,7 +2825,6 @@
   return Qnil;
 }
 
-extern void mac_clear_font_name_table P_ ((void));
 
 DEFUN ("mac-clear-font-name-table", Fmac_clear_font_name_table, Smac_clear_font_name_table, 0, 0, 0,
        doc: /* Clear the font name table.  */)
--- a/src/macfns.c	Mon Feb 28 15:15:44 2005 +0000
+++ b/src/macfns.c	Sun Mar 06 13:31:20 2005 +0000
@@ -2294,8 +2294,6 @@
 
 /* Create and set up the Mac window for frame F.  */
 
-extern OSErr install_window_handler (WindowPtr);
-
 static void
 mac_window (f)
      struct frame *f;
@@ -4356,7 +4354,7 @@
 	options.actionButtonLabel = CFSTR ("Ok");
 	options.windowTitle = CFSTR ("Enter name");
 
-	if (!NILP(default_filename))
+	if (STRINGP (default_filename))
 	  {
 	    Lisp_Object utf8 = ENCODE_UTF_8 (default_filename);
 	    char *begPtr = SDATA(utf8);
@@ -4381,22 +4379,29 @@
       }
     
     /* Set the default location and continue*/
-    if (status == noErr) {
-      if (!NILP(dir)) {
+    if (status == noErr)
+      {
+	AEDesc defLocAed;
+#ifdef MAC_OSX
 	FSRef defLoc;
-	AEDesc defLocAed;
 	status = FSPathMakeRef(SDATA(ENCODE_FILE(dir)), &defLoc, NULL);
+#else
+	FSSpec defLoc;
+	status = posix_pathname_to_fsspec (SDATA (ENCODE_FILE (dir)), &defLoc);
+#endif
 	if (status == noErr) 
 	  {
+#ifdef MAC_OSX
 	    AECreateDesc(typeFSRef, &defLoc, sizeof(FSRef), &defLocAed);
+#else
+	    AECreateDesc(typeFSS, &defLoc, sizeof(FSSpec), &defLocAed);
+#endif
 	    NavCustomControl(dialogRef, kNavCtlSetLocation, (void*) &defLocAed);
 	    AEDisposeDesc(&defLocAed);
 	  }
+	status = NavDialogRun(dialogRef);
       }
 
-      status = NavDialogRun(dialogRef);
-    }
-
     if (saveName) CFRelease(saveName);
     if (message) CFRelease(message);
 
@@ -4413,11 +4418,22 @@
 	  {
 	    NavReplyRecord reply;
 	    AEDesc aed;
+#ifdef MAC_OSX
 	    FSRef fsRef;
+#else
+	    FSSpec fs;
+#endif
 	    status = NavDialogGetReply(dialogRef, &reply);
+
+#ifdef MAC_OSX
 	    AECoerceDesc(&reply.selection, typeFSRef, &aed);
 	    AEGetDescData(&aed, (void *) &fsRef, sizeof (FSRef));
 	    FSRefMakePath(&fsRef, (UInt8 *) filename, sizeof (filename));
+#else
+	    AECoerceDesc (&reply.selection, typeFSS, &aed);
+	    AEGetDescData (&aed, (void *) &fs, sizeof (FSSpec));
+	    fsspec_to_posix_pathname (&fs, filename, sizeof (filename) - 1);
+#endif
 	    AEDisposeDesc(&aed);
 	    if (reply.saveFileName)
 	      {
--- a/src/macgui.h	Mon Feb 28 15:15:44 2005 +0000
+++ b/src/macgui.h	Sun Mar 06 13:31:20 2005 +0000
@@ -29,10 +29,11 @@
 
 typedef unsigned long Time;
 
-#if MAC_OSX
+#ifdef HAVE_CARBON
+#undef Z
+#ifdef MAC_OSX
 #undef mktime
 #undef DEBUG
-#undef Z
 #undef free
 #undef malloc
 #undef realloc
@@ -44,8 +45,6 @@
 #include <Carbon/Carbon.h>
 #undef mktime
 #define mktime emacs_mktime
-#undef Z
-#define Z (current_buffer->text->z)
 #undef free
 #define free unexec_free
 #undef malloc
@@ -59,12 +58,19 @@
 #undef init_process
 #define init_process emacs_init_process
 #undef INFINITY
-#else
+#else  /* not MAC_OSX */
+#undef SIGHUP
+#define OLDP2C 1
+#include <Carbon.h>
+#endif  /* not MAC_OSX */
+#undef Z
+#define Z (current_buffer->text->z)
+#else /* not HAVE_CARBON */
 #include <QuickDraw.h>		/* for WindowPtr */
 #include <QDOffscreen.h>	/* for GWorldPtr */
 #include <Windows.h>
 #include <Gestalt.h>
-#endif
+#endif /* not HAVE_CARBON */
 
 typedef WindowPtr Window;
 typedef GWorldPtr Pixmap;
--- a/src/macmenu.c	Mon Feb 28 15:15:44 2005 +0000
+++ b/src/macmenu.c	Sun Mar 06 13:31:20 2005 +0000
@@ -35,7 +35,7 @@
 #include "charset.h"
 #include "coding.h"
 
-#ifndef MAC_OSX
+#if !TARGET_API_MAC_CARBON
 #include <MacTypes.h>
 #include <Menus.h>
 #include <QuickDraw.h>
@@ -47,7 +47,7 @@
 #if defined (__MRC__) || (__MSL__ >= 0x6000)
 #include <ControlDefinitions.h>
 #endif
-#endif /* not MAC_OSX */
+#endif /* not TARGET_API_MAC_CARBON */
 
 /* This may include sys/types.h, and that somehow loses
    if this is not done before the other system files.  */
--- a/src/macterm.c	Mon Feb 28 15:15:44 2005 +0000
+++ b/src/macterm.c	Sun Mar 06 13:31:20 2005 +0000
@@ -34,12 +34,12 @@
 #include <alloca.h>
 #endif
 
-#ifdef MAC_OSX
+#if TARGET_API_MAC_CARBON
 /* USE_CARBON_EVENTS determines if the Carbon Event Manager is used to
    obtain events from the event queue.  If set to 0, WaitNextEvent is
    used instead.  */
 #define USE_CARBON_EVENTS 1
-#else /* not MAC_OSX */
+#else /* not TARGET_API_MAC_CARBON */
 #include <Quickdraw.h>
 #include <ToolUtils.h>
 #include <Sound.h>
@@ -58,7 +58,7 @@
 #if __profile__
 #include <profiler.h>
 #endif
-#endif /* not MAC_OSX */
+#endif /* not TARGET_API_MAC_CARBON */
 
 #include "systty.h"
 #include "systime.h"
@@ -245,7 +245,7 @@
 
 extern int inhibit_window_system;
 
-#if __MRC__
+#if __MRC__ && !TARGET_API_MAC_CARBON
 QDGlobals qd;  /* QuickDraw global information structure.  */
 #endif
 
@@ -5574,6 +5574,9 @@
 
   BLOCK_INPUT;
 
+  if (wp != tip_window)
+    remove_window_handler (wp);
+
   DisposeWindow (wp);
   if (wp == tip_window)
     /* Neither WaitNextEvent nor ReceiveNextEvent receives `window
@@ -7078,7 +7081,7 @@
 
 /* The Mac Event loop code */
 
-#ifndef MAC_OSX
+#if !TARGET_API_MAC_CARBON
 #include <Events.h>
 #include <Quickdraw.h>
 #include <Balloons.h>
@@ -7099,7 +7102,7 @@
 #if __MWERKS__
 #include <unix.h>
 #endif
-#endif /* ! MAC_OSX */
+#endif /* ! TARGET_API_MAC_CARBON */
 
 #define M_APPLE 128
 #define I_ABOUT 1
@@ -7200,12 +7203,16 @@
 /* Drag and Drop */
 static pascal OSErr mac_do_track_drag (DragTrackingMessage, WindowPtr, void*, DragReference);
 static pascal OSErr mac_do_receive_drag (WindowPtr, void*, DragReference);
+static DragTrackingHandlerUPP mac_do_track_dragUPP = NULL;
+static DragReceiveHandlerUPP mac_do_receive_dragUPP = NULL;
 #endif
 
 #if USE_CARBON_EVENTS
+#ifdef MAC_OSX
 /* Preliminary Support for the OSX Services Menu */
 static OSStatus mac_handle_service_event (EventHandlerCallRef,EventRef,void*);
 static void init_service_handler ();
+#endif
 /* Window Event Handler */
 static pascal OSStatus mac_handle_window_event (EventHandlerCallRef,
 						EventRef, void *);
@@ -7844,7 +7851,7 @@
 }
 
 #if USE_CARBON_EVENTS
-
+#ifdef MAC_OSX
 void
 init_service_handler ()
 {
@@ -7940,7 +7947,7 @@
     }
   return err;
 }
-
+#endif
 
 static pascal OSStatus
 mac_handle_window_event (next_handler, event, data)
@@ -8037,14 +8044,30 @@
 				   NULL, NULL);
 #endif
 #if TARGET_API_MAC_CARBON
+  if (mac_do_track_dragUPP == NULL)
+    mac_do_track_dragUPP = NewDragTrackingHandlerUPP (mac_do_track_drag);
+  if (mac_do_receive_dragUPP == NULL)
+    mac_do_receive_dragUPP = NewDragReceiveHandlerUPP (mac_do_receive_drag);
+
   if (err == noErr)
-    err = InstallTrackingHandler (mac_do_track_drag, window, NULL);
+    err = InstallTrackingHandler (mac_do_track_dragUPP, window, NULL);
   if (err == noErr)
-    err = InstallReceiveHandler (mac_do_receive_drag, window, NULL);
+    err = InstallReceiveHandler (mac_do_receive_dragUPP, window, NULL);
 #endif
   return err;
 }
 
+void
+remove_window_handler (window)
+     WindowPtr window;
+{
+#if TARGET_API_MAC_CARBON
+  if (mac_do_track_dragUPP)
+    RemoveTrackingHandler (mac_do_track_dragUPP, window);
+  if (mac_do_receive_dragUPP)
+    RemoveReceiveHandler (mac_do_receive_dragUPP, window);
+#endif
+}
 
 /* Open Application Apple Event */
 static pascal OSErr
@@ -8123,9 +8146,9 @@
         /* AE file list is one based so just use that for indexing here.  */
         for (i = 1; i <= num_files_to_open; i++)
 	  {
+	    char unix_path_name[MAXPATHLEN];
 #ifdef MAC_OSX
 	    FSRef fref;
-	    char unix_path_name[MAXPATHLEN];
 
 	    err = AEGetNthPtr (&the_desc, i, typeFSRef, &keyword,
 			       &actual_type, &fref, sizeof (FSRef),
@@ -8137,15 +8160,13 @@
 		== noErr)
 #else
 	    FSSpec fs;
-	    Str255 path_name, unix_path_name;
 
 	    err = AEGetNthPtr(&the_desc, i, typeFSS, &keyword, &actual_type,
 			      (Ptr) &fs, sizeof (fs), &actual_size);
 	    if (err != noErr) continue;
 
-	    if (path_from_vol_dir_name (path_name, 255, fs.vRefNum, fs.parID,
-					fs.name) &&
-		mac_to_posix_pathname (path_name, unix_path_name, 255))
+	    if (fsspec_to_posix_pathname (&fs, unix_path_name,
+					  sizeof (unix_path_name) - 1) == noErr)
 #endif
 	      /* x-dnd functions expect undecoded filenames.  */
 	      drag_and_drop_file_list =
@@ -8264,10 +8285,9 @@
 	{
 #ifdef MAC_OSX
 	  FSRef fref;
+#endif
 	  char unix_path_name[MAXPATHLEN];
-#else
-	  Str255 path_name, unix_path_name;
-#endif
+
 	  GetFlavorData (theDrag, theItem, flavorTypeHFS, &data, &size, 0L);
 #ifdef MAC_OSX
 	  /* Use Carbon routines, otherwise it converts the file name
@@ -8275,9 +8295,8 @@
 	  FSpMakeFSRef (&data.fileSpec, &fref);
 	  if (! FSRefMakePath (&fref, unix_path_name, sizeof (unix_path_name)));
 #else
-	  if (path_from_vol_dir_name (path_name, 255, data.fileSpec.vRefNum,
-				      data.fileSpec.parID, data.fileSpec.name) &&
-	      mac_to_posix_pathname (path_name, unix_path_name, 255))
+	  if (fsspec_to_posix_pathname (&data.fileSpec, unix_path_name,
+					sizeof (unix_path_name) - 1) == noErr)
 #endif
 	    /* x-dnd functions expect undecoded filenames.  */
             drag_and_drop_file_list =
@@ -8374,7 +8393,7 @@
    hints and prompts in the minibuffer after the user stops typing for
    a wait, etc.  */
 
-#if !TARGET_API_MAC_CARBON
+#ifdef MAC_OS8
 #undef main
 int
 main (void)
@@ -8956,7 +8975,7 @@
 	    int keycode = (er.message & keyCodeMask) >> 8;
 	    int xkeysym;
 
-#if USE_CARBON_EVENTS
+#if USE_CARBON_EVENTS && defined (MAC_OSX)
 	    /* When using Carbon Events, we need to pass raw keyboard
 	       events to the TSM ourselves.  If TSM handles it, it
 	       will pass back noErr, otherwise it will pass back
@@ -9265,12 +9284,21 @@
   f->output_data.mac->mouse_pixel = 0xff00ff;
   f->output_data.mac->cursor_foreground_pixel = 0x0000ff;
 
+#if TARGET_API_MAC_CARBON
+  f->output_data.mac->text_cursor = kThemeIBeamCursor;
+  f->output_data.mac->nontext_cursor = kThemeArrowCursor;
+  f->output_data.mac->modeline_cursor = kThemeArrowCursor;
+  f->output_data.mac->hand_cursor = kThemePointingHandCursor;
+  f->output_data.mac->hourglass_cursor = kThemeWatchCursor;
+  f->output_data.mac->horizontal_drag_cursor = kThemeResizeLeftRightCursor;
+#else
   f->output_data.mac->text_cursor = GetCursor (iBeamCursor);
   f->output_data.mac->nontext_cursor = &arrow_cursor;
   f->output_data.mac->modeline_cursor = &arrow_cursor;
   f->output_data.mac->hand_cursor = &arrow_cursor;
   f->output_data.mac->hourglass_cursor = GetCursor (watchCursor);
   f->output_data.mac->horizontal_drag_cursor = &arrow_cursor;
+#endif
 
   FRAME_FONTSET (f) = -1;
   f->output_data.mac->explicit_parent = 0;
@@ -9806,7 +9834,7 @@
 #if TARGET_API_MAC_CARBON
   init_required_apple_events ();
 
-#if USE_CARBON_EVENTS
+#if USE_CARBON_EVENTS && defined (MAC_OSX)
   init_service_handler ();
 
   init_quit_char_handler ();
@@ -9814,9 +9842,11 @@
 
   DisableMenuCommand (NULL, kHICommandQuit);
 
+#ifdef MAC_OSX
   if (!inhibit_window_system)
     MakeMeTheFrontProcess ();
 #endif
+#endif
   UNBLOCK_INPUT;
 }
 
--- a/src/macterm.h	Mon Feb 28 15:15:44 2005 +0000
+++ b/src/macterm.h	Sun Mar 06 13:31:20 2005 +0000
@@ -604,10 +604,17 @@
 extern void mac_draw_line_to_pixmap P_ ((Display *, Pixmap, GC, int, int,
 					 int, int));
 extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *));
+extern OSErr install_window_handler P_ ((WindowPtr));
+extern void remove_window_handler P_ ((WindowPtr));
 
 #define FONT_TYPE_FOR_UNIBYTE(font, ch) 0
 #define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0
 
+/* Defined in mac.c.  */
+
+extern OSErr posix_pathname_to_fsspec P_ ((const char *, FSSpec *));
+extern OSErr fsspec_to_posix_pathname P_ ((const FSSpec *, char *, int));
+extern void mac_clear_font_name_table P_ ((void));
 #if TARGET_API_MAC_CARBON
 extern CFStringRef cfstring_create_with_utf8_cstring P_ ((const char *));
 #endif
--- a/src/s/vms.h	Mon Feb 28 15:15:44 2005 +0000
+++ b/src/s/vms.h	Sun Mar 06 13:31:20 2005 +0000
@@ -109,6 +109,11 @@
    your system and must be used only through an encapsulation
    (Which you should place, by convention, in sysdep.c).  */
 
+/* In olden days, VMS filenames did not support hyphen (i.e., the "-"
+   character).  You can #undef this in vmsX-Y.h for newer versions.  */
+
+#define NO_HYPHENS_IN_FILENAMES
+
 /* Do you have the sharable library bug?  If you link with a sharable
    library that contains psects with the NOSHR attribute and also refer to
    those psects in your program, the linker give you a private version of
@@ -135,6 +140,10 @@
 
 /* #define READ_SYSUAF */
 
+/* Traditionally, filenames on VMS are always upper case.  */
+
+#define FILE_SYSTEM_CASE Fupcase
+
 /* On VMS these have a different name */
 
 #define index strchr
--- a/src/s/vms4-4.h	Mon Feb 28 15:15:44 2005 +0000
+++ b/src/s/vms4-4.h	Sun Mar 06 13:31:20 2005 +0000
@@ -1,5 +1,7 @@
 #include "vms.h"
 #define VMS4_4
 
+#undef NO_HYPHENS_IN_FILENAMES
+
 /* arch-tag: 2e65c7ad-0d17-45a0-b4cb-3e76c72ea9d5
    (do not change this comment) */
--- a/src/s/vms5-5.h	Mon Feb 28 15:15:44 2005 +0000
+++ b/src/s/vms5-5.h	Sun Mar 06 13:31:20 2005 +0000
@@ -2,6 +2,8 @@
 #define VMS5_5
 #define VMS4_4
 
+#undef NO_HYPHENS_IN_FILENAMES
+
 /* The bug that SHARABLE_LIB_BUG fixes is gone in version 5.5 of VMS.
    And defining it causes lossage because sys_errlist has a different
    number of elements.  */
--- a/src/xdisp.c	Mon Feb 28 15:15:44 2005 +0000
+++ b/src/xdisp.c	Sun Mar 06 13:31:20 2005 +0000
@@ -5083,11 +5083,12 @@
 		 display.  Then, set IT->dpvec to these glyphs.  */
 	      GLYPH g;
 	      int ctl_len;
-	      int face_id, lface_id;
+	      int face_id, lface_id = 0 ;
 	      GLYPH escape_glyph;
 
 	      if (it->c < 128 && it->ctl_arrow_p)
 		{
+		  g = '^';	     /* default glyph for Control */
 		  /* Set IT->ctl_chars[0] to the glyph for `^'.  */
 		  if (it->dp
 		      && INTEGERP (DISP_CTRL_GLYPH (it->dp))
@@ -5095,19 +5096,18 @@
 		    {
 		      g = XINT (DISP_CTRL_GLYPH (it->dp));
 		      lface_id = FAST_GLYPH_FACE (g);
-		      if (lface_id)
-			{
-			  g = FAST_GLYPH_CHAR (g);
-			  face_id = merge_faces (it->f, Qt, lface_id,
-						 it->face_id);
-			}
+		    }
+		  if (lface_id)
+		    {
+		       g = FAST_GLYPH_CHAR (g);
+		       face_id = merge_faces (it->f, Qt, lface_id,
+					      it->face_id);
 		    }
 		  else
 		    {
 		      /* Merge the escape-glyph face into the current face.  */
 		      face_id = merge_faces (it->f, Qescape_glyph, 0,
 					     it->face_id);
-		      g = '^';
 		    }
 
 		  XSETINT (it->ctl_chars[0], g);
@@ -5117,25 +5117,25 @@
 		  goto display_control;
 		}
 
+	      escape_glyph = '\\';    /* default for Octal display */
 	      if (it->dp
 		  && INTEGERP (DISP_ESCAPE_GLYPH (it->dp))
 		  && GLYPH_CHAR_VALID_P (XFASTINT (DISP_ESCAPE_GLYPH (it->dp))))
 		{
 		  escape_glyph = XFASTINT (DISP_ESCAPE_GLYPH (it->dp));
 		  lface_id = FAST_GLYPH_FACE (escape_glyph);
-		  if (lface_id)
-		    {
-		      escape_glyph = FAST_GLYPH_CHAR (escape_glyph);
-		      face_id = merge_faces (it->f, Qt, lface_id,
-					     it->face_id);
-		    }
+		}
+	      if (lface_id)
+		{
+		  escape_glyph = FAST_GLYPH_CHAR (escape_glyph);
+		  face_id = merge_faces (it->f, Qt, lface_id,
+					 it->face_id);
 		}
 	      else
 		{
 		  /* Merge the escape-glyph face into the current face.  */
 		  face_id = merge_faces (it->f, Qescape_glyph, 0,
 					 it->face_id);
-		  escape_glyph = '\\';
 		}
 
 	      if (it->c == 0x8a0 || it->c == 0x8ad)
@@ -12284,7 +12284,11 @@
     {
       init_iterator (&it, w, PT, PT_BYTE, NULL, DEFAULT_FACE_ID);
       move_it_vertically_backward (&it, 0);
+#if 0
+      /* I think this assert is bogus if buffer contains
+	 invisible text or images.  KFS.  */
       xassert (IT_CHARPOS (it) <= PT);
+#endif
       it.current_y = 0;
     }