# HG changeset patch # User Kenichi Handa # Date 1212115033 0 # Node ID 6c4caa612333f9148d8f517945427e7b6af7a004 # Parent 4bb963f7ab1aa6b78cda746436d1f7a8b7ad0c9a (describe-font): Don't check fontset here, and just call font-info. Get the default font by from the default face. diff -r 4bb963f7ab1a -r 6c4caa612333 lisp/international/mule-diag.el --- a/lisp/international/mule-diag.el Fri May 30 02:35:54 2008 +0000 +++ b/lisp/international/mule-diag.el Fri May 30 02:37:13 2008 +0000 @@ -835,23 +835,18 @@ (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)))))