diff options
author | Miles Bader <miles@gnu.org> | 2007-07-27 10:52:18 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2007-07-27 10:52:18 +0000 |
commit | e468b87f91f26e66a8cde087c1a9c89c67b96d12 (patch) | |
tree | 7cf1ded30152bb0ddd4bbff544693a05b3b62911 /lisp/subr.el | |
parent | b692c96bfa9b8bedd6e093a6c571624442db2e2a (diff) | |
parent | 05bfa8f34f3eedec3ad2fdb45971476a8c8f49b1 (diff) | |
download | emacs-e468b87f91f26e66a8cde087c1a9c89c67b96d12.tar.gz emacs-e468b87f91f26e66a8cde087c1a9c89c67b96d12.tar.bz2 emacs-e468b87f91f26e66a8cde087c1a9c89c67b96d12.zip |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 824-831)
- Update from CVS
- Merge from emacs--rel--22
* emacs--rel--22 (patch 70-74)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-238
Diffstat (limited to 'lisp/subr.el')
-rw-r--r-- | lisp/subr.el | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 9d2dcb496b0..97f73251c03 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -10,7 +10,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) +;; the Free Software Foundation; either version 3, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, @@ -2310,6 +2310,15 @@ Wildcards and redirection are handled as usual in the shell. (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 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again." 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. |