aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/international/mule-diag.el17
2 files changed, 12 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b18b186f6d..27e6b5e64a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2008-05-30 Kenichi Handa <[email protected]>
+
+ * international/mule-diag.el (describe-font): Don't check fontset
+ here, and just call font-info. Get the default font by from the
+ default face.
+
2008-05-29 Kenichi Handa <[email protected]>
* international/mule-conf.el (utf-8-sig, utf-8-auto): New coding
diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el
index 91c7ef7820..c01e15cf2d 100644
--- a/lisp/international/mule-diag.el
+++ b/lisp/international/mule-diag.el
@@ -835,23 +835,18 @@ The font must be already used by Emacs."
(interactive "sFont name (default current choice for ASCII chars): ")
(or (and window-system (fboundp 'fontset-list))
(error "No fonts being used"))
- (let (fontset font-info)
- (when (or (not fontname) (= (length fontname) 0))
- (setq fontname (frame-parameter nil 'font))
- ;; Check if FONTNAME is a fontset.
- (if (query-fontset fontname)
- (setq fontset fontname
- fontname (nth 1 (assq 'ascii
- (aref (fontset-info fontname) 2))))))
+ (let (font-info)
+ (if (or (not fontname) (= (length fontname) 0))
+ (setq fontname (face-attribute 'default :font)))
(setq font-info (font-info fontname))
(if (null font-info)
- (if fontset
+ (if (fontp fontname 'font-object)
;; The font should be surely used. So, there's some
;; problem about getting information about it. It is
;; better to print the fontname to show which font has
;; this problem.
- (message "No information about \"%s\"" fontname)
- (message "No matching font being used"))
+ (message "No information about \"%s\"" (font-xlfd-name fontname))
+ (message "No matching font found"))
(with-output-to-temp-buffer "*Help*"
(describe-font-internal font-info 'verbose)))))