diff src/process.c @ 5118:e0db3c197671 ben-lisp-object

merge up to latest default branch, doesn't compile yet
author Ben Wing <ben@xemacs.org>
date Sat, 26 Dec 2009 21:18:49 -0600
parents 3742ea8250b5 aa5ed11f473b
children 623d57b7fbe8
line wrap: on
line diff
--- a/src/process.c	Sat Dec 26 00:20:27 2009 -0600
+++ b/src/process.c	Sat Dec 26 21:18:49 2009 -0600
@@ -35,10 +35,6 @@
 
 #include <config.h>
 
-#if defined (NO_SUBPROCESSES)
-#error "We don't support this anymore."
-#endif
-
 #include "lisp.h"
 
 #include "buffer.h"
@@ -112,32 +108,23 @@
    process objects. Processes are not GC-protected through this! */
 struct hash_table *usid_to_process;
 
-/* List of process objects. */
+/* Read-only to Lisp.  See DEFUN Fprocess_list. */
 Lisp_Object Vprocess_list;
 
+/* Lisp variables; see docstrings below. */
 Lisp_Object Vnull_device;
-
-/* Cons of coding systems used to initialize process I/O on a newly-
-   created process. */
 Lisp_Object Vdefault_process_coding_system;
-/* Same for a network connection. */
 Lisp_Object Vdefault_network_coding_system;
-
 Lisp_Object Qprocess_error;
 Lisp_Object Qnetwork_error;
-
 Fixnum debug_process_io;
-
 Lisp_Object Vshell_file_name;
-
-/* The environment to pass to all subprocesses when they are started.
-   This is in the semi-bogus format of ("VAR=VAL" "VAR2=VAL2" ... )
- */
 Lisp_Object Vprocess_environment;
 
 /* Make sure egetenv() not called too soon */
 int env_initted;
 
+/* Internal Lisp variable. */
 Lisp_Object Vlisp_EXEC_SUFFIXES;
 
 
@@ -209,7 +196,7 @@
     }
 }
 
-DEFINE_NONDUMPABLE_LISP_OBJECT ("process", process,
+DEFINE_NODUMP_LISP_OBJECT ("process", process,
 					   mark_process, print_process, finalize_process,
 					   0, 0, process_description, Lisp_Process);
 
@@ -521,7 +508,7 @@
 
   if (flags & STREAM_NETWORK_CONNECTION)
     {
-      if (!CONSP (Vdefault_network_coding_system) ||
+      if (!LISTP (Vdefault_network_coding_system) ||
 	  NILP (incode = (find_coding_system_for_text_file
 			  (Fcar (Vdefault_network_coding_system), 1))) ||
 	  NILP (outcode = (find_coding_system_for_text_file
@@ -532,7 +519,7 @@
     }
   else
     {
-      if (!CONSP (Vdefault_process_coding_system) ||
+      if (!LISTP (Vdefault_process_coding_system) ||
 	  NILP (incode = (find_coding_system_for_text_file
 			  (Fcar (Vdefault_process_coding_system), 1))) ||
 	  NILP (outcode = (find_coding_system_for_text_file
@@ -661,6 +648,8 @@
 `set-process-input-coding-system', or `set-process-output-coding-system'.
 
 See also `set-process-filter' and `set-process-stderr-filter'.
+
+arguments: (NAME BUFFER PROGRAM &rest PROGRAM-ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -2652,15 +2641,17 @@
   DEFVAR_LISP ("default-process-coding-system",
 	       &Vdefault_process_coding_system /*
 Cons of coding systems used for process I/O by default.
+May also be nil, interpreted as (nil . nil).
 The car part is used for reading (decoding) data from a process, and
 the cdr part is used for writing (encoding) data to a process.
 */ );
-  /* This below will get its default set correctly in code-init.el. */
+  /* Better, system-dependent defaults are set in code-init.el. */
     Vdefault_process_coding_system = Fcons (Qundecided, Qnil);
 
   DEFVAR_LISP ("default-network-coding-system",
 	       &Vdefault_network_coding_system /*
 Cons of coding systems used for network I/O by default.
+May also be nil, interpreted as (nil . nil).
 The car part is used for reading (decoding) data from a process, and
 the cdr part is used for writing (encoding) data to a process.
 */ );
@@ -2681,6 +2672,9 @@
 Initialized from the SHELL environment variable.
 */ );
 
+  /* ben? thinks the format of this variable is "semi-bogus".
+     sjt doesn't agree, since it captures a restriction that is
+     present in POSIX shells, after all. */
   DEFVAR_LISP ("process-environment", &Vprocess_environment /*
 List of environment variables for subprocesses to inherit.
 Each element should be a string of the form ENVVARNAME=VALUE.