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: Sun, 18 Jan 2009 03:53:15 +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 1232247253 20172 80.91.229.12 (18 Jan 2009 02:54:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 Jan 2009 02:54:13 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 18 03:55:24 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 1LONoq-0001rB-7L for ged-emacs-devel@m.gmane.org; Sun, 18 Jan 2009 03:55:24 +0100 Original-Received: from localhost ([127.0.0.1]:39222 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LONnZ-0002SH-F8 for ged-emacs-devel@m.gmane.org; Sat, 17 Jan 2009 21:54:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LONmr-0001vr-0M for emacs-devel@gnu.org; Sat, 17 Jan 2009 21:53:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LONmp-0001vL-Ed for emacs-devel@gnu.org; Sat, 17 Jan 2009 21:53:20 -0500 Original-Received: from [199.232.76.173] (port=53689 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LONmp-0001vI-Bd for emacs-devel@gnu.org; Sat, 17 Jan 2009 21:53:19 -0500 Original-Received: from mail-ew0-f11.google.com ([209.85.219.11]:48479) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LONmo-0004az-3y; Sat, 17 Jan 2009 21:53:18 -0500 Original-Received: by ewy4 with SMTP id 4so3445ewy.18 for ; Sat, 17 Jan 2009 18:53:16 -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=IEu4y0Sl4eqxYMS3+b3b56PW7tYJQkY2nGI0rKe6DS8=; b=vjb3gxyCkVjMC6+7GVDWjGSVpGTw2JaONuLP+NR8Qi4vaZlj2k2B+esxwBdT5lSAQe 7m/QXH2OHz5bRfDzYWOh6wRXxdly++F5uKHysa0PGbFMv3HZCKk/UPXHX+0GzvKh1Nbp zGB0Im8lqehnKd7iereVPvIE9n4q288TTVT5U= 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=HuqF5YkYTZzOVSGvWoJw+NhYr63XQuD8sstbYdfIS3XKA1+7KOg5SHZ/sS/lA49V7k O4Wzr7rfxmQzIwCmtTv72L2CXmhzMNRXpDnFl+z1ZSgGQd2u0/wLt7gd4FbKF34VqTp+ GsQ+vOVZLLolPjjkcQKLsRJEuEQ9OX9Jel5ww= Original-Received: by 10.210.54.17 with SMTP id c17mr1976425eba.71.1232247195818; Sat, 17 Jan 2009 18:53:15 -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:107952 Archived-At: On Sun, Jan 18, 2009 at 02:52, Stefan Monnier wrote: > An entry of the form "VAR" instead of "VAR=VAL". Such an entry means > "remove VAR from the environment", IIRC. Is that standard terminology? I've never heard it. > This is not the "frame environment" (which is the `environment' > frame-parameter). Sorry, I should've said "it only uses the frame parameter to look for one variable, DISPLAY". The docstring needs a patch like the attached one, which more accurately reflects what Fgetenv_internal does. I say "like" because that docstring still doesn't explain the special case where if ((variable is "DISPLAY") && (ENV is not a list) && ("DISPLAY" not found in `process-environment') { if (ENV is a frame) return `display' parameter of ENV; else if (ENV is nil) return `display' parameter of selected frame; else error; } Juanma Index: src/callproc.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/callproc.c,v retrieving revision 1.243 diff -u -2 -r1.243 callproc.c --- src/callproc.c 8 Jan 2009 03:15:26 -0000 1.243 +++ src/callproc.c 18 Jan 2009 02:30:41 -0000 @@ -1391,13 +1391,9 @@ the environment. Otherwise, value is a string. -This function searches `process-environment' for VARIABLE. If it is -not found there, then it continues the search in the environment list -of the selected frame. +This function searches `process-environment' for VARIABLE. If optional parameter ENV is a list, then search this list instead of -`process-environment', and return t when encountering a negative entry. +`process-environment', and return t when encountering a negative entry +\(an entry for a variable with no value). */) - -If it is a frame, then this function will ignore `process-environment' and -will simply look up the variable in that frame's environment. */) (variable, env) Lisp_Object variable, env;