From fd94f2637050d3c27a68ff918934389376d1a9e7 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 13 May 2002 13:01:22 +0000 Subject: [PATCH] (fontset-plain-name): Handle the case that size, weight, slant are not specified in the fontset name. --- lisp/international/fontset.el | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index 27f80cbed0d..e60f5c8fd79 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -415,21 +415,23 @@ with \"fontset\" in ` field." (if (not (string-match "^fontset-\\(.*\\)$" nickname)) fontset (setq nickname (match-string 1 nickname)) - (if (> (string-to-int size) 0) + (if (and (integerp size) (> (string-to-int size) 0)) (setq name (format "%s: %s-dot" nickname size)) (setq name nickname)) - (cond ((string-match "^medium$" weight) - (setq name (concat name " " "medium"))) - ((string-match "^bold$\\|^demibold$" weight) - (setq name (concat name " " weight)))) - (cond ((string-match "^i$" slant) - (setq name (concat name " " "italic"))) - ((string-match "^o$" slant) - (setq name (concat name " " "slant"))) - ((string-match "^ri$" slant) - (setq name (concat name " " "reverse italic"))) - ((string-match "^ro$" slant) - (setq name (concat name " " "reverse slant")))) + (and weight + (cond ((string-match "^medium$" weight) + (setq name (concat name " " "medium"))) + ((string-match "^bold$\\|^demibold$" weight) + (setq name (concat name " " weight))))) + (and slant + (cond ((string-match "^i$" slant) + (setq name (concat name " " "italic"))) + ((string-match "^o$" slant) + (setq name (concat name " " "slant"))) + ((string-match "^ri$" slant) + (setq name (concat name " " "reverse italic"))) + ((string-match "^ro$" slant) + (setq name (concat name " " "reverse slant"))))) name)) fontset))) -- 2.39.5