emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 6ef5944 1/2: Fix recursive load of tramp.elc


From: Michael Albinus
Subject: [Emacs-diffs] master 6ef5944 1/2: Fix recursive load of tramp.elc
Date: Sun, 8 May 2016 09:48:47 +0000 (UTC)

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

    Fix recursive load of tramp.elc
    
    * lisp/net/tramp.el (tramp-completion-file-name-handler):
    Check also for `tramp-completion-mode-p'.
    (tramp-completion-mode, tramp-completion-mode-p): Autoload them.
---
 lisp/net/tramp.el |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 87ccae1..aa335d3 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2110,7 +2110,7 @@ Falls back to normal file name handler if no Tramp file 
name handler exists."
   (let ((fn (assoc operation tramp-completion-file-name-handler-alist)))
     (if (and
         ;; When `tramp-mode' is not enabled, we don't do anything.
-         fn tramp-mode
+         fn tramp-mode (tramp-completion-mode-p)
          ;; For other syntaxes than `sep', the regexp matches many common
          ;; situations where the user doesn't actually want to use Tramp.
          ;; So to avoid autoloading Tramp after typing just "/s", we
@@ -2217,6 +2217,7 @@ Falls back to normal file name handler if no Tramp file 
name handler exists."
 
 ;;; File name handler functions for completion mode:
 
+;;;###autoload
 (defvar tramp-completion-mode nil
   "If non-nil, external packages signal that they are in file name completion.
 
@@ -2236,8 +2237,8 @@ should never be set globally, the intention is to 
let-bind it.")
 ;; Tramp file name syntax. Maybe another variable should be introduced
 ;; overwriting this check in such cases. Or we change Tramp file name
 ;; syntax in order to avoid ambiguities.
-;;;###tramp-autoload
-(defun tramp-completion-mode-p ()
+;;;###autoload
+(progn (defun tramp-completion-mode-p ()
   "Check, whether method / user name / host name completion is active."
   (or
    ;; Signal from outside.  `non-essential' has been introduced in Emacs 24.
@@ -2250,7 +2251,7 @@ should never be set globally, the intention is to 
let-bind it.")
         (equal last-input-event ?\t)
         (and (not (event-modifiers last-input-event))
              (or (equal last-input-event ?\?)
-                 (equal last-input-event ?\ )))))))
+                 (equal last-input-event ?\ ))))))))
 
 (defun tramp-connectable-p (filename)
   "Check, whether it is possible to connect the remote host w/o side-effects.



reply via email to

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