changeset 95850:5301c67af098

(Fx_select_font): Rename from x-font-dialog.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 12 Jun 2008 15:29:18 +0000
parents 2284e9d4715f
children 352242a709c1
files src/xfns.c
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfns.c	Thu Jun 12 15:28:32 2008 +0000
+++ b/src/xfns.c	Thu Jun 12 15:29:18 2008 +0000
@@ -5631,12 +5631,15 @@
 
 #ifdef HAVE_FREETYPE
 
-DEFUN ("x-font-dialog", Fx_font_dialog, Sx_font_dialog, 0, 0, 0,
-       doc: /* Read a font name using a font selection dialog.
-The font name is returned as a string.  */)
-  ()
+DEFUN ("x-select-font", Fx_select_font, Sx_select_font, 0, 2, 0,
+       doc: /* Read a font name using a GTK font selection dialog.
+Return a GTK-style font string corresponding to the selection.
+
+If FRAME is omitted or nil, it defaults to the selected frame. */)
+  (frame, ignored)
+     Lisp_Object frame, ignored;
 {
-  FRAME_PTR f = SELECTED_FRAME ();
+  FRAME_PTR f = check_x_frame (frame);
   char *fontname;
   Lisp_Object font = Qnil;
   int count = SPECPDL_INDEX ();
@@ -6036,7 +6039,7 @@
 #endif
 
 #ifdef USE_GTK
-  defsubr (&Sx_font_dialog);
+  defsubr (&Sx_select_font);
 #endif
 }