unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: XeCycle <xecycle@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: after-make-frame-functions
Date: Sun, 20 Nov 2011 12:31:56 +0800	[thread overview]
Message-ID: <87mxbrjtxf.fsf@gmail.com> (raw)
In-Reply-To: ja92bg$vc1$1@dough.gmane.org

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




  reply	other threads:[~2011-11-20  4:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-19 20:08 after-make-frame-functions kenneth johansson
2011-11-20  4:31 ` XeCycle [this message]
2011-11-20 13:02   ` after-make-frame-functions kenneth johansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mxbrjtxf.fsf@gmail.com \
    --to=xecycle@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).