changeset 83219:e86fc76a45e4

Merged in changes from CVS trunk. Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-611 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-612 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-613 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-614 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-615 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-46 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-47 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-48 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-49 Add {arch}/=commit-merge-make-log * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-50 {arch}/=commit-merge-make-log: Don't die if there are no ChangeLog changes git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-259
author Karoly Lorentey <lorentey@elte.hu>
date Thu, 14 Oct 2004 14:42:03 +0000
parents 47f53c5c9620 (current diff) f7785a1e8cf8 (diff)
children fe1db7935e1a
files etc/TODO lisp/ChangeLog lisp/recentf.el lisp/subr.el lisp/url/url-gw.el lisp/url/url-https.el lisp/url/url-ldap.el lisp/url/url-news.el lisp/url/url-vars.el lisp/vc.el man/ChangeLog src/dispextern.h src/keymap.c src/xdisp.c src/xterm.c src/xterm.h
diffstat 45 files changed, 583 insertions(+), 301 deletions(-) [+]
line wrap: on
line diff
--- a/etc/CENSORSHIP	Tue Oct 12 07:52:25 2004 +0000
+++ b/etc/CENSORSHIP	Thu Oct 14 14:42:03 2004 +0000
@@ -54,7 +54,7 @@
 
 Of course, I'm making an assumption about just what "indecent" means.
 I have to do this, because nobody knows for sure.  The most obvious
-possibile meaning is the meaning it has for television, so I'm using
+possible meaning is the meaning it has for television, so I'm using
 that as a tentative assumption.  However, there is a good chance that
 our courts will reject that interpretation of the law as
 unconstitutional.
--- a/etc/NEWS	Tue Oct 12 07:52:25 2004 +0000
+++ b/etc/NEWS	Thu Oct 14 14:42:03 2004 +0000
@@ -99,6 +99,11 @@
 * Changes in Emacs 21.4
 
 +++
+** New function `looking-back' checks whether a regular expression matches
+the text before point.  Specifying the LIMIT argument bounds how far
+back the match can start; this is a way to keep it from taking too long.
+
++++
 ** New functions `make-progress-reporter', `progress-reporter-update',
 `progress-reporter-force-update' and `progress-reporter-done' provide
 a simple and efficient way of printing progress messages to the user.
--- a/etc/TODO	Tue Oct 12 07:52:25 2004 +0000
+++ b/etc/TODO	Thu Oct 14 14:42:03 2004 +0000
@@ -34,6 +34,9 @@
 ** Implement a smoother vertical scroll facility, one that allows
   C-v to scroll through a tall image.
 
+** Implement intelligent search/replace, going beyond query-replace
+  (see http://graphics.csail.mit.edu/~rcm/chi04.pdf).
+
 ** Implement other text formatting properties.
 *** Footnotes that can appear either in place or at the end of the page.
 *** text property that says "don't break line in middle of this".
--- a/lisp/ChangeLog	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/ChangeLog	Thu Oct 14 14:42:03 2004 +0000
@@ -1,3 +1,72 @@
+2004-10-13  Daniel Pfeiffer  <occitan@esperanto.org>
+
+	* button.el (button-activate): Allow a marker to display as an
+	action.
+
+	* help-fns.el (describe-variable): Use it to make "below" a
+	hyperlink.
+
+	* help.el (describe-mode): Use it to make minor mode list into
+	hyperlinks.
+
+2004-10-14  Masatake YAMATO  <jet@gyve.org>
+
+	* progmodes/gud.el (gdb-script-beginning-of-defun): New function.
+	(gdb-script-end-of-defun): New function.
+	(gdb-script-mode): Use `gdb-script-beginning-of-defun' and
+	`gdb-script-end-of-defun' as *-of-defun-function.
+
+2004-10-13  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* vc.el (vc-annotate-display-select): Fix typo.
+
+	* subr.el (substitute-key-definition-key): New function.
+	(substitute-key-definition): Use it with map-keymap.
+	(event-modifiers): Use push.
+	(mouse-movement-p, with-temp-buffer): Simplify.
+
+2004-10-12  Michael Albinus  <michael.albinus@gmx.de>
+
+	Sync with Tramp 2.0.45.
+
+	* net/tramp.el (top): Apply `def-edebug-spec' only if function is
+	defined.  This is not the case for XEmacs without package "edebug".
+	(tramp-set-auto-save-file-modes): Set permissions of autosaved
+	remote files to the permissions of the original file.  This is not
+	the case for Emacs < 21.3.50 and XEmacs < 21.5.  Add function to
+	`auto-save-hook'.  Reported by Thomas Prokosch <thomas@nadev.net>.
+	(tramp-perl-decode): Fix an error in Perl implementation.
+	$pending must be cleared every loop.  Reported by Benjamin Place
+	<benjaminplace@sprintmail.com>
+
+	* net/tramp-smb.el (tramp-smb-advice-PC-do-completion):
+	Don't activate advice during definition.  This is done later on,
+	depending on test result of `substitute-in-file-name'.
+	Suggested by Stefan Monnier <monnier@iro.umontreal.ca>.
+
+2004-10-12  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* pcvs-parse.el (cvs-parse-commit): Fix parsing for new commit message.
+
+	* emacs-lisp/lisp.el (mark-sexp): Preserve direction when repeating.
+
+2004-10-12  David Ponce  <david@dponce.com>
+
+	* recentf.el (recentf-edit-list): Update the menu when the recentf
+	list has been modified.
+
+2004-10-12  Simon Josefsson  <jas@extundo.com>
+
+	* net/tls.el (tls-certtool-program): New variable.
+	(tls-certificate-information): New function, based on
+	ssl-certificate-information.
+
+2004-10-12  Kenichi Handa  <handa@m17n.org>
+
+	* international/mule.el (coding-system-equal): Move from mule-util.el.
+
+	* international/mule-util.el (coding-system-equal): Move to mule.el.
+
 2004-10-12  Kim F. Storm  <storm@cua.dk>
 
 	* kmacro.el (kmacro-insert-counter, kmacro-add-counter): Use and
@@ -9,6 +78,12 @@
 	* subr.el (substitute-key-definition): Mention command remapping
 	in doc string.
 
+2004-10-11  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* pcvs-defs.el (pcl-cvs-load-hook): Remove unused var.
+
+	* font-lock.el (font-lock-apply-highlight): Fix last change.
+
 2004-10-11  Simon Josefsson  <jas@extundo.com>
 
 	* mail/smtpmail.el (smtpmail-open-stream): Look for
@@ -17,6 +92,15 @@
 	(smtpmail-open-stream): Don't overwrite user settings of
 	starttls-extra-arguments and starttls-extra-args.
 
+2004-10-10  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* comint.el (comint-mouse-insert-input): Remove.
+	(comint-insert-input): Make it work for mouse bindings.
+	(comint-mode-map): Move defs into the declaration.
+	(comint-output-filter): Typo.
+
+	* diff-mode.el (diff-current-defun): Fix 2004-06-13's change.
+
 2004-10-10  Kai Grossjohann  <kai.grossjohann@gmx.net>
 
 	* net/ange-ftp.el (ange-ftp-remote-shell): Remove variable.
@@ -35,6 +119,20 @@
 	(vc-annotate-display-select): Only call vc-annotate-mode
 	if we're not in that mode already.
 
+2004-10-09  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* imenu.el (imenu--completion-buffer): Don't return t for rescan.
+	(imenu-choose-buffer-index): Check here for rescan instead.
+
+	* font-lock.el (font-lock-apply-highlight): Explicitly check the case
+	where the face expression evals to nil.
+
+	* textmodes/tex-mode.el (tex-font-lock-append-prop): New fun.
+	(tex-font-lock-keywords-2): Use it.
+	(tex-font-lock-syntactic-keywords): Fix the `verbatim' treatment.
+
+	* emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Fix backslashes.
+
 2004-10-09  Kim F. Storm  <storm@cua.dk>
 
 	* subr.el (progress-reporter-update): Define before first usage.
@@ -48,8 +146,8 @@
 
 2004-10-08  Peter Seibel  <peter@javamonkey.com>  (tiny change)
 
-	* emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Change
-	paragraph-start regexp so we don't fill code starting with #'(
+	* emacs-lisp/lisp-mode.el (lisp-fill-paragraph):
+	Change paragraph-start regexp so we don't fill code starting with #'(.
 
 2004-10-08  Sebastien Kirche  <seki@seki.fr>  (tiny change)
 
@@ -77,13 +175,11 @@
 2004-10-08  Masatake YAMATO  <jet@gyve.org>
 
 	* server.el (server-process-filter): Wrap `process-send-region'
-	by `condition-case' to guard the case when the pipe to PROC is
-	closed.
+	by `condition-case' to guard the case when the pipe to PROC is closed.
 
 2004-10-07  Mark A. Hershberger  <mah@everybody.org>
 
-	* xml.el (xml-substitute-special): Limit handling of external
-	entities.
+	* xml.el (xml-substitute-special): Limit handling of external entities.
 
 2004-10-06  Nick Roberts  <nickrob@snap.net.nz>
 
@@ -128,11 +224,10 @@
 
 2004-10-04  Luc Teirlinck  <teirllm@auburn.edu>
 
-	* textmodes/enriched.el (enriched-mode-map): Give
-	`set-left-margin' and `set-right-margin' bindings that follow the
-	minor mode conventions.
-
-2004-10-03  Stefan  <monnier@iro.umontreal.ca>
+	* textmodes/enriched.el (enriched-mode-map): Give `set-left-margin' and
+	`set-right-margin' bindings that follow the minor mode conventions.
+
+2004-10-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* textmodes/tex-mode.el (tex-dvi-view-command): Use `yap' on w32.
 	(tex-font-lock-keywords-1): Add url and nolinkurl for args with `_'.
@@ -196,7 +291,7 @@
 	* diff-mode.el (diff-file-header-re): Tighten up regexp a tiny bit.
 	(diff-fixup-modifs): Catch unified-diff file-headers.
 
-2004-09-28  Stefan  <monnier@iro.umontreal.ca>
+2004-09-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* dired.el (dired-view-command-alist): Use more efficient regexps.
 	Remove dubious arguments.
@@ -236,7 +331,7 @@
 	(pr-delete-file): Check if file exists before deleting it.
 	Reported by Lennart Borgman <lennart.borgman.073@student.lu.se>.
 
-2004-09-26  Stefan  <monnier@iro.umontreal.ca>
+2004-09-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* term.el (term-display-table): New variable.
 	(term-mode): Use it.
@@ -260,7 +355,7 @@
 	(term-stop-output-log): Rename from `term-stop-photo'.
 	(term-switch-to-alternate-sub-buffer): Comment out, unused.
 
-2004-09-25  Stefan  <monnier@iro.umontreal.ca>
+2004-09-25  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* dired.el (dired-move-to-filename): Don't output a message if
 	raise-error is non-nil.  Fix return position and value.
@@ -404,7 +499,7 @@
 	* progmodes/sh-script.el (sh-mode-default-syntax-table): Set syntax
 	of = to "." (punctuation).
 
-2004-09-19  Stefan  <monnier@iro.umontreal.ca>
+2004-09-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* subr.el (event-basic-type): Fix mask (extend to 22bits).
 
--- a/lisp/button.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/button.el	Thu Oct 14 14:42:03 2004 +0000
@@ -78,6 +78,7 @@
 (put 'default-button 'mouse-face 'highlight)
 (put 'default-button 'keymap button-map)
 (put 'default-button 'type 'button)
+;; action may be either a function to call, or a marker to go to
 (put 'default-button 'action 'ignore)
 (put 'default-button 'help-echo "mouse-2, RET: Push this button")
 ;; Make overlay buttons go away if their underlying text is deleted.
@@ -217,9 +218,14 @@
 If USE-MOUSE-ACTION is non-nil, invoke the button's mouse-action
 instead of its normal action; if the button has no mouse-action,
 the normal action is used instead."
-  (funcall (or (and use-mouse-action (button-get button 'mouse-action))
-	       (button-get button 'action))
-	   button))
+  (let ((action (or (and use-mouse-action (button-get button 'mouse-action))
+		    (button-get button 'action))))
+    (if (markerp action)
+	(save-selected-window
+	  (select-window (display-buffer (marker-buffer action)))
+	  (goto-char action)
+	  (recenter 0))
+      (funcall action button))))
 
 (defun button-label (button)
   "Return BUTTON's text label."
@@ -373,10 +379,11 @@
 
 (defun push-button (&optional pos use-mouse-action)
   "Perform the action specified by a button at location POS.
-POS may be either a buffer position or a mouse-event.
-If USE-MOUSE-ACTION is non-nil, invoke the button's mouse-action
+POS may be either a buffer position or a mouse-event.  If
+USE-MOUSE-ACTION is non-nil, invoke the button's mouse-action
 instead of its normal action; if the button has no mouse-action,
-the normal action is used instead.
+the normal action is used instead.  The action may be either a
+function to call or a marker to display.
 POS defaults to point, except when `push-button' is invoked
 interactively as the result of a mouse-event, in which case, the
 mouse event is used.
--- a/lisp/calc/calc-help.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/calc/calc-help.el	Thu Oct 14 14:42:03 2004 +0000
@@ -296,29 +296,57 @@
 	(calc-describe-thing desc "Key Index" nil
 			     (string-match "[A-Z][A-Z][A-Z]" desc))))))
 
