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'
next prev parent 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
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=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 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).