From: Michael Albinus Date: Wed, 5 Jun 2013 12:17:02 +0000 (+0200) Subject: * emacs.c (main) [HAVE_GFILENOTIFY]: Call globals_of_gfilenotify. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~74 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=90db87027fadf1c67325659caea4a5ea41e8a27a;p=emacs.git * emacs.c (main) [HAVE_GFILENOTIFY]: Call globals_of_gfilenotify. * gfilenotify.c (globals_of_gfilenotify): New function. (syms_of_gfilenotify): Move global initialization there. * lisp.h (globals_of_gfilenotify) [HAVE_GFILENOTIFY]: Add prototype. --- diff --git a/src/ChangeLog b/src/ChangeLog index bfb9b1a4c83..67b1b482f3f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2013-06-05 Michael Albinus + + * emacs.c (main) [HAVE_GFILENOTIFY]: Call globals_of_gfilenotify. + + * gfilenotify.c (globals_of_gfilenotify): New function. + (syms_of_gfilenotify): Move global initialization there. + + * lisp.h (globals_of_gfilenotify) [HAVE_GFILENOTIFY]: Add prototype. + 2013-06-05 Stefan Monnier * keymap.c (Fcurrent_active_maps, Fdescribe_buffer_bindings): diff --git a/src/emacs.c b/src/emacs.c index 4e439a601b1..0035daa1da2 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1250,6 +1250,10 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem tzset (); #endif /* MSDOS */ +#ifdef HAVE_GFILENOTIFY + globals_of_gfilenotify (); +#endif + #ifdef WINDOWSNT globals_of_w32 (); #ifdef HAVE_W32NOTIFY diff --git a/src/gfilenotify.c b/src/gfilenotify.c index 4ccc430d815..9b93961f172 100644 --- a/src/gfilenotify.c +++ b/src/gfilenotify.c @@ -233,10 +233,15 @@ WATCH-DESCRIPTOR should be an object returned by `gfile-add-watch'. */) void -syms_of_gfilenotify (void) +globals_of_gfilenotify (void) { - g_type_init (); + watch_list = Qnil; +} + +void +syms_of_gfilenotify (void) +{ DEFSYM (Qgfile_add_watch, "gfile-add-watch"); defsubr (&Sgfile_add_watch); @@ -255,8 +260,6 @@ syms_of_gfilenotify (void) DEFSYM (Qunmounted, "unmounted"); DEFSYM (Qmoved, "moved"); - /* Initialize internal objects. */ - watch_list = Qnil; staticpro (&watch_list); Fprovide (intern_c_string ("gfilenotify"), Qnil); diff --git a/src/lisp.h b/src/lisp.h index 517d0abbb61..ba36a320a8f 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3786,6 +3786,7 @@ extern Lisp_Object Qfont_param; /* Defined in gfilenotify.c */ #ifdef HAVE_GFILENOTIFY +extern void globals_of_gfilenotify (void); extern void syms_of_gfilenotify (void); #endif