# HG changeset patch # User Kenichi Handa # Date 905175555 0 # Node ID 22df54cdb841999bbb526f3bd94dea2950edb7f0 # Parent 70e635407161627f915d28fc438777e4e9bbb127 (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 -r 70e635407161 -r 22df54cdb841 lisp/international/fontset.el --- a/lisp/international/fontset.el Mon Sep 07 13:39:15 1998 +0000 +++ b/lisp/international/fontset.el Mon Sep 07 13:39:15 1998 +0000 @@ -282,6 +282,9 @@ (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 @@ 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 @@ ;; 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 @@ (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))