unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* (window-system) returns nil on after-make-frame-functions when creating an X frame
@ 2009-03-09 17:02 Mike Mattie
  2009-03-09 17:36 ` Dan Nicolaescu
  2009-03-09 17:54 ` Chong Yidong
  0 siblings, 2 replies; 7+ messages in thread
From: Mike Mattie @ 2009-03-09 17:02 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 871 bytes --]

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".

Though my use in this case is not advised, I think the current behavior in
this scenario does not make sense.

Cheers,
Mike Mattie

-- 
GnuPG Key: B9012279 is available from HKP server pgp.mit.edu

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-03-09 20:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).