aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2006-01-27 19:38:02 +0000
committerMichael Albinus2006-01-27 19:38:02 +0000
commit209bb3be2adcbad11d992b0d05a50996b88e493b (patch)
treeff96a519a9a5d9daedf4b02022797b4f28268f71
parenta849f77d9a39302f1bf19b94c933d188e44a165d (diff)
downloademacs-209bb3be2adcbad11d992b0d05a50996b88e493b.tar.gz
emacs-209bb3be2adcbad11d992b0d05a50996b88e493b.zip
* net/tramp-vc.el (vc-user-login-name): Wrap defadvice with a test
for `process-file', in order to let it work for older Emacsen too.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/net/tramp-vc.el39
2 files changed, 26 insertions, 20 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ccfd8850d28..c17fa08505b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12006-01-27 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp-vc.el (vc-user-login-name): Wrap defadvice with a test
4 for `process-file', in order to let it work for older Emacsen too.
5
12006-01-27 Eli Zaretskii <eliz@gnu.org> 62006-01-27 Eli Zaretskii <eliz@gnu.org>
2 7
3 * international/latexenc.el: Add a suitable `coding:' tag. 8 * international/latexenc.el: Add a suitable `coding:' tag.
@@ -58,7 +63,7 @@
58 63
59 * tramp-vc.el (vc-user-login-name): Comment out defadvice, it is 64 * tramp-vc.el (vc-user-login-name): Comment out defadvice, it is
60 no longer necessary. 65 no longer necessary.
61 66
622006-01-25 Kenichi Handa <handa@m17n.org> 672006-01-25 Kenichi Handa <handa@m17n.org>
63 68
64 * international/mule.el (decode-char): Avoid the overhead of 69 * international/mule.el (decode-char): Avoid the overhead of
diff --git a/lisp/net/tramp-vc.el b/lisp/net/tramp-vc.el
index b672ada295c..1ecbc806968 100644
--- a/lisp/net/tramp-vc.el
+++ b/lisp/net/tramp-vc.el
@@ -439,26 +439,27 @@ filename we are thinking about..."
439;; The following defadvice is no longer necessary after changes in VC 439;; The following defadvice is no longer necessary after changes in VC
440;; on 2006-01-25, Andre. 440;; on 2006-01-25, Andre.
441 441
442;; (defadvice vc-user-login-name 442(unless (fboundp 'process-file)
443;; (around tramp-vc-user-login-name activate) 443 (defadvice vc-user-login-name
444;; "Support for files on remote machines accessed by TRAMP." 444 (around tramp-vc-user-login-name activate)
445;; ;; We rely on the fact that `file' is bound when this is called. 445 "Support for files on remote machines accessed by TRAMP."
446;; ;; This appears to be the case everywhere in vc.el and vc-hooks.el 446 ;; We rely on the fact that `file' is bound when this is called.
447;; ;; as of Emacs 20.5. 447 ;; This appears to be the case everywhere in vc.el and vc-hooks.el
448;; ;; 448 ;; as of Emacs 20.5.
449;; ;; CCC TODO there should be a real solution! Talk to Andre Spiegel 449 ;;
450;; ;; about this. 450 ;; With Emacs 22, the definition of `vc-user-login-name' has been
451;; (let ((file (when (boundp 'file) 451 ;; changed. It doesn't need to be adviced any longer.
452;; (symbol-value 'file)))) ;pacify byte-compiler 452 (let ((file (when (boundp 'file)
453;; (or (and (stringp file) 453 (symbol-value 'file)))) ;pacify byte-compiler
454;; (tramp-tramp-file-p file) ; tramp file 454 (or (and (stringp file)
455;; (setq ad-return-value 455 (tramp-tramp-file-p file) ; tramp file
456;; (save-match-data 456 (setq ad-return-value
457;; (tramp-handle-vc-user-login-name uid)))) ; get the owner name 457 (save-match-data
458;; ad-do-it))) ; else call the original 458 (tramp-handle-vc-user-login-name uid)))) ; get the owner name
459 ad-do-it))) ; else call the original
459 460
460(add-hook 'tramp-unload-hook 461 (add-hook 'tramp-unload-hook
461 '(lambda () (ad-unadvise 'vc-user-login-name))) 462 '(lambda () (ad-unadvise 'vc-user-login-name))))
462 463
463 464
464;; Determine the name of the user owning a file. 465;; Determine the name of the user owning a file.