]> git.eshelyaron.com Git - emacs.git/commitdiff
Unset `non-essential' in Tramp when not needed anymore
authorMichael Albinus <michael.albinus@gmx.de>
Sat, 18 Feb 2017 13:29:19 +0000 (14:29 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Sat, 18 Feb 2017 13:29:19 +0000 (14:29 +0100)
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.3.2-pre".

* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
Use `tramp-completion-mode-p'.

* lisp/net/tramp.el (tramp-file-name-handler): Unset `non-essential'
when file name doesn't match `tramp-completion-file-name-regexp'.

doc/misc/trampver.texi
lisp/net/tramp-sh.el
lisp/net/tramp.el
lisp/net/trampver.el

index 77b6de3809cec687c9dd95e64f24e93e412a983d..70701aa3589f66da89a8e6e940db25af14c5920a 100644 (file)
@@ -8,7 +8,7 @@
 @c In the Tramp GIT, the version number is auto-frobbed from
 @c configure.ac, so you should edit that file and run
 @c "autoconf && ./configure" to change the version number.
-@set trampver 2.3.1
+@set trampver 2.3.2-pre
 
 @c Other flags from configuration
 @set instprefix /usr/local
index a3641c6c401d642ed4d53f4cede8e653beb52866..1489405b84cdc8c7e30ceccb9883b08a8bb4b70f 100644 (file)
@@ -4653,12 +4653,11 @@ connection if a previous connection has died for some reason."
     (condition-case err
        (unless (tramp-compat-process-live-p p)
 
-         ;; If `non-essential' is non-nil, don't reopen a new connection.
-         ;; This variable has been introduced with Emacs 24.1.
-         ;; We check this for the process related to
+         ;; During completion, don't reopen a new connection.  We
+         ;; check this for the process related to
          ;; `tramp-buffer-name'; otherwise `start-file-process'
          ;; wouldn't run ever when `non-essential' is non-nil.
-         (when (and (boundp 'non-essential) (symbol-value 'non-essential)
+         (when (and (tramp-completion-mode-p)
                     (null (get-process (tramp-buffer-name vec))))
            (throw 'non-essential 'non-essential))
 
index c0f6fdcfadc2c3cbfb52d4ef69004ad4500fa83f..2bd75ab83f1cc9fe6861c90eeff5168ee3f22027 100644 (file)
@@ -2021,6 +2021,10 @@ Falls back to normal file name handler if no Tramp file name handler exists."
     (if (and tramp-mode (tramp-tramp-file-p filename))
        (save-match-data
          (let* ((filename (tramp-replace-environment-variables filename))
+                 (non-essential
+                  (and non-essential
+                       (string-match
+                        tramp-completion-file-name-regexp filename)))
                 (completion (tramp-completion-mode-p))
                 (foreign
                  (tramp-find-foreign-file-name-handler
index 9bf9102cc775747b80a14edc94f011975d7e65b6..14d224142dc8468a62d03a02aea50b4be60b91d5 100644 (file)
@@ -6,7 +6,7 @@
 ;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
 ;; Keywords: comm, processes
 ;; Package: tramp
-;; Version: 2.3.1
+;; Version: 2.3.2-pre
 
 ;; This file is part of GNU Emacs.
 
@@ -32,7 +32,7 @@
 ;; should be changed only there.
 
 ;;;###tramp-autoload
-(defconst tramp-version "2.3.1"
+(defconst tramp-version "2.3.2-pre"
   "This version of Tramp.")
 
 ;;;###tramp-autoload
@@ -54,7 +54,7 @@
 ;; Check for Emacs version.
 (let ((x (if (>= emacs-major-version 23)
     "ok"
-  (format "Tramp 2.3.1 is not fit for %s"
+  (format "Tramp 2.3.2-pre is not fit for %s"
          (when (string-match "^.*$" (emacs-version))
            (match-string 0 (emacs-version)))))))
   (unless (string-match "\\`ok\\'" x) (error "%s" x)))