diff lisp/simple.el @ 81736:d50de52ebdfb

* simple.el (start-file-process): New defun.
author Michael Albinus <michael.albinus@gmx.de>
date Sat, 07 Jul 2007 11:17:51 +0000
parents 5b21f07d3106
children 62d33d80e1db 0ece58f6e0aa 988f1edc9674
line wrap: on
line diff
--- a/lisp/simple.el	Sat Jul 07 11:17:33 2007 +0000
+++ b/lisp/simple.el	Sat Jul 07 11:17:51 2007 +0000
@@ -2202,6 +2202,18 @@
       (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))))
+
 
 
 (defvar universal-argument-map