emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 6ad34b3: Unset `non-essential' in Tramp when not ne


From: Michael Albinus
Subject: [Emacs-diffs] master 6ad34b3: Unset `non-essential' in Tramp when not needed anymore
Date: Sat, 18 Feb 2017 08:29:36 -0500 (EST)

branch: master
commit 6ad34b3d542e874609f3be2c2bc899da9af109d0
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    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'.
---
 doc/misc/trampver.texi | 2 +-
 lisp/net/tramp-sh.el   | 7 +++----
 lisp/net/tramp.el      | 4 ++++
 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 77b6de3..70701aa 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.
address@hidden trampver 2.3.1
address@hidden 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 a3641c6..1489405 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 c0f6fdc..2bd75ab 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 9bf9102..14d2241 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -6,7 +6,7 @@
 ;; Author: Kai Großjohann <address@hidden>
 ;; 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)))



reply via email to

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