+(defvar calc-help-function-list nil
+  "List of functions provided by Calc.")
+
+(defvar calc-help-variable-list nil
+  "List of variables provided by Calc.")
+
+(defun calc-help-index-entries (&rest indices)
+  "Create a list of entries from the INDICES in the Calc info manual."
+  (let ((entrylist '())
+        entry)
+    (require 'info nil t)
+    (while indices
+      (condition-case nil
+          (with-temp-buffer
+            (Info-mode)
+            (Info-goto-node (concat "(Calc)" (car indices) " Index"))
+            (goto-char (point-min))
+            (while (re-search-forward "\n\\* \\(.*\\): " nil t)
+              (setq entry (match-string 1))
+              (if (and (not (string-match "<[1-9]+>" entry))
+                       (not (string-match "(.*)" entry))
+                       (not (string= entry "Menu")))
+                  (unless (assoc entry entrylist)
+                    (setq entrylist (cons entry entrylist))))))
+        (error nil))
+      (setq indices (cdr indices)))
+    entrylist))
+
 (defun calc-describe-function (&optional func)
   (interactive)
+  (unless calc-help-function-list
+    (setq calc-help-function-list 
+          (calc-help-index-entries "Function" "Command")))
   (or func
-      (setq func (intern (completing-read "Describe function: "
-					  obarray nil t "calcFunc-"))))
-  (setq func (symbol-name func))
+      (setq func (completing-read "Describe function: "
+                                  calc-help-function-list 
+                                  nil t)))
   (if (string-match "\\`calc-." func)
       (calc-describe-thing func "Command Index")
-    (calc-describe-thing (if (string-match "\\`calcFunc-." func)
-			     (substring func 9)
-			   func)
-			 "Function Index")))
+    (calc-describe-thing func "Function Index")))
 
 (defun calc-describe-variable (&optional var)
   (interactive)
+  (unless calc-help-variable-list
+    (setq calc-help-variable-list 
+          (calc-help-index-entries "Variable")))
   (or var
-      (setq var (intern (completing-read "Describe variable: "
-					 obarray nil t "var-"))))
-  (setq var (symbol-name var))
-  (calc-describe-thing var "Variable Index"
-		       (if (string-match "\\`var-." var)
-			   (substring var 4)
-			 var)))
+      (setq var (completing-read "Describe variable: "
+                                 calc-help-variable-list
+                                 nil t)))
+  (calc-describe-thing var "Variable Index"))
 
 (defun calc-describe-thing (thing where &optional target not-quoted)
   (message "Looking for `%s' in %s..." thing where)
--- a/lisp/emacs-lisp/lisp.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/emacs-lisp/lisp.el	Thu Oct 14 14:42:03 2004 +0000
@@ -75,17 +75,19 @@
 move to with the same argument.
 If this command is repeated, it marks the next ARG sexps after the ones
 already marked."
-  (interactive "p")
+  (interactive "P")
   (cond ((and (eq last-command this-command) (mark t))
+	 (setq arg (if arg (prefix-numeric-value arg)
+		     (if (> (mark) (point)) 1 -1)))
 	 (set-mark
 	  (save-excursion
 	   (goto-char (mark))
-	   (forward-sexp (or arg 1))
+	   (forward-sexp arg)
 	   (point))))
 	(t
 	 (push-mark
 	  (save-excursion
-	    (forward-sexp (or arg 1))
+	    (forward-sexp (prefix-numeric-value arg))
 	    (point))
 	  nil t))))
 
--- a/lisp/gnus/ChangeLog	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/gnus/ChangeLog	Thu Oct 14 14:42:03 2004 +0000
@@ -1,3 +1,14 @@
+2004-10-13  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* message.el (message-tokenize-header): Fix 2004-09-06 change
+	which used point-min in the wrong place.
+
+2004-10-12  Simon Josefsson  <jas@extundo.com>
+
+	* net/tls.el (tls-certtool-program): New variable.
+	(tls-certificate-information): New function, based on
+	ssl-certificate-information.
+
 2004-10-10  Reiner Steib  <Reiner.Steib@gmx.de>
 
 	* gnus-sum.el: Mention that multibyte characters don't work as marks.
