summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-compat.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2017-05-12 18:36:41 +0200
committerMichael Albinus <michael.albinus@gmx.de>2017-05-12 18:36:41 +0200
commitafd8c762b7bb534f5686a0273f42cb7cd08e0d6f (patch)
treefcd553664e85d26b13479ee3fc2600afed0ccd6e /lisp/net/tramp-compat.el
parente5c71dcaf7481cd5f19706e6bea3361f5c1a83e7 (diff)
downloademacs-afd8c762b7bb534f5686a0273f42cb7cd08e0d6f.tar.gz
Make Tramp backward compatible
* lisp/net/tramp-cmds.el (tramp-change-syntax): Set tramp-autoload cookie. * lisp/net/tramp-compat.el: Run `tramp-change-syntax' at startup, if necessary. * lisp/net/tramp.el (tramp-syntax): Use `tramp-compat-user-error'. (tramp-register-autoload-file-name-handlers): Do not mark `operations' for `tramp-file-name-handler'. (tramp-register-file-name-handlers): Remove also `tramp-autoload-file-name-handler' for backward compatibility. (tramp-register-foreign-file-name-handler): Use `delete-dups'. * test/lisp/net/tramp-tests.el (tramp-change-syntax): Declare.
Diffstat (limited to 'lisp/net/tramp-compat.el')
-rw-r--r--lisp/net/tramp-compat.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index 322e9c36895..53266e806c0 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -384,6 +384,12 @@ If NAME is a remote file name, the local part of NAME is unquoted."
((eq tramp-syntax 'sep) 'separate)
(t tramp-syntax)))
+;; Older Emacsen keep incompatible autoloaded values of `tramp-syntax'.
+(eval-after-load 'tramp
+ '(unless
+ (memq tramp-syntax (tramp-compat-funcall (quote tramp-syntax-values)))
+ (tramp-change-syntax (tramp-compat-tramp-syntax))))
+
(provide 'tramp-compat)
;;; TODO: