diff options
| author | Michael Albinus | 2007-07-07 11:17:51 +0000 |
|---|---|---|
| committer | Michael Albinus | 2007-07-07 11:17:51 +0000 |
| commit | 7cb76caa9cdf5c046c5c7d98b0fdc413566dd9e6 (patch) | |
| tree | b7ae4838cda4ecb708884e20ae4abd5ce86650a0 | |
| parent | 9f369268151e58855e44ae9fd4a39009cc3bfdfd (diff) | |
| download | emacs-7cb76caa9cdf5c046c5c7d98b0fdc413566dd9e6.tar.gz emacs-7cb76caa9cdf5c046c5c7d98b0fdc413566dd9e6.zip | |
* simple.el (start-file-process): New defun.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/simple.el | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fc0c6556026..b4026579859 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2007-07-07 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * simple.el (start-file-process): New defun. | ||
| 4 | |||
| 1 | 2007-07-07 Stefan Monnier <monnier@iro.umontreal.ca> | 5 | 2007-07-07 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 6 | ||
| 3 | * files.el (find-file-confirm-nonexistent-file): Rename from | 7 | * 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." | |||
| 2202 | (when stderr-file (delete-file stderr-file)) | 2202 | (when stderr-file (delete-file stderr-file)) |
| 2203 | (when lc (delete-file lc))))) | 2203 | (when lc (delete-file lc))))) |
| 2204 | 2204 | ||
| 2205 | (defun start-file-process (name buffer program &rest program-args) | ||
| 2206 | "Start a program in a subprocess. Return the process object for it. | ||
| 2207 | Similar to `start-process', but may invoke a file handler based on | ||
| 2208 | `default-directory'. The current working directory of the | ||
| 2209 | subprocess is `default-directory'. | ||
| 2210 | |||
| 2211 | PROGRAM and PROGRAM-ARGS might be file names. They are not | ||
| 2212 | objects of file handler invocation." | ||
| 2213 | (let ((fh (find-file-name-handler default-directory 'start-file-process))) | ||
| 2214 | (if fh (apply fh 'start-file-process name buffer program program-args) | ||
| 2215 | (apply 'start-process name buffer program program-args)))) | ||
| 2216 | |||
| 2205 | 2217 | ||
| 2206 | 2218 | ||
| 2207 | (defvar universal-argument-map | 2219 | (defvar universal-argument-map |