changeset 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 c7c25a292d1a
children 326bae23bda1
files lisp/ChangeLog lisp/simple.el
diffstat 2 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Jul 07 11:17:33 2007 +0000
+++ b/lisp/ChangeLog	Sat Jul 07 11:17:51 2007 +0000
@@ -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
--- 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