aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2009-11-17 10:38:44 +0000
committerMichael Albinus2009-11-17 10:38:44 +0000
commite268e987dccd39b3ae6aa61a558e9d5b8349b8d7 (patch)
treeede41d98b35c9f49b93f0341377a2286766a436a
parenta6eb20d8fe270d70a28971719935479f6fa99c31 (diff)
downloademacs-e268e987dccd39b3ae6aa61a558e9d5b8349b8d7.tar.gz
emacs-e268e987dccd39b3ae6aa61a558e9d5b8349b8d7.zip
* net/tramp.el (tramp-advice-file-expand-wildcards): Simplify.
Don't set `ad-return-value' if `ad-do-it' doesn't.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/tramp.el25
2 files changed, 15 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 409bcfa20bd..58ea6df92db 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12009-11-17 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-advice-file-expand-wildcards): Simplify.
4 Don't set `ad-return-value' if `ad-do-it' doesn't.
5
12009-11-17 Jan Djärv <jan.h.d@swipnet.se> 62009-11-17 Jan Djärv <jan.h.d@swipnet.se>
2 7
3 * menu-bar.el: Put "Use system font" in Option-menu. 8 * menu-bar.el: Put "Use system font" in Option-menu.
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index ec2ae75e151..dc755d04a4a 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -8364,21 +8364,16 @@ Only works for Bourne-like shells."
8364 (defadvice file-expand-wildcards 8364 (defadvice file-expand-wildcards
8365 (around tramp-advice-file-expand-wildcards activate) 8365 (around tramp-advice-file-expand-wildcards activate)
8366 (let ((name (ad-get-arg 0))) 8366 (let ((name (ad-get-arg 0)))
8367 (if (tramp-tramp-file-p name) 8367 ;; If it's a Tramp file, dissect it and look if wildcards need
8368 ;; If it's a Tramp file, dissect it and look if wildcards 8368 ;; to be expanded at all.
8369 ;; need to be expanded at all. 8369 (if (and
8370 (if (string-match 8370 (tramp-tramp-file-p name)
8371 "[[*?]" 8371 (not (string-match
8372 (tramp-file-name-localname (tramp-dissect-file-name name))) 8372 "[[*?]"
8373 (progn 8373 (tramp-file-name-localname (tramp-dissect-file-name name)))))
8374 ad-do-it 8374 (setq ad-return-value (list name))
8375 (unless ad-return-value 8375 ;; Otherwise, just run the original function.
8376 (setq ad-return-value (list name)))) 8376 ad-do-it)))
8377 (setq ad-return-value (list name)))
8378 ;; If it is not a Tramp file, just run the original function.
8379 ad-do-it
8380 (unless ad-return-value
8381 (setq ad-return-value (list name))))))
8382 (add-hook 8377 (add-hook
8383 'tramp-unload-hook 8378 'tramp-unload-hook
8384 (lambda () 8379 (lambda ()