emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/net/tramp.el [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/net/tramp.el [emacs-unicode-2]
Date: Mon, 28 Jun 2004 04:36:27 -0400

Index: emacs/lisp/net/tramp.el
diff -c emacs/lisp/net/tramp.el:1.39.2.1 emacs/lisp/net/tramp.el:1.39.2.2
*** emacs/lisp/net/tramp.el:1.39.2.1    Fri Apr 16 12:50:33 2004
--- emacs/lisp/net/tramp.el     Mon Jun 28 07:29:49 2004
***************
*** 135,145 ****
  (unless (boundp 'custom-print-functions)
    (defvar custom-print-functions nil))        ; not autoloaded before Emacs 
20.4
  
! ;; Avoid bytecompiler warnings if the byte-compiler supports this.
  ;; Currently, XEmacs supports this.
  (eval-when-compile
    (when (fboundp 'byte-compiler-options)
!     (byte-compiler-options (warnings (- unused-vars)))))
  
  ;;; User Customizable Internal Variables:
  
--- 135,159 ----
  (unless (boundp 'custom-print-functions)
    (defvar custom-print-functions nil))        ; not autoloaded before Emacs 
20.4
  
! ;; Avoid byte-compiler warnings if the byte-compiler supports this.
  ;; Currently, XEmacs supports this.
  (eval-when-compile
    (when (fboundp 'byte-compiler-options)
!     (let (unused-vars) ; Pacify Emacs byte-compiler
!       (defalias 'warnings 'identity) ; Pacify Emacs byte-compiler
!       (byte-compiler-options (warnings (- unused-vars))))))
! 
! ;; `directory-sep-char' is an obsolete variable in Emacs.  But it is
! ;; used in XEmacs, so we set it here and there.  The following is needed
! ;; to pacify Emacs byte-compiler.
! (eval-when-compile
!   (when (boundp 'byte-compile-not-obsolete-var)
!     (setq byte-compile-not-obsolete-var 'directory-sep-char)))
! 
! ;; XEmacs byte-compiler raises warning abouts `last-coding-system-used'.
! (eval-when-compile
!   (unless (boundp 'last-coding-system-used)
!     (defvar last-coding-system-used nil)))
  
  ;;; User Customizable Internal Variables:
  
***************
*** 157,162 ****
--- 171,219 ----
    :group 'tramp
    :type 'boolean)
  
+ ;; Emacs case
+ (eval-and-compile
+   (when (boundp 'backup-directory-alist)
+     (defcustom tramp-backup-directory-alist nil
+       "Alist of filename patterns and backup directory names.
+ Each element looks like (REGEXP . DIRECTORY), with the same meaning like
+ in `backup-directory-alist'.  If a Tramp file is backed up, and DIRECTORY
+ is a local file name, the backup directory is prepended with Tramp file
+ name prefix \(multi-method, method, user, host\) of file.
+ 
+ \(setq tramp-backup-directory-alist backup-directory-alist\)
+ 
+ gives the same backup policy for Tramp files on their hosts like the
+ policy for local files."
+       :group 'tramp
+       :type '(repeat (cons (regexp :tag "Regexp matching filename")
+                          (directory :tag "Backup directory name"))))))
+ 
+ ;; XEmacs case.  We cannot check for `bkup-backup-directory-info', because
+ ;; the package "backup-dir" might not be loaded yet.
+ (eval-and-compile
+   (when (featurep 'xemacs)
+     (defcustom tramp-bkup-backup-directory-info nil
+       "*Alist of (FILE-REGEXP BACKUP-DIR OPTIONS ...))
+ It has the same meaning like `bkup-backup-directory-info' from package
+ `backup-dir'.  If a Tramp file is backed up, and BACKUP-DIR is a local
+ file name, the backup directory is prepended with Tramp file name prefix
+ \(multi-method, method, user, host\) of file.
+ 
+ \(setq tramp-bkup-backup-directory-info bkup-backup-directory-info\)
+ 
+ gives the same backup policy for Tramp files on their hosts like the
+ policy for local files."
+       :type '(repeat 
+             (list (regexp :tag "File regexp")
+                   (string :tag "Backup Dir")
+                   (set :inline t
+                        (const ok-create)
+                        (const full-path)
+                        (const prepend-name)
+                        (const search-upward))))
+       :group 'tramp)))
+ 
  (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."
***************
*** 854,859 ****
--- 911,926 ----
    :group 'tramp
    :type 'regexp)
  
+ (defcustom tramp-process-alive-regexp
+   ""
+   "Regular expression indicating a process has finished.
+ In fact this expression is empty by intention, it will be used only to
+ check regularly the status of the associated process.
+ The answer will be provided by `tramp-action-process-alive' and
+ `tramp-action-out-of-band', which see."
+   :group 'tramp
+   :type 'regexp)
+ 
  (defcustom tramp-temp-name-prefix "tramp."
    "*Prefix to use for temporary files.
  If this is a relative file name (such as \"tramp.\"), it is considered
***************
*** 1080,1086 ****
  
  ;;;###autoload
  (defconst tramp-completion-file-name-regexp-unified
!   "^/[^/]*$"
    "Value for `tramp-completion-file-name-regexp' for unified remoting.
  Emacs (not XEmacs) uses a unified filename syntax for Ange-FTP and
  Tramp.  See `tramp-file-name-structure-unified' for more explanations.")
--- 1147,1153 ----
  
  ;;;###autoload
  (defconst tramp-completion-file-name-regexp-unified
!   "^/$\\|^/[^/:][^/]*$"
    "Value for `tramp-completion-file-name-regexp' for unified remoting.
  Emacs (not XEmacs) uses a unified filename syntax for Ange-FTP and
  Tramp.  See `tramp-file-name-structure-unified' for more explanations.")
***************
*** 1222,1228 ****
      (tramp-wrong-passwd-regexp tramp-action-permission-denied)
      (tramp-yesno-prompt-regexp tramp-action-yesno)
      (tramp-yn-prompt-regexp tramp-action-yn)
!     (tramp-terminal-prompt-regexp tramp-action-terminal))
    "List of pattern/action pairs.
  Whenever a pattern matches, the corresponding action is performed.
  Each item looks like (PATTERN ACTION).
--- 1289,1296 ----
      (tramp-wrong-passwd-regexp tramp-action-permission-denied)
      (tramp-yesno-prompt-regexp tramp-action-yesno)
      (tramp-yn-prompt-regexp tramp-action-yn)
!     (tramp-terminal-prompt-regexp tramp-action-terminal)
!     (tramp-process-alive-regexp tramp-action-process-alive))
    "List of pattern/action pairs.
  Whenever a pattern matches, the corresponding action is performed.
  Each item looks like (PATTERN ACTION).
***************
*** 1237,1248 ****
    :group 'tramp
    :type '(repeat (list variable function)))
  
  (defcustom tramp-multi-actions
    '((tramp-password-prompt-regexp tramp-multi-action-password)
      (tramp-login-prompt-regexp tramp-multi-action-login)
      (shell-prompt-pattern tramp-multi-action-succeed)
      (tramp-shell-prompt-pattern tramp-multi-action-succeed)
!     (tramp-wrong-passwd-regexp tramp-multi-action-permission-denied))
    "List of pattern/action pairs.
  This list is used for each hop in multi-hop connections.
  See `tramp-actions-before-shell' for more info."
--- 1305,1327 ----
    :group 'tramp
    :type '(repeat (list variable function)))
  
+ (defcustom tramp-actions-copy-out-of-band
+   '((tramp-password-prompt-regexp tramp-action-password)
+     (tramp-wrong-passwd-regexp tramp-action-permission-denied)
+     (tramp-process-alive-regexp tramp-action-out-of-band))
+   "List of pattern/action pairs.
+ This list is used for copying/renaming with out-of-band methods.
+ See `tramp-actions-before-shell' for more info."
+   :group 'tramp
+   :type '(repeat (list variable function)))
+ 
  (defcustom tramp-multi-actions
    '((tramp-password-prompt-regexp tramp-multi-action-password)
      (tramp-login-prompt-regexp tramp-multi-action-login)
      (shell-prompt-pattern tramp-multi-action-succeed)
      (tramp-shell-prompt-pattern tramp-multi-action-succeed)
!     (tramp-wrong-passwd-regexp tramp-multi-action-permission-denied)
!     (tramp-process-alive-regexp tramp-action-process-alive))
    "List of pattern/action pairs.
  This list is used for each hop in multi-hop connections.
  See `tramp-actions-before-shell' for more info."
***************
*** 1250,1256 ****
    :type '(repeat (list variable function)))
  
  (defcustom tramp-initial-commands
!   '("unset correct"
      "unset autocorrect")
    "List of commands to send to the first remote shell that we see.
  These commands will be sent to any shell, and thus they should be
--- 1329,1336 ----
    :type '(repeat (list variable function)))
  
  (defcustom tramp-initial-commands
!   '("unset HISTORY"
!     "unset correct"
      "unset autocorrect")
    "List of commands to send to the first remote shell that we see.
  These commands will be sent to any shell, and thus they should be
***************
*** 1326,1332 ****
  (defvar tramp-md5-function
    (cond ((and (require 'md5) (fboundp 'md5)) 'md5)
        ((fboundp 'md5-encode)
!        (lambda (x) (base64-encode-string (md5-encode x))))
        (t (error "Coulnd't find an `md5' function")))
    "Function to call for running the MD5 algorithm.")
  
--- 1406,1413 ----
  (defvar tramp-md5-function
    (cond ((and (require 'md5) (fboundp 'md5)) 'md5)
        ((fboundp 'md5-encode)
!        (lambda (x) (base64-encode-string
!                     (funcall (symbol-function 'md5-encode) x))))
        (t (error "Coulnd't find an `md5' function")))
    "Function to call for running the MD5 algorithm.")
  
***************
*** 1464,1470 ****
  ;; The device number is returned as "-1", because there will be a virtual
  ;; device number set in `tramp-handle-file-attributes'
  (defconst tramp-perl-file-attributes "\
! ($f, $n) = @ARGV;
  @s = lstat($f);
  if (($s[2] & 0170000) == 0120000) { $l = readlink($f); $l = \"\\\"$l\\\"\"; }
  elsif (($s[2] & 0170000) == 040000) { $l = \"t\"; }
--- 1545,1551 ----
  ;; The device number is returned as "-1", because there will be a virtual
  ;; device number set in `tramp-handle-file-attributes'
  (defconst tramp-perl-file-attributes "\
! \($f, $n) = @ARGV;
  @s = lstat($f);
  if (($s[2] & 0170000) == 0120000) { $l = readlink($f); $l = \"\\\"$l\\\"\"; }
  elsif (($s[2] & 0170000) == 040000) { $l = \"t\"; }
***************
*** 1628,1633 ****
--- 1709,1722 ----
      'undecided-dos)
    "Some Emacsen know the `dos' coding system, others need `undecided-dos'.")
  
+ (defvar tramp-last-cmd nil
+   "Internal Tramp variable recording the last command sent.
+ This variable is buffer-local in every buffer.")
+ (make-variable-buffer-local 'tramp-last-cmd)
+ 
+ (defvar tramp-process-echoes nil
+   "Whether to process echoes from the remote shell.")
+ 
  (defvar tramp-last-cmd-time nil
    "Internal Tramp variable recording the time when the last cmd was sent.
  This variable is buffer-local in every buffer.")
***************
*** 1638,1644 ****
  (defvar tramp-feature-write-region-fix
    (when (fboundp 'find-operation-coding-system)
      (let ((file-coding-system-alist '(("test" emacs-mule))))
!       (find-operation-coding-system 'write-region 0 0 "" nil "test")))
      "Internal variable to say if `write-region' chooses the right coding.
  Older versions of Emacs chose the coding system for `write-region' based
  on the FILENAME argument, even if VISIT was a string.")
--- 1727,1734 ----
  (defvar tramp-feature-write-region-fix
    (when (fboundp 'find-operation-coding-system)
      (let ((file-coding-system-alist '(("test" emacs-mule))))
!       (funcall (symbol-function 'find-operation-coding-system)
!              'write-region 0 0 "" nil "test")))
      "Internal variable to say if `write-region' chooses the right coding.
  Older versions of Emacs chose the coding system for `write-region' based
  on the FILENAME argument, even if VISIT was a string.")
***************
*** 1682,1689 ****
--- 1772,1781 ----
      (insert-directory . tramp-handle-insert-directory)
      (expand-file-name . tramp-handle-expand-file-name)
      (file-local-copy . tramp-handle-file-local-copy)
+     (file-remote-p . tramp-handle-file-remote-p)
      (insert-file-contents . tramp-handle-insert-file-contents)
      (write-region . tramp-handle-write-region)
+     (find-backup-file-name . tramp-handle-find-backup-file-name)
      (unhandled-file-name-directory . 
tramp-handle-unhandled-file-name-directory)
      (dired-compress-file . tramp-handle-dired-compress-file)
      (dired-call-process . tramp-handle-dired-call-process)
***************
*** 1756,1763 ****
  Calls `line-end-position' or `point-at-eol' if defined, else
  own implementation."
    (cond
!    ((fboundp 'line-end-position) (funcall 'line-end-position))
!    ((fboundp 'point-at-eol)    (funcall 'point-at-eol))
     (t (save-excursion (end-of-line) (point)))))
  
  (defmacro with-parsed-tramp-file-name (filename var &rest body)
--- 1848,1855 ----
  Calls `line-end-position' or `point-at-eol' if defined, else
  own implementation."
    (cond
!    ((fboundp 'line-end-position) (funcall (symbol-function 
'line-end-position)))
!    ((fboundp 'point-at-eol)    (funcall (symbol-function 'point-at-eol)))
     (t (save-excursion (end-of-line) (point)))))
  
  (defmacro with-parsed-tramp-file-name (filename var &rest body)
***************
*** 1790,1795 ****
--- 1882,1899 ----
       ,@body))
  
  (put 'with-parsed-tramp-file-name 'lisp-indent-function 2)
+ ;; To be activated for debugging containing this macro
+ (def-edebug-spec with-parsed-tramp-file-name t)
+ 
+ (defmacro tramp-let-maybe (variable value &rest body)
+   "Let-bind VARIABLE to VALUE in BODY, but only if VARIABLE is not obsolete.
+ BODY is executed whether or not the variable is obsolete.
+ The intent is to protect against `obsolete variable' warnings."
+   `(if (get ',variable 'byte-obsolete-variable)
+        (progn ,@body)
+      (let ((,variable ,value))
+        ,@body)))
+ (put 'tramp-let-maybe 'lisp-indent-function 2)
  
  ;;; Config Manipulation Functions:
  
***************
*** 1953,1960 ****
    "Like `file-truename' for tramp files."
    (with-parsed-tramp-file-name filename nil
      (let* ((steps        (tramp-split-string localname "/"))
!          (localnamedir (let ((directory-sep-char ?/))
!                     (file-name-as-directory localname)))
           (is-dir (string= localname localnamedir))
           (thisstep nil)
           (numchase 0)
--- 2057,2064 ----
    "Like `file-truename' for tramp files."
    (with-parsed-tramp-file-name filename nil
      (let* ((steps        (tramp-split-string localname "/"))
!          (localnamedir (tramp-let-maybe directory-sep-char ?/ ;for XEmacs
!                          (file-name-as-directory localname)))
           (is-dir (string= localname localnamedir))
           (thisstep nil)
           (numchase 0)
***************
*** 2711,2717 ****
         ;; matter which filename handlers are used for the
         ;; source and target file.
         (t
!       (tramp-do-copy-or-rename-via-buffer
         op filename newname keep-date))))
  
       ;; One file is a Tramp file, the other one is local.
--- 2815,2821 ----
         ;; matter which filename handlers are used for the
         ;; source and target file.
         (t
!       (tramp-do-copy-or-rename-file-via-buffer
         op filename newname keep-date))))
  
       ;; One file is a Tramp file, the other one is local.
***************
*** 2727,2740 ****
          (tramp-do-copy-or-rename-file-out-of-band
           op filename newname keep-date)
        ;; Use the generic method via a Tramp buffer.
!       (tramp-do-copy-or-rename-via-buffer op filename newname keep-date)))
  
       (t
        ;; One of them must be a Tramp file.
        (error "Tramp implementation says this cannot happen")))))
  
! ;; CCC: implement keep-date if possible -- via touch?
! (defun tramp-do-copy-or-rename-via-buffer (op filename newname keep-date)
    "Use an Emacs buffer to copy or rename a file.
  First arg OP is either `copy' or `rename' and indicates the operation.
  FILENAME is the source file, NEWNAME the target file.
--- 2831,2844 ----
          (tramp-do-copy-or-rename-file-out-of-band
           op filename newname keep-date)
        ;; Use the generic method via a Tramp buffer.
!       (tramp-do-copy-or-rename-file-via-buffer
!        op filename newname keep-date)))
  
       (t
        ;; One of them must be a Tramp file.
        (error "Tramp implementation says this cannot happen")))))
  
! (defun tramp-do-copy-or-rename-file-via-buffer (op filename newname keep-date)
    "Use an Emacs buffer to copy or rename a file.
  First arg OP is either `copy' or `rename' and indicates the operation.
  FILENAME is the source file, NEWNAME the target file.
***************
*** 2754,2763 ****
            (jka-compr-inhibit t))
        (write-region (point-min) (point-max) newname))
        ;; KEEP-DATE handling.
!       (when (and keep-date 
!                (not (null modtime))
!                (not (equal modtime '(0 0))))
!       (tramp-touch newname modtime)))
      ;; If the operation was `rename', delete the original file.
      (unless (eq op 'copy)
        (delete-file filename))))
--- 2858,2868 ----
            (jka-compr-inhibit t))
        (write-region (point-min) (point-max) newname))
        ;; KEEP-DATE handling.
!       (when keep-date
!       (when (and (not (null modtime))
!                  (not (equal modtime '(0 0))))
!         (tramp-touch newname modtime))
!       (set-file-modes newname (file-modes filename))))
      ;; If the operation was `rename', delete the original file.
      (unless (eq op 'copy)
        (delete-file filename))))
***************
*** 2791,2802 ****
    "Invoke rcp program to copy.
  One of FILENAME and NEWNAME must be a Tramp name, the other must
  be a local filename.  The method used must be an out-of-band method."
!   (let ((trampbuf (get-buffer-create "*tramp output*"))
!       (t1 (tramp-tramp-file-p filename))
        (t2 (tramp-tramp-file-p newname))
        v1-multi-method v1-method v1-user v1-host v1-localname
        v2-multi-method v2-method v2-user v2-host v2-localname
!       method copy-program copy-args source target)
  
      ;; Check which ones of source and target are Tramp files.
      ;; We cannot invoke `with-parsed-tramp-file-name';
--- 2896,2907 ----
    "Invoke rcp program to copy.
  One of FILENAME and NEWNAME must be a Tramp name, the other must
  be a local filename.  The method used must be an out-of-band method."
!   (let ((t1 (tramp-tramp-file-p filename))
        (t2 (tramp-tramp-file-p newname))
        v1-multi-method v1-method v1-user v1-host v1-localname
        v2-multi-method v2-method v2-user v2-host v2-localname
!       multi-method method user host copy-program copy-args
!       source target trampbuf)
  
      ;; Check which ones of source and target are Tramp files.
      ;; We cannot invoke `with-parsed-tramp-file-name';
***************
*** 2808,2815 ****
--- 2913,2923 ----
                v1-user l-user
                v1-host l-host
                v1-localname l-localname
+               multi-method l-multi-method
                method (tramp-find-method
                        v1-multi-method v1-method v1-user v1-host)
+               user l-user
+               host l-host
                copy-program (tramp-get-method-parameter
                              v1-multi-method method
                              v1-user v1-host 'tramp-copy-program)
***************
*** 2825,2832 ****
--- 2933,2943 ----
                v2-user l-user
                v2-host l-host
                v2-localname l-localname
+               multi-method l-multi-method
                method (tramp-find-method
                        v2-multi-method v2-method v2-user v2-host)
+               user l-user
+               host l-host
                copy-program (tramp-get-method-parameter
                              v2-multi-method method
                              v2-user v2-host 'tramp-copy-program)
***************
*** 2871,2894 ****
                     v2-user v2-host 'tramp-copy-keep-date-arg)
                    copy-args))))
  
!     (setq copy-args (append copy-args (list source target)))
  
!     ;; Use rcp-like program for file transfer.
!     (tramp-message
!      5 "Transferring %s to file %s..." filename newname)
!     (save-excursion (set-buffer trampbuf) (erase-buffer))
!     (unless (equal
!            0
!            (apply #'call-process copy-program
!                   nil trampbuf nil copy-args))
!       (pop-to-buffer trampbuf)
!       (error
!        (concat
!       "tramp-do-copy-or-rename-file-out-of-band: `%s' didn't work, "
!       "see buffer `%s' for details")
!        copy-program trampbuf))
!     (tramp-message
!      5 "Transferring %s to file %s...done" filename newname)
  
      ;; If the operation was `rename', delete the original file.
      (unless (eq op 'copy)
--- 2982,3010 ----
                     v2-user v2-host 'tramp-copy-keep-date-arg)
                    copy-args))))
  
!     (setq copy-args (append copy-args (list source target))
!         trampbuf (generate-new-buffer
!                   (tramp-buffer-name multi-method method user host)))
  
!     ;; Use an asynchronous process.  By this, password can be handled.
!     (save-excursion
!       (set-buffer trampbuf)
!       (setq tramp-current-multi-method multi-method
!           tramp-current-method method
!           tramp-current-user user
!           tramp-current-host host)
!       (tramp-message
!        5 "Transferring %s to file %s..." filename newname)
! 
!       ;; Use rcp-like program for file transfer.
!       (let ((p (apply 'start-process (buffer-name trampbuf) trampbuf
!                     copy-program copy-args)))
!       (tramp-set-process-query-on-exit-flag p nil)
!       (tramp-process-actions p multi-method method user host
!                              tramp-actions-copy-out-of-band))
!       (kill-buffer trampbuf)
!       (tramp-message
!        5 "Transferring %s to file %s...done" filename newname))
  
      ;; If the operation was `rename', delete the original file.
      (unless (eq op 'copy)
***************
*** 3012,3018 ****
                             multi-method method user host
                             (concat (nth 2 suffix) " " localname)))
                 (message "Uncompressing %s...done" file)
!                (dired-remove-file file)
                 (string-match (car suffix) file)
                 (concat (substring file 0 (match-beginning 0)))))
              (t
--- 3128,3135 ----
                             multi-method method user host
                             (concat (nth 2 suffix) " " localname)))
                 (message "Uncompressing %s...done" file)
!                ;; `dired-remove-file' is not defined in XEmacs
!                (funcall (symbol-function 'dired-remove-file) file)
                 (string-match (car suffix) file)
                 (concat (substring file 0 (match-beginning 0)))))
              (t
***************
*** 3023,3029 ****
                             multi-method method user host
                             (concat "gzip -f " localname)))
                 (message "Compressing %s...done" file)
!                (dired-remove-file file)
                 (cond ((file-exists-p (concat file ".gz"))
                        (concat file ".gz"))
                       ((file-exists-p (concat file ".z"))
--- 3140,3147 ----
                             multi-method method user host
                             (concat "gzip -f " localname)))
                 (message "Compressing %s...done" file)
!                ;; `dired-remove-file' is not defined in XEmacs
!                (funcall (symbol-function 'dired-remove-file) file)
                 (cond ((file-exists-p (concat file ".gz"))
                        (concat file ".gz"))
                       ((file-exists-p (concat file ".z"))
***************
*** 3091,3102 ****
         (format "%s %s %s"
                 (tramp-get-ls-command multi-method method user host)
                 switches
!                (if full-directory-p
!                    ;; Add "/." to make sure we got complete dir
!                    ;; listing for symlinks, too.
!                    (concat (file-name-as-directory
!                             (file-name-nondirectory localname)) ".")
!                  (file-name-nondirectory localname)))))
        (sit-for 1)                     ;needed for rsh but not ssh?
        (tramp-wait-for-output))
      ;; The following let-binding is used by code that's commented
--- 3209,3218 ----
         (format "%s %s %s"
                 (tramp-get-ls-command multi-method method user host)
                 switches
!                (if wildcard
!                    localname
!                  (tramp-shell-quote-argument
!                   (file-name-nondirectory localname))))))
        (sit-for 1)                     ;needed for rsh but not ssh?
        (tramp-wait-for-output))
      ;; The following let-binding is used by code that's commented
***************
*** 3196,3202 ****
        ;; expand-file-name (this does "/./" and "/../").  We bind
        ;; directory-sep-char here for XEmacs on Windows, which
        ;; would otherwise use backslash.
!       (let ((directory-sep-char ?/))
          (tramp-make-tramp-file-name
           multi-method (or method (tramp-find-default-method user host))
           user host
--- 3312,3318 ----
        ;; expand-file-name (this does "/./" and "/../").  We bind
        ;; directory-sep-char here for XEmacs on Windows, which
        ;; would otherwise use backslash.
!       (tramp-let-maybe directory-sep-char ?/
          (tramp-make-tramp-file-name
           multi-method (or method (tramp-find-default-method user host))
           user host
***************
*** 3361,3367 ****
               filename))
        (setq tmpfil (tramp-make-temp-file))
  
- 
        (cond ((tramp-method-out-of-band-p multi-method method user host)
             ;; `copy-file' handles out-of-band methods
             (copy-file filename tmpfil t t))
--- 3477,3482 ----
***************
*** 3418,3428 ****
                   (delete-file tmpfil2)))
               (tramp-message-for-buffer
                multi-method method user host
!               5 "Decoding remote file %s...done" filename)))
  
            (t (error "Wrong method specification for `%s'" method)))
        tmpfil)))
  
  
  (defun tramp-handle-insert-file-contents
    (filename &optional visit beg end replace)
--- 3533,3548 ----
                   (delete-file tmpfil2)))
               (tramp-message-for-buffer
                multi-method method user host
!               5 "Decoding remote file %s...done" filename)
!              ;; Set proper permissions.
!              (set-file-modes tmpfil (file-modes filename))))
  
            (t (error "Wrong method specification for `%s'" method)))
        tmpfil)))
  
+ (defun tramp-handle-file-remote-p (filename)
+   "Like `file-remote-p' for tramp files."
+   (when (tramp-tramp-file-p filename) t))
  
  (defun tramp-handle-insert-file-contents
    (filename &optional visit beg end replace)
***************
*** 3470,3475 ****
--- 3590,3638 ----
        (list (expand-file-name filename)
              (second result))))))
  
+ 
+ (defun tramp-handle-find-backup-file-name (filename)
+   "Like `find-backup-file-name' for tramp files."
+ 
+   (if (or (and (not (featurep 'xemacs))
+              (not (boundp 'tramp-backup-directory-alist)))
+         (and (featurep 'xemacs)
+              (not (boundp 'tramp-bkup-backup-directory-info))))
+ 
+       ;; No tramp backup directory alist defined, or nil
+       (tramp-run-real-handler 'find-backup-file-name (list filename))
+ 
+     (with-parsed-tramp-file-name filename nil
+       (let* ((backup-var
+             (copy-tree
+              (if (featurep 'xemacs)
+                  ;; XEmacs case
+                  (symbol-value 'tramp-bkup-backup-directory-info)
+                ;; Emacs case
+                (symbol-value 'tramp-backup-directory-alist))))
+ 
+            ;; We set both variables. It doesn't matter whether it is
+            ;; Emacs or XEmacs
+            (backup-directory-alist backup-var)
+            (bkup-backup-directory-info backup-var))
+ 
+       (mapcar
+        '(lambda (x)
+           (let ((dir (if (consp (cdr x)) (car (cdr x)) (cdr x))))
+             (when (and (stringp dir)
+                        (file-name-absolute-p dir)
+                        (not (tramp-file-name-p dir)))
+               ;; Prepend absolute directory names with tramp prefix
+               (if (consp (cdr x))
+                   (setcar (cdr x)
+                           (tramp-make-tramp-file-name
+                            multi-method method user host dir))
+                 (setcdr x (tramp-make-tramp-file-name
+                            multi-method method user host dir))))))
+        backup-var)
+ 
+       (tramp-run-real-handler 'find-backup-file-name (list filename))))))
+ 
  ;; CCC grok APPEND, LOCKNAME, CONFIRM
  (defun tramp-handle-write-region
    (start end filename &optional append visit lockname confirm)
***************
*** 3499,3504 ****
--- 3662,3668 ----
          (loc-enc (tramp-get-local-encoding multi-method method user host))
          (loc-dec (tramp-get-local-decoding multi-method method user host))
          (trampbuf (get-buffer-create "*tramp output*"))
+         (modes (file-modes filename))
          ;; We use this to save the value of `last-coding-system-used'
          ;; after writing the tmp file.  At the end of the function,
          ;; we set `last-coding-system-used' to this saved value.
***************
*** 3519,3524 ****
--- 3683,3693 ----
         (if confirm ; don't pass this arg unless defined for backward compat.
           (list start end tmpfil append 'no-message lockname confirm)
         (list start end tmpfil append 'no-message lockname)))
+       ;; The permissions of the temporary file should be set.  If
+       ;; filename does not exist (eq modes nil) it has been renamed to
+       ;; the backup file.  This case `save-buffer' handles
+       ;; permissions.
+       (when modes (set-file-modes tmpfil modes))
        ;; Now, `last-coding-system-used' has the right value.  Remember it.
        (when (boundp 'last-coding-system-used)
        (setq coding-system-used last-coding-system-used))
***************
*** 3694,3703 ****
  
  ;; We handle here all file primitives.  Most of them have the file
  ;; name as first parameter; nevertheless we check for them explicitly
! ;; in order to be be signalled if a new primitive appears.  This
  ;; scenario is needed because there isn't a way to decide by
  ;; syntactical means whether a foreign method must be called.  It would
! ;; ease the live if `file-name-handler-alist' would support a decision
  ;; function as well but regexp only.
  (defun tramp-file-name-for-operation (operation &rest args)
    "Return file name related to OPERATION file primitive.
--- 3863,3872 ----
  
  ;; We handle here all file primitives.  Most of them have the file
  ;; name as first parameter; nevertheless we check for them explicitly
! ;; in order to be signalled if a new primitive appears.  This
  ;; scenario is needed because there isn't a way to decide by
  ;; syntactical means whether a foreign method must be called.  It would
! ;; ease the life if `file-name-handler-alist' would support a decision
  ;; function as well but regexp only.
  (defun tramp-file-name-for-operation (operation &rest args)
    "Return file name related to OPERATION file primitive.
***************
*** 3711,3726 ****
                  'dired-compress-file 'dired-uncache
                  'file-accessible-directory-p 'file-attributes
                  'file-directory-p 'file-executable-p 'file-exists-p
!                 'file-local-copy 'file-modes 'file-name-as-directory
!                 'file-name-directory 'file-name-nondirectory
!                 'file-name-sans-versions 'file-ownership-preserved-p
!                 'file-readable-p 'file-regular-p 'file-symlink-p
!                 'file-truename 'file-writable-p 'find-backup-file-name
!                 'find-file-noselect 'get-file-buffer 'insert-directory
!                 'insert-file-contents 'load 'make-directory
!                 'make-directory-internal 'set-file-modes
!                 'substitute-in-file-name 'unhandled-file-name-directory
!                 'vc-registered
                  ; XEmacs only
                  'abbreviate-file-name 'create-file-buffer
                  'dired-file-modtime 'dired-make-compressed-filename
--- 3880,3895 ----
                  'dired-compress-file 'dired-uncache
                  'file-accessible-directory-p 'file-attributes
                  'file-directory-p 'file-executable-p 'file-exists-p
!                 'file-local-copy 'file-remote-p 'file-modes
!                 'file-name-as-directory 'file-name-directory
!                 'file-name-nondirectory 'file-name-sans-versions
!                 'file-ownership-preserved-p 'file-readable-p
!                 'file-regular-p 'file-symlink-p 'file-truename
!                 'file-writable-p 'find-backup-file-name 'find-file-noselect
!                 'get-file-buffer 'insert-directory 'insert-file-contents
!                 'load 'make-directory 'make-directory-internal
!                 'set-file-modes 'substitute-in-file-name
!                 'unhandled-file-name-directory 'vc-registered
                  ; XEmacs only
                  'abbreviate-file-name 'create-file-buffer
                  'dired-file-modtime 'dired-make-compressed-filename
***************
*** 3789,3797 ****
         (foreign (apply foreign operation args))
         (t (tramp-run-real-handler operation args))))))
  
- ;;;###autoload
- (put 'tramp-file-name-handler 'file-remote-p t)       ;for file-remote-p
- 
  (defun tramp-sh-file-name-handler (operation &rest args)
    "Invoke remote-shell Tramp file name handler.
  Fall back to normal file name handler if no Tramp handler exists."
--- 3958,3963 ----
***************
*** 3885,3891 ****
        (list (tramp-handle-expand-file-name name))))))
  
  ;; Check for complete.el and override PC-expand-many-files if appropriate.
! (eval-when-compile
    (defun tramp-save-PC-expand-many-files (name))); avoid compiler warning
  
  (defun tramp-setup-complete ()
--- 4051,4057 ----
        (list (tramp-handle-expand-file-name name))))))
  
  ;; Check for complete.el and override PC-expand-many-files if appropriate.
! (eval-and-compile
    (defun tramp-save-PC-expand-many-files (name))); avoid compiler warning
  
  (defun tramp-setup-complete ()
***************
*** 3936,3946 ****
        (and (featurep 'xemacs)
             (not (event-modifiers last-input-event))
             (or (char-equal
!                 (funcall 'event-to-character last-input-event) ?\?)
                 (char-equal
!                 (funcall 'event-to-character last-input-event) ?\t)
                 (char-equal
!                 (funcall 'event-to-character last-input-event) ?\ ))))
      t)))
  
  (defun tramp-completion-handle-file-exists-p (filename)
--- 4102,4115 ----
        (and (featurep 'xemacs)
             (not (event-modifiers last-input-event))
             (or (char-equal
!                 (funcall (symbol-function 'event-to-character)
!                          last-input-event) ?\?)
                 (char-equal
!                 (funcall (symbol-function 'event-to-character)
!                          last-input-event) ?\t)
                 (char-equal
!                 (funcall (symbol-function 'event-to-character)
!                          last-input-event) ?\ ))))
      t)))
  
  (defun tramp-completion-handle-file-exists-p (filename)
***************
*** 4478,4494 ****
    "Set the last-modified timestamp of the given file.
  TIME is an Emacs internal time value as returned by `current-time'."
    (let ((touch-time (format-time-string "%Y%m%d%H%M.%S" time)))
!     (with-parsed-tramp-file-name file nil
!       (let ((buf (tramp-get-buffer multi-method method user host)))
!       (unless (zerop (tramp-send-command-and-check
!                       multi-method method user host
!                       (format "touch -t %s %s"
!                               touch-time
!                               localname)))
!         (pop-to-buffer buf)
!         (error "tramp-touch: touch failed, see buffer `%s' for details"
!                buf))))))
! 
  (defun tramp-buffer-name (multi-method method user host)
    "A name for the connection buffer for USER at HOST using METHOD."
    (if multi-method
--- 4647,4670 ----
    "Set the last-modified timestamp of the given file.
  TIME is an Emacs internal time value as returned by `current-time'."
    (let ((touch-time (format-time-string "%Y%m%d%H%M.%S" time)))
!     (if (tramp-tramp-file-p file)
!       (with-parsed-tramp-file-name file nil
!         (let ((buf (tramp-get-buffer multi-method method user host)))
!           (unless (zerop (tramp-send-command-and-check
!                           multi-method method user host
!                           (format "touch -t %s %s"
!                                   touch-time
!                                   localname)))
!             (pop-to-buffer buf)
!             (error "tramp-touch: touch failed, see buffer `%s' for details"
!                    buf))))
!       ;; It's a local file
!       (with-temp-buffer
!       (unless (zerop (call-process
!                       "touch" nil (current-buffer) nil "-t" touch-time file))
!             (pop-to-buffer (current-buffer))
!             (error "tramp-touch: touch failed"))))))
!  
  (defun tramp-buffer-name (multi-method method user host)
    "A name for the connection buffer for USER at HOST using METHOD."
    (if multi-method
***************
*** 4726,4741 ****
    "Checks whether the given `ls' executable in one of the dirs groks `-n'.
  Returns nil if none was found, else the command is returned."
    (let ((dl dirlist)
!         (result nil)
!       (directory-sep-char ?/))        ;for XEmacs
!     ;; It would be better to use the CL function `find', but
!     ;; we don't want run-time dependencies on CL.
!     (while (and dl (not result))
!       (let ((x (concat (file-name-as-directory (car dl)) cmd)))
!         (when (tramp-check-ls-command multi-method method user host x)
!           (setq result x)))
!       (setq dl (cdr dl)))
!     result))
  
  (defun tramp-find-ls-command (multi-method method user host)
    "Finds an `ls' command which groks the `-n' option, returning nil if failed.
--- 4902,4917 ----
    "Checks whether the given `ls' executable in one of the dirs groks `-n'.
  Returns nil if none was found, else the command is returned."
    (let ((dl dirlist)
!         (result nil))
!     (tramp-let-maybe directory-sep-char ?/ ;for XEmacs
!       ;; It would be better to use the CL function `find', but
!       ;; we don't want run-time dependencies on CL.
!       (while (and dl (not result))
!       (let ((x (concat (file-name-as-directory (car dl)) cmd)))
!         (when (tramp-check-ls-command multi-method method user host x)
!           (setq result x)))
!       (setq dl (cdr dl)))
!       result)))
  
  (defun tramp-find-ls-command (multi-method method user host)
    "Finds an `ls' command which groks the `-n' option, returning nil if failed.
***************
*** 4815,4820 ****
--- 4991,5014 ----
    (process-send-string nil (concat tramp-terminal-type
                                   tramp-rsh-end-of-line)))
  
+ (defun tramp-action-process-alive (p multi-method method user host)
+   "Check whether a process has finished."
+   (unless (memq (process-status p) '(run open))
+     (throw 'tramp-action 'process-died)))
+ 
+ (defun tramp-action-out-of-band (p multi-method method user host)
+   "Check whether an out-of-band copy has finished."
+   (cond ((and (memq (process-status p) '(stop exit))
+             (zerop (process-exit-status p)))
+        (tramp-message 9 "Process has finished.")
+        (throw 'tramp-action 'ok))
+       ((or (and (memq (process-status p) '(stop exit))
+                 (not (zerop (process-exit-status p))))
+            (memq (process-status p) '(signal)))
+        (tramp-message 9 "Process has died.")
+        (throw 'tramp-action 'process-died))
+       (t nil)))
+ 
  ;; The following functions are specifically for multi connections.
  
  (defun tramp-multi-action-login (p method user host)
***************
*** 4931,4937 ****
        (erase-buffer)
        (tramp-message 10 "Sending command to remote shell: %s"
                     cmd)
!       (tramp-send-command multi-method method user host cmd)
        (tramp-barf-if-no-shell-prompt
         p 60 "Remote shell command failed: %s" cmd))
      (erase-buffer)))
--- 5125,5131 ----
        (erase-buffer)
        (tramp-message 10 "Sending command to remote shell: %s"
                     cmd)
!       (tramp-send-command multi-method method user host cmd nil t)
        (tramp-barf-if-no-shell-prompt
         p 60 "Remote shell command failed: %s" cmd))
      (erase-buffer)))
***************
*** 4991,4997 ****
                        user host 'tramp-login-args)))
               (found nil)
               (pw nil))
!         (process-kill-without-query p)
        (set-buffer (tramp-get-buffer multi-method method user host))
        (erase-buffer)
        (tramp-process-actions p multi-method method user host
--- 5185,5191 ----
                        user host 'tramp-login-args)))
               (found nil)
               (pw nil))
!         (tramp-set-process-query-on-exit-flag p nil)
        (set-buffer (tramp-get-buffer multi-method method user host))
        (erase-buffer)
        (tramp-process-actions p multi-method method user host
***************
*** 5014,5025 ****
  `shell-prompt-pattern' and `tramp-shell-prompt-pattern' which must be
  set up correctly.
  
- Please note that it is NOT possible to use this connection method with
- an out-of-band transfer method if this function asks the user for a
- password!  You must use an inline transfer method in this case.
- Sadly, the transfer method cannot be switched on the fly, instead you
- must specify the right method in the file name.
- 
  Kludgy feature: if HOST has the form \"xx#yy\", then yy is assumed to
  be a port number for ssh, and \"-p yy\" will be added to the list of
  arguments, and xx will be used as the host name to connect to.
--- 5208,5213 ----
***************
*** 5064,5070 ****
                    (apply #'start-process bufnam buf login-program 
                           host login-args)))
               (found nil))
!         (process-kill-without-query p)
  
        (set-buffer buf)
        (tramp-process-actions p multi-method method user host
--- 5252,5258 ----
                    (apply #'start-process bufnam buf login-program 
                           host login-args)))
               (found nil))
!         (tramp-set-process-query-on-exit-flag p nil)
  
        (set-buffer buf)
        (tramp-process-actions p multi-method method user host
***************
*** 5125,5131 ****
                         user host 'tramp-login-args))))
               (found nil)
               (pw nil))
!         (process-kill-without-query p)
        (set-buffer (tramp-get-buffer multi-method method user host))
        (tramp-process-actions p multi-method method user host
                               tramp-actions-before-shell)
--- 5313,5319 ----
                         user host 'tramp-login-args))))
               (found nil)
               (pw nil))
!         (tramp-set-process-query-on-exit-flag p nil)
        (set-buffer (tramp-get-buffer multi-method method user host))
        (tramp-process-actions p multi-method method user host
                               tramp-actions-before-shell)
***************
*** 5178,5184 ****
                                 tramp-multi-sh-program))
               (num-hops (length method))
               (i 0))
!         (process-kill-without-query p)
          (tramp-message 9 "Waiting 60s for local shell to come up...")
          (unless (tramp-wait-for-regexp
                 p 60 (format "\\(%s\\)\\'\\|\\(%s\\)\\'"
--- 5366,5372 ----
                                 tramp-multi-sh-program))
               (num-hops (length method))
               (i 0))
!         (tramp-set-process-query-on-exit-flag p nil)
          (tramp-message 9 "Waiting 60s for local shell to come up...")
          (unless (tramp-wait-for-regexp
                 p 60 (format "\\(%s\\)\\'\\|\\(%s\\)\\'"
***************
*** 5298,5309 ****
--- 5486,5501 ----
               (with-timeout (timeout)
                 (while (not found)
                   (accept-process-output proc 1)
+                (unless (memq (process-status proc) '(run open))
+                  (error "Process has died"))
                   (goto-char (point-min))
                   (setq found (when (re-search-forward regexp nil t)
                                 (tramp-match-string-list)))))))
            (t
             (while (not found)
               (accept-process-output proc 1)
+            (unless (memq (process-status proc) '(run open))
+              (error "Process has died"))
               (goto-char (point-min))
               (setq found (when (re-search-forward regexp nil t)
                             (tramp-match-string-list))))))
***************
*** 5358,5364 ****
  
  ;; HHH: Not Changed.  This might handle the case where USER is not
  ;;      given in the "File name" very poorly.  Then, the local
! ;;      variable tramp-current user will be set to nil.
  (defun tramp-pre-connection (multi-method method user host)
    "Do some setup before actually logging in.
  METHOD, USER and HOST specify the connection."
--- 5550,5556 ----
  
  ;; HHH: Not Changed.  This might handle the case where USER is not
  ;;      given in the "File name" very poorly.  Then, the local
! ;;      variable tramp-current-user will be set to nil.
  (defun tramp-pre-connection (multi-method method user host)
    "Do some setup before actually logging in.
  METHOD, USER and HOST specify the connection."
***************
*** 5412,5417 ****
--- 5604,5613 ----
    (tramp-send-command-internal multi-method method user host
                               "stty -inlcr -echo kill '^U'")
    (erase-buffer)
+   ;; Ignore garbage after stty command.
+   (tramp-send-command-internal multi-method method user host
+                              "echo foo")
+   (erase-buffer)
    (tramp-send-command-internal multi-method method user host
                               "TERM=dumb; export TERM")
    ;; Try to set up the coding system correctly.
***************
*** 5449,5457 ****
                                     "stty -onlcr"))))
    (erase-buffer)
    (tramp-message
!    9 "Waiting 30s for `HISTFILE=$HOME/.tramp_history; HISTSIZE=1'")
!   (tramp-send-command-internal multi-method method user host
!                              "HISTFILE=$HOME/.tramp_history; HISTSIZE=1")
    (erase-buffer)
    (tramp-message 9 "Waiting 30s for `set +o vi +o emacs'")
    (tramp-send-command-internal multi-method method user host
--- 5645,5654 ----
                                     "stty -onlcr"))))
    (erase-buffer)
    (tramp-message
!    9 "Waiting 30s for `HISTFILE=$HOME/.tramp_history; HISTSIZE=1; export 
HISTFILE; export HISTSIZE'")
!   (tramp-send-command-internal
!    multi-method method user host
!    "HISTFILE=$HOME/.tramp_history; HISTSIZE=1; export HISTFILE; export 
HISTSIZE")
    (erase-buffer)
    (tramp-message 9 "Waiting 30s for `set +o vi +o emacs'")
    (tramp-send-command-internal multi-method method user host
***************
*** 5858,5863 ****
--- 6055,6061 ----
    (or neveropen
        (tramp-maybe-open-connection multi-method method user host))
    (setq tramp-last-cmd-time (current-time))
+   (setq tramp-last-cmd command)
    (when tramp-debug-buffer
      (save-excursion
        (set-buffer (tramp-get-debug-buffer multi-method method user host))
***************
*** 5886,5891 ****
--- 6084,6090 ----
    (let ((proc (get-buffer-process (current-buffer)))
          (found nil)
          (start-time (current-time))
+       (start-point (point))
          (end-of-output (concat "^"
                                 (regexp-quote tramp-end-of-output)
                                 "\r?$")))
***************
*** 5905,5916 ****
--- 6104,6119 ----
                 (with-timeout (timeout)
                   (while (not found)
                     (accept-process-output proc 1)
+                  (unless (memq (process-status proc) '(run open))
+                    (error "Process has died"))
                     (goto-char (point-max))
                     (forward-line -1)
                     (setq found (looking-at end-of-output))))))
              (t
               (while (not found)
                 (accept-process-output proc 1)
+              (unless (memq (process-status proc) '(run open))
+                (error "Process has died"))
                 (goto-char (point-max))
                 (forward-line -1)
                 (setq found (looking-at end-of-output))))))
***************
*** 5920,5925 ****
--- 6123,6134 ----
        (goto-char (point-max))
        (forward-line -2)
        (delete-region (point) (point-max)))
+     ;; If processing echoes, look for it in the first line and delete.
+     (when tramp-process-echoes
+       (save-excursion
+       (goto-char start-point)
+       (when (looking-at (regexp-quote tramp-last-cmd))
+         (delete-region (point) (forward-line 1)))))
      ;; Add output to debug buffer if appropriate.
      (when tramp-debug-buffer
        (append-to-buffer
***************
*** 6325,6333 ****
      (format "%s:%s" host localname)))
  
  (defun tramp-method-out-of-band-p (multi-method method user host)
!   "Return t if this is an out-of-band method, nil otherwise.
! It is important to check for this condition, since it is not possible
! to enter a password for the `tramp-copy-program'."
    (tramp-get-method-parameter
     multi-method
     (tramp-find-method multi-method method user host)
--- 6534,6540 ----
      (format "%s:%s" host localname)))
  
  (defun tramp-method-out-of-band-p (multi-method method user host)
!   "Return t if this is an out-of-band method, nil otherwise."
    (tramp-get-method-parameter
     multi-method
     (tramp-find-method multi-method method user host)
***************
*** 6502,6508 ****
    (if (functionp 'password-read)
        (let* ((user (or tramp-current-user (user-login-name)))
             (host (or tramp-current-host (system-name)))
!            (key (concat user "@" host))
             (password (apply #'password-read (list prompt key))))
        (apply #'password-cache-add (list key password))
        password)
--- 6709,6718 ----
    (if (functionp 'password-read)
        (let* ((user (or tramp-current-user (user-login-name)))
             (host (or tramp-current-host (system-name)))
!            (key (if (and (stringp user) (stringp host))
!                     (concat user "@" host)
!                   (concat "[" (mapconcat 'identity user "/") "address@hidden"
!                           (mapconcat 'identity host "/") "]")))
             (password (apply #'password-read (list prompt key))))
        (apply #'password-cache-add (list key password))
        password)
***************
*** 6581,6586 ****
--- 6791,6806 ----
  it does the right thing."
    (delete "" (split-string string pattern)))
  
+ (defun tramp-set-process-query-on-exit-flag (process flag)
+   "Specify if query is needed for process when Emacs is exited.
+ If the second argument flag is non-nil, Emacs will query the user before
+ exiting if process is running."
+   (if (fboundp 'set-process-query-on-exit-flag)
+       (set-process-query-on-exit-flag process flag)
+     (funcall (symbol-function 'process-kill-without-query)
+            process flag)))
+ 
+ 
  ;; ------------------------------------------------------------ 
  ;; -- Kludges section -- 
  ;; ------------------------------------------------------------ 
***************
*** 6714,6719 ****
--- 6934,6941 ----
         tramp-wrong-passwd-regexp
         tramp-yesno-prompt-regexp
         tramp-yn-prompt-regexp
+        tramp-terminal-prompt-regexp
+        tramp-out-of-band-prompt-regexp
         tramp-temp-name-prefix
         tramp-file-name-structure
         tramp-file-name-regexp
***************
*** 6725,6734 ****
--- 6947,6961 ----
         tramp-end-of-output
         tramp-coding-commands
         tramp-actions-before-shell
+        tramp-actions-copy-out-of-band
         tramp-multi-actions
         tramp-terminal-type
         tramp-shell-prompt-pattern
         tramp-chunksize
+        ,(when (boundp 'tramp-backup-directory-alist)
+         'tramp-backup-directory-alist)
+        ,(when (boundp 'tramp-bkup-backup-directory-info)
+         'tramp-bkup-backup-directory-info)
  
         ;; Non-tramp variables of interest
         shell-prompt-pattern
***************
*** 6737,6742 ****
--- 6964,6977 ----
         backup-by-copying-when-mismatch
         ,(when (boundp 'backup-by-copying-when-privileged-mismatch)
            'backup-by-copying-when-privileged-mismatch)
+        ,(when (boundp 'password-cache)
+           'password-cache)
+        ,(when (boundp 'password-cache-expiry)
+           'password-cache-expiry)
+        ,(when (boundp 'backup-directory-alist)
+         'backup-directory-alist)
+        ,(when (boundp 'bkup-backup-directory-info)
+         'bkup-backup-directory-info)
         file-name-handler-alist)
       nil                              ; pre-hook
       nil                              ; post-hook
***************
*** 6799,6805 ****
  ;; * Rewrite `tramp-shell-quote-argument' to abstain from using
  ;;   `shell-quote-argument'.
  ;; * Completion gets confused when you leave out the method name.
- ;; * Support `dired-compress-file' filename handler.
  ;; * In Emacs 21, `insert-directory' shows total number of bytes used
  ;;   by the files in that directory.  Add this here.
  ;; * Avoid screen blanking when hitting `g' in dired.  (Eli Tziperman)
--- 7034,7039 ----
***************
*** 6820,6838 ****
  ;;   if it does show files when run locally.
  ;; * Allow correction of passwords, if the remote end allows this.
  ;;   (Mark Hershberger)
- ;; * Make sure permissions of tmp file are good.
- ;;   (Nelson Minar <address@hidden>)
- ;; * Grok passwd prompts with scp?  (David Winter
- ;;   <address@hidden>).  Maybe just do `ssh -l user
- ;;   host', then wait a while for the passwd or passphrase prompt.  If
- ;;   there is one, remember the passwd/phrase.
  ;; * How to deal with MULE in `insert-file-contents' and `write-region'?
  ;; * Do asynchronous `shell-command's.
  ;; * Grok `append' parameter for `write-region'.
  ;; * Test remote ksh or bash for tilde expansion in `tramp-find-shell'?
  ;; * abbreviate-file-name
  ;; * grok ~ in tramp-remote-path  (Henrik Holm <address@hidden>)
- ;; * `C' in dired gives error `not tramp file name'.
  ;; * Also allow to omit user names when doing multi-hop.  Not sure yet
  ;;   what the user names should default to, though.
  ;; * better error checking.  At least whenever we see something
--- 7054,7065 ----
***************
*** 6848,6856 ****
  ;;   (Francesco Potort,Al(B)
  ;; * Should we set PATH ourselves or should we rely on the remote end
  ;;   to do it?
- ;; * Do the autoconf thing.
  ;; * Make it work for XEmacs 20, which is missing `with-timeout'.
- ;; * Allow non-Unix remote systems.  (More a long-term thing.)
  ;; * Make it work for different encodings, and for different file name
  ;;   encodings, too.  (Daniel Pittman)
  ;; * Change applicable functions to pass a struct tramp-file-name rather
--- 7075,7081 ----
***************
*** 6865,6877 ****
  ;; * When editing a remote CVS controlled file as a different user, VC
  ;;   gets confused about the file locking status.  Try to find out why
  ;;   the workaround doesn't work.
- ;; * When user is running ssh-agent, it would be useful to add the
- ;;   passwords typed by the user to that agent.  This way, the next time
- ;;   round, the users don't have to type all this in again.
- ;;   This would be especially useful for start-process, I think.
- ;;   An easy way to implement start-process is to open a second shell
- ;;   connection which is inconvenient if the user has to reenter
- ;;   passwords.
  ;; * Change `copy-file' to grok the case where the filename handler
  ;;   for the source and the target file are different.  Right now,
  ;;   it looks at the source file and then calls that handler, if
--- 7090,7095 ----
***************
*** 6895,6911 ****
  
  ;; Functions for file-name-handler-alist:
  ;; diff-latest-backup-file -- in diff.el
- ;; dired-compress-file
  ;; dired-uncache -- this will be needed when we do insert-directory caching
  ;; file-name-as-directory -- use primitive?
- ;; file-name-directory -- use primitive?
- ;; file-name-nondirectory -- use primitive?
  ;; file-name-sans-versions -- use primitive?
- ;; file-newer-than-file-p
- ;; find-backup-file-name
  ;; get-file-buffer -- use primitive
- ;; load
- ;; unhandled-file-name-directory
  ;; vc-registered
  
  ;;; arch-tag: 3a21a994-182b-48fa-b0cd-c1d9fede424a
--- 7113,7122 ----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]