summaryrefslogtreecommitdiff
path: root/lisp/net/tramp.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2017-02-18 14:29:19 +0100
committerMichael Albinus <michael.albinus@gmx.de>2017-02-18 14:29:19 +0100
commit6ad34b3d542e874609f3be2c2bc899da9af109d0 (patch)
tree0009fa29e5237a22bad7e058227741eda1c2be85 /lisp/net/tramp.el
parentba6e7232d0324a52be4cd5d5cd3da93ca651ebda (diff)
downloademacs-6ad34b3d542e874609f3be2c2bc899da9af109d0.tar.gz
emacs-6ad34b3d542e874609f3be2c2bc899da9af109d0.tar.bz2
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'.
Diffstat (limited to 'lisp/net/tramp.el')
-rw-r--r--lisp/net/tramp.el4
1 files changed, 4 insertions, 0 deletions
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