;;; -*- mode: Emacs-Lisp; coding: utf-8; -*-
;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007 Free Software Foundation, Inc.
+;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; (copyright statements below in code to be updated with the above notice)
(autoload 'uudecode-decode-region "uudecode")
-;; The following Tramp packages must be loaded after Tramp, because
-;; they require Tramp as well.
+;; The following Tramp packages must be loaded after tramp.el, because
+;; they require it as well.
(eval-after-load "tramp"
'(dolist
(feature
(list
- ;; Tramp commands.
+ ;; Tramp interactive commands.
'tramp-cmds
;; Load foreign FTP method.
;; "getconf PATH" yields:
;; HP-UX: /usr/bin:/usr/ccs/bin:/opt/ansic/bin:/opt/langtools/bin:/opt/fortran/bin
;; Solaris: /usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin
-;; Linux (Debian, Suse): /bin:/usr/bin
+;; GNU/Linux (Debian, Suse): /bin:/usr/bin
;; FreeBSD: /usr/bin:/bin:/usr/sbin:/sbin: - beware trailing ":"!
(defcustom tramp-remote-path
'(tramp-default-remote-path "/usr/sbin" "/usr/local/bin"
(string :tag "Directory"))))
(defcustom tramp-remote-process-environment
- `("HISTFILE=$HOME/.tramp_history" "HISTSIZE=1" "LC_TIME=C"
+ `("HISTFILE=$HOME/.tramp_history" "HISTSIZE=1" "LC_CTYPE=C" "LC_TIME=C"
,(concat "TERM=" tramp-terminal-type)
"CDPATH=" "HISTORY=" "MAIL=" "MAILCHECK=" "MAILPATH="
"autocorrect=" "correct=")
(defconst tramp-perl-encode
"%s -e '
# This script is contributed by Juanma Barranquero <lektu@terra.es>.
-# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
use strict;
(defconst tramp-perl-decode
"%s -e '
# This script is contributed by Juanma Barranquero <lektu@terra.es>.
-# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
use strict;
If (FUNCTION FILENAME) returns non-nil, then all I/O on that file is done by
calling HANDLER.")
-;;; Internal functions which must come first.
+;;; Internal functions which must come first:
(defsubst tramp-debug-message (vec fmt-string &rest args)
"Append message to debug buffer.
(cdr (assoc method tramp-completion-function-alist))))
-;;; Fontification of `read-file-name'.
+;;; Fontification of `read-file-name':
-;; rfn-eshadow.el is part of Emacs 22. Its is autoloaded.
+;; rfn-eshadow.el is part of Emacs 22. It is autoloaded.
(defvar tramp-rfn-eshadow-overlay)
(make-variable-buffer-local 'tramp-rfn-eshadow-overlay)
minibuffer-electric-tilde)))
-;;; Remote commands.
+;;; Remote commands:
(defun tramp-handle-executable-find (command)
"Like `executable-find' for Tramp files."
((bufferp (car destination))
(setq outbuf (car destination)))
((stringp (car destination))
- (setq outbuf (get-buffer-create (car destination)))))
+ (setq outbuf (get-buffer-create (car destination))))
+ ((car destination)
+ (setq outbuf (current-buffer))))
;; stderr
(cond
((stringp (cadr destination))
(add-hook 'tramp-unload-hook 'tramp-unload-file-name-handlers)
-;;; File name handler functions for completion mode.
+;;; File name handler functions for completion mode:
(defvar tramp-completion-mode nil
"If non-nil, external packages signal that they are in file name completion.
(defun tramp-wait-for-output (proc &optional timeout)
"Wait for output from remote rsh command."
(with-current-buffer (process-buffer proc)
- (let ((found
- (tramp-wait-for-regexp
- proc timeout
- ;; Initially, `tramp-end-of-output' is "$ ". There might
- ;; be leading escape sequences, which must be ignored.
- (format "^[^$\n]*%s\r?$" (regexp-quote tramp-end-of-output)))))
+ ;; Initially, `tramp-end-of-output' is "$ ". There might be
+ ;; leading escape sequences, which must be ignored.
+ (let* ((regexp (format "^[^$\n]*%s\r?$" (regexp-quote tramp-end-of-output)))
+ (found (tramp-wait-for-regexp proc timeout regexp)))
(if found
(let (buffer-read-only)
(goto-char (point-max))
- (forward-line -2)
+ (re-search-backward regexp nil t)
(delete-region (point) (point-max)))
(if timeout
(tramp-error