[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: after-make-frame-functions
From: |
XeCycle |
Subject: |
Re: after-make-frame-functions |
Date: |
Sun, 20 Nov 2011 12:31:56 +0800 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.91 (gnu/linux) |
kenneth johansson <ken@kenjo.org> writes:
> Using GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.5)
>
> I'm trying to make some changes to a new frame but it looks like the
> function run on the hook after-make-frame-functions is affecting the
> old frame not the new one.
>
> Add the following hook. start emacs with
>
> emacs --daemon
> emacsclient -c
>
> and you will get a printout in messages that the frame is in a terminal.
> But that is not what I expect, the new frame is a window.
>
> bug or feature ??
>
> ------------
> (defun start-theme (dummy)
> (if window-system
> (message "frame in window")
> (message "frame in terminal")
> )
> )
(defun your-func (new-frame)
(select-frame new-frame)
(do-what-you-want))
> (add-hook 'after-make-frame-functions 'start-theme)
> -----------
>
>
>
--
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591