all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Leo <sdl.web@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Difference between init_XXX () and syms_of_XXX ()
Date: Wed, 13 Jul 2011 22:19:39 +0300	[thread overview]
Message-ID: <83tyaqdm44.fsf@gnu.org> (raw)
In-Reply-To: <m1fwmam79l.fsf@gmail.com>

> From: Leo <sdl.web@gmail.com>
> Date: Thu, 14 Jul 2011 01:15:34 +0800
> 
> In each C file, there is usually init_XXX () and syms_of_XXX (). How to
> tell when to use which? Thanks.

See what `main' does in emacs.c with each one of them.  In a nutshell,
syms_of_FOO are called only `if (!initialized)', i.e. in temacs before
it dumps itself.  init_FOO are called both by temacs and by dumped
Emacs.

Anything that needs to be reinitialized whenever a new Emacs session
comes up, should be in init_FOO.



  reply	other threads:[~2011-07-13 19:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-13 17:15 Difference between init_XXX () and syms_of_XXX () Leo
2011-07-13 19:19 ` Eli Zaretskii [this message]
2011-07-13 21:26   ` Leo

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

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

  git send-email \
    --in-reply-to=83tyaqdm44.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=sdl.web@gmail.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.