On Mon, Mar 09, 2009 at 01:54:30PM -0400, Chong Yidong wrote: > Mike Mattie 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