Mercurial > emacs
comparison src/fontset.c @ 24608:a16dadaa425d
(Fquery_fontset): Check for fontset aliases here.
(Fnew_fontset, Fset_fontset_font): Don't check for them here.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Sat, 10 Apr 1999 02:21:00 +0000 |
parents | 6810d6fb639f |
children | a1e836728879 |
comparison
equal
deleted
inserted
replaced
24607:1ceb1e45b10d | 24608:a16dadaa425d |
---|---|
462 CHECK_STRING (pattern, 0); | 462 CHECK_STRING (pattern, 0); |
463 | 463 |
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 |
470 regexp = pattern; | 474 regexp = pattern; |
471 | 475 |
555 FONTLIST is an alist of charsets vs corresponding font names.") | 559 FONTLIST is an alist of charsets vs corresponding font names.") |
556 (name, fontlist) | 560 (name, fontlist) |
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 |
573 /* Check the validity of FONTLIST. */ | 576 /* Check the validity of FONTLIST. */ |
574 for (tail = fontlist; CONSP (tail); tail = XCONS (tail)->cdr) | 577 for (tail = fontlist; CONSP (tail); tail = XCONS (tail)->cdr) |
606 (name, charset_symbol, fontname, frame) | 609 (name, charset_symbol, fontname, frame) |
607 Lisp_Object name, charset_symbol, fontname, frame; | 610 Lisp_Object name, charset_symbol, fontname, frame; |
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 |
615 CHECK_STRING (name, 0); | 617 CHECK_STRING (name, 0); |
616 CHECK_SYMBOL (charset_symbol, 1); | 618 CHECK_SYMBOL (charset_symbol, 1); |
619 CHECK_LIVE_FRAME (frame, 3); | 621 CHECK_LIVE_FRAME (frame, 3); |
620 | 622 |
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 |
630 `global-fontset-alist' for a frame created in the future. */ | 631 `global-fontset-alist' for a frame created in the future. */ |
631 if (NILP (frame)) | 632 if (NILP (frame)) |