# HG changeset patch # User Michael Albinus # Date 1250536293 0 # Node ID b9b60c07064d03aa790cb81d87f033ad1661adbb # Parent 73f76307d49b3f601882c6f9ac99afbb899ea155 * net/tramp.el (tramp-register-completion-file-name-handler): Check also for (member 'partial-completion completion-styles). diff -r 73f76307d49b -r b9b60c07064d lisp/net/tramp.el --- a/lisp/net/tramp.el Mon Aug 17 01:25:54 2009 +0000 +++ b/lisp/net/tramp.el Mon Aug 17 19:11:33 2009 +0000 @@ -4925,13 +4925,17 @@ (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