Mercurial > emacs
diff lisp/subr.el @ 82094:76546b143f2d
* subr.el (start-file-process-shell-command)
(process-file-shell-command): New defuns.
* progmodes/compile.el (compilation-start): Apply
`start-file-process-shell-command'.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Tue, 24 Jul 2007 20:49:18 +0000 |
parents | 885122f2f146 |
children | b98604865ea0 |
line wrap: on
line diff
--- a/lisp/subr.el Tue Jul 24 20:40:26 2007 +0000 +++ b/lisp/subr.el Tue Jul 24 20:49:18 2007 +0000 @@ -2310,6 +2310,15 @@ (start-process name buffer shell-file-name shell-command-switch (mapconcat 'identity args " "))))) +(defun start-file-process-shell-command (name buffer &rest args) + "Start a program in a subprocess. Return the process object for it. +Similar to `start-process-shell-command', but calls `start-file-process'." + (start-file-process + name buffer + (if (file-remote-p default-directory) "/bin/sh" shell-file-name) + (if (file-remote-p default-directory) "-c" shell-command-switch) + (mapconcat 'identity args " "))) + (defun call-process-shell-command (command &optional infile buffer display &rest args) "Execute the shell command COMMAND synchronously in separate process. @@ -2341,6 +2350,16 @@ infile buffer display shell-command-switch (mapconcat 'identity (cons command args) " "))))) + +(defun process-file-shell-command (command &optional infile buffer display + &rest args) + "Process files synchronously in a separate process. +Similar to `call-process-shell-command', but calls `process-file'." + (process-file + (if (file-remote-p default-directory) "/bin/sh" shell-file-name) + infile buffer display + (if (file-remote-p default-directory) "-c" shell-command-switch) + (mapconcat 'identity (cons command args) " "))) ;;;; Lisp macros to do various things temporarily.