Mercurial > emacs
comparison lisp/net/tramp-vc.el @ 57653:b324ca4df07c
* simple.el (process-file): New function, similar to call-process
but supports file handlers.
* vc.el (vc-do-command): Use it, instead of call-process.
* net/tramp-vc.el (vc-do-command): Do not advise it if
process-file is fboundp.
* net/tramp.el (tramp-file-name-handler-alist): Add entry for
process-file.
(tramp-handle-process-file): New function.
(tramp-file-name-for-operation): Support process-file.
author | Kai Großjohann <kgrossjo@eu.uu.net> |
---|---|
date | Sat, 23 Oct 2004 19:52:18 +0000 |
parents | 9459300bf43b |
children | 92796330257a 0fe073a08cef |
comparison
equal
deleted
inserted
replaced
57652:1d0ad14ff912 | 57653:b324ca4df07c |
---|---|
215 ;; This is needed to handle remote VC correctly - else we test against the | 215 ;; This is needed to handle remote VC correctly - else we test against the |
216 ;; local VC system and get things wrong... | 216 ;; local VC system and get things wrong... |
217 ;; Daniel Pittman <daniel@danann.net> | 217 ;; Daniel Pittman <daniel@danann.net> |
218 ;;-(if (fboundp 'vc-call-backend) | 218 ;;-(if (fboundp 'vc-call-backend) |
219 ;;- () ;; This is the new VC for which we don't have an appropriate advice yet | 219 ;;- () ;; This is the new VC for which we don't have an appropriate advice yet |
220 (unless (fboundp 'process-file) | |
220 (if (fboundp 'vc-call-backend) | 221 (if (fboundp 'vc-call-backend) |
221 (defadvice vc-do-command | 222 (defadvice vc-do-command |
222 (around tramp-advice-vc-do-command | 223 (around tramp-advice-vc-do-command |
223 (buffer okstatus command file &rest flags) | 224 (buffer okstatus command file &rest flags) |
224 activate) | 225 activate) |
240 (if (or (and (stringp file) (tramp-tramp-file-p file)) | 241 (if (or (and (stringp file) (tramp-tramp-file-p file)) |
241 (and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name)))) | 242 (and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name)))) |
242 (setq ad-return-value | 243 (setq ad-return-value |
243 (apply 'tramp-vc-do-command buffer okstatus command | 244 (apply 'tramp-vc-do-command buffer okstatus command |
244 (or file (buffer-file-name)) last flags)) | 245 (or file (buffer-file-name)) last flags)) |
245 ad-do-it)))) | 246 ad-do-it))))) |
246 ;;-) | 247 ;;-) |
247 | 248 |
248 | 249 |
249 ;; XEmacs uses this to do some of its work. Like vc-do-command, we | 250 ;; XEmacs uses this to do some of its work. Like vc-do-command, we |
250 ;; need to enhance it to make VC work via TRAMP-mode. | 251 ;; need to enhance it to make VC work via TRAMP-mode. |