* after-make-frame-functions
@ 2011-11-19 20:08 kenneth johansson
2011-11-20 4:31 ` after-make-frame-functions XeCycle
0 siblings, 1 reply; 3+ messages in thread
From: kenneth johansson @ 2011-11-19 20:08 UTC (permalink / raw)
To: help-gnu-emacs
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")
)
)
(add-hook 'after-make-frame-functions 'start-theme)
-----------
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: after-make-frame-functions
2011-11-19 20:08 after-make-frame-functions kenneth johansson
@ 2011-11-20 4:31 ` XeCycle
2011-11-20 13:02 ` after-make-frame-functions kenneth johansson
0 siblings, 1 reply; 3+ messages in thread
From: XeCycle @ 2011-11-20 4:31 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-11-20 13:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-19 20:08 after-make-frame-functions kenneth johansson
2011-11-20 4:31 ` after-make-frame-functions XeCycle
2011-11-20 13:02 ` after-make-frame-functions kenneth johansson
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).