diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2017-08-22 16:22:33 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2017-08-22 16:22:33 +0200 |
commit | 336707efb3d173c396ac522490ef2b1b6664eebf (patch) | |
tree | 38fcba9e9fe74e9adf11e3101d6832553e5ad43a /lisp/net/tramp-compat.el | |
parent | ee9392a699a5b674388e650c61405cbe3b94e852 (diff) | |
download | emacs-336707efb3d173c396ac522490ef2b1b6664eebf.tar.gz |
Test `file-expand-wildcards' for Tramp
* lisp/net/tramp-compat.el (tramp-advice-file-expand-wildcards):
Remove, not needed anymore.
* test/lisp/net/tramp-tests.el (top): Require seq.el.
(tramp-test16-directory-files): Simplify.
(tramp-test16-file-expand-wildcards): New test.
(tramp-test28-interrupt-process): Skip for older Emacsen.
Diffstat (limited to 'lisp/net/tramp-compat.el')
-rw-r--r-- | lisp/net/tramp-compat.el | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index b2df4d6324b..9a50d624487 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -50,33 +50,6 @@ `(when (functionp ,function) (with-no-warnings (funcall ,function ,@arguments)))) -;; We currently use "[" and "]" in the filename format for IPv6 hosts -;; of GNU Emacs. This means that Emacs wants to expand wildcards if -;; `find-file-wildcards' is non-nil, and then barfs because no -;; expansion could be found. We detect this situation and do -;; something really awful: we have `file-expand-wildcards' return the -;; original filename if it can't expand anything. Let's just hope -;; that this doesn't break anything else. It is not needed anymore -;; since GNU Emacs 23.2. -(unless (featurep 'files 'remote-wildcards) - (defadvice file-expand-wildcards - (around tramp-advice-file-expand-wildcards activate) - (let ((name (ad-get-arg 0))) - ;; If it's a Tramp file, look if wildcards need to be expanded - ;; at all. - (if (and - (tramp-tramp-file-p name) - (not (string-match "[[*?]" (file-remote-p name 'localname)))) - (setq ad-return-value (list name)) - ;; Otherwise, just run the original function. - ad-do-it))) - (add-hook - 'tramp-unload-hook - (lambda () - (ad-remove-advice - 'file-expand-wildcards 'around 'tramp-advice-file-expand-wildcards) - (ad-activate 'file-expand-wildcards)))) - (defsubst tramp-compat-temporary-file-directory () "Return name of directory for temporary files. It is the default value of `temporary-file-directory'." |