--- a/lisp/gnus/message.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/gnus/message.el	Thu Oct 14 14:42:03 2004 +0000
@@ -1615,11 +1615,11 @@
   (if (not header)
       nil
     (let ((regexp (format "[%s]+" (or separator ",")))
-	  (beg (point-min))
 	  (first t)
-	  quoted elems paren)
+	  beg quoted elems paren)
       (with-temp-buffer
 	(mm-enable-multibyte)
+	(setq beg (point-min))
 	(insert header)
 	(goto-char (point-min))
 	(while (not (eobp))
--- a/lisp/help-fns.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/help-fns.el	Thu Oct 14 14:42:03 2004 +0000
@@ -552,9 +552,15 @@
 		    (forward-line 1)
 		  (forward-sexp 1)
 		  (delete-region (point) (progn (end-of-line) (point)))
-		  (insert " value is shown below.\n\n")
 		  (save-excursion
-		    (insert "\n\nValue:"))))
+		    (insert "\n\nValue:")
+		    (set (make-local-variable 'help-button-cache)
+			 (point-marker)))
+		  (insert " value is shown ")
+		  (insert-button "below"
+				 'action help-button-cache
+				 'help-echo "mouse-2, RET: show value")
+		  (insert ".\n\n")))
 	      ;; Add a note for variables that have been make-var-buffer-local.
 	      (when (and (local-variable-if-set-p variable)
 			 (or (not (local-variable-p variable))
--- a/lisp/help.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/help.el	Thu Oct 14 14:42:03 2004 +0000
@@ -111,6 +111,9 @@
 
 (define-key help-map "q" 'help-quit)
 
+;; insert-button makes the action nil if it is not store somewhere
+(defvar help-button-cache nil)
+
 
 (defun help-quit ()
   "Just exit from the Help command's command loop."
@@ -655,32 +658,42 @@
 		    (lambda (a b) (string-lessp (car a) (car b)))))
 	(when minor-modes
 	  (princ "Summary of minor modes:\n")
-	  (dolist (mode minor-modes)
-	    (let ((pretty-minor-mode (nth 0 mode))
-		  (indicator (nth 2 mode)))
-	      (princ (format "  %s minor mode (%s):\n"
-			     pretty-minor-mode
-			     (if indicator
-				 (format "indicator%s" indicator)
-			       "no indicator")))))
+	  (make-local-variable 'help-button-cache)
+	  (with-current-buffer standard-output
+	    (dolist (mode minor-modes)
+	      (let ((pretty-minor-mode (nth 0 mode))
+		    (mode-function (nth 1 mode))
+		    (indicator (nth 2 mode)))
+		(add-text-properties 0 (length pretty-minor-mode)
+				     '(face bold) pretty-minor-mode)
+		(save-excursion
+		  (goto-char (point-max))
+		  (princ "\n\f\n")
+		  (push (point-marker) help-button-cache)
+		  ;; Document the minor modes fully.
+		  (insert pretty-minor-mode)
+		  (princ (format " minor mode (%s):\n"
+				 (if indicator
+				     (format "indicator%s" indicator)
+				   "no indicator")))
+		  (princ (documentation mode-function)))
+		(princ "  ")
+		(insert-button pretty-minor-mode
+			       'action (car help-button-cache)
+			       'help-echo "mouse-2, RET: show full information")
+		(princ (format " minor mode (%s):\n"
+			       (if indicator
+				   (format "indicator%s" indicator)
+				 "no indicator"))))))
 	  (princ "\n(Full information about these minor modes
 follows the description of the major mode.)\n\n"))
 	;; Document the major mode.
-	(princ mode-name)
+	(let ((mode mode-name))
+	  (with-current-buffer standard-output
+	    (insert mode)
+	    (add-text-properties (- (point) (length mode)) (point) '(face bold))))
 	(princ " mode:\n")
-	(princ (documentation major-mode))
-	;; Document the minor modes fully.
-	(dolist (mode minor-modes)
-	  (let ((pretty-minor-mode (nth 0 mode))
-		(mode-function (nth 1 mode))
-		(indicator (nth 2 mode)))
-	    (princ "\n\f\n")
-	    (princ (format "%s minor mode (%s):\n"
-			   pretty-minor-mode
-			   (if indicator
-			       (format "indicator%s" indicator)
-			     "no indicator")))
-	    (princ (documentation mode-function)))))
+	(princ (documentation major-mode)))
       (print-help-return-message))))
 
 
--- a/lisp/info-look.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/info-look.el	Thu Oct 14 14:42:03 2004 +0000
@@ -245,6 +245,7 @@
   (interactive)
   (setq info-lookup-cache nil))
 
+;;;###autoload (put 'info-lookup-symbol 'info-file "emacs")
 ;;;###autoload
 (defun info-lookup-symbol (symbol &optional mode)
   "Display the definition of SYMBOL, as found in the relevant manual.
@@ -258,6 +259,7 @@
    (info-lookup-interactive-arguments 'symbol current-prefix-arg))
   (info-lookup 'symbol symbol mode))
 
+;;;###autoload (put 'info-lookup-file 'info-file "emacs")
 ;;;###autoload
 (defun info-lookup-file (file &optional mode)
   "Display the documentation of a file.
--- a/lisp/info.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/info.el	Thu Oct 14 14:42:03 2004 +0000
@@ -79,8 +79,8 @@
   :group 'info)
 
 (defface info-xref
-  '((((class color) (background light)) :foreground "blue")
-    (((class color) (background dark)) :foreground "cyan")
+  '((((class color) (background light)) :foreground "blue" :underline t)
+    (((class color) (background dark)) :foreground "cyan" :underline t)
     (t :underline t))
   "Face for Info cross-references."
   :group 'info)
@@ -455,6 +455,7 @@
 
 ;;;###autoload (add-hook 'same-window-regexps "\\*info\\*\\(\\|<[0-9]+>\\)")
 
+;;;###autoload (put 'info 'info-file "emacs")
 ;;;###autoload
 (defun info (&optional file buffer)
   "Enter Info, the documentation browser.
@@ -3261,6 +3262,7 @@
 			   (car elt)
 			 elt))
 		 (file (if (consp elt) (cdr elt) elt))
+		 (case-fold-search nil)
 		 (regexp (concat "\\`" (regexp-quote name)
 				 "\\(\\'\\|-\\)")))
 	    (if (string-match regexp (symbol-name command))
--- a/lisp/international/mule-util.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/international/mule-util.el	Thu Oct 14 14:42:03 2004 +0000
@@ -315,19 +315,6 @@
   (coding-system-get coding-system 'translation-table-for-encode))
 
 ;;;###autoload
-(defun coding-system-equal (coding-system-1 coding-system-2)
-  "Return t if and only if CODING-SYSTEM-1 and CODING-SYSTEM-2 are identical.
-Two coding systems are identical if two symbols are equal
-or one is an alias of the other."
-  (or (eq coding-system-1 coding-system-2)
-      (and (equal (coding-system-spec coding-system-1)
-		  (coding-system-spec coding-system-2))
-	   (let ((eol-type-1 (coding-system-eol-type coding-system-1))
-		 (eol-type-2 (coding-system-eol-type coding-system-2)))
-	     (or (eq eol-type-1 eol-type-2)
-		 (and (vectorp eol-type-1) (vectorp eol-type-2)))))))
-
-;;;###autoload
 (defmacro detect-coding-with-priority (from to priority-list)
   "Detect a coding system of the text between FROM and TO with PRIORITY-LIST.
 PRIORITY-LIST is an alist of coding categories vs the corresponding
--- a/lisp/international/mule.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/international/mule.el	Thu Oct 14 14:42:03 2004 +0000
@@ -535,6 +535,18 @@
 		 (and (not (> (downcase c1) (downcase c2)))
 		      (< c1 c2)))))))
 
+(defun coding-system-equal (coding-system-1 coding-system-2)
+  "Return t if and only if CODING-SYSTEM-1 and CODING-SYSTEM-2 are identical.
+Two coding systems are identical if two symbols are equal
+or one is an alias of the other."
+  (or (eq coding-system-1 coding-system-2)
+      (and (equal (coding-system-spec coding-system-1)
+		  (coding-system-spec coding-system-2))
+	   (let ((eol-type-1 (coding-system-eol-type coding-system-1))
+		 (eol-type-2 (coding-system-eol-type coding-system-2)))
+	     (or (eq eol-type-1 eol-type-2)
+		 (and (vectorp eol-type-1) (vectorp eol-type-2)))))))
+
 (defun add-to-coding-system-list (coding-system)
   "Add CODING-SYSTEM to `coding-system-list' while keeping it sorted."
   (if (or (null coding-system-list)
--- a/lisp/net/tls.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/net/tls.el	Thu Oct 14 14:42:03 2004 +0000
@@ -1,6 +1,6 @@
 ;;; tls.el --- TLS/SSL support via wrapper around GnuTLS
 
-;; Copyright (C) 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2003, 2004 Free Software Foundation, Inc.
 
 ;; Author: Simon Josefsson <simon@josefsson.org>
 ;; Keywords: comm, tls, gnutls, ssl
@@ -76,6 +76,35 @@
   :type 'regexp
   :group 'tls)
 
+(defcustom tls-certtool-program (executable-find "certtool")
+  "Name of  GnuTLS certtool.
+Used by `tls-certificate-information'."
+  :type '(repeat string)
+  :group 'tls)
+
+(defun tls-certificate-information (der)
+  "Parse X.509 certificate in DER format into an assoc list."
+  (let ((certificate (concat "-----BEGIN CERTIFICATE-----\n"
+			     (base64-encode-string der)
+			     "\n-----END CERTIFICATE-----\n"))
+	(exit-code 0))
+    (with-current-buffer (get-buffer-create " *certtool*")
+      (erase-buffer)
+      (insert certificate)
+      (setq exit-code (condition-case ()
+			  (call-process-region (point-min) (point-max)
+					       tls-certtool-program
+					       t (list (current-buffer) nil) t
+					       "--certificate-info")
+			(error -1)))
+      (if (/= exit-code 0)
+	  nil
+	(let ((vals nil))
+	  (goto-char (point-min))
+	  (while (re-search-forward "^\\([^:]+\\): \\(.*\\)" nil t)
+	    (push (cons (match-string 1) (match-string 2)) vals))
+	  (nreverse vals))))))
+
 (defun open-tls-stream (name buffer host service)
   "Open a TLS connection for a service to a host.
 Returns a subprocess-object to represent the connection.
--- a/lisp/net/tramp-smb.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/net/tramp-smb.el	Thu Oct 14 14:42:03 2004 +0000
@@ -1087,7 +1087,7 @@
 ;; `PC-do-completion' touches the returning "$$" by `substitute-in-file-name'.
 ;; Must be corrected.
 
-(defadvice PC-do-completion (around tramp-smb-advice-PC-do-completion activate)
+(defadvice PC-do-completion (around tramp-smb-advice-PC-do-completion)
   "Changes \"$\" back to \"$$\" in minibuffer."
   (if (funcall PC-completion-as-file-name-predicate)
 
@@ -1123,6 +1123,13 @@
     ;; No file names. Behave unchanged.
     ad-do-it))
 
+;; Activate advice.  Recent Emacsen don't need that.
+(when (functionp 'PC-do-completion)
+  (condition-case nil
+      (substitute-in-file-name "C$/")
+    (error
+     (ad-activate 'PC-do-completion))))
+
 (provide 'tramp-smb)
 
 ;;; TODO:
--- a/lisp/net/tramp.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/net/tramp.el	Thu Oct 14 14:42:03 2004 +0000
@@ -1668,6 +1668,7 @@
 
     my $len = length($pending);
     my $chunk = substr($pending, 0, $len & ~3);
+    $pending = substr($pending, $len & ~3 + 1);
 
     # Easy method: translate from chars to (pregenerated) six-bit packets, join,
     # split in 8-bit chunks and convert back to char.
@@ -1883,7 +1884,11 @@
 
 (put 'with-parsed-tramp-file-name 'lisp-indent-function 2)
 ;; To be activated for debugging containing this macro
-(def-edebug-spec with-parsed-tramp-file-name t)
+;; It works only when VAR is nil.  Otherwise, it can be deactivated by
+;; (def-edebug-spec with-parsed-tramp-file-name 0)
+;; I'm too stupid to write a precise SPEC for it.
+(if (functionp 'def-edebug-spec)
+  (def-edebug-spec with-parsed-tramp-file-name t))
 
 (defmacro tramp-let-maybe (variable value &rest body)
   "Let-bind VARIABLE to VALUE in BODY, but only if VARIABLE is not obsolete.
@@ -6731,6 +6736,31 @@
             (tramp-make-auto-save-file-name (buffer-file-name)))
     ad-do-it))
 
+;; In Emacs < 21.4 and XEmacs < 21.5 autosaved remote files have
+;; permission 666 minus umask. This is a security threat.
+
+(defun tramp-set-auto-save-file-modes ()
+  "Set permissions of autosaved remote files to the original permissions."
+  (let ((bfn (buffer-file-name)))
+    (when (and (stringp bfn)
+	       (tramp-tramp-file-p bfn)
+	       (stringp buffer-auto-save-file-name)
+	       (not (equal bfn buffer-auto-save-file-name))
+	       (not (file-exists-p buffer-auto-save-file-name)))
+      (write-region "" nil buffer-auto-save-file-name)
+      (set-file-modes buffer-auto-save-file-name (file-modes bfn)))))
+
+(unless (or (> emacs-major-version 21)
+	    (and (featurep 'xemacs)
+		 (= emacs-major-version 21)
+		 (> emacs-minor-version 4))
+	    (and (not (featurep 'xemacs))
+		 (= emacs-major-version 21)
+		 (or (> emacs-minor-version 3)
+		     (and (string-match "^21\\.3\\.\\([0-9]+\\)" emacs-version)
+			  (>= (string-to-int (match-string 1 emacs-version)) 50)))))
+  (add-hook 'auto-save-hook 'tramp-set-auto-save-file-modes))
+
 (defun tramp-subst-strs-in-string (alist string)
   "Replace all occurrences of the string FROM with TO in STRING.
 ALIST is of the form ((FROM . TO) ...)."
--- a/lisp/net/trampver.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/net/trampver.el	Thu Oct 14 14:42:03 2004 +0000
@@ -30,7 +30,7 @@
 ;; are auto-frobbed from configure.ac, so you should edit that file and run
 ;; "autoconf && ./configure" to change them.
 
-(defconst tramp-version "2.0.44"
+(defconst tramp-version "2.0.45"
   "This version of Tramp.")
 
 (defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org"
--- a/lisp/pcvs-parse.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/pcvs-parse.el	Thu Oct 14 14:42:03 2004 +0000
@@ -511,15 +511,19 @@
        (cvs-match "new revision: \\([0-9.]*\\); previous revision: .*$"
 		  (subtype 'COMMITTED) (base-rev 1)))
       (cvs-or (cvs-match "done$") t)
+      ;; In cvs-1.12.9 commit messages have been changed and became
+      ;; ambiguous.  More specifically, the `path' above is not given.
+      ;; We assume here that in future releases the corresponding info will
+      ;; be put into `file'.
       (progn
 	;; Try to remove the temp files used by VC.
-	(vc-delete-automatic-version-backups (expand-file-name path))
+	(vc-delete-automatic-version-backups (expand-file-name (or path file)))
 	;; it's important here not to rely on the default directory management
 	;; because `cvs commit' might begin by a series of Examining messages
 	;; so the processing of the actual checkin messages might begin with
 	;; a `current-dir' set to something different from ""
 	(cvs-parsed-fileinfo (cons 'UP-TO-DATE subtype)
-			     (or path file) (if path 'trust)
+			     (or path file) 'trust
 			     :base-rev base-rev)))
 
      ;; useless message added before the actual addition: ignored
--- a/lisp/progmodes/gud.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/progmodes/gud.el	Thu Oct 14 14:42:03 2004 +0000
@@ -3027,6 +3027,27 @@
 	  (save-excursion (indent-line-to indent))
 	(indent-line-to indent)))))
 
+;; Derived from cfengine.el.
+(defun gdb-script-beginning-of-defun ()
+  "`beginning-of-defun' function for Gdb script mode.
+Treats actions as defuns."
+  (unless (<= (current-column) (current-indentation))
+    (end-of-line))
+  (if (re-search-backward "^define \\|^document " nil t)
+      (beginning-of-line)
+    (goto-char (point-min)))
+  t)
+
+;; Derived from cfengine.el.
+(defun gdb-script-end-of-defun ()
+  "`end-of-defun' function for Gdb script mode.
+Treats actions as defuns."
+  (end-of-line)
+  (if (re-search-forward "^end" nil t)
+      (beginning-of-line)
+    (goto-char (point-max)))
+  t)
+
 ;;;###autoload
 (add-to-list 'auto-mode-alist '("/\\.gdbinit" . gdb-script-mode))
 
@@ -3039,6 +3060,10 @@
   (set (make-local-variable 'imenu-generic-expression)
        '((nil "^define[ \t]+\\(\\w+\\)" 1)))
   (set (make-local-variable 'indent-line-function) 'gdb-script-indent-line)
+  (set (make-local-variable 'beginning-of-defun-function)
+       #'gdb-script-beginning-of-defun)
+  (set (make-local-variable 'end-of-defun-function)
+       #'gdb-script-end-of-defun)
   (set (make-local-variable 'font-lock-defaults)
        '(gdb-script-font-lock-keywords nil nil ((?_ . "w")) nil
 	 (font-lock-syntactic-keywords
--- a/lisp/recentf.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/recentf.el	Thu Oct 14 14:42:03 2004 +0000
@@ -1032,7 +1032,8 @@
                      (dolist (e recentf-edit-selected-items)
                        (setq recentf-list (delq e recentf-list)
                              i (1+ i)))
-                     (message "%S file(s) removed from the list" i))
+                     (message "%S file(s) removed from the list" i)
+                     (recentf-clear-data))
                  (message "No file selected")))
      "Ok")
     (widget-insert " ")
--- a/lisp/subr.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/subr.el	Thu Oct 14 14:42:03 2004 +0000
@@ -367,15 +367,6 @@
 	  (define-key map (char-to-string loop) 'digit-argument)
 	  (setq loop (1+ loop))))))
 
-;Moved to keymap.c
-;(defun copy-keymap (keymap)
-;  "Return a copy of KEYMAP"
-;  (while (not (keymapp keymap))
-;    (setq keymap (signal 'wrong-type-argument (list 'keymapp keymap))))
-;  (if (vectorp keymap)
-;      (copy-sequence keymap)
-;      (copy-alist keymap)))
-
 (defvar key-substitution-in-progress nil
  "Used internally by substitute-key-definition.")
 
@@ -396,126 +387,54 @@
   ;; original key, with PREFIX added at the front.
   (or prefix (setq prefix ""))
   (let* ((scan (or oldmap keymap))
-	 (vec1 (vector nil))
-	 (prefix1 (vconcat prefix vec1))
+	 (prefix1 (vconcat prefix [nil]))
 	 (key-substitution-in-progress
 	  (cons scan key-substitution-in-progress)))
     ;; Scan OLDMAP, finding each char or event-symbol that
     ;; has any definition, and act on it with hack-key.
-    (while (consp scan)
-      (if (consp (car scan))
-	  (let ((char (car (car scan)))
-		(defn (cdr (car scan))))
-	    ;; The inside of this let duplicates exactly
-	    ;; the inside of the following let that handles array elements.
-	    (aset vec1 0 char)
-	    (aset prefix1 (length prefix) char)
-	    (let (inner-def skipped)
-	      ;; Skip past menu-prompt.
-	      (while (stringp (car-safe defn))
-		(setq skipped (cons (car defn) skipped))
-		(setq defn (cdr defn)))
-	      ;; Skip past cached key-equivalence data for menu items.
-	      (and (consp defn) (consp (car defn))
-		   (setq defn (cdr defn)))
-	      (setq inner-def defn)
-	      ;; Look past a symbol that names a keymap.
-	      (while (and (symbolp inner-def)
-			  (fboundp inner-def))
-		(setq inner-def (symbol-function inner-def)))
-	      (if (or (eq defn olddef)
-		      ;; Compare with equal if definition is a key sequence.
-		      ;; That is useful for operating on function-key-map.
-		      (and (or (stringp defn) (vectorp defn))
-			   (equal defn olddef)))
-		  (define-key keymap prefix1 (nconc (nreverse skipped) newdef))
-		(if (and (keymapp defn)
-			 ;; Avoid recursively scanning
-			 ;; where KEYMAP does not have a submap.
-			 (let ((elt (lookup-key keymap prefix1)))
-			   (or (null elt)
-			       (keymapp elt)))
-			 ;; Avoid recursively rescanning keymap being scanned.
-			 (not (memq inner-def
-				    key-substitution-in-progress)))
-		    ;; If this one isn't being scanned already,
-		    ;; scan it now.
-		    (substitute-key-definition olddef newdef keymap
-					       inner-def
-					       prefix1)))))
-	(if (vectorp (car scan))
-	    (let* ((array (car scan))
-		   (len (length array))
-		   (i 0))
-	      (while (< i len)
-		(let ((char i) (defn (aref array i)))
-		  ;; The inside of this let duplicates exactly
-		  ;; the inside of the previous let.
-		  (aset vec1 0 char)
-		  (aset prefix1 (length prefix) char)
-		  (let (inner-def skipped)
-		    ;; Skip past menu-prompt.
-		    (while (stringp (car-safe defn))
-		      (setq skipped (cons (car defn) skipped))
-		      (setq defn (cdr defn)))
-		    (and (consp defn) (consp (car defn))
-			 (setq defn (cdr defn)))
-		    (setq inner-def defn)
-		    (while (and (symbolp inner-def)
-				(fboundp inner-def))
-		      (setq inner-def (symbol-function inner-def)))
-		    (if (or (eq defn olddef)
-			    (and (or (stringp defn) (vectorp defn))
-				 (equal defn olddef)))
-			(define-key keymap prefix1
-			  (nconc (nreverse skipped) newdef))
-		      (if (and (keymapp defn)
-			       (let ((elt (lookup-key keymap prefix1)))
-				 (or (null elt)
-				     (keymapp elt)))
-			       (not (memq inner-def
-					  key-substitution-in-progress)))
-			  (substitute-key-definition olddef newdef keymap
-						     inner-def
-						     prefix1)))))
-		(setq i (1+ i))))
-	  (if (char-table-p (car scan))
-	      (map-char-table
-	       (function (lambda (char defn)
-			   (let ()
-			     ;; The inside of this let duplicates exactly
-			     ;; the inside of the previous let,
-			     ;; except that it uses set-char-table-range
-			     ;; instead of define-key.
-			     (aset vec1 0 char)
-			     (aset prefix1 (length prefix) char)
-			     (let (inner-def skipped)
-			       ;; Skip past menu-prompt.
-			       (while (stringp (car-safe defn))
-				 (setq skipped (cons (car defn) skipped))
-				 (setq defn (cdr defn)))
-			       (and (consp defn) (consp (car defn))
-				    (setq defn (cdr defn)))
-			       (setq inner-def defn)
-			       (while (and (symbolp inner-def)
-					   (fboundp inner-def))
-				 (setq inner-def (symbol-function inner-def)))
-			       (if (or (eq defn olddef)
-				       (and (or (stringp defn) (vectorp defn))
-					    (equal defn olddef)))
-				   (define-key keymap prefix1
-				     (nconc (nreverse skipped) newdef))
-				 (if (and (keymapp defn)
-					  (let ((elt (lookup-key keymap prefix1)))
-					    (or (null elt)
-						(keymapp elt)))
-					  (not (memq inner-def
-						     key-substitution-in-progress)))
-				     (substitute-key-definition olddef newdef keymap
-								inner-def
-								prefix1)))))))
-	       (car scan)))))
-      (setq scan (cdr scan)))))
+    (map-keymap
+     (lambda (char defn)
+       (aset prefix1 (length prefix) char)
+       (substitute-key-definition-key defn olddef newdef prefix1 keymap))
+     scan)))
+
+(defun substitute-key-definition-key (defn olddef newdef prefix keymap)
+  (let (inner-def skipped menu-item)
+    ;; Find the actual command name within the binding.
+    (if (eq (car-safe defn) 'menu-item)
+	(setq menu-item defn defn (nth 2 defn))
+      ;; Skip past menu-prompt.
+      (while (stringp (car-safe defn))
+	(push (pop defn) skipped))
+      ;; Skip past cached key-equivalence data for menu items.
+      (if (consp (car-safe defn))
+	  (setq defn (cdr defn))))
+    (if (or (eq defn olddef)
+	    ;; Compare with equal if definition is a key sequence.
+	    ;; That is useful for operating on function-key-map.
+	    (and (or (stringp defn) (vectorp defn))
+		 (equal defn olddef)))
+	(define-key keymap prefix
+	  (if menu-item
+	      (let ((copy (copy-sequence menu-item)))
+		(setcar (nthcdr 2 copy) newdef)
+		copy)
+	    (nconc (nreverse skipped) newdef)))
+      ;; Look past a symbol that names a keymap.
+      (setq inner-def
+	    (condition-case nil (indirect-function defn) (error defn)))
+      ;; For nested keymaps, we use `inner-def' rather than `defn' so as to
+      ;; avoid autoloading a keymap.  This is mostly done to preserve the
+      ;; original non-autoloading behavior of pre-map-keymap times.
+      (if (and (keymapp inner-def)
+	       ;; Avoid recursively scanning
+	       ;; where KEYMAP does not have a submap.
+	       (let ((elt (lookup-key keymap prefix)))
+		 (or (null elt) (natnump elt) (keymapp elt)))
+	       ;; Avoid recursively rescanning keymap being scanned.
+	       (not (memq inner-def key-substitution-in-progress)))
+	  ;; If this one isn't being scanned already, scan it now.
+	  (substitute-key-definition olddef newdef keymap inner-def prefix)))))
 
 (defun define-key-after (keymap key definition &optional after)
   "Add binding in KEYMAP for KEY => DEFINITION, right after AFTER's binding.
@@ -661,19 +580,19 @@
 	    (char (logand type (lognot (logior ?\M-\^@ ?\C-\^@ ?\S-\^@
 					       ?\H-\^@ ?\s-\^@ ?\A-\^@)))))
 	(if (not (zerop (logand type ?\M-\^@)))
-	    (setq list (cons 'meta list)))
+	    (push 'meta list))
 	(if (or (not (zerop (logand type ?\C-\^@)))
 		(< char 32))
-	    (setq list (cons 'control list)))
+	    (push 'control list))
 	(if (or (not (zerop (logand type ?\S-\^@)))
 		(/= char (downcase char)))
-	    (setq list (cons 'shift list)))
+	    (push 'shift list))
 	(or (zerop (logand type ?\H-\^@))
-	    (setq list (cons 'hyper list)))
+	    (push 'hyper list))
 	(or (zerop (logand type ?\s-\^@))
-	    (setq list (cons 'super list)))
+	    (push 'super list))
 	(or (zerop (logand type ?\A-\^@))
-	    (setq list (cons 'alt list)))
+	    (push 'alt list))
 	list))))
 
 (defun event-basic-type (event)
@@ -691,8 +610,7 @@
 
 (defsubst mouse-movement-p (object)
   "Return non-nil if OBJECT is a mouse movement event."
-  (and (consp object)
-       (eq (car object) 'mouse-movement)))
+  (eq (car-safe object) 'mouse-movement))
 
 (defsubst event-start (event)
   "Return the starting position of EVENT.
@@ -1895,8 +1813,7 @@
 See also `with-temp-file' and `with-output-to-string'."
   (declare (indent 0) (debug t))
   (let ((temp-buffer (make-symbol "temp-buffer")))
-    `(let ((,temp-buffer
-	    (get-buffer-create (generate-new-buffer-name " *temp*"))))
+    `(let ((,temp-buffer (generate-new-buffer " *temp*")))
        (unwind-protect
 	   (with-current-buffer ,temp-buffer
 	     ,@body)
--- a/lisp/url/ChangeLog	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/url/ChangeLog	Thu Oct 14 14:42:03 2004 +0000
@@ -1,3 +1,19 @@
+2004-10-12  Simon Josefsson  <jas@extundo.com>
+
+	* url-vars.el (url-gateway-method): Add new method `tls'.
+
+	* url-news.el (url-snews): Use nntp-open-tls-stream if
+	url-gateway-method is tls.
+
+	* url-ldap.el (url-ldap-certificate-formatter): Use
+	tls-certificate-information if ssl.el is not available.
+
+	* url-https.el (url-https-create-secure-wrapper): Use tls if ssl
+	is not available.
+
+	* url-gw.el (url-open-stream): Support tls url-gateway-method.
+	(url-open-stream): Likewise.
+
 2004-10-10  Lars Hansen  <larsh@math.ku.dk>
 
 	* url-auth.el: Fix copyright notice.
--- a/lisp/url/url-gw.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/url/url-gw.el	Thu Oct 14 14:42:03 2004 +0000
@@ -3,7 +3,7 @@
 ;; Keywords: comm, data, processes
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Copyright (c) 1997, 1998 Free Software Foundation, Inc.
+;;; Copyright (c) 1997, 1998, 2004 Free Software Foundation, Inc.
 ;;;
 ;;; This file is part of GNU Emacs.
 ;;;
@@ -29,6 +29,7 @@
 
 (autoload 'socks-open-network-stream "socks")
 (autoload 'open-ssl-stream "ssl")
+(autoload 'open-tls-stream "tls")
 
 (defgroup url-gateway nil
   "URL gateway variables"
@@ -212,6 +213,7 @@
 Will not make a connexion if `url-gateway-unplugged' is non-nil."
   (unless url-gateway-unplugged
     (let ((gw-method (if (and url-gateway-local-host-regexp
+			      (not (eq 'tls url-gateway-method))
 			      (not (eq 'ssl url-gateway-method))
 			      (string-match
 			       url-gateway-local-host-regexp
@@ -242,6 +244,8 @@
 	  (let ((coding-system-for-read 'binary)
 		(coding-system-for-write 'binary))
 	    (setq conn (case gw-method
+			 (tls
+			  (open-tls-stream name buffer host service))
 			 (ssl
 			  (open-ssl-stream name buffer host service))
 			 ((native)
--- a/lisp/url/url-https.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/url/url-https.el	Thu Oct 14 14:42:03 2004 +0000
@@ -1,4 +1,4 @@
-;;; url-https.el --- HTTP over SSL routines
+;;; url-https.el --- HTTP over SSL/TLS routines
 
 ;; Copyright (c) 1999, 2004 Free Software Foundation, Inc.
 
@@ -30,6 +30,7 @@
 (require 'url-parse)
 (require 'url-cookie)
 (require 'url-http)
+(require 'tls)
 
 (defconst url-https-default-port 443 "Default HTTPS port.")
 (defconst url-https-asynchronous-p t "HTTPS retrievals are asynchronous.")
@@ -38,12 +39,11 @@
 (defmacro url-https-create-secure-wrapper (method args)
   `(defun ,(intern (format (if method "url-https-%s" "url-https") method)) ,args
     ,(format "HTTPS wrapper around `%s' call." (or method "url-http"))
-    (condition-case ()
-	(require 'ssl)
-      (error
-       (error "HTTPS support could not find `ssl' library")))
-    (let ((url-gateway-method 'ssl))
-      ( ,(intern (format (if method "url-http-%s" "url-http") method)) ,@(remove '&rest (remove '&optional args))))))
+    (let ((url-gateway-method (condition-case ()
+				  (require 'ssl)
+				(error 'tls))))
+      (,(intern (format (if method "url-http-%s" "url-http") method))
+       ,@(remove '&rest (remove '&optional args))))))
 
 (url-https-create-secure-wrapper nil (url callback cbargs))
 (url-https-create-secure-wrapper file-exists-p (url))
--- a/lisp/url/url-ldap.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/url/url-ldap.el	Thu Oct 14 14:42:03 2004 +0000
@@ -28,6 +28,7 @@
 (require 'url-parse)
 (require 'url-util)
 (require 'ldap)
+(autoload 'tls-certificate-information "tls")
 
 ;; This has been implemented from RFC2255 'The LDAP URL Format' (Dec 1997)
 ;;
@@ -96,7 +97,8 @@
       (require 'ssl)
     (error nil))
   (let ((vals (if (fboundp 'ssl-certificate-information)
-		  (ssl-certificate-information data))))
+		  (ssl-certificate-information data)
+		(tls-certificate-information data))))
     (if (not vals)
 	"<b>Unable to parse certificate</b>"
       (concat "<table border=0>\n"
--- a/lisp/url/url-news.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/url/url-news.el	Thu Oct 14 14:42:03 2004 +0000
@@ -2,7 +2,7 @@
 ;; Keywords: comm, data, processes
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc.
+;;; Copyright (c) 1996 - 1999, 2004 Free Software Foundation, Inc.
 ;;;
 ;;; This file is part of GNU Emacs.
 ;;;
@@ -125,7 +125,9 @@
 
 ;;;###autoload
 (defun url-snews (url)
-  (let ((nntp-open-connection-function 'nntp-open-ssl-stream))
+  (let ((nntp-open-connection-function (if (eq 'tls url-gateway-method)
+					   nntp-open-tls-stream
+					 nntp-open-ssl-stream)))
     (url-news url)))
 
 (provide 'url-news)
--- a/lisp/url/url-vars.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/url/url-vars.el	Thu Oct 14 14:42:03 2004 +0000
@@ -2,7 +2,7 @@
 ;; Keywords: comm, data, processes, hypermedia
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Copyright (c) 1996,1997,1998,1999,2001 Free Software Foundation, Inc.
+;;; Copyright (c) 1996,1997,1998,1999,2001,2004 Free Software Foundation, Inc.
 ;;;
 ;;; This file is part of GNU Emacs.
 ;;;
@@ -368,12 +368,14 @@
 `telnet': Run telnet in a subprocess to connect;
 `rlogin': Rlogin to another machine to connect;
 `socks': Connect through a socks server;
-`ssl': Connect with SSL;
+`tls': Connect with TLS;
+`ssl': Connect with SSL (deprecated, use `tls' instead);
 `native': Connect directy."
   :type '(radio (const :tag "Telnet to gateway host" :value telnet)
 		(const :tag "Rlogin to gateway host" :value rlogin)
 		(const :tag "Use SOCKS proxy" :value socks)
-		(const :tag "Use SSL for all connections" :value ssl)
+		(const :tag "Use SSL/TLS for all connections" :value tls)
+		(const :tag "Use SSL for all connections (obsolete)" :value ssl)
 		(const :tag "Direct connection" :value native))
   :group 'url-hairy)
 
--- a/lisp/vc.el	Tue Oct 12 07:52:25 2004 +0000
+++ b/lisp/vc.el	Thu Oct 14 14:42:03 2004 +0000
@@ -3001,7 +3001,7 @@
   (when buffer
     (set-buffer buffer)
     (display-buffer buffer))
-  (if (not vc-annotate-parent-ref)
+  (if (not vc-annotate-parent-rev)
       (vc-annotate-mode))
   (cond ((null vc-annotate-display-mode)
 	 (vc-annotate-display-default vc-annotate-ratio))
--- a/lispintro/emacs-lisp-intro.texi	Tue Oct 12 07:52:25 2004 +0000
+++ b/lispintro/emacs-lisp-intro.texi	Thu Oct 14 14:42:03 2004 +0000
@@ -22,8 +22,8 @@
 
 @comment %**end of header
 
-@set edition-number 2.13
-@set update-date 2004 Oct  5
+@set edition-number 2.14
+@set update-date 2004 Oct 12
 
 @ignore
  ## Summary of shell commands to create various output formats:
@@ -14931,10 +14931,10 @@
        ((eq t (car (cdr (car current-directory-list))))
         ;; decide whether to skip or recurse
         (if
-            (equal (or "." "..")
+            (equal "."
                    (substring (car (car current-directory-list)) -1))
-            ;; then do nothing if filename is that of
-            ;;   current directory or parent
+            ;; then do nothing since filename is that of
+            ;;   current directory or parent, "." or ".."
             ()
 @end group
 @group
@@ -17125,7 +17125,7 @@
 @item  Ignore case when using `grep'@*
 @samp{-n}@w{  }   Prefix each line of output with line number@*
 @samp{-i}@w{  }   Ignore case distinctions@*
-@samp{-e}@w{  }   Protect patterns beginning with a hyphen character, @samp{-} 
+@samp{-e}@w{  }   Protect patterns beginning with a hyphen character, @samp{-}
 
 @smallexample
 (setq grep-command "grep  -n -i -e ")
@@ -17166,7 +17166,7 @@
 @end itemize
 
 @subsubheading Fixing Unpleasant Key Bindings
-@cindex Key bindings, fixing 
+@cindex Key bindings, fixing
 @cindex Bindings, key, fixing unpleasant
 
 Some systems bind keys unpleasantly.  Sometimes, for example, the
--- a/man/ChangeLog	Tue Oct 12 07:52:25 2004 +0000
+++ b/man/ChangeLog	Thu Oct 14 14:42:03 2004 +0000
@@ -1,3 +1,15 @@
+2004-10-12  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* gnus-faq.texi ([5.9]): Improve code for reply-in-news.
+
+2004-10-12  Michael Albinus  <michael.albinus@gmx.de>
+
+	Sync with Tramp 2.0.45.
+
+	* tramp.texi (Frequently Asked Questions): Comment paragraph about
+	plink link.  The URL is outdated.  Originator contacted for
+	clarification.
+
 2004-10-10  Juri Linkov  <juri@jurta.org>
 
 	* gnus.texi (Top, Marking Articles): Join two menus in one node
--- a/man/calc.texi	Tue Oct 12 07:52:25 2004 +0000
+++ b/man/calc.texi	Thu Oct 14 14:42:03 2004 +0000
@@ -10026,19 +10026,17 @@
 @kindex h f
 @pindex calc-describe-function
 The @kbd{h f} (@code{calc-describe-function}) command looks up an
-algebraic function or a command name in the Calc manual.  The
-prompt initially contains @samp{calcFunc-}; follow this with an
+algebraic function or a command name in the Calc manual.  Enter an
 algebraic function name to look up that function in the Function
-Index.  Or, backspace and enter a command name beginning with
-@samp{calc-} to look it up in the Command Index.  This command
-will also look up operator symbols that can appear in algebraic
-formulas, like @samp{%} and @samp{=>}.
+Index or enter a command name beginning with @samp{calc-} to look it 
+up in the Command Index.  This command will also look up operator
+symbols that can appear in algebraic formulas, like @samp{%} and 
+@samp{=>}.
 
 @kindex h v
 @pindex calc-describe-variable
 The @kbd{h v} (@code{calc-describe-variable}) command looks up a
-variable in the Calc manual.  The prompt initially contains the
-@samp{var-} prefix; just add a variable name like @code{pi} or
+variable in the Calc manual.  Enter a variable name like @code{pi} or
 @code{PlotRejects}.
 
 @kindex h b
--- a/man/gnus-faq.texi	Tue Oct 12 07:52:25 2004 +0000
+++ b/man/gnus-faq.texi	Thu Oct 14 14:42:03 2004 +0000
@@ -1776,11 +1776,14 @@
  
 
 @example
-(defadvice gnus-summary-reply (around reply-in-news activate)
+(eval-after-load "gnus-msg"
+  '(unless (boundp 'gnus-confirm-mail-reply-to-news)
+     (defadvice gnus-summary-reply (around reply-in-news activate)
+       "Request confirmation when replying to news."
        (interactive)
-        (when (or (not (gnus-news-group-p gnus-newsgroup-name))
-                  (y-or-n-p "Really reply? "))
-         ad-do-it))
+       (when (or (not (gnus-news-group-p gnus-newsgroup-name))
+                 (y-or-n-p "Really reply by mail to article author? "))
+         ad-do-it))))
 @end example
  
 @ifnottex
--- a/man/tramp.texi	Tue Oct 12 07:52:25 2004 +0000
+++ b/man/tramp.texi	Thu Oct 14 14:42:03 2004 +0000
@@ -1952,9 +1952,12 @@
 many thanks to Joe Stoy for providing the information:
 @uref{ftp://ftp.comlab.ox.ac.uk/tmp/Joe.Stoy/}
 
+@c The link is broken. I've contacted Tom for clarification. Michael.
+@ignore
 The above mostly contains patches to old ssh versions; Tom Roche has a
 Web page with instructions:
 @uref{http://www4.ncsu.edu/~tlroche/plinkTramp.html}
+@end ignore
 
 ??? Is the XEmacs info correct?
 
--- a/man/trampver.texi	Tue Oct 12 07:52:25 2004 +0000
+++ b/man/trampver.texi	Thu Oct 14 14:42:03 2004 +0000
@@ -4,7 +4,7 @@
 @c In the Tramp CVS, the version number is auto-frobbed from
 @c configure.ac, so you should edit that file and run
 @c "autoconf && ./configure" to change the version number.
-@set trampver 2.0.44
+@set trampver 2.0.45
 
 @c Other flags from configuration
 @set prefix /usr/local
--- a/src/ChangeLog	Tue Oct 12 07:52:25 2004 +0000
+++ b/src/ChangeLog	Thu Oct 14 14:42:03 2004 +0000
@@ -1,3 +1,35 @@
+2004-10-14  Kim F. Storm  <storm@cua.dk>
+
+	* xterm.h: Include Xutil.h after keysym.h to work around bug
+	(incorrectly recognising AltGr key) in some X versions.
+
+2004-10-13  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* keymap.c (get_keymap): An autoload form is not a keymap.
+
+	* textprop.c (syms_of_textprop): Make `syntax-table' nonsticky.
+
+2004-10-13  Kim F. Storm  <storm@cua.dk>
+
+	* callproc.c (Fcall_process): Simplify handling of display arg.
+	Resume `display_on_the_fly' once a coding system is determined.
+
+	* xdisp.c (redisplay_preserve_echo_area): Fix last change.
+
+2004-10-12  Kim F. Storm  <storm@cua.dk>
+
+	* xdisp.c (redisplay_preserve_echo_area): Flush display in case
+	caller, such as call-process, is not going to poll for input.
+	(calc_line_height_property): Handle case where it->object is nil.
+
+	* xterm.c (x_redisplay_interface): Fix flush_display_optional.
+
+2004-10-12  Kenichi Handa  <handa@m17n.org>
+
+	* xdisp.c (get_next_display_element):
+	If unibyte_display_via_language_environment is zero, display 8-bit
+	chars in octal in unibyte buffer.
+
 2004-10-12  Kim F. Storm  <storm@cua.dk>
 
 	* doc.c (Fsubstitute_command_keys): Ignore remappings unless there
@@ -5,22 +37,21 @@
 
 2004-10-11  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
 
-	* xfns.c (syms_of_xfns): defsubr x-file-dialog for GTK also.
+	* xfns.c (syms_of_xfns): Defsubr x-file-dialog for GTK also.
 
 2004-10-10  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
-	* macterm.c (x_raise_frame): Add BLOCK_INPUT around SelectWindow
-	(x_lower_frame): Add BLOCK_INPUT around SendBehind
+	* macterm.c (x_raise_frame): Add BLOCK_INPUT around SelectWindow.
+	(x_lower_frame): Add BLOCK_INPUT around SendBehind.
 	(make_mac_frame): Add BLOCK_INPUT around the making of a
-	terminal frame
-	(mac_initialize): Add BLOCK_INPUT around carbon initialization
-	* macgui.h (mktime): Use emacs_mktime
+	terminal frame.
+	(mac_initialize): Add BLOCK_INPUT around carbon initialization.
+	* macgui.h (mktime): Use emacs_mktime.
 	* macfns.c (Fx_file_dialog): Add BLOCK_INPUT around more code.
 	Make a cancel file-open dialog be like C-g.
-	* mac.c (mktime): Use emacs_mktime
-	(Fdo_applescript): Add BLOCK_INPUT around do_applescript
-	(Fmac_paste_function): Add better error handling for carbon
-	cut/paste
+	* mac.c (mktime): Use emacs_mktime.
+	(Fdo_applescript): Add BLOCK_INPUT around do_applescript.
+	(Fmac_paste_function): Add better error handling for carbon cut/paste.
 
 2004-10-10  Kim F. Storm  <storm@cua.dk>
 
@@ -34,12 +65,12 @@
 
 2004-10-08  Steven Tamm  <steventamm@mac.com>
 
-	* config.in (HAVE_MALLOC_MALLOC_H): Regenerate
+	* config.in (HAVE_MALLOC_MALLOC_H): Regenerate.
 	* macterm.c (mac_check_for_quit_char): Remove warning for using
-	NULL where 0 should be used
+	NULL where 0 should be used.
 	* unexmacosx.c: Use malloc/malloc.h on Tiger instead of
 	objc/malloc.h
-	* mac.c: Include time.h for Tiger compatibility
+	* mac.c: Include time.h for Tiger compatibility.
 
 2004-10-07  Kim F. Storm  <storm@cua.dk>
 
@@ -185,8 +216,8 @@
 	Change arg to Lisp_Object and fail if not an integer.
 	(get_fringe_bitmap_name, resolve_fringe_bitmap)
 	(destroy_fringe_bitmap): New functions.
-	(Fdestroy_fringe_bitmap): Change arg to bitmap symbol.  Use
-	destroy_fringe_bitmap.  Remove symbol from Vfringe_bitmaps and
+	(Fdestroy_fringe_bitmap): Change arg to bitmap symbol.
+	Use destroy_fringe_bitmap.  Remove symbol from Vfringe_bitmaps and
 	clear its fringe property.
 	(init_fringe_bitmap): Use destroy_fringe_bitmap instead of
 	Fdestroy_fringe_bitmap.
@@ -211,7 +242,7 @@
 
 2004-09-25  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
 
-	* config.in: Rebuild
+	* config.in: Rebuild.
 
 2004-09-24  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
 
@@ -231,7 +262,7 @@
 	Handle the case where we reach the old displayed text,
 	out of sync with the old line boundary.
 
-2004-09-14  Stefan  <monnier@iro.umontreal.ca>
+2004-09-14  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* fileio.c (Finsert_file_contents): Fix case of replacement in a
 	narrowed buffer.
@@ -253,7 +284,7 @@
 	(Fbyte_code): Remove dead code after `wrong_type_argument'.
 
 	* alloc.c (Fgarbage_collect): Mark keyboards, gtk data, and specpdl
-	before doing the mark_stack_check_gcpros since they are not on the stack.
+	before doing the mark_stack_check_gcpros since they're not on the stack.
 
 2004-09-12  Kim F. Storm  <storm@cua.dk>
 
@@ -272,8 +303,7 @@
 	blockinput.h.
 	(dosfns.o): Depend on blockinput.h, window.h, dispextern.h,
 	charset.h, and coding.h
-	(w16select.o): Depend on buffer.h, charset.h, coding.h, and
-	composite.h.
+	(w16select.o): Depend on buffer.h, charset.h, coding.h, and composite.h.
 	(term.o): Depend on window.h and keymap.h.
 	(abbrev.o): Depend on syntax.h.
 	(callint.o): Depend on keymap.h.
@@ -306,8 +336,8 @@
 	(lread.o): Depend on $(INTERVALS_SRC), termhooks.h, and coding.h.
 	(intervals.o): Depend on keymap.h.
 
-	* msdos.c (msdos_set_cursor_shape, IT_display_cursor): Add
-	debugging print-out to termscript.
+	* msdos.c (msdos_set_cursor_shape, IT_display_cursor):
+	Add debugging print-out to termscript.
 
 2004-09-09  Richard M. Stallman  <rms@gnu.org>
 
@@ -333,8 +363,8 @@
 2004-09-07  Luc Teirlinck  <teirllm@auburn.edu>
 
 	* buffer.h (struct buffer): Add auto_save_file_format field.
-	* buffer.c (reset_buffer, init_buffer_once): Handle
-	auto_save_file_format field.
+	* buffer.c (reset_buffer, init_buffer_once):
+	Handle auto_save_file_format field.
 	(syms_of_buffer): Add DEFVAR_PER_BUFFER for
 	`buffer-auto-save-file-format'.
 	* fileio.c: Delete declaration for removed Vauto_save_file_format.
@@ -347,15 +377,15 @@
 
 	* w32term.h (AppendMenuW_Proc): Move declaration from w32menu.c.
 
-	* w32fns.c (w32_wnd_proc) [WM_MEASUREITEM, WM_DRAWITEM]: Handle
-	Unicode menu titles.
+	* w32fns.c (w32_wnd_proc) [WM_MEASUREITEM, WM_DRAWITEM]:
+	Handle Unicode menu titles.
 
 2004-09-07  Kim F. Storm  <storm@cua.dk>
 
 	* xdisp.c (set_cursor_from_row): Fix last change.  Only use 'cursor'
 	property from text property or overlay strings at point.
 
-2004-09-07  Stefan  <monnier@iro.umontreal.ca>
+2004-09-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* xmenu.c (update_submenu_strings): YAILOM.
 	(set_frame_menubar): Make sure last_i is initialized.
@@ -844,7 +874,7 @@
 	* w32select.c (Fw32_set_clipboard_data): Update `nbytes' correctly
 	after getting a new string by pre-write-conversion.
 
-2004-06-30  Stefan  <monnier@iro.umontreal.ca>
+2004-06-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* xterm.c (x_detect_focus_change): Remove unused var `nr_events'.
 	(x_calc_absolute_position): Remove unused var `child'.
--- a/src/callproc.c	Tue Oct 12 07:52:25 2004 +0000
+++ b/src/callproc.c	Thu Oct 14 14:42:03 2004 +0000
@@ -216,7 +216,8 @@
      int nargs;
      register Lisp_Object *args;
 {
-  Lisp_Object infile, buffer, current_dir, display, path;
+  Lisp_Object infile, buffer, current_dir, path;
+  int display_p;
   int fd[2];
   int filefd;
   register int pid;
@@ -372,7 +373,7 @@
     UNGCPRO;
   }
 
-  display = nargs >= 4 ? args[3] : Qnil;
+  display_p = INTERACTIVE && nargs >= 4 && !NILP (args[3]);
 
   filefd = emacs_open (SDATA (infile), O_RDONLY, 0);
   if (filefd < 0)
@@ -747,7 +748,7 @@
     int first = 1;
     int total_read = 0;
     int carryover = 0;
-    int display_on_the_fly = !NILP (display) && INTERACTIVE;
+    int display_on_the_fly = display_p;
     struct coding_system saved_coding;
     int pt_orig = PT, pt_byte_orig = PT_BYTE;
     int inserted;
@@ -823,12 +824,15 @@
 		  {
 		    /* We have detected some coding system.  But,
 		       there's a possibility that the detection was
-		       done by insufficient data.  So, we give up
-		       displaying on the fly.  */
+		       done by insufficient data.  So, we try the code
+		       detection again with more data.  */
 		    xfree (decoding_buf);
 		    display_on_the_fly = 0;
 		    process_coding = saved_coding;
 		    carryover = nread;
+		    /* This is to make the above condition always
+		       fails in the future.  */
+		    saved_coding.type = coding_type_no_conversion;
 		    continue;
 		  }
 
@@ -929,12 +933,16 @@
 	    bufptr = tempptr;
 	  }
 
-	if (!NILP (display) && INTERACTIVE)
+	if (display_p)
 	  {
 	    if (first)
 	      prepare_menu_bars ();
 	    first = 0;
 	    redisplay_preserve_echo_area (1);
+	    /* This variable might have been set to 0 for code
+	       detection.  In that case, we set it back to 1 because
+	       we should have already detected a coding system.  */
+	    display_on_the_fly = 1;
 	  }
 	immediate_quit = 1;
 	QUIT;
--- a/src/dispextern.h	Tue Oct 12 07:52:25 2004 +0000
+++ b/src/dispextern.h	Thu Oct 14 14:42:03 2004 +0000
@@ -1963,8 +1963,8 @@
 
   /* Object and position where the current display element came from.
      Object can be a Lisp string in case the current display element
-     comes from an overlay string, or it is buffer.  Position is
-     a position in object.  */
+     comes from an overlay string, or it is buffer.  It may also be nil
+     during mode-line update.  Position is a position in object.  */
   Lisp_Object object;
   struct text_pos position;
 
--- a/src/fns.c	Tue Oct 12 07:52:25 2004 +0000
+++ b/src/fns.c	Thu Oct 14 14:42:03 2004 +0000
@@ -2705,6 +2705,9 @@
      int depth;
 {
   int i, to;
+  struct gcpro gcpro1, gcpro2,  gcpro3, gcpro4;
+
+  GCPRO4 (arg, table, subtable, function);
 
   if (depth == 0)
     {
@@ -2724,7 +2727,10 @@
 #if 0 /* If the char table has entries for higher characters,
 	 we should report them.  */
       if (NILP (current_buffer->enable_multibyte_characters))
-	return;
+	{
+	  UNGCPRO;
+	  return;
+	}
 #endif
       to = CHAR_TABLE_ORDINARY_SLOTS;
     }
@@ -2777,6 +2783,7 @@
 	    call2 (function, make_number (c), elt);
   	}
     }
+  UNGCPRO;
 }
 
 static void void_call2 P_ ((Lisp_Object a, Lisp_Object b, Lisp_Object c));
--- a/src/keymap.c	Tue Oct 12 07:52:25 2004 +0000
+++ b/src/keymap.c	Thu Oct 14 14:42:03 2004 +0000
@@ -268,7 +268,8 @@
 
       /* Should we do an autoload?  Autoload forms for keymaps have
 	 Qkeymap as their fifth element.  */
-      if ((autoload || !error) && EQ (XCAR (tem), Qautoload))
+      if ((autoload || !error) && EQ (XCAR (tem), Qautoload)
+	  && SYMBOLP (object))
 	{
 	  Lisp_Object tail;
 
--- a/src/textprop.c	Tue Oct 12 07:52:25 2004 +0000
+++ b/src/textprop.c	Thu Oct 14 14:42:03 2004 +0000
@@ -1,5 +1,5 @@
 /* Interface code for dealing with text properties.
-   Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003
+   Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2004
    Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -2233,7 +2233,9 @@
 the character doesn't inherit PROPERTY if NONSTICKINESS is non-nil,
 inherits it if NONSTICKINESS is nil.  The front-sticky and
 rear-nonsticky properties of the character overrides NONSTICKINESS.  */);
-  Vtext_property_default_nonsticky = Qnil;
+  /* Text property `syntax-table' should be nonsticky by default.  */
+  Vtext_property_default_nonsticky
+    = Fcons (Fcons (intern ("syntax-table"), Qt), Qnil);
 
   staticpro (&interval_insert_behind_hooks);
   staticpro (&interval_insert_in_front_hooks);
--- a/src/xdisp.c	Tue Oct 12 07:52:25 2004 +0000
+++ b/src/xdisp.c	Thu Oct 14 14:42:03 2004 +0000
@@ -4893,7 +4893,8 @@
 			   && it->len == 1)
 			  || !CHAR_PRINTABLE_P (it->c))
 		       : (it->c >= 127
-			  && it->c == unibyte_char_to_multibyte (it->c))))
+			  && (!unibyte_display_via_language_environment
+			      || it->c == unibyte_char_to_multibyte (it->c)))))
 	    {
 	      /* IT->c is a control character which must be displayed
 		 either as '\003' or as `^C' where the '\\' and '^'
@@ -10402,6 +10403,9 @@
     }
   else
     redisplay_internal (1);
+
+  if (rif != NULL && rif->flush_display_optional)
+    rif->flush_display_optional (NULL);
 }
 
 
@@ -18694,8 +18698,10 @@
 
   if (STRINGP (it->object))
     position = make_number (IT_STRING_CHARPOS (*it));
-  else
+  else if (BUFFERP (it->object))
     position = make_number (IT_CHARPOS (*it));
+  else
+    return Qnil;
 
   val = Fget_char_property (position, prop, it->object);
 
--- a/src/xterm.c	Tue Oct 12 07:52:25 2004 +0000
+++ b/src/xterm.c	Thu Oct 14 14:42:03 2004 +0000
@@ -10788,7 +10788,7 @@
     x_update_window_end,
     x_cursor_to,
     x_flush,
-#ifndef XFlush
+#ifdef XFlush
     x_flush,
 #else
     0,  /* flush_display_optional */
--- a/src/xterm.h	Tue Oct 12 07:52:25 2004 +0000
+++ b/src/xterm.h	Thu Oct 14 14:42:03 2004 +0000
@@ -21,8 +21,8 @@
 
 #include <X11/Xlib.h>
 #include <X11/cursorfont.h>
+#include <X11/keysym.h>
 #include <X11/Xutil.h>
-#include <X11/keysym.h>
 #include <X11/Xatom.h>
 #include <X11/Xresource.h>