[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: frame-environment
From: |
Juanma Barranquero |
Subject: |
Re: frame-environment |
Date: |
Sat, 17 Jan 2009 16:37:31 +0100 |
On Sat, Jan 17, 2009 at 16:25, Eli Zaretskii <address@hidden> wrote:
> In addition, the first part of this bit of `environment's doc string
> is simply a lie:
The docstring for getenv-internal also seems to have problems:
If optional parameter ENV is a list, then search this list instead of
`process-environment', and return t when encountering a negative entry.
What does it mean "when encountering a negative entry"?
Then:
If it is a frame, then this function will ignore `process-environment' and
will simply look up the variable in that frame's environment.
But the function does:
if (CONSP (env))
;;; [....]
;;; this is the non-frame case, then:
;;;
else if (getenv_internal (SDATA (variable), SBYTES (variable),
&value, &valuelen, env))
return make_string (value, valuelen);
and getenv_internal's first lines are:
/* Try to find VAR in Vprocess_environment first. */
if (getenv_internal_1 (var, varlen, value, valuelen,
Vprocess_environment))
return *value ? 1 : 0;
so it seems like the variable is looked up in the process environment
even if ENV is a frame.
Moreover, getenv_internal only looks for one specific variable in the
"frame envionment", namely DISPLAY:
if (strcmp (var, "DISPLAY") == 0)
{
;;; look for frame parameter 'display
}
return 0;
Juanma
Re: frame-environment, Chong Yidong, 2009/01/17
Re: frame-environment, Stefan Monnier, 2009/01/17