? patch.diff
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/tramp/ChangeLog,v
retrieving revision 1.44
diff -u -u -r1.44 ChangeLog
--- ChangeLog	2005/01/17 11:01:45	1.44
+++ ChangeLog	2005/03/20 20:10:41
@@ -1,3 +1,7 @@
+2005-03-20  Michael Albinus  <michael.albinus@gmx.de>
+
+	* Makefile (AUTHOR_VERSION): Bump to 2.0.48.
+
 2005-01-17  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.22 released.
@@ -40,8 +44,8 @@
 
 2003-11-25  Jeff Miller <jmiller@cablespeed.com>
 
-	* Makefile (MAKEINFO_FLAGS): 
-	Add -D xemacs so that XEmacs specific tramp syntax is used 
+	* Makefile (MAKEINFO_FLAGS):
+	Add -D xemacs so that XEmacs specific tramp syntax is used
 	in the info files, not the Emacs syntax.
 
 2003-07-21  Norbert Koch  <viteno@xemacs.org>
Index: ChangeLog.upstream
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/tramp/ChangeLog.upstream,v
retrieving revision 1.7
diff -u -u -r1.7 ChangeLog.upstream
--- ChangeLog.upstream	2005/01/16 13:46:49	1.7
+++ ChangeLog.upstream	2005/03/20 20:10:41
@@ -1,3 +1,27 @@
+2005-03-20  Michael Albinus  <michael.albinus@gmx.de>
+
+	Version 2.0.48 released.
+
+	* configure.ac: Bump version.
+
+	* Makefile.in (FTP_UPLOAD): Change upload address to
+	"ftp://ftp-upload.gnu.org/incoming/ftp".
+	(tar): Handle "$(TARNAME).tar.gz.directive".
+
+2005-02-09  Kim F. Storm  <storm@cua.dk>
+
+	Change release version from 21.4 to 22.1 throughout.
+
+2005-02-05  Michael Albinus  <michael.albinus@gmx.de>
+
+	* INSTALL: Change bug report address to [tramp-devel@gnu.org].
+
+2005-02-02  Michael Albinus  <michael.albinus@gmx.de>
+
+	* configure.ac: Bump version (to 2.0.48-pre).  Update merge
+	version to 2.0.47.  Change bug report address to
+	[tramp-devel@gnu.org].
+
 2005-01-16  Michael Albinus  <michael.albinus@gmx.de>
 
 	Version 2.0.47 released.
@@ -193,7 +217,7 @@
 	* INSTALL (Installation Names): Describe what to do in case of
 	errors and warnings.
 	(Load Path): Add XEmacs example.
-	
+
 2004-03-28  Michael Albinus  <Michael.Albinus@alcatel.de>
 
 	* configure.ac: Check existence of "install-info".  Taken from
@@ -219,7 +243,7 @@
 
 	* configure.ac: Apply `AC_CONTRIB_FILES' for all Lisp files of
 	contrib directory.
-	
+
 2004-03-05  Michael Albinus  <Michael.Albinus@alcatel.de>
 
 	* configure.ac: Write "${MAKE}" if appropriate (but "make").
@@ -274,8 +298,8 @@
 	* aclocal.m4 (AC_JA_MANUAL): New function.
 
 	* configure.ac: Move AC_EMACS_INSTALL.  Call AC_JA_MANUAL.
-	
-2003-10-01  Michael Albinus  <Michael.Albinus@alcatel.de>	
+
+2003-10-01  Michael Albinus  <Michael.Albinus@alcatel.de>
 
 	* aclocal.m4 (AC_PATH_INFODIR): Fix path to xemacs site-packages.
 	From Norbert Koch <viteno@xemacs.org>.
@@ -387,7 +411,7 @@
 	* aclocal.m4 (AC_EMACS_INSTALL): New macro.  Depending on
 	configure option `--with-packaging', Tramp installation chapter
 	will be part of the manual, or not.
-	
+
 	* configure.ac (top-level): Apply `AC_EMACS_INSTALL'.
 
 	* Makefile.in (xemacs, emacs): Call `./configure --with-packaging'
@@ -564,7 +588,7 @@
 	* Makefile (VERSION): Bump.
 
 2002-08-05  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
-	
+
 	Version 2.0.11 released.
 
 	* Makefile (xemacs): Adjust to new directory names after moving
@@ -626,13 +650,13 @@
 2002-07-19  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
 	Version 2.0.2 released.
-	
+
 	* Makefile (VERSION): New version 2.0.2.
 
 2002-06-25  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
 	Version 2.0.1 released.
-	
+
 	* Makefile (VERSION): New version 2.0.1.
 
 2002-06-19  Kai Großjohann  <grossjoh@ls6.informatik.uni-dortmund.de>
Index: Makefile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/tramp/Makefile,v
retrieving revision 1.44
diff -u -u -r1.44 Makefile
--- Makefile	2005/01/17 11:01:45	1.44
+++ Makefile	2005/03/20 20:10:41
@@ -18,7 +18,7 @@
 # Boston, MA 02111-1307, USA.
 
 VERSION = 1.22
-AUTHOR_VERSION = 2.0.47
+AUTHOR_VERSION = 2.0.48
 MAINTAINER = Kai Großjohann <kai.grossjohann@gmx.net>
 PACKAGE = tramp
 PKG_TYPE = regular
Index: lisp/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/tramp/lisp/ChangeLog,v
retrieving revision 1.23
diff -u -u -r1.23 ChangeLog
--- lisp/ChangeLog	2005/01/16 13:46:55	1.23
+++ lisp/ChangeLog	2005/03/20 20:10:44
@@ -1,3 +1,55 @@
+2005-03-20  Michael Albinus  <michael.albinus@gmx.de>
+
+	Version 2.0.48 released.
+
+2005-02-27  Michael Albinus  <michael.albinus@gmx.de>
+
+	* tramp.el (tramp-append-tramp-buffers): New defun.
+	(tramp-bug): Apply `tramp-append-tramp-buffers' as post-hook.
+	Catch `dont-send' signal.
+
+2005-02-20  Michael Albinus  <michael.albinus@gmx.de>
+
+	* tramp.el (tramp-set-auto-save-file-modes): Set always
+	permissions, because there might be an old auto-saved file
+	belonging to another original file.  This could be a security
+	threat.  Reported by Kjetil Kjernsmo <kjetil@kjernsmo.net>.
+
+	* tramp-smb.el (tramp-smb-open-connection): `executable-find'
+	doesn't exist in older Emacsen.  To be checked before applied.
+
+2005-02-16  Michael Albinus  <michael.albinus@gmx.de>
+
+	* tramp-smb.el (all): Remove debug construct for
+	`with-parsed-tramp-file-name'.
+	(tramp-smb-prompt): Prompt can contain spaces inside directory
+	names.
+	(tramp-smb-handle-delete-directory, tramp-smb-handle-delete-file):
+	No error message if DIRECTORY or FILENAME doesn't exist.
+	(tramp-smb-open-connection): Check existence of
+	`tramp-smb-program'.
+
+2005-02-12  Michael Albinus  <michael.albinus@gmx.de>
+
+	* tramp.el (tramp-file-name-for-operation) Use 'dired-call-process
+	but 'dired-call-process-command.  Still the same cut'n'waste
+	error.
+	(tramp-set-auto-save-file-modes) Check for Emacs 21.3.50 removed.
+
+2005-02-09  Kim F. Storm  <storm@cua.dk>
+
+	Change release version from 21.4 to 22.1 throughout.
+
+2005-02-05  Michael Albinus  <michael.albinus@gmx.de>
+
+	* tramp.el (all): Change all addresses to .gnu.org.
+
+2005-02-02  Michael Albinus  <michael.albinus@gmx.de>
+
+	* tramp.el (tramp-file-name-for-operation) Use 'shell-command but
+	'shell.  Cut'n'waste error.  Reported by Vincent Bernat
+	<bernat@free.fr>.
+
 2005-01-16  Michael Albinus  <michael.albinus@gmx.de>
 
 	Version 2.0.47 released.
@@ -16,7 +68,7 @@
 	(tramp-do-copy-or-rename-file-directly): Mask `cp -p' error.  Call
 	`set-file-modes' when appropriate.
 	(tramp-action-out-of-band): Mask `scp -p' error.
-	Reported by Isak Johnsson <isak@hypergene.com>
+	Reported by Isak Johnsson <isak@hypergene.com>.
 
 2005-01-09  Michael Albinus  <michael.albinus@gmx.de>
 
@@ -31,12 +83,12 @@
 
 	* tramp-util.el: Fix copyright years.  Adapt author address.
 	(tramp-minor-mode): Mode must toggle.
-	
+
 2005-01-04  Michael Albinus  <michael.albinus@gmx.de>
 
 	* tramp-util.el (tramp-compile, tramp-recompile): Enable
 	`tramp-minor-mode' in buffer "*Compilation*".
-	
+
 2004-12-29  Michael Albinus  <michael.albinus@gmx.de>
 
 	* tramp-util.el (tramp-minor-mode): New minor mode.  Add it to
@@ -53,7 +105,7 @@
 
 	* tramp.el (tramp-get-buffer, tramp-get-debug-buffer): Discard the
 	undo list of both Tramp buffer and debug buffer.  Reported by
-	Joakim Verona <joakim@verona.se>
+	Joakim Verona <joakim@verona.se>.
 
 2004-12-23  Michael Albinus  <michael.albinus@gmx.de>
 
@@ -95,7 +147,7 @@
 2004-11-26  Lars Hansen  <larsh@math.ku.dk>
 
 	Sync with Emacs CVS (Michael Albinus <michael.albinus@gmx.de>).
-	
+
 	* tramp.el (tramp-handle-directory-files-and-attributes): New function.
 	(tramp-perl-directory-files-and-attributes): New constant.
 	(tramp-file-name-handler-alist): Delete file-directory-files, add
@@ -175,12 +227,12 @@
 
 	* tramp.el (tramp-perl-decode): Fixed an error in Perl
 	implementation.  $pending must be cleared every loop.  Reported by
-	Benjamin Place <benjaminplace@sprintmail.com>
+	Benjamin Place <benjaminplace@sprintmail.com>.
 
 2004-08-10  Michael Albinus  <michael.albinus@gmx.de>
 
 	Version 2.0.44 released.
-	
+
 2004-08-06  Michael Albinus  <michael.albinus@gmx.de>
 
 	* tramp.el (tramp-post-connection): Quote $1 and $2 of shell
@@ -391,7 +443,7 @@
 
 	* tramp-smb.el (toplevel): Suppress byte-compiler warnings.
 	Define `last-coding-system-used' in XEmacs case.
-	
+
 	* tramp-vc.el (toplevel): Suppress byte-compiler warnings.
 	(tramp-vc-do-command-new): Pacify funcall of `vc-setup-buffer' and
 	`vc-exec-after'.
@@ -470,12 +522,12 @@
 	(all): Depends on $(CONTRIB_FILES), too.
 	(install): Copy $(INSTALL_FILES) but $?.
 	(distclean): Remove also $(CONTRIB_FILES).
