Mercurial > emacs
comparison lisp/dired-aux.el @ 14635:7a7506ffde31
(dired-call-process): Call file name handler.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Wed, 21 Feb 1996 21:32:04 +0000 |
parents | 83f275dcd93a |
children | 9e847303147a |
comparison
equal
deleted
inserted
replaced
14634:c7dfe102acc3 | 14635:7a7506ffde31 |
---|---|
398 ;; In Emacs 19 this will return program's exit status. | 398 ;; In Emacs 19 this will return program's exit status. |
399 ;; This is a separate function so that ange-ftp can redefine it. | 399 ;; This is a separate function so that ange-ftp can redefine it. |
400 (defun dired-call-process (program discard &rest arguments) | 400 (defun dired-call-process (program discard &rest arguments) |
401 ; "Run PROGRAM with output to current buffer unless DISCARD is t. | 401 ; "Run PROGRAM with output to current buffer unless DISCARD is t. |
402 ;Remaining arguments are strings passed as command arguments to PROGRAM." | 402 ;Remaining arguments are strings passed as command arguments to PROGRAM." |
403 (apply 'call-process program nil (not discard) nil arguments)) | 403 ;; Look for a handler for default-directory in case it is a remote file name. |
404 (let ((handler | |
405 (find-file-name-handler (directory-file-name default-directory) | |
406 'dired-call-process))) | |
407 (if handler (apply handler 'dired-call-process | |
408 program discard arguments) | |
409 (apply 'call-process program nil (not discard) nil arguments)))) | |
404 | 410 |
405 (defun dired-check-process (msg program &rest arguments) | 411 (defun dired-check-process (msg program &rest arguments) |
406 ; "Display MSG while running PROGRAM, and check for output. | 412 ; "Display MSG while running PROGRAM, and check for output. |
407 ;Remaining arguments are strings passed as command arguments to PROGRAM. | 413 ;Remaining arguments are strings passed as command arguments to PROGRAM. |
408 ; On error, insert output | 414 ; On error, insert output |