Mercurial > emacs
comparison lisp/net/tramp-vc.el @ 68385:774d8922e2c3
(vc-user-login-name): Comment out defadvice, it is no longer
necessary.
author | André Spiegel <spiegel@gnu.org> |
---|---|
date | Wed, 25 Jan 2006 18:58:45 +0000 |
parents | 118ceefc8263 |
children | 927f1c4f43d8 |
comparison
equal
deleted
inserted
replaced
68384:1d4de26bcb1f | 68385:774d8922e2c3 |
---|---|
434 ((vectorp u) (elt u (1- (length u)))) | 434 ((vectorp u) (elt u (1- (length u)))) |
435 ((null u) (user-login-name)) | 435 ((null u) (user-login-name)) |
436 (t (error "tramp-handle-vc-user-login-name cannot cope!"))))))) | 436 (t (error "tramp-handle-vc-user-login-name cannot cope!"))))))) |
437 | 437 |
438 | 438 |
439 (defadvice vc-user-login-name | 439 ;; The following defadvice is no longer necessary after changes in VC |
440 (around tramp-vc-user-login-name activate) | 440 ;; on 2006-01-25, Andre. |
441 "Support for files on remote machines accessed by TRAMP." | 441 |
442 ;; We rely on the fact that `file' is bound when this is called. | 442 ;; (defadvice vc-user-login-name |
443 ;; This appears to be the case everywhere in vc.el and vc-hooks.el | 443 ;; (around tramp-vc-user-login-name activate) |
444 ;; as of Emacs 20.5. | 444 ;; "Support for files on remote machines accessed by TRAMP." |
445 ;; | 445 ;; ;; We rely on the fact that `file' is bound when this is called. |
446 ;; CCC TODO there should be a real solution! Talk to Andre Spiegel | 446 ;; ;; This appears to be the case everywhere in vc.el and vc-hooks.el |
447 ;; about this. | 447 ;; ;; as of Emacs 20.5. |
448 (let ((file (when (boundp 'file) | 448 ;; ;; |
449 (symbol-value 'file)))) ;pacify byte-compiler | 449 ;; ;; CCC TODO there should be a real solution! Talk to Andre Spiegel |
450 (or (and (stringp file) | 450 ;; ;; about this. |
451 (tramp-tramp-file-p file) ; tramp file | 451 ;; (let ((file (when (boundp 'file) |
452 (setq ad-return-value | 452 ;; (symbol-value 'file)))) ;pacify byte-compiler |
453 (save-match-data | 453 ;; (or (and (stringp file) |
454 (tramp-handle-vc-user-login-name uid)))) ; get the owner name | 454 ;; (tramp-tramp-file-p file) ; tramp file |
455 ad-do-it))) ; else call the original | 455 ;; (setq ad-return-value |
456 ;; (save-match-data | |
457 ;; (tramp-handle-vc-user-login-name uid)))) ; get the owner name | |
458 ;; ad-do-it))) ; else call the original | |
456 | 459 |
457 (add-hook 'tramp-unload-hook | 460 (add-hook 'tramp-unload-hook |
458 '(lambda () (ad-unadvise 'vc-user-login-name))) | 461 '(lambda () (ad-unadvise 'vc-user-login-name))) |
459 | 462 |
460 | 463 |