[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (window-system) returns nil on after-make-frame-functions when creat
From: |
Mike Mattie |
Subject: |
Re: (window-system) returns nil on after-make-frame-functions when creating an X frame |
Date: |
Mon, 9 Mar 2009 11:38:53 -0700 |
User-agent: |
Mutt/1.5.16 (2007-06-09) |
On Mon, Mar 09, 2009 at 01:54:30PM -0400, Chong Yidong wrote:
> Mike Mattie <address@hidden> writes:
>
> > 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".
>
> Did you give `window-system' the frame as an argument?
I did. My function is as follows:
(defun is-current-frame-x ()
(message "window system is %s" (princ (window-system (selected-frame))))
(equal 'x (window-system (selected-frame)))
)
when called on the before-make-frame-hook, and the after-make-frame-functions
hook the result is always nil.
In essence I want to hook when a frame is created and determine
if it is an X or tty frame. This might not be the right path,
but the results are strange ?
--
GnuPG Key: B9012279 is available from HKP server pgp.mit.edu
pgpVNZ6SZjfjW.pgp
Description: PGP signature