}
-DEFUN ("x-list-fonts", Fx_list_fonts, Sx_list_fonts, 1, 4, 0,
- doc: /* Return a list of the names of available fonts matching PATTERN.
-If optional arguments FACE and FRAME are specified, return only fonts
-the same size as FACE on FRAME.
-If optional argument MAX is specified, return at most MAX matches.
-
-PATTERN is a regular expression; FACE is a face name - a symbol.
-
-The return value is a list of strings, suitable as arguments to
-set-face-font.
-
-The font names are _NOT_ X names. */)
- (pattern, face, frame, max)
- Lisp_Object pattern, face, frame, max;
-{
- Lisp_Object flist, olist = Qnil, tem;
- struct frame *f;
- int maxnames;
-
- /* We can't simply call check_x_frame because this function may be
- called before any frame is created. */
- if (NILP (frame))
- f = SELECTED_FRAME ();
- else
- {
- CHECK_LIVE_FRAME (frame);
- f = XFRAME (frame);
- }
- if (! FRAME_WINDOW_P (f))
- {
- /* Perhaps we have not yet created any frame. */
- f = NULL;
- }
-
- if (NILP (max))
- maxnames = 4;
- else
- {
- CHECK_NATNUM (max);
- maxnames = XFASTINT (max);
- }
-
- /* get XLFD names */
- flist = ns_list_fonts (f, pattern, 0, maxnames);
-
- /* convert list into regular names */
- for (tem = flist; CONSP (tem); tem = XCDR (tem))
- {
- Lisp_Object fname = XCAR (tem);
- olist = Fcons (build_string (ns_xlfd_to_fontname (SDATA (fname))),
- olist);
- }
-
- return olist;
-}
-
-
DEFUN ("ns-font-name", Fns_font_name, Sns_font_name, 1, 1, 0,
doc: /* Determine font postscript or family name for font NAME.
NAME should be a string containing either the font name or an XLFD
defsubr (&Sns_set_resource);
defsubr (&Sxw_display_color_p); /* this and next called directly by C code */
defsubr (&Sx_display_grayscale_p);
- defsubr (&Sx_list_fonts);
defsubr (&Sns_font_name);
defsubr (&Sns_list_colors);
#ifdef NS_IMPL_COCOA
return 0;
if (makeIndex && alloc)
- color_def->pixel = ns_index_color(temp, f);//[temp retain];
+ color_def->pixel = ns_index_color(temp, f); /* [temp retain]; */
[temp getRed: &r green: &g blue: &b alpha: &a];
color_def->red = r * 256;
Fcons (build_string ("Cancel"), Qnil),
Fcons (build_string ("Save and Exit"), Qt));
Lisp_Object res = ns_popup_dialog (Qt, contents, Qnil);
-fprintf (stderr, "res = %d\n", EQ (res, Qt)); // FIXME
+fprintf (stderr, "res = %d\n", EQ (res, Qt)); /* FIXME */
if (EQ (res, Qt))
{
Feval (Fcons (intern ("save-buffers-kill-emacs"), Qnil));