* Difference between init_XXX () and syms_of_XXX ()
@ 2011-07-13 17:15 Leo
2011-07-13 19:19 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Leo @ 2011-07-13 17:15 UTC (permalink / raw)
To: emacs-devel
Hello,
In each C file, there is usually init_XXX () and syms_of_XXX (). How to
tell when to use which? Thanks.
For example, if I put seed_random (...) in syms_of_fns (). It seems to
do nothing.
Leo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Difference between init_XXX () and syms_of_XXX ()
2011-07-13 17:15 Difference between init_XXX () and syms_of_XXX () Leo
@ 2011-07-13 19:19 ` Eli Zaretskii
2011-07-13 21:26 ` Leo
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2011-07-13 19:19 UTC (permalink / raw)
To: Leo; +Cc: emacs-devel
> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-07-13 21:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-13 17:15 Difference between init_XXX () and syms_of_XXX () Leo
2011-07-13 19:19 ` Eli Zaretskii
2011-07-13 21:26 ` Leo
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).