]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp.el (tramp-register-completion-file-name-handler):
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 17 Aug 2009 19:12:10 +0000 (19:12 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 17 Aug 2009 19:12:10 +0000 (19:12 +0000)
Check also for (member 'partial-completion completion-styles).

lisp/ChangeLog
lisp/net/tramp.el

index 0327630fbb20e44bec7b544284d4d33f1612bde0..24e5fa9eae38083a76aec53c1a7b970323580f95 100644 (file)
@@ -1,3 +1,8 @@
+2009-08-17  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp.el (tramp-register-completion-file-name-handler):
+       Check also for (member 'partial-completion completion-styles).
+
 2009-08-16  Chong Yidong  <cyd@stupidchicken.com>
 
        * progmodes/cperl-mode.el (cperl-electric-paren): Don't expand
index 94b4858a074461c5f1102a585cc8002628861e51..16f9c5b182c4719c2184cf8b0ba1ee9b9dbd74df 100644 (file)
@@ -4925,13 +4925,17 @@ Falls back to normal file name handler if no Tramp file name handler exists."
   (let ((a1 (rassq
             'tramp-completion-file-name-handler file-name-handler-alist)))
     (setq file-name-handler-alist (delete a1 file-name-handler-alist)))
-  ;; `partial-completion-mode' is unknown in XEmacs.  So we should
-  ;; load it unconditionally there.  In the GNU Emacs case, method/
-  ;; user/host name completion shall be bound to `partial-completion-mode'.
-  ;; `ido-mode' and `icy-mode' are other packages which extend file
-  ;; name completion.
-  (when (or (not (boundp 'partial-completion-mode))
-           (symbol-value 'partial-completion-mode)
+  ;; In XEmacs, there is another Tramp syntax, so we can enable this
+  ;; unconditionally.  In GNU Emacs <= 22, method/user/host name
+  ;; completion shall be bound to `partial-completion-mode'.  Starting
+  ;; with GNU Emacs 23, this is replaced by `completion-styles',
+  ;; containing symbol `partial-completion'.  `ido-mode' and
+  ;; `icy-mode' are other packages which extend file name completion.
+  (when (or (and (boundp 'partial-completion-mode)
+                (symbol-value 'partial-completion-mode))
+           (and (boundp 'completion-styles)
+                (member 'partial-completion (symbol-value 'completion-styles)))
+           (featurep 'xemacs)
            (featurep 'ido)
            (featurep 'icicles))
     (add-to-list 'file-name-handler-alist