diff options
| author | Kenichi Handa | 2002-09-27 04:51:34 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2002-09-27 04:51:34 +0000 |
| commit | a92bf2cbf09f8cee1aa099344cdd838af72f0058 (patch) | |
| tree | e85b4e002fd58f8bb3a3e7fd8961572b70f55bcb /src | |
| parent | 25b1546d720f30d5b6e60a926a5014c94f540a95 (diff) | |
| download | emacs-a92bf2cbf09f8cee1aa099344cdd838af72f0058.tar.gz emacs-a92bf2cbf09f8cee1aa099344cdd838af72f0058.zip | |
(x_new_fontset): If FONTSETNAME specifies the default
fontset, return Qt.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/xterm.c b/src/xterm.c index cc9942893d9..2331cdcfdd2 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -12263,7 +12263,10 @@ x_new_font (f, fontname) | |||
| 12263 | /* Give frame F the fontset named FONTSETNAME as its default font, and | 12263 | /* Give frame F the fontset named FONTSETNAME as its default font, and |
| 12264 | return the full name of that fontset. FONTSETNAME may be a wildcard | 12264 | return the full name of that fontset. FONTSETNAME may be a wildcard |
| 12265 | pattern; in that case, we choose some fontset that fits the pattern. | 12265 | pattern; in that case, we choose some fontset that fits the pattern. |
| 12266 | The return value shows which fontset we chose. */ | 12266 | The return value shows which fontset we chose. |
| 12267 | If FONTSETNAME specifies the default fontset, return Qt. | ||
| 12268 | If an ASCII font specified in the specified fontset can't be | ||
| 12269 | loaded, return Qnil. */ | ||
| 12267 | 12270 | ||
| 12268 | Lisp_Object | 12271 | Lisp_Object |
| 12269 | x_new_fontset (f, fontsetname) | 12272 | x_new_fontset (f, fontsetname) |
| @@ -12273,10 +12276,13 @@ x_new_fontset (f, fontsetname) | |||
| 12273 | int fontset = fs_query_fontset (build_string (fontsetname), 0); | 12276 | int fontset = fs_query_fontset (build_string (fontsetname), 0); |
| 12274 | Lisp_Object result; | 12277 | Lisp_Object result; |
| 12275 | 12278 | ||
| 12276 | if (fontset >= 0 && f->output_data.x->fontset == fontset) | 12279 | if (fontset > 0 && f->output_data.x->fontset == fontset) |
| 12277 | /* This fontset is already set in frame F. There's nothing more | 12280 | /* This fontset is already set in frame F. There's nothing more |
| 12278 | to do. */ | 12281 | to do. */ |
| 12279 | return fontset_name (fontset); | 12282 | return fontset_name (fontset); |
| 12283 | else if (fontset == 0) | ||
| 12284 | /* The default fontset can't be the default font. */ | ||
| 12285 | return Qt; | ||
| 12280 | 12286 | ||
| 12281 | if (fontset >= 0) | 12287 | if (fontset >= 0) |
| 12282 | result = x_new_font (f, (XSTRING (fontset_ascii (fontset))->data)); | 12288 | result = x_new_font (f, (XSTRING (fontset_ascii (fontset))->data)); |