-	
+
 2004-03-13  Kai Grossjohann  <kgrossjo@eu.uu.net>
 
 	* tramp.el (tramp-do-copy-or-rename-file-via-buffer): Renamed
 	from tramp-do-copy-or-rename-via-buffer (without `file'), to make
-	it consistent with the other tramp-do-* functions.  
+	it consistent with the other tramp-do-* functions.
 	(tramp-do-copy-or-rename-file): Calls adjusted.
 
 2004-03-08  Michael Albinus  <Michael.Albinus@alcatel.de>
@@ -663,7 +715,7 @@
 	* tramp-smb.el (top): Setting default value in
 	`tramp-default-method-alist' corrected.  Order of USER and HOST
 	have been wrong.  Nobody claimed for months ...
-	
+
 2003-12-25  Michael Albinus  <Michael.Albinus@alcatel.de>
 
 	* tramp.el (tramp-completion-mode) Don't check for 'xemacs but
@@ -747,7 +799,7 @@
 	`file-attributes' has a second parameter.  If yes, apply it with
 	value "'integer".  Otherwise, don't use that parameter (default
 	is integer format).
-	
+
 2003-11-02  Michael Albinus  <Michael.Albinus@alcatel.de>
 
 	* tramp-ftp.el, tramp.el: Add new Todo item.
@@ -869,8 +921,8 @@
 	* tramp.el (tramp-shell-prompt-pattern): Allow multiple escape
 	sequences.
 
-	* tramp-uu.el: 
-	* tramp-util.el: 
+	* tramp-uu.el:
+	* tramp-util.el:
 	* tramp-efs.el: Use iso-2022-7bit encoding with coding cookie for
 	XEmacs compatibility.
 
@@ -1019,7 +1071,7 @@
 	(tramp-wait-for-shell-prompt, tramp-barf-if-no-shell-prompt): New
 	functions, used by tramp-send-command-internal.
 	(tramp-open-connection-setup-interactive-shell): Simplify using
-	`tramp-send-command-internal'. 
+	`tramp-send-command-internal'.
 	(tramp-send-command-internal): New function.
 
 2003-04-14  Michael Albinus  <Michael.Albinus@alcatel.de>
@@ -1149,7 +1201,7 @@
 	* tramp.el (tramp-do-copy-or-rename-file-one-local): New
 	function.  Not implemented.  Not used.  Should invoke rcp or scp
 	directly to keep the time.
-	
+
 2003-02-09  Michael Albinus  <Michael.Albinus@alcatel.de>
 
 	* tramp.el (tramp-chunksize): It's now a defcustom.  Set to 500 on
@@ -1355,7 +1407,7 @@
 
 2002-12-05  Kai Großjohann  <kai.grossjohann@uni-duisburg.de>
 
-	* tramp.el (tramp-run-real-handler) 
+	* tramp.el (tramp-run-real-handler)
 	(tramp-completion-run-real-handler): Disable cygwin-mount, too.
 	All files handled by Tramp are on Unix systems, where
 	cygwin-mount is not useful.  (Ie, remote Cygwin systems are not
@@ -1510,8 +1562,8 @@
 	(tramp-smb-check-shares): Removed.  Functionality moved to
 	`tramp-smb-open-connection' and `tramp-smb-get-file-entries',
 	respectively.
-	
 
+
 2002-11-10  Michael Albinus  <Michael.Albinus@alcatel.de>
 
 	* tramp.el (tramp-handle-file-name-completion): Use Emacs file
@@ -1559,7 +1611,7 @@
 	(tramp-smb-handle-insert-directory): Mode string adapted.
 	(tramp-smb-read-file-entry): Block introduced for better return
 	handling.  Return list values changed.  Callers	adapted.
-	
+
 
 2002-11-04  Michael Albinus  <Michael.Albinus@alcatel.de>
 
@@ -1574,7 +1626,7 @@
 	smbclient output lines by a single regexp.
 	(tramp-smb-send-command): Parameters of commands enclosed in
 	\"...\".
-	
+
 2002-11-03  Michael Albinus  <Michael.Albinus@alcatel.de>
 
 	* tramp.el (tramp-handle-insert-file-contents): Use Emacs file
@@ -1692,7 +1744,7 @@
 	`apply'.
 
 	* tramp-ftp.el (top-level): Require `tramp'.
-	
+
 
 2002-10-11  Michael Albinus  <Michael.Albinus@alcatel.de>
 
@@ -1863,11 +1915,11 @@
 	* tramp.el (tramp-handle-file-newer-than-file-p): If mtime of
 	both files is known, return a useful result.  Better error
 	message in case one is a Tramp file and one isn't.
-	(tramp-handle-file-local-copy, tramp-handle-write-region) 
-	(tramp-find-shell, tramp-open-connection-telnet) 
-	(tramp-open-connection-rsh, tramp-open-connection-su) 
-	(tramp-open-connection-setup-interactive-shell) 
-	(tramp-post-connection, tramp-maybe-open-connection) 
+	(tramp-handle-file-local-copy, tramp-handle-write-region)
+	(tramp-find-shell, tramp-open-connection-telnet)
+	(tramp-open-connection-rsh, tramp-open-connection-su)
+	(tramp-open-connection-setup-interactive-shell)
+	(tramp-post-connection, tramp-maybe-open-connection)
 	(tramp-method-out-of-band-p): Correct number of args for
 	`tramp-get-rsh-program' and similar functions.
 
@@ -1999,13 +2051,13 @@
 	host.
 	(tramp-call-local-coding-command): New function for calling local
 	encoding and decoding commands.
-	(tramp-set-remote-encoding, tramp-get-remote-encoding) 
-	(tramp-set-remote-decoding, tramp-get-remote-decoding) 
-	(tramp-set-local-encoding, tramp-get-local-encoding) 
+	(tramp-set-remote-encoding, tramp-get-remote-encoding)
+	(tramp-set-remote-decoding, tramp-get-remote-decoding)
+	(tramp-set-local-encoding, tramp-get-local-encoding)
 	(tramp-set-local-decoding, tramp-get-local-decoding): New functions.
-	(tramp-get-encoding-command, tramp-set-encoding-command) 
-	(tramp-get-decoding-command, tramp-set-decoding-command) 
-	(tramp-get-encoding-function, tramp-set-encoding-function) 
+	(tramp-get-encoding-command, tramp-set-encoding-command)
+	(tramp-get-decoding-command, tramp-set-decoding-command)
+	(tramp-get-encoding-function, tramp-set-encoding-function)
 	(tramp-get-decoding-function, tramp-set-decoding-function): Old
 	functions, removed.
 
@@ -2074,7 +2126,7 @@
 	(tramp-parse-passwd): Added exception handling for "root", because
 	`tramp-get-completion-su' (the previous place for this stuff)
 	doesn't exist any longer.
-	
+
 2002-09-07  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
 	* tramp.el (tramp-enter-password): Use
@@ -2089,7 +2141,7 @@
 
 2002-09-06  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
-	* tramp.el (tramp-handle-file-local-copy, tramp-find-shell) 
+	* tramp.el (tramp-handle-file-local-copy, tramp-find-shell)
 	(tramp-open-connection-setup-interactive-shell): Add some
 	comments about Douglas Grey Stephen's suggestions to make Tramp
 	work better with plink under Windows.  I'm not sure what to think
@@ -2196,7 +2248,7 @@
 	(tramp-get-completion-user-host): New function.
 	(tramp-get-completion-rsh)
 	(tramp-get-completion-ssh): Apply it.
-	
+
 2002-08-29  Michael Albinus  <Michael.Albinus@alcatel.de>
 
 	* tramp.el (tramp-completion-file-name-handler-alist): Add handler
@@ -2293,7 +2345,7 @@
 	to `inhibit-file-name-handlers'.
 	(tramp-completion-handle-file-name-all-completions)
 	(tramp-completion-handle-file-name-completion): New functions.
-	
+
 2002-08-12  Michael Albinus  <Michael.Albinus@alcatel.de>
 
 	* tramp.el (tramp-invoke-ange-ftp): `tramp-disable-ange-ftp' must
@@ -2356,7 +2408,7 @@
 
 2002-08-29  Michael Albinus  <Michael.Albinus@alcatel.de>
 
-	* tramp.el (tramp-invoke-ange-ftp): 
+	* tramp.el (tramp-invoke-ange-ftp):
 	(tramp-ange-ftp-file-name-p): Check for Xemacs.
 	(tramp-do-copy-or-rename-file): Don't pass KEEP-DATE to
 	tramp-invoke-ange-ftp 'rename.
@@ -2370,7 +2422,7 @@
 2002-08-22  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
 	* tramp.el (tramp-open-connection-su): Use user name "root" if no
-	user name is given. 
+	user name is given.
 
 2002-08-22  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
@@ -2433,7 +2485,7 @@
 2002-08-05  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
 	Version 2.0.11 released.
-	
+
 	* tramp.el (tramp-invoke-ange-ftp): Avoid infloop by Ange-FTP
 	calling Tramp again: use tramp-run-real-handler to invoke
 	Ange-FTP.
@@ -2446,7 +2498,7 @@
 2002-08-04  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
 	Version 2.0.10 released.
-	
+
 	* tramp.el (tramp-perl-encode-with-module,
 	tramp-perl-decode-with-module)
 	(tramp-perl-encode, tramp-perl-decode): Doc fix.  From Andreas
@@ -2496,7 +2548,7 @@
 	(tramp-default-method): Change to "ssh".
 	(tramp-perl-encode, tramp-perl-decode): New (faster) versions.
 	From Juanma Barranquero <lektu@terra.es>.
-	(tramp-perl-encode-with-module, tramp-perl-decode-with-module) 
+	(tramp-perl-encode-with-module, tramp-perl-decode-with-module)
 	(tramp-perl-encode, tramp-perl-encode): Strings are passwd
 	through `format', so double all percent characters and document.
 
@@ -2525,7 +2577,7 @@
 2002-07-30  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
 	* tramp.el (tramp-handle-file-attributes): Restructure logic.
-	(tramp-handle-file-attributes-with-ls) 
+	(tramp-handle-file-attributes-with-ls)
 	(tramp-handle-file-attributes-with-perl): Debugging output.
 	(tramp-coding-commands): Provide base64 encoding with recode.
 
@@ -2621,9 +2673,9 @@
 2002-07-23  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
 	Release 2.0.3.
-	
-	* tramp.el (tramp-open-connection-su, tramp-multi-connect-telnet) 
-	(tramp-multi-connect-rlogin, tramp-multi-connect-su) 
+
+	* tramp.el (tramp-open-connection-su, tramp-multi-connect-telnet)
+	(tramp-multi-connect-rlogin, tramp-multi-connect-su)
 	(tramp-make-tramp-file-name, tramp-make-tramp-multi-file-name):
 	Correct alist for `format-spec', use (a . b) instead of (a b).
 	(tramp-handle-directory-files): Handle fifth, XEmacs-specific,
@@ -2655,13 +2707,13 @@
 
 	* tramp.el: Revert my previous patch.  It's better to work around
 	the colour prompt problem outside of Tramp, eg in ~/.bashrc or
-	similar. 
+	similar.
 
 2002-07-19  Steve Youngs  <youngs@xemacs.org>
 
 	* tramp.el (tramp-find-shell): Remove "\\'" from regexp so we can
 	deal with shell prompts that have colour control characters in
-	them. 
+	them.
 	(tramp-open-connection-telnet): Ditto.
 	(tramp-open-connection-rsh): Ditto.
 	(tramp-open-connection-su): Ditto.
@@ -2675,8 +2727,8 @@
 
 	* tramp.el (tramp-multi-file-name-structure-separate): Typo, it's
 	name was set to 'tramp-file-name-structure-separate'.
-	
 
+
 2002-07-18  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
 	* tramp.el (tramp-methods): Rename methods invoking "ssh1" or
@@ -2690,7 +2742,7 @@
 	adjust this regexp accordingly.
 	(tramp-file-name-structure-separate): Bug fix.
 	(tramp-multi-file-name-hop-structure-unified): Move colon from
-	beginning to end.  
+	beginning to end.
 
 2002-07-11  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
@@ -2734,7 +2786,7 @@
 	On Emacs, use the *-unified variants, on XEmacs, use the
 	*-separate variants.  Tramp and Ange-FTP share a common filename
 	syntax on Emacs, but Tramp and EFS use separate filename syntaxes
-	on XEmacs.	
+	on XEmacs.
 	(tramp-handle-ange-ftp): Removed.
 	(tramp-disable-ange-ftp): New function to disable Ange-FTP if
 	enabled.  Unconditionally call it at top level when file is
@@ -2767,17 +2819,17 @@
 
 2002-06-26  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
-	* tramp.el (tramp-file-name-structure, tramp-file-name-regexp) 
-	(tramp-make-tramp-file-format) 
-	(tramp-make-tramp-file-user-nil-format) 
-	(tramp-multi-file-name-structure) 
-	(tramp-multi-file-name-hop-structure) 
+	* tramp.el (tramp-file-name-structure, tramp-file-name-regexp)
+	(tramp-make-tramp-file-format)
+	(tramp-make-tramp-file-user-nil-format)
+	(tramp-multi-file-name-structure)
+	(tramp-multi-file-name-hop-structure)
 	(tramp-make-multi-tramp-file-format): Change to an Ange-FTP-like
 	filename syntax.
 	(tramp-handle-ange-ftp, toplevel): Remove Ange-FTP from filename
 	handler alist if tramp-handle-ange-ftp is non-nil.
-	(tramp-handle-delete-file) 
-	(tramp-handle-verify-visited-file-modtime) 
+	(tramp-handle-delete-file)
+	(tramp-handle-verify-visited-file-modtime)
 	(tramp-handle-make-symbolic-link): Fix typos.
 	(tramp-wait-for-regexp, tramp-wait-for-output): Convert int to
 	string before passing it to `insert'.
@@ -2788,7 +2840,7 @@
 	argument to specify a port number.
 
 	Version 2.0.1 released.
-	
+
 	* lisp/tramp.el (tramp-version): New version 2.0.1.
 
 2002-06-24  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
@@ -2802,11 +2854,11 @@
 	* tramp.el (tramp-ftp-method): New user option.
 	(with-parsed-tramp-file-name): New macro for the usual big `let'
 	statement to dissect a file-name.
-	(tramp-handle-make-symbolic-link, tramp-handle-load) 
-	(tramp-handle-file-name-directory) 
-	(tramp-handle-file-name-nondirectory, tramp-handle-file-truename) 
-	(tramp-handle-file-truename, tramp-handle-file-directory-p) 
-	(tramp-handle-file-regular-p, tramp-handle-file-symlink-p) 
+	(tramp-handle-make-symbolic-link, tramp-handle-load)
+	(tramp-handle-file-name-directory)
+	(tramp-handle-file-name-nondirectory, tramp-handle-file-truename)
+	(tramp-handle-file-truename, tramp-handle-file-directory-p)
+	(tramp-handle-file-regular-p, tramp-handle-file-symlink-p)
 	(tramp-handle-file-writable-p, tramp-handle-file-writable-p): Use
 	the new macro and forward call to Ange-FTP if applicable.
 	(tramp-make-ange-ftp-file-name): New helper function to convert a
@@ -2842,7 +2894,7 @@
 2002-06-10  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
 	* tramp.el (tramp-methods): New method "fcp".  Suggested by
-	graydon@redhat.com. 
+	graydon@redhat.com.
 
 2002-06-04  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
@@ -2853,12 +2905,12 @@
 
 2002-05-22  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
-	* tramp.el (tramp-find-shell, tramp-open-connection-telnet) 
-	(tramp-open-connection-rsh, tramp-open-connection-su) 
-	(tramp-open-connection-multi, tramp-multi-connect-telnet) 
-	(tramp-multi-connect-rlogin) 
+	* tramp.el (tramp-find-shell, tramp-open-connection-telnet)
+	(tramp-open-connection-rsh, tramp-open-connection-su)
+	(tramp-open-connection-multi, tramp-multi-connect-telnet)
+	(tramp-multi-connect-rlogin)
 	(tramp-open-connection-setup-interactive-shell): Shell prompt
-	must match at end of buffer.	
+	must match at end of buffer.
 
 2002-05-21  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
@@ -2951,7 +3003,7 @@
 	brought to the surface.
 	Add a "." after directory name so that symlinked directories
 	display properly on platforms that have breakage on symlinks like
-	Solaris. 
+	Solaris.
 
 2002-02-08  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
@@ -3036,7 +3088,7 @@
 	Skip Montanaro <skip@pobox.com>.
 	Also swap preference order of `itimer-time-difference' and
 	`subtract-time': prefer the latter.
-	
+
 2002-01-10  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
 	* tramp.el (tramp-handle-expand-file-name): Bind
@@ -3149,7 +3201,7 @@
 	file-attributes, for tramp-buffer-file-attributes.
 	(tramp-handle-verify-visited-file-modtime): Use output of "ls
 	-ild", not return value of file-attributes, for
-	tramp-buffer-file-attributes. 
+	tramp-buffer-file-attributes.
 	(tramp-handle-insert-file-contents): Call set-visited-file-modtime
 	without args.
 	(tramp-handle-insert-file-contents): Ditto.
@@ -3400,7 +3452,7 @@
 	(tramp-get-rcp-args): Typo in error message.  This should be
 	`didn't specify rcp args' rather than `didn't specify tramp
 	args'...  A relic of the Great Renaming from RCP to Tramp, no
-	doubt. 
+	doubt.
 
 2001-03-03  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
@@ -3417,7 +3469,7 @@
 2001-02-28  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
 	* tramp.el (tramp-open-connection-rsh): Doc bug.  Reported by Tom
-	Roche. 
+	Roche.
 
 2001-02-25  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
@@ -3429,7 +3481,7 @@
 	* tramp.el:  Patch by Francesco Potortì, slightly modified.
 	(tramp-discard-garbage): New variable.  When non-nil,
 	expect that remote shell sends some garbage on startup, and delete
-	it. 
+	it.
 	(tramp-discard-garbage-erase-buffer): New function.
 	(tramp-open-connection-setup-interactive-shell): Use it.
 	(tramp-methods): New method for Kerberos and mimencode.
@@ -3561,7 +3613,7 @@
 2000-10-20  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
 	* tramp.el (tramp-open-connection-telnet): Missed occurrences of
-	match-string. 
+	match-string.
 	(tramp-open-connection-rsh): Dito.
 	(tramp-open-connection-su): Dito.
 	(tramp-multi-connect-telnet): Dito.
@@ -3668,13 +3720,13 @@
 
 2000-08-25  Yuji Yamano <yyamano@kt.rim.or.jp>
 
-	* tramp.el (tramp-perl-file-attributes): Use 0170000 as the right 
+	* tramp.el (tramp-perl-file-attributes): Use 0170000 as the right
 	value of Bitwise And instead of 0120000 and 040000. It works fine
 	with block devices and sockets now.
 
 2000-08-25  Yuji Yamano <yyamano@kt.rim.or.jp>
 
-	* tramp.el (tramp-remote-path): Add "/usr/pkg/bin" to 
+	* tramp.el (tramp-remote-path): Add "/usr/pkg/bin" to
 	tramp-remote-path for the NetBSD packages.
 
 2000-08-19  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
Index: lisp/tramp-smb.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/tramp/lisp/tramp-smb.el,v
retrieving revision 1.5
diff -u -u -r1.5 tramp-smb.el
--- lisp/tramp-smb.el	2004/12/24 00:24:05	1.5
+++ lisp/tramp-smb.el	2005/03/20 20:10:44
@@ -1,8 +1,8 @@
 ;;; tramp-smb.el --- Tramp access functions for SMB servers -*- coding: iso-8859-1; -*-
 
-;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
-;; Author: Michael Albinus <Michael.Albinus@alcatel.de>
+;; Author: Michael Albinus <michael.albinus@gmx.de>
 ;; Keywords: comm, processes
 
 ;; This file is part of GNU Emacs.
@@ -75,7 +75,7 @@
   :group 'tramp
   :type 'string)
 
-(defconst tramp-smb-prompt "^smb: \\S-+> \\|^\\s-+Server\\s-+Comment$"
+(defconst tramp-smb-prompt "^smb: .+> \\|^\\s-+Server\\s-+Comment$"
   "Regexp used as prompt in smbclient.")
 
 (defconst tramp-smb-errors
@@ -235,10 +235,7 @@
 		 (file-exists-p newname))
 	(error "copy-file: file %s already exists" newname))
 
-;      (with-parsed-tramp-file-name newname nil
-      (let (user host localname)
-	(with-parsed-tramp-file-name newname l
-	  (setq user l-user host l-host localname l-localname))
+      (with-parsed-tramp-file-name newname nil
 	(save-excursion
 	  (let ((share (tramp-smb-get-share localname))
 		(file (tramp-smb-get-localname localname t)))
@@ -258,59 +255,46 @@
 (defun tramp-smb-handle-delete-directory (directory)
   "Like `delete-directory' for tramp files."
   (setq directory (directory-file-name (expand-file-name directory)))
-  (unless (file-exists-p directory)
-    (error "Cannot delete non-existing directory `%s'" directory))
-;  (with-parsed-tramp-file-name directory nil
-  (let (user host localname)
-    (with-parsed-tramp-file-name directory l
-      (setq user l-user host l-host localname l-localname))
-    (save-excursion
-      (let ((share (tramp-smb-get-share localname))
-	    (dir (tramp-smb-get-localname (file-name-directory localname) t))
-	    (file (file-name-nondirectory localname)))
-	(tramp-smb-maybe-open-connection user host share)
-	(if (and
-	     (tramp-smb-send-command user host (format "cd \"%s\"" dir))
-	     (tramp-smb-send-command user host (format "rmdir \"%s\"" file)))
-	    ;; Go Home
+  (when (file-exists-p directory)
+    (with-parsed-tramp-file-name directory nil
+      (save-excursion
+	(let ((share (tramp-smb-get-share localname))
+	      (dir (tramp-smb-get-localname (file-name-directory localname) t))
+	      (file (file-name-nondirectory localname)))
+	  (tramp-smb-maybe-open-connection user host share)
+	  (if (and
+	       (tramp-smb-send-command user host (format "cd \"%s\"" dir))
+	       (tramp-smb-send-command user host (format "rmdir \"%s\"" file)))
+	      ;; Go Home
+	      (tramp-smb-send-command user host (format "cd \\"))
+	    ;; Error
 	    (tramp-smb-send-command user host (format "cd \\"))
-	  ;; Error
-	  (tramp-smb-send-command user host (format "cd \\"))
-	  (error "Cannot delete directory `%s'" directory))))))
+	    (error "Cannot delete directory `%s'" directory)))))))
 
 (defun tramp-smb-handle-delete-file (filename)
   "Like `delete-file' for tramp files."
   (setq filename (expand-file-name filename))
-  (unless (file-exists-p filename)
-    (error "Cannot delete non-existing file `%s'" filename))
-;  (with-parsed-tramp-file-name filename nil
-  (let (user host localname)
-    (with-parsed-tramp-file-name filename l
-      (setq user l-user host l-host localname l-localname))
-    (save-excursion
-      (let ((share (tramp-smb-get-share localname))
-	    (dir (tramp-smb-get-localname (file-name-directory localname) t))
-	    (file (file-name-nondirectory localname)))
-	(unless (file-exists-p filename)
-	  (error "Cannot delete non-existing file `%s'" filename))
-	(tramp-smb-maybe-open-connection user host share)
-	(if (and
-	     (tramp-smb-send-command user host (format "cd \"%s\"" dir))
-	     (tramp-smb-send-command user host (format "rm \"%s\"" file)))
-	    ;; Go Home
+  (when (file-exists-p filename)
+    (with-parsed-tramp-file-name filename nil
+      (save-excursion
+	(let ((share (tramp-smb-get-share localname))
+	      (dir (tramp-smb-get-localname (file-name-directory localname) t))
+	      (file (file-name-nondirectory localname)))
+	  (tramp-smb-maybe-open-connection user host share)
+	  (if (and
+	       (tramp-smb-send-command user host (format "cd \"%s\"" dir))
+	       (tramp-smb-send-command user host (format "rm \"%s\"" file)))
+	      ;; Go Home
+	      (tramp-smb-send-command user host (format "cd \\"))
+	    ;; Error
 	    (tramp-smb-send-command user host (format "cd \\"))
-	  ;; Error
-	  (tramp-smb-send-command user host (format "cd \\"))
-	  (error "Cannot delete file `%s'" filename))))))
+	    (error "Cannot delete file `%s'" filename)))))))
 
 (defun tramp-smb-handle-directory-files
   (directory &optional full match nosort)
   "Like `directory-files' for tramp files."
   (setq directory (directory-file-name (expand-file-name directory)))
-;  (with-parsed-tramp-file-name directory nil
-  (let (user host localname)
-    (with-parsed-tramp-file-name directory l
-      (setq user l-user host l-host localname l-localname))
+  (with-parsed-tramp-file-name directory nil
     (save-excursion
       (let* ((share (tramp-smb-get-share localname))
 	     (file (tramp-smb-get-localname localname nil))
@@ -340,17 +324,14 @@
   (mapcar
    (lambda (x)
      ;; We cannot call `file-attributes' for backward compatibility reasons.
-     ;; Its optional parameter ID-FORMAT is introduced with Emacs 21.4.
+     ;; Its optional parameter ID-FORMAT is introduced with Emacs 22.
      (cons x (tramp-smb-handle-file-attributes
 	(if full x (concat (file-name-as-directory directory) x)) id-format)))
    (directory-files directory full match nosort)))
- 
+
 (defun tramp-smb-handle-file-attributes (filename &optional id-format)
   "Like `file-attributes' for tramp files."
-;  (with-parsed-tramp-file-name filename nil
-  (let (user host localname)
-    (with-parsed-tramp-file-name filename l
-      (setq user l-user host l-host localname l-localname))
+  (with-parsed-tramp-file-name filename nil
     (save-excursion
       (let* ((share (tramp-smb-get-share localname))
 	     (file (tramp-smb-get-localname localname nil))
@@ -380,10 +361,7 @@
 
 (defun tramp-smb-handle-file-directory-p (filename)
   "Like `file-directory-p' for tramp files."
-;  (with-parsed-tramp-file-name filename nil
-  (let 	(user host localname)
-    (with-parsed-tramp-file-name filename l
-      (setq user l-user host l-host localname l-localname))
+  (with-parsed-tramp-file-name filename nil
     (save-excursion
       (let* ((share (tramp-smb-get-share localname))
 	     (file (tramp-smb-get-localname localname nil))
@@ -396,10 +374,7 @@
 
 (defun tramp-smb-handle-file-exists-p (filename)
   "Like `file-exists-p' for tramp files."
-;  (with-parsed-tramp-file-name filename nil
-  (let 	(user host localname)
-    (with-parsed-tramp-file-name filename l
-      (setq user l-user host l-host localname l-localname))
+  (with-parsed-tramp-file-name filename nil
     (save-excursion
       (let* ((share (tramp-smb-get-share localname))
 	     (file (tramp-smb-get-localname localname nil))
@@ -433,10 +408,7 @@
 ;; files.
 (defun tramp-smb-handle-file-name-all-completions (filename directory)
   "Like `file-name-all-completions' for tramp files."
-;  (with-parsed-tramp-file-name directory nil
-  (let (user host localname)
-    (with-parsed-tramp-file-name directory l
-      (setq user l-user host l-host localname l-localname))
+  (with-parsed-tramp-file-name directory nil
     (save-match-data
       (save-excursion
 	(let* ((share (tramp-smb-get-share localname))
@@ -467,10 +439,7 @@
       (let ((dir (file-name-directory filename)))
 	(and (file-exists-p dir)
 	     (file-writable-p dir)))
-;    (with-parsed-tramp-file-name filename nil
-    (let (user host localname)
-      (with-parsed-tramp-file-name filename l
-	(setq user l-user host l-host localname l-localname))
+    (with-parsed-tramp-file-name filename nil
       (save-excursion
 	(let* ((share (tramp-smb-get-share localname))
 	       (file (tramp-smb-get-localname localname nil))
@@ -490,17 +459,14 @@
     ;; This check is a little bit strange, but in `dired-add-entry'
     ;; this function is called with a non-directory ...
     (setq filename (file-name-as-directory filename)))
-;  (with-parsed-tramp-file-name filename nil
-  (let 	(user host localname)
-    (with-parsed-tramp-file-name filename l
-      (setq user l-user host l-host localname l-localname))
+  (with-parsed-tramp-file-name filename nil
     (save-match-data
       (let* ((share (tramp-smb-get-share localname))
 	     (file (tramp-smb-get-localname localname nil))
 	     (entries (tramp-smb-get-file-entries user host share file)))
 
 	;; Delete dummy "" entry, useless entries
-	(setq entries 
+	(setq entries
 	      (if (file-directory-p filename)
 		  (delq (assoc "" entries) entries)
 		;; We just need the only and only entry FILENAME.
@@ -543,10 +509,7 @@
   (setq dir (directory-file-name (expand-file-name dir)))
   (unless (file-name-absolute-p dir)
     (setq dir (concat default-directory dir)))
-;  (with-parsed-tramp-file-name dir nil
-  (let 	(user host localname)
-    (with-parsed-tramp-file-name dir l
-      (setq user l-user host l-host localname l-localname))
+  (with-parsed-tramp-file-name dir nil
     (save-match-data
       (let* ((share (tramp-smb-get-share localname))
 	     (ldir (file-name-directory dir)))
@@ -564,10 +527,7 @@
   (setq directory (directory-file-name (expand-file-name directory)))
   (unless (file-name-absolute-p directory)
     (setq directory (concat default-directory directory)))
-;  (with-parsed-tramp-file-name directory nil
-  (let 	(user host localname)
-    (with-parsed-tramp-file-name directory l
-      (setq user l-user host l-host localname l-localname))
+  (with-parsed-tramp-file-name directory nil
     (save-match-data
       (let* ((share (tramp-smb-get-share localname))
 	     (file (tramp-smb-get-localname localname nil)))
@@ -597,10 +557,7 @@
 		 (file-exists-p newname))
 	  (error "rename-file: file %s already exists" newname))
 
-;      (with-parsed-tramp-file-name newname nil
-      (let (user host localname)
-	(with-parsed-tramp-file-name newname l
-	  (setq user l-user host l-host localname l-localname))
+      (with-parsed-tramp-file-name newname nil
 	(save-excursion
 	  (let ((share (tramp-smb-get-share localname))
 		(file (tramp-smb-get-localname localname t)))
@@ -636,10 +593,7 @@
     (unless (y-or-n-p (format "File %s exists; overwrite anyway? "
                               filename))
       (error "File not overwritten")))
-;  (with-parsed-tramp-file-name filename nil
-  (let (user host localname)
-    (with-parsed-tramp-file-name filename l
-      (setq user l-user host l-host localname l-localname))
+  (with-parsed-tramp-file-name filename nil
     (save-excursion
       (let ((share (tramp-smb-get-share localname))
 	    (file (tramp-smb-get-localname localname t))
@@ -968,6 +922,10 @@
 then sends the password to the remote host.
 
 Domain names in USER and port numbers in HOST are acknowledged."
+
+  (when (and (fboundp 'executable-find)
+	     (not (funcall 'executable-find tramp-smb-program)))
+    (error "Cannot find command %s in %s" tramp-smb-program exec-path))
 
   (save-match-data
     (let* ((buffer (tramp-get-buffer nil tramp-smb-method user host))
Index: lisp/tramp-util.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/tramp/lisp/tramp-util.el,v
retrieving revision 1.6
diff -u -u -r1.6 tramp-util.el
--- lisp/tramp-util.el	2005/01/16 13:46:55	1.6
+++ lisp/tramp-util.el	2005/03/20 20:10:44
@@ -34,7 +34,7 @@
 
 ;; Define a Tramp minor mode. It's intention is to redefine some keys for Tramp
 ;; specific functions, like compilation.
-;; The key remapping works since Emacs 21.4 only. Unknown for XEmacs.
+;; The key remapping works since Emacs 22 only. Unknown for XEmacs.
 
 (when (fboundp 'define-minor-mode)
 
@@ -59,10 +59,10 @@
 bindings.  Otherwise, only bindings active during invocation are taken
 into account.  XEmacs menubar bindings are not changed by this."
     (if (functionp 'command-remapping)
-	;; Emacs 21.4
+	;; Emacs 22
 	(eval
 	 `(define-key tramp-minor-mode-map [remap ,old-command] new-command))
-      ;; previous Emacs 21 versions.
+      ;; previous Emacs versions.
       (mapcar
        '(lambda (x)
 	  (define-key tramp-minor-mode-map x new-command))
Index: lisp/tramp-vc.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/tramp/lisp/tramp-vc.el,v
retrieving revision 1.13
diff -u -u -r1.13 tramp-vc.el
--- lisp/tramp-vc.el	2004/12/24 00:24:06	1.13
+++ lisp/tramp-vc.el	2005/03/20 20:10:44
@@ -1,6 +1,6 @@
 ;;; tramp-vc.el --- Version control integration for TRAMP.el
 
-;; Copyright (C) 2000, 2001, 2002, 2003, 2004 by Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 by Free Software Foundation, Inc.
 
 ;; Author: Daniel Pittman <daniel@danann.net>
 ;; Keywords: comm, processes
@@ -51,7 +51,7 @@
 ;; This used to blow away the file-name-handler-alist and reinstall
 ;; TRAMP into it. This was intended to let VC work remotely. It didn't,
 ;; at least not in my XEmacs 21.2 install.
-;; 
+;;
 ;; In any case, tramp-run-real-handler now deals correctly with disabling
 ;; the things that should be, making this a no-op.
 ;;
@@ -96,7 +96,7 @@
 	(set (make-local-variable 'vc-parent-buffer-name)
 	     (concat " from " (buffer-name camefrom)))
 	(setq default-directory olddir)
-    
+
 	(erase-buffer)
 
 	(mapcar
@@ -230,7 +230,7 @@
         (if (or (and (stringp file)     (tramp-tramp-file-p file))
                 (and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name))))
             (setq ad-return-value
-                  (apply 'tramp-vc-do-command-new buffer okstatus command 
+                  (apply 'tramp-vc-do-command-new buffer okstatus command
                          file ;(or file (buffer-file-name))
                          flags))
           ad-do-it)))
@@ -243,7 +243,7 @@
       (if (or (and (stringp file)     (tramp-tramp-file-p file))
               (and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name))))
           (setq ad-return-value
-                (apply 'tramp-vc-do-command buffer okstatus command 
+                (apply 'tramp-vc-do-command buffer okstatus command
                        (or file (buffer-file-name)) last flags))
         ad-do-it)))))
 ;;-)
@@ -298,7 +298,7 @@
 	    (tramp-wait-for-output)
 	    (setq exec-status (read (current-buffer)))
 	    (message "Command %s returned status %d." command exec-status)))
-      
+
 	;; Maybe okstatus can be `async' here.  But then, maybe the
 	;; async thing is new in Emacs 21, but this function is only
 	;; used in Emacs 20.
@@ -319,7 +319,7 @@
     (if (or (and (stringp file)     (tramp-tramp-file-p file))
             (and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name))))
         (setq ad-return-value
-              (apply 'tramp-vc-simple-command okstatus command 
+              (apply 'tramp-vc-simple-command okstatus command
                      (or file (buffer-file-name)) args))
       ad-do-it)))
 
@@ -381,17 +381,17 @@
 
 
 ;; Do we need to advise the vc-user-login-name function anyway?
-;; This will return the correct login name for the owner of a 
+;; This will return the correct login name for the owner of a
 ;; file. It does not deal with the default remote user name...
 ;;
-;; That is, when vc calls (vc-user-login-name), we return the 
+;; That is, when vc calls (vc-user-login-name), we return the
 ;; local login name, something that may be different to the remote
-;; default. 
+;; default.
 ;;
 ;; The remote VC operations will occur as the user that we logged
 ;; in with however - not always the same as the local user.
 ;;
-;; In the end, I did advise the function. This is because, well, 
+;; In the end, I did advise the function. This is because, well,
 ;; the thing didn't work right otherwise ;)
 ;;
 ;; Daniel Pittman <daniel@danann.net>
@@ -409,7 +409,7 @@
   ;; boundness-checking into this function?
   (let* ((file (symbol-value 'file))
 	 (remote-uid
-	  ;; With Emacs 21.4, `file-attributes' has got an optional parameter
+	  ;; With Emacs 22, `file-attributes' has got an optional parameter
 	  ;; ID-FORMAT. Handle this case backwards compatible.
 	  (if (and (functionp 'subr-arity)
 		   (= 2 (cdr (funcall (symbol-function 'subr-arity)
@@ -443,12 +443,12 @@
 		   (save-match-data
 		     (tramp-handle-vc-user-login-name uid)))) ; get the owner name
         ad-do-it)))                     ; else call the original
+
 
-  
 ;; Determine the name of the user owning a file.
 (defun tramp-file-owner (filename)
   "Return who owns FILE (user name, as a string)."
-  (let ((v (tramp-dissect-file-name 
+  (let ((v (tramp-dissect-file-name
 	    (expand-file-name filename))))
     (if (not (file-exists-p filename))
         nil                             ; file cannot be opened
Index: lisp/tramp.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/tramp/lisp/tramp.el,v
retrieving revision 1.23
diff -u -u -r1.23 tramp.el
--- lisp/tramp.el	2005/01/16 13:46:55	1.23
+++ lisp/tramp.el	2005/03/20 20:10:50
@@ -34,7 +34,7 @@
 ;;
 ;; Notes:
 ;; -----
-;; 
+;;
 ;; This package only works for Emacs 20 and higher, and for XEmacs 21
 ;; and higher.  (XEmacs 20 is missing the `with-timeout' macro.  Emacs
 ;; 19 is reported to have other problems.  For XEmacs 21, you need the
@@ -47,16 +47,12 @@
 ;; Also see the todo list at the bottom of this file.
 ;;
 ;; The current version of Tramp can be retrieved from the following URL:
-;;            http://savannah.nongnu.org/download/tramp/
+;;            http://ftp.gnu.org/gnu/tramp/
 ;;
 ;; There's a mailing list for this, as well.  Its name is:
-;;            tramp-devel@mail.freesoftware.fsf.org
-;; Send a mail with `help' in the subject (!) to the administration
-;; address for instructions on joining the list.  The administration
-;; address is:
-;;            tramp-devel-request@mail.freesoftware.fsf.org
-;; You can also use the Web to subscribe, under the following URL:
-;;            http://mail.freesoftware.fsf.org/mailman/listinfo/tramp-devel
+;;            tramp-devel@gnu.org
+;; You can use the Web to subscribe, under the following URL:
+;;            http://lists.gnu.org/mailman/listinfo/tramp-devel
 ;;
 ;; For the adventurous, the current development sources are available
 ;; via CVS.  You can find instructions about this at the following URL:
@@ -160,7 +156,7 @@
 (defgroup tramp nil
   "Edit remote files with a combination of rsh and rcp or similar programs."
   :group 'files
-:version "21.4")
+:version "22.1")
 
 (defcustom tramp-verbose 9
   "*Verbosity level for tramp.el.  0 means be silent, 10 is most verbose."
@@ -205,7 +201,7 @@
 
 gives the same backup policy for Tramp files on their hosts like the
 policy for local files."
-:type '(repeat 
+:type '(repeat
 	      (list (regexp :tag "File regexp")
 		    (string :tag "Backup Dir")
 		    (set :inline t
@@ -506,7 +502,7 @@
 	      (tramp-copy-args            nil)
 	      (tramp-copy-keep-date-arg   "-p")
 	      (tramp-password-end-of-line "xy")) ;see docstring for "xy"
-     ("fcp"   
+     ("fcp"
 	      (tramp-connection-function  tramp-open-connection-rsh)
               (tramp-login-program        "fsh")
               (tramp-copy-program         "fcp")
@@ -633,7 +629,7 @@
     ("rsh"    tramp-multi-connect-rlogin "rsh %h -l %u%n")
     ("remsh"  tramp-multi-connect-rlogin "remsh %h -l %u%n")
     ("ssh"    tramp-multi-connect-rlogin "ssh %h -l %u%n")
-    ("ssht"   tramp-multi-connect-rlogin "ssh %h -e none -t -t -l %u%n")     
+    ("ssht"   tramp-multi-connect-rlogin "ssh %h -e none -t -t -l %u%n")
     ("su"     tramp-multi-connect-su     "su - %u%n")
     ("sudo"   tramp-multi-connect-su     "sudo -u %u -s -p Password:%n"))
   "*List of connection functions for multi-hop methods.
@@ -777,7 +773,7 @@
       "sudo" tramp-completion-function-alist-su)
      (tramp-set-completion-function
       "multi" nil)
-     (tramp-set-completion-function 
+     (tramp-set-completion-function
       "scpx" tramp-completion-function-alist-ssh)
      (tramp-set-completion-function
       "sshx" tramp-completion-function-alist-ssh)
@@ -2064,7 +2060,7 @@
 	(setq filename (tramp-file-name-localname
 			(tramp-dissect-file-name
 			 (expand-file-name filename)))))
-    
+
       ;; Right, they are on the same host, regardless of user, method, etc.
       ;; We now make the link on the remote machine. This will occur as the user
       ;; that FILENAME belongs to.
@@ -2073,7 +2069,7 @@
 	l-multi-method l-method l-user l-host
 	(format "cd %s && %s -sf %s %s"
 		cwd ln
-		filename 
+		filename
 		l-localname)
 	t)))))
 
@@ -2419,7 +2415,7 @@
 	  (let* ((attr (file-attributes f))
 		 (modtime (nth 5 attr))
 		 (mt (visited-file-modtime)))
-	    
+
  	    (cond
 	     ;; file exists, and has a known modtime.
 	     ((and attr (not (equal modtime '(0 0))))
@@ -2766,7 +2762,7 @@
 	    (push (buffer-substring (point)
 				    (tramp-line-end-position))
 		  result))
-	
+
 	  (tramp-send-command multi-method method user host "cd")
 	  (tramp-wait-for-output)
 
@@ -3211,7 +3207,7 @@
 	 'file-error
 	 (list "Removing old file name" "no such directory" filename)))
     ;; Which is better, -r or -R? (-r works for me <daniel@danann.net>)
-    (tramp-send-command multi-method method user host 
+    (tramp-send-command multi-method method user host
 			(format "rm -r %s" (tramp-shell-quote-argument localname)))
     ;; Wait for the remote system to return to us...
     ;; This might take a while, allow it plenty of time.
@@ -3219,7 +3215,7 @@
     ;; Make sure that it worked...
     (and (file-exists-p filename)
 	 (error "Failed to recursively delete %s" filename))))
-	 
+
 (defun tramp-handle-dired-call-process (program discard &rest arguments)
   "Like `dired-call-process' for tramp files."
   (with-parsed-tramp-file-name default-directory nil
@@ -3241,7 +3237,7 @@
 	  (tramp-send-command-and-check multi-method method user host nil)
 	(tramp-send-command multi-method method user host "cd")
 	(tramp-wait-for-output)))))
-	 
+
 (defun tramp-handle-dired-compress-file (file &rest ok-flag)
   "Like `dired-compress-file' for tramp files."
   ;; OK-FLAG is valid for XEmacs only, but not implemented.
@@ -3501,7 +3497,7 @@
 This will break if COMMAND prints a newline, followed by the value of
 `tramp-end-of-output', followed by another newline."
   ;; Asynchronous processes are far from being perfect.  But it works at least
-  ;; for `find-grep-dired' and `find-name-dired' in Emacs 21.4.
+  ;; for `find-grep-dired' and `find-name-dired' in Emacs 22.
   (if (tramp-tramp-file-p default-directory)
       (with-parsed-tramp-file-name default-directory nil
 	(let ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command))
@@ -3609,7 +3605,7 @@
   (when (and (numberp buffer) (zerop buffer))
     (error "Implementation does not handle immediate return"))
   (when (consp buffer) (error "Implementation does not handle error files"))
-  (shell-command 
+  (shell-command
    (mapconcat 'tramp-shell-quote-argument
               (cons program args)
               " ")
@@ -4105,10 +4101,10 @@
      (if (bufferp (nth 0 args)) (nth 0 args) (current-buffer))))
    ; COMMAND
    ((member operation
-	    (list 'dired-call-process-command
+	    (list 'dired-call-process
                   ; Emacs only
-		  'shell
-                  ; Post Emacs 21.3 only
+		  'shell-command
+                  ; Emacs 22 only
                   'process-file
 	          ; XEmacs only
 		  'dired-print-file 'dired-shell-call-process))
@@ -4213,7 +4209,7 @@
 
 (defun tramp-repair-jka-compr ()
   "If jka-compr is already loaded, move it to the front of
-`file-name-handler-alist'.  On Emacs 21.4 or so this will not be
+`file-name-handler-alist'.  On Emacs 22 or so this will not be
 necessary anymore."
   (let ((jka (rassoc 'jka-compr-handler file-name-handler-alist)))
     (when jka
@@ -4293,7 +4289,7 @@
 ;; `tramp-completion-file-name-regexp-unified' aren't different.
 ;; If nil, `tramp-completion-run-real-handler' is called (i.e. forwarding to
 ;; `tramp-file-name-handler'). Otherwise, it takes `tramp-run-real-handler'.
-;; Using `last-input-event' is a little bit risky, because completing a file 
+;; Using `last-input-event' is a little bit risky, because completing a file
 ;; might require loading other files, like "~/.netrc", and for them it
 ;; shouldn't be decided based on that variable. On the other hand, those files
 ;; shouldn't have partial tramp file name syntax. Maybe another variable should
@@ -4397,7 +4393,7 @@
 			       (funcall (nth 0 x) (nth 1 x)))))
 	       (tramp-get-completion-function m))
 
-	      (setq result (append result 
+	      (setq result (append result
 	        (mapcar
 		 (lambda (x)
 		   (tramp-get-completion-user-host
@@ -4438,7 +4434,7 @@
 ;; [nil nil "x" nil nil]
 ;; [nil "x" nil nil nil]
 
-;; "/x:"                    "/x:y"                   "/x:y:"		      
+;; "/x:"                    "/x:y"                   "/x:y:"
 ;; [nil nil nil "x" ""]     [nil nil nil "x" "y"]    [nil "x" nil "y" ""]
 ;;       "/[x/"                   "/[x/y"
 ;; [nil "x" nil "" nil]     [nil "x" nil "y" nil]
@@ -4907,7 +4903,7 @@
 			"touch" nil (current-buffer) nil "-t" touch-time file))
 	      (pop-to-buffer (current-buffer))
 	      (error "tramp-touch: touch failed"))))))
- 
+
 (defun tramp-buffer-name (multi-method method user host)
   "A name for the connection buffer for USER at HOST using METHOD."
   (if multi-method
@@ -5072,8 +5068,8 @@
                   (file-exists-p existing)
                   (not (file-exists-p nonexisting))))
       (error "Couldn't find command to check if file exists."))))
-    
 
+
 ;; CCC test ksh or bash found for tilde expansion?
 (defun tramp-find-shell (multi-method method user host)
   "Find a shell on the remote host which groks tilde expansion."
@@ -5171,9 +5167,9 @@
    (tramp-check-ls-commands multi-method method user host "gnuls" tramp-remote-path)
    (tramp-check-ls-commands multi-method method user host "gls" tramp-remote-path)))
 
-;; ------------------------------------------------------------ 
-;; -- Functions for establishing connection -- 
-;; ------------------------------------------------------------ 
+;; ------------------------------------------------------------
+;; -- Functions for establishing connection --
+;; ------------------------------------------------------------
 
 ;; The following functions are actions to be taken when seeing certain
 ;; prompts from the remote host.  See the variable
@@ -5422,7 +5418,7 @@
     (when multi-method
       (error "Cannot multi-connect using telnet connection method"))
     (tramp-pre-connection multi-method method user host)
-    (tramp-message 7 "Opening connection for %s@%s using %s..." 
+    (tramp-message 7 "Opening connection for %s@%s using %s..."
 		   (or user (user-login-name)) host method)
     (let ((process-environment (copy-sequence process-environment)))
       (setenv "TERM" tramp-terminal-type)
@@ -5455,8 +5451,8 @@
         (tramp-open-connection-setup-interactive-shell
          p multi-method method user host)
         (tramp-post-connection multi-method method user host)))))
+
 
-	    
 (defun tramp-open-connection-rsh (multi-method method user host)
   "Open a connection using an rsh METHOD.
 This starts the command `rsh HOST -l USER'[*], then waits for a remote
@@ -5481,7 +5477,7 @@
       (error "Cannot multi-connect using rsh connection method"))
     (tramp-pre-connection multi-method method user host)
     (if (and user (not (string= user "")))
-	(tramp-message 7 "Opening connection for %s@%s using %s..." 
+	(tramp-message 7 "Opening connection for %s@%s using %s..."
 		       user host method)
       (tramp-message 7 "Opening connection at %s using %s..." host method))
     (let ((process-environment (copy-sequence process-environment))
@@ -5510,9 +5506,9 @@
                                                   (> emacs-major-version 20))
                                        tramp-dos-coding-system))
              (p (if (and user (not (string= user "")))
-                    (apply #'start-process bufnam buf login-program  
+                    (apply #'start-process bufnam buf login-program
                            real-host "-l" user login-args)
-                  (apply #'start-process bufnam buf login-program 
+                  (apply #'start-process bufnam buf login-program
                          real-host login-args)))
              (found nil))
         (tramp-set-process-query-on-exit-flag p nil)
@@ -5582,10 +5578,10 @@
 			       tramp-actions-before-shell)
         (tramp-open-connection-setup-interactive-shell
          p multi-method method user host)
-        (tramp-post-connection multi-method method 
+        (tramp-post-connection multi-method method
                                user host)))))
 
-;; HHH: Not Changed.  Multi method.  It is not clear to me how this can 
+;; HHH: Not Changed.  Multi method.  It is not clear to me how this can
 ;;      handle not giving a user name in the "file name".
 ;;
 ;;      This is more difficult than for the single-hop method.  In the
@@ -5655,7 +5651,7 @@
         (tramp-post-connection multi-method method user host)))))
 
 ;; HHH: Changed.  Multi method.  Don't know how to handle this in the case
-;;      of no user name provided.  Hack to make it work as it did before:  
+;;      of no user name provided.  Hack to make it work as it did before:
 ;;      changed `user' to `(or user (user-login-name))' in the places where
 ;;      the value is actually used.
 (defun tramp-multi-connect-telnet (p method user host command)
@@ -5677,8 +5673,8 @@
     (tramp-process-multi-actions p method user host
 				 tramp-multi-actions)))
 
-;; HHH: Changed.  Multi method.  Don't know how to handle this in the case 
-;;      of no user name provided.  Hack to make it work as it did before:  
+;; HHH: Changed.  Multi method.  Don't know how to handle this in the case
+;;      of no user name provided.  Hack to make it work as it did before:
 ;;      changed `user' to `(or user (user-login-name))' in the places where
 ;;      the value is actually used.
 (defun tramp-multi-connect-rlogin (p method user host command)
@@ -5703,8 +5699,8 @@
     (tramp-process-multi-actions p method user host
 				 tramp-multi-actions)))
 
-;; HHH: Changed.  Multi method.  Don't know how to handle this in the case 
-;;      of no user name provided.  Hack to make it work as it did before:  
+;; HHH: Changed.  Multi method.  Don't know how to handle this in the case
+;;      of no user name provided.  Hack to make it work as it did before:
 ;;      changed `user' to `(or user (user-login-name))' in the places where
 ;;      the value is actually used.
 (defun tramp-multi-connect-su (p method user host command)
@@ -6334,7 +6330,7 @@
   (tramp-barf-if-no-shell-prompt
    nil 30
    "Couldn't `%s', see buffer `%s'" command (buffer-name)))
-  
+
 (defun tramp-wait-for-output (&optional timeout)
   "Wait for output from remote rsh command."
   (let ((proc (get-buffer-process (current-buffer)))
@@ -6667,9 +6663,9 @@
    ""))
 
 
-;; ------------------------------------------------------------ 
-;; -- TRAMP file names -- 
-;; ------------------------------------------------------------ 
+;; ------------------------------------------------------------
+;; -- TRAMP file names --
+;; ------------------------------------------------------------
 ;; Conversion functions between external representation and
 ;; internal data structure.  Convenience functions for internal
 ;; data structure.
@@ -6680,7 +6676,7 @@
   "Return t iff NAME is a tramp file."
   (save-match-data
     (string-match tramp-file-name-regexp name)))
- 
+
 ;; HHH: Changed.  Used to assign the return value of (user-login-name)
 ;;      to the `user' part of the structure if a user name was not
 ;;      provided, now it assigns nil.
@@ -6733,7 +6729,7 @@
 If both MULTI-METHOD and METHOD are nil, do a lookup in
 `tramp-default-method-alist'."
   (or multi-method method (tramp-find-default-method user host)))
-    
+
 ;; HHH: Not Changed.  Multi method.  Will probably not handle the case where
 ;;      a user name is not provided in the "file name" very well.
 (defun tramp-dissect-multi-file-name (name)
@@ -6905,7 +6901,7 @@
     (if entry
 	(second entry)
       (symbol-value param))))
-      
+
 
 ;; Auto saving to a special directory.
 
@@ -6937,8 +6933,8 @@
             (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.
+;; In Emacs < 22 and XEmacs < 21.5 autosaved remote files have
+;; permission 0666 minus umask. This is a security threat.
 
 (defun tramp-set-auto-save-file-modes ()
   "Set permissions of autosaved remote files to the original permissions."
@@ -6946,20 +6942,18 @@
     (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)
+	       (not (equal bfn buffer-auto-save-file-name)))
+      (unless (file-exists-p buffer-auto-save-file-name)
+	(write-region "" nil buffer-auto-save-file-name))
+      ;; Permissions should be set always, because there might be an old
+      ;; auto-saved file belonging to another original file.  This could
+      ;; be a security threat.
       (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)))))
+		 (> emacs-minor-version 4)))
   (add-hook 'auto-save-hook 'tramp-set-auto-save-file-modes))
 
 (defun tramp-subst-strs-in-string (alist string)
@@ -7097,9 +7091,9 @@
 	     process flag)))
 
 
-;; ------------------------------------------------------------ 
-;; -- Kludges section -- 
-;; ------------------------------------------------------------ 
+;; ------------------------------------------------------------
+;; -- Kludges section --
+;; ------------------------------------------------------------
 
 ;; Currently (as of Emacs 20.5), the function `shell-quote-argument'
 ;; does not deal well with newline characters.  Newline is replaced by
@@ -7206,72 +7200,73 @@
   "Submit a bug report to the TRAMP developers."
   (interactive)
   (require 'reporter)
-  (let ((reporter-prompt-for-summary-p	t))
-    (reporter-submit-bug-report
-     tramp-bug-report-address		; to-address
-     (format "tramp (%s)" tramp-version) ; package name and version
-     `(;; Current state
-       tramp-ls-command
-       tramp-test-groks-nt
-       tramp-file-exists-command
-       tramp-current-multi-method
-       tramp-current-method
-       tramp-current-user
-       tramp-current-host
-
-       ;; System defaults
-       tramp-auto-save-directory        ; vars to dump
-       tramp-default-method
-       tramp-rsh-end-of-line
-       tramp-default-password-end-of-line
-       tramp-remote-path
-       tramp-login-prompt-regexp
-       tramp-password-prompt-regexp
-       tramp-wrong-passwd-regexp
-       tramp-yesno-prompt-regexp
-       tramp-yn-prompt-regexp
-       tramp-terminal-prompt-regexp
-       tramp-out-of-band-prompt-regexp
-       tramp-temp-name-prefix
-       tramp-file-name-structure
-       tramp-file-name-regexp
-       tramp-multi-file-name-structure
-       tramp-multi-file-name-hop-structure
-       tramp-multi-methods
-       tramp-multi-connection-function-alist
-       tramp-methods
-       tramp-end-of-output
-       tramp-coding-commands
-       tramp-actions-before-shell
-       tramp-actions-copy-out-of-band
-       tramp-multi-actions
-       tramp-terminal-type
-       tramp-shell-prompt-pattern
-       tramp-chunksize
-       ,(when (boundp 'tramp-backup-directory-alist)
-	  'tramp-backup-directory-alist)
-       ,(when (boundp 'tramp-bkup-backup-directory-info)
-	  'tramp-bkup-backup-directory-info)
-
-       ;; Non-tramp variables of interest
-       shell-prompt-pattern
-       backup-by-copying
-       backup-by-copying-when-linked
-       backup-by-copying-when-mismatch
-       ,(when (boundp 'backup-by-copying-when-privileged-mismatch)
-          'backup-by-copying-when-privileged-mismatch)
-       ,(when (boundp 'password-cache)
-          'password-cache)
-       ,(when (boundp 'password-cache-expiry)
-          'password-cache-expiry)
-       ,(when (boundp 'backup-directory-alist)
-	  'backup-directory-alist)
-       ,(when (boundp 'bkup-backup-directory-info)
-	  'bkup-backup-directory-info)
-       file-name-handler-alist)
-     nil				; pre-hook
-     nil				; post-hook
-     "\
+  (catch 'dont-send
+    (let ((reporter-prompt-for-summary-p	t))
+      (reporter-submit-bug-report
+       tramp-bug-report-address		; to-address
+       (format "tramp (%s)" tramp-version) ; package name and version
+       `(;; Current state
+	 tramp-ls-command
+	 tramp-test-groks-nt
+	 tramp-file-exists-command
+	 tramp-current-multi-method
+	 tramp-current-method
+	 tramp-current-user
+	 tramp-current-host
+
+	 ;; System defaults
+	 tramp-auto-save-directory        ; vars to dump
+	 tramp-default-method
+	 tramp-rsh-end-of-line
+	 tramp-default-password-end-of-line
+	 tramp-remote-path
+	 tramp-login-prompt-regexp
+	 tramp-password-prompt-regexp
+	 tramp-wrong-passwd-regexp
+	 tramp-yesno-prompt-regexp
+	 tramp-yn-prompt-regexp
+	 tramp-terminal-prompt-regexp
+	 tramp-out-of-band-prompt-regexp
+	 tramp-temp-name-prefix
+	 tramp-file-name-structure
+	 tramp-file-name-regexp
+	 tramp-multi-file-name-structure
+	 tramp-multi-file-name-hop-structure
+	 tramp-multi-methods
+	 tramp-multi-connection-function-alist
+	 tramp-methods
+	 tramp-end-of-output
+	 tramp-coding-commands
+	 tramp-actions-before-shell
+	 tramp-actions-copy-out-of-band
+	 tramp-multi-actions
+	 tramp-terminal-type
+	 tramp-shell-prompt-pattern
+	 tramp-chunksize
+	 ,(when (boundp 'tramp-backup-directory-alist)
+	    'tramp-backup-directory-alist)
+	 ,(when (boundp 'tramp-bkup-backup-directory-info)
+	    'tramp-bkup-backup-directory-info)
+
+	 ;; Non-tramp variables of interest
+	 shell-prompt-pattern
+	 backup-by-copying
+	 backup-by-copying-when-linked
+	 backup-by-copying-when-mismatch
+	 ,(when (boundp 'backup-by-copying-when-privileged-mismatch)
+	    'backup-by-copying-when-privileged-mismatch)
+	 ,(when (boundp 'password-cache)
+	    'password-cache)
+	 ,(when (boundp 'password-cache-expiry)
+	    'password-cache-expiry)
+	 ,(when (boundp 'backup-directory-alist)
+	    'backup-directory-alist)
+	 ,(when (boundp 'bkup-backup-directory-info)
+	    'bkup-backup-directory-info)
+	 file-name-handler-alist)
+       nil				; pre-hook
+       'tramp-append-tramp-buffers	; post-hook
+       "\
 Enter your bug report in this message, including as much detail as you
 possibly can about the problem, what you did to cause it and what the
 local and remote machines are.
@@ -7286,7 +7281,73 @@
 report.
 
 --bug report follows this line--
-")))
+"))))
+
+(defun tramp-append-tramp-buffers ()
+  "Append Tramp buffers into the bug report."
+
+  ;; We load mml.el from Gnus.
+  (if (featurep 'xemacs)
+      (load "mml" 'noerror)
+    (require 'mml nil 'noerror))
+
+  (when (and
+	 ;; We don't want to add another dependency.
+	 (functionp 'mml-insert-empty-tag)
+	 ;; 2nd parameter since Emacs 22.
+	 (condition-case nil
+	     (list-buffers-noselect nil nil)
+	   (t nil)))
+    (let ((buffer-list
+	   (delq nil
+	    (mapcar '(lambda (b)
+	     (when (string-match "^\\*\\(debug \\)?tramp/" (buffer-name b)) b))
+	     (buffer-list))))
+	  (curbuf (current-buffer)))
+
+      ;; There is at least one Tramp buffer.
+      (when buffer-list
+	(switch-to-buffer (list-buffers-noselect nil buffer-list))
+	(delete-other-windows)
+	(setq buffer-read-only nil)
+	(goto-char (point-max))
+	(insert "
+The buffer(s) above will be appended to this message.  If you don't want
+to append a buffer because it contains sensible data, or because the buffer
+is too large, you should delete the respective buffer.  The buffer(s) will
+contain user and host names.  Passwords will never be included there.")
+
+	(when (and tramp-debug-buffer (> tramp-verbose 9))
+	  (insert "\n\n")
+	  (let ((start (point)))
+	    (insert "\
+Please note that you have set `tramp-verbose' to a value greater than 9.
+Therefore, the contents of files might be included in the debug buffer(s).")
+	    (add-text-properties start (point) (list 'face 'italic))))
+
+	(set-buffer-modified-p nil)
+	(setq buffer-read-only t)
+	(goto-char (point-min))
+
+	(if (y-or-n-p "Do you want to append the buffer(s)? ")
+	    ;; OK, let's send.  First we delete the buffer list.
+	    (progn
+	      (kill-buffer nil)
+	      (switch-to-buffer curbuf)
+	      (goto-char (point-max))
+	      (insert "\n\n")
+	      (dolist (buffer buffer-list)
+		(mml-insert-empty-tag
+		 'part 'type "text/plain" 'encoding "base64"
+		 'disposition "attachment" 'buffer (buffer-name buffer)
+		 'description (buffer-name buffer)))
+	      (set-buffer-modified-p nil))
+
+	  ;; Don't send.  Delete the message buffer.
+	  (set-buffer curbuf)
+	  (set-buffer-modified-p nil)
+	  (kill-buffer nil)
+	  (throw 'dont-send nil))))))
 
 (defalias 'tramp-submit-bug 'tramp-bug)
 
@@ -7362,7 +7423,7 @@
 ;;   strange when doing zerop, we should kill the process and start
 ;;   again.  (Greg Stark)
 ;; * Add caching for filename completion.  (Greg Stark)
-;;   Of course, this has issues with usability (stale cache bites) 
+;;   Of course, this has issues with usability (stale cache bites)
 ;;      -- <daniel@danann.net>
 ;; * Provide a local cache of old versions of remote files for the rsync
 ;;   transfer method to use.  (Greg Stark)
Index: lisp/trampver.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/tramp/lisp/trampver.el,v
retrieving revision 1.7
diff -u -u -r1.7 trampver.el
--- lisp/trampver.el	2005/01/16 13:46:55	1.7
+++ lisp/trampver.el	2005/03/20 20:10:50
@@ -30,10 +30,10 @@
 ;; are auto-frobbed from configure.ac, so you should edit that file and run
 ;; "autoconf && ./configure" to change them.
 
-(defconst tramp-version "2.0.47"
+(defconst tramp-version "2.0.48"
   "This version of Tramp.")
 
-(defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org"
+(defconst tramp-bug-report-address "tramp-devel@gnu.org"
   "Email address to send bug reports to.")
 
 (provide 'trampver)
Index: texi/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/tramp/texi/ChangeLog,v
retrieving revision 1.24
diff -u -u -r1.24 ChangeLog
--- texi/ChangeLog	2005/01/16 13:46:58	1.24
+++ texi/ChangeLog	2005/03/20 20:10:50
@@ -1,10 +1,35 @@
+2005-03-20  Michael Albinus  <michael.albinus@gmx.de>
+
+	Version 2.0.48 released.
+
+2005-02-20  Michael Albinus  <michael.albinus@gmx.de>
+
+	* trampver.texi.in: Replace "Emacs" by "GNU Emacs".
+
+	* tramp.texi: Replace "Emacs" by "GNU Emacs".
+	(Default Method): Offer shortened syntax for "su" and "sudo"
+	methods.
+
+2005-02-13  Michael Albinus  <michael.albinus@gmx.de>
+
+	* tramp.texi: Replace "Linux" by "GNU/Linux".  Suggested by
+	Richard M. Stallman <rms@gnu.org>
+
+2005-02-09  Kim F. Storm  <storm@cua.dk>
+
+	Change release version from 21.4 to 22.1 throughout.
+
+2005-02-02  Michael Albinus  <michael.albinus@gmx.de>
+
+	* tramp.texi (all): Change all addresses to .gnu.org.
+
 2005-01-16  Michael Albinus  <michael.albinus@gmx.de>
 
 	Version 2.0.47 released.
 
 2005-01-09  Michael Albinus  <michael.albinus@gmx.de>
 
-	* tramp.texi: (Compilation): Make reference to (X)Emacs manual
+	* tramp.texi (Compilation): Make reference to (X)Emacs manual
 	flavor specific.  Remove mentioned restrictions for Emacs < 21.4
 	and for XEmacs.
 
@@ -47,7 +72,7 @@
 	* tramp.texi (Frequently Asked Questions): Comment paragraph about
 	plink link.  The URL is outdated.  Originator contacted for
 	clarification.
-	
+
 2004-08-10  Michael Albinus  <michael.albinus@gmx.de>
 
 	Version 2.0.44 released.
@@ -104,7 +129,7 @@
 	moved to that file.  "tramp-" and "-" removed from flag names.
 	Flags `tramp' and `trampver' used properly.  Flag `tramp-inst'
 	replaced by `installchapter'.
-	
+
 2004-03-29  Michael Albinus  <Michael.Albinus@alcatel.de>
 
 	* Makefile.in (INSTALL_INFO): Use option `--quiet'.
@@ -141,7 +166,7 @@
 2004-03-14  Michael Albinus  <Michael.Albinus@alcatel.de>
 
 	* Makefile.in (savannah): Simplify copy command.
-	
+
 	* trampinst.texi (Installation, Installation parameters)
 	(Load paths): Explain new option `--with-contrib'.  Remove
 	description for explicit use of "contrib" directory.  Remove
@@ -194,7 +219,7 @@
 
 	* tramp.texi (Customizing Completion): Explain new functions
 	`tramp-parse-shostkeys' and `tramp-parse-sknownhosts'.
-	
+
 2004-01-05  Michael Albinus  <Michael.Albinus@alcatel.de>
 
 	* tramp.texi (Issues): Explain disabling "auto-autoloads.el*" for
@@ -265,7 +290,7 @@
 	(Japanese manual): New node.
 
 	* trampver.texi.in (all): New flag `japanese-manual'.  Typo fix.
-	
+
 2003-11-02  Michael Albinus  <Michael.Albinus@alcatel.de>
 
 	* tramp.texi (Inline methods): Small grammar fix.
@@ -335,7 +360,7 @@
 
 2003-06-17  Adrian Aichner  <adrian@xemacs.org>
 	Small patch.
-	
+
 	* tramp.texi: Fix minor typos.
 	* tramp.texi (Concept Index): Added to make manual searchable via
 	`Info-index'.
@@ -556,8 +581,8 @@
 
 2002-10-08  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
-	* tramp.texi (Installation, Inline methods) 
-	(Customizing Completion, Remote shell setup) 
+	* tramp.texi (Installation, Inline methods)
+	(Customizing Completion, Remote shell setup)
 	(Frequently Asked Questions): Fix typos.  From Francis Litterio
 	<franl@world.std.com>.
 
@@ -655,7 +680,7 @@
 
 2002-08-22  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
-	* tramp.texi (Usage): Mention type-ahead problem. 
+	* tramp.texi (Usage): Mention type-ahead problem.
 
 2002-08-22  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
@@ -676,7 +701,7 @@
 2002-08-05  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
 	Version 2.0.11 released.
-	
+
 2002-08-04  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
 	* tramp.texi (Inline methods, Remote shell setup): Typos.  From
@@ -697,8 +722,8 @@
 2002-07-26  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
 	* tramp.texi (Top): Add copying.
-	(Overview, Obtaining @tramp{}, Installation, Multi-hop Methods) 
-	(Remote Programs, Multi-hop filename syntax) 
+	(Overview, Obtaining @tramp{}, Installation, Multi-hop Methods)
+	(Remote Programs, Multi-hop filename syntax)
 	(Frequently Asked Questions): Reformat.
 
 	* Makefile (clean): Delete more.
@@ -706,7 +731,7 @@
 2002-07-24  Steve Youngs  <youngs@xemacs.org>
 
 	* Makefile (prepversion): New target.  Creates
-	tramp-version.texi. 
+	tramp-version.texi.
 	(all): Use it.
 	(clean): Add tramp-version.texi.
 
@@ -719,7 +744,7 @@
 	* Makefile (tramp.html, tramp_ja.html): Specify output file.
 
 	* tramp.texi (Inline methods): Document new-style "ssh -1"
-	methods and the renaming of "ssh1" methods.	
+	methods and the renaming of "ssh1" methods.
 
 2002-07-14  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
@@ -799,7 +824,7 @@
 2002-04-19  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 	From Harry Putnam <reader@newsguy.com>.  Awaiting copyright
 	assignment.
-	
+
 	* tramp.texi (Installation): Give more details on byte-compiling
 	the Lisp files and creating and installing the info file.
 
Index: texi/tramp.texi
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/tramp/texi/tramp.texi,v
retrieving revision 1.19
diff -u -u -r1.19 tramp.texi
--- texi/tramp.texi	2005/01/16 13:46:58	1.19
+++ texi/tramp.texi	2005/03/20 20:10:52
@@ -88,7 +88,7 @@
 programs, such as @command{ssh}/@command{scp}.
 
 You can find the latest version of this document on the web at
-@uref{http://www.freesoftware.fsf.org/tramp/}.
+@uref{http://www.gnu.org/software/tramp/}.
 
 @c Pointer to the other Emacs flavor is necessary only in case of
 @c standalone installation.
@@ -111,18 +111,18 @@
 @end ifset
 
 The latest release of @value{tramp} is available for
-@uref{http://savannah.nongnu.org/download/tramp/, download}, or you
-may see @ref{Obtaining Tramp} for more details, including the CVS
-server details.
+@uref{http://ftp.gnu.org/gnu/tramp/, download}, or you may see
+@ref{Obtaining Tramp} for more details, including the CVS server
+details.
 
-@value{tramp} also has a @uref{http://savannah.nongnu.org/projects/tramp/,
+@value{tramp} also has a @uref{http://savannah.gnu.org/projects/tramp/,
 Savannah Project Page}.
 @end ifhtml
 
 There is a mailing list for @value{tramp}, available at
-@email{tramp-devel@@mail.freesoftware.fsf.org}, and archived at
-@uref{http://savannah.nongnu.org/mail/?group=tramp, Savannah Mail
-Archive}.
+@email{tramp-devel@@gnu.org}, and archived at
+@uref{http://lists.gnu.org/archive/html/tramp-devel/, the
+@value{tramp} Mail Archive}.
 @ifhtml
 Older archives are located at
 @uref{http://sourceforge.net/mailarchive/forum.php?forum=tramp-devel,
@@ -377,14 +377,14 @@
 @chapter Obtaining Tramp.
 @cindex obtaining Tramp
 
-@value{tramp} is freely available on the Internet and the latest release
-may be downloaded from
-@uref{http://savannah.nongnu.org/download/tramp/}. This
-release includes the full documentation and code for @value{tramp},
-suitable for installation.  But Emacs (21.4 or later) includes
-@value{tramp} already, and there is a @value{tramp} package for XEmacs, as well.
-So maybe it is easier to just use those.  But if you want the bleeding
-edge, read on@dots{...}
+@value{tramp} is freely available on the Internet and the latest
+release may be downloaded from
+@uref{http://ftp.gnu.org/gnu/tramp/}. This release includes the full
+documentation and code for @value{tramp}, suitable for installation.
+But GNU Emacs (22 or later) includes @value{tramp} already, and there
+is a @value{tramp} package for XEmacs, as well.  So maybe it is easier
+to just use those.  But if you want the bleeding edge, read
+on@dots{...}
 
 For the especially brave, @value{tramp} is available from CVS.  The CVS
 version is the latest version of the code and may contain incomplete
@@ -396,7 +396,7 @@
 at the top.
 
 @noindent
-@uref{http://savannah.nongnu.org/projects/tramp/}
+@uref{http://savannah.gnu.org/projects/tramp/}
 
 @noindent
 Or follow the example session below:
@@ -404,7 +404,7 @@
 @example
 ] @strong{cd ~/@value{emacsdir}}
 ] @strong{export CVS_RSH="ssh"}
-] @strong{cvs -z3 -d:ext:anoncvs@@savannah.nongnu.org:/cvsroot/tramp co tramp}
+] @strong{cvs -z3 -d:ext:anoncvs@@savannah.gnu.org:/cvsroot/tramp co tramp}
 @end example
 
 @noindent
@@ -1112,7 +1112,9 @@
 of @code{ssh}.  Or you use Kerberos and thus like @code{krlogin}.
 
 For the special case of editing files on the local host as another
-user, see the @code{su} or @code{sudo} method.
+user, see the @code{su} or @code{sudo} method.  It offers shortened
+syntax for the @samp{root} account, like
+@file{@value{prefix}su@value{postfixsinglehop}@value{postfix}/etc/motd}.
 
 People who edit large files may want to consider @code{scp} instead of
 @code{ssh}, or @code{pscp} instead of @code{plink}.  These out-of-band
@@ -1603,7 +1605,7 @@
 for @value{tramp} files to the local temporary directory.
 
 On some versions of @value{emacsname}, namely the version built for
-Debian Linux, the variable @code{auto-save-file-name-transforms}
+Debian GNU/Linux, the variable @code{auto-save-file-name-transforms}
 contains the directory where @value{emacsname} was built.  A
 workaround is to manually set the variable to a sane value.
 
@@ -1924,13 +1926,13 @@
 with @value{tramp}, solving problems and general discussion and advice on topics
 relating to the package.
 
-The  mailing list is at @email{tramp-devel@@mail.freesoftware.fsf.org}.
-Messages sent to this address go to all the subscribers. This is
-@emph{not} the address to send subscription requests to.
-
-For help on subscribing to the list, send mail to the administrative
-address, @email{tramp-devel-request@@mail.freesoftware.fsf.org}, with the
-subject @samp{help}.
+The mailing list is at @email{tramp-devel@@gnu.org}.  Messages sent to
+this address go to all the subscribers. This is @emph{not} the address
+to send subscription requests to.
+
+Subscribing to the list is performed via
+@uref{http://lists.gnu.org/mailman/listinfo/tramp-devel/,
+the @value{tramp} Mail Subscription Page}.
 
 To report a bug in @value{tramp}, you should execute @kbd{M-x tramp-bug}. This
 will automatically generate a buffer with the details of your system and
@@ -1956,20 +1958,21 @@
 @value{tramp} is available under the URL below.
 
 @noindent
-@uref{http://savannah.nongnu.org/download/tramp/}
+@uref{http://ftp.gnu.org/gnu/tramp/}
 
 @noindent
 There is also a Savannah project page.
 
 @noindent
-@uref{http://savannah.nongnu.org/projects/tramp/}
+@uref{http://savannah.gnu.org/projects/tramp/}
 
 @item
 Which systems does it work on?
 
-The package has been used successfully on Emacs 20 and Emacs 21, as well
-as XEmacs 21.  XEmacs 20 is more problematic, see the notes in
-@file{tramp.el}.  I don't think anybody has really tried it on Emacs 19.
+The package has been used successfully on GNU Emacs 20, GNU Emacs 21
+and GNU Emacs 22, as well as XEmacs 21.  XEmacs 20 is more
+problematic, see the notes in @file{tramp.el}.  I don't think anybody
+has really tried it on GNU Emacs 19.
 
 The package was intended to work on Unix, and it really expects a
 Unix-like system on the remote end (except the @option{smb} method),
@@ -2336,9 +2339,9 @@
 forward and wishes to implement and test it, please contact me or the
 mailing list.
 
-@item The @value{tramp} filename syntax differs between Emacs and XEmacs.
+@item The @value{tramp} filename syntax differs between GNU Emacs and XEmacs.
 
-The Emacs maintainers wish to use a unified filename syntax for
+The GNU Emacs maintainers wish to use a unified filename syntax for
 Ange-FTP and @value{tramp} so that users don't have to learn a new
 syntax.  It is sufficient to learn some extensions to the old syntax.
 
Index: texi/trampver.texi
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/tramp/texi/trampver.texi,v
retrieving revision 1.7
diff -u -u -r1.7 trampver.texi
--- texi/trampver.texi	2005/01/16 13:46:58	1.7
+++ texi/trampver.texi	2005/03/20 20:10:52
@@ -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.47
+@set trampver 2.0.48
 
 @c Other flags from configuration
 @set prefix /usr/local
@@ -25,7 +25,7 @@
 
 @c Emacs values.
 @ifset emacs
-@set emacsname          Emacs
+@set emacsname          GNU Emacs
 @set emacsdir           emacs
 @set ftppackagename     Ange-FTP
 @set prefix             /
@@ -49,7 +49,7 @@
 @set postfix            ]
 @set postfixsinglehop   /
 @set postfixmultihop    :
-@set emacsothername     Emacs
+@set emacsothername     GNU Emacs
 @set emacsotherdir      emacs
 @set emacsotherfilename tramp-emacs.html
 @set japanesemanual     tramp_ja-xemacs.html
