changeset 90268:d88caeac70d7

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-2 Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (base, patch 1-3) - tag of miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-704 - Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0 (patch 700-704) - Update from CVS - Merge from gnus--rel--5.10 - Update from CVS: lisp/cus-edit.el (customize-rogue): Minor doc fix. * miles@gnu.org--gnu-2005/gnus--rel--5.10 (patch 185-186) - Merge from emacs--cvs-trunk--0 - Update from CVS
author Miles Bader <miles@gnu.org>
date Thu, 19 Jan 2006 07:11:42 +0000
parents e5855ea89245 (current diff) 10bc0cd3a053 (diff)
children 0f622530c46c
files etc/NEWS lisp/ChangeLog lisp/array.el lisp/bindings.el lisp/buff-menu.el lisp/cus-edit.el lisp/dired-aux.el lisp/faces.el lisp/files.el lisp/font-lock.el lisp/gnus/ChangeLog lisp/gnus/gnus-art.el lisp/gnus/gnus-cus.el lisp/gnus/gnus-group.el lisp/gnus/gnus-start.el lisp/gnus/gnus-sum.el lisp/gnus/message.el lisp/gnus/mm-uu.el lisp/gnus/mm-view.el lisp/info.el lisp/international/mule.el lisp/log-view.el lisp/mail/smtpmail.el lisp/man.el lisp/mh-e/ChangeLog lisp/mh-e/mh-alias.el lisp/mh-e/mh-comp.el lisp/mh-e/mh-e.el lisp/mh-e/mh-identity.el lisp/mh-e/mh-mime.el lisp/mh-e/mh-seq.el lisp/play/doctor.el lisp/progmodes/fortran.el lisp/progmodes/make-mode.el lisp/textmodes/flyspell.el lisp/textmodes/org.el lisp/textmodes/sgml-mode.el lisp/textmodes/table.el lisp/time.el man/ChangeLog man/display.texi man/gnus.texi src/ChangeLog src/frame.c
diffstat 49 files changed, 797 insertions(+), 567 deletions(-) [+]
line wrap: on
line diff
--- a/etc/NEWS	Thu Jan 19 06:54:47 2006 +0000
+++ b/etc/NEWS	Thu Jan 19 07:11:42 2006 +0000
@@ -903,6 +903,9 @@
 elements on mode-line (and header-line) like `highlight' face on text
 areas.
 
+*** `mode-line-buffer-id' is the standard face for buffer identification
+parts of the mode line.
+
 +++
 *** `shadow' face defines the appearance of the "shadowed" text, i.e.
 the text which should be less noticeable than the surrounding text.
@@ -1948,9 +1951,9 @@
 `scheme-untrace-command' and `scheme-expand-current-form'.
 
 ---
-** Makefile mode has submodes for automake, gmake, makepp and BSD make.
-
-The former two couldn't be differentiated before, and the latter two
+** Makefile mode has submodes for automake, gmake, makepp, BSD make and imake.
+
+The former two couldn't be differentiated before, and the latter three
 are new.  Font-locking is robust now and offers new customizable
 faces.
 
--- a/lisp/ChangeLog	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/ChangeLog	Thu Jan 19 07:11:42 2006 +0000
@@ -1,3 +1,98 @@
+2006-01-19  Kenichi Handa  <handa@m17n.org>
+
+	* international/mule.el (auto-coding-regexp-alist-lookup): New
+	function.
+	(find-auto-coding): Use auto-coding-regexp-alist-lookup.
+
+2006-01-18  Jesper Harder  <harder@phys.au.dk>
+
+	* mail/smtpmail.el (smtpmail-send-it): Use insert-buffer-substring.
+
+2006-01-18  Masatake YAMATO  <jet@gyve.org>
+
+	* progmodes/make-mode.el (makefile-imake-mode): New mode
+	derived from maiefile-mode.
+	(makefile-imake-mode-syntax-table): New syntax table
+	derived from makefile-mode-syntax-table.
+	(makefile-mode): Write about makefile-imake-mode in 
+	doc string.
+	(makefile-mode-map): Bind "\C-c\C-m\C-i" to makefile-imake-mode.
+	(makefile-imake-font-lock-keywords): New font lock keywords.
+
+	* files.el (auto-mode-alist): Added Imakefile.
+
+2006-01-17  Agustin Martin  <agustin.martin@hispalinux.es>
+
+	* textmodes/flyspell.el (ispell-kill-ispell-hook): Add to the hook when
+	loading the file rather than when turning on flyspell-mode.
+
+2006-01-13  Richard M. Stallman  <rms@gnu.org>
+
+	* font-lock.el (lisp-font-lock-keywords-1): Minor rearrangement.
+
+2006-01-16  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* cus-edit.el (customize-rogue): Minor doc fix.
+
+2006-01-17  Juri Linkov  <juri@jurta.org>
+
+	* dired-aux.el (dired-diff): Use dired-dwim-target-directory
+	instead of the file at the mark as default if the file at the mark
+	is the same as the file at point or if dired-dwim-target-directory
+	is not the same as the current directory and the mark is not active.
+
+	* log-view.el (log-view-minor-wrap): Use the same logic to get
+	revisions as `log-view-diff'.
+
+	* info.el (Info-revert-find-node): Check for Info-current-file
+	before preserving new-history.
+
+	* man.el (Man-heading-regexp): Add `/'.
+
+	* textmodes/sgml-mode.el: Add `coding: iso-2022-7bit' cookie.
+	(html-mode): Set `sentence-end-base' instead of `sentence-end'.
+
+2006-01-16  Juri Linkov  <juri@jurta.org>
+
+	* faces.el (mode-line-faces): New defgroup.
+	(mode-line-highlight): Move definition after new defgroup.
+	(mode-line, mode-line-inactive, mode-line-highlight):
+	Replace :group `modeline' with `mode-line-faces'.
+	(mode-line-buffer-id): New face.
+	(modeline-buffer-id): New face alias.
+	(vertical-border): Remove :group `modeline'.
+
+	* bindings.el (propertized-buffer-identification): Use face
+	`mode-line-buffer-id' instead of `Buffer-menu-buffer'.
+	(mode-line-next-buffer, mode-line-previous-buffer): New functions.
+	(mode-line-buffer-identification-keymap): For mouse-1 replace
+	`mode-line-unbury-buffer' with `mode-line-previous-buffer'.
+	Replace `mode-line-bury-buffer' with `mode-line-next-buffer' for
+	mouse-3.
+
+	* buff-menu.el (buffer-menu-buffer) <defface>: Renamed from
+	Buffer-menu-buffer.  Doc fix.
+	(Buffer-menu-buffer): Face alias to buffer-menu-buffer.
+	(list-buffers-noselect): Use `buffer-menu-buffer' face instead of
+	`Buffer-menu-buffer'.
+
+	* info.el (Info-mode-line-node-keymap): New defvar.
+	(Info-set-mode-line): Use `stringp' to check Info-current-file.
+	Propertize Info-current-node with `mode-line-buffer-id' and
+	`mode-line-highlight' faces and `Info-mode-line-node-keymap'.
+
+	* time.el (display-time-mail-face): Replace :group `faces' with
+	`mode-line-faces'.
+
+2006-01-16  Kenichi Handa  <handa@m17n.org>
+
+	* international/code-pages.el: Add autoload cookies for cp125[0345678].
+
+	* language/european.el (cp1252): New alias for windows-1252.
+
+	* international/mule.el (autoload-coding-system): Prepare for EOL
+	variants.
+
 2006-01-15  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	* term.el (term-raw-map): Add mapping for insert.
@@ -11,8 +106,8 @@
 	(term-reset-terminal): Reset the scroll region.
 	(term-handle-ansi-escape): Cursor up and down should take into
 	account the scroll region.
-	(term-set-scroll-region): Renamed from `term-scroll-region'.  Move
-	to 0,0 after setting the region.
+	(term-set-scroll-region): Rename from `term-scroll-region'.
+	Move to 0,0 after setting the region.
 	(term-handle-scroll): Handle scroll up.
 	(term-down): Fix off by one error.
 	(term-delete-lines): Do not delete outside the scroll region.
@@ -57,7 +152,7 @@
 
 2006-01-13  Carsten Dominik  <dominik@science.uva.nl>
 
-	* textmodes/org.el: (org-open-file): Use mailcap for selecting an
+	* textmodes/org.el (org-open-file): Use mailcap for selecting an
 	application.
 	(org-file-apps-defaults-gnu): Use mailcap as the default for
 	selecting an application on a UNIX system.
@@ -343,7 +438,7 @@
 
 2006-01-05  Carsten Dominik  <dominik@science.uva.nl>
 
-	* textmodes/org.el: (org-end-of-subtree): New function.
+	* textmodes/org.el (org-end-of-subtree): New function.
 	(org-cycle, org-subtree-end-visible-p, org-scan-tags):
 	Use `org-end-of-subtree'.
 	(org-agenda, org-agenda-convert-date): Protect calls to
@@ -1064,7 +1159,7 @@
 
 2005-12-20  Carsten Dominik  <dominik@science.uva.nl>
 
-	* textmodes/org.el: (org-agenda-custom-commands): New option.
+	* textmodes/org.el (org-agenda-custom-commands): New option.
 	(org-agenda): Offer custom commands on splash screen.
 	(org-make-tags-matcher): Parser for Boolean logic added.
 	(org-agenda-set-tags): New command.
@@ -1180,7 +1275,7 @@
 
 2005-12-16  Carsten Dominik  <dominik@science.uva.nl>
 
-	* textmodes/org.el: (org-tags-match-list-sublevels): New option.
+	* textmodes/org.el (org-tags-match-list-sublevels): New option.
 	(org-open-at-point): Implement tag searches as links.
 	(org-fit-agenda-window, org-get-buffer-tags, org-get-tags)
 	(org-make-tags-matcher, org-scan-tags, org-activate-tags): New funs.
@@ -1402,7 +1497,7 @@
 
 2005-12-12  Carsten Dominik  <dominik@science.uva.nl>
 
-	* textmodes/org.el: (org-agenda, org-timeline, org-todo):
+	* textmodes/org.el (org-agenda, org-timeline, org-todo):
 	Implement Logging and the keep-modes setting.
 	(org-get-category): Make sure a string is returned.
 	(org-log-done): New function.
--- a/lisp/array.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/array.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1,7 +1,7 @@
 ;;; array.el --- array editing commands for GNU Emacs
 
 ;; Copyright (C) 1987, 2000, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author David M. Brown
 ;; Maintainer: FSF
@@ -42,21 +42,19 @@
 
 ;;; Code:
 
-(eval-when-compile
-  (defvar array-max-column)
-  (defvar array-columns-per-line)
-  (defvar array-buffer-column)
-  (defvar array-line-length)
-  (defvar array-buffer-line)
-  (defvar array-lines-per-row)
-  (defvar array-max-row)
-  (defvar array-field-width)
-  (defvar array-row)
-  (defvar array-column)
-  (defvar array-rows-numbered)
-  (defvar array-copy-string)
-  (defvar array-init-field)
-  (defvar array-respect-tabs))
+(defvar array-max-column nil "Number of columns in the array.")
+(defvar array-columns-per-line nil "Number of array columns per line.")
+(defvar array-buffer-column nil "Current column number of point in the buffer.")
+(defvar array-line-length nil "Length of a line in the array.")
+(defvar array-buffer-line nil "Current line number of point in the buffer.")
+(defvar array-lines-per-row nil "Number of lines per array row.")
+(defvar array-max-row nil "Number of rows in the array.")
+(defvar array-field-width nil "Width of a field in the array.")
+(defvar array-row nil "Current array row location of point.")
+(defvar array-column nil "Current array column location of point.")
+(defvar array-rows-numbered nil "Are rows numbered in the buffer?")
+(defvar array-copy-string nil "Current field string being copied.")
+(defvar array-respect-tabs nil "Should TAB conversion be prevented?")
 
 ;;; Internal information functions.
 
@@ -107,7 +105,7 @@
 	array-column (or a-column (array-current-column))))
 
 (defun array-update-buffer-position ()
-  "Set array-buffer-line and array-buffer-column to their current values."
+  "Set `array-buffer-line' and `array-buffer-column' to their current values."
   (setq array-buffer-line (current-line)
 	array-buffer-column (current-column)))
 
