mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
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'.
This commit is contained in:
parent
ba6e7232d0
commit
6ad34b3d54
4 changed files with 11 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue