Anonymous avatar Anonymous committed 6adf0fd

Imported sources at TRAMP v 2.46.

Comments (0)

Files changed (30)

+MANIFEST
+tramp.tar.gz
+tmp
+Joe Stoy <joe.stoy@balliol.oxford.ac.uk>
+Pete Forman <gsez020@kryten.bedford.waii.com>
+Daniel Pittman <daniel@rimspace.net>
+Matt Swift <swift@alum.mit.edu>
+Mario De Weerd
+Francesco Potortě <pot@gnu.org>
+Dave Love <fx@gnu.org>
+? Matthias Köppe <mkoeppe@cs.uni-magdeburg.de>
+Yuji Yamano <yyamano@kt.rim.or.jp>
+Ed Sabol <sabol@alderaan.gsfc.nasa.gov>
+Michael Welsh Duggan <md5i@cs.cmu.edu>
+
+2001-11-07  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* Makefile (sourceforge): Submit tarballs via FTP automatically.
+
+2001-10-08  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* Makefile (tar): Add rules for more tarballs.
+
+2001-09-07  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* Makefile (Module): Rule for submitting to SourceForge.
+
+# Makefile to build TRAMP, such as it is...
+# requires GNU make and GNU tar.
+# This should be improved.
+
+# sjt If we seem to be in an XEmacs package hierarchy, build packages.
+# sjt Otherwise, use the upstream rules.
+# sjt #### I don't think we need to strip the result of $(wildcard ...)
+ifeq (,$(wildcard ../../XEmacs.rules))
+
+# sjt N.B.  Configuration of utilities for XEmacs packages is done in
+# sjt ../../Local.rules.  These have no effect on XEmacs's package build
+# sjt process (and thus live inside the conditional).
+EMACS	= xemacs
+MAKEINFO	= makeinfo
+
+DIRS	= lisp texi
+
+.PHONY: MANIFEST
+
+all:
+	for a in ${DIRS}; do						\
+	    $(MAKE) -C $$a "EMACS=$(EMACS)" "MAKEINFO=$(MAKEINFO)" all;	\
+	done
+
+clean:
+	rm -f MANIFEST tramp.tar.gz
+	for a in ${DIRS}; do						\
+	    $(MAKE) -C $$a "EMACS=$(EMACS)" "MAKEINFO=$(MAKEINFO)" clean; \
+	done
+
+MANIFEST:
+	cd .. ;							\
+	find tramp \( -name CVS -prune \)			\
+		-o \( -name tmp -prune \)			\
+		-o -type f \! -name "*~"			\
+		-a \! -name "*.elc" -a \! -name "*.aux"		\
+		-a \! -name "*.cp" -a \! -name "*.fn"		\
+		-a \! -name "*.vr" -a \! -name "*.tp"		\
+		-a \! -name "*.ky" -a \! -name "*.pg"		\
+		-a \! -name "*.tmp" -a \! -name "*.log"		\
+		-a \! -name "*.toc" -a \! -name "*,v"		\
+		-a \! -name "*.tar.gz"				\
+		-print > MANIFEST ;				\
+	egrep -v 'lisp/tramp2|test/' MANIFEST > MANIFEST.stable
+
+tar: MANIFEST
+	cd .. ; tar cvpfzT tramp/tramp.tar.gz MANIFEST ;	\
+	cp tramp/tramp.tar.gz tramp/tramp1-development.tar.gz ;	\
+	cp tramp/tramp.tar.gz tramp/tramp2-development.tar.gz ;	\
+	tar cvpfzT tramp/tramp-stable.tar.gz MANIFEST.stable
+
+dist: tar
+	install -m644 tramp.tar.gz /home-local/ftp/pub/src/emacs
+#	install -m644 lisp/tramp.el /home-local/ftp/pub/src/emacs
+
+install-html:
+	cd texi ; $(MAKE) install-html
+
+sourceforge: dist
+	cd texi ; $(MAKE) sourceforge
+	scp tramp.tar.gz kaig@tramp.sourceforge.net:/home/groups/t/tr/tramp/htdocs/download
+	( echo 'anonymous';				\
+	  echo prompt;					\
+	  echo hash;					\
+	  echo cd incoming;				\
+	  echo put tramp-stable.tar.gz;			\
+	  echo put tramp1-development.tar.gz;		\
+	  echo put tramp2-development.tar.gz;		\
+	  echo quit ) | ftp upload.sourceforge.net
+
+else
+# sjt OK, we found ../../XEmacs.rules, let's do it (whatever ``it'' is ;^)
+include Makefile.XEmacs
+endif
+
+# XEmacs Makefile for TRAMP
+
+# This file is part of XEmacs.
+
+# XEmacs is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2, or (at your option) any
+# later version.
+
+# XEmacs is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with XEmacs; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Author: Stephen J. Turnbull <stephen@xemacs.org>
+# Created: 2001 November 10
+
+# This Makefile requires GNU make.
+
+# #### This Makefile is a newt.  It'll get betta.
+
+VERSION = 0.50
+AUTHOR_VERSION = 2.46
+MAINTAINER = Stephen J. Turnbull <stephen@xemacs.org>
+# #### Should make this respect command line setting and allow tramp2
+PACKAGE = tramp
+PKG_TYPE = regular
+# external files required
+# from core: cl custom
+# from xemacs-packages: compile vc timer shell advice efs dired reporter
+# from mule-packages:
+# not found: vc-rcs
+# copied to TRAMP from elsewhere
+#     format-spec from Gnus 5.8, also in tar ball (REQUIRE gnus)
+#     base64 by Kyle Jones for mimencode methods (REQUIRE mail-lib)
+REQUIRES = tramp xemacs-base vc fsf-compat efs dired mail-lib gnus
+# tramp2 requires advice shell cl timer #### no more?
+# REQUIRES = xemacs-base fsf-compat
+CATEGORY = standard
+
+# #### This should be a standard variable.  See target upstream-cvs.update.
+PACKAGE_CVSROOT=:pserver:anonymous@cvs.tramp.sourceforge.net:/cvsroot/tramp
+
+TEXI_DIR = texi
+
+# These MUST be .elcs; bad things will happen (your sources will all
+# disappear when you clean!) if these are .els.
+ELCS = lisp/tramp-util.elc lisp/tramp.elc lisp/tramp-vc.elc lisp/trampcache.elc
+# tramp2 ELCS = lisp/tramp2-cache.elc lisp/tramp2-compat.elc \
+#       lisp/tramp2-enc.elc lisp/tramp2-hack.elc lisp/tramp2-ops.elc \
+#       lisp/tramp2-util.elc lisp/tramp2.elc
+
+# EXTRA_OBJS get cleaned by make clean
+EXTRA_OBJS = lisp.ChangeLog $(TEXI_DIR).ChangeLog
+# EXTRA_SOURCES get copied into the package
+# #### Adding EXTRA_OBJS should happen in XEmacs.rules?
+# Don't put ChangeLog in here, that gets picked up automatically
+EXTRA_SOURCES = CONTRIBUTORS $(EXTRA_OBJS)
+
+# We should put the Lisp ChangeLog in with the Lisp files, the Texinfo
+# ChangeLog in man/tramp, the top-level ChangeLog in etc/tramp, and create
+# a README which also goes in etc/tramp.
+#DATA_FILES = $(shell echo utils/*.?l)
+#DATA_DEST = $(PACKAGE)
+#DATA_1_FILES = $(shell echo tex/*.tex)
+#DATA_1_DEST = $(PACKAGE)/tex
+INFO_FILES = $(TEXI_DIR)/$(PACKAGE).info*
+TEXI_FILES = $(TEXI_DIR)/$(PACKAGE).texi
+MANUAL = $(PACKAGE)
+
+AUTOLOAD_PATH = lisp
+
+include ../../XEmacs.rules
+
+GENERATED += lisp/custom-load.elc
+
+.PHONY: extra-sources
+
+# We would like to make this generic by substituting $(PACKAGE) for tramp,
+# but there is no tramp2.texi.
+all:: $(AUTOLOAD_PATH)/auto-autoloads.elc $(ELCS) \
+	$(AUTOLOAD_PATH)/custom-load.elc $(TEXI_DIR)/tramp.info \
+	extra-objects
+
+# #### Bogosity, but what to do is not obvious.
+extra-objects:
+	cp lisp/ChangeLog lisp.ChangeLog
+	cp $(TEXI_DIR)/ChangeLog $(TEXI_DIR).ChangeLog
+
+$(TEXI_DIR)/tramp.info: $(TEXI_DIR)/tramp.texi
+	(cd $(TEXI_DIR); $(MAKEINFO) -o tramp.info tramp.texi)
+
+# #### This should be a standard target.
+upstream-cvs-update:
+	cvs -f -z3 -d $(PACKAGE_CVSROOT) update .
+
+# #### I don't know why you wouldn't be able to build a source package,
+# but that seems to be the case with a lot of packages with internal
+# structure (eg separate lisp and texinfo directories), so default to safe.
+# You can try substituting the active target below.
+# srckit: srckit-std
+srckit: 
+	@echo "You cannot build a source package for $(PACKAGE)"
+
+binkit: binkit-sourceinfo
+2001-11-30  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-handle-file-name-all-completions): Return nil
+	if filename contains a slash.
+	(tramp-handle-directory-file-name): New implementation.  From
+	Philippe Troin <phil@fifi.org>.
+
+2001-11-20  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (toplevel): Emit an error message if jka-compr is
+	already loaded.
+
+2001-11-08  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp-util.el (tramp-compile): Use
+	`tramp-handle-shell-command', not `shell-command'.
+
+2001-11-07  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp-util.el (tramp-compile): Make sure default-directory is
+	set correctly.
+
+	* tramp.el (tramp-post-connection): Don't send Perl `mime-encode'
+	and `mime-decode' implementations unless really needed.
+
+2001-11-02  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (file-expand-wildcards): Advise this function to work
+	around a problem in Emacs 20.x.  This is just a kludge!
+
+2001-10-16  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-open-connection-su): Make sure that user name is
+	given.
+
+2001-10-10  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-handle-file-name-directory): Return "/" if
+	`path' component is empty.
+
+2001-10-01  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-file-name-structure): Allow dot in host names.
+
+2001-09-29  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-file-name-structure): Make regexp less
+	restrictive to allow multi-hop filenames.
+
+2001-09-27  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-bug): Report more info about multi-hop methods.
+
+2001-09-24  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp-util.el (tramp-compile): require compile.
+
+2001-09-20  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-bug-report-address): Update to reflect move to
+	SourceForge.
+
+2001-09-09  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (Module): Add a todo item.
+
+2001-08-31  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp2.el (tramp2-setup-coding-system): Find a good coding
+	system in extra function so it can be customized via
+	tramp2-setup-functions.
+	(tramp2-execute-local): Set TERM to dumb, just to be on the safe
+	side.
+
+2001-08-12  Kai Grossjohann  <grossjoh@ls6.informatik.uni-dortmund.de>
+
+	* tramp.el: Default file name format changed again.  This time,
+	it's like /[method/user@host]/path/to/file.  The user@ part is
+	optional.  Multihop files are like
+	/[multiu/telnet:user@host/ssh:user2@host2]/path/to/file.
+
+2001-08-05  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el: Default file name format changed!  File names with
+	default method have changed from /r:user@host:/path/to/file to
+	/./user@host:/path/to/file.  Files with explicitly specified
+	method have changed from /r@meth:user@host:/path/to/file to
+	/./@meth:user@host:/path/to/file.  (Note one more colon for method
+	spec!)
+
+2001-07-31  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-barf-unless-okay): Add new arg `signal' and
+	signal that signal rather than calling `error'.
+
+2001-07-11  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-multi-file-name-hop-structure): Allow digits and
+	underscore in name of hop connection method.  Suggested by Alan
+	D. Salewski.
+	(tramp-multi-connect-su): Thinko in logic.  Reported by Alan
+	D. Salewski.
+
+2001-06-03  Kai Grossjohann  <grossjoh@ls6.informatik.uni-dortmund.de>
+
+	* tramp2.el (tramp2-execute-local): Set TERM environment variable
+	to dumb.
+
+2001-06-03  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-send-eof): Always send a literal Ctrl-D, even if
+	client is Windows.
+	(tramp-find-executable): Remove superfluous newline.
+	(tramp-handle-write-region): Remove superfluous `echo hello'
+	command which clobbers the exit status.
+	(tramp-handle-delete-file): Signal file error if deletion failed.
+	This depends on `rm -f' on the remote end to set the exit status
+	correctly.  This does not provide a meaningful message.  How do we
+	extract the error message from `rm -f' from the buffer?
+	(tramp-handle-write-region): Use "<<EOF" style of sending file
+	contents on standard input.  It seems the old way of omitting
+	"<<EOF" from the command, then using process-send-eof to indicate
+	end of file, sent an `exit' command to the shell.  This also
+	happens when sending an explicit Ctrl-D character.  This appears
+	to be needed for the `suu' method (while it is not needed for the
+	`sm' method).  Go figure.
+
+2001-05-28  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-open-connection-telnet): `tramp-read-passwd'
+	called with result of `tramp-wait-for-regexp'.  But the return
+	value of the latter changed, so adjust call of former accordingly.
+	(tramp-open-connection-su): Ditto.
+
+2001-05-28  Mark A. Hershberger  <mah@everybody.org>
+
+	*tramp.el (tramp-methods): Add new entry for smp method.
+	(tramp-perl-mime-encode): New variable to implement mime-encode.
+	(tramp-perl-mime-decode): New variable to implement mime-decode.
+	(tramp-post-connection): Send perl mime-{encode,decode} implementation.
+
+2001-05-28  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-open-connection-setup-interactive-shell): Do
+	`stty kill ^U' in case some system sets it to `@'.  Remove the
+	`stty erase ^?' from yesterday.
+	(tramp-open-connection-telnet): `tramp-wait-for-regexp' returns
+	list of strings, not just one string.  Adjust call of
+	`tramp-read-passwd' accordingly.
+	(tramp-open-connection-su): Ditto.
+
+2001-05-27  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-open-connection-setup-interactive-shell): Do
+	`stty erase ^?' in case some system sets it to `@'.  Suggested by
+	Stefan Monnier.
+
+2001-05-25  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-send-command-and-check): Add a space in the
+	shell command.  Suggested by Yuji Yamao.  (I don't really
+	understand this.)
+	New todo item.
+
+2001-05-03  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-bug): Typo in variables list.  Only include
+	backup-by-copying-when-privileged-mismatch if bound.
+	(tramp-file-name-structure): Allow uppercase characters in file
+	names.  [Would it have been better to bind case-fold-search?]
+
+2001-04-24  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-do-copy-or-rename-file): When moving, be sure to
+	delete the old file in all cases.
+
+2001-04-23  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-send-command-and-check): `2>/dev/null'
+	(tramp-check-ls-command): Don't `2>/dev/null', this is done in
+	tramp-send-command-and-check.
+
+2001-04-13  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-open-connection-setup-interactive-shell): Posix
+	shells don't allow you to turn off the history, so we redirect it
+	to an innocuous file and limits that file's size as much as
+	possible.
+	(tramp-find-executable): Be extra careful when searching for
+	executables, include sentinel string to search for.
+
+2001-04-12  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-handle-write-region): Don't use here document,
+	just send encoded file on stdin.  Suggested by Stefan Monnier.
+
+2001-03-16  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-multi-connect-su): Don't clobber `found'.
+
+2001-03-14  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-methods, tramp-telnet-args): New method
+	parameter `tramp-telnet-args'.
+	(tramp-get-telnet-args): New function.
+	(tramp-open-connection-telnet): Use it.
+
+2001-03-07  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-line-end-position): New implementation, moved to
+	beginning of file.
+	(tramp-multi-connect-rlogin): Unused variable `pw' deleted.
+	(tramp-discard-garbage-erase-buffer): More args.
+	(tramp-open-connection-setup-interactive-shell): Pass more args.
+	(tramp-wait-for-output): Unused variable `result' deleted.
+	(tramp-wait-for-output): Wrong variable.
+	(tramp-octal-to-decimal): Use `x'.
+	(tramp-get-rcp-args): Error message typo.
+	(tramp-temporary-file-directory): Pacify byte-compiler, use funcall.
+
+2001-03-04  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-handle-file-directory-p): Use `test -d' rather
+	than `cd' to check if a file is a directory.  Suggested by Stefan
+	Monnier.
+	(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. 
+
+2001-03-03  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-find-shell): Allow `$ ' as shell prompt after
+	starting a shell for tilde expansion.
+	(tramp-methods): Expand documentation for `tramp-methods'.
+	(tramp-methods): New method `smx' which is like `sm' but
+	unconditionally starts /bin/sh on the remote end.  This might
+	avoid shell startup overhead.  Patch by Michael Kifer.
+	(tramp-verbose): New default value `10', it seems most people need
+	to set it to this value, anyway, to see what's happening.
+	Suggested by Michael Kifer.
+
+2001-02-28  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-open-connection-rsh): Doc bug.  Reported by Tom
+	Roche. 
+
+2001-02-25  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-run-test2): Allow user1 and user2 to be nil.
+	Reported by Michael Kifer.
+
+2001-02-23  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* 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. 
+	(tramp-discard-garbage-erase-buffer): New function.
+	(tramp-open-connection-setup-interactive-shell): Use it.
+	(tramp-methods): New method for Kerberos and mimencode.
+	(tramp-find-executable): Avoid mentioning all directories on the
+	command line, instead send directory names on stdin.  Reported by
+	Paul Stevenson.
+
+2001-02-21  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-open-connection-setup-interactive-shell): Wait a
+	bit at the very beginning, in case the remote end feels like
+	sending some junk.  Reported by Francesco Potortě.
+
+2001-02-20  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-open-connection-setup-interactive-shell): Also
+	`unset CDPATH' for the ksh users.  Reported by Jim Greer.
+
+2001-02-19  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-wait-for-output): Clearer message when prompt is
+	not found.  Suggestion from Francesco Potortě.
+	(tramp-wait-for-regexp): Clearer message when regexp is not
+	found.  Suggestion from Francesco Potortě.
+
+2001-02-18  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-find-executable): Use "test -x $f -a -f $f" to
+	find out whether it's an executable.  Suggestion from Francesco
+	Potortě.
+
+2001-02-17  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp-vc.el: Require vc-rcs for `vc-rcs-release' if necessary.
+	(tramp-vc-workfile-unchanged-p): Compatibility with old and new VC.
+	(vc-checkout): Avoid byte-compiler warning.
+
+	* tramp.el (tramp-find-executable): Make sure that file is not a
+	directory.  Reported by Ed Sabol.
+	(tramp-open-connection-telnet): Remote login default to local
+	login, but only when actually sending the login name.  The other
+	functions (for buffer name and stuff) continue to pass `nil' for
+	the user.
+
+2001-02-16  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el: New todo item.
+	(tramp-terminal-type): Don't hardwire $TERM value when
+	opening a connection to the remote host.  Suggestion from rand at
+	meridian-enviro dot com.
+	(tramp-find-executable): Use a shell-based implementation for
+	tramp-find-executable.  Suggestion from Francesco Potortě.
+	(tramp-buffer-name, tramp-buffer-name-multi-method,
+	tramp-debug-buffer-name): Better buffer name format for omitted
+	user names.
+
+2001-01-19  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-handle-load): Call `load' on local copy with
+	fewer args for XEmacs compatibility.
+
+2001-01-18  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-open-connection-telnet,
+	tramp-open-connection-rsh, tramp-open-connection-su,
+	tramp-open-connection-multi): Locally bind TERM env var to "dumb"
+	before starting the login on the remote host.
+
+2001-01-13  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-handle-file-name-all-completions): Local
+	variable `dirs' not necessary anymore.  Kudos to Bruce Ingalls for
+	pointing this out.
+
+2001-01-10  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-open-connection-setup-interactive-shell): `unset
+	HISTFILE' rather than `set -o history' to turn off the history.
+	Pete Forman says this works on bash1 and bash2, but not for ksh or
+	a Posix sh.  He also says there's no way to turn history off for
+	ksh and Posix shells, except by invoking non-interactively.  I
+	won't do that, though, because I need the prompts.
+
+2001-01-03  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* base64.el: New version from Oort Gnus as of today.
+
+2000-12-16  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-post-connection): Search for a shell before
+	finding a command to check if a file exists.
+
+2000-11-18  Daniel Pittman  <daniel@rimspace.net>
+
+	* tramp-vc.el (tramp-handle-vc-user-login-name): Support the case
+	where the user name is `nil'
+
+2000-11-17  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-send-command-and-check): Send command and "echo
+	$?" as two separate commands.
+
+2000-11-15  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-handle-shell-command): Return exit status.
+
+	* tramp-vc.el (tramp-vc-do-command): Return exit status.
+	(tramp-vc-do-command-new): For the new VC that comes with Emacs
+	21.
+	(tramp-handle-vc-user-login-name): User part of a Tramp file name
+	structure might be empty.
+	(vc-user-login-name): Protect against `file' unbound.  (Assumes
+	local call in this case!)  Kudos to Hannu Koivisto for reporting
+	this.
+
+2000-11-09  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-methods): Change tramp-remote-sh to "/bin/sh"
+	from "" for the sudu and sudm methods.
+
+2000-11-01  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-dos-coding-system): New variable.
+	(tramp-open-connection-telnet, tramp-open-connection-rsh,
+	tramp-open-connection-su, tramp-open-connection-multi): Use it.
+	(tramp-coding-system-change-eol-conversion): New compat function.
+	(tramp-open-connection-setup-interactive-shell): Use it.
+
+2000-10-20  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-open-connection-telnet): Missed occurrences of
+	match-string. 
+	(tramp-open-connection-rsh): Dito.
+	(tramp-open-connection-su): Dito.
+	(tramp-multi-connect-telnet): Dito.
+	(tramp-multi-connect-rlogin): Dito.
+	(tramp-multi-connect-su): Dito.
+
+2000-10-20  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-open-connection-telnet): Don't bind
+	`coding-system-for-read' on Emacs 21.
+	(tramp-open-connection-rsh): Dito.
+	(tramp-open-connection-su): Dito.
+	(tramp-open-connection-multi): Dito.
+
+2000-10-20  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-wait-for-regexp): Return list of match-strings.
+	This way, communication with callers isn't done via global state.
+	(tramp-open-connection-telnet): Use it.
+	(tramp-open-connection-rsh): Dito.
+	(tramp-open-connection-su): Dito.
+	(tramp-multi-connect-telnet): Dito.
+	(tramp-multi-connect-rlogin): Dito.
+	(tramp-multi-connect-su): Dito.
+	(tramp-wait-for-output): From match data, compute list of
+	match-strings.  Used by tramp-wait-for-regexp.
+
+2000-10-06  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-handle-load): Tentative first implementation.
+
+2000-09-26  Henrik Holm  <henrik@ece.umn.edu>
+
+	* tramp.el (tramp-make-tramp-file-user-nil-format): New variable.
+	(tramp-open-connection-telnet): Work when USER is nil.
+	(tramp-open-connection-rsh): dito.
+	(tramp-open-connection-su): dito.
+	(tramp-multi-connect-telnet): dito.
+	(tramp-multi-connect-rlogin): dito.
+	(tramp-multi-connect-su): dito.
+	(tramp-make-rcp-program-file-name): dito.
+	(tramp-open-connection-multi): Don't grok default USER.
+	(tramp-pre-connection): Not changed.  tramp-current-user will be
+	set to nil when no user is given in the file name.
+	(tramp-dissect-multi-file-name): dito.
+	(tramp-dissect-file-name): Return nil when no user is given in
+	file name.
+
+2000-09-25  Henrik Holm  <henrik@ece.umn.edu>
+
+	* tramp.el: `An rcp file' --> `a tramp file', in various places.
+	(tramp-buffer-name): Correct typo.
+
+2000-09-17  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-file-exists-command): New Variable.
+	(tramp-handle-file-exists-p): Use it.
+	(tramp-find-file-exists-command): New function to initialize new
+	variable.
+	(tramp-post-connection): Use it.
+	(tramp-get-file-exists-command): Access variable.
+	(tramp-bug): Report a few more variable settings.
+
+2000-09-16  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-open-connection-setup-interactive-shell): Set
+	TERM=dumb as suggested by V. Balaji <vb@gfdl.gov>.
+
+2000-09-14  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-methods): Method `scpx' was missing a setting
+	for `tramp-remote-sh'.
+
+2000-09-09  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-handle-insert-directory): Try to improve the
+	logic as to what exactly is displayed.  The `/.' idea was snarfed
+	from the standard `insert-directory'.
+
+2000-09-01  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-file-name-structure): Move `-' to beginning of
+	[...].  Is this really necessary?  Well, it won't hurt.
+
+2000-08-31  Hilko Bengen  <bengen@vdst-ka.inka.de>
+
+	* tramp.el (tramp-file-name-structure): Allow `-' in user names.
+
+2000-08-29  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* Makefile (tramp.elc): Wrap long line.
+	(tramp-vc.elc): Frob load-path for byte-compilation because of
+	required libraries.
+
+	* tramp-vc.el: Move `provide' to end of file.
+	Require some needed libraries to avoid byte-compiler errors.
+
+	* tramp.el (tramp-handle-file-name-all-completions): Expand
+	DIRECTORY so that this also works with abbreviated file names.
+	(tramp-handle-file-newer-than-file-p): Bug with `signal'.
+	(tramp-handle-make-symbolic-link): Check that method, user, and
+	host are the same when making symlinks.
+	(tramp-bug): Report on more variables, change intro msg.
+
+2000-08-25  Yuji Yamano <yyamano@kt.rim.or.jp>
+
+	* 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-remote-path for the NetBSD packages.
+
+2000-08-19  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-multi-connect-su): Defer (erase-buffer) until
+	after the buffer contents are used.
+
+2000-08-18  Paul D. Smith  <pausmith@nortelnetworks.com>
+
+	* tramp.el (tramp-pre-connection): Locally (to the connection
+	buffer) set inhibit-eol-conversion to nil.
+
+2000-08-18  KOIE Hidetaka  <hide@koie.org>
+
+	* tramp.el (tramp-handle-insert-file-contents): Don't use
+	`no-conversion' coding system on the local copy.
+
+2000-08-18  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+
+	* tramp.el (tramp-handle-file-exists-p): Use `test -e', not `ls
+	-d'.
+	(tramp-open-connection-setup-interactive-shell),
+	(tramp-open-connection-telnet),
+	(tramp-open-connection-rsh),
+	(tramp-open-connection-su),
+	(tramp-open-connection-multi),
+	(tramp-multi-connect-telnet),
+	(tramp-multi-connect-telnet),
+	(tramp-multi-connect-rlogin),
+	(tramp-multi-connect-su): Erase buffer before sending next
+	command.
+	(tramp-handle-make-directory): Correct order of arguments for
+	tramp-barf-unless-okay.  Maybe I should be using keyword arguments
+	in this case...
+	(tramp-handle-insert-directory): Make it work with wildcards, too.
+
+INSTALL=install -m644
+FTPDIR=/home-local/ftp/pub/src/emacs
+SLISP=/app/unido-i06/sun4_56/edit/emacs/20.5/share/emacs/site-lisp
+
+all: tramp
+
+tramp: tramp.elc tramp-vc.elc tramp-util.elc
+
+base64.elc: base64.el
+	$(EMACS) -batch -f batch-byte-compile base64.el
+
+format-spec.elc: format-spec.el
+	$(EMACS) -batch -f batch-byte-compile format-spec.el
+
+tramp.elc: tramp.el base64.elc format-spec.elc
+	$(EMACS) -batch --eval "(add-to-list 'load-path \".\")" \
+		-f batch-byte-compile tramp.el
+
+tramp-vc.elc: tramp-vc.el tramp.elc
+	$(EMACS) -batch --eval "(add-to-list 'load-path \".\")" \
+		-f batch-byte-compile tramp-vc.el
+
+tramp-util.elc: tramp-util.el
+	$(EMACS) -batch --eval "(add-to-list 'load-path \".\")" \
+		-f batch-byte-compile tramp-util.el
+
+install: all
+	$(INSTALL) tramp.el $(FTPDIR)
+
+site-lisp: all
+	/usr/ucb/$(INSTALL) tramp.el $(SLISP)
+	cd $(SLISP) && emacs-20.5 -batch -f batch-byte-compile tramp.el
+
+clean:
+	$(RM) *.elc
+;;; base64.el,v --- Base64 encoding functions
+;; Author: Kyle E. Jones
+;; Created: 1997/03/12 14:37:09
+;; Version: 1.6
+;; Keywords: extensions
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Copyright (C) 1997 Kyle E. Jones
+;;;
+;;; This file is not part of GNU Emacs, but the same permissions apply.
+;;;
+;;; GNU Emacs is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 2, or (at your option)
+;;; any later version.
+;;;
+;;; GNU Emacs is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;;; Boston, MA 02111-1307, USA.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(eval-when-compile (require 'cl))
+
+;; For non-MULE
+(if (not (fboundp 'char-int))
+    (defalias 'char-int 'identity))
+
+(defvar base64-alphabet
+  "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")
+
+(defvar base64-decoder-program nil
+  "*Non-nil value should be a string that names a MIME base64 decoder.
+The program should expect to read base64 data on its standard
+input and write the converted data to its standard output.")
+
+(defvar base64-decoder-switches nil
+  "*List of command line flags passed to the command named by
+base64-decoder-program.")
+
+(defvar base64-encoder-program nil
+  "*Non-nil value should be a string that names a MIME base64 encoder.
+The program should expect arbitrary data on its standard
+input and write base64 data to its standard output.")
+
+(defvar base64-encoder-switches nil
+  "*List of command line flags passed to the command named by
+base64-encoder-program.")
+
+(defconst base64-alphabet-decoding-alist
+  '(
+    ( ?A . 00) ( ?B . 01) ( ?C . 02) ( ?D . 03) ( ?E . 04) ( ?F . 05)
+    ( ?G . 06) ( ?H . 07) ( ?I . 08) ( ?J . 09) ( ?K . 10) ( ?L . 11)
+    ( ?M . 12) ( ?N . 13) ( ?O . 14) ( ?P . 15) ( ?Q . 16) ( ?R . 17)
+    ( ?S . 18) ( ?T . 19) ( ?U . 20) ( ?V . 21) ( ?W . 22) ( ?X . 23)
+    ( ?Y . 24) ( ?Z . 25) ( ?a . 26) ( ?b . 27) ( ?c . 28) ( ?d . 29)
+    ( ?e . 30) ( ?f . 31) ( ?g . 32) ( ?h . 33) ( ?i . 34) ( ?j . 35)
+    ( ?k . 36) ( ?l . 37) ( ?m . 38) ( ?n . 39) ( ?o . 40) ( ?p . 41)
+    ( ?q . 42) ( ?r . 43) ( ?s . 44) ( ?t . 45) ( ?u . 46) ( ?v . 47)
+    ( ?w . 48) ( ?x . 49) ( ?y . 50) ( ?z . 51) ( ?0 . 52) ( ?1 . 53)
+    ( ?2 . 54) ( ?3 . 55) ( ?4 . 56) ( ?5 . 57) ( ?6 . 58) ( ?7 . 59)
+    ( ?8 . 60) ( ?9 . 61) ( ?+ . 62) ( ?/ . 63)
+    ))
+
+(defvar base64-alphabet-decoding-vector
+  (let ((v (make-vector 123 nil))
+	(p base64-alphabet-decoding-alist))
+    (while p
+      (aset v (car (car p)) (cdr (car p)))
+      (setq p (cdr p)))
+    v))
+
+(defvar base64-binary-coding-system 'binary)
+
+(defun base64-run-command-on-region (start end output-buffer command
+					   &rest arg-list)
+  (let ((tempfile nil) status errstring default-process-coding-system 
+	(coding-system-for-write base64-binary-coding-system)
+	(coding-system-for-read base64-binary-coding-system))
+    (unwind-protect
+	(progn
+	  (setq tempfile (make-temp-name "base64"))
+	  (setq status
+		(apply 'call-process-region
+		       start end command nil
+		       (list output-buffer tempfile)
+		       nil arg-list))
+	  (cond ((equal status 0) t)
+		((zerop (save-excursion
+			  (set-buffer (find-file-noselect tempfile))
+			  (buffer-size)))
+		 t)
+		(t (save-excursion
+		     (set-buffer (find-file-noselect tempfile))
+		     (setq errstring (buffer-string))
+		     (kill-buffer nil)
+		     (cons status errstring)))))
+      (ignore-errors
+	(delete-file tempfile)))))
+
+(if (featurep 'xemacs)
+    (defalias 'base64-insert-char 'insert-char)
+  (defun base64-insert-char (char &optional count ignored buffer)
+    (if (or (null buffer) (eq buffer (current-buffer)))
+	(insert-char char count)
+      (with-current-buffer buffer
+	(insert-char char count))))
+  (setq base64-binary-coding-system 'no-conversion))
+
+(defun base64-decode-region (start end)
+  (interactive "r")
+  ;;(message "Decoding base64...")
+  (let ((work-buffer nil)
+	(done nil)
+	(counter 0)
+	(bits 0)
+	(lim 0) inputpos
+	(non-data-chars (concat "^=" base64-alphabet)))
+    (unwind-protect
+	(save-excursion
+	  (setq work-buffer (generate-new-buffer " *base64-work*"))
+	  (buffer-disable-undo work-buffer)
+	  (if base64-decoder-program
+	      (let* ((binary-process-output t) ; any text already has CRLFs
+		     (status (apply 'base64-run-command-on-region
+				    start end work-buffer
+				    base64-decoder-program
+				    base64-decoder-switches)))
+		(if (not (eq status t))
+		    (error "%s" (cdr status))))
+	    (goto-char start)
+	    (skip-chars-forward non-data-chars end)
+	    (while (not done)
+	      (setq inputpos (point))
+	      (cond
+	       ((> (skip-chars-forward base64-alphabet end) 0)
+		(setq lim (point))
+		(while (< inputpos lim)
+		  (setq bits (+ bits
+				(aref base64-alphabet-decoding-vector
+				      (char-int (char-after inputpos)))))
+		  (setq counter (1+ counter)
+			inputpos (1+ inputpos))
+		  (cond ((= counter 4)
+			 (base64-insert-char (lsh bits -16) 1 nil work-buffer)
+			 (base64-insert-char (logand (lsh bits -8) 255) 1 nil
+					     work-buffer)
+			 (base64-insert-char (logand bits 255) 1 nil
+					     work-buffer)
+			 (setq bits 0 counter 0))
+			(t (setq bits (lsh bits 6)))))))
+	      (cond
+	       ((or (= (point) end)
+		    (eq (char-after (point)) ?=))
+		(if (and (= (point) end) (> counter 1))
+		    (message 
+		     "at least %d bits missing at end of base64 encoding"
+		     (* (- 4 counter) 6)))
+		(setq done t)
+		(cond ((= counter 1)
+		       (error "at least 2 bits missing at end of base64 encoding"))
+		      ((= counter 2)
+		       (base64-insert-char (lsh bits -10) 1 nil work-buffer))
+		      ((= counter 3)
+		       (base64-insert-char (lsh bits -16) 1 nil work-buffer)
+		       (base64-insert-char (logand (lsh bits -8) 255)
+					   1 nil work-buffer))
+		      ((= counter 0) t)))
+	       (t (skip-chars-forward non-data-chars end)))))
+	  (or (markerp end) (setq end (set-marker (make-marker) end)))
+	  (goto-char start)
+	  (insert-buffer-substring work-buffer)
+	  (delete-region (point) end))
+      (and work-buffer (kill-buffer work-buffer))))
+  ;;(message "Decoding base64... done")
+  )
+
+(defun base64-encode-region (start end &optional no-line-break)
+  (interactive "r")
+  (message "Encoding base64...")
+  (let ((work-buffer nil)
+	(counter 0)
+	(cols 0)
+	(bits 0)
+	(alphabet base64-alphabet)
+	inputpos)
+    (unwind-protect
+	(save-excursion
+	  (setq work-buffer (generate-new-buffer " *base64-work*"))
+	  (buffer-disable-undo work-buffer)
+	  (if base64-encoder-program
+	      (let ((status (apply 'base64-run-command-on-region
+				   start end work-buffer
+				   base64-encoder-program
+				   base64-encoder-switches)))
+		(if (not (eq status t))
+		    (error "%s" (cdr status))))
+	    (setq inputpos start)
+	    (while (< inputpos end)
+	      (setq bits (+ bits (char-int (char-after inputpos))))
+	      (setq counter (1+ counter))
+	      (cond ((= counter 3)
+		     (base64-insert-char (aref alphabet (lsh bits -18)) 1 nil
+					 work-buffer)
+		     (base64-insert-char
+		      (aref alphabet (logand (lsh bits -12) 63))
+		      1 nil work-buffer)
+		     (base64-insert-char
+		      (aref alphabet (logand (lsh bits -6) 63))
+		      1 nil work-buffer)
+		     (base64-insert-char
+		      (aref alphabet (logand bits 63))
+		      1 nil work-buffer)
+		     (setq cols (+ cols 4))
+		     (cond ((and (= cols 72)
+				 (not no-line-break))
+			    (base64-insert-char ?\n 1 nil work-buffer)
+			    (setq cols 0)))
+		     (setq bits 0 counter 0))
+		    (t (setq bits (lsh bits 8))))
+	      (setq inputpos (1+ inputpos)))
+	    ;; write out any remaining bits with appropriate padding
+	    (if (= counter 0)
+		nil
+	      (setq bits (lsh bits (- 16 (* 8 counter))))
+	      (base64-insert-char (aref alphabet (lsh bits -18)) 1 nil
+				  work-buffer)
+	      (base64-insert-char (aref alphabet (logand (lsh bits -12) 63))
+				  1 nil work-buffer)
+	      (if (= counter 1)
+		  (base64-insert-char ?= 2 nil work-buffer)
+		(base64-insert-char (aref alphabet (logand (lsh bits -6) 63))
+				    1 nil work-buffer)
+		(base64-insert-char ?= 1 nil work-buffer)))
+	    (if (and (> cols 0)
+		     (not no-line-break))
+	    	(base64-insert-char ?\n 1 nil work-buffer)))
+	  (or (markerp end) (setq end (set-marker (make-marker) end)))
+	  (goto-char start)
+	  (insert-buffer-substring work-buffer)
+	  (delete-region (point) end))
+      (and work-buffer (kill-buffer work-buffer))))
+  (message "Encoding base64... done"))
+
+(defun base64-encode (string &optional no-line-break)
+  (save-excursion
+    (set-buffer (get-buffer-create " *base64-encode*"))
+    (erase-buffer)
+    (insert string)
+    (base64-encode-region (point-min) (point-max) no-line-break)
+    (skip-chars-backward " \t\r\n")
+    (delete-region (point-max) (point))
+    (prog1
+	(buffer-string)
+      (kill-buffer (current-buffer)))))
+
+(defun base64-decode (string)
+  (save-excursion
+    (set-buffer (get-buffer-create " *base64-decode*"))
+    (erase-buffer)
+    (insert string)
+    (base64-decode-region (point-min) (point-max))
+    (goto-char (point-max))
+    (skip-chars-backward " \t\r\n")
+    (delete-region (point-max) (point))
+    (prog1
+	(buffer-string)
+      (kill-buffer (current-buffer)))))
+
+(defalias 'base64-decode-string 'base64-decode)
+(defalias 'base64-encode-string 'base64-encode)
+
+(provide 'base64)

lisp/format-spec.el

+;;; format-spec.el --- functions for formatting arbitrary formatting strings
+;; Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+
+;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
+;; Keywords: tools
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;;; Code:
+
+(eval-when-compile (require 'cl))
+
+(defun format-spec (format specification)
+  "Return a string based on FORMAT and SPECIFICATION.
+FORMAT is a string containing `format'-like specs like \"bash %u %k\",
+while SPECIFICATION is an alist mapping from format spec characters
+to values."
+  (with-temp-buffer
+    (insert format)
+    (goto-char (point-min))
+    (while (search-forward "%" nil t)
+      (cond
+       ;; Quoted percent sign.
+       ((eq (char-after) ?%)
+	(delete-char 1))
+       ;; Valid format spec.
+       ((looking-at "\\([-0-9.]*\\)\\([a-zA-Z]\\)")
+	(let* ((num (match-string 1))
+	       (spec (string-to-char (match-string 2)))
+	       (val (cdr (assq spec specification))))
+	  (delete-region (1- (match-beginning 0)) (match-end 0))
+	  (unless val
+	    (error "Invalid format character: %s" spec))
+	  (insert (format (concat "%" num "s") val))))
+       ;; Signal an error on bogus format strings.
+       (t
+	(error "Invalid format string"))))
+    (buffer-string)))
+
+(defun format-spec-make (&rest pairs)
+  "Return an alist suitable for use in `format-spec' based on PAIRS.
+PAIRS is a list where every other element is a character and a value,
+starting with a character."
+  (let (alist)
+    (while pairs
+      (unless (cdr pairs)
+	(error "Invalid list of pairs"))
+      (push (cons (car pairs) (cadr pairs)) alist)
+      (setq pairs (cddr pairs)))
+    (nreverse alist)))
+
+(provide 'format-spec)
+
+;;; format-spec.el ends here

lisp/tramp-util.el

+;;; tramp-util.el --- Misc utility functions to use with Tramp
+
+;; Copyright (C) 2001  Free Software Foundation, Inc.
+
+;; Author: Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
+;; Keywords: comm, extensions, processes
+
+;; This file is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; This file is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; Some misc. utility functions that might go nicely with Tramp.
+;; Mostly, these are kluges awaiting real solutions later on.
+
+;;; Code:
+
+(require 'compile)
+
+(defun tramp-compile (command)
+  "Compile on remote host."
+  (interactive
+   (if (or compilation-read-command current-prefix-arg)
+       (list (read-from-minibuffer "Compile command: "
+                                   compile-command nil nil
+                                   '(compile-history . 1)))
+     (list compile-command)))
+  (setq compile-command command)
+  (save-some-buffers (not compilation-ask-about-save) nil)
+  (let ((d default-directory))
+    (save-excursion
+      (pop-to-buffer (get-buffer-create "*Compilation*") t)
+      (erase-buffer)
+      (setq default-directory d)))
+  (tramp-handle-shell-command command (get-buffer "*Compilation*"))
+  (pop-to-buffer (get-buffer "*Compilation*"))
+  (compilation-minor-mode 1))
+
+(provide 'tramp-util)
+;;; tramp-util.el ends here
+;;; tramp-vc.el --- Version control integration for TRAMP.el
+
+;; Copyright (C) 2000 by Free Software Foundation, Inc.
+
+;; Author: Daniel Pittman <daniel@danann.net>
+;; Keywords: comm, processes
+;; Version: $Id$
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; See the main module, 'tramp.el' for discussion of the purpose of TRAMP.
+;; This module provides integration between remote files accessed by TRAMP and
+;; the Emacs version control system.
+
+;;; Code:
+
+(eval-when-compile
+  (require 'cl))
+(require 'vc)
+;; Old VC defines vc-rcs-release in vc.el, new VC requires extra module.
+(unless (boundp 'vc-rcs-release)
+  (require 'vc-rcs))
+(require 'tramp)
+
+;; -- vc --
+
+;; 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.
+;;
+;; I have removed it from the tramp-file-name-handler-alist because the
+;; shortened version does nothing. This is for reference only now.
+;;
+;; Daniel Pittman <daniel@danann.net>
+;;
+;; (defun tramp-handle-vc-registered (file)
+;;   "Like `vc-registered' for tramp files."
+;;   (tramp-run-real-handler 'vc-registered (list file)))
+
+;; `vc-do-command'
+;; This function does not deal well with remote files, so we define
+;; our own version and make a backup of the original function and
+;; call our version for tramp files and the original version for
+;; normal files.
+
+;; The following function is pretty much copied from vc.el, but
+;; the part that actually executes a command is changed.
+;; CCC: this probably works for Emacs 21, too.
+(defun tramp-vc-do-command (buffer okstatus command file last &rest flags)
+  "Like `vc-do-command' but invoked for tramp files.
+See `vc-do-command' for more information."
+  (save-match-data
+    (and file (setq file (tramp-handle-expand-file-name file)))
+    (if (not buffer) (setq buffer "*vc*"))
+    (if vc-command-messages
+	(message "Running `%s' on `%s'..." command file))
+    (let ((obuf (current-buffer)) (camefrom (current-buffer))
+	  (squeezed nil)
+	  (olddir default-directory)
+	  vc-file status)
+      (let* ((v (tramp-dissect-file-name (tramp-handle-expand-file-name file)))
+	     (multi-method (tramp-file-name-multi-method v))
+	     (method (tramp-file-name-method v))
+	     (user (tramp-file-name-user v))
+	     (host (tramp-file-name-host v))
+	     (path (tramp-file-name-path v)))
+	(set-buffer (get-buffer-create buffer))
+	(set (make-local-variable 'vc-parent-buffer) camefrom)
+	(set (make-local-variable 'vc-parent-buffer-name)
+	     (concat " from " (buffer-name camefrom)))
+	(setq default-directory olddir)
+    
+	(erase-buffer)
+
+	(mapcar
+	 (function
+	  (lambda (s) (and s (setq squeezed (append squeezed (list s))))))
+	 flags)
+	(if (and (eq last 'MASTER) file
+		 (setq vc-file (vc-name file)))
+	    (setq squeezed
+		  (append squeezed
+			  (list (tramp-file-name-path
+				 (tramp-dissect-file-name vc-file))))))
+	(if (and file (eq last 'WORKFILE))
+	    (progn
+	      (let* ((pwd (expand-file-name default-directory))
+		     (preflen (length pwd)))
+		(if (string= (substring file 0 preflen) pwd)
+		    (setq file (substring file preflen))))
+	      (setq squeezed (append squeezed (list file)))))
+	;; Unless we (save-window-excursion) the layout of windows in
+	;; the current frame changes. This is painful, at best.
+	;;
+	;; As a point of note, (save-excursion) is still here only because
+	;; it preserves (point) in the current buffer. (save-window-excursion)
+	;; does not, at least under XEmacs 21.2.
+	;;
+	;; I trust that the FSF support this as well. I can't find useful
+	;; documentation to check :(
+	;;
+	;; Daniel Pittman <daniel@danann.net>
+	(save-excursion
+	  (save-window-excursion
+	    ;; Actually execute remote command
+	    (tramp-handle-shell-command
+	     (mapconcat 'tramp-shell-quote-argument
+			(cons command squeezed) " ") t)
+	    ;;(tramp-wait-for-output)
+	    ;; Get status from command
+	    (tramp-send-command multi-method method user host "echo $?")
+	    (tramp-wait-for-output)
+	    ;; Make sure to get status from last line of output.
+	    (goto-char (point-max)) (forward-line -1)
+	    (setq status (read (current-buffer)))
+	    (message "Command %s returned status %d." command status)))
+	(goto-char (point-max))
+	(set-buffer-modified-p nil)
+	(forward-line -1)
+	(if (or (not (integerp status)) (and okstatus (< okstatus status)))
+	    (progn
+	      (pop-to-buffer buffer)
+	      (goto-char (point-min))
+	      (shrink-window-if-larger-than-buffer)
+	      (error "Running `%s'...FAILED (%s)" command
+		     (if (integerp status)
+			 (format "status %d" status)
+		       status))
+	      )
+	  (if vc-command-messages
+	      (message "Running %s...OK" command))
+	  )
+	(set-buffer obuf)
+	status))
+    ))
+
+;; Following code snarfed from Emacs 21 vc.el and slightly tweaked.
+(defun tramp-vc-do-command-new (buffer okstatus command file &rest flags)
+  "Like `vc-do-command' but for TRAMP files.
+This function is for the new VC which comes with Emacs 21.
+Since TRAMP doesn't do async commands yet, this function doesn't, either."
+  (and file (setq file (expand-file-name file)))
+  (if vc-command-messages
+      (message "Running %s on %s..." command file))
+  (save-current-buffer
+    (unless (eq buffer t) (vc-setup-buffer buffer))
+    (let ((squeezed nil)
+	  (inhibit-read-only t)
+	  (status 0))
+      (let* ((v (when file (tramp-dissect-file-name file)))
+             (multi-method (when file (tramp-file-name-multi-method v)))
+             (method (when file (tramp-file-name-method v)))
+             (user (when file (tramp-file-name-user v)))
+             (host (when file (tramp-file-name-host v)))
+             (path (when file (tramp-file-name-path v))))
+      (setq squeezed (delq nil (copy-sequence flags)))
+      (when file
+	(setq squeezed (append squeezed (list path))))
+      (let ((w32-quote-process-args t))
+        (when (eq okstatus 'async)
+          (message "Tramp doesn't do async commands, running synchronously."))
+        (setq status (tramp-handle-shell-command
+                      (mapconcat 'tramp-shell-quote-argument
+                                 (cons command squeezed) " ") t))
+        (when (or (not (integerp status)) (and okstatus (< okstatus status)))
+          (pop-to-buffer (current-buffer))
+          (goto-char (point-min))
+          (shrink-window-if-larger-than-buffer)
+          (error "Running %s...FAILED (%s)" command
+                 (if (integerp status) (format "status %d" status) status))))
+      (if vc-command-messages
+          (message "Running %s...OK" command))
+      (vc-exec-after
+       `(run-hook-with-args
+         'vc-post-command-functions ',command ',path ',flags))
+      status))))
+
+
+;; The context for a VC command is the current buffer.
+;; That makes a test on the buffers file more reliable than a test on the
+;; arguments.
+;; This is needed to handle remote VC correctly - else we test against the
+;; local VC system and get things wrong...
+;; Daniel Pittman <daniel@danann.net>
+;;-(if (fboundp 'vc-call-backend)
+;;-    () ;; This is the new VC for which we don't have an appropriate advice yet
+(if (fboundp 'vc-call-backend)
+    (defadvice vc-do-command
+      (around tramp-advice-vc-do-command
+              (buffer okstatus command file &rest flags)
+              activate)
+      "Invoke tramp-vc-do-command for tramp files."
+      (let ((file (symbol-value 'file)))    ;pacify byte-compiler
+        (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 
+                         file ;(or file (buffer-file-name))
+                         flags))
+          ad-do-it)))
+  (defadvice vc-do-command
+    (around tramp-advice-vc-do-command
+            (buffer okstatus command file last &rest flags)
+            activate)
+    "Invoke tramp-vc-do-command for tramp files."
+    (let ((file (symbol-value 'file)))  ;pacify byte-compiler
+      (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 
+                       (or file (buffer-file-name)) last flags))
+        ad-do-it))))
+;;-)
+
+
+;; XEmacs uses this to do some of its work. Like vc-do-command, we
+;; need to enhance it to make VC work via TRAMP-mode.
+;;
+;; Like the previous function, this is a cut-and-paste job from the VC
+;; file. It's based on the vc-do-command code.
+;; CCC: this isn't used in Emacs 21, so do as before.
+(defun tramp-vc-simple-command (okstatus command file &rest args)
+  ;; Simple version of vc-do-command, for use in vc-hooks only.
+  ;; Don't switch to the *vc-info* buffer before running the
+  ;; command, because that would change its default directory
+  (save-match-data
+    (let* ((v (tramp-dissect-file-name (tramp-handle-expand-file-name file)))
+	   (multi-method (tramp-file-name-multi-method v))
+	   (method (tramp-file-name-method v))
+	   (user (tramp-file-name-user v))
+	   (host (tramp-file-name-host v))
+	   (path (tramp-file-name-path v)))
+      (save-excursion (set-buffer (get-buffer-create "*vc-info*"))
+		      (erase-buffer))
+      (let ((exec-path (append vc-path exec-path)) exec-status
+	    ;; Add vc-path to PATH for the execution of this command.
+	    (process-environment
+	     (cons (concat "PATH=" (getenv "PATH")
+			   path-separator
+			   (mapconcat 'identity vc-path path-separator))
+		   process-environment)))
+	;; Call the actual process. See tramp-vc-do-command for discussion of
+	;; why this does both (save-window-excursion) and (save-excursion).
+	;;
+	;; As a note, I don't think that the process-environment stuff above
+	;; has any effect on the remote system. This is a hard one though as
+	;; there is no real reason to expect local and remote paths to be
+	;; identical...
+	;;
+	;; Daniel Pittman <daniel@danann.net>
+	(save-excursion
+	  (save-window-excursion
+	    ;; Actually execute remote command
+	    (tramp-handle-shell-command
+	     (mapconcat 'tramp-shell-quote-argument
+			(append (list command) args (list path)) " ")
+	     (get-buffer-create"*vc-info*"))
+					;(tramp-wait-for-output)
+	    ;; Get status from command
+	    (tramp-send-command multi-method method user host "echo $?")
+	    (tramp-wait-for-output)
+	    (setq exec-status (read (current-buffer)))
+	    (message "Command %s returned status %d." command exec-status)))
+      
+	(cond ((> exec-status okstatus)
+	       (switch-to-buffer (get-file-buffer file))
+	       (shrink-window-if-larger-than-buffer
+		(display-buffer "*vc-info*"))
+	       (error "Couldn't find version control information")))
+	exec-status))))
+
+;; This function does not exist any more in Emacs-21's VC
+(defadvice vc-simple-command
+  (around tramp-advice-vc-simple-command
+	  (okstatus command file &rest args)
+	  activate)
+  "Invoke tramp-vc-simple-command for tramp files."
+  (let ((file (symbol-value 'file)))    ;pacify byte-compiler
+    (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 
+                     (or file (buffer-file-name)) args))
+      ad-do-it)))
+
+
+;; `vc-workfile-unchanged-p'
+;; This function does not deal well with remote files, so we do the
+;; same as for `vc-do-command'.
+
+;; `vc-workfile-unchanged-p' checks the modification time, we cannot
+;; do that for remote files, so here's a version which relies on diff.
+;; CCC: this one probably works for Emacs 21, too.
+(defun tramp-vc-workfile-unchanged-p
+  (filename &optional want-differences-if-changed)
+  (if (fboundp 'vc-backend-diff)
+      ;; Old VC.  Call `vc-backend-diff'.
+      (let ((status (funcall (symbol-function 'vc-backend-diff)
+                             filename nil nil
+                             (not want-differences-if-changed))))
+        (zerop status))
+    ;; New VC.  Call `vc-default-workfile-unchanged-p'.
+    (vc-default-workfile-unchanged-p filename)))
+
+(defadvice vc-workfile-unchanged-p
+  (around tramp-advice-vc-workfile-unchanged-p
+          (filename &optional want-differences-if-changed)
+          activate)
+  "Invoke tramp-vc-workfile-unchanged-p for tramp files."
+  (if (and (stringp filename)
+	   (tramp-tramp-file-p filename)
+	   (not
+	    (let ((v	(tramp-dissect-file-name filename)))
+	      (tramp-get-remote-perl (tramp-file-name-multi-method v)
+				   (tramp-file-name-method v)
+				   (tramp-file-name-user v)
+				   (tramp-file-name-host v)))))
+      (setq ad-return-value
+            (tramp-vc-workfile-unchanged-p filename want-differences-if-changed))
+    ad-do-it))
+
+
+;; Redefine a function from vc.el -- allow tramp files.
+;; `save-match-data' seems not to be required -- it isn't in
+;; the original version, either.
+;; CCC: this might need some work -- how does the Emacs 21 version
+;; work, anyway?  Does it work over ange-ftp?  Hm.
+(if (not (fboundp 'vc-backend-checkout))
+    () ;; our replacement won't work and is unnecessary anyway
+(defun vc-checkout (filename &optional writable rev)
+  "Retrieve a copy of the latest version of the given file."
+  ;; If ftp is on this system and the name matches the ange-ftp format
+  ;; for a remote file, the user is trying something that won't work.
+  (funcall (symbol-function 'vc-backend-checkout) filename writable rev)
+  (vc-resynch-buffer filename t t))
+)
+
+
+;; Do we need to advise the vc-user-login-name function anyway?
+;; 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 
+;; local login name, something that may be different to the remote
+;; 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, 
+;; the thing didn't work right otherwise ;)
+;;
+;; Daniel Pittman <daniel@danann.net>
+
+(defun tramp-handle-vc-user-login-name (&optional uid)
+  "Return the default user name on the remote machine.
+Whenever VC calls this function, `file' is bound to the file name
+in question.  If no uid is provided or the uid is equal to the uid
+owning the file, then we return the user name given in the file name.
+
+This should only be called when `file' is bound to the
+filename we are thinking about..."
+  ;; Pacify byte-compiler; this symbol is bound in the calling
+  ;; function.  CCC: Maybe it would be better to move the
+  ;; boundness-checking into this function?
+  (let ((file (symbol-value 'file)))
+    (if (and uid (/= uid (nth 2 (file-attributes file))))
+	(error "tramp-handle-vc-user-login-name cannot map a uid to a name")
+      (let* ((v (tramp-dissect-file-name (tramp-handle-expand-file-name file)))
+	     (u (tramp-file-name-user v)))
+	(cond ((stringp u) u)
+	      ((vectorp u) (elt u (1- (length u))))
+	      ((null    u) (user-login-name))
+	      (t	   (error "tramp-handle-vc-user-login-name cannot cope!")))))))
+
+
+(defadvice vc-user-login-name
+  (around tramp-vc-user-login-name activate)
+  "Support for files on remote machines accessed by TRAMP."
+  ;; We rely on the fact that `file' is bound when this is called.
+  ;; This appears to be the case everywhere in vc.el and vc-hooks.el
+  ;; as of Emacs 20.5.
+  ;;
+  ;; CCC TODO there should be a real solution!  Talk to Andre Spiegel
+  ;; about this.
+  (let ((file (when (boundp 'file)
+                (symbol-value 'file))))    ;pacify byte-compiler
+    (or (and (stringp file)
+             (tramp-tramp-file-p file)	; tramp file
+             (setq ad-return-value
+		   (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 
+	    (tramp-handle-expand-file-name filename))))
+    (if (not (tramp-handle-file-exists-p filename))
+        nil                             ; file cannot be opened
+      ;; file exists, find out stuff
+      (save-excursion
+        (tramp-send-command
+         (tramp-file-name-multi-method v) (tramp-file-name-method v)
+         (tramp-file-name-user v) (tramp-file-name-host v)
+         (format "%s -Lld %s"
+                 (tramp-get-ls-command (tramp-file-name-multi-method v)
+                                     (tramp-file-name-method v)
+                                     (tramp-file-name-user v)
+                                     (tramp-file-name-host v))
+                 (tramp-shell-quote-argument (tramp-file-name-path v))))
+        (tramp-wait-for-output)
+        ;; parse `ls -l' output ...
+        ;; ... file mode flags
+        (read (current-buffer))
+        ;; ... number links
+        (read (current-buffer))
+        ;; ... uid (as a string)
+        (symbol-name (read (current-buffer)))))))
+
+;; Wire ourselves into the VC infrastructure...
+;; This function does not exist any more in Emacs-21's VC
+;; CCC: it appears that no substitute is needed for Emacs 21.
+(defadvice vc-file-owner
+  (around tramp-vc-file-owner activate)
+  "Support for files on remote machines accessed by TRAMP."
+  (let ((filename (ad-get-arg 0)))
+    (or (and (tramp-file-name-p filename) ; tramp file
+             (setq ad-return-value
+		   (save-match-data
+		     (tramp-file-owner filename)))) ; get the owner name
+        ad-do-it)))                     ; else call the original
+
+
+;; We need to make the version control software backend version
+;; information local to the current buffer. This is because each TRAMP
+;; buffer can (theoretically) have a different VC version and I am
+;; *way* too lazy to try and push the correct value into each new
+;; buffer.
+;;
+;; Remote VC costs will just have to be paid, at least for the moment.
+;; Well, at least, they will right until I feel guilty about doing a
+;; botch job here and fix it. :/
+;;
+;; Daniel Pittman <daniel@danann.net>
+;; CCC: this is probably still needed for Emacs 21.
+(defun tramp-vc-setup-for-remote ()
+  "Make the backend release variables buffer local.
+This makes remote VC work correctly at the cost of some processing time."
+  (when (and (buffer-file-name)
+             (tramp-tramp-file-p (buffer-file-name)))
+    (make-local-variable 'vc-rcs-release)
+    (setq vc-rcs-release nil)))
+(add-hook 'find-file-hooks 'tramp-vc-setup-for-remote t)
+
+;; No need to load this again if anyone asks.
+(provide 'tramp-vc)
+
+;;; tramp-vc.el ends here
+;;; tramp.el --- Transparent Remote Access, Multiple Protocol -*- coding: iso-8859-1; -*- 
+
+;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+
+;; Author: Kai.Grossjohann@CS.Uni-Dortmund.DE 
+;; Keywords: comm, processes
+;; Version: $Id$
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; This package provides remote file editing, similar to ange-ftp.
+;; The difference is that ange-ftp uses FTP to transfer files between
+;; the local and the remote host, whereas tramp.el uses a combination
+;; of rsh and rcp or other work-alike programs, such as ssh/scp.
+;;
+;; For more detailed instructions, please see the info file, which is
+;; included in the file `tramp.tar.gz' mentioned below.
+;;
+;; 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
+;; package `fsf-compat' for the `with-timeout' macro.)
+;;
+;; This version might not work with pre-Emacs 21 VC unless VC is
+;; loaded before tramp.el.  Could you please test this and tell me about
+;; the result?  Thanks.
+;;
+;; Also see the todo list at the bottom of this file.
+;;
+;; The current version of tramp.el can be retrieved from the following
+;; URL:  ftp://ls6-ftp.cs.uni-dortmund.de/pub/src/emacs/tramp.tar.gz
+;; For your convenience, the *.el file is available separately from
+;; the same directory.
+;;
+;; There's a mailing list for this, as well.  Its name is:
+;;                tramp-devel@lists.sourceforge.net
+;; 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@lists.sourceforge.net
+;; You can also use the Web to subscribe, under the following URL:
+;;            http://lists.sourceforge.net/lists/listinfo/tramp-devel
+;;
+;; For the adventurous, the current development sources are available
+;; via CVS.  You can find instructions about this at the following URL:
+;;            http://sourceforge.net/projects/tramp/
+;; Click on "CVS" in the navigation bar near the top.
+;;
+;; Don't forget to put on your asbestos longjohns, first!
+
+;;; Code:
+
+(defconst tramp-version "$Id$"
+  "This version of tramp.")
+(defconst tramp-bug-report-address "tramp-devel@lists.sourceforge.net"
+  "Email address to send bug reports to.")
+
+(require 'timer)
+(require 'format-spec)                  ;from Gnus 5.8, also in tar ball
+(require 'base64)                       ;for the mimencode methods
+(require 'shell)
+(require 'advice)
+
+;; It does not work to load EFS after loading TRAMP.  
+(when (fboundp 'efs-file-handler-function)
+  (require 'efs))
+
+;; It does not work to load Tramp after loading jka-compr.  Emacs 21.2
+;; might have a fix for this, so this code can be disabled in the
+;; future.
+(when (and (boundp 'auto-compression-mode)
+	   (symbol-value 'auto-compression-mode))
+  (error "Must load Tramp before enabling `auto-compression-mode'."))
+
+(eval-when-compile
+  (require 'cl)
+  (require 'custom)
+  ;; Emacs 19.34 compatibility hack -- is this needed?
+  (or (>= emacs-major-version 20)
+      (load "cl-seq")))
+
+(unless (boundp 'custom-print-functions)
+  (defvar custom-print-functions nil))	; not autoloaded before Emacs 20.4
+
+;;; User Customizable Internal Variables:
+
+(defgroup tramp nil
+  "Edit remote files with a combination of rsh and rcp or similar programs."
+  :group 'files)
+
+(defcustom tramp-verbose 10
+  "*Verbosity level for tramp.el.  0 means be silent, 10 is most verbose."
+  :group 'tramp
+  :type 'integer)
+
+(defcustom tramp-debug-buffer nil
+  "*Whether to send all commands and responses to a debug buffer."
+  :group 'tramp
+  :type 'boolean)
+
+(defcustom tramp-auto-save-directory nil
+  "*Put auto-save files in this directory, if set.
+The idea is to use a local directory so that auto-saving is faster."
+  :group 'tramp
+  :type '(choice (const nil)
+                 string))
+
+(defcustom tramp-sh-program "/bin/sh"
+  "*Use this program for shell commands on the local host.
+This MUST be a Bourne-like shell.  This shell is used to execute
+the encoding and decoding command on the local host, so if you
+want to use `~' in those commands, you should choose a shell here
+which groks tilde expansion.  `/bin/sh' normally does not
+understand tilde expansion.
+
+Note that this variable is not used for remote commands.  There are
+mechanisms in tramp.el which automatically determine the right shell to
+use for the remote host."
+  :group 'tramp
+  :type '(file :must-match t))
+
+;; CCC I have changed all occurrences of comint-quote-filename with
+;; tramp-shell-quote-argument, except in tramp-handle-expand-many-files.
+;; There, comint-quote-filename was removed altogether.  If it turns
+;; out to be necessary there, something will need to be done.
+;;-(defcustom tramp-file-name-quote-list
+;;-  '(?] ?[ ?\| ?& ?< ?> ?\( ?\) ?\; ?\  ?\* ?\? ?\! ?\" ?\' ?\` ?# ?\@ ?\+ )
+;;-  "*Protect these characters from the remote shell.
+;;-Any character in this list is quoted (preceded with a backslash)
+;;-because it means something special to the shell.  This takes effect
+;;-when sending file and directory names to the remote shell.
+;;-
+;;-See `comint-file-name-quote-list' for details."
+;;-  :group 'tramp
+;;-  :type '(repeat character))
+
+(defcustom tramp-methods
+  '( ("rcp"   (tramp-connection-function  tramp-open-connection-rsh)
+              (tramp-rsh-program          "rsh")
+              (tramp-rcp-program          "rcp")
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             nil)
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    "-p")
+              (tramp-su-program           nil)
+              (tramp-su-args              nil)
+              (tramp-encoding-command     nil)
+              (tramp-decoding-command     nil)
+              (tramp-encoding-function    nil)
+              (tramp-decoding-function    nil)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("scp"   (tramp-connection-function  tramp-open-connection-rsh)
+              (tramp-rsh-program          "ssh")
+              (tramp-rcp-program          "scp")
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             ("-e" "none"))
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    "-p")
+              (tramp-su-program           nil)
+              (tramp-su-args              nil)
+              (tramp-encoding-command     nil)
+              (tramp-decoding-command     nil)
+              (tramp-encoding-function    nil)
+              (tramp-decoding-function    nil)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("scp1"  (tramp-connection-function  tramp-open-connection-rsh)
+              (tramp-rsh-program          "ssh1")
+              (tramp-rcp-program          "scp1")
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             ("-e" "none"))
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    "-p")
+              (tramp-su-program           nil)
+              (tramp-su-args              nil)
+              (tramp-encoding-command     nil)
+              (tramp-decoding-command     nil)
+              (tramp-encoding-function    nil)
+              (tramp-decoding-function    nil)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("scp2"  (tramp-connection-function  tramp-open-connection-rsh)
+              (tramp-rsh-program          "ssh2")
+              (tramp-rcp-program          "scp2")
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             ("-e" "none"))
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    "-p")
+              (tramp-su-program           nil)
+              (tramp-su-args              nil)
+              (tramp-encoding-command     nil)
+              (tramp-decoding-command     nil)
+              (tramp-encoding-function    nil)
+              (tramp-decoding-function    nil)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("rsync" (tramp-connection-function  tramp-open-connection-rsh)
+              (tramp-rsh-program          "ssh")
+              (tramp-rcp-program          "rsync")
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             ("-e" "none"))
+              (tramp-rcp-args             ("-e" "ssh"))
+              (tramp-rcp-keep-date-arg    "-t")
+              (tramp-su-program           nil)
+              (tramp-su-args              nil)
+              (tramp-encoding-command     nil)
+              (tramp-decoding-command     nil)
+              (tramp-encoding-function    nil)
+              (tramp-decoding-function    nil)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("ru"    (tramp-connection-function  tramp-open-connection-rsh)
+              (tramp-rsh-program          "rsh")
+              (tramp-rcp-program          nil)
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             nil)
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    nil)
+              (tramp-su-program           nil)
+              (tramp-su-args              nil)
+              (tramp-encoding-command     "uuencode xxx")
+              (tramp-decoding-command
+               "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")
+              (tramp-encoding-function    nil)
+              (tramp-decoding-function    uudecode-decode-region)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("su"    (tramp-connection-function  tramp-open-connection-rsh)
+              (tramp-rsh-program          "ssh")
+              (tramp-rcp-program          nil)
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             ("-e" "none"))
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    nil)
+              (tramp-su-program           nil)
+              (tramp-su-args              nil)
+              (tramp-encoding-command     "uuencode xxx")
+              (tramp-decoding-command
+               "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")
+              (tramp-encoding-function    nil)
+              (tramp-decoding-function    uudecode-decode-region)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("su1"   (tramp-connection-function  tramp-open-connection-rsh)
+              (tramp-rsh-program          "ssh1")
+              (tramp-rcp-program          nil)
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             ("-e" "none"))
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    nil)
+              (tramp-su-program           nil)
+              (tramp-su-args              nil)
+              (tramp-encoding-command     "uuencode xxx")
+              (tramp-decoding-command
+               "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")
+              (tramp-encoding-function    nil)
+              (tramp-decoding-function    uudecode-decode-region)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("su2"   (tramp-connection-function  tramp-open-connection-rsh)
+              (tramp-rsh-program          "ssh2")
+              (tramp-rcp-program          nil)
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             ("-e" "none"))
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    nil)
+              (tramp-su-program           nil)
+              (tramp-su-args              nil)
+              (tramp-encoding-command     "uuencode xxx")
+              (tramp-decoding-command
+               "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")
+              (tramp-encoding-function    nil)
+              (tramp-decoding-function    uudecode-decode-region)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("rm"    (tramp-connection-function  tramp-open-connection-rsh)
+              (tramp-rsh-program          "rsh")
+              (tramp-rcp-program          nil)
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             nil)
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    nil)
+              (tramp-su-program           nil)
+              (tramp-su-args              nil)
+              (tramp-encoding-command     "mimencode -b")
+              (tramp-decoding-command     "mimencode -u -b")
+              (tramp-encoding-function    base64-encode-region)
+              (tramp-decoding-function    base64-decode-region)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("sm"    (tramp-connection-function  tramp-open-connection-rsh)
+              (tramp-rsh-program          "ssh")
+              (tramp-rcp-program          nil)
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             ("-e" "none"))
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    nil)
+              (tramp-su-program           nil)
+              (tramp-su-args              nil)
+              (tramp-encoding-command     "mimencode -b")
+              (tramp-decoding-command     "mimencode -u -b")
+              (tramp-encoding-function    base64-encode-region)
+              (tramp-decoding-function    base64-decode-region)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("smp"   (tramp-connection-function  tramp-open-connection-rsh)
+              (tramp-rsh-program          "ssh")
+              (tramp-rcp-program          nil)
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             ("-e" "none"))
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    nil)
+              (tramp-su-program           nil)
+              (tramp-su-args              nil)
+              (tramp-encoding-command     "tramp_mimencode")
+              (tramp-decoding-command     "tramp_mimedecode")
+              (tramp-encoding-function    base64-encode-region)
+              (tramp-decoding-function    base64-decode-region)
+              (tramp-telnet-program       nil))
+     ("sm1"   (tramp-connection-function  tramp-open-connection-rsh)
+              (tramp-rsh-program          "ssh1")
+              (tramp-rcp-program          nil)
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             ("-e" "none"))
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    nil)
+              (tramp-su-program           nil)
+              (tramp-su-args              nil)
+              (tramp-encoding-command     "mimencode -b")
+              (tramp-decoding-command     "mimencode -u -b")
+              (tramp-encoding-function    base64-encode-region)
+              (tramp-decoding-function    base64-decode-region)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("sm2"   (tramp-connection-function  tramp-open-connection-rsh)
+              (tramp-rsh-program          "ssh2")
+              (tramp-rcp-program          nil)
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             ("-e" "none"))
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    nil)
+              (tramp-su-program           nil)
+              (tramp-su-args              nil)
+              (tramp-encoding-command     "mimencode -b")
+              (tramp-decoding-command     "mimencode -u -b")
+              (tramp-encoding-function    base64-encode-region)
+              (tramp-decoding-function    base64-decode-region)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("tm"    (tramp-connection-function  tramp-open-connection-telnet)
+              (tramp-rsh-program          nil)
+              (tramp-rcp-program          nil)
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             nil)
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    nil)
+              (tramp-su-program           nil)
+              (tramp-su-args              nil)
+              (tramp-encoding-command     "mimencode -b")
+              (tramp-decoding-command     "mimencode -u -b")
+              (tramp-encoding-function    base64-encode-region)
+              (tramp-decoding-function    base64-decode-region)
+              (tramp-telnet-program       "telnet")
+              (tramp-telnet-args          nil))
+     ("tu"    (tramp-connection-function  tramp-open-connection-telnet)
+              (tramp-rsh-program          nil)
+              (tramp-rcp-program          nil)
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             nil)
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    nil)
+              (tramp-su-program           nil)
+              (tramp-su-args              nil)
+              (tramp-encoding-command     "uuencode xxx")
+              (tramp-decoding-command
+               "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")
+              (tramp-encoding-function    nil)
+              (tramp-decoding-function    uudecode-decode-region)
+              (tramp-telnet-program       "telnet")
+              (tramp-telnet-args          nil))
+     ("sum"   (tramp-connection-function  tramp-open-connection-su)
+              (tramp-rsh-program          nil)
+              (tramp-rcp-program          nil)
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             nil)
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    nil)
+              (tramp-su-program           "su")
+              (tramp-su-args              ("-" "%u"))
+              (tramp-encoding-command     "mimencode -b")
+              (tramp-decoding-command     "mimencode -u -b")
+              (tramp-encoding-function    base64-encode-region)
+              (tramp-decoding-function    base64-decode-region)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("suu"   (tramp-connection-function  tramp-open-connection-su)
+              (tramp-rsh-program          nil)
+              (tramp-rcp-program          nil)
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             nil)
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    nil)
+              (tramp-su-program           "su")
+              (tramp-su-args              ("-" "%u"))
+              (tramp-encoding-command     "uuencode xxx")
+              (tramp-decoding-command
+               "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")
+              (tramp-encoding-function    nil)
+              (tramp-decoding-function    uudecode-decode-region)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("sudm"  (tramp-connection-function  tramp-open-connection-su)
+              (tramp-rsh-program          nil)
+              (tramp-rcp-program          nil)
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             nil)
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    nil)
+              (tramp-su-program           "sudo")
+              (tramp-su-args              ("-u" "%u" "-s"))
+              (tramp-encoding-command     "mimencode -b")
+              (tramp-decoding-command     "mimencode -u -b")
+              (tramp-encoding-function    base64-encode-region)
+              (tramp-decoding-function    base64-decode-region)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("sudu"  (tramp-connection-function  tramp-open-connection-su)
+              (tramp-rsh-program          nil)
+              (tramp-rcp-program          nil)
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             nil)
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    nil)
+              (tramp-su-program           "sudo")
+              (tramp-su-args              ("-u" "%u" "-s"))
+              (tramp-encoding-command     "uuencode xxx")
+              (tramp-decoding-command
+               "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")
+              (tramp-encoding-function    nil)
+              (tramp-decoding-function    uudecode-decode-region)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("multi" (tramp-connection-function  tramp-open-connection-multi)
+              (tramp-rsh-program          nil)
+              (tramp-rcp-program          nil)
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             nil)
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    nil)
+              (tramp-su-program           nil)
+              (tramp-su-args              nil)
+              (tramp-encoding-command     "mimencode -b")
+              (tramp-decoding-command     "mimencode -u -b")
+              (tramp-encoding-function    base64-encode-region)
+              (tramp-decoding-function    base64-decode-region)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("multiu" (tramp-connection-function  tramp-open-connection-multi)
+              (tramp-rsh-program          nil)
+              (tramp-rcp-program          nil)
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             nil)
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    nil)
+              (tramp-su-program           nil)
+              (tramp-su-args              nil)
+              (tramp-encoding-command     "uuencode xxx")
+              (tramp-decoding-command
+               "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")
+              (tramp-encoding-function    nil)
+              (tramp-decoding-function    uudecode-decode-region)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("scpx"  (tramp-connection-function  tramp-open-connection-rsh)
+              (tramp-rsh-program          "ssh")
+              (tramp-rcp-program          "scp")
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             ("-e" "none" "-t" "/bin/sh"))
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    "-p")
+              (tramp-encoding-command     nil)
+              (tramp-decoding-command     nil)
+              (tramp-encoding-function    nil)
+              (tramp-decoding-function    nil)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("smx"   (tramp-connection-function  tramp-open-connection-rsh)
+              (tramp-rsh-program          "ssh")
+              (tramp-rcp-program          nil)
+              (tramp-remote-sh            "/bin/sh")
+              (tramp-rsh-args             ("-e" "none" "-t" "/bin/sh"))
+              (tramp-rcp-args             nil)
+              (tramp-rcp-keep-date-arg    nil)
+              (tramp-su-program           nil)
+              (tramp-su-args              nil)
+              (tramp-encoding-command     "mimencode -b")
+              (tramp-decoding-command     "mimencode -u -b")
+              (tramp-encoding-function    base64-encode-region)
+              (tramp-decoding-function    base64-decode-region)
+              (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     ("km"
+              (tramp-connection-function  tramp-open-connection-rsh)
+	      (tramp-rsh-program          "krlogin")
+	      (tramp-rcp-program          nil)
+	      (tramp-remote-sh            "/bin/sh")
+	      (tramp-rsh-args             ("-x"))
+	      (tramp-rcp-args             nil)
+	      (tramp-rcp-keep-date-arg    nil)
+	      (tramp-su-program           nil)
+	      (tramp-su-args              nil)
+	      (tramp-encoding-command     "mimencode -b")
+	      (tramp-decoding-command     "mimencode -u -b")
+	      (tramp-encoding-function    base64-encode-region)
+	      (tramp-decoding-function    base64-decode-region)
+	      (tramp-telnet-program       nil)
+              (tramp-telnet-args          nil))
+     )
+  "*Alist of methods for remote files.
+This is a list of entries of the form (NAME PARAM1 PARAM2 ...).
+Each NAME stands for a remote access method.  Each PARAM is a
+pair of the form (KEY VALUE).  The following KEYs are defined:
+  * `tramp-connection-function'
+    This specifies the function to use to connect to the remote host.
+    Currently, `tramp-open-connection-rsh', `tramp-open-connection-telnet'
+    and `tramp-open-connection-su' are defined.  See the documentation
+    of these functions for more details.
+  * `tramp-remote-sh'
+    This specifies the Bourne shell to use on the remote host.  This
+    MUST be a Bourne-like shell.  It is normally not necessary to set
+    this to any value other than \"/bin/sh\": tramp wants to use a shell
+    which groks tilde expansion, but it can search for it.  Also note
+    that \"/bin/sh\" exists on all Unixen, this might not be true for
+    the value that you decide to use.  You Have Been Warned.
+  * `tramp-rsh-program'
+    This specifies the name of the program to use for rsh; this might be
+    the full path to rsh or the name of a workalike program.
+  * `tramp-rsh-args'
+    This specifies the list of arguments to pass to the above
+    mentioned program.  Please note that this is a list of arguments,
+    that is, normally you don't want to put \"-a -b\" or \"-f foo\"
+    here.  Instead, you want two list elements, one for \"-a\" and one
+    for \"-b\", or one for \"-f\" and one for \"foo\".
+  * `tramp-rcp-program'
+    This specifies the name of the program to use for rcp; this might be
+    the full path to rcp or the name of a workalike program.
+  * `tramp-rcp-args'
+    This specifies the list of parameters to pass to the above mentioned
+    program, the hints for `tramp-rsh-args' also apply here.
+  * `tramp-rcp-keep-date-arg'
+    This specifies the parameter to use for `rcp' when the timestamp
+    of the original file should be kept.  For `rcp', use `-p', for
+    `rsync', use `-t'.
+  * `tramp-su-program'
+    This specifies the name of the program to use for `su'.
+  * `tramp-su-args'
+    This specifies the list of arguments to pass to `su'.
+    \"%u\" is replaced by the user name, use \"%%\" for a literal
+    percent character.
+  * `tramp-encoding-command'
+    This specifies a command to use to encode the file contents for
+    transfer.  The command should read the raw file contents from
+    standard input and write the encoded file contents to standard
+    output.  In this string, the percent escape \"%f\" should be used
+    to indicate the file to convert.  Use \"%%\" if you need a literal
+    percent character in your command.
+  * `tramp-decoding-command'
+    This specifies a command to use to decode file contents encoded