@@ -606,33 +604,34 @@
   (interactive)
   ;; If there is a conflict between array-field-width and init-string, resolve it.
   (let ((check t)
-	(len))
+	(len)
+        init-field)
     (while check
-      (setq array-init-field (read-string "Initial field value: "))
-      (setq len (length array-init-field))
+      (setq init-field (read-string "Initial field value: "))
+      (setq len (length init-field))
       (if (/= len array-field-width)
 	  (if (y-or-n-p (format "Change field width to %d? " len))
 	      (progn (setq array-field-width len)
 		     (setq check nil)))
-	(setq check nil))))
-  (goto-char (point-min))
-  (message "Working...")
-  (let ((this-row 1))
-    ;; Loop through the rows.
-    (while (<= this-row array-max-row)
-      (if array-rows-numbered
-	  (insert (format "%d:\n" this-row)))
-      (let ((this-column 1))
-	;; Loop through the columns.
-	(while (<= this-column array-max-column)
-	  (insert array-init-field)
-	  (if (and (zerop (% this-column array-columns-per-line))
-		   (/= this-column array-max-column))
-	      (newline))
-	  (setq this-column (1+ this-column))))
-      (setq this-row (1+ this-row))
-      (newline)))
-  (message "Working...done")
+	(setq check nil)))
+    (goto-char (point-min))
+    (message "Working...")
+    (let ((this-row 1))
+      ;; Loop through the rows.
+      (while (<= this-row array-max-row)
+        (if array-rows-numbered
+            (insert (format "%d:\n" this-row)))
+        (let ((this-column 1))
+          ;; Loop through the columns.
+          (while (<= this-column array-max-column)
+            (insert init-field)
+            (if (and (zerop (% this-column array-columns-per-line))
+                     (/= this-column array-max-column))
+                (newline))
+            (setq this-column (1+ this-column))))
+        (setq this-row (1+ this-row))
+        (newline)))
+    (message "Working...done"))
   (array-goto-cell 1 1))
 
 (defun array-reconfigure-rows (new-columns-per-line new-rows-numbered)
@@ -874,97 +873,39 @@
 
   (interactive)
   (kill-all-local-variables)
-  ;; Number of rows in the array.
-  (make-local-variable 'array-max-row)
-  ;; Number of columns in the array.
-  (make-local-variable 'array-max-column)
-  ;; Number of array columns per line.
-  (make-local-variable 'array-columns-per-line)
-  ;; Width of a field in the array.
-  (make-local-variable 'array-field-width)
-  ;; Are rows numbered in the buffer?
-  (make-local-variable 'array-rows-numbered)
-  ;; Length of a line in the array.
-  (make-local-variable 'array-line-length)
-  ;; Number of lines per array row.
-  (make-local-variable 'array-lines-per-row)
-  ;; Current line number of point in the buffer.
   (make-local-variable 'array-buffer-line)
-  ;; Current column number of point in the buffer.
   (make-local-variable 'array-buffer-column)
-  ;; Current array row location of point.
   (make-local-variable 'array-row)
-  ;; Current array column location of point.
   (make-local-variable 'array-column)
-  ;; Current field string being copied.
   (make-local-variable 'array-copy-string)
-  ;; Should TAB conversion be prevented?
-  (make-local-variable 'array-respect-tabs)
-  (setq array-respect-tabs nil)
-  (array-init-local-variables)
+  (set (make-local-variable 'array-respect-tabs) nil)
+  (set (make-local-variable 'array-max-row)
+       (read-number "Number of array rows: "))
+  (set (make-local-variable 'array-max-column)
+       (read-number "Number of array columns: "))
+  (set (make-local-variable 'array-columns-per-line)
+       (read-number "Array columns per line: "))
+  (set (make-local-variable 'array-field-width)
+       (read-number "Field width: "))
+  (set (make-local-variable 'array-rows-numbered)
+       (y-or-n-p "Rows numbered? "))
+  (set (make-local-variable 'array-line-length)
+       (* array-field-width array-columns-per-line))
+  (set (make-local-variable 'array-lines-per-row)
+       (+ (floor (1- array-max-column) array-columns-per-line)
+          (if array-rows-numbered 2 1)))
+  (message "")
   (setq major-mode 'array-mode)
   (setq mode-name "Array")
   (force-mode-line-update)
-  (make-local-variable 'truncate-lines)
-  (setq truncate-lines t)
+  (set (make-local-variable 'truncate-lines) t)
   (setq overwrite-mode 'overwrite-mode-textual)
   (use-local-map array-mode-map)
   (run-mode-hooks 'array-mode-hook))
 
 
 
-;;; Initialization functions.  These are not interactive.
-
-(defun array-init-local-variables ()
-  "Initialize the variables associated with the array in this buffer."
-  (array-init-max-row)
-  (array-init-max-column)
-  (array-init-columns-per-line)
-  (array-init-field-width)
-  (array-init-rows-numbered)
-  (array-init-line-length)
-  (array-init-lines-per-row)
-  (message ""))
-
-(defun array-init-max-row (&optional arg)
-  "Initialize the value of `array-max-row'."
-  (setq array-max-row
-	(or arg (string-to-number (read-string "Number of array rows: ")))))
-
-(defun array-init-max-column (&optional arg)
-  "Initialize the value of `array-max-column'."
-  (setq array-max-column
-	(or arg (string-to-number (read-string "Number of array columns: ")))))
-
-(defun array-init-columns-per-line (&optional arg)
-  "Initialize the value of `array-columns-per-line'."
-  (setq array-columns-per-line
-	(or arg (string-to-number (read-string "Array columns per line: ")))))
-
-(defun array-init-field-width (&optional arg)
-  "Initialize the value of `array-field-width'."
-  (setq array-field-width
-	(or arg (string-to-number (read-string "Field width: ")))))
-
-(defun array-init-rows-numbered (&optional arg)
-  "Initialize the value of `array-rows-numbered'."
-  (setq array-rows-numbered
-	(or arg (y-or-n-p "Rows numbered? "))))
-
-(defun array-init-line-length (&optional arg)
-  "Initialize the value of `array-line-length'."
-  (setq array-line-length
-	(or arg
-	  (* array-field-width array-columns-per-line))))
-
-(defun array-init-lines-per-row (&optional arg)
-  "Initialize the value of `array-lines-per-row'."
-  (setq array-lines-per-row
-	(or arg
-	  (+ (floor (1- array-max-column) array-columns-per-line)
-	     (if array-rows-numbered 2 1)))))
-
 (provide 'array)
 
-;;; arch-tag: 0086605d-79fe-4a1a-992a-456417261f80
+;; arch-tag: 0086605d-79fe-4a1a-992a-456417261f80
 ;;; array.el ends here
--- a/lisp/bindings.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/bindings.el	Thu Jan 19 07:11:42 2006 +0000
@@ -362,6 +362,20 @@
   (interactive)
   (switch-to-buffer (other-buffer)))
 
+(defun mode-line-next-buffer (event)
+  "Like `next-buffer', but temporarily select EVENT's window."
+  (interactive "e")
+  (save-selected-window
+    (select-window (posn-window (event-start event)))
+    (next-buffer)))
+
+(defun mode-line-previous-buffer (event)
+  "Like `previous-buffer', but temporarily select EVENT's window."
+  (interactive "e")
+  (save-selected-window
+    (select-window (posn-window (event-start event)))
+    (previous-buffer)))
+
 (defvar mode-line-mode-menu (make-sparse-keymap "Minor Modes") "\
 Menu of mode operations in the mode line.")
 
@@ -435,13 +449,13 @@
 (let ((map (make-sparse-keymap)))
   ;; Bind down- events so that the global keymap won't ``shine
   ;; through''.
-  (define-key map [mode-line mouse-1] 'mode-line-unbury-buffer)
+  (define-key map [mode-line mouse-1] 'mode-line-previous-buffer)
   (define-key map [header-line down-mouse-1] 'ignore)
-  (define-key map [header-line mouse-1] 'mode-line-unbury-buffer)
+  (define-key map [header-line mouse-1] 'mode-line-previous-buffer)
   (define-key map [header-line down-mouse-3] 'ignore)
-  (define-key map [mode-line mouse-3] 'mode-line-bury-buffer)
+  (define-key map [mode-line mouse-3] 'mode-line-next-buffer)
   (define-key map [header-line down-mouse-3] 'ignore)
-  (define-key map [header-line mouse-3] 'mode-line-bury-buffer)
+  (define-key map [header-line mouse-3] 'mode-line-next-buffer)
   (setq mode-line-buffer-identification-keymap map))
 
 (defun propertized-buffer-identification (fmt)
@@ -449,7 +463,7 @@
 FMT is a format specifier such as \"%12b\".  This function adds
 text properties for face, help-echo, and local-map to it."
   (list (propertize fmt
-		    'face 'Buffer-menu-buffer
+		    'face 'mode-line-buffer-id
 		    'help-echo
 		    (purecopy "mouse-1: previous buffer, mouse-3: next buffer")
 		    'mouse-face 'mode-line-highlight
--- a/lisp/buff-menu.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/buff-menu.el	Thu Jan 19 07:11:42 2006 +0000
@@ -74,10 +74,11 @@
   :type 'boolean
   :group 'Buffer-menu)
 
-(defface Buffer-menu-buffer
+(defface buffer-menu-buffer
   '((t (:weight bold)))
-  "Face used to highlight buffer name."
+  "Face used to highlight buffer names in the buffer menu."
   :group 'Buffer-menu)
+(put 'Buffer-menu-buffer 'face-alias 'buffer-menu-buffer)
 
 (defcustom Buffer-menu-buffer+size-width 26
   "*How wide to jointly make the buffer name and size columns."
@@ -795,7 +796,7 @@
 					 (int-to-string (nth 3 buffer))
 					 `(buffer-name ,(nth 2 buffer)
 					   buffer ,(car buffer)
-					   font-lock-face Buffer-menu-buffer
+					   font-lock-face buffer-menu-buffer
 					   mouse-face highlight
 					   help-echo "mouse-2: select this buffer"))
 		"  "
--- a/lisp/cus-edit.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/cus-edit.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1249,7 +1249,7 @@
 
 ;;;###autoload
 (defun customize-rogue ()
-  "Customize all user variable modified outside customize."
+  "Customize all user variables modified outside customize."
   (interactive)
   (let ((found nil))
     (mapatoms (lambda (symbol)
--- a/lisp/dired-aux.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/dired-aux.el	Thu Jan 19 07:11:42 2006 +0000
@@ -53,14 +53,20 @@
 \\[set-mark-command], not by Dired's \\[dired-mark] command.)
 The prompted-for file is the first file given to `diff'.
 With prefix arg, prompt for second argument SWITCHES,
- which is options for `diff'."
+which is options for `diff'."
   (interactive
-   (let ((default (if (mark t)
+   (let ((current (dired-get-filename t))
+	 (default (if (mark t)
 		      (save-excursion (goto-char (mark t))
 				      (dired-get-filename t t)))))
+     (if (or (equal default current)
+	     (and (not (equal (dired-dwim-target-directory)
+			      (dired-current-directory)))
+		  (not mark-active)))
+	 (setq default nil))
      (require 'diff)
      (list (read-file-name (format "Diff %s with%s: "
-				   (dired-get-filename t)
+				   current
 				   (if default
 				       (concat " (default " default ")")
 				     ""))
--- a/lisp/faces.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/faces.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1933,16 +1933,6 @@
   "Basic face for highlighting."
   :group 'basic-faces)
 
-(defface mode-line-highlight
-  '((((class color) (min-colors 88))
-     :box (:line-width 2 :color "grey40" :style released-button))
-    (t
-     :inherit highlight))
-  "Basic mode line face for highlighting."
-  :version "22.1"
-  :group 'modeline
-  :group 'basic-faces)
-
 (defface region
   '((((class color) (min-colors 88) (background dark))
      :background "blue3")
@@ -2007,6 +1997,12 @@
   :group 'basic-faces
   :version "22.1")
 
+(defgroup mode-line-faces nil
+  "Faces used in the mode line."
+  :group 'modeline
+  :group 'faces
+  :version "22.1")
+
 (defface mode-line
   '((((class color) (min-colors 88))
      :box (:line-width -1 :style released-button)
@@ -2015,7 +2011,7 @@
      :inverse-video t))
   "Basic mode line face for selected window."
   :version "21.1"
-  :group 'modeline
+  :group 'mode-line-faces
   :group 'basic-faces)
 
 (defface mode-line-inactive
@@ -2031,13 +2027,31 @@
      :foreground "grey80" :background "grey30"))
   "Basic mode line face for non-selected windows."
   :version "22.1"
-  :group 'modeline
+  :group 'mode-line-faces
+  :group 'basic-faces)
+
+(defface mode-line-highlight
+  '((((class color) (min-colors 88))
+     :box (:line-width 2 :color "grey40" :style released-button))
+    (t
+     :inherit highlight))
+  "Basic mode line face for highlighting."
+  :version "22.1"
+  :group 'mode-line-faces
+  :group 'basic-faces)
+
+(defface mode-line-buffer-id
+  '((t (:weight bold)))
+  "Face used for buffer identification parts of the mode line."
+  :version "22.1"
+  :group 'mode-line-faces
   :group 'basic-faces)
 
 ;; Make `modeline' an alias for `mode-line', for compatibility.
 (put 'modeline 'face-alias 'mode-line)
 (put 'modeline-inactive 'face-alias 'mode-line-inactive)
 (put 'modeline-highlight 'face-alias 'mode-line-highlight)
+(put 'modeline-buffer-id 'face-alias 'mode-line-buffer-id)
 
 (defface header-line
   '((default
@@ -2078,7 +2092,6 @@
   '((((type tty)) :inherit mode-line-inactive))
   "Face used for vertical window dividers on ttys."
   :version "22.1"
-  :group 'modeline
   :group 'basic-faces)
 
 (defface minibuffer-prompt
--- a/lisp/files.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/files.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1812,6 +1812,7 @@
      ("\\.ad[abs]\\'" . ada-mode)
      ("\\.ad[bs].dg\\'" . ada-mode)
      ("\\.\\([pP]\\([Llm]\\|erl\\|od\\)\\|al\\)\\'" . perl-mode)
+     ("Imakefile\\'" . makefile-imake-mode)
      ,@(if (memq system-type '(berkeley-unix next-mach darwin))
 	   '(("\\.mk\\'" . makefile-bsdmake-mode)
 	     ("GNUmakefile\\'" . makefile-gmake-mode)
--- a/lisp/font-lock.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/font-lock.el	Thu Jan 19 07:11:42 2006 +0000
@@ -2044,14 +2044,14 @@
     `(;; Definitions.
       (,(concat "(\\(def\\("
 		;; Function declarations.
-		"\\(advice\\|varalias\\|alias\\|generic\\|macro\\*?\\|method\\|"
+		"\\(advice\\|alias\\|generic\\|macro\\*?\\|method\\|"
 		"setf\\|subst\\*?\\|un\\*?\\|"
 		"ine-\\(condition\\|"
 		"\\(?:derived\\|\\(?:global-\\)?minor\\|generic\\)-mode\\|"
 		"method-combination\\|setf-expander\\|skeleton\\|widget\\|"
 		"function\\|\\(compiler\\|modify\\|symbol\\)-macro\\)\\)\\|"
 		;; Variable declarations.
-		"\\(const\\(ant\\)?\\|custom\\|face\\|parameter\\|var\\)\\|"
+		"\\(const\\(ant\\)?\\|custom\\|varalias\\|face\\|parameter\\|var\\)\\|"
 		;; Structure declarations.
 		"\\(class\\|group\\|theme\\|package\\|struct\\|type\\)"
 		"\\)\\)\\>"
--- a/lisp/gnus/ChangeLog	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/gnus/ChangeLog	Thu Jan 19 07:11:42 2006 +0000
@@ -1,3 +1,24 @@
+2006-01-16  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* nnrss.el: Update copyright.
+	(nnrss-opml-import): Query whether to subscribe to each entry.
+
+	* gnus-art.el:
+	* gnus-cus.el:
+	* gnus-group.el:
+	* gnus-start.el:
+	* gnus-sum.el:
+	* mm-uu.el:
+	* mm-view.el: Update copyright.
+
+2006-01-16  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* message.el (message-info): New function.
+	(message-mode-menu): Add it.
+	Update copyright.
+
+	* ChangeLog: Fix and update copyright.
+
 2006-01-16  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* mm-uu.el (mm-uu-text-plain-type): New variable.
@@ -53,12 +74,6 @@
 	RFC822 style.  Suggested by Mark Plaksin <happy@mcplaksin.org>.
 	(nnrss-check-group): Use it.
 
-2006-01-03  Rodrigo Ventura <yoda@isr.ist.utl.pt>  (tiny change)
-
-	* gnus-xmas.el (gnus-xmas-group-startup-message): Typo
-	gnus-splash-face -> gnus-splash.  Fixes starting from a TTY in
-	XEmacs.
-
 2006-01-01  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* gnus-sum.el (gnus-summary-work-articles): Remove useless `min'.
@@ -3274,7 +3289,7 @@
 
 See ChangeLog.2 for earlier changes.
 
-    Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+    Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
   Copying and distribution of this file, with or without modification,
   are permitted provided the copyright notice and this notice are preserved.
 
--- a/lisp/gnus/gnus-art.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/gnus/gnus-art.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1,7 +1,7 @@
 ;;; gnus-art.el --- article mode commands for Gnus
 
 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
--- a/lisp/gnus/gnus-cus.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/gnus/gnus-cus.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1,7 +1,7 @@
 ;;; gnus-cus.el --- customization commands for Gnus
 
 ;; Copyright (C) 1996, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: news
--- a/lisp/gnus/gnus-group.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/gnus/gnus-group.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1,7 +1,7 @@
 ;;; gnus-group.el --- group mode commands for Gnus
 
 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
--- a/lisp/gnus/gnus-start.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/gnus/gnus-start.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1,7 +1,7 @@
 ;;; gnus-start.el --- startup functions for Gnus
 
 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
--- a/lisp/gnus/gnus-sum.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/gnus/gnus-sum.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1,7 +1,7 @@
 ;;; gnus-sum.el --- summary mode commands for Gnus
 
 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
--- a/lisp/gnus/message.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/gnus/message.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1,7 +1,7 @@
 ;;; message.el --- composing mail and news messages
 
 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: mail, news
@@ -2185,6 +2185,15 @@
 	     (1+ max)))))
       (message-sort-headers-1))))
 
+(defun message-info (&optional arg)
+  "Display the Message manual.
+
+Prefixed with one \\[universal-argument], display the Emacs MIME manual.
+Prefixed with two \\[universal-argument]'s, display the PGG manual."
+  (interactive "p")
+  (cond ((eq arg 16) (Info-goto-node "(pgg)Top"))
+	((eq arg  4) (Info-goto-node "(emacs-mime)Top"))
+	(t           (Info-goto-node "(message)Top"))))
 
 
 
@@ -2312,7 +2321,11 @@
 	 '(:help "Ask, then arrange to send message at that time"))]
     ["Kill Message" message-kill-buffer
      ,@(if (featurep 'xemacs) '(t)
-	 '(:help "Delete this message without sending"))]))
+	 '(:help "Delete this message without sending"))]
+    "----"
+    ["Message manual" message-info
+     ,@(if (featurep 'xemacs) '(t)
+	 '(:help "Display the Message manual"))]))
 
 (easy-menu-define
   message-mode-field-menu message-mode-map ""
--- a/lisp/gnus/mm-uu.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/gnus/mm-uu.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1,7 +1,7 @@
 ;;; mm-uu.el --- Return uu stuff as mm handles
 
 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
 ;; Keywords: postscript uudecode binhex shar forward gnatsweb pgp
--- a/lisp/gnus/mm-view.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/gnus/mm-view.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1,7 +1,7 @@
 ;;; mm-view.el --- functions for viewing MIME objects
 
 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; This file is part of GNU Emacs.
--- a/lisp/gnus/nnrss.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/gnus/nnrss.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1,6 +1,7 @@
 ;;; nnrss.el --- interfacing with RSS
 
-;; Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2003, 2004, 2005,
+;;   2006 Free Software Foundation, Inc.
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
 ;; Keywords: RSS
@@ -755,14 +756,29 @@
   "OPML subscriptions import.
 Read the file and attempt to subscribe to each Feed in the file."
   (interactive "fImport file: ")
-  (mapcar
-   (lambda (node) (gnus-group-make-rss-group
-		   (cdr (assq 'xmlUrl (cadr node)))))
+  (mapc
+   (lambda (node)
+     (let ((xmlurl (cdr (assq 'xmlUrl (cadr node)))))
+       (when (and xmlurl
+		  (not (string-match "\\`[\t ]*\\'" xmlurl))
+		  (prog1
+		      (y-or-n-p (format "Subscribe to %s " xmlurl))
+		    (message "")))
+	 (condition-case err
+	     (progn
+	       (gnus-group-make-rss-group xmlurl)
+	       (forward-line 1))
+	   (error
+	    (message
+	     "Failed to subscribe to %s (%s); type any key to continue: "
+	     xmlurl
+	     (error-message-string err))
+	    (let ((echo-keystrokes 0))
+	      (read-char)))))))
    (nnrss-find-el 'outline
-		  (progn
-		    (find-file opml-file)
-		    (xml-parse-region (point-min)
-				      (point-max))))))
+		  (mm-with-multibyte-buffer
+		    (insert-file-contents opml-file)
+		    (xml-parse-region (point-min) (point-max))))))
 
 (defun nnrss-opml-export ()
   "OPML subscription export.
--- a/lisp/info.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/info.el	Thu Jan 19 07:11:42 2006 +0000
@@ -731,7 +731,8 @@
 	(pline        (count-lines (point-min) (line-beginning-position)))
 	(wline        (count-lines (point-min) (window-start)))
 	(old-history  Info-history)
-	(new-history  (list Info-current-file Info-current-node (point))))
+	(new-history  (and Info-current-file
+			   (list Info-current-file Info-current-node (point)))))
     (kill-buffer (current-buffer))
     (Info-find-node filename nodename)
     (setq Info-history old-history)
@@ -1399,15 +1400,31 @@
 	(Info-hide-cookies-node)
 	(run-hooks 'Info-selection-hook)))))
 
+(defvar Info-mode-line-node-keymap
+  (let ((map (make-sparse-keymap)))
+    (define-key map [mode-line mouse-1] 'Info-scroll-up)
+    (define-key map [mode-line mouse-3] 'Info-scroll-down)
+    map)
+  "Keymap to put on the Info node name in the mode line.")
+
 (defun Info-set-mode-line ()
   (setq mode-line-buffer-identification
 	(nconc (propertized-buffer-identification "%b")
 	       (list
-		(concat " ("
-			(if Info-current-file
-			    (file-name-nondirectory Info-current-file)
-			  " ")
-			") " (or Info-current-node ""))))))
+		(concat
+		 " ("
+		 (if (stringp Info-current-file)
+		     (file-name-nondirectory Info-current-file)
+		   "")
+		 ") "
+		 (if Info-current-node
+		     (propertize Info-current-node
+				 'face 'mode-line-buffer-id
+				 'help-echo
+				 "mouse-1: scroll forward, mouse-3: scroll back"
+				 'mouse-face 'mode-line-highlight
+				 'local-map Info-mode-line-node-keymap)
+		   ""))))))
 
 ;; Go to an Info node specified with a filename-and-nodename string
 ;; of the sort that is found in pointers in nodes.
--- a/lisp/international/mule.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/international/mule.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1556,6 +1556,23 @@
   :type '(repeat (cons (regexp :tag "Regexp")
 		       (symbol :tag "Coding system"))))
 
+(defun auto-coding-regexp-alist-lookup (from to)
+  "Lookup `auto-coding-regexp-alist' for the contents of the current buffer.
+The value is a coding system is specified for the region FROM and TO,
+or nil."
+  (save-excursion
+    (goto-char from)
+    (let ((alist auto-coding-regexp-alist)
+	  coding-system)
+      (while (and alist (not coding-system))
+	(let ((regexp (car (car alist))))
+	  (if enable-multibyte-characters
+	      (setq regexp (string-to-multibyte regexp)))
+	  (if (re-search-forward regexp to t)
+	      (setq coding-system (cdr (car alist)))
+	    (setq alist (cdr alist)))))
+      coding-system)))
+
 ;; See the bottom of this file for built-in auto coding functions.
 (defcustom auto-coding-functions '(sgml-xml-auto-coding-function
 				   sgml-html-meta-auto-coding-function)
@@ -1615,24 +1632,15 @@
 of CODING is not checked; it's callers responsibility to check
 it.
 
-If nothing is specified, the return value is nil.
-
-The variable `set-auto-coding-function' (which see) is set to this
-function by default."
+If nothing is specified, the return value is nil."
   (or (let ((coding-system (auto-coding-alist-lookup filename)))
 	(if coding-system
 	    (cons coding-system 'auto-coding-alist)))
       ;; Try using `auto-coding-regexp-alist'.
-      (save-excursion
-	(let ((alist auto-coding-regexp-alist)
-	      coding-system)
-	  (while (and alist (not coding-system))
-	    (let ((regexp (car (car alist))))
-	      (when (re-search-forward regexp (+ (point) size) t)
-		(setq coding-system (cdr (car alist)))))
-	    (setq alist (cdr alist)))
-	  (if coding-system
-	      (cons coding-system 'auto-coding-regexp-alist))))
+      (let ((coding-system (auto-coding-regexp-alist-lookup (point)
+							    (+ (point) size))))
+	(if coding-system
+	    (cons coding-system 'auto-coding-regexp-alist)))
       (let* ((case-fold-search t)
 	     (head-start (point))
 	     (head-end (+ head-start (min size 1024)))
@@ -1725,7 +1733,10 @@
 (defun set-auto-coding (filename size)
   "Return coding system for a file FILENAME of which SIZE bytes follow point.
 See `find-auto-coding' for how the coding system is found.
-Return nil if an invalid coding system is found."
+Return nil if an invalid coding system is found.
+
+The variable `set-auto-coding-function' (which see) is set to this
+function by default."
   (let ((found (find-auto-coding filename size)))
     (if (and found (coding-system-p (car found)))
 	(car found))))
--- a/lisp/log-view.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/log-view.el	Thu Jan 19 07:11:42 2006 +0000
@@ -225,14 +225,18 @@
 
 (defun log-view-minor-wrap (buf f)
   (let ((data (with-current-buffer buf
-		(cons
-		 (cons (log-view-current-file)
-		       (log-view-current-tag))
-		 (when mark-active
-		   (save-excursion
-		     (goto-char (mark))
-		     (cons (log-view-current-file)
-			   (log-view-current-tag))))))))
+		(let* ((beg (if mark-active (region-beginning) (point)))
+		       (end (if mark-active (region-end) (point)))
+		       (fr (log-view-current-tag beg))
+		       (to (log-view-current-tag end)))
+		  (when (string-equal fr to)
+		    (save-excursion
+		      (goto-char end)
+		      (log-view-msg-next)
+		      (setq to (log-view-current-tag))))
+		  (cons
+		   (cons (log-view-current-file) to)
+		   (cons (log-view-current-file) fr))))))
     (let ((cvs-branch-prefix (cdar data))
 	  (cvs-secondary-branch-prefix (and (cdar data) (cddr data)))
 	  (cvs-minor-current-files
--- a/lisp/mail/smtpmail.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/mail/smtpmail.el	Thu Jan 19 07:11:42 2006 +0000
@@ -365,7 +365,7 @@
 		(make-directory smtpmail-queue-dir t))
 	      (with-current-buffer buffer-data
 		(erase-buffer)
-		(insert-buffer-contents tembuf)
+		(insert-buffer-substring tembuf)
 		(write-file file-data)
 		(set-buffer buffer-elisp)
 		(erase-buffer)
--- a/lisp/man.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/man.el	Thu Jan 19 07:11:42 2006 +0000
@@ -274,7 +274,7 @@
 	    "(\\(" Man-section-regexp "\\))\\).*\\1"))
   "Regular expression describing the heading of a page.")
 
-(defvar Man-heading-regexp "^\\([A-Z][A-Z -]+\\)$"
+(defvar Man-heading-regexp "^\\([A-Z][A-Z /-]+\\)$"
   "Regular expression describing a manpage heading entry.")
 
 (defvar Man-see-also-regexp "SEE ALSO"
--- a/lisp/mh-e/ChangeLog	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/mh-e/ChangeLog	Thu Jan 19 07:11:42 2006 +0000
@@ -1,3 +1,41 @@
+2006-01-17  Bill Wohler  <wohler@newt.com>
+
+	* mh-acros.el (assoc-string): Fix typo in argument.
+
+2006-01-16  Bill Wohler  <wohler@newt.com>
+
+	* mh-acros.el (require): Remove defadvice of require as defadvice
+	is verboten within Emacs and our implementation was returning the
+	wrong value from require. Upcoming restructuring should make this
+	unnecessary.
+	(mh-assoc-ignore-case): Replace with defsubst assoc-string.
+
+	* mh-alias.el (mh-alias-local-users, mh-alias-reload,
+	mh-alias-expand, mh-alias-minibuffer-confirm-address): Use it.
+
+	* mh-identity.el (mh-identity-field-handler): Use it.
+
+	* mh-comp.el (mh-show-buffer-message-number): Replace (car
+	(read-from-string string) with (string-to-number string).
+
+	* mh-e.el (mh-parse-flist-output-line, mh-folder-size-folder):
+	Ditto.
+
+	* mh-mime.el (mh-mml-forward-message): Ditto.
+
+	* mh-search.el (mh-swish-next-result, mh-mairix-next-result)
+	(mh-namazu-next-result, mh-grep-next-result, mh-md5sum-parser)
+	(mh-openssl-parser, mh-index-update-maps): Ditto.
+
+	* mh-seq.el (mh-translate-range, mh-narrow-to-header-field)
+	(mh-thread-generate): Ditto.
+
+2006-01-16  Katsumi Yamaoka <yamaoka@jpl.org>
+
+	* mh-mime.el (mh-mime-display, mh-mm-inline-message): Fix use of
+	mm- functions for proper text=flowed handling (addresses SF
+	#1273521).
+
 2006-01-15  Bill Wohler  <wohler@newt.com>
 
 	* mh-e.el (mh-limit-map, mh-help-messages): Change keybinding of
--- a/lisp/mh-e/mh-acros.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/mh-e/mh-acros.el	Thu Jan 19 07:11:42 2006 +0000
@@ -26,14 +26,14 @@
 
 ;;; Commentary:
 
-;; This file contains macros that would normally be in mh-utils.el except that
-;; their presence there would cause a dependency loop with mh-customize.el.
+;; This file contains most, if not all, macros. It is so named with a
+;; silent "m" so that it is compiled first. Otherwise, "make
+;; recompile" in CVS Emacs may use compiled files with stale macro
+;; definitions.
+
 ;; This file must always be included like this:
 ;;
 ;;   (eval-when-compile (require 'mh-acros))
-;;
-;; It is so named with a silent "m" so that it is compiled first. Otherwise,
-;; "make recompile" in Emacs 21.4 fails.
 
 ;;; Change Log:
 
@@ -150,23 +150,15 @@
                           (list 'nth ,x z)))
        (quote ,struct-name))))
 
-;; A better solution would be to use Stefan's change in bytecomp.el.
-;; If it were checked in, we can drop the advice to require and it
-;; will make things nicer elsewhere too.
-(defadvice require (around mh-prefer-el activate)
-  "Modify `require' to load uncompiled MH-E files."
-  (or (featurep (ad-get-arg 0))
-      (and (string-match "^mh-" (symbol-name (ad-get-arg 0)))
-           (load (format "%s.el" (ad-get-arg 0)) t t))
-      ad-do-it))
-
-(defmacro mh-assoc-ignore-case (key alist)
-  "Check if KEY is present in ALIST while ignoring case to do the comparison.
-Compatibility macro for Emacs versions that lack `assoc-string',
-introduced in Emacs 22."
-  (if (fboundp 'assoc-string)
-      `(assoc-string ,key ,alist t)
-    `(assoc-ignore-case ,key ,alist)))
+(unless (fboundp 'assoc-string)
+  (defsubst assoc-string (key list case-fold)
+    "Like `assoc' but specifically for strings.
+Case is ignored if CASE-FOLD is non-nil.
+This function added by MH-E for Emacs versions that lack
+`assoc-string', introduced in Emacs 22."
+    (if case-fold
+        (assoc-ignore-case key list)
+      (assoc key list))))
 
 (provide 'mh-acros)
 
--- a/lisp/mh-e/mh-alias.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/mh-e/mh-alias.el	Thu Jan 19 07:11:42 2006 +0000
@@ -179,7 +179,7 @@
                     (if (string-equal username realname)
                         (concat "<" username ">")
                       (concat realname " <" username ">"))))
-              (when (not (mh-assoc-ignore-case alias-name mh-alias-alist))
+              (when (not (assoc-string alias-name mh-alias-alist t))
                 (setq passwd-alist (cons (list alias-name alias-translation)
                                          passwd-alist)))))))
         (forward-line 1)))
@@ -209,12 +209,12 @@
       (cond
        ((looking-at "^[ \t]"))          ;Continuation line
        ((looking-at "\\(.+\\): .+: .*$") ; A new -blind- MH alias
-        (when (not (mh-assoc-ignore-case (match-string 1) mh-alias-blind-alist))
+        (when (not (assoc-string (match-string 1) mh-alias-blind-alist t))
           (setq mh-alias-blind-alist
                 (cons (list (match-string 1)) mh-alias-blind-alist))
           (setq mh-alias-alist (cons (list (match-string 1)) mh-alias-alist))))
        ((looking-at "\\(.+\\): .*$")    ; A new MH alias
-        (when (not (mh-assoc-ignore-case (match-string 1) mh-alias-alist))
+        (when (not (assoc-string (match-string 1) mh-alias-alist t))
           (setq mh-alias-alist
                 (cons (list (match-string 1)) mh-alias-alist)))))
       (forward-line 1)))
@@ -225,7 +225,7 @@
           user)
       (while local-users
         (setq user (car local-users))
-        (if (not (mh-assoc-ignore-case (car user) mh-alias-alist))
+        (if (not (assoc-string (car user) mh-alias-alist t))
             (setq mh-alias-alist (append mh-alias-alist (list user))))
         (setq local-users (cdr local-users)))))
   (run-hooks 'mh-alias-reloaded-hook)
@@ -262,10 +262,10 @@
   "Return expansion for ALIAS.
 Blind aliases or users from /etc/passwd are not expanded."
   (cond
-   ((mh-assoc-ignore-case alias mh-alias-blind-alist)
+   ((assoc-string alias mh-alias-blind-alist t)
     alias)                              ; Don't expand a blind alias
-   ((mh-assoc-ignore-case alias mh-alias-passwd-alist)
-    (cadr (mh-assoc-ignore-case alias mh-alias-passwd-alist)))
+   ((assoc-string alias mh-alias-passwd-alist t)
+    (cadr (assoc-string alias mh-alias-passwd-alist t)))
    (t
     (mh-alias-ali alias))))
 
@@ -300,7 +300,7 @@
       (let* ((case-fold-search t)
              (beg (mh-beginning-of-word))
              (the-name (buffer-substring-no-properties beg (point))))
-        (if (mh-assoc-ignore-case the-name mh-alias-alist)
+        (if (assoc-string the-name mh-alias-alist t)
             (message "%s -> %s" the-name (mh-alias-expand the-name))
           ;; Check if if was a single word likely to be an alias
           (if (and (equal mh-alias-flash-on-comma 1)
--- a/lisp/mh-e/mh-comp.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/mh-e/mh-comp.el	Thu Jan 19 07:11:42 2006 +0000
@@ -522,8 +522,8 @@
         (set-buffer buffer))
     (cond ((eq major-mode 'mh-show-mode)
            (let ((number-start (mh-search-from-end ?/ buffer-file-name)))
-             (car (read-from-string (substring buffer-file-name
-                                               (1+ number-start))))))
+             (string-to-number (substring buffer-file-name
+                                          (1+ number-start)))))
           ((and (eq major-mode 'mh-folder-mode)
                 mh-show-buffer
                 (get-buffer mh-show-buffer))
--- a/lisp/mh-e/mh-e.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/mh-e/mh-e.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1372,13 +1372,13 @@
     (goto-char (point-max))
     (let (folder unseen total p)
       (when (search-backward " out of " (point-min) t)
-        (setq total (read-from-string
+        (setq total (string-to-number
                      (buffer-substring-no-properties
                       (match-end 0) (line-end-position))))
         (when (search-backward " in sequence " (point-min) t)
           (setq p (point))
           (when (search-backward " has " (point-min) t)
-            (setq unseen (read-from-string (buffer-substring-no-properties
+            (setq unseen (string-to-number (buffer-substring-no-properties
                                             (match-end 0) p)))
             (while (eq (char-after) ? )
               (backward-char))
@@ -1387,7 +1387,7 @@
             (when (and (equal (aref folder (1- (length folder))) ?+)
                        (equal current-folder folder))
               (setq folder (substring folder 0 (1- (length folder)))))
-            (values (format "+%s" folder) (car unseen) (car total))))))))
+            (values (format "+%s" folder) unseen total)))))))
 
 (defun mh-folder-size-folder (folder)
   "Find size of FOLDER using \"folder\"."
@@ -1398,7 +1398,7 @@
                     "-norecurse" folder)
       (goto-char (point-min))
       (if (re-search-forward " has \\([0-9]+\\) " nil t)
-          (values (car (read-from-string (match-string 1))) u folder)
+          (values (string-to-number (match-string 1)) u folder)
         (values 0 u folder)))))
 
 (defun mh-folder-size-flist (folder)
--- a/lisp/mh-e/mh-identity.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/mh-e/mh-identity.el	Thu Jan 19 07:11:42 2006 +0000
@@ -127,7 +127,7 @@
 character \":\", then it must have a special handler defined in
 `mh-identity-handlers', else return an error since it is not a
 valid header field."
-  (or (cdr (mh-assoc-ignore-case field mh-identity-handlers))
+  (or (cdr (assoc-string field mh-identity-handlers t))
       (and (eq (aref field 0) ?:)
            (error "Field %s not found in `mh-identity-handlers'" field))
       (cdr (assoc ":default" mh-identity-handlers))
--- a/lisp/mh-e/mh-mime.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/mh-e/mh-mime.el	Thu Jan 19 07:11:42 2006 +0000
@@ -543,7 +543,7 @@
 MESSAGE number."
   (let ((msg (if (and (equal message "") (numberp mh-sent-from-msg))
                  mh-sent-from-msg
-               (car (read-from-string message)))))
+               (string-to-number message))))
     (cond ((integerp msg)
            (if (string= "" description)
                ;; Rationale: mml-attach-file constructs a malformed composition
@@ -921,7 +921,10 @@
             ;; If needed dissect the current buffer
             (if pre-dissected-handles
                 (setq handles pre-dissected-handles)
-              (setq handles (or (mm-dissect-buffer nil) (mm-uu-dissect)))
+              (if (setq handles (mm-dissect-buffer nil))
+                  (when (fboundp 'mm-uu-dissect-text-parts)
+                    (mm-uu-dissect-text-parts handles))
+                (setq handles (mm-uu-dissect)))
               (setf (mh-mime-handles (mh-buffer-data))
                     (mm-merge-handles handles
                                       (mh-mime-handles (mh-buffer-data))))
@@ -1477,8 +1480,11 @@
         (mh-mime-display
          (or (gethash handle (mh-mime-handles-cache (mh-buffer-data)))
              (setf (gethash handle (mh-mime-handles-cache (mh-buffer-data)))
-                   (let ((handles (or (mm-dissect-buffer nil)
-                                      (mm-uu-dissect))))
+                   (let ((handles (mm-dissect-buffer nil)))
+                     (if handles
+                         (when (fboundp 'mm-uu-dissect-text-parts)
+                           (mm-uu-dissect-text-parts handles))
+                       (setq handles (mm-uu-dissect)))
                      (setf (mh-mime-handles (mh-buffer-data))
                            (mm-merge-handles
                             handles (mh-mime-handles (mh-buffer-data))))
--- a/lisp/mh-e/mh-search.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/mh-e/mh-search.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1105,10 +1105,8 @@
                               (substring s (match-end 0) (1- (length s))))
                     (return 'error)))
                 (let* ((s (buffer-substring-no-properties (1+ (point)) end))
-                       (val (ignore-errors (read-from-string s))))
-                  (if (and (consp val) (numberp (car val)))
-                      (car val)
-                    (return 'error)))
+                       (n (ignore-errors (string-to-number s))))
+                  (if n n (return 'error)))
                 nil)))
     (forward-line)))
 
@@ -1184,8 +1182,8 @@
             (return 'error))
           (list (format "+%s" (buffer-substring-no-properties
                                (point) (1- msg-start)))
-                (car (read-from-string
-                      (buffer-substring-no-properties msg-start end)))
+                (string-to-number
+                 (buffer-substring-no-properties msg-start end))
                 nil)))
     (forward-line)))
 
@@ -1313,11 +1311,9 @@
                  (mark (mh-search-from-end ?/ folder/msg)))
             (unless mark (return 'error))
             (list (format "+%s" (substring folder/msg 0 mark))
-                  (let ((n (ignore-errors (read-from-string
+                  (let ((n (ignore-errors (string-to-number
                                            (substring folder/msg (1+ mark))))))
-                    (if (and (consp n) (numberp (car n)))
-                        (car n)
-                      (return 'error)))
+                    (if n n (return 'error)))
                   nil))))
     (forward-line)))
 
@@ -1458,12 +1454,10 @@
               (return 'error))
             (list (format "+%s" (buffer-substring-no-properties
                                  folder-start (point)))
-                  (let ((val (ignore-errors (read-from-string
-                                             (buffer-substring-no-properties
-                                              (1+ (point)) msg-end)))))
-                    (if (and (consp val) (integerp (car val)))
-                        (car val)
-                      (return 'error)))
+                  (let ((n (ignore-errors (string-to-number
+                                           (buffer-substring-no-properties
+                                            (1+ (point)) msg-end)))))
+                    (if n n (return 'error)))
                   match))))
     (forward-line)))
 
@@ -1804,8 +1798,8 @@
     (goto-char end)
     (setq last-slash (search-backward "/" begin t))
     (cond ((and first-space last-slash)
-           (cons (car (read-from-string (buffer-substring-no-properties
-                                         (1+ last-slash) end)))
+           (cons (string-to-number (buffer-substring-no-properties
+                                    (1+ last-slash) end))
                  (buffer-substring-no-properties begin (1- first-space))))
           (t (cons nil nil)))))
 
@@ -1818,8 +1812,8 @@
     (setq last-space (search-backward " " begin t))
     (setq last-slash (search-backward "/" begin t))
     (cond ((and last-slash last-space)
-           (cons (car (read-from-string (buffer-substring-no-properties
-                                         (1+ last-slash) (1- last-space))))
+           (cons (string-to-number (buffer-substring-no-properties
+                                    (1+ last-slash) (1- last-space)))
                  (buffer-substring-no-properties (1+ last-space) end))))))
 
 (defalias 'mh-md5-parser 'mh-openssl-parser)
@@ -1858,7 +1852,7 @@
                    ;; update maps
                    (setq checksum (buffer-substring-no-properties
                                    (point) (line-end-position)))
-                   (let ((msg (car (read-from-string msg))))
+                   (let ((msg (string-to-number msg)))
                      (set-buffer folder)
                      (mh-index-update-single-msg msg checksum origin-map)))))
           (forward-line))))
--- a/lisp/mh-e/mh-seq.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/mh-e/mh-seq.el	Thu Jan 19 07:11:42 2006 +0000
@@ -560,7 +560,7 @@
         (set-buffer mh-temp-buffer)
         (goto-char (point-min))
         (while (re-search-forward "/\\([0-9]*\\)$" nil t)
-          (push (car (read-from-string (match-string 1))) result))
+          (push (string-to-number (match-string 1)) result))
         (nreverse result)))))
 
 (defun mh-seq-names (seq-list)
@@ -928,9 +928,10 @@
              (append original (list "-list") pick-expr))
       (goto-char (point-min))
       (while (not (eobp))
-        (let ((num (read-from-string
-                    (buffer-substring (point) (line-end-position)))))
-          (when (numberp (car num)) (push (car num) msg-list))
+        (let ((num (ignore-errors
+                     (string-to-number
+                      (buffer-substring (point) (line-end-position))))))
+          (when num (push num msg-list))
           (forward-line))))
     (if (null msg-list)
         (message "No matches")
@@ -1350,7 +1351,7 @@
             (let* ((index-line
                     (prog1 (buffer-substring (point) (line-end-position))
                       (forward-line)))
-                   (index (car (read-from-string index-line)))
+                   (index (string-to-number index-line))
                    (id (prog1 (buffer-substring (point) (line-end-position))
                          (forward-line)))
                    (refs (prog1 (buffer-substring (point) (line-end-position))
--- a/lisp/play/doctor.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/play/doctor.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1,7 +1,7 @@
 ;;; doctor.el --- psychological help for frustrated users
 
 ;; Copyright (C) 1985, 1987, 1994, 1996, 2000, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006  Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: games
@@ -46,35 +46,34 @@
 
 ;;; Code:
 
-(eval-when-compile
-  (defvar **mad**)        (defvar *debug*)      (defvar *print-space*)
-  (defvar *print-upcase*) (defvar abuselst)     (defvar abusewords)
-  (defvar account)        (defvar afraidof)     (defvar arerelated)
-  (defvar areyou)         (defvar bak)          (defvar beclst)
-  (defvar bother)         (defvar bye)          (defvar canyou)
-  (defvar chatlst)        (defvar continue)     (defvar deathlst)
-  (defvar describe)       (defvar drnk)         (defvar drugs)
-  (defvar eliza-flag)     (defvar elizalst)     (defvar famlst)
-  (defvar feared)         (defvar fears)        (defvar feelings-about)
-  (defvar foullst)        (defvar found)        (defvar hello)
-  (defvar history)        (defvar howareyoulst) (defvar howdyflag)
-  (defvar huhlst)         (defvar ibelieve)     (defvar improve)
-  (defvar inter)          (defvar isee)         (defvar isrelated)
-  (defvar lincount)       (defvar longhuhlst)   (defvar lover)
-  (defvar machlst)        (defvar mathlst)      (defvar maybe)
-  (defvar moods)          (defvar neglst)       (defvar obj)
-  (defvar object)         (defvar owner)        (defvar please)
-  (defvar problems)       (defvar qlist)        (defvar random-adjective)
-  (defvar relation)       (defvar remlst)       (defvar repetitive-shortness)
-  (defvar replist)        (defvar rms-flag)     (defvar schoollst)
-  (defvar sent)           (defvar sexlst)       (defvar shortbeclst)
-  (defvar shortlst)       (defvar something)    (defvar sportslst)
-  (defvar stallmanlst)    (defvar states)       (defvar subj)
-  (defvar suicide-flag)   (defvar sure)         (defvar things)
-  (defvar thlst)          (defvar toklst)       (defvar typos)
-  (defvar verb)           (defvar want)         (defvar whatwhen)
-  (defvar whereoutp)      (defvar whysay)       (defvar whywant)
-  (defvar zippy-flag)     (defvar zippylst))
+(defvar **mad**)        (defvar *debug*)      (defvar *print-space*)
+(defvar *print-upcase*) (defvar abuselst)     (defvar abusewords)
+(defvar account)        (defvar afraidof)     (defvar arerelated)
+(defvar areyou)         (defvar bak)          (defvar beclst)
+(defvar bother)         (defvar bye)          (defvar canyou)
+(defvar chatlst)        (defvar continue)     (defvar deathlst)
+(defvar describe)       (defvar drnk)         (defvar drugs)
+(defvar eliza-flag)     (defvar elizalst)     (defvar famlst)
+(defvar feared)         (defvar fears)        (defvar feelings-about)
+(defvar foullst)        (defvar found)        (defvar hello)
+(defvar history)        (defvar howareyoulst) (defvar howdyflag)
+(defvar huhlst)         (defvar ibelieve)     (defvar improve)
+(defvar inter)          (defvar isee)         (defvar isrelated)
+(defvar lincount)       (defvar longhuhlst)   (defvar lover)
+(defvar machlst)        (defvar mathlst)      (defvar maybe)
+(defvar moods)          (defvar neglst)       (defvar obj)
+(defvar object)         (defvar owner)        (defvar please)
+(defvar problems)       (defvar qlist)        (defvar random-adjective)
+(defvar relation)       (defvar remlst)       (defvar repetitive-shortness)
+(defvar replist)        (defvar rms-flag)     (defvar schoollst)
+(defvar sent)           (defvar sexlst)       (defvar shortbeclst)
+(defvar shortlst)       (defvar something)    (defvar sportslst)
+(defvar stallmanlst)    (defvar states)       (defvar subj)
+(defvar suicide-flag)   (defvar sure)         (defvar things)
+(defvar thlst)          (defvar toklst)       (defvar typos)
+(defvar verb)           (defvar want)         (defvar whatwhen)
+(defvar whereoutp)      (defvar whysay)       (defvar whywant)
+(defvar zippy-flag)     (defvar zippylst)
 
 (defun doc// (x) x)
 
@@ -90,6 +89,12 @@
     (set what ww)
     first))
 
+(defvar doc-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map "\n" 'doctor-read-print)
+    (define-key map "\r" 'doctor-ret-or-read)
+    map))
+
 (define-derived-mode doctor-mode text-mode "Doctor"
   "Major mode for running the Doctor (Eliza) program.
 Like Text mode with Auto Fill mode
@@ -102,9 +107,6 @@
 		 each time you are finished talking, type \R\E\T twice \.))
   (insert "\n"))
 
-(define-key doctor-mode-map "\n" 'doctor-read-print)
-(define-key doctor-mode-map "\r" 'doctor-ret-or-read)
-
 (defun make-doctor-variables ()
   (make-local-variable 'typos)
   (setq typos
@@ -1078,65 +1080,66 @@
 	anyone everyone someone
 	anything something everything)))
 
-(mapcar (function (lambda (x) (put x 'doctor-sentence-type 'verb)))
-	'(abort aborted aborts ask asked asks am
-		applied applies apply are associate
-		associated ate
-		be became become becomes becoming
-		been being believe believed believes
-		bit bite bites bore bored bores boring bought buy buys buying
-		call called calling calls came can caught catch come
-		contract contracted contracts control controlled controls
-		could croak croaks croaked cut cuts
-		dare dared define defines dial dialed dials did die died dies
-		dislike disliked
-		dislikes do does drank drink drinks drinking
-		drive drives driving drove dying
-		eat eating eats expand expanded expands
-		expect expected expects expel expels expelled
-		explain explained explains
-		fart farts feel feels felt fight fights find finds finding
-		forget forgets forgot fought found
-		fuck fucked fucking fucks
-		gave get gets getting give gives go goes going gone got gotten
-		had harm harms has hate hated hates have having
-		hear heard hears hearing help helped helping helps
-		hit hits hope hoped hopes hurt hurts
-		implies imply is
-		join joined joins jump jumped jumps
-		keep keeping keeps kept
-		kill killed killing kills kiss kissed kisses kissing
-		knew know knows
-		laid lay lays let lets lie lied lies like liked likes
-		liking listen listens
-		login look looked looking looks
-		lose losing lost
-		love loved loves loving
-		luse lusing lust lusts
-		made make makes making may mean means meant might
-		move moved moves moving must
-		need needed needs
-		order ordered orders ought
-		paid pay pays pick picked picking picks
-		placed placing prefer prefers put puts
-		ran rape raped rapes
-		read reading reads recall receive received receives
-		refer refered referred refers
-		relate related relates remember remembered remembers
-		romp romped romps run running runs
-		said sang sat saw say says
-		screw screwed screwing screws scrod see sees seem seemed
-		seems seen sell selling sells
-		send sendind sends sent shall shoot shot should
-		sing sings sit sits sitting sold studied study
-		take takes taking talk talked talking talks tell tells telling
-		think thinks
-		thought told took tooled touch touched touches touching
-		transfer transferred transfers transmit transmits transmitted
-		type types types typing
-		walk walked walking walks want wanted wants was watch
-		watched watching went were will wish would work worked works
-		write writes writing wrote use used uses using))
+(dolist (x
+         '(abort aborted aborts ask asked asks am
+           applied applies apply are associate
+           associated ate
+           be became become becomes becoming
+           been being believe believed believes
+           bit bite bites bore bored bores boring bought buy buys buying
+           call called calling calls came can caught catch come
+           contract contracted contracts control controlled controls
+           could croak croaks croaked cut cuts
+           dare dared define defines dial dialed dials did die died dies
+           dislike disliked
+           dislikes do does drank drink drinks drinking
+           drive drives driving drove dying
+           eat eating eats expand expanded expands
+           expect expected expects expel expels expelled
+           explain explained explains
+           fart farts feel feels felt fight fights find finds finding
+           forget forgets forgot fought found
+           fuck fucked fucking fucks
+           gave get gets getting give gives go goes going gone got gotten
+           had harm harms has hate hated hates have having
+           hear heard hears hearing help helped helping helps
+           hit hits hope hoped hopes hurt hurts
+           implies imply is
+           join joined joins jump jumped jumps
+           keep keeping keeps kept
+           kill killed killing kills kiss kissed kisses kissing
+           knew know knows
+           laid lay lays let lets lie lied lies like liked likes
+           liking listen listens
+           login look looked looking looks
+           lose losing lost
+           love loved loves loving
+           luse lusing lust lusts
+           made make makes making may mean means meant might
+           move moved moves moving must
+           need needed needs
+           order ordered orders ought
+           paid pay pays pick picked picking picks
+           placed placing prefer prefers put puts
+           ran rape raped rapes
+           read reading reads recall receive received receives
+           refer refered referred refers
+           relate related relates remember remembered remembers
+           romp romped romps run running runs
+           said sang sat saw say says
+           screw screwed screwing screws scrod see sees seem seemed
+           seems seen sell selling sells
+           send sendind sends sent shall shoot shot should
+           sing sings sit sits sitting sold studied study
+           take takes taking talk talked talking talks tell tells telling
+           think thinks
+           thought told took tooled touch touched touches touching
+           transfer transferred transfers transmit transmits transmitted
+           type types types typing
+           walk walked walking walks want wanted wants was watch
+           watched watching went were will wish would work worked works
+           write writes writing wrote use used uses using))
+  (put x 'doctor-sentence-type 'verb))
 
 (defun doctor-verbp (x) (if (symbolp x)
 			    (eq (get x 'doctor-sentence-type) 'verb)))
@@ -1385,7 +1388,7 @@
 (defun doctor-txtype (ans)
   "Output to buffer a list of symbols or strings as a sentence."
   (setq *print-upcase* t *print-space* nil)
-  (mapcar 'doctor-type-symbol ans)
+  (mapc 'doctor-type-symbol ans)
   (insert "\n"))
 
 (defun doctor-type-symbol (word)
@@ -1656,5 +1659,5 @@
 
 (provide 'doctor)
 
-;;; arch-tag: 579380f6-4902-4ea5-bccb-6339e30e1257
+;; arch-tag: 579380f6-4902-4ea5-bccb-6339e30e1257
 ;;; doctor.el ends here
--- a/lisp/progmodes/fortran.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/progmodes/fortran.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1,7 +1,7 @@
 ;;; fortran.el --- Fortran mode for GNU Emacs
 
 ;; Copyright (C) 1986, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001,
-;;               2002, 2003, 2004, 2005  Free Software Foundation, Inc.
+;;               2002, 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 
 ;; Author: Michael D. Prange <prange@erl.mit.edu>
 ;; Maintainer: Glenn Morris <rgm@gnu.org>
@@ -53,12 +53,12 @@
 ;;   second in column 6.
 ;; * Support any other extensions to f77 grokked by GNU Fortran I've missed.
 
-(eval-when-compile			; silence compiler
-  (defvar dabbrev-case-fold-search)
-  (defvar font-lock-syntactic-keywords)
-  (defvar gud-find-expr-function)
-  (defvar imenu-case-fold-search)
-  (defvar imenu-syntax-alist))
+;; silence compiler
+(defvar dabbrev-case-fold-search)
+(defvar font-lock-syntactic-keywords)
+(defvar gud-find-expr-function)
+(defvar imenu-case-fold-search)
+(defvar imenu-syntax-alist)
 
 
 (defgroup fortran nil
@@ -891,16 +891,16 @@
 Any other key combination is executed normally."
   (interactive "*")
   (insert last-command-char)
-  (let (char event)
-    (if (fboundp 'next-command-event) ; XEmacs
-        (setq event (next-command-event)
-              char (event-to-character event))
-      (setq event (read-event)
-            char event))
+  (let* ((event (if (fboundp 'next-command-event) ; XEmacs
+                    (next-command-event)
+                  (read-event)))
+         (char (if (fboundp 'event-to-character)
+                   (event-to-character event) event)))
     ;; Insert char if not equal to `?', or if abbrev-mode is off.
-    (if (and abbrev-mode (or (eq char ??) (eq char help-char)))
+    (if (and abbrev-mode (or (eq char ??) (eq char help-char)
+                             (memq event help-event-list)))
 	(fortran-abbrev-help)
-      (setq unread-command-events (list event)))))
+      (push event unread-command-events))))
 
 (defun fortran-abbrev-help ()
   "List the currently defined abbrevs in Fortran mode."
@@ -911,8 +911,7 @@
 
 (defun fortran-prepare-abbrev-list-buffer ()
   "Create a buffer listing the Fortran mode abbreviations."
-  (save-excursion
-    (set-buffer (get-buffer-create "*Abbrevs*"))
+  (with-current-buffer (get-buffer-create "*Abbrevs*")
     (erase-buffer)
     (insert-abbrev-table-description 'fortran-mode-abbrev-table t)
     (goto-char (point-min))
@@ -1917,8 +1916,7 @@
 
 (defun fortran-break-line ()
   "Call `fortran-split-line'.  Joins continuation lines first, then refills."
-  (let ((opoint (point))
-	(bol (line-beginning-position))
+  (let ((bol (line-beginning-position))
 	(comment-string
 	 (save-excursion
 	   (if (fortran-find-comment-start-skip)
@@ -2036,5 +2034,5 @@
 
 (provide 'fortran)
 
-;;; arch-tag: 74935096-21c4-4cab-8ee5-6ef16090dc04
+;; arch-tag: 74935096-21c4-4cab-8ee5-6ef16090dc04
 ;;; fortran.el ends here
--- a/lisp/progmodes/make-mode.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/progmodes/make-mode.el	Thu Jan 19 07:11:42 2006 +0000
@@ -489,6 +489,19 @@
    "^\\(?: [ \t]*\\)?\\.\\(?:el\\)?if\\(n?\\)\\(?:def\\|make\\)?\\>[ \t]*\\(!?\\)"
    '("^[ \t]*\\.for[ \t].+[ \t]\\(in\\)\\>" 1 font-lock-keyword-face)))
 
+(defconst makefile-imake-font-lock-keywords
+  (append 
+   (makefile-make-font-lock-keywords
+    makefile-var-use-regex
+    makefile-statements
+    t
+    nil
+    '("^XCOMM.*$" . font-lock-comment-face)
+    '("XVAR\\(?:use\\|def\\)[0-9]" 0 font-lock-keyword-face prepend)
+    '("@@" . font-lock-preprocessor-face)
+    )
+   cpp-font-lock-keywords))
+
 
 (defconst makefile-font-lock-syntactic-keywords
   ;; From sh-script.el.
@@ -581,6 +594,7 @@
     (define-key map "\C-c\C-m\C-a" 'makefile-automake-mode)
     (define-key map "\C-c\C-m\C-b" 'makefile-bsdmake-mode)
     (define-key map "\C-c\C-m\C-g" 'makefile-gmake-mode)
+    (define-key map "\C-c\C-m\C-i" 'makefile-imake-mode)
     (define-key map "\C-c\C-m\C-m" 'makefile-mode)
     (define-key map "\C-c\C-m\C-p" 'makefile-makepp-mode)
     (define-key map "\M-p"     'makefile-previous-dependency)
@@ -639,6 +653,15 @@
   (modify-syntax-entry ?#  "<     " makefile-mode-syntax-table)
   (modify-syntax-entry ?\n ">     " makefile-mode-syntax-table))
 
+(defvar makefile-imake-mode-syntax-table (copy-syntax-table
+					  makefile-mode-syntax-table))
+(if makefile-imake-mode-syntax-table
+    ()
+  (modify-syntax-entry ?/  ". 14" makefile-imake-mode-syntax-table)
+  (modify-syntax-entry ?*  ". 23" makefile-imake-mode-syntax-table)
+  (modify-syntax-entry ?#  "'" makefile-imake-mode-syntax-table)
+  (modify-syntax-entry ?\n ". b" makefile-imake-mode-syntax-table))
+
 
 ;;; ------------------------------------------------------------
 ;;; Internal variables.
@@ -701,7 +724,8 @@
 
 If you are editing a file for a different make, try one of the
 variants `makefile-automake-mode', `makefile-gmake-mode',
-`makefile-makepp-mode' or `makefile-bsdmake-mode'.  All but the
+`makefile-makepp-mode', `makefile-bsdmake-mode' or, 
+`makefile-imake-mode'All but the
 last should be correctly chosen based on the file name, except if
 it is *.mk.  This function ends by invoking the function(s)
 `makefile-mode-hook'.
@@ -885,6 +909,20 @@
   (setq font-lock-defaults
 	`(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults))))
 
+;;;###autoload
+(define-derived-mode makefile-imake-mode makefile-mode "Imakefile"
+  "An adapted `makefile-mode' that knows about imake."
+  :syntax-table makefile-imake-mode-syntax-table
+  (let ((base `(makefile-imake-font-lock-keywords ,@(cdr font-lock-defaults)))
+	new)
+    ;; Remove `font-lock-syntactic-keywords' entry from font-lock-defaults.
+    (mapc (lambda (elt)
+	    (unless (and (consp elt)
+			 (eq (car elt) 'font-lock-syntactic-keywords))
+	      (setq new (cons elt new))))
+	  base)
+    (setq font-lock-defaults (nreverse new))))
+
 
 
 ;;; Motion code.
--- a/lisp/textmodes/flyspell.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/textmodes/flyspell.el	Thu Jan 19 07:11:42 2006 +0000
@@ -531,6 +531,11 @@
     (with-current-buffer buf
       (kill-local-variable 'flyspell-word-cache-word))))
 
+;; Make sure we flush our caches when needed.  Do it here rather than in
+;; flyspell-mode-on, since flyspell-region may be used without ever turning
+;; on flyspell-mode.
+(add-hook 'ispell-kill-ispell-hook 'flyspell-kill-ispell-hook)
+
 ;;*---------------------------------------------------------------------*/
 ;;*    flyspell-mode-on ...                                             */
 ;;*---------------------------------------------------------------------*/
@@ -542,8 +547,6 @@
   (or ispell-local-dictionary ispell-dictionary
       (if flyspell-default-dictionary
 	  (ispell-change-dictionary flyspell-default-dictionary)))
-  ;; Make sure we flush our caches when needed.
-  (add-hook 'ispell-kill-ispell-hook 'flyspell-kill-ispell-hook)
   ;; we have to force ispell to accept the local definition or
   ;; otherwise it could be too late, the local dictionary may
   ;; be forgotten!
--- a/lisp/textmodes/org.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/textmodes/org.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1875,43 +1875,42 @@
 
 ;; Tell the compiler about dynamically scoped variables,
 ;; and variables from other packages
-(eval-when-compile
-  (defvar zmacs-regions)
-  (defvar original-date)
-  (defvar org-transient-mark-mode)
-  (defvar org-old-auto-fill-inhibit-regexp)
-  (defvar orgtbl-mode-menu)
-  (defvar org-html-entities)
-  (defvar org-goto-start-pos)
-  (defvar org-cursor-color)
-  (defvar org-time-was-given)
-  (defvar org-ts-what)
-  (defvar mark-active)
-  (defvar timecnt)
-  (defvar levels-open)
-  (defvar title)
-  (defvar author)
-  (defvar email)
-  (defvar text)
-  (defvar entry)
-  (defvar date)
-  (defvar language)
-  (defvar options)
-  (defvar ans1)
-  (defvar ans2)
-  (defvar starting-day)
-  (defvar include-all-loc)
-  (defvar vm-message-pointer)
-  (defvar vm-folder-directory)
-  (defvar wl-summary-buffer-elmo-folder)
-  (defvar wl-summary-buffer-folder-name)
-  (defvar gnus-group-name)
-  (defvar gnus-article-current)
-  (defvar w3m-current-url)
-  (defvar org-selected-point)
-  (defvar calendar-mode-map)
-  (defvar remember-save-after-remembering)
-  (defvar remember-data-file))
+(defvar zmacs-regions)
+(defvar original-date)
+(defvar org-transient-mark-mode)
+(defvar org-old-auto-fill-inhibit-regexp)
+(defvar orgtbl-mode-menu)
+(defvar org-html-entities)
+(defvar org-goto-start-pos)
+(defvar org-cursor-color)
+(defvar org-time-was-given)
+(defvar org-ts-what)
+(defvar mark-active)
+(defvar timecnt)
+(defvar levels-open)
+(defvar title)
+(defvar author)
+(defvar email)
+(defvar text)
+(defvar entry)
+(defvar date)
+(defvar language)
+(defvar options)
+(defvar ans1)
+(defvar ans2)
+(defvar starting-day)
+(defvar include-all-loc)
+(defvar vm-message-pointer)
+(defvar vm-folder-directory)
+(defvar wl-summary-buffer-elmo-folder)
+(defvar wl-summary-buffer-folder-name)
+(defvar gnus-group-name)
+(defvar gnus-article-current)
+(defvar w3m-current-url)
+(defvar org-selected-point)
+(defvar calendar-mode-map)
+(defvar remember-save-after-remembering)
+(defvar remember-data-file)
 
 
 ;;; Define the mode
@@ -3101,7 +3100,7 @@
     (if (string-match "\\(.*\\)::\\(.*\\)" org-archive-location)
 	(progn
 	  (setq file (format (match-string 1 org-archive-location)
-			     (file-name-nondirectory (buffer-file-name)))
+			     (file-name-nondirectory buffer-file-name))
 		heading (match-string 2 org-archive-location)))
       (error "Invalid `org-archive-location'"))
     (if (> (length file) 0)
@@ -4032,9 +4031,8 @@
 		  (nthcdr 6 time0))))
     (if (eq what 'calendar)
 	(let ((cal-date
-	       (save-excursion
-		 (save-match-data
-		   (set-buffer "*Calendar*")
+               (save-match-data
+                 (with-current-buffer "*Calendar*"
 		   (calendar-cursor-to-date)))))
 	  (setcar (nthcdr 4 time0) (nth 0 cal-date)) ; month
 	  (setcar (nthcdr 3 time0) (nth 1 cal-date)) ; day
@@ -4287,7 +4285,7 @@
 next use of \\[org-agenda]) restricted to the current file."
   (interactive "P")
   (catch 'exit
-    (let ((restrict-ok (and (buffer-file-name) (eq major-mode 'org-mode)))
+    (let ((restrict-ok (and buffer-file-name (eq major-mode 'org-mode)))
 	  (custom org-agenda-custom-commands)
 	  c entry key type string)
       (put 'org-agenda-files 'org-restrict nil)
@@ -4322,7 +4320,7 @@
 	(message "")
 	(when (equal c ?1)
 	  (if restrict-ok
-	      (put 'org-agenda-files 'org-restrict (list (buffer-file-name)))
+	      (put 'org-agenda-files 'org-restrict (list buffer-file-name))
 	    (error "Cannot restrict agenda to current buffer"))
 	  (message "Press key for agenda command%s"
 		   (if restrict-ok " (restricted to current file)" ""))
@@ -4446,8 +4444,8 @@
 	 (dotodo include-all)
 	 (doclosed org-agenda-show-log)
 	 (org-agenda-keep-modes keep-modes)
-	 (entry (buffer-file-name))
-	 (org-agenda-files (list (buffer-file-name)))
+	 (entry buffer-file-name)
+	 (org-agenda-files (list buffer-file-name))
 	 (date (calendar-current-date))
 	 (win (selected-window))
 	 (pos1 (point))
@@ -4674,10 +4672,9 @@
     (erase-buffer)
     (org-agenda-mode) (setq buffer-read-only nil)
     (set (make-local-variable 'org-agenda-type) 'todo)
-    (set (make-local-variable 'last-arg) arg)
     (set (make-local-variable 'org-todo-keywords) kwds)
     (set (make-local-variable 'org-agenda-redo-command)
-	 '(org-todo-list (or current-prefix-arg last-arg) t))
+	 `(org-todo-list (or current-prefix-arg ',arg) t))
     (setq files (org-agenda-files)
 	  rtnall nil)
     (while (setq file (pop files))
@@ -4974,7 +4971,7 @@
        "Make the position visible."
        (if (and org-disable-agenda-to-diary  ;; called from org-agenda
 		(stringp string)
-		(buffer-file-name))
+		buffer-file-name)
 	   (setq string (org-modify-diary-entry-string string))))))
 
 (defun org-modify-diary-entry-string (string)
@@ -4986,7 +4983,7 @@
 	 'help-echo
 	 (format
 	  "mouse-2 or RET jump to diary file %s"
-	  (abbreviate-file-name (buffer-file-name)))
+	  (abbreviate-file-name buffer-file-name))
 	 'org-agenda-diary-link t
 	 'org-marker (org-agenda-new-marker (point-at-bol)))
    string)
@@ -5008,7 +5005,7 @@
 If the current buffer does not, find the first agenda file."
   (interactive)
   (let ((files (append org-agenda-files (list (car org-agenda-files))))
-	(tcf (if (buffer-file-name) (file-truename (buffer-file-name))))
+	(tcf (if buffer-file-name (file-truename buffer-file-name)))
 	file)
     (unless files (error "No agenda files"))
     (catch 'exit
@@ -5019,30 +5016,28 @@
 	      (throw 'exit t))))
       (find-file (car org-agenda-files)))))
 
-(defun org-agenda-file-to-end (&optional file)
+(defun org-agenda-file-to-end ()
   "Move/add the current file to the end of the agenda fiole list.
-I the file is not present in the list, it is appended ot the list.  If it is
-present, it is moved there."
-  (interactive)
-  (org-agenda-file-to-front 'to-end file))
-
-(defun org-agenda-file-to-front (&optional to-end file)
+If the file is not present in the list, append it to the list.  If it is
+present, move it there."
+  (interactive)
+  (org-agenda-file-to-front 'to-end))
+
+(defun org-agenda-file-to-front (&optional to-end)
   "Move/add the current file to the top of the agenda file list.
-If the file is not present in the list, it is added to the front.  If it is
-present, it is moved there.  With optional argument TO-END, add/move to the
+If the file is not present in the list, add it to the front.  If it is
+present, it move it there.  With optional argument TO-END, add/move to the
 end of the list."
   (interactive "P")
-  (let ((file-alist (mapcar (lambda (x)
-			      (cons (file-truename x) x))
-			    org-agenda-files))
-	(ctf (file-truename (buffer-file-name)))
-	x had)
-    (setq x (assoc ctf file-alist) had x)
-
-    (if (not x) (setq x (cons ctf (abbreviate-file-name (buffer-file-name)))))
-    (if to-end
-	(setq file-alist (append (delq x file-alist) (list x)))
-      (setq file-alist (cons x (delq x file-alist))))
+  (let* ((file-alist (mapcar (lambda (x)
+                               (cons (file-truename x) x))
+                             org-agenda-files))
+         (ctf (file-truename buffer-file-name))
+         (had (assoc ctf file-alist))
+         (x (or had (cons ctf (abbreviate-file-name buffer-file-name)))))
+    (setq file-alist (if to-end
+                         (append (delq x file-alist) (list x))
+                       (cons x (delq x file-alist))))
     (setq org-agenda-files (mapcar 'cdr file-alist))
     (let ((org-mode-hook nil) (default-major-mode 'fundamental-mode))
       (customize-save-variable 'org-agenda-files org-agenda-files))
@@ -5055,7 +5050,7 @@
 These are the files which are being checked for agenda entries.
 Optional argument FILE means, use this file instead of the current."
   (interactive)
-  (let* ((file (or file (buffer-file-name)))
+  (let* ((file (or file buffer-file-name))
 	 (true-file (file-truename file))
 	 (afile (abbreviate-file-name file))
 	 (files (delq nil (mapcar
@@ -5179,9 +5174,9 @@
       (cond
        ((null org-category)
 	(setq org-category
-	      (if (buffer-file-name)
+	      (if buffer-file-name
 		  (file-name-sans-extension
-		   (file-name-nondirectory (buffer-file-name)))
+		   (file-name-nondirectory buffer-file-name))
 		"???")))
        ((symbolp org-category) (symbol-name org-category))
        (t org-category))
@@ -5278,7 +5273,7 @@
 		      'keymap org-agenda-keymap
 		      'help-echo
 		      (format "mouse-2 or RET jump to org file %s"
-			      (abbreviate-file-name (buffer-file-name)))))
+			      (abbreviate-file-name buffer-file-name))))
 	 (regexp (concat "[\n\r]\\*+ *\\(" 
 			 (if org-select-this-todo-keyword
 			     (concat "\\<\\(" org-select-this-todo-keyword
@@ -5320,7 +5315,7 @@
 		      'keymap org-agenda-keymap
 		      'help-echo
 		      (format "mouse-2 or RET jump to org file %s"
-			      (abbreviate-file-name (buffer-file-name)))))
+			      (abbreviate-file-name buffer-file-name))))
 	 (regexp (regexp-quote
 		  (substring
 		   (format-time-string
@@ -5397,7 +5392,7 @@
 		      'keymap org-agenda-keymap
 		      'help-echo
 		      (format "mouse-2 or RET jump to org file %s"
-			      (abbreviate-file-name (buffer-file-name)))))
+			      (abbreviate-file-name buffer-file-name))))
 	 (regexp (concat
 		  "\\<" org-closed-string " *\\["
 		  (regexp-quote
@@ -5453,7 +5448,7 @@
 		      'keymap org-agenda-keymap
 		      'help-echo
 		      (format "mouse-2 or RET jump to org file %s"
-			      (abbreviate-file-name (buffer-file-name)))))
+			      (abbreviate-file-name buffer-file-name))))
 	 (regexp org-deadline-time-regexp)
 	 (todayp (equal date (calendar-current-date))) ; DATE bound by calendar
 	 (d1 (calendar-absolute-from-gregorian date))  ; DATE bound by calendar
@@ -5515,7 +5510,7 @@
 		      'keymap org-agenda-keymap
 		      'help-echo
 		      (format "mouse-2 or RET jump to org file %s"
-			      (abbreviate-file-name (buffer-file-name)))))
+			      (abbreviate-file-name buffer-file-name))))
 	 (regexp org-scheduled-time-regexp)
 	 (todayp (equal date (calendar-current-date))) ; DATE bound by calendar
 	 (d1 (calendar-absolute-from-gregorian date))  ; DATE bound by calendar
@@ -5564,7 +5559,7 @@
 		      'keymap org-agenda-keymap
 		      'help-echo
 		      (format "mouse-2 or RET jump to org file %s"
-			      (abbreviate-file-name (buffer-file-name)))))
+			      (abbreviate-file-name buffer-file-name))))
 	 (regexp org-tr-regexp)
 	 (d0 (calendar-absolute-from-gregorian date))
 	 marker hdmarker ee txt d1 d2 s1 s2 timestr category tags)
@@ -5637,6 +5632,8 @@
   "A flag, set by `org-compile-prefix-format'.
 The flag is set if the currently compiled format contains a `%t'.")
 
+(defvar time)                     ;Needed for the eval of the prefix format.
+(defvar tag)                      ;Presumably, same thing as above.
 (defun org-format-agenda-item (extra txt &optional category tags dotime noprefix)
   "Format TXT to be inserted into the agenda buffer.
 In particular, it adds the prefix and corresponding text properties.  EXTRA
@@ -5654,9 +5651,9 @@
     (if (string-match "^ +" txt) (setq txt (replace-match "" nil nil txt)))
     (let* ((category (or category
 			 org-category
-			 (if (buffer-file-name)
+			 (if buffer-file-name
 			     (file-name-sans-extension
-			      (file-name-nondirectory (buffer-file-name)))
+			      (file-name-nondirectory buffer-file-name))
 			   "")))
 	   (tag (or (nth (1- (length tags)) tags) ""))
 	   time              ;; needed for the eval of the prefix format
@@ -5819,6 +5816,9 @@
 	  ((< tb ta) +1)
 	  (t nil))))
 
+(defvar time-up) (defvar time-down)
+(defvar priority-up) (defvar priority-down)
+(defvar category-up) (defvar category-down) (defvar category-keep)
 (defun org-entries-lessp (a b)
   "Predicate for sorting agenda entries."
   ;; The following variables will be used when the form is evaluated.
@@ -6260,7 +6260,7 @@
 		      'keymap org-agenda-keymap
 		      'help-echo
 		      (format "mouse-2 or RET jump to org file %s"
-			      (abbreviate-file-name (buffer-file-name)))))
+			      (abbreviate-file-name buffer-file-name))))
          lspos
 	 tags tags-list tags-alist (llast 0) rtn level category i txt
 	 todo marker)
@@ -6862,7 +6862,7 @@
 If the file does not exist, an error is thrown."
   (setq in-emacs (or in-emacs line search))
   (let* ((file (if (equal path "") 
-		   (buffer-file-name)
+		   buffer-file-name
 		 (convert-standard-filename (org-expand-file-name path))))
 	 (dfile (downcase file))
 	 ext cmd apps)
@@ -6893,7 +6893,7 @@
 	(shell-command (concat cmd " &"))))
      ((or (stringp cmd)
 	  (eq cmd 'emacs))
-      (unless (equal (file-truename file) (file-truename (buffer-file-name)))
+      (unless (equal (file-truename file) (file-truename buffer-file-name))
 	(funcall (cdr (assq 'file org-link-frame-setup)) file))
       (if line (goto-line line)
 	(if search (org-link-search search))))
@@ -6956,7 +6956,7 @@
       (save-excursion
        (vm-select-folder-buffer)
        (let* ((message (car vm-message-pointer))
-	      (folder (buffer-file-name))
+	      (folder buffer-file-name)
 	      (subject (vm-su-subject message))
 	      (author (vm-su-full-name message))
 	      (message-id (vm-su-message-id message)))
@@ -6987,7 +6987,7 @@
       (save-excursion
 	(save-restriction
 	  (rmail-narrow-to-non-pruned-header)
-	  (let ((folder (buffer-file-name))
+	  (let ((folder buffer-file-name)
 		(message-id (mail-fetch-field "message-id"))
 		(author (mail-fetch-field "from"))
 		(subject (mail-fetch-field "subject")))
@@ -7041,7 +7041,7 @@
      ((eq major-mode 'org-mode)
       ;; Just link to current headline
       (setq cpltxt (concat "file:"
-			   (abbreviate-file-name (buffer-file-name))))
+			   (abbreviate-file-name buffer-file-name)))
       ;; Add a context search string
       (when (org-xor org-context-in-file-links arg)
 	(if (save-excursion
@@ -7059,10 +7059,10 @@
 			 )))))
       (setq link (org-make-link cpltxt)))
 
-     ((buffer-file-name)
+     (buffer-file-name
       ;; Just link to this file here.
       (setq cpltxt (concat "file:"
-			   (abbreviate-file-name (buffer-file-name))))
+			   (abbreviate-file-name buffer-file-name)))
       ;; Add a context string
       (when (org-xor org-context-in-file-links arg)
 	(setq cpltxt
@@ -7197,7 +7197,7 @@
 	       (case-fold-search nil)
 	       (search (match-string 2 link)))
 	    (when (save-match-data
-		    (equal (file-truename (buffer-file-name))
+		    (equal (file-truename buffer-file-name)
 			   (file-truename path)))
 	      (if (save-match-data
 		    (string-match (concat "^" org-camel-regexp "$") search))
@@ -7356,7 +7356,7 @@
 	(let  ((all org-reverse-note-order)
 	       entry)
 	  (while (setq entry (pop all))
-	    (if (string-match (car entry) (buffer-file-name))
+	    (if (string-match (car entry) buffer-file-name)
 		(throw 'exit (cdr entry))))
 	  nil)))))
 
@@ -10010,7 +10010,7 @@
 	 (level 0) line txt
 	 (umax nil)
 	 (case-fold-search nil)
-	 (filename (concat (file-name-sans-extension (buffer-file-name))
+	 (filename (concat (file-name-sans-extension buffer-file-name)
 			   ".txt"))
 	 (buffer (find-file-noselect filename))
 	 (levels-open (make-vector org-level-max nil))
@@ -10159,7 +10159,7 @@
 Also removes the first line of the buffer if it specifies a mode,
 and all options lines."
   (interactive)
-  (let* ((filename (concat (file-name-sans-extension (buffer-file-name))
+  (let* ((filename (concat (file-name-sans-extension buffer-file-name)
 			   ".txt"))
 	 (buffer (find-file-noselect filename))
 	 (ore (concat
@@ -10233,7 +10233,7 @@
    org-export-with-sub-superscripts
    org-export-with-emphasize
    org-export-with-TeX-macros
-   (file-name-nondirectory (buffer-file-name))
+   (file-name-nondirectory buffer-file-name)
    (if (equal org-todo-interpretation 'sequence)
        (mapconcat 'identity org-todo-keywords " ")
      "TODO FEEDBACK VERIFY DONE")
@@ -10306,7 +10306,7 @@
 headlines.  The default is 3.  Lower levels will become bulleted lists."
   (interactive "P")
   (org-export-as-html arg 'hidden)
-  (org-open-file (buffer-file-name)))
+  (org-open-file buffer-file-name))
 
 (defun org-export-as-html-batch ()
   "Call `org-export-as-html', may be used in batch processing as
@@ -10336,7 +10336,7 @@
          (lines (org-export-find-first-heading-line all_lines))
          (level 0) (line "") (origline "") txt todo
          (umax nil)
-         (filename (concat (file-name-sans-extension (buffer-file-name))
+         (filename (concat (file-name-sans-extension buffer-file-name)
                            ".html"))
          (buffer (find-file-noselect filename))
          (levels-open (make-vector org-level-max nil))
@@ -10999,7 +10999,7 @@
 The iCalendar file will be located in the same directory as the Org-mode
 file, but with extension `.ics'."
   (interactive)
-  (org-export-icalendar nil (buffer-file-name)))
+  (org-export-icalendar nil buffer-file-name))
 
 ;;;###autoload
 (defun org-export-icalendar-all-agenda-files ()
@@ -11036,7 +11036,7 @@
 	  (set-buffer (org-get-agenda-file-buffer file))
 	  (setq category (or org-category
 			     (file-name-sans-extension
-			      (file-name-nondirectory (buffer-file-name)))))
+			      (file-name-nondirectory buffer-file-name))))
 	  (if (symbolp category) (setq category (symbol-name category)))
 	  (let ((standard-output ical-buffer))
 	    (if combine
@@ -12074,8 +12074,7 @@
   ;; trees.  And is uses an invisible-OK argument.
   ;; Under Emacs this is not needed, but the old outline.el needs this fix.
   (org-back-to-heading invisible-OK)
-  (let ((opoint (point))
-	(first t)
+  (let ((first t)
 	(level (funcall outline-level)))
     (while (and (not (eobp))
 		(or first (> (funcall outline-level) level)))
@@ -12138,16 +12137,6 @@
 			   (org-invisible-p)))
        (org-show-hierarchy-above)))
 
-;;; Finish up
-
-(provide 'org)
-
-(run-hooks 'org-load-hook)
-
-;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd
-;;; org.el ends here
-
-
 (defun org-get-tags-at (&optional pos)
   "Get a list of all headline targs applicable at POS.
 POS defaults to point.  If tags are inherited, the list contains
@@ -12168,4 +12157,13 @@
 	  (error nil))))
     (message "%s" tags)
     tags))
+
+;;; Finish up
+
+(provide 'org)
+
+(run-hooks 'org-load-hook)
+
+;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd
+;;; org.el ends here
       
--- a/lisp/textmodes/sgml-mode.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/textmodes/sgml-mode.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1,4 +1,4 @@
-;;; sgml-mode.el --- SGML- and HTML-editing modes
+;;; sgml-mode.el --- SGML- and HTML-editing modes -*- coding: iso-2022-7bit -*-
 
 ;; Copyright (C) 1992, 1995, 1996, 1998, 2001, 2002, 2003, 2004,
 ;;   2005 Free Software Foundation, Inc.
@@ -1826,12 +1826,9 @@
   (make-local-variable 'outline-regexp)
   (make-local-variable 'outline-heading-end-regexp)
   (make-local-variable 'outline-level)
-  (make-local-variable 'sentence-end)
-  (setq sentence-end
-	(if sentence-end-double-space
-	    "[.?!][]\"')}]*\\(<[^>]*>\\)*\\($\\| $\\|\t\\|  \\)[ \t\n]*"
-	  "[.?!][]\"')}]*\\(<[^>]*>\\)*\\($\\|[ \t]\\)[ \t\n]*"))
-  (setq sgml-tag-alist html-tag-alist
+  (make-local-variable 'sentence-end-base)
+  (setq sentence-end-base "[.?!][]\"'$B!I$,1r}(B)}]*\\(<[^>]*>\\)*"
+	sgml-tag-alist html-tag-alist
 	sgml-face-tag-alist html-face-tag-alist
 	sgml-tag-help html-tag-help
 	outline-regexp "^.*<[Hh][1-6]\\>"
--- a/lisp/textmodes/table.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/textmodes/table.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1,7 +1,7 @@
 ;;; table.el --- create and edit WYSIWYG text based embedded tables
 
 ;; Copyright (C) 2000, 2001, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006  Free Software Foundation, Inc.
 
 ;; Keywords: wp, convenience
 ;; Author: Takaaki Ota <Takaaki.Ota@am.sony.com>
@@ -621,17 +621,18 @@
 ;;;
 
 ;; hush up the byte-compiler
-(eval-when-compile
-  (defvar quail-translating)
-  (defvar quail-converting)
-  (defvar flyspell-mode)
-  (defvar real-last-command)
-  (defvar delete-selection-mode)
-  (unless (fboundp 'set-face-property)
-    (defun set-face-property (face prop value)))
-  (unless (fboundp 'unibyte-char-to-multibyte)
-    (defun unibyte-char-to-multibyte (char)))
-  (defun table--point-in-cell-p (&optional location)))
+(defvar quail-translating)
+(defvar quail-converting)
+(defvar flyspell-mode)
+(defvar real-last-command)
+(defvar delete-selection-mode)
+;; This is evil!!
+;; (eval-when-compile
+;;   (unless (fboundp 'set-face-property)
+;;     (defun set-face-property (face prop value)))
+;;   (unless (fboundp 'unibyte-char-to-multibyte)
+;;     (defun unibyte-char-to-multibyte (char)))
+;;   (defun table--point-in-cell-p (&optional location)))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;
@@ -910,21 +911,18 @@
 This is always set to nil at the entry to `table-with-cache-buffer' before executing body forms.")
 (defvar table-mode-indicator nil
   "For mode line indicator")
-(defvar table-fixed-mode-indicator nil
-  "For mode line indicator")
+;; This is not a real minor-mode but placed in the minor-mode-alist
+;; so that we can show the indicator on the mode line handy.
+(make-variable-buffer-local table-mode-indicator)
+(unless (assq table-mode-indicator minor-mode-alist)
+  (push '(table-mode-indicator (table-fixed-width-mode " Fixed-Table" " Table"))
+        minor-mode-alist))
+
 (defconst table-source-languages '(html latex cals)
   "Supported source languages.")
 (defvar table-source-info-plist nil
   "General storage for temporary information used while generating source.")
-;;; These are not real minor-mode but placed in the minor-mode-alist
-;;; so that we can show the indicator on the mode line handy.
-(mapcar (lambda (indicator)
-	  (make-variable-buffer-local (car indicator))
-	  (unless (assq (car indicator) minor-mode-alist)
-	    (setq minor-mode-alist
-		  (cons indicator minor-mode-alist))))
-	'((table-mode-indicator " Table")
-	  (table-fixed-mode-indicator " Fixed-Table")))
+
 ;;; The following history containers not only keep the history of user
 ;;; entries but also serve as the default value providers.  When an
 ;;; interactive command is invoked it offers a user the latest entry
@@ -2000,7 +1998,7 @@
 			  (table--detect-cell-alignment cell)))
 		    (unless (re-search-forward border end t)
 		      (goto-char end))))))))))
-    (set-buffer-modified-p modified-flag)))
+    (restore-buffer-modified-p modified-flag)))
 
 ;;;###autoload
 (defun table-unrecognize-region (beg end)
@@ -2090,7 +2088,7 @@
 		    (set-buffer cache-buffer)
 		    (erase-buffer)
 		    (table--insert-rectangle rectangle)))))
-	  (set-buffer-modified-p modified-flag))
+	  (restore-buffer-modified-p modified-flag))
 	(if (featurep 'xemacs)
 	    (table--warn-incompatibility))
 	cell)))
@@ -2929,12 +2927,6 @@
 	(if (null arg)
 	    (not table-fixed-width-mode)
 	  (> (prefix-numeric-value arg) 0)))
-  (save-excursion
-    (mapcar (lambda (buf)
-	      (set-buffer buf)
-	      (if (table--point-in-cell-p)
-		  (table--point-entered-cell-function)))
-	    (buffer-list)))
   (table--update-cell-face))
 
 ;;;###autoload
@@ -4084,7 +4076,7 @@
 folded location is marked by a continuation character which is
 specified in the variable `table-word-continuation-char'.
 ")
-      (print-help-return-message))))
+      (help-print-return-message))))
 
 (defun *table--cell-describe-bindings ()
   "Table cell version of `describe-bindings'."
@@ -4102,7 +4094,7 @@
 			       (key-description (car binding))
 			       (cdr binding))))
 	      table-cell-bindings)
-      (print-help-return-message))))
+      (help-print-return-message))))
 
 (defun *table--cell-dabbrev-expand (arg)
   "Table cell version of `dabbrev-expand'."
@@ -4897,8 +4889,7 @@
 
 (defmacro table--log (&rest body)
   "Debug logging macro."
-  `(save-excursion
-     (set-buffer (get-buffer-create "log"))
+  `(with-current-buffer (get-buffer-create "log")
      (goto-char (point-min))
      (let ((standard-output (current-buffer)))
        ,@body)))
@@ -4958,7 +4949,8 @@
 	     (dig1-str (format "%1d" (prog1 (% count 10) (setq count (1+ count))))))
 	(goto-char (car cell))
 	(table-with-cache-buffer
-	  (replace-regexp "." dig1-str)
+          (while (re-search-forward "." nil t)
+            (replace-match dig1-str nil nil))
 	  (setq table-inhibit-auto-fill-paragraph t))
 	(table--finish-delayed-tasks)))
     (table--goto-coordinate current-coordinate)))
@@ -5340,9 +5332,8 @@
 Refresh the menu bar."
   (unless table-cell-entered-state
     (setq table-cell-entered-state t)
-    (setq table-mode-indicator (not table-fixed-width-mode))
-    (setq table-fixed-mode-indicator table-fixed-width-mode)
-    (set-buffer-modified-p (buffer-modified-p))
+    (setq table-mode-indicator t)
+    (force-mode-line-update)
     (table--warn-incompatibility)
     (run-hooks 'table-point-entered-cell-hook)))
 
@@ -5352,8 +5343,7 @@
   (when table-cell-entered-state
     (setq table-cell-entered-state nil)
     (setq table-mode-indicator nil)
-    (setq table-fixed-mode-indicator nil)
-    (set-buffer-modified-p (buffer-modified-p))
+    (force-mode-line-update)
     (run-hooks 'table-point-left-cell-hook)))
 
 (defun table--warn-incompatibility ()
--- a/lisp/time.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/time.el	Thu Jan 19 07:11:42 2006 +0000
@@ -129,7 +129,7 @@
 If `display-time-use-mail-icon' is non-nil, the image's
 background color is the background of this face.  Set this to
 make the mail indicator stand out on a color display."
-  :group 'faces
+  :group 'mode-line-faces
   :group 'display-time
   :version "22.1"
   :type '(choice (const :tag "None" nil) face))
--- a/lisp/url/ChangeLog	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/url/ChangeLog	Thu Jan 19 07:11:42 2006 +0000
@@ -1,3 +1,9 @@
+2006-01-18  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* url-news.el: Move defvars out of eval-when-compile.
+	(url-news-fetch-message-id, url-news-fetch-newsgroup):
+	Use with-current-buffer.
+
 2006-01-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* url.el (url-retrieve-synchronously): Adjust the workaround so as not
--- a/lisp/url/url-news.el	Thu Jan 19 06:54:47 2006 +0000
+++ b/lisp/url/url-news.el	Thu Jan 19 07:11:42 2006 +0000
@@ -1,7 +1,7 @@
 ;;; url-news.el --- News Uniform Resource Locator retrieval code
 
 ;; Copyright (C) 1996, 1997, 1998, 1999, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Keywords: comm, data, processes
 
@@ -30,10 +30,9 @@
 (require 'nntp)
 (autoload 'url-warn "url")
 (autoload 'gnus-group-read-ephemeral-group "gnus-group")
-(eval-when-compile
-  (require 'cl)
-  (defvar nntp-open-tls-stream)
-  (defvar nntp-open-ssl-stream))
+(eval-when-compile (require 'cl))
+(defvar nntp-open-tls-stream)
+(defvar nntp-open-ssl-stream)
 
 (defgroup url-news nil
   "News related options."
@@ -59,8 +58,7 @@
     (if (cdr-safe (nntp-request-article message-id nil host buf))
 	;; Successfully retrieved the article
 	nil
-      (save-excursion
-	(set-buffer buf)
+      (with-current-buffer buf
 	(insert "Content-type: text/html\n\n"
 		"<html>\n"
 		" <head>\n"
@@ -97,8 +95,7 @@
   ;; This saves us from checking new news if Gnus is already running
   ;; FIXME - is it relatively safe to use gnus-alive-p here? FIXME
   (if (or (not (get-buffer gnus-group-buffer))
-	  (save-excursion
-	    (set-buffer gnus-group-buffer)
+	  (with-current-buffer gnus-group-buffer
 	    (not (eq major-mode 'gnus-group-mode))))
       (gnus))
   (set-buffer gnus-group-buffer)
@@ -117,9 +114,8 @@
 	 (port (url-port url))
 	 (article-brackets nil)
 	 (buf nil)
-	 (article (url-filename url)))
+	 (article (url-unhex-string (url-filename url))))
     (url-news-open-host host port (url-user url) (url-password url))
-    (setq article (url-unhex-string article))
     (cond
      ((string-match "@" article)	; Its a specific article
       (setq buf (url-news-fetch-message-id host article)))
@@ -138,5 +134,5 @@
 
 (provide 'url-news)
 
-;;; arch-tag: 8975be13-04e8-4d38-bfff-47918e3ad311
+;; arch-tag: 8975be13-04e8-4d38-bfff-47918e3ad311
 ;;; url-news.el ends here
--- a/man/ChangeLog	Thu Jan 19 06:54:47 2006 +0000
+++ b/man/ChangeLog	Thu Jan 19 07:11:42 2006 +0000
@@ -1,3 +1,12 @@
+2006-01-16  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* gnus.texi: Update copyright.
+
+2006-01-16  Juri Linkov  <juri@jurta.org>
+
+	* display.texi (Standard Faces): Add `mode-line-buffer-id'.
+	Move `mode-line-highlight' before `mode-line-buffer-id'.
+
 2006-01-13  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* gnus.texi (Article Washing): Additions.
--- a/man/display.texi	Thu Jan 19 06:54:47 2006 +0000
+++ b/man/display.texi	Thu Jan 19 07:11:42 2006 +0000
@@ -142,8 +142,6 @@
 @item highlight
 This face is used for highlighting portions of text, in various modes.
 For example, mouse-sensitive text is highlighted using this face.
-@item mode-line-highlight
-Like @code{highlight}, but used for portions of text on mode lines.
 @item isearch
 This face is used for highlighting Isearch matches.
 @item lazy-highlight
@@ -193,6 +191,10 @@
 than the selected one (if @code{mode-line-in-non-selected-windows} is
 non-@code{nil}).  This face inherits from @code{mode-line}, so changes
 in that face affect mode lines in all windows.
+@item mode-line-highlight
+Like @code{highlight}, but used for portions of text on mode lines.
+@item mode-line-buffer-id
+This face is used for buffer identification parts in the mode line.
 @item header-line
 Similar to @code{mode-line} for a window's header line.  Most modes
 don't use the header line, but some special modes, such the Info mode, do.
--- a/man/gnus.texi	Thu Jan 19 06:54:47 2006 +0000
+++ b/man/gnus.texi	Thu Jan 19 07:11:42 2006 +0000
@@ -8,7 +8,7 @@
 
 @copying
 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-   2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
--- a/src/ChangeLog	Thu Jan 19 06:54:47 2006 +0000
+++ b/src/ChangeLog	Thu Jan 19 07:11:42 2006 +0000
@@ -1,3 +1,12 @@
+2006-01-19  Kenichi Handa  <handa@m17n.org>
+
+	* xterm.c (handle_one_xevent): Handle keysyms 0x1000000..0x10000FF.
+
+2006-01-17  Richard M. Stallman  <rms@gnu.org>
+
+	* frame.c (x_frame_get_and_record_arg): Don't record Qunbound
+	value in f->param_alist.
+
 2006-01-15  Andreas Schwab  <schwab@suse.de>
 
 	* search.c (Freplace_match): Use UPPERCASEP instead of !NOCASEP.
--- a/src/frame.c	Thu Jan 19 06:54:47 2006 +0000
+++ b/src/frame.c	Thu Jan 19 07:11:42 2006 +0000
@@ -3604,7 +3604,7 @@
 
   value = x_get_arg (FRAME_X_DISPLAY_INFO (f), alist, param,
 		     attribute, class, type);
-  if (! NILP (value))
+  if (! NILP (value) && ! EQ (value, Qunbound))
     store_frame_param (f, param, value);
 
   return value;