aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog18
-rw-r--r--src/emacs.c17
-rw-r--r--src/image.c18
-rw-r--r--src/lisp.h4
-rw-r--r--src/w32.c7
-rw-r--r--src/w32.h2
6 files changed, 55 insertions, 11 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9d048beeec1..1b0668860b9 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,21 @@
12012-09-25 Juanma Barranquero <lekktu@gmail.com>
2
3 Move Vlibrary_cache to emacs.c and reset before dumping.
4
5 * lisp.h (reset_image_types): Declare.
6 [WINDOWSNT] (Vlibrary_cache): Declare.
7
8 * image.c (reset_image_types): New function.
9
10 * emacs.c [WINDOWSNT] (Vlibrary_cache): Move from w32.c.
11 (syms_of_emacs) [WINDOWSNT] <Vlibrary_cache>: Initialize and staticpro.
12 (Fdump_emacs): Reset Vlibrary_cache and image_types.
13
14 * w32.c (Vlibrary_cache): Do not define; moved to emacs.c
15 (globals_of_w32) <Vlibrary_cache>: Do not initialize.
16
17 * w32.h (Vlibrary_cache): Do not declare.
18
12012-09-25 Eli Zaretskii <eliz@gnu.org> 192012-09-25 Eli Zaretskii <eliz@gnu.org>
2 20
3 * w32proc.c (sys_signal): Handle all signals defined by the 21 * w32proc.c (sys_signal): Handle all signals defined by the
diff --git a/src/emacs.c b/src/emacs.c
index 686a884cdbb..5aae812b869 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -96,6 +96,11 @@ static const char emacs_copyright[] = COPYRIGHT;
96/* Empty lisp strings. To avoid having to build any others. */ 96/* Empty lisp strings. To avoid having to build any others. */
97Lisp_Object empty_unibyte_string, empty_multibyte_string; 97Lisp_Object empty_unibyte_string, empty_multibyte_string;
98 98
99#ifdef WINDOWSNT
100/* Cache for externally loaded libraries. */
101Lisp_Object Vlibrary_cache;
102#endif
103
99/* Set after Emacs has started up the first time. 104/* Set after Emacs has started up the first time.
100 Prevents reinitialization of the Lisp world and keymaps 105 Prevents reinitialization of the Lisp world and keymaps
101 on subsequent starts. */ 106 on subsequent starts. */
@@ -2025,6 +2030,13 @@ You must run Emacs in batch mode in order to dump it. */)
2025 free (malloc_state_ptr); 2030 free (malloc_state_ptr);
2026#endif 2031#endif
2027 2032
2033#ifdef WINDOWSNT
2034 Vlibrary_cache = Qnil;
2035#endif
2036#ifdef HAVE_WINDOW_SYSTEM
2037 reset_image_types ();
2038#endif
2039
2028 Vpurify_flag = tem; 2040 Vpurify_flag = tem;
2029 2041
2030 return unbind_to (count, Qnil); 2042 return unbind_to (count, Qnil);
@@ -2357,6 +2369,11 @@ libraries; only those already known by Emacs will be loaded. */);
2357 Vdynamic_library_alist = Qnil; 2369 Vdynamic_library_alist = Qnil;
2358 Fput (intern_c_string ("dynamic-library-alist"), Qrisky_local_variable, Qt); 2370 Fput (intern_c_string ("dynamic-library-alist"), Qrisky_local_variable, Qt);
2359 2371
2372#ifdef WINDOWSNT
2373 Vlibrary_cache = Qnil;
2374 staticpro (&Vlibrary_cache);
2375#endif
2376
2360 /* Make sure IS_DAEMON starts up as false. */ 2377 /* Make sure IS_DAEMON starts up as false. */
2361 daemon_pipe[1] = 0; 2378 daemon_pipe[1] = 0;
2362} 2379}
diff --git a/src/image.c b/src/image.c
index b9adf4ad480..7901b95f236 100644
--- a/src/image.c
+++ b/src/image.c
@@ -8831,12 +8831,24 @@ lookup_image_type (Lisp_Object type)
8831 return NULL; 8831 return NULL;
8832} 8832}
8833 8833
8834/* Reset image_types before dumping.
8835 Called from Fdump_emacs. */
8836
8837void
8838reset_image_types (void)
8839{
8840 while (image_types)
8841 {
8842 struct image_type *next = image_types->next;
8843 xfree (image_types);
8844 image_types = next;
8845 }
8846}
8847
8834void 8848void
8835syms_of_image (void) 8849syms_of_image (void)
8836{ 8850{
8837 /* Initialize this only once, since that's what we do with Vimage_types 8851 /* Initialize this only once; it will be reset before dumping. */
8838 and they are supposed to be in sync. Initializing here gives correct
8839 operation on GNU/Linux of calling dump-emacs after loading some images. */
8840 image_types = NULL; 8852 image_types = NULL;
8841 8853
8842 /* Must be defined now because we're going to update it below, while 8854 /* Must be defined now because we're going to update it below, while
diff --git a/src/lisp.h b/src/lisp.h
index 665ed17dfd0..35efa67e707 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2731,6 +2731,7 @@ extern void init_fringe_once (void);
2731extern Lisp_Object QCascent, QCmargin, QCrelief; 2731extern Lisp_Object QCascent, QCmargin, QCrelief;
2732extern Lisp_Object QCconversion; 2732extern Lisp_Object QCconversion;
2733extern int x_bitmap_mask (struct frame *, ptrdiff_t); 2733extern int x_bitmap_mask (struct frame *, ptrdiff_t);
2734extern void reset_image_types (void);
2734extern void syms_of_image (void); 2735extern void syms_of_image (void);
2735 2736
2736/* Defined in insdel.c. */ 2737/* Defined in insdel.c. */
@@ -3284,6 +3285,9 @@ extern Lisp_Object empty_unibyte_string, empty_multibyte_string;
3284extern Lisp_Object Qfile_name_handler_alist; 3285extern Lisp_Object Qfile_name_handler_alist;
3285extern _Noreturn void terminate_due_to_signal (int, int); 3286extern _Noreturn void terminate_due_to_signal (int, int);
3286extern Lisp_Object Qkill_emacs; 3287extern Lisp_Object Qkill_emacs;
3288#ifdef WINDOWSNT
3289extern Lisp_Object Vlibrary_cache;
3290#endif
3287#if HAVE_SETLOCALE 3291#if HAVE_SETLOCALE
3288void fixup_locale (void); 3292void fixup_locale (void);
3289void synchronize_system_messages_locale (void); 3293void synchronize_system_messages_locale (void);
diff --git a/src/w32.c b/src/w32.c
index f7e16354791..3154c725abf 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -6521,10 +6521,6 @@ sys_localtime (const time_t *t)
6521 6521
6522 6522
6523 6523
6524/* Delayed loading of libraries. */
6525
6526Lisp_Object Vlibrary_cache;
6527
6528/* Try loading LIBRARY_ID from the file(s) specified in 6524/* Try loading LIBRARY_ID from the file(s) specified in
6529 Vdynamic_library_alist. If the library is loaded successfully, 6525 Vdynamic_library_alist. If the library is loaded successfully,
6530 return the handle of the DLL, and record the filename in the 6526 return the handle of the DLL, and record the filename in the
@@ -6769,9 +6765,6 @@ globals_of_w32 (void)
6769 6765
6770 DEFSYM (QCloaded_from, ":loaded-from"); 6766 DEFSYM (QCloaded_from, ":loaded-from");
6771 6767
6772 Vlibrary_cache = Qnil;
6773 staticpro (&Vlibrary_cache);
6774
6775 g_b_init_is_windows_9x = 0; 6768 g_b_init_is_windows_9x = 0;
6776 g_b_init_open_process_token = 0; 6769 g_b_init_open_process_token = 0;
6777 g_b_init_get_token_information = 0; 6770 g_b_init_get_token_information = 0;
diff --git a/src/w32.h b/src/w32.h
index 18625cea955..a833c8f4315 100644
--- a/src/w32.h
+++ b/src/w32.h
@@ -145,7 +145,7 @@ extern void check_windows_init_file (void);
145extern int _sys_read_ahead (int fd); 145extern int _sys_read_ahead (int fd);
146extern int _sys_wait_accept (int fd); 146extern int _sys_wait_accept (int fd);
147 147
148extern Lisp_Object Vlibrary_cache, QCloaded_from; 148extern Lisp_Object QCloaded_from;
149extern HMODULE w32_delayed_load (Lisp_Object); 149extern HMODULE w32_delayed_load (Lisp_Object);
150 150
151#ifdef HAVE_GNUTLS 151#ifdef HAVE_GNUTLS