diff options
| author | Michael Albinus | 2017-02-18 14:29:19 +0100 |
|---|---|---|
| committer | Michael Albinus | 2017-02-18 14:29:19 +0100 |
| commit | 6ad34b3d542e874609f3be2c2bc899da9af109d0 (patch) | |
| tree | 0009fa29e5237a22bad7e058227741eda1c2be85 | |
| parent | ba6e7232d0324a52be4cd5d5cd3da93ca651ebda (diff) | |
| download | emacs-6ad34b3d542e874609f3be2c2bc899da9af109d0.tar.gz emacs-6ad34b3d542e874609f3be2c2bc899da9af109d0.zip | |
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 @@ | |||
| 8 | @c In the Tramp GIT, the version number is auto-frobbed from | 8 | @c In the Tramp GIT, the version number is auto-frobbed from |
| 9 | @c configure.ac, so you should edit that file and run | 9 | @c configure.ac, so you should edit that file and run |
| 10 | @c "autoconf && ./configure" to change the version number. | 10 | @c "autoconf && ./configure" to change the version number. |
| 11 | @set trampver 2.3.1 | 11 | @set trampver 2.3.2-pre |
| 12 | 12 | ||
| 13 | @c Other flags from configuration | 13 | @c Other flags from configuration |
| 14 | @set instprefix /usr/local | 14 | @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." | |||
| 4653 | (condition-case err | 4653 | (condition-case err |
| 4654 | (unless (tramp-compat-process-live-p p) | 4654 | (unless (tramp-compat-process-live-p p) |
| 4655 | 4655 | ||
| 4656 | ;; If `non-essential' is non-nil, don't reopen a new connection. | 4656 | ;; During completion, don't reopen a new connection. We |
| 4657 | ;; This variable has been introduced with Emacs 24.1. | 4657 | ;; check this for the process related to |
| 4658 | ;; We check this for the process related to | ||
| 4659 | ;; `tramp-buffer-name'; otherwise `start-file-process' | 4658 | ;; `tramp-buffer-name'; otherwise `start-file-process' |
| 4660 | ;; wouldn't run ever when `non-essential' is non-nil. | 4659 | ;; wouldn't run ever when `non-essential' is non-nil. |
| 4661 | (when (and (boundp 'non-essential) (symbol-value 'non-essential) | 4660 | (when (and (tramp-completion-mode-p) |
| 4662 | (null (get-process (tramp-buffer-name vec)))) | 4661 | (null (get-process (tramp-buffer-name vec)))) |
| 4663 | (throw 'non-essential 'non-essential)) | 4662 | (throw 'non-essential 'non-essential)) |
| 4664 | 4663 | ||
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." | |||
| 2021 | (if (and tramp-mode (tramp-tramp-file-p filename)) | 2021 | (if (and tramp-mode (tramp-tramp-file-p filename)) |
| 2022 | (save-match-data | 2022 | (save-match-data |
| 2023 | (let* ((filename (tramp-replace-environment-variables filename)) | 2023 | (let* ((filename (tramp-replace-environment-variables filename)) |
| 2024 | (non-essential | ||
| 2025 | (and non-essential | ||
| 2026 | (string-match | ||
| 2027 | tramp-completion-file-name-regexp filename))) | ||
| 2024 | (completion (tramp-completion-mode-p)) | 2028 | (completion (tramp-completion-mode-p)) |
| 2025 | (foreign | 2029 | (foreign |
| 2026 | (tramp-find-foreign-file-name-handler | 2030 | (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 @@ | |||
| 6 | ;; Author: Kai Großjohann <kai.grossjohann@gmx.net> | 6 | ;; Author: Kai Großjohann <kai.grossjohann@gmx.net> |
| 7 | ;; Keywords: comm, processes | 7 | ;; Keywords: comm, processes |
| 8 | ;; Package: tramp | 8 | ;; Package: tramp |
| 9 | ;; Version: 2.3.1 | 9 | ;; Version: 2.3.2-pre |
| 10 | 10 | ||
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | 12 | ||
| @@ -32,7 +32,7 @@ | |||
| 32 | ;; should be changed only there. | 32 | ;; should be changed only there. |
| 33 | 33 | ||
| 34 | ;;;###tramp-autoload | 34 | ;;;###tramp-autoload |
| 35 | (defconst tramp-version "2.3.1" | 35 | (defconst tramp-version "2.3.2-pre" |
| 36 | "This version of Tramp.") | 36 | "This version of Tramp.") |
| 37 | 37 | ||
| 38 | ;;;###tramp-autoload | 38 | ;;;###tramp-autoload |
| @@ -54,7 +54,7 @@ | |||
| 54 | ;; Check for Emacs version. | 54 | ;; Check for Emacs version. |
| 55 | (let ((x (if (>= emacs-major-version 23) | 55 | (let ((x (if (>= emacs-major-version 23) |
| 56 | "ok" | 56 | "ok" |
| 57 | (format "Tramp 2.3.1 is not fit for %s" | 57 | (format "Tramp 2.3.2-pre is not fit for %s" |
| 58 | (when (string-match "^.*$" (emacs-version)) | 58 | (when (string-match "^.*$" (emacs-version)) |
| 59 | (match-string 0 (emacs-version))))))) | 59 | (match-string 0 (emacs-version))))))) |
| 60 | (unless (string-match "\\`ok\\'" x) (error "%s" x))) | 60 | (unless (string-match "\\`ok\\'" x) (error "%s" x))) |