diff options
| author | Michael Albinus <michael.albinus@gmx.de> | 2017-02-18 14:29:19 +0100 | 
|---|---|---|
| committer | Michael Albinus <michael.albinus@gmx.de> | 2017-02-18 14:29:19 +0100 | 
| commit | 6ad34b3d542e874609f3be2c2bc899da9af109d0 (patch) | |
| tree | 0009fa29e5237a22bad7e058227741eda1c2be85 | |
| parent | ba6e7232d0324a52be4cd5d5cd3da93ca651ebda (diff) | |
| download | emacs-6ad34b3d542e874609f3be2c2bc899da9af109d0.tar.gz | |
Unset `non-essential' in Tramp when not needed anymore
* 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'.
| -rw-r--r-- | doc/misc/trampver.texi | 2 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 7 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 4 | ||||
| -rw-r--r-- | lisp/net/trampver.el | 6 | 
4 files changed, 11 insertions, 8 deletions
| diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi index 77b6de3809c..70701aa3589 100644 --- a/doc/misc/trampver.texi +++ b/doc/misc/trampver.texi @@ -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 diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index a3641c6c401..1489405b84c 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -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)) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index c0f6fdcfadc..2bd75ab83f1 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -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 diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 9bf9102cc77..14d224142dc 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -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))) | 
