changeset 83553:32073cbc5eb6

Merged from emacs@sv.gnu.org Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-592 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-593 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-594 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-595 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-596 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-597 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-598 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-186 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-187 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-188 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-189 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-190 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-191 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-593
author Karoly Lorentey <lorentey@elte.hu>
date Sat, 13 Jan 2007 22:59:28 +0000
parents d3099204c799 (current diff) 7bb4efe634b8 (diff)
children b8d9a391daf3
files admin/FOR-RELEASE lisp/ChangeLog lisp/bindings.el lisp/faces.el lisp/files.el lisp/international/mule-cmds.el lisp/ldefs-boot.el lisp/progmodes/vhdl-mode.el lisp/server.el lisp/subr.el lisp/term/mac-win.el lisp/x-dnd.el man/ChangeLog src/callproc.c src/emacs.c src/image.c src/keyboard.c src/macterm.c src/macterm.h src/xterm.c src/xterm.h
diffstat 50 files changed, 878 insertions(+), 439 deletions(-) [+]
line wrap: on
line diff
--- a/admin/FOR-RELEASE	Sat Jan 06 15:25:16 2007 +0000
+++ b/admin/FOR-RELEASE	Sat Jan 13 22:59:28 2007 +0000
@@ -86,15 +86,15 @@
 ** dooglus@gmail.com, Dec 29: 4 week-old pretest bugs
   Two GTK version bugs.
 
