From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: frame-environment Date: Sat, 17 Jan 2009 16:37:31 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1232206677 14759 80.91.229.12 (17 Jan 2009 15:37:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 Jan 2009 15:37:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 17 16:39:09 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LODGI-0007S4-9q for ged-emacs-devel@m.gmane.org; Sat, 17 Jan 2009 16:39:02 +0100 Original-Received: from localhost ([127.0.0.1]:34565 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LODF1-0007xY-Be for ged-emacs-devel@m.gmane.org; Sat, 17 Jan 2009 10:37:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LODEw-0007xJ-JE for emacs-devel@gnu.org; Sat, 17 Jan 2009 10:37:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LODEu-0007x7-74 for emacs-devel@gnu.org; Sat, 17 Jan 2009 10:37:37 -0500 Original-Received: from [199.232.76.173] (port=47018 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LODEu-0007x4-11 for emacs-devel@gnu.org; Sat, 17 Jan 2009 10:37:36 -0500 Original-Received: from mail-bw0-f18.google.com ([209.85.218.18]:61503) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LODEs-0000Nq-KY; Sat, 17 Jan 2009 10:37:34 -0500 Original-Received: by bwz11 with SMTP id 11so546346bwz.18 for ; Sat, 17 Jan 2009 07:37:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=GUrLmBe2zPDcEG1ey4N2K9b6gYHQOUfKJ61svTlvZ5c=; b=EFxbL4Exo25dNxuzEAC65tSdoVST5wItSJC5tyDFMJ84E+XwVvpJKuf4ygEVXnhN5y yCimrnNaZVueTGfrH98wKlco2zaFMkefU53ONqCsLfmOPmUgd1WHyUeQ5HH1Zy6YSF5T kCROxoZrz+5oPPzZSVCABWz79ldAEic3vRCj4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=JgEcwqJOKi+PDT2QDAmRSFTbf/6nOJnNs3n04Rw6d2dQX99njL6en5W0Fy4Eknpkng tyT1ssivRTVERxdA7fSgn+udRE020Y87C0k0SvzrCQqE9XNwVtWWJTT8slEHpZZWJ4EW XAKmvtKwqIZPmQsL+JsXG7nXB8SytUlsJrj68= Original-Received: by 10.223.110.3 with SMTP id l3mr2682469fap.49.1232206652258; Sat, 17 Jan 2009 07:37:32 -0800 (PST) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:107932 Archived-At: On Sat, Jan 17, 2009 at 16:25, Eli Zaretskii 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