[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/xfns.c,v
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/src/xfns.c,v |
Date: |
Tue, 10 Jun 2008 20:56:58 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 08/06/10 20:56:58
Index: xfns.c
===================================================================
RCS file: /sources/emacs/emacs/src/xfns.c,v
retrieving revision 1.710
retrieving revision 1.711
diff -u -b -r1.710 -r1.711
--- xfns.c 22 May 2008 14:54:17 -0000 1.710
+++ xfns.c 10 Jun 2008 20:56:58 -0000 1.711
@@ -5628,6 +5628,47 @@
return unbind_to (count, decoded_file);
}
+
+#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. */)
+ ()
+{
+ FRAME_PTR f = SELECTED_FRAME ();
+ char *fontname;
+ Lisp_Object font = Qnil;
+ int count = SPECPDL_INDEX ();
+
+ check_x ();
+
+ if (popup_activated ())
+ error ("Trying to use a menu from within a menu-entry");
+
+ /* Prevent redisplay. */
+ specbind (Qinhibit_redisplay, Qt);
+ record_unwind_protect (clean_up_dialog, Qnil);
+
+ BLOCK_INPUT;
+
+ fontname = xg_get_font_name (f, NULL);
+
+ if (fontname)
+ {
+ font = build_string (fontname);
+ xfree (fontname);
+ }
+
+ UNBLOCK_INPUT;
+
+ if (NILP (font))
+ Fsignal (Qquit, Qnil);
+
+ return unbind_to (count, font);
+}
+#endif /* HAVE_FREETYPE */
+
#endif /* USE_GTK */
@@ -5993,6 +6034,10 @@
#if defined (USE_MOTIF) || defined (USE_GTK)
defsubr (&Sx_file_dialog);
#endif
+
+#ifdef USE_GTK
+ defsubr (&Sx_font_dialog);
+#endif
}
#endif /* HAVE_X_WINDOWS */
- [Emacs-diffs] Changes to emacs/src/xfns.c,v,
Chong Yidong <=
- [Emacs-diffs] Changes to emacs/src/xfns.c,v, Chong Yidong, 2008/06/12
- [Emacs-diffs] Changes to emacs/src/xfns.c,v, Kenichi Handa, 2008/06/13
- [Emacs-diffs] Changes to emacs/src/xfns.c,v, Stefan Monnier, 2008/06/15
- [Emacs-diffs] Changes to emacs/src/xfns.c,v, Chong Yidong, 2008/06/15
- [Emacs-diffs] Changes to emacs/src/xfns.c,v, Stefan Monnier, 2008/06/18
- [Emacs-diffs] Changes to emacs/src/xfns.c,v, Stefan Monnier, 2008/06/19
- [Emacs-diffs] Changes to emacs/src/xfns.c,v, Kenichi Handa, 2008/06/19
- [Emacs-diffs] Changes to emacs/src/xfns.c,v, Chong Yidong, 2008/06/25
- [Emacs-diffs] Changes to emacs/src/xfns.c,v, Chong Yidong, 2008/06/25