aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa1998-09-07 13:39:15 +0000
committerKenichi Handa1998-09-07 13:39:15 +0000
commitbcb68cff12e32380f04cf8d1f07f7a718d6388c4 (patch)
tree5e262f04dbb82d5b3ccdf852c3397fcb42c0dc23
parent30ae06fc5a9d3b172090aef0e58af8a586196804 (diff)
downloademacs-bcb68cff12e32380f04cf8d1f07f7a718d6388c4.tar.gz
emacs-bcb68cff12e32380f04cf8d1f07f7a718d6388c4.zip
(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.
-rw-r--r--lisp/international/fontset.el17
1 files changed, 12 insertions, 5 deletions
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."
282 (cons (list fontname style-ignored size-ignored both-ignored) 282 (cons (list fontname style-ignored size-ignored both-ignored)
283 alternate-fontname-alist)))))) 283 alternate-fontname-alist))))))
284 284
285;; Just to avoid compiler waring. The gloval value is never used.
286(defvar resolved-ascii-font nil)
287
285(defun x-complement-fontset-spec (xlfd-fields fontlist) 288(defun x-complement-fontset-spec (xlfd-fields fontlist)
286 "Complement FONTLIST for all charsets based on XLFD-FIELDS and return it. 289 "Complement FONTLIST for all charsets based on XLFD-FIELDS and return it.
287XLFD-FIELDS is a vector of XLFD (X Logical Font Description) fields. 290XLFD-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.
289 292
290Font names for charsets not listed in FONTLIST are generated from 293Font names for charsets not listed in FONTLIST are generated from
291XLFD-FIELDS and a property of x-charset-registry of each charset 294XLFD-FIELDS and a property of x-charset-registry of each charset
292automatically." 295automatically.
296
297By side effect, this sets `resolved-ascii-font' to the resolved name
298of ASCII font."
293 (let ((charsets charset-list) 299 (let ((charsets charset-list)
294 (xlfd-fields-non-ascii (copy-sequence xlfd-fields)) 300 (xlfd-fields-non-ascii (copy-sequence xlfd-fields))
295 (new-fontlist nil)) 301 (new-fontlist nil))
@@ -330,14 +336,16 @@ automatically."
330 ;; on x-charset-registry in the previous code. 336 ;; on x-charset-registry in the previous code.
331 (while l 337 (while l
332 (if (string-match (car (car l)) ascii-font) 338 (if (string-match (car (car l)) ascii-font)
333 (let ((charsets (cdr (car l)))) 339 (let ((charsets (cdr (car l)))
340 slot2)
334 (while charsets 341 (while charsets
335 (if (and (not (eq (car charsets) 'ascii)) 342 (if (and (not (eq (car charsets) 'ascii))
336 (setq slot (assq (car charsets) new-fontlist))) 343 (setq slot2 (assq (car charsets) new-fontlist)))
337 (setcdr slot ascii-font)) 344 (setcdr slot2 (cdr slot)))
338 (setq charsets (cdr charsets))) 345 (setq charsets (cdr charsets)))
339 (setq l nil)) 346 (setq l nil))
340 (setq l (cdr l)))) 347 (setq l (cdr l))))
348 (setq resolved-ascii-font ascii-font)
341 (append fontlist new-fontlist)))))) 349 (append fontlist new-fontlist))))))
342 350
343(defun fontset-name-p (fontset) 351(defun fontset-name-p (fontset)
@@ -494,7 +502,6 @@ It returns a name of the created fontset."
494 (or (rassoc alias fontset-alias-alist) 502 (or (rassoc alias fontset-alias-alist)
495 (setq fontset-alias-alist 503 (setq fontset-alias-alist
496 (cons (cons name alias) fontset-alias-alist))))) 504 (cons (cons name alias) fontset-alias-alist)))))
497 (setq resolved-ascii-font (cdr (assq 'ascii full-fontlist)))
498 (setq fontset-alias-alist 505 (setq fontset-alias-alist
499 (cons (cons name resolved-ascii-font) 506 (cons (cons name resolved-ascii-font)
500 fontset-alias-alist)) 507 fontset-alias-alist))