-** pgg bugs reported by rms.
-
-** (global-set-key "\M-k" 'bury-buffer) confuses tutorial warnings.
-
 ** jpff@cs.bath.ac.uk, Jan 5: Failure to submit second netnews message
 
 ** KSNetz@UseNet.ArcorNews.DE, Jan 5: 
     url-http.el: calling the callback function for proxy connections
 
+** simon.marshall@misys.com, Jan 9: Possible mouse-face redisplay glitch
+
+** dooglus@gmail.com, Jan 10: problem with transparent PNG image display
+
 * DOCUMENTATION
 
 ** Check the Emacs Tutorial.
--- a/admin/nt/README-ftp-server	Sat Jan 06 15:25:16 2007 +0000
+++ b/admin/nt/README-ftp-server	Sat Jan 13 22:59:28 2007 +0000
@@ -88,44 +88,25 @@
       leim-21.3-src.tar.gz
 
 
-* Distributions in multi-file .zip format
-
-  A second distribution in the form of multiple small .zip files is also
-  provided, for the benefit of people who have unreliable internet
-  connections, or who need to copy the distribution onto floppy disks:
-
-      em213b*.zip
-
-  This is equivalent to getting emacs-21.3-bin-i386.tar.gz above.
-  The lisp source is available as em213l*.zip.
-
-
 * Distributions for non-x86 platforms
 
-  I try to make this port available for all platforms supported by
-  Windows (it should build on all supported Windows NT/9x platforms).
-  However, I do not always have access to non-x86 platforms, and so I
-  cannot guarantee to provide precompiled distributions for the other
-  platforms myself.  If you find there are no binaries for your
-  platform, and you have access to a Microsoft compiler, then you can
-  download the source and compile Emacs yourself (and, if you do, please
-  consider contributing your executables; send me mail and we can make
-  arrangements for making them available on this ftp server.)
-
+  Distributions for non-x86 platforms are no longer supplied. Older
+  platforms supported by Windows NT no longer seem to be in demand,
+  and Emacs is yet to be ported to 64bit Windows platforms. If you are
+  willing to help port Emacs to 64bit versions of Windows, your
+  contribution will be welcome on the emacs-devel mailing list.
 
 * Unpacking distributions
 
-  Programs for handling the distribution file formats can be found in
-  the utilities directory: 
-
-    http://mirrors.sunsite.dk/gnu/windows/emacs/utilities/
+  Ports of GNU gzip and GNU tar for handling the distribution file
+  formats can be found in several places that distribute ports of GNU
+  programs, for example:
 
-  For gzipped tar files, you will need either gunzip.exe and tar.exe
-  together, or djtarnt.exe.  djtarnt.exe can also unpack .zip files.  I
-  strongly urge you to use these utilities since they were the ones used
-  to create the distributions; the most common problem people have in
-  trying to get Emacs to run is due to some other utility program
-  corrupting the distribution while unpacking.
+    Cygwin:   http://www.cygwin.com/
+    GnuWin32: http://gnuwin32.sourceforge.net/
+
+  Many other popular file compression utilities for Windows are also
+  able to handle gzipped tar files.
 
   Open a command prompt (MSDOS) window.  Decide on a directory in which
   to place Emacs.  Move the distribution to that directory, and then
@@ -151,25 +132,10 @@
   You may be prompted to rename or overwrite directories when using
   djtarnt: simply type return to continue (this is harmless).
 
-  If you have the multi-file .zip distribution, use djtarnt to unpack
-  all of the .zip files:
-
-    % djtarnt -x *.zip
-
   Once you have unpacked a precompiled distribution of Emacs, it should
   have the following subdirectories:
 
-	bin	etc	info	lisp	lock	site-lisp
-
-  If your utility failed to create the lock directory, then you can
-  simply create it by hand (it is initially empty).
-
-  One final step is needed only when installing from the multi-file .zip
-  distribution, in order to recreate emacs.exe from its fragments (it is
-  too big to fit on a floppy even when zipped):
-
-    % cd emacs-21.3\bin
-    % stitch
+	bin	etc	info	lisp	site-lisp
 
 
 * Unpacking with other tools
@@ -178,9 +144,9 @@
   the following to be sure the distribution was not corrupted:
 
   + Be sure to disable the CR/LF translation or the executables will be
-    unusable.  Older versions of WinZipNT would enable this translation
-    by default.  If you are using WinZipNT, disable it.  (I don't have
-    WinZipNT myself, and I do not know the specific commands necessary
+    unusable.  Older versions of WinZip would enable this translation
+    by default.  If you are using WinZip, disable it.  (I don't have
+    WinZip myself, and I do not know the specific commands necessary
     to disable it.)
 
   + Check that filenames were not truncated to 8.3.  For example, there
@@ -188,12 +154,9 @@
     abbrevli.el, your distribution has been corrupted while unpacking
     and Emacs will not start.
 
-  + I've been told that some utilities (WinZip again?) don't create the
-    lock subdirectory.  The lock subdirectory needs to be created.
-
-  + I've also had reports that the "gnu-win32" port of tar corrupts the
-    executables.  Use the version of tar or djtarnt in the utilities
-    directory instead.
+  + I've also had reports that some older "gnuwin32" port of tar
+    corrupts the executables.  Use the latest version from the gnuwin32
+    site or another port of tar instead.
 
   If you believe you have unpacked the distributions correctly and are
   still encountering problems, see the section on Further Information
@@ -204,11 +167,12 @@
 
   If you would like to compile Emacs from source, download the source
   distribution, unpack it in the same manner as a precompiled
-  distribution, and look in the file nt/INSTALL for detailed directions.
-  You can either use the Microsoft compiler included with Visual C++, or
-  GCC 2.95 or later with MinGW support, to compile the source.  The port
-  of GCC included in Cygwin is supported, but check the nt/INSTALL file
-  if you have trouble since some builds of GNU make aren't supported.
+  distribution, and look in the file nt/INSTALL for detailed
+  directions.  You can either use the Microsoft compiler included with
+  Visual C++ 2003 or earlier, or GCC 2.95 or later with MinGW support,
+  to compile the source.  The port of GCC included in Cygwin is
+  supported, but check the nt/INSTALL file if you have trouble since
+  some builds of GNU make aren't supported.
 
 
 * Further information
@@ -250,5 +214,8 @@
 
   Enjoy!
 
-  Andrew Innes
-  (andrewi@gnu.org)
+  Jason Rumney
+  (jasonr@gnu.org)
+
+  Most of this README was contributed by former maintainer Andrew Innes
+  (andrewi@gnu.org)
\ No newline at end of file
--- a/etc/ChangeLog	Sat Jan 06 15:25:16 2007 +0000
+++ b/etc/ChangeLog	Sat Jan 13 22:59:28 2007 +0000
@@ -1,4 +1,4 @@
-2006-06-30  Francesco Potort,Al(B  <pot@gnu.org>
+2007-01-02  Francesco Potort,Al(B  <pot@gnu.org>
 
 	* etags.1: Undocument the --no-warn option.
 
--- a/etc/NEWS	Sat Jan 06 15:25:16 2007 +0000
+++ b/etc/NEWS	Sat Jan 13 22:59:28 2007 +0000
@@ -512,7 +512,7 @@
 preceded by one of the words `variable' or `option'.  It now makes
 hyperlinks to Info anchors (or nodes) if the anchor (or node) name is
 enclosed in single quotes and preceded by `info anchor' or `Info
-anchor' (in addition to earlier `info node' and `Info node'). In
+anchor' (in addition to earlier `info node' and `Info node').  In
 addition, it now makes hyperlinks to URLs as well if the URL is
 enclosed in single quotes and preceded by `URL'.
 
@@ -778,7 +778,7 @@
 parts is, by contrast, slightly highlighted.
 
 Above fontification is always done when listing completions is
-triggered at minibuffer. If you want to fontify completions whose
+triggered at minibuffer.  If you want to fontify completions whose
 listing is triggered at the other normal buffer, you have to pass
 the common prefix of completions to `display-completion-list' as
 its second argument.
@@ -1666,8 +1666,8 @@
 
 ---
 *** Improved key bindings support when running in an xterm.
-When emacs is running in an xterm more key bindings are available. The
-following should work:
+When emacs is running in an xterm more key bindings are available.
+The following should work:
 {C,S,C-S,A}-{right,left,up,down,prior,next,delete,insert,F1-12}.
 These key bindings work on xterm from X.org 6.8, they might not work on
 some older versions of xterm, or on some proprietary versions.
@@ -2032,7 +2032,7 @@
 +++
 ** The file t-mouse.el is now part of Emacs and provides access to mouse
 events from the console.  It still requires gpm to work but has been updated
-for Emacs 22. In particular, the mode-line is now position sensitive.
+for Emacs 22.  In particular, the mode-line is now position sensitive.
 
 * Changes in Specialized Modes and Packages in Emacs 22.1:
 
@@ -2047,7 +2047,7 @@
 +++
 *** Bindings for Tumme added
 Several new keybindings, all starting with the C-t prefix, have been
-added to Dired. They are all bound to commands in Tumme. As a starting
+added to Dired.  They are all bound to commands in Tumme.  As a starting
 point, mark some image files in a dired buffer and do C-t d to display
 thumbnails of them in a separate buffer.
 
@@ -2696,7 +2696,7 @@
 ** Fortran mode changes:
 
 ---
-*** Fortran mode does more font-locking by default. Use level 3
+*** Fortran mode does more font-locking by default.  Use level 3
 highlighting for the old default.
 
 +++
@@ -2890,7 +2890,7 @@
 *** The variables `bibtex-autokey-name-case-convert' and
 `bibtex-autokey-titleword-case-convert' have been renamed to
 `bibtex-autokey-name-case-convert-function' and
-`bibtex-autokey-titleword-case-convert-function'. The old names are
+`bibtex-autokey-titleword-case-convert-function'.  The old names are
 still available as aliases.
 
 ** In Artist mode the variable `artist-text-renderer' has been
@@ -3104,13 +3104,13 @@
 +++
 ***  When comparing directories.
 Typing D brings up a buffer that lists the differences between the contents of
-directories. Now it is possible to use this buffer to copy the missing files
+directories.  Now it is possible to use this buffer to copy the missing files
 from one directory to another.
 
 +++
 *** When comparing files or buffers.
 Typing the = key now offers to perform the word-by-word comparison of the
-currently highlighted regions in an inferior Ediff session. If you answer 'n'
+currently highlighted regions in an inferior Ediff session.  If you answer 'n'
 then it reverts to the old behavior and asks the user to select regions for
 comparison.
 
@@ -3211,6 +3211,10 @@
 reads from standard input and marks the produced tags as belonging to
 the file FILE.
 
+** Ctags changes.
+
+*** Ctags now allows duplicate tags
+
 ** VC Changes
 
 +++
@@ -3344,7 +3348,7 @@
 
 +++
 *** The new function `calendar-goto-day-of-year' (g D) prompts for a
-year and day number, and moves to that date. Negative day numbers
+year and day number, and moves to that date.  Negative day numbers
 count backward from the end of the year.
 
 +++
@@ -3359,7 +3363,7 @@
 ---
 *** The functions `holiday-easter-etc' and `holiday-advent' now take
 optional arguments, in order to only report on the specified holiday
-rather than all. This makes customization of variables such as
+rather than all.  This makes customization of variables such as
 `christian-holidays' simpler.
 
 ---
@@ -3719,7 +3723,7 @@
 ---
 ** Images are now supported on MS Windows.
 
-PBM and XBM images are supported out of the box. Other image formats
+PBM and XBM images are supported out of the box.  Other image formats
 depend on external libraries.  All of these libraries have been ported
 to Windows, and can be found in both source and binary form at
 http://gnuwin32.sourceforge.net/.  Note that libpng also depends on
@@ -3761,7 +3765,7 @@
 ** On MS Windows NT/W2K/XP, Emacs uses Unicode for clipboard operations.
 
 Those systems use Unicode internally, so this allows Emacs to share
-multilingual text with other applications. On other versions of
+multilingual text with other applications.  On other versions of
 MS Windows, Emacs now uses the appropriate locale coding-system, so
 the clipboard should work correctly for your local language without
 any customizations.
@@ -3771,12 +3775,12 @@
 
 Previous versions of Emacs erred on the side of having a usable Emacs
 through telnet, even though that was inconvenient if you use Emacs in
-a local console window with a scrollback buffer. The default value of
+a local console window with a scrollback buffer.  The default value of
 w32-use-full-screen-buffer is now nil, which favors local console
-windows. Recent versions of Windows telnet also work well with this
-setting. If you are using an older telnet server then Emacs detects
+windows.  Recent versions of Windows telnet also work well with this
+setting.  If you are using an older telnet server then Emacs detects
 that the console window dimensions that are reported are not sane, and
-defaults to 80x25. If you use such a telnet server regularly at a size
+defaults to 80x25.  If you use such a telnet server regularly at a size
 other than 80x25, you can still manually set
 w32-use-full-screen-buffer to t.
 
--- a/lisp/ChangeLog	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/ChangeLog	Sat Jan 13 22:59:28 2007 +0000
@@ -1,3 +1,87 @@
+2007-01-10  Juanma Barranquero  <lekktu@gmail.com>
+
+	* ediff-init.el (ediff-autostore-merges):
+	* textmodes/fill.el (fill-region): Doc fix.
+
+2007-01-10  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* server.el (server-ensure-safe-dir): UIDs may be floats.
+
+2007-01-10  Richard Stallman  <rms@gnu.org>
+
+	* battery.el (battery-linux-proc-acpi): Use ignore-errors
+	around calls to directory-files.
+
+	* subr.el (momentary-string-display): Use save-excursion.
+
+	* emacs-lisp/pp.el (pp-eval-expression): Once again eval the
+	argument, but read it as `X' does.
+
+2007-01-09  Juri Linkov  <juri@jurta.org>
+
+	* info.el (Info-fontify-node): Don't hide node names of index entries.
+
+	* faces.el (momentary): Change :group to basic-faces where all
+	basic faces belong to.  Add :version.
+
+2007-01-09  Lennart Borgman  <lennart.borgman.073@student.lu.se>
+
+	* tutorial.el (tutorial--display-changes): Show M-x sequence if no
+	keybinding is found.
+	(tutorial--find-changed-keys): Never treat null keybinding as a
+	remapping.
+
+2007-01-09  Martin Rudalics  <rudalics@gmx.at>
+
+	* wdired.el (wdired-xcase-word): Skip non-word read-only characters.
+
+2007-01-09  Kenichi Handa  <handa@m17n.org>
+
+	* international/mule-cmds.el
+	(select-safe-coding-system-interactively): Fix message.
+
+2007-01-09  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/tramp.el (tramp-process-one-action): Remove `with-timeout'.
+	(tramp-process-actions): Add optional parameter TIMEOUT.
+	(tramp-open-connection-telnet, tramp-open-connection-rsh)
+	(tramp-open-connection-su): Add timeout of 60".
+
+2007-01-09  Richard Stallman  <rms@gnu.org>
+
+	* progmodes/compile.el (compile): Doc fix.
+
+2007-01-09  Markus Triska  <markus.triska@gmx.at>
+
+	* tumme.el (tumme-display-thumb): Doc fix.
+
+2007-01-08  Juanma Barranquero  <lekktu@gmail.com>
+
+	* battery.el (battery-search-for-one-match-in-files):
+	* bindings.el (mode-line-minor-mode-help):
+	* x-dnd.el (x-dnd-types-alist):
+	* calendar/icalendar.el (icalendar-import-buffer):
+	* term/mac-win.el (mac-dnd-types-alist): Fix typo in docstring.
+
+	* progmodes/vhdl-mode.el (vhdl-save-caches): Fix typo in error message.
+
+2007-01-07  Chris Moore  <christopher.ian.moore@gmail.com>  (tiny change)
+
+	* replace.el (replace-regexp): Fix typo in docstring.
+
+2007-01-07  Alan Mackenzie  <acm@muc.de>
+
+	* progmodes/cc-langs.el (c-operators, c-filter-ops):
+	Amend doc-string and comments.
+
+2007-01-06  Eli Zaretskii  <eliz@gnu.org>
+
+	* files.el (abbreviate-file-name): Doc fix.
+
+2007-01-06  Markus Triska  <triska@gmx.at>
+
+	* subr.el (split-string): Remove spurious ")" from doc string.
+
 2007-01-05  Takaaki Ota  <Takaaki.Ota@am.sony.com>
 
 	* textmodes/table.el (table--warn-incompatibility):
@@ -275,6 +359,11 @@
 2006-12-27  Kenichi Handa  <handa@m17n.org>
 
 	* international/mule-cmds.el (select-safe-coding-system-interactively):
+	Use face `link' for problematic chars.
+
+2006-12-27  Kenichi Handa  <handa@m17n.org>
+
+	* international/mule-cmds.el (select-safe-coding-system-interactively):
 	Improve the message in *Warning* buffer.
 
 2006-12-27  Kim F. Storm  <storm@cua.dk>
--- a/lisp/battery.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/battery.el	Sat Jan 13 22:59:28 2007 +0000
@@ -357,15 +357,17 @@
     (list (cons ?c (or (and capacity (number-to-string capacity)) "N/A"))
 	  (cons ?L (or (battery-search-for-one-match-in-files
 			(mapcar (lambda (e) (concat e "/state"))
-				(directory-files "/proc/acpi/ac_adapter/"
-						 t "\\`[^.]"))
+				(ignore-errors
+				  (directory-files "/proc/acpi/ac_adapter/"
+						   t "\\`[^.]")))
 			"state: +\\(.*\\)$" 1)
 
 		       "N/A"))
 	  (cons ?d (or (battery-search-for-one-match-in-files
 			(mapcar (lambda (e) (concat e "/temperature"))
-				(directory-files "/proc/acpi/thermal_zone/"
-						 t "\\`[^.]"))
+				(ignore-errors
+				  (directory-files "/proc/acpi/thermal_zone/"
+						   t "\\`[^.]")))
 			"temperature: +\\([0-9]+\\) C$" 1)
 
 		       "N/A"))
@@ -455,7 +457,7 @@
 
 (defun battery-search-for-one-match-in-files (files regexp match-num)
   "Search REGEXP in the content of the files listed in FILES.
-If a match occured, return the parenthesized expression numbered by
+If a match occurred, return the parenthesized expression numbered by
 MATCH-NUM in the match.  Otherwise, return nil."
   (with-temp-buffer
     (catch 'found
--- a/lisp/bindings.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/bindings.el	Sat Jan 13 22:59:28 2007 +0000
@@ -476,7 +476,7 @@
   (x-popup-menu event mode-line-mode-menu))
 
 (defun mode-line-minor-mode-help (event)
-  "Describe minor mode for EVENT occured on minor modes area of the mode line."
+  "Describe minor mode for EVENT occurred on minor modes area of the mode line."
   (interactive "@e")
   (let ((indicator (car (nth 4 (car (cdr event))))))
     (describe-minor-mode-from-indicator indicator)))
--- a/lisp/calendar/icalendar.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/calendar/icalendar.el	Sat Jan 13 22:59:28 2007 +0000
@@ -709,7 +709,7 @@
   "Export diary file to iCalendar format.
 All diary entries in the file DIARY-FILENAME are converted to iCalendar
 format.  The result is appended to the file ICAL-FILENAME."
-  (interactive "FExport diary data from file: 
+  (interactive "FExport diary data from file:
 Finto iCalendar file: ")
   (save-current-buffer
     (set-buffer (find-file diary-filename))
@@ -1453,8 +1453,8 @@
 Argument DIARY-FILENAME input `diary-file'.
 Optional argument NON-MARKING determines whether events are created as
 non-marking or not."
-  (interactive "fImport iCalendar data from file: 
-Finto diary file: 
+  (interactive "fImport iCalendar data from file:
+Finto diary file:
 p")
   ;; clean up the diary file
   (save-current-buffer
@@ -1479,7 +1479,7 @@
 non-marking.
 
 Return code t means that importing worked well, return code nil
-means that an error has occured.  Error messages will be in the
+means that an error has occurred.  Error messages will be in the
 buffer `*icalendar-errors*'."
   (interactive)
   (save-current-buffer
@@ -1508,7 +1508,7 @@
                   (set-buffer b)
                   (save-buffer)))))
           (message "Converting icalendar...done")
-          ;; return t if no error occured
+          ;; return t if no error occurred
           (not ical-errors))
       (message
        "Current buffer does not contain icalendar contents!")
--- a/lisp/ediff-init.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/ediff-init.el	Sat Jan 13 22:59:28 2007 +0000
@@ -1410,9 +1410,10 @@
 
 (defcustom ediff-autostore-merges  'group-jobs-only
   "*Save the results of merge jobs automatically.
-nil means don't save automatically.  t means always save.  Anything else
-means save automatically only if the merge job is part of a group of jobs, such
-as `ediff-merge-directory' or `ediff-merge-directory-revisions'."
+With value nil, don't save automatically.  With value t, always
+save.  Anything else means save automatically only if the merge
+job is part of a group of jobs, such as `ediff-merge-directory'
+or `ediff-merge-directory-revisions'."
   :type '(choice (const nil) (const t) (const group-jobs-only))
   :group 'ediff-merge)
 (make-variable-buffer-local 'ediff-autostore-merges)
--- a/lisp/emacs-lisp/pp.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/emacs-lisp/pp.el	Sat Jan 13 22:59:28 2007 +0000
@@ -97,16 +97,13 @@
   (princ (pp-to-string object) (or stream standard-output)))
 
 ;;;###autoload
-(defun pp-eval-expression (expval)
-  "Evaluate an expression, then pretty-print value EXPVAL into a new buffer.
-If pretty-printed EXPVAL fits on one line, display it in the echo
-area instead.  Also add EXPVAL to the front of the list
-in the variable `values'.
-
-Non-interactively, the argument is the value, EXPVAL, not the expression
-to evaluate."
-  (interactive "XPp-eval: ")
-  (setq values (cons expval values))
+(defun pp-eval-expression (expression)
+  "Evaluate EXPRESSION and pretty-print its value.
+Also add the value to the front of the list in the variable `values'."
+  (interactive
+   (list (read-from-minibuffer "Eval: " nil read-expression-map t
+			       'read-expression-history)))
+  (setq values (cons (eval expression) values))
   (let* ((old-show-function temp-buffer-show-function)
 	 ;; Use this function to display the buffer.
 	 ;; This function either decides not to display it at all
--- a/lisp/faces.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/faces.el	Sat Jan 13 22:59:28 2007 +0000
@@ -2179,14 +2179,15 @@
   :version "21.1"
   :group 'basic-faces)
 
+(defface vertical-border
+  '((((type tty)) :inherit mode-line-inactive))
+  "Face used for vertical window dividers on ttys."
+  :version "22.1"
+  :group 'basic-faces)
+
 (defface momentary
   '((t (:inherit mode-line)))
   "Face for momentarily displaying text in the current buffer."
-  :group 'display)
-
-(defface vertical-border
-  '((((type tty)) :inherit mode-line-inactive))
-  "Face used for vertical window dividers on ttys."
   :version "22.1"
   :group 'basic-faces)
 
--- a/lisp/files.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/files.el	Sat Jan 13 22:59:28 2007 +0000
@@ -1289,8 +1289,9 @@
 
 (defun abbreviate-file-name (filename)
   "Return a version of FILENAME shortened using `directory-abbrev-alist'.
-This also substitutes \"~\" for the user's home directory and
-removes automounter prefixes (see the variable `automount-dir-prefix')."
+This also substitutes \"~\" for the user's home directory (unless the
+home directory is a root directory) and removes automounter prefixes
+\(see the variable `automount-dir-prefix')."
   ;; Get rid of the prefixes added by the automounter.
   (save-match-data
     (if (and automount-dir-prefix
--- a/lisp/gnus/ChangeLog	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/gnus/ChangeLog	Sat Jan 13 22:59:28 2007 +0000
@@ -1,8 +1,38 @@
+2007-01-07  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* gnus-soup.el: Add missing :group in previous change.
+
 2007-01-05  Reiner Steib  <Reiner.Steib@gmx.de>
 
 	* gnus-soup.el (gnus-soup): New custom group.  Make user variables
 	customizable.
 
+2007-01-03  Andreas Seltenreich  <uwi7@rz.uni-karlsruhe.de>
+
+	* nnweb.el (nnweb-gmane-create-mapping): Put back code to merge the
+	headers read from disk with the ones newly found in the current search.
+	This should no longer cause problems, because the article numbers in
+	Gmane's `nov.php' output are ignored since the previous change.
+
+2006-01-03  Andreas Seltenreich  <uwi7@rz.uni-karlsruhe.de>
+
+	* nnweb.el (nnweb-gmane-create-mapping): Keep the mapping stable for
+	solid groups.
+
+2006-01-03  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+	* nnweb.el (nnweb-gmane-create-mapping): Use the article number from
+	the headers when creating the mapping to avoid mismappings.
+	(nnweb-gmane-create-mapping): Always nix out old mapping.
+
+2007-01-02  Andreas Seltenreich  <uwi7@rz.uni-karlsruhe.de>
+
+	* gmm-utils.el (gmm-tool-bar-style): Fix custom type.
+
+2007-01-01  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* mm-decode.el (mm-display-external): Use itimer function for XEmacs.
+
 2006-12-30  Andreas Seltenreich  <uwi7@rz.uni-karlsruhe.de>
 
 	* gnus-sum.el (gnus-summary-insert-dormant-articles): Fix typo in
--- a/lisp/gnus/gmm-utils.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/gnus/gmm-utils.el	Sat Jan 13 22:59:28 2007 +0000
@@ -203,8 +203,8 @@
       'gnome
     'retro)
   "Prefered tool bar style."
-  :type '(choice (const :tag "GNOME style" 'gnome)
-		 (const :tag "Retro look"  'retro))
+  :type '(choice (const :tag "GNOME style" gnome)
+		 (const :tag "Retro look"  retro))
   :group 'gmm)
 
 (defvar tool-bar-map)
--- a/lisp/gnus/gnus-soup.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/gnus/gnus-soup.el	Sat Jan 13 22:59:28 2007 +0000
@@ -45,18 +45,21 @@
 (defcustom gnus-soup-directory (nnheader-concat gnus-home-directory "SoupBrew/")
   "Directory containing an unpacked SOUP packet."
   :version "22.1" ;; Gnus 5.10.9
-  :type 'directory)
+  :type 'directory
+  :group 'gnus-soup)
 
 (defcustom gnus-soup-replies-directory
   (nnheader-concat gnus-soup-directory "SoupReplies/")
   "Directory where Gnus will do processing of replies."
   :version "22.1" ;; Gnus 5.10.9
-  :type 'directory)
+  :type 'directory
+  :group 'gnus-soup)
 
 (defcustom gnus-soup-prefix-file "gnus-prefix"
   "Name of the file where Gnus stores the last used prefix."
   :version "22.1" ;; Gnus 5.10.9
-  :type 'file)
+  :type 'file
+  :group 'gnus-soup)
 
 (defcustom gnus-soup-packer "tar cf - %s | gzip > $HOME/Soupout%d.tgz"
   "Format string command for packing a SOUP packet.
@@ -64,28 +67,33 @@
 This string MUST contain both %s and %d.  The file number will be
 inserted where %d appears."
   :version "22.1" ;; Gnus 5.10.9
-  :type 'string)
+  :type 'string
+  :group 'gnus-soup)
 
 (defcustom gnus-soup-unpacker "gunzip -c %s | tar xvf -"
   "Format string command for unpacking a SOUP packet.
 The SOUP packet file name will be inserted at the %s."
   :version "22.1" ;; Gnus 5.10.9
-  :type 'string)
+  :type 'string
+  :group 'gnus-soup)
 
 (defcustom gnus-soup-packet-directory gnus-home-directory
   "Where gnus-soup will look for REPLIES packets."
   :version "22.1" ;; Gnus 5.10.9
-  :type 'directory)
+  :type 'directory
+  :group 'gnus-soup)
 
 (defcustom gnus-soup-packet-regexp "Soupin"
   "Regular expression matching SOUP REPLIES packets in `gnus-soup-packet-directory'."
   :version "22.1" ;; Gnus 5.10.9
-  :type 'regexp)
+  :type 'regexp
+  :group 'gnus-soup)
 
 (defcustom gnus-soup-ignored-headers "^Xref:"
   "Regexp to match headers to be removed when brewing SOUP packets."
   :version "22.1" ;; Gnus 5.10.9
-  :type 'regexp)
+  :type 'regexp
+  :group 'gnus-soup)
 
 ;;; Internal Variables:
 
--- a/lisp/gnus/mm-decode.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/gnus/mm-decode.el	Sat Jan 13 22:59:28 2007 +0000
@@ -883,13 +883,21 @@
 			  ;; a vector in Emacs but is a list in XEmacs)
 			  ;; requires that it is lexically scoped.
 			  (timer (run-at-time 2.0 nil 'ignore)))
-		       (lambda (process state)
-			 (when (eq 'exit (process-status process))
-			   (if (memq timer timer-list)
-			       (timer-set-function timer fn)
-			     (funcall fn))
-			   (ignore-errors (eval fm))
-			   (message "%s" done))))))
+		       (if (boundp 'itimer-list)
+			   (lambda (process state)
+			     (when (eq 'exit (process-status process))
+			       (if (memq timer itimer-list)
+				   (set-itimer-function timer fn)
+				 (funcall fn))
+			       (ignore-errors (eval fm))
+			       (message "%s" done)))
+			 (lambda (process state)
+			   (when (eq 'exit (process-status process))
+			     (if (memq timer timer-list)
+				 (timer-set-function timer fn)
+			       (funcall fn))
+			     (ignore-errors (eval fm))
+			     (message "%s" done)))))))
 		(mm-handle-set-external-undisplayer
 		 handle (cons file buffer)))
 	      (message "Displaying %s..." command))
--- a/lisp/gnus/nnweb.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/gnus/nnweb.el	Sat Jan 13 22:59:28 2007 +0000
@@ -480,7 +480,7 @@
 		    (from (mail-header-from header))
 		    (subject (mail-header-subject header))
 		    (rfc2047-encoding-type 'mime))
-		(when (string-match " \\([^:]+\\):\\([0-9]+\\)" xref)
+		(when (string-match " \\([^:]+\\)[:/]\\([0-9]+\\)" xref)
 		  (mail-header-set-xref
 		   header
 		   (format "http://article.gmane.org/%s/%s/raw"
@@ -496,11 +496,8 @@
 					 (rfc2047-encode-string subject))
 
 		(unless (nnweb-get-hashtb (mail-header-xref header))
-		  (push
-		   (list
-		    (incf (cdr active))
-		    header)
-		   map)
+		  (mail-header-set-number header (incf (cdr active)))
+		  (push (list (mail-header-number header) header) map)
 		  (nnweb-set-hashtb (cadar map) (car map))))))
 	  (forward-line 1)))
       (nnheader-message 7 "Searching Gmane...done")
--- a/lisp/info.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/info.el	Sat Jan 13 22:59:28 2007 +0000
@@ -3996,7 +3996,9 @@
 				    (setq res (car hl) hl nil)
 				  (setq hl (cdr hl))))
                               res))) 'info-xref-visited 'info-xref)))
-	      (when (and not-fontified-p (memq Info-hide-note-references '(t hide)))
+	      (when (and not-fontified-p
+			 (memq Info-hide-note-references '(t hide))
+			 (not (Info-index-node)))
 		(put-text-property (match-beginning 2) (1- (match-end 6))
 				   'invisible t)
 		;; Unhide the file name in parens
--- a/lisp/international/mule-cmds.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/international/mule-cmds.el	Sat Jan 13 22:59:28 2007 +0000
@@ -788,10 +788,10 @@
 					  (car coding)))))
 		    (setq i (1+ i))))
 		(insert "\n"))
-	      (insert "\
+	      (insert (substitute-command-keys "\
 
-Click on a character to jump to the place it appears,\n"
-		      (substitute-command-keys "\
+Click on a character (or switch to this window by `\\[other-window]'\n\
+and select the characters by RET) to jump to the place it appears,\n\
 where `\\[universal-argument] \\[what-cursor-position]' will give information about it.\n"))))
 	  (insert (substitute-command-keys "\nSelect \
 one of the safe coding systems listed below,\n\
--- a/lisp/ldefs-boot.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/ldefs-boot.el	Sat Jan 13 22:59:28 2007 +0000
@@ -5782,8 +5782,8 @@
 
 \(fn &optional FACE)" t nil)
 
-(autoload (quote customize-customized) "cus-edit" "\
-Customize all user options set since the last save in this session.
+(autoload (quote customize-unsaved) "cus-edit" "\
+Customize all user options set in this session but not saved.
 
 \(fn)" t nil)
 
@@ -6029,11 +6029,10 @@
 Non-nil if Global-Cwarn mode is enabled.
 See the command `global-cwarn-mode' for a description of this minor-mode.
 Setting this variable directly does not take effect;
-use either \\[customize] or the function `global-cwarn-mode'.")
-
-(custom-autoload (quote global-cwarn-mode) "cwarn")
-
-(put (quote global-cwarn-mode) (quote custom-set) (quote custom-set-minor-mode))
+either customize it (see the info node `Easy Customization')
+or call the function `global-cwarn-mode'.")
+
+(custom-autoload (quote global-cwarn-mode) "cwarn" nil)
 
 (autoload (quote global-cwarn-mode) "cwarn" "\
 Toggle Cwarn mode in every buffer.
@@ -6407,11 +6406,10 @@
 Non-nil if Delete-Selection mode is enabled.
 See the command `delete-selection-mode' for a description of this minor-mode.
 Setting this variable directly does not take effect;
-use either \\[customize] or the function `delete-selection-mode'.")
-
-(custom-autoload (quote delete-selection-mode) "delsel")
-
-(put (quote delete-selection-mode) (quote custom-set) (quote custom-set-minor-mode))
+either customize it (see the info node `Easy Customization')
+or call the function `delete-selection-mode'.")
+
+(custom-autoload (quote delete-selection-mode) "delsel" nil)
 
 (autoload (quote delete-selection-mode) "delsel" "\
 Toggle Delete Selection mode.
@@ -7973,6 +7971,10 @@
 menu-bar keymap.  It can also be a symbol, which has earlier been used as the
 first argument in a call to `easy-menu-define', or the value of such a symbol.
 
+If MAP is specified, it should normally be a keymap; nil stands for the local
+menu-bar keymap.  It can also be a symbol, which has earlier been used as the
+first argument in a call to `easy-menu-define', or the value of such a symbol.
+
 If the menu located by PATH has no submenu named NAME, add one.
 If the optional argument BEFORE is present, add it just before
 the submenu named BEFORE, otherwise add it at the end of the menu.
@@ -9690,7 +9692,7 @@
 A value of t means case-insensitive, a value of nil means case-sensitive.
 Any other value means use the setting of `case-fold-search'.")
 
-(custom-autoload (quote tags-case-fold-search) "etags")
+(custom-autoload (quote tags-case-fold-search) "etags" t)
 
 (defvar tags-table-list nil "\
 *List of file names of tags tables to search.
@@ -9699,7 +9701,7 @@
 If you set this variable, do not also set `tags-file-name'.
 Use the `etags' program to make a tags table file.")
 
-(custom-autoload (quote tags-table-list) "etags")
+(custom-autoload (quote tags-table-list) "etags" t)
 
 (defvar tags-compression-info-list (quote ("" ".Z" ".bz2" ".gz" ".tgz")) "\
 *List of extensions tried by etags when jka-compr is used.
@@ -9708,7 +9710,7 @@
 \(i.e. via customize of `auto-compression-mode' or by calling the function
 `auto-compression-mode').")
 
-(custom-autoload (quote tags-compression-info-list) "etags")
+(custom-autoload (quote tags-compression-info-list) "etags" t)
 
 (defvar tags-add-tables (quote ask-user) "\
 *Control whether to add a new tags table to the current list.
@@ -9716,14 +9718,14 @@
 Any other value means ask the user whether to add a new tags table
 to the current list (as opposed to starting a new list).")
 
-(custom-autoload (quote tags-add-tables) "etags")
+(custom-autoload (quote tags-add-tables) "etags" t)
 
 (defvar find-tag-hook nil "\
 *Hook to be run by \\[find-tag] after finding a tag.  See `run-hooks'.
 The value in the buffer in which \\[find-tag] is done is used,
 not the value in the buffer \\[find-tag] goes to.")
 
-(custom-autoload (quote find-tag-hook) "etags")
+(custom-autoload (quote find-tag-hook) "etags" t)
 
 (defvar find-tag-default-function nil "\
 *A function of no arguments used by \\[find-tag] to pick a default tag.
@@ -9731,7 +9733,7 @@
 has a `find-tag-default-function' property (see `put'), that is used.
 Otherwise, `find-tag-default' is used.")
 
-(custom-autoload (quote find-tag-default-function) "etags")
+(custom-autoload (quote find-tag-default-function) "etags" t)
 
 (autoload (quote tags-table-mode) "etags" "\
 Major mode for tags table file buffers.
@@ -13360,11 +13362,10 @@
 Non-nil if Global-Hi-Lock mode is enabled.
 See the command `global-hi-lock-mode' for a description of this minor-mode.
 Setting this variable directly does not take effect;
-use either \\[customize] or the function `global-hi-lock-mode'.")
-
-(custom-autoload (quote global-hi-lock-mode) "hi-lock")
-
-(put (quote global-hi-lock-mode) (quote custom-set) (quote custom-set-minor-mode))
+either customize it (see the info node `Easy Customization')
+or call the function `global-hi-lock-mode'.")
+
+(custom-autoload (quote global-hi-lock-mode) "hi-lock" nil)
 
 (autoload (quote global-hi-lock-mode) "hi-lock" "\
 Toggle Hi-Lock mode in every buffer.
@@ -15009,6 +15010,15 @@
 
 \(fn)" nil nil)
 
+(autoload (quote image-type-auto-detected-p) "image" "\
+Return t iff the current buffer contains an auto-detectable image.
+Whether image types are auto-detectable or not depends on the setting
+of the variable `image-type-auto-detectable'.
+
+This function is intended to be used from `magic-mode-alist' (which see).
+
+\(fn)" nil nil)
+
 (autoload (quote create-image) "image" "\
 Create an image.
 FILE-OR-DATA is an image file name or image data.
@@ -15136,7 +15146,7 @@
 `auto-image-file-mode' is re-enabled; this happens automatically when
 the variable is set using \\[customize].")
 
-(custom-autoload (quote image-file-name-extensions) "image-file")
+(custom-autoload (quote image-file-name-extensions) "image-file" nil)
 
 (defvar image-file-name-regexps nil "\
 *List of regexps matching image-file filenames.
@@ -15148,7 +15158,7 @@
 `auto-image-file-mode' is re-enabled; this happens automatically when
 the variable is set using \\[customize].")
 
-(custom-autoload (quote image-file-name-regexps) "image-file")
+(custom-autoload (quote image-file-name-regexps) "image-file" nil)
 
 (autoload (quote image-file-name-regexp) "image-file" "\
 Return a regular expression matching image-file filenames.
@@ -15166,11 +15176,10 @@
 Non-nil if Auto-Image-File mode is enabled.
 See the command `auto-image-file-mode' for a description of this minor-mode.
 Setting this variable directly does not take effect;
-use either \\[customize] or the function `auto-image-file-mode'.")
-
-(custom-autoload (quote auto-image-file-mode) "image-file")
-
-(put (quote auto-image-file-mode) (quote custom-set) (quote custom-set-minor-mode))
+either customize it (see the info node `Easy Customization')
+or call the function `auto-image-file-mode'.")
+
+(custom-autoload (quote auto-image-file-mode) "image-file" nil)
 
 (autoload (quote auto-image-file-mode) "image-file" "\
 Toggle visiting of image files as images.
@@ -15391,12 +15400,12 @@
 mode.  Default is whitespace followed by 0 or 1 single-letter colon-keyword
 \(as in :a, :c, etc.)")
 
-(custom-autoload (quote inferior-lisp-filter-regexp) "inf-lisp")
+(custom-autoload (quote inferior-lisp-filter-regexp) "inf-lisp" t)
 
 (defvar inferior-lisp-program "lisp" "\
 *Program name for invoking an inferior Lisp in Inferior Lisp mode.")
 
-(custom-autoload (quote inferior-lisp-program) "inf-lisp")
+(custom-autoload (quote inferior-lisp-program) "inf-lisp" t)
 
 (defvar inferior-lisp-load-command "(load \"%s\")\n" "\
 *Format-string for building a Lisp expression to load a file.
@@ -15407,7 +15416,7 @@
 produces cosmetically superior output for this application,
 but it works only in Common Lisp.")
 
-(custom-autoload (quote inferior-lisp-load-command) "inf-lisp")
+(custom-autoload (quote inferior-lisp-load-command) "inf-lisp" t)
 
 (defvar inferior-lisp-prompt "^[^> \n]*>+:? *" "\
 Regexp to recognize prompts in the Inferior Lisp mode.
@@ -15425,7 +15434,7 @@
 
 This is a fine thing to set in your .emacs file or through Custom.")
 
-(custom-autoload (quote inferior-lisp-prompt) "inf-lisp")
+(custom-autoload (quote inferior-lisp-prompt) "inf-lisp" t)
 
 (defvar inferior-lisp-mode-hook (quote nil) "\
 *Hook for customising Inferior Lisp mode.")
@@ -16322,28 +16331,28 @@
 When selecting the plain numeric keypad setup, the character returned by the
 decimal key must be specified.")
 
-(custom-autoload (quote keypad-setup) "keypad")
+(custom-autoload (quote keypad-setup) "keypad" nil)
 
 (defvar keypad-numlock-setup nil "\
 Specifies the keypad setup for unshifted keypad keys when NumLock is on.
 When selecting the plain numeric keypad setup, the character returned by the
 decimal key must be specified.")
 
-(custom-autoload (quote keypad-numlock-setup) "keypad")
+(custom-autoload (quote keypad-numlock-setup) "keypad" nil)
 
 (defvar keypad-shifted-setup nil "\
 Specifies the keypad setup for shifted keypad keys when NumLock is off.
 When selecting the plain numeric keypad setup, the character returned by the
 decimal key must be specified.")
 
-(custom-autoload (quote keypad-shifted-setup) "keypad")
+(custom-autoload (quote keypad-shifted-setup) "keypad" nil)
 
 (defvar keypad-numlock-shifted-setup nil "\
 Specifies the keypad setup for shifted keypad keys when NumLock is off.
 When selecting the plain numeric keypad setup, the character returned by the
 decimal key must be specified.")
 
-(custom-autoload (quote keypad-numlock-shifted-setup) "keypad")
+(custom-autoload (quote keypad-numlock-shifted-setup) "keypad" nil)
 
 (autoload (quote keypad-setup) "keypad" "\
 Set keypad bindings in function-key-map according to SETUP.
@@ -17286,7 +17295,7 @@
 Otherwise, (the default) use a smaller, somewhat faster, and
 often correct parser.")
 
-(custom-autoload (quote mail-use-rfc822) "mail-utils")
+(custom-autoload (quote mail-use-rfc822) "mail-utils" t)
 
 (autoload (quote mail-file-babyl-p) "mail-utils" "\
 Not documented
@@ -23124,7 +23133,7 @@
 
 By default, `identity' is set.")
 
-(custom-autoload (quote rmail-summary-line-decoder) "rmailsum")
+(custom-autoload (quote rmail-summary-line-decoder) "rmailsum" t)
 
 (defvar rmail-user-mail-address-regexp nil "\
 *Regexp matching user mail addresses.
@@ -23567,7 +23576,7 @@
 Set this by calling the `savehist-mode' function or using the customize
 interface.")
 
-(custom-autoload (quote savehist-mode) "savehist")
+(custom-autoload (quote savehist-mode) "savehist" nil)
 
 (autoload (quote savehist-mode) "savehist" "\
 Toggle savehist-mode.
@@ -24682,7 +24691,7 @@
 
 would give military-style times like `21:07 (UTC)'.")
 
-(custom-autoload (quote calendar-time-display-form) "solar")
+(custom-autoload (quote calendar-time-display-form) "solar" t)
 
 (defvar calendar-latitude nil "\
 *Latitude of `calendar-location-name' in degrees.
@@ -24694,7 +24703,7 @@
 
 This variable should be set in `site-start'.el.")
 
-(custom-autoload (quote calendar-latitude) "solar")
+(custom-autoload (quote calendar-latitude) "solar" t)
 
 (defvar calendar-longitude nil "\
 *Longitude of `calendar-location-name' in degrees.
@@ -24706,7 +24715,7 @@
 
 This variable should be set in `site-start'.el.")
 
-(custom-autoload (quote calendar-longitude) "solar")
+(custom-autoload (quote calendar-longitude) "solar" t)
 
 (defvar calendar-location-name (quote (let ((float-output-format "%.1f")) (format "%s%s, %s%s" (if (numberp calendar-latitude) (abs calendar-latitude) (+ (aref calendar-latitude 0) (/ (aref calendar-latitude 1) 60.0))) (if (numberp calendar-latitude) (if (> calendar-latitude 0) "N" "S") (if (equal (aref calendar-latitude 2) (quote north)) "N" "S")) (if (numberp calendar-longitude) (abs calendar-longitude) (+ (aref calendar-longitude 0) (/ (aref calendar-longitude 1) 60.0))) (if (numberp calendar-longitude) (if (> calendar-longitude 0) "E" "W") (if (equal (aref calendar-longitude 2) (quote east)) "E" "W"))))) "\
 *Expression evaluating to name of `calendar-longitude', `calendar-latitude'.
@@ -24715,7 +24724,7 @@
 
 This variable should be set in `site-start'.el.")
 
-(custom-autoload (quote calendar-location-name) "solar")
+(custom-autoload (quote calendar-location-name) "solar" t)
 
 (autoload (quote sunrise-sunset) "solar" "\
 Local time of sunrise and sunset for today.  Accurate to a few seconds.
@@ -28017,7 +28026,7 @@
 (autoload (quote tramp-completion-handle-file-name-all-completions) "tramp" "\
 Like `file-name-all-completions' for partial tramp files.
 
-\(fn FILENAME DIRECTORY)" nil nil)
+\(fn FILENAME DIRECTORY &optional PREDICATE)" nil nil)
 
 (autoload (quote tramp-completion-handle-file-name-completion) "tramp" "\
 Like `file-name-completion' for tramp files.
@@ -30532,7 +30541,8 @@
 Non-nil if Which-Function mode is enabled.
 See the command `which-function-mode' for a description of this minor-mode.
 Setting this variable directly does not take effect;
-use either \\[customize] or the function `which-function-mode'.")
+either customize it (see the info node `Easy Customization')
+or call the function `which-function-mode'.")
 
 (custom-autoload (quote which-function-mode) "which-func" nil)
 
@@ -30778,7 +30788,7 @@
 Setting this variable directly does not take effect;
 use either \\[customize] or the function `winner-mode'.")
 
-(custom-autoload (quote winner-mode) "winner")
+(custom-autoload (quote winner-mode) "winner" nil)
 
 (autoload (quote winner-mode) "winner" "\
 Toggle Winner mode.
@@ -31150,10 +31160,9 @@
 ;;;;;;  "net/eudcb-bbdb.el" "net/eudcb-ldap.el" "net/eudcb-mab.el"
 ;;;;;;  "net/eudcb-ph.el" "net/ldap.el" "net/netrc.el" "net/tls.el"
 ;;;;;;  "net/tramp-smb.el" "net/tramp-util.el" "net/tramp-uu.el"
-;;;;;;  "net/tramp-vc.el" "net/trampver.el" "obsolete/bg-mouse.el"
-;;;;;;  "obsolete/hilit19.el" "obsolete/sc.el" "obsolete/uncompress.el"
-;;;;;;  "patcomp.el" "paths.el" "pcvs-info.el" "pcvs-parse.el" "pcvs-util.el"
-;;;;;;  "pgg-def.el" "pgg-parse.el" "pgg-pgp.el" "pgg-pgp5.el" "play/gamegrid.el"
+;;;;;;  "net/tramp-vc.el" "net/trampver.el" "patcomp.el" "paths.el"
+;;;;;;  "pcvs-info.el" "pcvs-parse.el" "pcvs-util.el" "pgg-def.el"
+;;;;;;  "pgg-parse.el" "pgg-pgp.el" "pgg-pgp5.el" "play/gamegrid.el"
 ;;;;;;  "play/gametree.el" "play/meese.el" "progmodes/ada-prj.el"
 ;;;;;;  "progmodes/cc-align.el" "progmodes/cc-awk.el" "progmodes/cc-bytecomp.el"
 ;;;;;;  "progmodes/cc-cmds.el" "progmodes/cc-defs.el" "progmodes/cc-fonts.el"
--- a/lisp/net/tramp.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/net/tramp.el	Sat Jan 13 22:59:28 2007 +0000
@@ -2,7 +2,7 @@
 ;;; tramp.el --- Transparent Remote Access, Multiple Protocol
 
 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006 Free Software Foundation, Inc.
+;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net>
 ;;         Michael Albinus <michael.albinus@gmx.de>
@@ -5540,32 +5540,36 @@
   (let (found item pattern action todo)
     (erase-buffer)
     (tramp-message 9 "Waiting 60s for prompt from remote shell")
-    (with-timeout (60 (throw 'tramp-action 'timeout))
-      (while (not found)
-	(tramp-accept-process-output p 1)
+    (while (not found)
+      (tramp-accept-process-output p 1)
+      (goto-char (point-min))
+      (setq todo actions)
+      (while todo
 	(goto-char (point-min))
-	(setq todo actions)
-	(while todo
-	  (goto-char (point-min))
-	  (setq item (pop todo))
-	  (setq pattern (symbol-value (nth 0 item)))
-	  (setq action (nth 1 item))
-	  (tramp-message 10 "Looking for regexp \"%s\" from remote shell"
-			 pattern)
-	  (when (re-search-forward (concat pattern "\\'") nil t)
-	    (setq found (funcall action p multi-method method user host)))))
-      found)))
-
-(defun tramp-process-actions (p multi-method method user host actions)
-  "Perform actions until success."
+	(setq item (pop todo))
+	(setq pattern (symbol-value (nth 0 item)))
+	(setq action (nth 1 item))
+	(tramp-message 10 "Looking for regexp \"%s\" from remote shell"
+		       pattern)
+	(when (re-search-forward (concat pattern "\\'") nil t)
+	  (setq found (funcall action p multi-method method user host)))))
+    found))
+
+(defun tramp-process-actions
+  (p multi-method method user host actions &optional timeout)
+  "Perform actions until success or TIMEOUT."
   (tramp-message 10 "%s" (mapconcat 'identity (process-command p) " "))
   (let (exit)
     (while (not exit)
       (tramp-message 9 "Waiting for prompts from remote shell")
       (setq exit
 	    (catch 'tramp-action
-	      (tramp-process-one-action
-	       p multi-method method user host actions)
+	      (if timeout
+		  (with-timeout (timeout)
+		    (tramp-process-one-action
+		     p multi-method method user host actions))
+		(tramp-process-one-action
+		 p multi-method method user host actions))
 	      nil)))
     (unless (eq exit 'ok)
       (tramp-clear-passwd user host)
@@ -5689,7 +5693,7 @@
 	(set-buffer (tramp-get-buffer multi-method method user host))
 	(erase-buffer)
 	(tramp-process-actions p multi-method method user host
-			       tramp-actions-before-shell)
+			       tramp-actions-before-shell 60)
         (tramp-open-connection-setup-interactive-shell
          p multi-method method user host)
         (tramp-post-connection multi-method method user host)))))
@@ -5762,7 +5766,7 @@
 
 	(set-buffer buf)
 	(tramp-process-actions p multi-method method user host
-			       tramp-actions-before-shell)
+			       tramp-actions-before-shell 60)
         (tramp-message 7 "Initializing remote shell")
         (tramp-open-connection-setup-interactive-shell
          p multi-method method user host)
@@ -5823,7 +5827,7 @@
         (tramp-set-process-query-on-exit-flag p nil)
 	(set-buffer (tramp-get-buffer multi-method method user host))
 	(tramp-process-actions p multi-method method user host
-			       tramp-actions-before-shell)
+			       tramp-actions-before-shell 60)
         (tramp-open-connection-setup-interactive-shell
          p multi-method method user host)
         (tramp-post-connection multi-method method
--- a/lisp/progmodes/cc-langs.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/progmodes/cc-langs.el	Sat Jan 13 22:59:28 2007 +0000
@@ -208,23 +208,31 @@
   ;; Some helper functions used when building the language constants.
 
   (defun c-filter-ops (ops opgroup-filter op-filter &optional xlate)
-    ;; Used to filter operators from the list OPS in a DWIM:ey way:
-    ;; OPS either has the structure of `c-operators', as a single
+    ;; Extract a subset of the operators in the list OPS in a DWIM:ey
+    ;; way.  The return value is a plain list of operators:  
+    ;; 
+    ;; OPS either has the structure of `c-operators', is a single
     ;; group in `c-operators', or is a plain list of operators.
-    ;; OPGROUP-FILTER is used filter out the operator groups.  It can
-    ;; be t to choose all groups, a list of the group type symbols to
-    ;; accept, or a function which will be called with the group
-    ;; symbol for each group and should return non-nil for those to
-    ;; include.  OP-FILTER filters the individual operators in each
-    ;; group.  It can be t to choose all operators, a regexp to test
-    ;; against each operator, or a function which will be called for
-    ;; each operator and should return non-nil for those to include.
+    ;; 
+    ;; OPGROUP-FILTER specifies how to select the operator groups.  It
+    ;; can be t to choose all groups, a list of group type symbols
+    ;; (such as 'prefix) to accept, or a function which will be called
+    ;; with the group symbol for each group and should return non-nil
+    ;; if that group is to be included.
+    ;;
+    ;; OP-FILTER filters the individual operators in each group.  It
+    ;; can be t to choose all operators, a regexp to test against each
+    ;; operator, or a function which will be called for each operator
+    ;; and should return non-nil for those to include.
+    ;;
     ;; If XLATE is given, it's a function which is called for each
     ;; matching operator and its return value is collected instead.
     ;; If it returns a list, the elements are spliced directly into
     ;; the final result, which is returned as a list with duplicates
-    ;; removed using `equal'.  `c-mode-syntax-table' for the current
-    ;; mode is in effect during the whole procedure.
+    ;; removed using `equal'.
+    ;;
+    ;; `c-mode-syntax-table' for the current mode is in effect during
+    ;; the whole procedure.
     (unless (listp (car-safe ops))
       (setq ops (list ops)))
     (cond ((eq opgroup-filter t)
@@ -719,11 +727,11 @@
 (c-lang-defconst c-operators
   "List describing all operators, along with their precedence and
 associativity.  The order in the list corresponds to the precedence of
-the operators: The operators in each element is a group with the same
+the operators: The operators in each element are a group with the same
 precedence, and the group has higher precedence than the groups in all
-following elements.  The car of each element describes the type of of
-the operator group, and the cdr is a list of the operator tokens in
-it.  The operator group types are:
+following elements.  The car of each element describes the type of the
+operator group, and the cdr is a list of the operator tokens in it.
+The operator group types are:
 
 'prefix         Unary prefix operators.
 'postfix        Unary postfix operators.
--- a/lisp/progmodes/compile.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/progmodes/compile.el	Sat Jan 13 22:59:28 2007 +0000
@@ -876,12 +876,12 @@
 Runs COMMAND, a shell command, in a separate process asynchronously
 with output going to the buffer `*compilation*'.
 
+You can then use the command \\[next-error] to find the next error message
+and move to the source code that caused it.
+
 If optional second arg COMINT is t the buffer will be in Comint mode with
 `compilation-shell-minor-mode'.
 
-You can then use the command \\[next-error] to find the next error message
-and move to the source code that caused it.
-
 Interactively, prompts for the command if `compilation-read-command' is
 non-nil; otherwise uses `compile-command'.  With prefix arg, always prompts.
 Additionally, with universal prefix arg, compilation buffer will be in
--- a/lisp/progmodes/vhdl-mode.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/progmodes/vhdl-mode.el	Sat Jan 13 22:59:28 2007 +0000
@@ -13851,7 +13851,7 @@
 	    (vhdl-save-cache (car project-list))
 	    (setq project-list (cdr project-list)))
 	  (message "Saving hierarchy caches...done")))
-    (error (progn (vhdl-warning "ERROR:  An error occured while saving the hierarchy caches")
+    (error (progn (vhdl-warning "ERROR:  An error occurred while saving the hierarchy caches")
 		  (sit-for 2)))))
 
 (defun vhdl-save-cache (key)
--- a/lisp/replace.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/replace.el	Sat Jan 13 22:59:28 2007 +0000
@@ -467,10 +467,9 @@
 In interactive calls, the replacement text may contain `\\,'
 followed by a Lisp expression used as part of the replacement
 text.  Inside of that expression, `\\&' is a string denoting the
-whole match, `\\N' a partial matches, `\\#&' and `\\#N' the
-respective numeric values from `string-to-number', and `\\#'
-itself for `replace-count', the number of replacements occured so
-far.
+whole match, `\\N' a partial match, `\\#&' and `\\#N' the respective
+numeric values from `string-to-number', and `\\#' itself for
+`replace-count', the number of replacements occurred so far.
 
 If your Lisp expression is an identifier and the next letter in
 the replacement string would be interpreted as part of it, you
--- a/lisp/server.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/server.el	Sat Jan 13 22:59:28 2007 +0000
@@ -1,7 +1,7 @@
 ;;; server.el --- Lisp code for GNU Emacs running as server process
 
 ;; Copyright (C) 1986, 1987, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-;;   2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+;;   2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: William Sommerfeld <wesommer@athena.mit.edu>
 ;; Maintainer: FSF
@@ -435,7 +435,7 @@
       (letf (((default-file-modes) ?\700)) (make-directory dir t))
       (setq attrs (file-attributes dir)))
     ;; Check that it's safe for use.
-    (unless (and (eq t (car attrs)) (eq (nth 2 attrs) (user-uid))
+    (unless (and (eq t (car attrs)) (eql (nth 2 attrs) (user-uid))
                  (or (eq system-type 'windows-nt)
                      (zerop (logand ?\077 (file-modes dir)))))
       (error "The directory %s is unsafe" dir))))
--- a/lisp/subr.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/subr.el	Sat Jan 13 22:59:28 2007 +0000
@@ -1905,11 +1905,11 @@
 	      (recenter (/ (window-height) 2)))
 	  ;; If that pushed message start off the screen,
 	  ;; scroll to start it at the top of the screen.
-	  (move-to-window-line 0)
-	  (if (> (point) pos)
-	      (progn
+	  (save-excursion
+	    (move-to-window-line 0)
+	    (if (> (point) pos)
 		(goto-char pos)
-		(recenter 0)))
+	      (recenter 0)))
 	  (message (or message "Type %s to continue editing.")
 		   (single-key-description exit-char))
 	  (let (char)
@@ -2695,7 +2695,7 @@
 which correctly parses CSV format, for example.
 
 Note that the effect of `(split-string STRING)' is the same as
-`(split-string STRING split-string-default-separators t)').  In the rare
+`(split-string STRING split-string-default-separators t)'.  In the rare
 case that you wish to retain zero-length substrings when splitting on
 whitespace, use `(split-string STRING split-string-default-separators)'.
 
--- a/lisp/term/mac-win.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/term/mac-win.el	Sat Jan 13 22:59:28 2007 +0000
@@ -2177,7 +2177,7 @@
     ("TIFF" . mac-dnd-insert-TIFF))
   "Which function to call to handle a drop of that type.
 The function takes three arguments, WINDOW, ACTION and DATA.
-WINDOW is where the drop occured, ACTION is always `private' on
+WINDOW is where the drop occurred, ACTION is always `private' on
 Mac.  DATA is the drop data.  Unlike the x-dnd counterpart, the
 return value of the function is not significant.
 
--- a/lisp/textmodes/fill.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/textmodes/fill.el	Sat Jan 13 22:59:28 2007 +0000
@@ -743,7 +743,7 @@
 
 (defun fill-minibuffer-function (arg)
   "Fill a paragraph in the minibuffer, ignoring the prompt."
-  (save-restriction 
+  (save-restriction
     (narrow-to-region (minibuffer-prompt-end) (point-max))
     (fill-paragraph arg)))
 
@@ -838,18 +838,22 @@
 	     (commark
 	      (comment-string-strip (buffer-substring comstart comin) nil t))
 	     (comment-re
-	      ;; `commark' is surrounded with arbitrary text (`\0' and `a')
-	      ;;  to make sure it can be used as an optimization of
-	      ;; `comment-start-skip' in the middle of a line.  For example,
-	      ;; `commark' can't be used with the "@c" in TeXinfo (hence
-	      ;; the `a') or with the "C" at BOL in Fortran (hence the `\0').
-	      (if (string-match comment-start-skip (concat "\0" commark "a"))
-		  (concat "[ \t]*" (regexp-quote commark)
-			  ;; Make sure we only match comments that use
-			  ;; the exact same comment marker.
-			  "[^" (substring commark -1) "]")
-		(concat "[ \t]*\\(?:" comment-start-skip "\\)")))
-	     (comment-fill-prefix	; Compute a fill prefix.
+              ;; A regexp more specialized than comment-start-skip, that only
+              ;; matches the current commark rather than any valid commark.
+              ;;
+              ;; The specialized regexp only works for "normal" comment
+              ;; syntax, not for Texinfo's "@c" (which can't be immediately
+              ;; followed by word-chars) or Fortran's "C" (which needs to be
+              ;; at bol), so check that comment-start-skip indeed allows the
+              ;; commark to appear in the middle of the line and followed by
+              ;; word chars.  The choice of "\0" and "a" is mostly arbitrary.
+              (if (string-match comment-start-skip (concat "\0" commark "a"))
+                  (concat "[ \t]*" (regexp-quote commark)
+                          ;; Make sure we only match comments that
+                          ;; use the exact same comment marker.
+                          "[^" (substring commark -1) "]")
+                (concat "[ \t]*\\(?:" comment-start-skip "\\)")))
+             (comment-fill-prefix	; Compute a fill prefix.
 	      (save-excursion
 		(goto-char comstart)
 		(if has-code-and-comment
@@ -944,13 +948,13 @@
 
 Noninteractively, the third argument JUSTIFY specifies which
 kind of justification to do: `full', `left', `right', `center',
-or `none' (equivalent to nil).  t means handle each paragraph
-as specified by its text properties.
+or `none' (equivalent to nil).  A value of t means handle each
+paragraph as specified by its text properties.
 
-The fourth arg NOSQUEEZE non-nil means to leave
-whitespace other than line breaks untouched, and fifth arg TO-EOP
-non-nil means to keep filling to the end of the paragraph (or next
-hard newline, if variable `use-hard-newlines' is on).
+The fourth arg NOSQUEEZE non-nil means to leave whitespace other
+than line breaks untouched, and fifth arg TO-EOP non-nil means
+to keep filling to the end of the paragraph (or next hard newline,
+if variable `use-hard-newlines' is on).
 
 Return the fill-prefix used for filling the last paragraph.
 
--- a/lisp/tumme.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/tumme.el	Sat Jan 13 22:59:28 2007 +0000
@@ -1646,7 +1646,7 @@
 
 ;;;###autoload
 (defun tumme-display-thumb ()
-  "Shorthard for `tumme-display-thumbs' with prefix argument."
+  "Shorthand for `tumme-display-thumbs' with prefix argument."
   (interactive)
   (tumme-display-thumbs t nil t))
 
--- a/lisp/tutorial.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/tutorial.el	Sat Jan 13 22:59:28 2007 +0000
@@ -446,7 +446,8 @@
             (cond ((eq key-fun def-fun)
                    ;; No rebinding, return t
                    t)
-                  ((eq key-fun (command-remapping def-fun))
+                  ((and key-fun
+			(eq key-fun (command-remapping def-fun)))
                    ;; Just a remapping, return t
                    t)
                   ;; cua-mode specials:
@@ -571,6 +572,8 @@
 		  (where   (nth 3 ck))
 		  s1 s2 help-string)
 	     (unless (string= where "Same key")
+	       (when (string= where "")
+		 (setq where (format "M-x %s" def-fun)))
 	       (setq tutorial--point-after-chkeys (point-marker)
 		     s1 (get-lang-string tutorial--lang 'tut-chgdkey)
 		     s2 (get-lang-string tutorial--lang 'tut-chgdkey2)
--- a/lisp/wdired.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/wdired.el	Sat Jan 13 22:59:28 2007 +0000
@@ -576,8 +576,11 @@
             (funcall command 1)
             (setq arg (1- arg)))
         (error
-         (if (not (forward-word 1))
-             (setq arg 0)))))))
+         (if (forward-word)
+	     ;; Skip any non-word characters to avoid triggering a read-only
+	     ;; error which would cause skipping the next word characters too.
+	     (skip-syntax-forward "^w")
+	   (setq arg 0)))))))
 
 (defun wdired-downcase-word (arg)
   "WDired version of `downcase-word'.
--- a/lisp/x-dnd.el	Sat Jan 06 15:25:16 2007 +0000
+++ b/lisp/x-dnd.el	Sat Jan 13 22:59:28 2007 +0000
@@ -70,7 +70,7 @@
   "Which function to call to handle a drop of that type.
 If the type for the drop is not present, or the function is nil,
 the drop is rejected.  The function takes three arguments, WINDOW, ACTION
-and DATA.  WINDOW is where the drop occured, ACTION is the action for
+and DATA.  WINDOW is where the drop occurred, ACTION is the action for
 this drop (copy, move, link, private or ask) as determined by a previous
 call to `x-dnd-test-function'.  DATA is the drop data.
 The function shall return the action used (copy, move, link or private) if drop
--- a/man/ChangeLog	Sat Jan 06 15:25:16 2007 +0000
+++ b/man/ChangeLog	Sat Jan 13 22:59:28 2007 +0000
@@ -1,3 +1,8 @@
+2007-01-10  Richard Stallman  <rms@gnu.org>
+
+	* msdog.texi (Windows Keyboard): Yet another try to make
+	everyone happy with that passage.
+
 2007-01-05  Richard Stallman  <rms@gnu.org>
 
 	* anti.texi (Antinews): Mention M-x shell scrolling.
--- a/man/msdog.texi	Sat Jan 06 15:25:16 2007 +0000
+++ b/man/msdog.texi	Sat Jan 13 22:59:28 2007 +0000
@@ -336,12 +336,12 @@
 @cindex MS-Windows keyboard shortcuts
   Many key combinations (known as ``keyboard shortcuts'') that have
 conventional uses in MS-Windows programs conflict with traditional
-Emacs commands.  This conflict arose because the designers of the CUA
-interface implemented by MS-Windows did not try to avoid conflict with
-Emacs.  Examples of conflicts include @kbd{C-c}, @kbd{C-x}, @kbd{C-z},
-@kbd{C-a}, and @kbd{W-@key{SPC}}.  You can redefine some of them with
-meanings more like the MS-Windows meanings by enabling CUA Mode
-(@pxref{CUA Bindings}).
+Emacs commands.  (These Emacs commands were established years before
+MS-Windows, and years before Microsoft.)  Examples of conflicts
+include @kbd{C-c}, @kbd{C-x}, @kbd{C-z}, @kbd{C-a}, and
+@kbd{W-@key{SPC}}.  You can redefine some of them with meanings more
+like the MS-Windows meanings by enabling CUA Mode (@pxref{CUA
+Bindings}).
 
 @kindex F10 @r{(MS-Windows)}
 @cindex menu bar access using keyboard @r{(MS-Windows)}
--- a/nt/ChangeLog	Sat Jan 06 15:25:16 2007 +0000
+++ b/nt/ChangeLog	Sat Jan 13 22:59:28 2007 +0000
@@ -1,3 +1,7 @@
+2007-01-10  Jason Rumney  <jasonr@gnu.org>
+
+	* README: Update URLs and advice about reporting bugs.
+
 2006-12-29  Jason Rumney  <jasonr@gnu.org>
 
 	* nmake.defs (TEMACS_EXTRA_LINK): Remove duplicated flags from
--- a/nt/README	Sat Jan 06 15:25:16 2007 +0000
+++ b/nt/README	Sat Jan 13 22:59:28 2007 +0000
@@ -1,7 +1,7 @@
 	     Emacs for Windows NT/2000 and Windows 95/98/ME
 
-  Copyright (C) 2001, 2002, 2003, 2004, 2005,
-     2006 Free Software Foundation, Inc.
+  Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
+     2007 Free Software Foundation, Inc.
   See the end of the INSTALL file in this directory for copying permissions.
 
   This directory contains support for compiling and running GNU Emacs on
@@ -12,7 +12,7 @@
 
   Precompiled distributions are also available; ftp to
 
-	ftp://ftp.gnu.org/gnu/windows/emacs/latest/
+	ftp://ftp.gnu.org/gnu/emacs/windows/
 
   for the latest precompiled distributions.
 
@@ -59,22 +59,12 @@
   about it.  First check the file etc/PROBLEMS and the FAQ on the web
   page above to see if the bug is already known and if there are any
   workarounds.  If not, then check whether the bug has something to do
-  with code in your .emacs file, e.g. by invoking Emacs with the "-q
-  --no-site-file" options.
+  with code in your .emacs file, e.g. by invoking Emacs with the "-Q"
+  option.
 
-  If you decide that it is a bug in Emacs that might be specific to the
-  Windows port, send a message to the help-emacs-windows@gnu.org
-  mailing list describing the bug, the version of Emacs that you are
-  using, and the operating system that you are running on (Windows NT,
-  95 or 98 including service pack level if known).  If the bug is
-  related to subprocesses, also specify which shell you are using (e.g.,
-  include the values of `shell-file-name' and `shell-explicit-file-name'
-  in your message).
-
-  If you think the bug is not specific to the Windows port of Emacs,
-  then it is better to mail the bug report to bug-gnu-emacs@gnu.org so
-  that it will be seen by the right people.  If Emacs has been set up to
-  send mail, you can use the command M-x report-emacs-bug to create and
-  send the bug report, but in some cases there is a function to report
-  bugs in a specific package; e.g. M-x gnus-bug for Gnus, M-x
-  c-submit-bug-report for C/C++/Java mode, etc.
+  Use the built in bug reporting functionality in Emacs so that it
+  will be seen by the right people.  You can use the command M-x
+  report-emacs-bug to create and send the bug report, but in some
+  cases there is a function to report bugs in a specific package;
+  e.g. M-x gnus-bug for Gnus, M-x c-submit-bug-report for C/C++/Java
+  mode, etc.
--- a/src/ChangeLog	Sat Jan 06 15:25:16 2007 +0000
+++ b/src/ChangeLog	Sat Jan 13 22:59:28 2007 +0000
@@ -1,3 +1,71 @@
+2007-01-10  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* editfns.c (Fformat): Allow integer-format to work with floats of size
+	larger than most-positive-fixnum (but still smaller than MAXINT).
+
+	* dired.c (Ffile_attributes): Use floats for large uids/gids.
+
+2007-01-09  Eli Zaretskii  <eliz@gnu.org>
+
+	* emacs.c (syms_of_emacs) <path-separator>: Doc fix.
+
+2007-01-09  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* callproc.c (Fcall_process_region) [HAVE_MKSTEMP]: Add BLOCK_INPUT
+	around mkstemp.
+
+	* image.c (XDrawLine) [MAC_OS]: Remove macro.
+	(XCreateGC_pixmap) [!HAVE_NTGUI]: Likewise.
+	(x_disable_image) [!HAVE_NTGUI]: Use XCreateGC instead of
+	XCreateGC_pixmap.
+
+	* macgui.h (Display): Typedef to opaque type.
+
+	* macmenu.c (mac_dialog_modal_filter) [MAC_OSX]: New function.
+	(Fx_popup_dialog) [MAC_OSX]: Use standard alert if called from
+	Fmessage_box, Fyes_or_no_p, or Fy_or_n_p.
+	[MAC_OS_X_VERSION_MAX_ALLOWED >= 1030] (menu_quit_handler):
+	Use mac_quit_char_key_p.
+
+	* macterm.c (XDrawLine): Rename from mac_draw_line_to_pixmap.
+	(XCreateGC): Change type of 2nd argument to void *.
+	(XFreeGC) [USE_CG_DRAWING && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030]:
+	Fix last change.
+	(mac_to_emacs_modifiers): Change return type to int.
+	[USE_CARBON_EVENTS] (mac_event_to_emacs_modifiers): Likewise.
+	(mac_mapped_modifiers): New function.
+	(XTread_socket): Use it.
+	[USE_TSM] (mac_handle_text_input_event): Likewise.
+	(do_window_update) [USE_CG_DRAWING]: Call mac_prepare_for_quickdraw.
+	(mac_quit_char_modifiers, mac_quit_char_keycode) [MAC_OSX]:
+	Remove variables.
+	(mac_determine_quit_char_modifiers, init_quit_char_handler)
+	[MAC_OSX]: Remove functions.
+	(make_ctrl_char) [MAC_OSX]: Add extern.
+	(mac_quit_char_key_p) [MAC_OSX]: New function.
+	(mac_initialize) [MAC_OSX]: Don't call init_quit_char_handler.
+
+	* macterm.h (FONT_MAX_WIDTH): Remove unused macro.
+	(XCreateGC): Change type in extern.
+	(XDrawLine): Rename from mac_draw_line_to_pixmap.
+	(mac_quit_char_key_p) [MAC_OSX]: Add extern.
+
+2007-01-08  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
+
+	* keyboard.c (init_keyboard): Initialize interrupt_input_blocked and
+	interrupt_input_pending.
+
+	* xterm.h (x_display_info): New: net_supported_atoms,
+	nr_net_supported_atoms and net_supported_window.
+
+	* xterm.c: New variable last_user_time.
+	(handle_one_xevent): Set last_user_time from events that have Time.
+	Set net_supported_window to 0 when reparented.
+	(wm_supports): New function.
+	(do_ewmh_fullscreen): Use wm_supports to check for _NET_WM_STATE.
+	(x_term_init): Initialize net_supported_atoms, nr_net_supported_atoms
+	and net_supported_window.
+
 2007-01-05  Kim F. Storm  <storm@cua.dk>
 
 	* indent.c (Fvertical_motion): Fix it overshoot check for overlay
@@ -148,8 +216,8 @@
 
 2006-12-22  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
-	* macfns.c (mac_update_title_bar) [TARGET_API_MAC_CARBON]: Call
-	mac_update_proxy_icon also when buffer modification flag changed.
+	* macfns.c (mac_update_title_bar) [TARGET_API_MAC_CARBON]:
+	Call mac_update_proxy_icon also when buffer modification flag changed.
 	[TARGET_API_MAC_CARBON] (mac_update_proxy_icon): Don't update alias,
 	but compare FSRef/FSSpec of resolved alias.
 
@@ -242,8 +310,8 @@
 	(Fmac_atsu_font_face_attributes) [USE_ATSUI]: New function.
 	(syms_of_macfns) [USE_ATSUI]: Defsubr it.
 
-	* macselect.c [TARGET_API_MAC_CARBON] (mac_do_receive_drag): Use
-	mac_wakeup_from_rne instead of mac_post_mouse_moved_event.
+	* macselect.c [TARGET_API_MAC_CARBON] (mac_do_receive_drag):
+	Use mac_wakeup_from_rne instead of mac_post_mouse_moved_event.
 
 	* macterm.c (mac_query_char_extents) [USE_ATSUI]: Don't call
 	ATSUGetGlyphBounds if not necessary.
@@ -256,8 +324,8 @@
 	(mac_load_query_font) [USE_ATSUI]: Use atsu_find_font_from_family_name.
 	Don't get metrics for Latin-1 right half characters.
 	(mac_load_query_font): Don't load font if space width is not positive.
-	[TARGET_API_MAC_CARBON] (mac_store_event_ref_as_apple_event): Use
-	mac_wakeup_from_rne instead of mac_post_mouse_moved_event.
+	[TARGET_API_MAC_CARBON] (mac_store_event_ref_as_apple_event):
+	Use mac_wakeup_from_rne instead of mac_post_mouse_moved_event.
 	(XTread_socket): Call SelectWindow when unfocused frame is clicked.
 
 	* macterm.h (mac_wakeup_from_rne) [TARGET_API_MAC_CARBON]: Add extern.
--- a/src/callproc.c	Sat Jan 06 15:25:16 2007 +0000
+++ b/src/callproc.c	Sat Jan 13 22:59:28 2007 +0000
@@ -1107,7 +1107,11 @@
 
 #ifdef HAVE_MKSTEMP
  {
-   int fd = mkstemp (tempfile);
+   int fd;
+
+   BLOCK_INPUT;
+   fd = mkstemp (tempfile);
+   UNBLOCK_INPUT;
    if (fd == -1)
      report_file_error ("Failed to open temporary file",
 			Fcons (Vtemp_file_name_pattern, Qnil));
--- a/src/dired.c	Sat Jan 06 15:25:16 2007 +0000
+++ b/src/dired.c	Sat Jan 13 22:59:28 2007 +0000
@@ -1,6 +1,6 @@
 /* Lisp functions for making directory listings.
    Copyright (C) 1985, 1986, 1993, 1994, 1999, 2000, 2001, 2002, 2003,
-                 2004, 2005, 2006 Free Software Foundation, Inc.
+                 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -966,16 +966,18 @@
   values[1] = make_number (s.st_nlink);
   if (NILP (id_format) || EQ (id_format, Qinteger))
     {
-      values[2] = make_number (s.st_uid);
-      values[3] = make_number (s.st_gid);
+      values[2] = make_fixnum_or_float (s.st_uid);
+      values[3] = make_fixnum_or_float (s.st_gid);
     }
   else
     {
       BLOCK_INPUT;
       pw = (struct passwd *) getpwuid (s.st_uid);
-      values[2] = (pw ? build_string (pw->pw_name) : make_number (s.st_uid));
+      values[2] = (pw ? build_string (pw->pw_name)
+                  : make_fixnum_or_float (s.st_uid));
       gr = (struct group *) getgrgid (s.st_gid);
-      values[3] = (gr ? build_string (gr->gr_name) : make_number (s.st_gid));
+      values[3] = (gr ? build_string (gr->gr_name)
+                  : make_fixnum_or_float (s.st_gid));
       UNBLOCK_INPUT;
     }
   values[4] = make_time (s.st_atime);
--- a/src/editfns.c	Sat Jan 06 15:25:16 2007 +0000
+++ b/src/editfns.c	Sat Jan 13 22:59:28 2007 +0000
@@ -1,7 +1,7 @@
 /* Lisp functions pertaining to editing.
    Copyright (C) 1985, 1986, 1987, 1989, 1993, 1994, 1995, 1996,
                  1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-                 2005, 2006 Free Software Foundation, Inc.
+                 2005, 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -3631,7 +3631,12 @@
 		if (*format != 'd' && *format != 'o' && *format != 'x'
 		    && *format != 'i' && *format != 'X' && *format != 'c')
 		  error ("Invalid format operation %%%c", *format);
-		args[n] = Ftruncate (args[n], Qnil);
+		/* This fails unnecessarily if args[n] is bigger than
+		   most-positive-fixnum but smaller than MAXINT.
+		   These cases are important because we sometimes use floats
+		   to represent such integer values (typically such values
+		   come from UIDs or PIDs).  */
+		/* args[n] = Ftruncate (args[n], Qnil); */
 	      }
 
 	    /* Note that we're using sprintf to print floats,
@@ -3799,8 +3804,15 @@
 		  else
 		    sprintf (p, this_format, XUINT (args[n]));
 		}
+	      else if (format[-1] == 'e' || format[-1] == 'f' || format[-1] == 'g')
+		sprintf (p, this_format, XFLOAT_DATA (args[n]));
+	      else if (format[-1] == 'd')
+		/* Maybe we should use "%1.0f" instead so it also works
+		   for values larger than MAXINT.  */
+		sprintf (p, this_format, (EMACS_INT) XFLOAT_DATA (args[n]));
 	      else
-		sprintf (p, this_format, XFLOAT_DATA (args[n]));
+		/* Don't sign-extend for octal or hex printing.  */
+		sprintf (p, this_format, (EMACS_UINT) XFLOAT_DATA (args[n]));
 
 	      if (p > buf
 		  && multibyte
--- a/src/emacs.c	Sat Jan 06 15:25:16 2007 +0000
+++ b/src/emacs.c	Sat Jan 13 22:59:28 2007 +0000
@@ -2483,7 +2483,8 @@
   emacs_priority = 0;
 
   DEFVAR_LISP ("path-separator", &Vpath_separator,
-	       doc: /* The directory separator in search paths, as a string.  */);
+	       doc: /* String containing the character that separates directories in
+search paths, such as PATH and other similar environment variables.  */);
   {
     char c = SEPCHAR;
     Vpath_separator = make_string (&c, 1);
--- a/src/image.c	Sat Jan 06 15:25:16 2007 +0000
+++ b/src/image.c	Sat Jan 13 22:59:28 2007 +0000
@@ -122,8 +122,6 @@
 #define FRAME_X_VISUAL(f) FRAME_X_DISPLAY_INFO (f)->visual
 #define x_defined_color mac_defined_color
 #define DefaultDepthOfScreen(screen) (one_mac_display_info.n_planes)
-#define XDrawLine(display, w, gc, x1, y1, x2, y2) \
-	mac_draw_line_to_pixmap(display, w, gc, x1, y1, x2, y2)
 
 #endif /* MAC_OS */
 
@@ -5253,14 +5251,12 @@
       GC gc;
 
 #ifdef MAC_OS
-#define XCreateGC_pixmap(dpy, pixmap) XCreateGC (dpy, NULL, 0, NULL)
 #define MaskForeground(f)  PIX_MASK_DRAW
 #else
-#define XCreateGC_pixmap(dpy, pixmap) XCreateGC (dpy, pixmap, 0, NULL)
 #define MaskForeground(f)  WHITE_PIX_DEFAULT (f)
 #endif
 
-      gc = XCreateGC_pixmap (dpy, img->pixmap);
+      gc = XCreateGC (dpy, img->pixmap, 0, NULL);
       XSetForeground (dpy, gc, BLACK_PIX_DEFAULT (f));
       XDrawLine (dpy, img->pixmap, gc, 0, 0,
 		 img->width - 1, img->height - 1);
@@ -5270,7 +5266,7 @@
 
       if (img->mask)
 	{
-	  gc = XCreateGC_pixmap (dpy, img->mask);
+	  gc = XCreateGC (dpy, img->mask, 0, NULL);
 	  XSetForeground (dpy, gc, MaskForeground (f));
 	  XDrawLine (dpy, img->mask, gc, 0, 0,
 		     img->width - 1, img->height - 1);
--- a/src/keyboard.c	Sat Jan 06 15:25:16 2007 +0000
+++ b/src/keyboard.c	Sat Jan 13 22:59:28 2007 +0000
@@ -11410,6 +11410,8 @@
   do_mouse_tracking = Qnil;
 #endif
   input_pending = 0;
+  interrupt_input_blocked = 0;
+  interrupt_input_pending = 0;
 
   /* This means that command_loop_1 won't try to select anything the first
      time through.  */
--- a/src/macgui.h	Sat Jan 06 15:25:16 2007 +0000
+++ b/src/macgui.h	Sat Jan 13 22:59:28 2007 +0000
@@ -24,7 +24,7 @@
 #ifndef EMACS_MACGUI_H
 #define EMACS_MACGUI_H
 
-typedef int Display;  /* fix later */
+typedef struct _XDisplay Display; /* opaque */
 
 typedef Lisp_Object XrmDatabase;
 
--- a/src/macmenu.c	Sat Jan 06 15:25:16 2007 +0000
+++ b/src/macmenu.c	Sat Jan 13 22:59:28 2007 +0000
@@ -876,6 +876,32 @@
 
 #ifdef HAVE_MENUS
 
+/* Regard ESC and C-g as Cancel even without the Cancel button.  */
+
+#ifdef MAC_OSX
+static Boolean
+mac_dialog_modal_filter (dialog, event, item_hit)
+     DialogRef dialog;
+     EventRecord *event;
+     DialogItemIndex *item_hit;
+{
+  Boolean result;
+
+  result = StdFilterProc (dialog, event, item_hit);
+  if (result == false
+      && (event->what == keyDown || event->what == autoKey)
+      && ((event->message & charCodeMask) == kEscapeCharCode
+	  || mac_quit_char_key_p (event->modifiers,
+				  (event->message & keyCodeMask) >> 8)))
+    {
+      *item_hit = kStdCancelItemIndex;
+      return true;
+    }
+
+  return result;
+}
+#endif
+
 DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0,
        doc: /* Pop up a dialog box and return user's selection.
 POSITION specifies which frame to use.
@@ -961,6 +987,96 @@
        but I don't want to make one now.  */
     CHECK_WINDOW (window);
 
+#ifdef MAC_OSX
+  /* Special treatment for Fmessage_box, Fyes_or_no_p, and Fy_or_n_p.  */
+  if (EQ (position, Qt)
+      && STRINGP (Fcar (contents))
+      && ((!NILP (Fequal (XCDR (contents),
+			  Fcons (Fcons (build_string ("OK"), Qt), Qnil)))
+	   && EQ (header, Qt))
+	  || (!NILP (Fequal (XCDR (contents),
+			     Fcons (Fcons (build_string ("Yes"), Qt),
+				    Fcons (Fcons (build_string ("No"), Qnil),
+					   Qnil))))
+	      && NILP (header))))
+    {
+      OSStatus err = noErr;
+      AlertStdCFStringAlertParamRec param;
+      CFStringRef error_string, explanation_string;
+      DialogRef alert;
+      DialogItemIndex item_hit;
+      Lisp_Object tem;
+
+      tem = Fstring_match (concat3 (build_string ("\\("),
+				    call0 (intern ("sentence-end")),
+				    build_string ("\\)\n")),
+			   XCAR (contents), Qnil);
+      BLOCK_INPUT;
+      if (NILP (tem))
+	{
+	  error_string = cfstring_create_with_string (XCAR (contents));
+	  if (error_string == NULL)
+	    err = memFullErr;
+	  explanation_string = NULL;
+	}
+      else
+	{
+	  tem = Fmatch_end (make_number (1));
+	  error_string =
+	    cfstring_create_with_string (Fsubstring (XCAR (contents),
+						     make_number (0), tem));
+	  if (error_string == NULL)
+	    err = memFullErr;
+	  else
+	    {
+	      XSETINT (tem, XINT (tem) + 1);
+	      explanation_string =
+		cfstring_create_with_string (Fsubstring (XCAR (contents),
+							 tem, Qnil));
+	      if (explanation_string == NULL)
+		{
+		  CFRelease (error_string);
+		  err = memFullErr;
+		}
+	    }
+	}
+      if (err == noErr)
+	err = GetStandardAlertDefaultParams (&param,
+					     kStdCFStringAlertVersionOne);
+      if (err == noErr)
+	{
+	  param.movable = true;
+	  param.position = kWindowAlertPositionParentWindow;
+	  if (NILP (header))
+	    {
+	      param.defaultText = CFSTR ("Yes");
+	      param.otherText = CFSTR ("No");
+#if 0
+	      param.cancelText = CFSTR ("Cancel");
+	      param.cancelButton = kAlertStdAlertCancelButton;
+#endif
+	    }
+	  err = CreateStandardAlert (kAlertNoteAlert, error_string,
+				     explanation_string, &param, &alert);
+	  CFRelease (error_string);
+	  if (explanation_string)
+	    CFRelease (explanation_string);
+	}
+      if (err == noErr)
+	err = RunStandardAlert (alert, mac_dialog_modal_filter, &item_hit);
+      UNBLOCK_INPUT;
+
+      if (err == noErr)
+	{
+	  if (item_hit == kStdCancelItemIndex)
+	    Fsignal (Qquit, Qnil);
+	  else if (item_hit == kStdOkItemIndex)
+	    return Qt;
+	  else
+	    return Qnil;
+	}
+    }
+#endif
 #ifndef HAVE_DIALOGS
   /* Display a menu with these alternatives
      in the middle of frame F.  */
@@ -1537,8 +1653,6 @@
   OSStatus err;
   UInt32 keyCode;
   UInt32 keyModifiers;
-  extern int mac_quit_char_modifiers;
-  extern int mac_quit_char_keycode;
 
   err = GetEventParameter (theEvent, kEventParamKeyCode,
 			   typeUInt32, NULL, sizeof(UInt32), NULL, &keyCode);
@@ -1548,8 +1662,7 @@
 			     typeUInt32, NULL, sizeof(UInt32),
 			     NULL, &keyModifiers);
 
-  if (err == noErr && keyCode == mac_quit_char_keycode
-      && keyModifiers == mac_quit_char_modifiers)
+  if (err == noErr && mac_quit_char_key_p (keyModifiers, keyCode))
     {
       MenuRef menu = userData != 0
         ? (MenuRef)userData : AcquireRootMenu ();
--- a/src/macterm.c	Sat Jan 06 15:25:16 2007 +0000
+++ b/src/macterm.c	Sat Jan 13 22:59:28 2007 +0000
@@ -505,8 +505,10 @@
 #endif
 }
 
+/* Mac version of XDrawLine (to Pixmap).  */
+
 void
-mac_draw_line_to_pixmap (display, p, gc, x1, y1, x2, y2)
+XDrawLine (display, p, gc, x1, y1, x2, y2)
      Display *display;
      Pixmap p;
      GC gc;
@@ -1628,9 +1630,9 @@
 /* Mac replacement for XCreateGC.  */
 
 GC
-XCreateGC (display, window, mask, xgcv)
+XCreateGC (display, d, mask, xgcv)
      Display *display;
-     Window window;
+     void *d;
      unsigned long mask;
      XGCValues *xgcv;
 {
@@ -1663,8 +1665,13 @@
   if (gc->clip_region)
     DisposeRgn (gc->clip_region);
 #if USE_CG_DRAWING && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
-  CGColorRelease (gc->cg_fore_color);
-  CGColorRelease (gc->cg_back_color);
+#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+  if (CGColorGetTypeID != NULL)
+#endif
+    {
+      CGColorRelease (gc->cg_fore_color);
+      CGColorRelease (gc->cg_back_color);
+    }
 #endif
   xfree (gc);
 }
@@ -8967,7 +8974,7 @@
 };
 #endif	/* MAC_OSX */
 
-static unsigned int
+static int
 #if USE_CARBON_EVENTS
 mac_to_emacs_modifiers (UInt32 mods)
 #else
@@ -9014,6 +9021,23 @@
   return result;
 }
 
+static UInt32
+mac_mapped_modifiers (modifiers)
+     UInt32 modifiers;
+{
+  UInt32 mapped_modifiers_all =
+    (NILP (Vmac_control_modifier) ? 0 : controlKey)
+    | (NILP (Vmac_option_modifier) ? 0 : optionKey)
+    | (NILP (Vmac_command_modifier) ? 0 : cmdKey);
+
+#ifdef MAC_OSX
+  mapped_modifiers_all |=
+    (NILP (Vmac_function_modifier) ? 0 : kEventKeyModifierFnMask);
+#endif
+
+  return mapped_modifiers_all & modifiers;
+}
+
 static int
 mac_get_emulated_btn ( UInt32 modifiers )
 {
@@ -9031,7 +9055,7 @@
 #if USE_CARBON_EVENTS
 /* Obtains the event modifiers from the event ref and then calls
    mac_to_emacs_modifiers.  */
-static UInt32
+static int
 mac_event_to_emacs_modifiers (EventRef eventRef)
 {
   UInt32 mods = 0;
@@ -9256,6 +9280,9 @@
 	  GetPortVisibleRegion (GetWindowPort (win), region);
 	  GetRegionBounds (region, &r);
 	  expose_frame (f, r.left, r.top, r.right - r.left, r.bottom - r.top);
+#if USE_CG_DRAWING
+	  mac_prepare_for_quickdraw (f);
+#endif
 	  UpdateControls (win, region);
 	  DisposeRgn (region);
 #else
@@ -10067,21 +10094,10 @@
 	  err = GetEventParameter (kbd_event, kEventParamKeyModifiers,
 				   typeUInt32, NULL,
 				   sizeof (UInt32), NULL, &modifiers);
-	if (err == noErr)
-	  {
-	    mapped_modifiers =
-	      (NILP (Vmac_control_modifier) ? 0 : controlKey)
-	      | (NILP (Vmac_option_modifier) ? 0 : optionKey)
-	      | (NILP (Vmac_command_modifier) ? 0 : cmdKey);
-#ifdef MAC_OSX
-	    mapped_modifiers |=
-	      (NILP (Vmac_function_modifier) ? 0 : kEventKeyModifierFnMask);
-#endif
-	    if (modifiers & mapped_modifiers)
-	      /* There're mapped modifier keys.  Process it in
-		 XTread_socket.  */
-	      return eventNotHandledErr;
-	  }
+	if (err == noErr && mac_mapped_modifiers (modifiers))
+	  /* There're mapped modifier keys.  Process it in
+	     XTread_socket.  */
+	  return eventNotHandledErr;
 	if (err == noErr)
 	  err = GetEventParameter (kbd_event, kEventParamKeyUnicodes,
 				   typeUnicodeText, NULL, 0, &actual_size,
@@ -11032,20 +11048,12 @@
 	    SInt16 current_key_script;
 	    UInt32 modifiers = er.modifiers, mapped_modifiers;
 
-	    mapped_modifiers =
-	      (NILP (Vmac_control_modifier) ? 0 : controlKey)
-	      | (NILP (Vmac_option_modifier) ? 0 : optionKey)
-	      | (NILP (Vmac_command_modifier) ? 0 : cmdKey);
-
 #if USE_CARBON_EVENTS && defined (MAC_OSX)
-	    mapped_modifiers |=
-	      (NILP (Vmac_function_modifier) ? 0 : kEventKeyModifierFnMask);
-
 	    GetEventParameter (eventRef, kEventParamKeyModifiers,
 			       typeUInt32, NULL,
 			       sizeof (UInt32), NULL, &modifiers);
 #endif
-	    mapped_modifiers &= modifiers;
+	    mapped_modifiers = mac_mapped_modifiers (modifiers);
 
 #if USE_CARBON_EVENTS && (defined (MAC_OSX) || USE_MAC_TSM)
 	    /* When using Carbon Events, we need to pass raw keyboard
@@ -11639,34 +11647,33 @@
 }
 
 /***** Code to handle C-g testing  *****/
-
-/* Contains the Mac modifier formed from quit_char */
-int mac_quit_char_modifiers = 0;
-int mac_quit_char_keycode;
 extern int quit_char;
-
-static void
-mac_determine_quit_char_modifiers()
-{
-  /* Todo: Determine modifiers from quit_char. */
-  UInt32 qc_modifiers = ctrl_modifier;
-
-  /* Map modifiers */
-  mac_quit_char_modifiers = 0;
-  if (qc_modifiers & ctrl_modifier)  mac_quit_char_modifiers |= controlKey;
-  if (qc_modifiers & shift_modifier) mac_quit_char_modifiers |= shiftKey;
-  if (qc_modifiers & alt_modifier)   mac_quit_char_modifiers |= optionKey;
-}
-
-static void
-init_quit_char_handler ()
-{
-  /* TODO: Let this support keys other the 'g' */
-  mac_quit_char_keycode = 5;
-  /* Look at <architecture/adb_kb_map.h> for details */
-  /* http://gemma.apple.com/techpubs/mac/Toolbox/Toolbox-40.html#MARKER-9-184*/
-
-  mac_determine_quit_char_modifiers();
+extern int make_ctrl_char P_ ((int));
+
+int
+mac_quit_char_key_p (modifiers, key_code)
+     UInt32 modifiers, key_code;
+{
+  UInt32 char_code;
+  unsigned long some_state = 0;
+  Ptr kchr_ptr = (Ptr) GetScriptManagerVariable (smKCHRCache);
+  int c, emacs_modifiers;
+
+  /* Mask off modifier keys that are mapped to some Emacs modifiers.  */
+  key_code |= (modifiers & ~(mac_mapped_modifiers (modifiers)));
+  char_code = KeyTranslate (kchr_ptr, key_code, &some_state);
+  if (char_code & ~0xff)
+    return 0;
+
+  emacs_modifiers = mac_to_emacs_modifiers (modifiers);
+  if (emacs_modifiers & ctrl_modifier)
+    c = make_ctrl_char (char_code);
+
+  c |= (emacs_modifiers
+	& (meta_modifier | alt_modifier
+	   | hyper_modifier | super_modifier));
+
+  return c == quit_char;
 }
 #endif	/* MAC_OSX */
 
@@ -11804,8 +11811,6 @@
 #if USE_CARBON_EVENTS
 #ifdef MAC_OSX
   init_service_handler ();
-
-  init_quit_char_handler ();
 #endif	/* MAC_OSX */
 
   init_command_handler ();
--- a/src/macterm.h	Sat Jan 06 15:25:16 2007 +0000
+++ b/src/macterm.h	Sat Jan 13 22:59:28 2007 +0000
@@ -44,8 +44,6 @@
 #define FONT_BASE(f)    ((f)->ascent)
 #define FONT_DESCENT(f) ((f)->descent)
 
-#define FONT_MAX_WIDTH(f) FONT_WIDTH(f)  /* fix later */
-
 /* Structure recording bitmaps and reference count.
    If REFCOUNT is 0 then this record is free to be reused.  */
 
@@ -614,13 +612,12 @@
 					       unsigned long, unsigned long,
 					       unsigned int));
 extern void XFreePixmap P_ ((Display *, Pixmap));
-extern GC XCreateGC P_ ((Display *, Window, unsigned long, XGCValues *));
+extern GC XCreateGC P_ ((Display *, void *, unsigned long, XGCValues *));
 extern void XFreeGC P_ ((Display *, GC));
 extern void XSetForeground P_ ((Display *, GC, unsigned long));
 extern void XSetBackground P_ ((Display *, GC, unsigned long));
 extern void XSetWindowBackground P_ ((Display *, WindowPtr, unsigned long));
-extern void mac_draw_line_to_pixmap P_ ((Display *, Pixmap, GC, int, int,
-					 int, int));
+extern void XDrawLine P_ ((Display *, Pixmap, GC, int, int, int, int));
 extern void mac_clear_area P_ ((struct frame *, int, int,
 				unsigned int, unsigned int));
 extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *));
@@ -636,6 +633,9 @@
 #if USE_CG_DRAWING
 extern void mac_prepare_for_quickdraw P_ ((struct frame *));
 #endif
+#ifdef MAC_OSX
+extern int mac_quit_char_key_p P_ ((UInt32, UInt32));
+#endif
 
 #define FONT_TYPE_FOR_UNIBYTE(font, ch) 0
 #define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0
--- a/src/xterm.c	Sat Jan 06 15:25:16 2007 +0000
+++ b/src/xterm.c	Sat Jan 13 22:59:28 2007 +0000
@@ -276,6 +276,10 @@
 
 static Time last_mouse_movement_time;
 
+/* Time for last user interaction as returned in X events.  */
+
+static Time last_user_time;
+
 /* Incremented by XTread_socket whenever it really tries to read
    events.  */
 
@@ -5882,6 +5886,7 @@
       break;
 
     case SelectionNotify:
+      last_user_time = event.xselection.time;
 #ifdef USE_X_TOOLKIT
       if (! x_window_to_frame (dpyinfo, event.xselection.requestor))
         goto OTHER;
@@ -5890,6 +5895,7 @@
       break;
 
     case SelectionClear:	/* Someone has grabbed ownership.  */
+      last_user_time = event.xselectionclear.time;
 #ifdef USE_X_TOOLKIT
       if (! x_window_to_frame (dpyinfo, event.xselectionclear.window))
         goto OTHER;
@@ -5906,6 +5912,7 @@
       break;
 
     case SelectionRequest:	/* Someone wants our selection.  */
+      last_user_time = event.xselectionrequest.time;
 #ifdef USE_X_TOOLKIT
       if (!x_window_to_frame (dpyinfo, event.xselectionrequest.owner))
         goto OTHER;
@@ -5926,6 +5933,7 @@
       break;
 
     case PropertyNotify:
+      last_user_time = event.xproperty.time;
 #if 0 /* This is plain wrong.  In the case that we are waiting for a
 	 PropertyNotify used as an ACK in incremental selection
 	 transfer, the property will be on the receiver's window.  */
@@ -5949,6 +5957,7 @@
 
           /* Perhaps reparented due to a WM restart.  Reset this.  */
           FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_UNKNOWN;
+          FRAME_X_DISPLAY_INFO (f)->net_supported_window = 0;
         }
       goto OTHER;
 
@@ -6107,6 +6116,7 @@
 
     case KeyPress:
 
+      last_user_time = event.xkey.time;
       ignore_next_mouse_click_timeout = 0;
 
 #if defined (USE_X_TOOLKIT) || defined (USE_GTK)
@@ -6497,6 +6507,7 @@
 #endif
 
     case KeyRelease:
+      last_user_time = event.xkey.time;
 #ifdef HAVE_X_I18N
       /* Don't dispatch this event since XtDispatchEvent calls
          XFilterEvent, and two calls in a row may freeze the
@@ -6507,6 +6518,7 @@
 #endif
 
     case EnterNotify:
+      last_user_time = event.xcrossing.time;
       x_detect_focus_change (dpyinfo, &event, &inev.ie);
 
       f = x_any_window_to_frame (dpyinfo, event.xcrossing.window);
@@ -6547,6 +6559,7 @@
       goto OTHER;
 
     case LeaveNotify:
+      last_user_time = event.xcrossing.time;
       x_detect_focus_change (dpyinfo, &event, &inev.ie);
 
       f = x_top_window_to_frame (dpyinfo, event.xcrossing.window);
@@ -6580,6 +6593,7 @@
 
     case MotionNotify:
       {
+        last_user_time = event.xmotion.time;
         previous_help_echo_string = help_echo_string;
         help_echo_string = Qnil;
 
@@ -6728,6 +6742,7 @@
 
         bzero (&compose_status, sizeof (compose_status));
 	last_mouse_glyph_frame = 0;
+        last_user_time = event.xbutton.time;
 
         if (dpyinfo->grabbed
             && last_mouse_frame
@@ -8336,39 +8351,110 @@
   UNBLOCK_INPUT;
 }
 
+/* Return non-zero if _NET_SUPPORTING_WM_CHECK window exists and _NET_SUPPORTED
+   on the root window for frame F contains ATOMNAME.
+   This is how a WM check shall be done according to the Window Manager
+   Specification/Extended Window Manager Hints at
+   http://freedesktop.org/wiki/Standards_2fwm_2dspec.  */
+
+static int
+wm_supports (f, atomname)
+     struct frame *f;
+     const char *atomname;
+{
+  Atom actual_type;
+  unsigned long actual_size, bytes_remaining;
+  int i, rc, actual_format;
+  Atom prop_atom;
+  Window wmcheck_window;
+  struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+  Window target_window = dpyinfo->root_window;
+  long max_len = 65536;
+  Display *dpy = FRAME_X_DISPLAY (f);
+  unsigned char *tmp_data = NULL;
+  Atom target_type = XA_WINDOW;
+  Atom want_atom;
+
+  BLOCK_INPUT;
+
+  prop_atom = XInternAtom (dpy, "_NET_SUPPORTING_WM_CHECK", False);
+
+  x_catch_errors (dpy);
+  rc = XGetWindowProperty (dpy, target_window,
+                           prop_atom, 0, max_len, False, target_type,
+                           &actual_type, &actual_format, &actual_size,
+                           &bytes_remaining, &tmp_data);
+  
+  if (rc != Success || actual_type != XA_WINDOW || x_had_errors_p (dpy))
+    {
+      if (tmp_data) XFree (tmp_data);
+      x_uncatch_errors ();
+      UNBLOCK_INPUT;
+      return 0;
+    }
+
+  wmcheck_window = *(Window *) tmp_data;
+  XFree (tmp_data);
+
+  /* Check if window exists. */
+  XSelectInput (dpy, wmcheck_window, StructureNotifyMask);
+  x_sync (f);
+  if (x_had_errors_p (dpy))
+    {
+      x_uncatch_errors ();
+      UNBLOCK_INPUT;
+      return 0;
+    }
+
+  if (dpyinfo->net_supported_window != wmcheck_window)
+    {
+      /* Window changed, reload atoms */
+      if (dpyinfo->net_supported_atoms != NULL)
+        XFree (dpyinfo->net_supported_atoms);
+      dpyinfo->net_supported_atoms = NULL;
+      dpyinfo->nr_net_supported_atoms = 0;
+      dpyinfo->net_supported_window = 0;
+
+      target_type = XA_ATOM;
+      prop_atom = XInternAtom (dpy, "_NET_SUPPORTED", False);
+      tmp_data = NULL;
+      rc = XGetWindowProperty (dpy, target_window,
+                               prop_atom, 0, max_len, False, target_type,
+                               &actual_type, &actual_format, &actual_size,
+                               &bytes_remaining, &tmp_data);
+
+      if (rc != Success || actual_type != XA_ATOM || x_had_errors_p (dpy))
+        {
+          if (tmp_data) XFree (tmp_data);
+          x_uncatch_errors ();
+          UNBLOCK_INPUT;
+          return 0;
+        }
+
+      dpyinfo->net_supported_atoms = (Atom *)tmp_data;
+      dpyinfo->nr_net_supported_atoms = actual_size;
+      dpyinfo->net_supported_window = wmcheck_window;
+    }
+
+  rc = 0;
+  want_atom = XInternAtom (dpy, atomname, False);
+
+  for (i = 0; rc == 0 && i < dpyinfo->nr_net_supported_atoms; ++i) 
+    rc = dpyinfo->net_supported_atoms[i] == want_atom;
+
+  x_uncatch_errors ();
+  UNBLOCK_INPUT;
+
+  return rc;
+}
+
 /* Do fullscreen as specified in extended window manager hints */
+
 static int
 do_ewmh_fullscreen (f)
      struct frame *f;
 {
-  int have_net_atom = FRAME_X_DISPLAY_INFO (f)->have_net_atoms;
-
-  if (!have_net_atom)
-    {
-      int num;
-      Atom *atoms = XListProperties (FRAME_X_DISPLAY (f),
-                                     FRAME_X_DISPLAY_INFO (f)->root_window,
-                                     &num);
-      if (atoms && num > 0)
-        {
-          char **names = (char **) xmalloc (num * sizeof(*names));
-          if (XGetAtomNames (FRAME_X_DISPLAY (f), atoms, num, names))
-            {
-              int i;
-              for (i = 0; i < num; ++i)
-                {
-                  if (!have_net_atom)
-                    have_net_atom = strncmp (names[i], "_NET_", 5) == 0;
-                  XFree (names[i]);
-                }
-            }
-          xfree (names);
-        }
-      if (atoms)
-        XFree (atoms);
-
-      FRAME_X_DISPLAY_INFO (f)->have_net_atoms = have_net_atom;
-    }
+  int have_net_atom = wm_supports (f, "_NET_WM_STATE");
 
   if (have_net_atom)
     {
@@ -8396,6 +8482,9 @@
           break;
         }
 
+      if (!wm_supports (f, what)) return 0;
+
+
       Fx_send_client_event (frame, make_number (0), frame,
                             make_unibyte_string (atom, strlen (atom)),
                             make_number (32),
@@ -8796,23 +8885,27 @@
       /* The following code is needed for `raise-frame' to work on
 	 some versions of metacity; see Window Manager
 	 Specification/Extended Window Manager Hints at
-	 http://freedesktop.org/wiki/Standards_2fwm_2dspec
-
-	 However, on other versions (metacity 2.17.2-1.fc7), it
+	 http://freedesktop.org/wiki/Standards_2fwm_2dspec  */
+
+#if 0
+      /* However, on other versions (metacity 2.17.2-1.fc7), it
 	 reportedly causes hangs when resizing frames.  */
 
-      /* Lisp_Object frame;
-         const char *atom = "_NET_ACTIVE_WINDOW"; */
-
-      x_raise_frame (f);
-
-      /* XSETFRAME (frame, f);
-         Fx_send_client_event (frame, make_number (0), frame,
-                            make_unibyte_string (atom, strlen (atom)),
-                            make_number (32),
-                            Fcons (make_number (1),
-                                   Fcons (make_number (time (NULL) * 1000),
-				   Qnil))); */
+      const char *atom = "_NET_ACTIVE_WINDOW";
+      if (f->async_visible && wm_supports (f, atom))
+        {
+          Lisp_Object frame;
+          XSETFRAME (frame, f);
+          Fx_send_client_event (frame, make_number (0), frame,
+                                make_unibyte_string (atom, strlen (atom)),
+                                make_number (32),
+                                Fcons (make_number (1),
+                                       Fcons (make_number (last_user_time),
+                                              Qnil)));
+        }
+      else
+#endif
+        x_raise_frame (f);
     }
   else
     x_lower_frame (f);
@@ -10807,6 +10900,10 @@
   dpyinfo->x_dnd_atoms = xmalloc (sizeof (*dpyinfo->x_dnd_atoms)
                                   * dpyinfo->x_dnd_atoms_size);
 
+  dpyinfo->net_supported_atoms = NULL;
+  dpyinfo->nr_net_supported_atoms = 0;
+  dpyinfo->net_supported_window = 0;
+
   connection = ConnectionNumber (dpyinfo->display);
   dpyinfo->connection = connection;
 
--- a/src/xterm.h	Sat Jan 06 15:25:16 2007 +0000
+++ b/src/xterm.h	Sat Jan 13 22:59:28 2007 +0000
@@ -396,7 +396,10 @@
   size_t x_dnd_atoms_size;
   size_t x_dnd_atoms_length;
 
-  int have_net_atoms;
+  /* Extended window manager hints, Atoms supported by the window manager  */
+  Atom *net_supported_atoms;
+  int nr_net_supported_atoms;
+  Window net_supported_window;
 };
 
 #ifdef HAVE_X_I18N