aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/net/tramp-compat.el27
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 @@
50 `(when (functionp ,function) 50 `(when (functionp ,function)
51 (with-no-warnings (funcall ,function ,@arguments)))) 51 (with-no-warnings (funcall ,function ,@arguments))))
52 52
53;; We currently use "[" and "]" in the filename format for IPv6 hosts
54;; of GNU Emacs. This means that Emacs wants to expand wildcards if
55;; `find-file-wildcards' is non-nil, and then barfs because no
56;; expansion could be found. We detect this situation and do
57;; something really awful: we have `file-expand-wildcards' return the
58;; original filename if it can't expand anything. Let's just hope
59;; that this doesn't break anything else. It is not needed anymore
60;; since GNU Emacs 23.2.
61(unless (featurep 'files 'remote-wildcards)
62 (defadvice file-expand-wildcards
63 (around tramp-advice-file-expand-wildcards activate)
64 (let ((name (ad-get-arg 0)))
65 ;; If it's a Tramp file, look if wildcards need to be expanded
66 ;; at all.
67 (if (and
68 (tramp-tramp-file-p name)
69 (not (string-match "[[*?]" (file-remote-p name 'localname))))
70 (setq ad-return-value (list name))
71 ;; Otherwise, just run the original function.
72 ad-do-it)))
73 (add-hook
74 'tramp-unload-hook
75 (lambda ()
76 (ad-remove-advice
77 'file-expand-wildcards 'around 'tramp-advice-file-expand-wildcards)
78 (ad-activate 'file-expand-wildcards))))
79
80(defsubst tramp-compat-temporary-file-directory () 53(defsubst tramp-compat-temporary-file-directory ()
81 "Return name of directory for temporary files. 54 "Return name of directory for temporary files.
82It is the default value of `temporary-file-directory'." 55It is the default value of `temporary-file-directory'."