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


From: Kai Großjohann
Subject: [Emacs-diffs] Changes to emacs/lisp/net/tramp.el
Date: Wed, 21 Aug 2002 11:04:29 -0400

Index: emacs/lisp/net/tramp.el
diff -c emacs/lisp/net/tramp.el:1.20 emacs/lisp/net/tramp.el:1.21
*** emacs/lisp/net/tramp.el:1.20        Wed Aug  7 10:54:04 2002
--- emacs/lisp/net/tramp.el     Wed Aug 21 11:04:28 2002
***************
*** 72,78 ****
  ;; In the Tramp CVS repository, the version numer is auto-frobbed from
  ;; the Makefile, so you should edit the top-level Makefile to change
  ;; the version number.
! (defconst tramp-version "2.0.12"
    "This version of tramp.")
  
  (defconst tramp-bug-report-address "address@hidden"
--- 72,78 ----
  ;; In the Tramp CVS repository, the version numer is auto-frobbed from
  ;; the Makefile, so you should edit the top-level Makefile to change
  ;; the version number.
! (defconst tramp-version "2.0.13"
    "This version of tramp.")
  
  (defconst tramp-bug-report-address "address@hidden"
***************
*** 731,743 ****
    :type 'regexp)
  
  (defcustom tramp-yesno-prompt-regexp
!   "Are you sure you want to continue connecting (yes/no)\\? *"
!   "Regular expression matching all queries which need to be confirmed.
  The confirmation should be done with yes or no.
! The regexp should match at end of buffer."
    :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
--- 731,757 ----
    :type 'regexp)
  
  (defcustom tramp-yesno-prompt-regexp
!   (concat
!    (regexp-opt '("Are you sure you want to continue connecting (yes/no)?") t)
!    "\\s-*")
!   "Regular expression matching all yes/no queries which need to be confirmed.
  The confirmation should be done with yes or no.
! The regexp should match at end of buffer.
! See also `tramp-yn-prompt-regexp'."
    :group 'tramp
    :type 'regexp)
  
+ (defcustom tramp-yn-prompt-regexp
+   (concat (regexp-opt '("Store key in cache? (y/n)") t)
+         "\\s-*")
+   "Regular expression matching all y/n queries which need to be confirmed.
+ The confirmation should be done with y or n.
+ The regexp should match at end of buffer.
+ See also `tramp-yesno-prompt-regexp'."
+   :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
***************
*** 1057,1063 ****
      (tramp-login-prompt-regexp tramp-action-login)
      (shell-prompt-pattern tramp-action-succeed)
      (tramp-wrong-passwd-regexp tramp-action-permission-denied)
!     (tramp-yesno-prompt-regexp tramp-action-yesno))
    "List of pattern/action pairs.
  Whenever a pattern matches, the corresponding action is performed.
  Each item looks like (PATTERN ACTION).
--- 1071,1078 ----
      (tramp-login-prompt-regexp tramp-action-login)
      (shell-prompt-pattern tramp-action-succeed)
      (tramp-wrong-passwd-regexp tramp-action-permission-denied)
!     (tramp-yesno-prompt-regexp tramp-action-yesno)
!     (tramp-yn-prompt-regexp tramp-action-yn))
    "List of pattern/action pairs.
  Whenever a pattern matches, the corresponding action is performed.
  Each item looks like (PATTERN ACTION).
***************
*** 1384,1389 ****
--- 1399,1411 ----
  This variable is buffer-local in every buffer.")
  (make-variable-buffer-local 'tramp-last-cmd-time)
  
+ (defvar tramp-feature-write-region-fix
+   (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.")
+ 
  ;; New handlers should be added here.  The following operations can be
  ;; handled using the normal primitives: file-name-as-directory,
  ;; file-name-directory, file-name-nondirectory,
***************
*** 3059,3065 ****
                  multi-method method user host
                  6 "Sending end of data token...")
                 (tramp-send-command
!                 multi-method method user host "EOF")
                 (tramp-message-for-buffer
                  multi-method method user host 6
                  "Waiting for remote host to process data...")
--- 3081,3087 ----
                  multi-method method user host
                  6 "Sending end of data token...")
                 (tramp-send-command
!                 multi-method method user host "EOF" nil t)
                 (tramp-message-for-buffer
                  multi-method method user host 6
                  "Waiting for remote host to process data...")
***************
*** 3627,3633 ****
    (throw 'tramp-action 'permission-denied))
  
  (defun tramp-action-yesno (p multi-method method user host)
!   "Ask the user if he is sure."
    (save-window-excursion
      (pop-to-buffer (tramp-get-buffer multi-method method user host))
      (unless (yes-or-no-p (match-string 0))
--- 3649,3657 ----
    (throw 'tramp-action 'permission-denied))
  
  (defun tramp-action-yesno (p multi-method method user host)
!   "Ask the user for confirmation using `yes-or-no-p'.
! Send \"yes\" to remote process on confirmation, abort otherwise.
! See also `tramp-action-yn'."
    (save-window-excursion
      (pop-to-buffer (tramp-get-buffer multi-method method user host))
      (unless (yes-or-no-p (match-string 0))
***************
*** 3637,3642 ****
--- 3661,3678 ----
      (process-send-string p (concat "yes" tramp-rsh-end-of-line))
      (erase-buffer)))
  
+ (defun tramp-action-yn (p multi-method method user host)
+   "Ask the user for confirmation using `y-or-n-p'.
+ Send \"y\" to remote process on confirmation, abort otherwise.
+ See also `tramp-action-yesno'."
+   (save-window-excursion
+     (pop-to-buffer (tramp-get-buffer multi-method method user host))
+     (unless (y-or-n-p (match-string 0))
+       (kill-process p)
+       (erase-buffer)
+       (throw 'tramp-action 'permission-denied))
+     (process-send-string p (concat "y" tramp-rsh-end-of-line))))
+ 
  ;; The following functions are specifically for multi connections.
  
  (defun tramp-multi-action-login (p method user host)
***************
*** 4738,4744 ****
      (save-excursion
        (set-buffer (tramp-get-buffer multi-method method user host))
        (when (and tramp-last-cmd-time
!                (> (tramp-time-diff tramp-last-cmd-time (current-time)) 60))
        (tramp-send-command
         multi-method method user host "echo are you awake" nil t)
        (unless (tramp-wait-for-output 10)
--- 4774,4780 ----
      (save-excursion
        (set-buffer (tramp-get-buffer multi-method method user host))
        (when (and tramp-last-cmd-time
!                (> (tramp-time-diff (current-time) tramp-last-cmd-time) 60))
        (tramp-send-command
         multi-method method user host "echo are you awake" nil t)
        (unless (tramp-wait-for-output 10)
***************
*** 5661,5666 ****
--- 5697,5703 ----
         tramp-password-prompt-regexp
         tramp-wrong-passwd-regexp
         tramp-yesno-prompt-regexp
+        tramp-yn-prompt-regexp
         tramp-temp-name-prefix
         tramp-file-name-structure
         tramp-file-name-regexp
***************
*** 5811,5816 ****
--- 5848,5854 ----
  ;;   there is one.  But since ange-ftp, for instance, does not know
  ;;   about Tramp, it does not do the right thing if the target file
  ;;   name is a Tramp name.
+ ;; * Username and hostname completion.
  
  ;; Functions for file-name-handler-alist:
  ;; diff-latest-backup-file -- in diff.el




reply via email to

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