all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: Mike Mattie <codermattie@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: (window-system) returns nil on after-make-frame-functions when creating an X frame
Date: Mon, 9 Mar 2009 10:36:47 -0700 (PDT)	[thread overview]
Message-ID: <200903091736.n29Halor018951@rodan.ics.uci.edu> (raw)
In-Reply-To: <20090309170208.GA6650@reforged> (Mike Mattie's message of "Mon,  9 Mar 2009 10:02:12 -0700")

Mike Mattie <codermattie@gmail.com> writes:

  > 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 configuration
  > (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 sensibly
  > 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-functions
  > it does indeed return "x".

How are you calling (window-system) ? You should be calling it from
within a `with-selected-frame'




  reply	other threads:[~2009-03-09 17:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-09 17:02 (window-system) returns nil on after-make-frame-functions when creating an X frame Mike Mattie
2009-03-09 17:36 ` Dan Nicolaescu [this message]
2009-03-09 18:06   ` Stefan Monnier
2009-03-09 17:54 ` Chong Yidong
2009-03-09 18:38   ` Mike Mattie
2009-03-09 20:10     ` Stefan Monnier
2009-03-09 19:51   ` Mike Mattie

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

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

  git send-email \
    --in-reply-to=200903091736.n29Halor018951@rodan.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=codermattie@gmail.com \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.