diff options
| author | Kenichi Handa | 1999-04-10 02:21:00 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1999-04-10 02:21:00 +0000 |
| commit | 79091e9c64514eeb6dad7a7c245a453d8fa08227 (patch) | |
| tree | 492c34949987e5102a91578ac37987dd0c6cce93 /src | |
| parent | b1b77d620ebb61a26cce5867f100ed7fc2bc6a5d (diff) | |
| download | emacs-79091e9c64514eeb6dad7a7c245a453d8fa08227.tar.gz emacs-79091e9c64514eeb6dad7a7c245a453d8fa08227.zip | |
(Fquery_fontset): Check for fontset aliases here.
(Fnew_fontset, Fset_fontset_font): Don't check for them here.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fontset.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/fontset.c b/src/fontset.c index 453c56673e4..a3da47bc520 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -464,6 +464,10 @@ If REGEXPP is non-nil, PATTERN is a regular expression.") | |||
| 464 | if (XSTRING (pattern)->size == 0) | 464 | if (XSTRING (pattern)->size == 0) |
| 465 | return Qnil; | 465 | return Qnil; |
| 466 | 466 | ||
| 467 | tem = Frassoc (pattern, Vfontset_alias_alist); | ||
| 468 | if (!NILP (tem)) | ||
| 469 | return Fcar (tem); | ||
| 470 | |||
| 467 | if (NILP (regexpp)) | 471 | if (NILP (regexpp)) |
| 468 | regexp = fontset_pattern_regexp (pattern); | 472 | regexp = fontset_pattern_regexp (pattern); |
| 469 | else | 473 | else |
| @@ -557,16 +561,15 @@ FONTLIST is an alist of charsets vs corresponding font names.") | |||
| 557 | Lisp_Object name, fontlist; | 561 | Lisp_Object name, fontlist; |
| 558 | { | 562 | { |
| 559 | Lisp_Object fullname, fontset_info; | 563 | Lisp_Object fullname, fontset_info; |
| 560 | Lisp_Object tail, tem; | 564 | Lisp_Object tail; |
| 561 | 565 | ||
| 562 | (*check_window_system_func) (); | 566 | (*check_window_system_func) (); |
| 563 | 567 | ||
| 564 | CHECK_STRING (name, 0); | 568 | CHECK_STRING (name, 0); |
| 565 | CHECK_LIST (fontlist, 1); | 569 | CHECK_LIST (fontlist, 1); |
| 566 | 570 | ||
| 567 | tem = Frassoc (name, Vfontset_alias_alist); | ||
| 568 | fullname = Fquery_fontset (name, Qnil); | 571 | fullname = Fquery_fontset (name, Qnil); |
| 569 | if (!NILP (tem) || !NILP (fullname)) | 572 | if (!NILP (fullname)) |
| 570 | error ("Fontset `%s' matches the existing fontset `%s'", | 573 | error ("Fontset `%s' matches the existing fontset `%s'", |
| 571 | XSTRING (name)->data, XSTRING (fullname)->data); | 574 | XSTRING (name)->data, XSTRING (fullname)->data); |
| 572 | 575 | ||
| @@ -608,7 +611,6 @@ If FRAME is omitted or nil, all frames are affected.") | |||
| 608 | { | 611 | { |
| 609 | int charset; | 612 | int charset; |
| 610 | Lisp_Object fullname, fontlist; | 613 | Lisp_Object fullname, fontlist; |
| 611 | Lisp_Object tem; | ||
| 612 | 614 | ||
| 613 | (*check_window_system_func) (); | 615 | (*check_window_system_func) (); |
| 614 | 616 | ||
| @@ -621,9 +623,8 @@ If FRAME is omitted or nil, all frames are affected.") | |||
| 621 | if ((charset = get_charset_id (charset_symbol)) < 0) | 623 | if ((charset = get_charset_id (charset_symbol)) < 0) |
| 622 | error ("Invalid charset: %s", XSYMBOL (charset_symbol)->name->data); | 624 | error ("Invalid charset: %s", XSYMBOL (charset_symbol)->name->data); |
| 623 | 625 | ||
| 624 | tem = Frassoc (name, Vfontset_alias_alist); | ||
| 625 | fullname = Fquery_fontset (name, Qnil); | 626 | fullname = Fquery_fontset (name, Qnil); |
| 626 | if (!NILP (tem) || !NILP (fullname)) | 627 | if (!NILP (fullname)) |
| 627 | error ("Fontset `%s' does not exist", XSTRING (name)->data); | 628 | error ("Fontset `%s' does not exist", XSTRING (name)->data); |
| 628 | 629 | ||
| 629 | /* If FRAME is not specified, we must, at first, update contents of | 630 | /* If FRAME is not specified, we must, at first, update contents of |