+2007-08-31 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * callproc.c (Vinitial_environment): New variable.
+ (set_initial_environment): Initialize it.
+ (syms_of_callproc): Declare it.
+ (child_setup): Don't mess with TERM via Qterm_environment_variable; the
+ TERM under which a process runs is never related to the TERM in which
+ Emacs is running.
+
2007-08-29 Dan Nicolaescu <dann@ics.uci.edu>
* config.in (HAVE_WINDOW_SYSTEM): Don't undef MULTI_KBOARD here...
For consistency, run after_insert_file_functions iff something
got inserted. Move signal_after_change and update_compositions
after code running after_insert_file_functions. Make sure that
- undo_list doesn't record intermediate steps of the decoding
- process.
+ undo_list doesn't record intermediate steps of the decoding process.
2007-08-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2007-07-17 Glenn Morris <rgm@gnu.org>
* abbrev.c (abbrev_check_chars): New function.
- (Fdefine_global_abbrev, Fdefine_mode_abbrev): Call
- abbrev_check_chars to check abbrev characters are word
+ (Fdefine_global_abbrev, Fdefine_mode_abbrev):
+ Call abbrev_check_chars to check abbrev characters are word
constituents. Doc fix.
2007-07-17 Stefan Monnier <monnier@iro.umontreal.ca>
Lisp_Object Vshell_file_name;
-Lisp_Object Vprocess_environment;
+Lisp_Object Vprocess_environment, Vinitial_environment;
#ifdef DOS_NT
Lisp_Object Qbuffer_file_type;
Lisp_Object local = selected_frame; /* get_frame_param (XFRAME (Fframe_with_environment (selected_frame)), */
/* Qenvironment); */
- Lisp_Object term;
Lisp_Object display;
new_length = 0;
new_length++;
#endif
- /* Add TERM and DISPLAY from the frame local values. */
- term = get_frame_param (XFRAME (local), Qterm_environment_variable);
- if (! NILP (term))
- new_length++;
-
+ /* Add DISPLAY from the frame local values. */
display = get_frame_param (XFRAME (local), Qdisplay_environment_variable);
if (! NILP (display))
new_length++;
/* new_length + 2 to include PWD and terminating 0. */
env = new_env = (char **) alloca ((new_length + 2) * sizeof (char *));
-
/* If we have a PWD envvar, pass one down,
but with corrected value. */
if (egetenv ("PWD"))
*new_env++ = pwd_var;
- if (! NILP (term))
- {
- int vlen = strlen ("TERM=") + strlen (SDATA (term)) + 1;
- char *vdata = (char *) alloca (vlen);
- strcpy (vdata, "TERM=");
- strcat (vdata, SDATA (term));
- new_env = add_env (env, new_env, vdata);
- }
-
- if (! NILP (display))
+ if (STRINGP (display))
{
int vlen = strlen ("DISPLAY=") + strlen (SDATA (display)) + 1;
char *vdata = (char *) alloca (vlen);
CONSP (tem) && STRINGP (XCAR (tem));
tem = XCDR (tem))
{
- if ((strcmp (SDATA (XCAR (tem)), "TERM") != 0)
- && (strcmp (SDATA (XCAR (tem)), "DISPLAY") != 0))
+ if (strcmp (SDATA (XCAR (tem)), "DISPLAY") != 0)
new_env = add_env (env, new_env, SDATA (XCAR (tem)));
}
Lisp_Object scan;
Lisp_Object term;
Lisp_Object display;
-
+
+ /* FIXME: Code duplication. */
if (NILP (frame))
{
Vprocess_environment);
store_frame_param (SELECTED_FRAME(), Qenvironment, Vprocess_environment);
}
+ /* Ideally, the `copy' shouldn't be necessary, but it seems it's frequent
+ to use `delete' and friends on process-environment. */
+ Vinitial_environment = Fcopy_sequence (Vprocess_environment);
}
void
This is used by `call-process-region'. */);
/* This variable is initialized in init_callproc. */
+ DEFVAR_LISP ("initial-environment", &Vinitial_environment,
+ doc: /* List of environment variables inherited from the parent process.
+Each element should be a string of the form ENVVARNAME=VALUE.
+The elements must normally be decoded (using `locale-coding-system') for use. */);
+ Vinitial_environment = Qnil;
+
DEFVAR_LISP ("process-environment", &Vprocess_environment,
doc: /* List of overridden environment variables for subprocesses to inherit.
Each element should be a string of the form ENVVARNAME=VALUE.