unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: frame-environment
Date: Sat, 17 Jan 2009 16:37:31 +0100	[thread overview]
Message-ID: <f7ccd24b0901170737u3893eaeib9b69757dc93c464@mail.gmail.com> (raw)
In-Reply-To: <umydq2buu.fsf@gnu.org>

On Sat, Jan 17, 2009 at 16:25, Eli Zaretskii <eliz@gnu.org> 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




  reply	other threads:[~2009-01-17 15:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-17 15:08 frame-environment Eli Zaretskii
2009-01-17 15:25 ` frame-environment Eli Zaretskii
2009-01-17 15:37   ` Juanma Barranquero [this message]
2009-01-18  1:52     ` frame-environment Stefan Monnier
2009-01-18  2:53       ` frame-environment Juanma Barranquero
2009-01-18  3:17         ` frame-environment Stefan Monnier
2009-01-17 17:30 ` frame-environment Chong Yidong
2009-01-17 21:37   ` frame-environment Michael Ekstrand
2009-01-18  1:59     ` frame-environment Stefan Monnier
2009-01-18  4:11     ` frame-environment Eli Zaretskii
2009-01-18 15:30       ` frame-environment Michael Ekstrand
2009-01-18  1:48 ` frame-environment Stefan Monnier
2009-01-18  4:09   ` frame-environment Eli Zaretskii
2009-01-18 20:36     ` frame-environment Stefan Monnier
2009-01-18 21:01       ` frame-environment Eli Zaretskii
2009-01-20  4:53         ` frame-environment Stefan Monnier
2009-01-24 16:24           ` frame-environment Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f7ccd24b0901170737u3893eaeib9b69757dc93c464@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).