I want to manipulate a frame after it's created. I thought that I could do this with an 'after-make-frame-functions hook as a callback but it seems to return too early.
This is the sample code that demonstrates the issue:
(defvar test-frame nil) (defun finish-frame-setup( frame ) (message "test frame is %s" (frame-live-p test-frame))) (defun test-frame-callback() (interactive) (add-hook 'after-make-frame-functions 'finish-frame-setup t nil) (setq test-frame (make-frame)))
M-x eval-buffer M-x test-frame-callback
test frame is nil
I'd appreciate any assistance. Emacs 24.4 on win32