diff options
| author | Kenichi Handa | 2002-09-27 04:50:58 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2002-09-27 04:50:58 +0000 |
| commit | 25b1546d720f30d5b6e60a926a5014c94f540a95 (patch) | |
| tree | 3a9d69a718eba19a3f90e7122f2367075f193453 /src | |
| parent | 75f8dd6ae20ab2ecb6829f2eaccb55fc5258b957 (diff) | |
| download | emacs-25b1546d720f30d5b6e60a926a5014c94f540a95.tar.gz emacs-25b1546d720f30d5b6e60a926a5014c94f540a95.zip | |
(set_lface_from_font_name): Reject the default fontset.
(Finternal_set_lisp_face_attribute): Use signal_error for the
error of invalid fontset.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfaces.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index 166f94a761f..4af9ceec260 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -3220,8 +3220,14 @@ set_lface_from_font_name (f, lface, fontname, force_p, may_fail_p) | |||
| 3220 | 3220 | ||
| 3221 | /* If FONTNAME is actually a fontset name, get ASCII font name of it. */ | 3221 | /* If FONTNAME is actually a fontset name, get ASCII font name of it. */ |
| 3222 | fontset = fs_query_fontset (fontname, 0); | 3222 | fontset = fs_query_fontset (fontname, 0); |
| 3223 | if (fontset >= 0) | 3223 | if (fontset > 0) |
| 3224 | font_name = XSTRING (fontset_ascii (fontset))->data; | 3224 | font_name = XSTRING (fontset_ascii (fontset))->data; |
| 3225 | else if (fontset == 0) | ||
| 3226 | { | ||
| 3227 | if (may_fail_p) | ||
| 3228 | return 0; | ||
| 3229 | abort (); | ||
| 3230 | } | ||
| 3225 | 3231 | ||
| 3226 | /* Check if FONT_NAME is surely available on the system. Usually | 3232 | /* Check if FONT_NAME is surely available on the system. Usually |
| 3227 | FONT_NAME is already cached for the frame F and FS_LOAD_FONT | 3233 | FONT_NAME is already cached for the frame F and FS_LOAD_FONT |
| @@ -4156,7 +4162,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4156 | if (!NILP (tmp)) | 4162 | if (!NILP (tmp)) |
| 4157 | value = tmp; | 4163 | value = tmp; |
| 4158 | else if (EQ (attr, QCfontset)) | 4164 | else if (EQ (attr, QCfontset)) |
| 4159 | error ("Invalid fontset", XSTRING (value)->data); | 4165 | signal_error ("Invalid fontset name", value); |
| 4160 | 4166 | ||
| 4161 | if (EQ (attr, QCfont)) | 4167 | if (EQ (attr, QCfont)) |
| 4162 | { | 4168 | { |