aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorDaiki Ueno2015-03-23 12:40:29 +0900
committerDaiki Ueno2015-03-23 16:27:29 +0900
commit47e0e319329a1ecf9da4fa1afd2b9f2738fada67 (patch)
tree6260b8887776e71e448a62a707d6d15b5e3a1fcc /lisp
parent165bea78008ec7545698f2e893821b4090f20c79 (diff)
downloademacs-47e0e319329a1ecf9da4fa1afd2b9f2738fada67.tar.gz
emacs-47e0e319329a1ecf9da4fa1afd2b9f2738fada67.zip
Generalize start-process with keyword args
* src/process.c (Fmake_process): New function. (create_process, create_pty): Check p->pty_flag instead of Vprocess_connection_type. (syms_of_process): Register QCcommand, QCconnection_type, Qpty, Qpipe, and Smake_process. Unregister Sstart_process. * lisp/subr.el (start-process): New function, ported from the C implementation. * doc/lispref/processes.texi (Asynchronous Processes): Mention `make-process'. * etc/NEWS: Mention `make-process'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/subr.el24
2 files changed, 29 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 596b6e2ccb5..8f1534a3284 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12015-03-23 Daiki Ueno <ueno@gnu.org>
2
3 * subr.el (start-process): New function, ported from the C
4 implementation.
5
12015-03-23 Daniel Colascione <dancol@dancol.org> 62015-03-23 Daniel Colascione <dancol@dancol.org>
2 7
3 Automatically adjust process window sizes. 8 Automatically adjust process window sizes.
diff --git a/lisp/subr.el b/lisp/subr.el
index deadca6efa0..163a1c419d4 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1901,6 +1901,30 @@ and the file name is displayed in the echo area."
1901 1901
1902;;;; Process stuff. 1902;;;; Process stuff.
1903 1903
1904(defun start-process (name buffer program &rest program-args)
1905 "Start a program in a subprocess. Return the process object for it.
1906NAME is name for process. It is modified if necessary to make it unique.
1907BUFFER is the buffer (or buffer name) to associate with the process.
1908
1909Process output (both standard output and standard error streams) goes
1910at end of BUFFER, unless you specify an output stream or filter
1911function to handle the output. BUFFER may also be nil, meaning that
1912this process is not associated with any buffer.
1913
1914PROGRAM is the program file name. It is searched for in `exec-path'
1915\(which see). If nil, just associate a pty with the buffer. Remaining
1916arguments are strings to give program as arguments.
1917
1918If you want to separate standard output from standard error, invoke
1919the command through a shell and redirect one of them using the shell
1920syntax."
1921 (unless (fboundp 'make-process)
1922 (error "Emacs was compiled without subprocess support"))
1923 (apply #'make-process
1924 (append (list :name name :buffer buffer)
1925 (if program
1926 (list :command (cons program program-args))))))
1927
1904(defun process-lines (program &rest args) 1928(defun process-lines (program &rest args)
1905 "Execute PROGRAM with ARGS, returning its output as a list of lines. 1929 "Execute PROGRAM with ARGS, returning its output as a list of lines.
1906Signal an error if the program returns with a non-zero exit status." 1930Signal an error if the program returns with a non-zero exit status."