changeset 89125:81d88ca705db

(set_lface_from_font_name): Reject the default fontset. (Finternal_set_lisp_face_attribute): Use signal_error for the error of invalid fontset.
author Kenichi Handa <handa@m17n.org>
date Fri, 27 Sep 2002 04:50:58 +0000
parents aabfe2dc76da
children 3bbfb5d2bb52
files src/xfaces.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfaces.c	Fri Sep 27 04:50:23 2002 +0000
+++ b/src/xfaces.c	Fri Sep 27 04:50:58 2002 +0000
@@ -3220,8 +3220,14 @@
 
   /* If FONTNAME is actually a fontset name, get ASCII font name of it.  */
   fontset = fs_query_fontset (fontname, 0);
-  if (fontset >= 0)
+  if (fontset > 0)
     font_name = XSTRING (fontset_ascii (fontset))->data;
+  else if (fontset == 0)
+    {
+      if (may_fail_p)
+	return 0;
+      abort ();
+    }
 
   /* Check if FONT_NAME is surely available on the system.  Usually
      FONT_NAME is already cached for the frame F and FS_LOAD_FONT
@@ -4156,7 +4162,7 @@
 	  if (!NILP (tmp))
 	    value = tmp;
 	  else if (EQ (attr, QCfontset))
-	    error ("Invalid fontset", XSTRING (value)->data);
+	    signal_error ("Invalid fontset name", value);
 
 	  if (EQ (attr, QCfont))
 	    {