From: Kenichi Handa Date: Mon, 7 Sep 1998 13:39:15 +0000 (+0000) Subject: (resolved-ascii-font): New variable. X-Git-Tag: emacs-20.4~1744 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bcb68cff12e32380f04cf8d1f07f7a718d6388c4;p=emacs.git (resolved-ascii-font): New variable. (x-complement-fontset-spec): By side effect, set `resolved-ascii-font' to the resolved name of ASCII font." (create-fontset-from-fontset-spec): Don't get a value for resolved-ascii-font from the list full-fontlist. It is set by x-complement-fontset-spec now. --- diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index aaa53d88fe5..1d53cad219b 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -282,6 +282,9 @@ Emacs tries to open fonts in this order." (cons (list fontname style-ignored size-ignored both-ignored) alternate-fontname-alist)))))) +;; Just to avoid compiler waring. The gloval value is never used. +(defvar resolved-ascii-font nil) + (defun x-complement-fontset-spec (xlfd-fields fontlist) "Complement FONTLIST for all charsets based on XLFD-FIELDS and return it. XLFD-FIELDS is a vector of XLFD (X Logical Font Description) fields. @@ -289,7 +292,10 @@ FONTLIST is an alist of charsets vs the corresponding font names. Font names for charsets not listed in FONTLIST are generated from XLFD-FIELDS and a property of x-charset-registry of each charset -automatically." +automatically. + +By side effect, this sets `resolved-ascii-font' to the resolved name +of ASCII font." (let ((charsets charset-list) (xlfd-fields-non-ascii (copy-sequence xlfd-fields)) (new-fontlist nil)) @@ -330,14 +336,16 @@ automatically." ;; on x-charset-registry in the previous code. (while l (if (string-match (car (car l)) ascii-font) - (let ((charsets (cdr (car l)))) + (let ((charsets (cdr (car l))) + slot2) (while charsets (if (and (not (eq (car charsets) 'ascii)) - (setq slot (assq (car charsets) new-fontlist))) - (setcdr slot ascii-font)) + (setq slot2 (assq (car charsets) new-fontlist))) + (setcdr slot2 (cdr slot))) (setq charsets (cdr charsets))) (setq l nil)) (setq l (cdr l)))) + (setq resolved-ascii-font ascii-font) (append fontlist new-fontlist)))))) (defun fontset-name-p (fontset) @@ -494,7 +502,6 @@ It returns a name of the created fontset." (or (rassoc alias fontset-alias-alist) (setq fontset-alias-alist (cons (cons name alias) fontset-alias-alist))))) - (setq resolved-ascii-font (cdr (assq 'ascii full-fontlist))) (setq fontset-alias-alist (cons (cons name resolved-ascii-font) fontset-alias-alist))