aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/emacs.c4
-rw-r--r--src/nsfns.m12
-rw-r--r--src/nsterm.h2
3 files changed, 8 insertions, 10 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 6929886424f..23e0c6f5318 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2050,6 +2050,10 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
2050#endif 2050#endif
2051 2051
2052#ifdef HAVE_NS 2052#ifdef HAVE_NS
2053 /* For early calls to ns_lisp_to_color or Fns_list_colors. */
2054 if (!dump_mode)
2055 ns_init_colors ();
2056
2053 if (!noninteractive) 2057 if (!noninteractive)
2054 { 2058 {
2055#ifdef NS_IMPL_COCOA 2059#ifdef NS_IMPL_COCOA
diff --git a/src/nsfns.m b/src/nsfns.m
index 646bc26f956..ae8e6e30e66 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -2231,7 +2231,9 @@ font descriptor. If string contains `fontset' and not
2231 return build_string (ns_xlfd_to_fontname (SSDATA (name))); 2231 return build_string (ns_xlfd_to_fontname (SSDATA (name)));
2232} 2232}
2233 2233
2234static void 2234/* Called in emacs.c to support early calls to ns_lisp_to_color or
2235 Fns_list_colors. */
2236void
2235ns_init_colors (void) 2237ns_init_colors (void)
2236{ 2238{
2237 NSTRACE ("ns_init_colors"); 2239 NSTRACE ("ns_init_colors");
@@ -2286,8 +2288,6 @@ ns_init_colors (void)
2286 } 2288 }
2287} 2289}
2288 2290
2289static BOOL ns_init_colors_done = NO;
2290
2291DEFUN ("ns-list-colors", Fns_list_colors, Sns_list_colors, 0, 1, 0, 2291DEFUN ("ns-list-colors", Fns_list_colors, Sns_list_colors, 0, 1, 0,
2292 doc: /* Return a list of all available colors. 2292 doc: /* Return a list of all available colors.
2293The optional argument FRAME is currently ignored. */) 2293The optional argument FRAME is currently ignored. */)
@@ -2298,12 +2298,6 @@ The optional argument FRAME is currently ignored. */)
2298 NSColorList *clist; 2298 NSColorList *clist;
2299 NSAutoreleasePool *pool; 2299 NSAutoreleasePool *pool;
2300 2300
2301 if (ns_init_colors_done == NO)
2302 {
2303 ns_init_colors ();
2304 ns_init_colors_done = YES;
2305 }
2306
2307 if (!NILP (frame)) 2301 if (!NILP (frame))
2308 { 2302 {
2309 CHECK_FRAME (frame); 2303 CHECK_FRAME (frame);
diff --git a/src/nsterm.h b/src/nsterm.h
index 7c1ee4cf535..610ca4c4acc 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -1150,6 +1150,7 @@ extern const char *ns_get_pending_menu_title (void);
1150#endif 1150#endif
1151 1151
1152/* Implemented in nsfns.m, published in nsterm.m. */ 1152/* Implemented in nsfns.m, published in nsterm.m. */
1153extern void ns_init_colors (void);
1153#ifdef __OBJC__ 1154#ifdef __OBJC__
1154extern void ns_move_tooltip_to_mouse_location (NSPoint); 1155extern void ns_move_tooltip_to_mouse_location (NSPoint);
1155#endif 1156#endif
@@ -1161,7 +1162,6 @@ extern void ns_change_tab_bar_height (struct frame *f, int height);
1161extern const char *ns_get_string_resource (void *_rdb, 1162extern const char *ns_get_string_resource (void *_rdb,
1162 const char *name, 1163 const char *name,
1163 const char *class); 1164 const char *class);
1164
1165/* C access to ObjC functionality. */ 1165/* C access to ObjC functionality. */
1166extern void ns_release_object (void *obj); 1166extern void ns_release_object (void *obj);
1167extern void ns_retain_object (void *obj); 1167extern void ns_retain_object (void *obj);