From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Mattie Newsgroups: gmane.emacs.devel Subject: (window-system) returns nil on after-make-frame-functions when creating an X frame Date: Mon, 9 Mar 2009 10:02:12 -0700 Message-ID: <20090309170208.GA6650@reforged> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lrZ03NoBR/3+SXJZ" X-Trace: ger.gmane.org 1236618171 18147 80.91.229.12 (9 Mar 2009 17:02:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Mar 2009 17:02:51 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 09 18:04:08 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from terminus-est.gnu.org ([66.92.78.210] helo=lists.gnu.org) by lo.gmane.org with esmtp (Exim 4.50) id 1LgitL-0002fr-0g for ged-emacs-devel@m.gmane.org; Mon, 09 Mar 2009 18:03:51 +0100 Original-Received: from localhost ([127.0.0.1]:36742 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lgirz-0004F4-B6 for ged-emacs-devel@m.gmane.org; Mon, 09 Mar 2009 13:02:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lgirs-0004CF-OY for emacs-devel@gnu.org; Mon, 09 Mar 2009 13:02:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lgirq-00046y-Hi for emacs-devel@gnu.org; Mon, 09 Mar 2009 13:02:19 -0400 Original-Received: from [199.232.76.173] (port=43607 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lgirq-00046a-C6 for emacs-devel@gnu.org; Mon, 09 Mar 2009 13:02:18 -0400 Original-Received: from wf-out-1314.google.com ([209.85.200.173]:39704) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lgiro-0006Iz-QC for emacs-devel@gnu.org; Mon, 09 Mar 2009 13:02:17 -0400 Original-Received: by wf-out-1314.google.com with SMTP id 28so1852236wfc.24 for ; Mon, 09 Mar 2009 10:02:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=7WyQ5LAmkTRiCfRzlXoRxxOgOYaeNnaEHAGVrn5i90k=; b=lm6DI+we1luskHw4iLlCt/VLeFDCBTqpxeR6ruC88hkZtjdnVfM6kxB1xqaOZR4f0A G9BEIWCdQ8LWjhpwGnl66Uo9CpbVfocISii7maB6W4v0BMnGh8kj78lkYEfTxZbQoCMH nrT7XS9FTbG8TO03GNlSHSfOh23zLMQTorwPQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=Yz7uREB083QfVanE319dqeHuF5TMEFYipdJCHKKj+YsrKu/eBwVXJgj4kmZ381UO1i JL4/8Ry3dHF9PujV4QAW+/aS3FD+KzY8dWQB+eloMsFoehQOXaG3UwrW3t4vY3sK7Vst QedMl22/sbKQ4KGiJXjGoSDVjBsa71NjqheWI= Original-Received: by 10.115.33.1 with SMTP id l1mr3621210waj.168.1236618134822; Mon, 09 Mar 2009 10:02:14 -0700 (PDT) Original-Received: from @ (c66-235-1-45.sea2.cablespeed.com [66.235.1.45]) by mx.google.com with ESMTPS id n30sm2423797wag.21.2009.03.09.10.02.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 09 Mar 2009 10:02:14 -0700 (PDT) Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) 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:109522 Archived-At: --lrZ03NoBR/3+SXJZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, The behavior of (window-system) as it stands has a corner-case that does not make sense. I run a function on after-make-frame-functions that loads my GUI configurat= ion (previously discussed). To make sure it runs only when a X frame is created, vs. a TTY I would check that it is an X frame. To do this I called (window-system) which normally returns "x". It is not the best idea, but intuitively after the X frame is created it would sensib= ly return "x". Currently it returns nil. When (window-system) is evaluated in the scratch buffer sometime after the frame is made, well after after-make-frame-functi= ons it does indeed return "x". Though my use in this case is not advised, I think the current behavior in this scenario does not make sense. Cheers, Mike Mattie --=20 GnuPG Key: B9012279 is available from HKP server pgp.mit.edu --lrZ03NoBR/3+SXJZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAkm1S5AACgkQdfRchrkBInljBwCcCNVdwJkVnc+sZVna8fwN4WXH EckAoNAsD5YnK8KW595yESf6P5zBC6i4 =emOV -----END PGP SIGNATURE----- --lrZ03NoBR/3+SXJZ--