diff lisp/net/tramp-vc.el @ 78887:8faf94b6c420

* net/tramp.el (tramp-completion-mode-p): Rename from `tramp-completion-mode'. Revert logic, check `return', `newline' and such alike. Packages like Icicles tend to use other completion characters but `tab' and `space' only. (top): Require cl.el, when `copy-tree' is not available otherwise. * net/tramp-vc.el (tramp-vc-user-login-name): Get argument by `ad-get-arg'. Use `vc-find-version' instead of `process-file' to check whether we have a new enough vc that doesn't need the defadvice.
author Michael Albinus <michael.albinus@gmx.de>
date Mon, 24 Sep 2007 05:42:34 +0000
parents 84cf1e2214c5
children 6888fd3398e8
line wrap: on
line diff
--- a/lisp/net/tramp-vc.el	Sun Sep 23 16:01:40 2007 +0000
+++ b/lisp/net/tramp-vc.el	Mon Sep 24 05:42:34 2007 +0000
@@ -437,7 +437,10 @@
 ;; The following defadvice is no longer necessary after changes in VC
 ;; on 2006-01-25, Andre.
 
-(unless (fboundp 'process-file)
+;; That means either GNU Emacs >= 22 or the "new vc" package from XEmacs
+;; packages collection; as of 2007-09-06, test for availability of
+;; `vc-find-version' works for both of those cases.
+(unless (fboundp 'vc-find-version)
   (defadvice vc-user-login-name
     (around tramp-vc-user-login-name activate)
     "Support for files on remote machines accessed by TRAMP."
@@ -453,7 +456,7 @@
 	       (tramp-tramp-file-p file)	; tramp file
 	       (setq ad-return-value
 		     (save-match-data
-		       (tramp-handle-vc-user-login-name uid)))) ; get the owner name
+		       (tramp-handle-vc-user-login-name (ad-get-arg 0))))) ; get the owner name
 	  ad-do-it)))                     ; else call the original
 
   (add-hook 'tramp-unload-hook