diff options
| author | Richard M. Stallman | 1999-04-07 23:35:12 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1999-04-07 23:35:12 +0000 |
| commit | 9af3dc479f682957ca53813205f7b9ba0da7ce28 (patch) | |
| tree | c05af062c4eca82b39e7fae402237a5cca437902 /src | |
| parent | b68a01e7995910caed59b6f1ef651fb8668d123f (diff) | |
| download | emacs-9af3dc479f682957ca53813205f7b9ba0da7ce28.tar.gz emacs-9af3dc479f682957ca53813205f7b9ba0da7ce28.zip | |
(Fquery_fontset): Don't check for fontset aliases here.
(Fnew_fontset, Fset_fontset_font): Check for them here.
(Ffontset_info, Fnew_fontset, Fset_fontset_font):
Fix error message syntax.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fontset.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/fontset.c b/src/fontset.c index 6c5d39ef0f6..453c56673e4 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -447,11 +447,11 @@ fontset_pattern_regexp (pattern) | |||
| 447 | } | 447 | } |
| 448 | 448 | ||
| 449 | DEFUN ("query-fontset", Fquery_fontset, Squery_fontset, 1, 2, 0, | 449 | DEFUN ("query-fontset", Fquery_fontset, Squery_fontset, 1, 2, 0, |
| 450 | "Return a fontset name which matches PATTERN, nil if no matching fontset.\n\ | 450 | "Return the name of an existing fontset which matches PATTERN.\n\ |
| 451 | PATTERN can contain `*' or `?' as a wild card\n\ | 451 | The value is nil if there is no matching fontset.\n\ |
| 452 | just like X's font name matching algorithm allows.\n\ | 452 | PATTERN can contain `*' or `?' as a wildcard\n\ |
| 453 | If REGEXPP is non-nil, pattern is regexp;\n\ | 453 | just as X font name matching algorithm allows.\n\ |
| 454 | so PATTERN is considered as regular expression.") | 454 | If REGEXPP is non-nil, PATTERN is a regular expression.") |
| 455 | (pattern, regexpp) | 455 | (pattern, regexpp) |
| 456 | Lisp_Object pattern, regexpp; | 456 | Lisp_Object pattern, regexpp; |
| 457 | { | 457 | { |
| @@ -464,10 +464,6 @@ so PATTERN is considered as 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 | |||
| 471 | if (NILP (regexpp)) | 467 | if (NILP (regexpp)) |
| 472 | regexp = fontset_pattern_regexp (pattern); | 468 | regexp = fontset_pattern_regexp (pattern); |
| 473 | else | 469 | else |
| @@ -561,16 +557,17 @@ FONTLIST is an alist of charsets vs corresponding font names.") | |||
| 561 | Lisp_Object name, fontlist; | 557 | Lisp_Object name, fontlist; |
| 562 | { | 558 | { |
| 563 | Lisp_Object fullname, fontset_info; | 559 | Lisp_Object fullname, fontset_info; |
| 564 | Lisp_Object tail; | 560 | Lisp_Object tail, tem; |
| 565 | 561 | ||
| 566 | (*check_window_system_func) (); | 562 | (*check_window_system_func) (); |
| 567 | 563 | ||
| 568 | CHECK_STRING (name, 0); | 564 | CHECK_STRING (name, 0); |
| 569 | CHECK_LIST (fontlist, 1); | 565 | CHECK_LIST (fontlist, 1); |
| 570 | 566 | ||
| 567 | tem = Frassoc (name, Vfontset_alias_alist); | ||
| 571 | fullname = Fquery_fontset (name, Qnil); | 568 | fullname = Fquery_fontset (name, Qnil); |
| 572 | if (!NILP (fullname)) | 569 | if (!NILP (tem) || !NILP (fullname)) |
| 573 | error ("Fontset \"%s\" matches the existing fontset \"%s\"", | 570 | error ("Fontset `%s' matches the existing fontset `%s'", |
| 574 | XSTRING (name)->data, XSTRING (fullname)->data); | 571 | XSTRING (name)->data, XSTRING (fullname)->data); |
| 575 | 572 | ||
| 576 | /* Check the validity of FONTLIST. */ | 573 | /* Check the validity of FONTLIST. */ |
| @@ -611,6 +608,7 @@ If FRAME is omitted or nil, all frames are affected.") | |||
| 611 | { | 608 | { |
| 612 | int charset; | 609 | int charset; |
| 613 | Lisp_Object fullname, fontlist; | 610 | Lisp_Object fullname, fontlist; |
| 611 | Lisp_Object tem; | ||
| 614 | 612 | ||
| 615 | (*check_window_system_func) (); | 613 | (*check_window_system_func) (); |
| 616 | 614 | ||
| @@ -623,9 +621,10 @@ If FRAME is omitted or nil, all frames are affected.") | |||
| 623 | if ((charset = get_charset_id (charset_symbol)) < 0) | 621 | if ((charset = get_charset_id (charset_symbol)) < 0) |
| 624 | error ("Invalid charset: %s", XSYMBOL (charset_symbol)->name->data); | 622 | error ("Invalid charset: %s", XSYMBOL (charset_symbol)->name->data); |
| 625 | 623 | ||
| 624 | tem = Frassoc (name, Vfontset_alias_alist); | ||
| 626 | fullname = Fquery_fontset (name, Qnil); | 625 | fullname = Fquery_fontset (name, Qnil); |
| 627 | if (NILP (fullname)) | 626 | if (!NILP (tem) || !NILP (fullname)) |
| 628 | error ("Fontset \"%s\" does not exist", XSTRING (name)->data); | 627 | error ("Fontset `%s' does not exist", XSTRING (name)->data); |
| 629 | 628 | ||
| 630 | /* If FRAME is not specified, we must, at first, update contents of | 629 | /* If FRAME is not specified, we must, at first, update contents of |
| 631 | `global-fontset-alist' for a frame created in the future. */ | 630 | `global-fontset-alist' for a frame created in the future. */ |
| @@ -770,7 +769,7 @@ loading failed.") | |||
| 770 | 769 | ||
| 771 | fontset = fs_query_fontset (f, XSTRING (name)->data); | 770 | fontset = fs_query_fontset (f, XSTRING (name)->data); |
| 772 | if (fontset < 0) | 771 | if (fontset < 0) |
| 773 | error ("Fontset \"%s\" does not exist", XSTRING (name)->data); | 772 | error ("Fontset `%s' does not exist", XSTRING (name)->data); |
| 774 | 773 | ||
| 775 | info = Fmake_vector (make_number (3), Qnil); | 774 | info = Fmake_vector (make_number (3), Qnil); |
| 776 | 775 | ||