From 7cb76caa9cdf5c046c5c7d98b0fdc413566dd9e6 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 7 Jul 2007 11:17:51 +0000 Subject: [PATCH] * simple.el (start-file-process): New defun. --- lisp/ChangeLog | 4 ++++ lisp/simple.el | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fc0c6556026..b4026579859 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-07-07 Michael Albinus + + * simple.el (start-file-process): New defun. + 2007-07-07 Stefan Monnier * files.el (find-file-confirm-nonexistent-file): Rename from diff --git a/lisp/simple.el b/lisp/simple.el index a0915b9f8ed..c052ce3574b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -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)))) + (defvar universal-argument-map -- 2.39.5