]> git.eshelyaron.com Git - emacs.git/commitdiff
* simple.el (start-file-process): New defun.
authorMichael Albinus <michael.albinus@gmx.de>
Sat, 7 Jul 2007 11:17:51 +0000 (11:17 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Sat, 7 Jul 2007 11:17:51 +0000 (11:17 +0000)
lisp/ChangeLog
lisp/simple.el

index fc0c65560269a091b4f7d425a4c69fd51924a727..b40265798597727c71dfe4e88d5dea4c62cf262e 100644 (file)
@@ -1,3 +1,7 @@
+2007-07-07  Michael Albinus  <michael.albinus@gmx.de>
+
+       * simple.el (start-file-process): New defun.
+
 2007-07-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * files.el (find-file-confirm-nonexistent-file): Rename from
index a0915b9f8ed9b6d0ef6e0dd5f12ce3f247f5b166..c052ce3574bd17eb4f33585c1218686f2a89f0ee 100644 (file)
@@ -2202,6 +2202,18 @@ value passed."
       (when stderr-file (delete-file stderr-file))
       (when lc (delete-file lc)))))
 
+(defun start-file-process (name buffer program &rest program-args)
+  "Start a program in a subprocess.  Return the process object for it.
+Similar to `start-process', but may invoke a file handler based on
+`default-directory'.  The current working directory of the
+subprocess is `default-directory'.
+
+PROGRAM and PROGRAM-ARGS might be file names.  They are not
+objects of file handler invocation."
+  (let ((fh (find-file-name-handler default-directory 'start-file-process)))
+    (if fh (apply fh 'start-file-process name buffer program program-args)
+      (apply 'start-process name buffer program program-args))))
+
 
 \f
 (defvar universal-argument-map