[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Difference between init_XXX () and syms_of_XXX ()
From: |
Eli Zaretskii |
Subject: |
Re: Difference between init_XXX () and syms_of_XXX () |
Date: |
Wed, 13 Jul 2011 22:19:39 +0300 |
> From: Leo <address@hidden>
> 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.