diff options
| author | Philipp Stephani | 2018-12-17 21:47:46 +0100 |
|---|---|---|
| committer | Philipp Stephani | 2018-12-22 22:10:48 +0100 |
| commit | 039be4e02513e03ae465efae5694bd4e28a74dbe (patch) | |
| tree | 34d43f419b279e7f652ef592332f2021b5eedc66 /lisp | |
| parent | b41789f31f2355f6de8c15bbbc10cd6bf3dfe61e (diff) | |
| download | emacs-039be4e02513e03ae465efae5694bd4e28a74dbe.tar.gz emacs-039be4e02513e03ae465efae5694bd4e28a74dbe.zip | |
Add file name handler support for 'make-process' (Bug#28691)
* src/process.c (Fmake_process): Add new keyword argument
':file-handler'.
(syms_of_process) <make-process, :file-handler>: Define new symbols.
* lisp/files.el (file-name-non-special): Add support for
'make-process'.
* test/src/process-tests.el (make-process/file-handler/found)
(make-process/file-handler/not-found)
(make-process/file-handler/disable): New unit tests.
(process-tests--file-handler): New helper function.
* test/lisp/files-tests.el
(files-tests-file-name-non-special-make-process): New unit test.
* doc/lispref/files.texi (Magic File Names): Document that
'make-process' can invoke file name handlers.
* doc/lispref/processes.texi (Asynchronous Processes): Document
':file-handlers' argument to 'make-process'.
* etc/NEWS (Lisp Changes in Emacs 27.1): Mention new
:file-handler argument for 'make-process'.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/files.el | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el index fb6cf0193a9..448df62710c 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -7103,7 +7103,8 @@ only these files will be asked to be saved." | |||
| 7103 | (default-directory | 7103 | (default-directory |
| 7104 | (if (memq operation | 7104 | (if (memq operation |
| 7105 | '(insert-directory process-file start-file-process | 7105 | '(insert-directory process-file start-file-process |
| 7106 | shell-command temporary-file-directory)) | 7106 | make-process shell-command |
| 7107 | temporary-file-directory)) | ||
| 7107 | (directory-file-name | 7108 | (directory-file-name |
| 7108 | (expand-file-name | 7109 | (expand-file-name |
| 7109 | (unhandled-file-name-directory default-directory))) | 7110 | (unhandled-file-name-directory default-directory))) |
| @@ -7151,7 +7152,13 @@ only these files will be asked to be saved." | |||
| 7151 | ;; These file-notify-* operations take a | 7152 | ;; These file-notify-* operations take a |
| 7152 | ;; descriptor. | 7153 | ;; descriptor. |
| 7153 | (file-notify-rm-watch) | 7154 | (file-notify-rm-watch) |
| 7154 | (file-notify-valid-p))) | 7155 | (file-notify-valid-p) |
| 7156 | ;; `make-process' uses keyword arguments and | ||
| 7157 | ;; doesn't mangle its filenames in any way. | ||
| 7158 | ;; It already strips /: from the binary | ||
| 7159 | ;; filename, so we don't have to do this | ||
| 7160 | ;; here. | ||
| 7161 | (make-process))) | ||
| 7155 | ;; For all other operations, treat the first | 7162 | ;; For all other operations, treat the first |
| 7156 | ;; argument only as the file name. | 7163 | ;; argument only as the file name. |
| 7157 | '(nil 0)))) | 7164 | '(nil 0)))) |