From c0e70a9f1da87eb10973e19ff331c372ca017251 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 20 Feb 2003 08:43:22 +0000 Subject: [PATCH] (print-fontset): If FONTSET is nil, use the default fontset. (describe-fontset): If the current frame is not using a fontset, call print-fontset with nil. --- lisp/ChangeLog | 7 +++++++ lisp/international/mule-diag.el | 8 +++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f7abcf266e8..217867bc993 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2003-02-20 Kenichi Handa + + * international/mule-diag.el (print-fontset): If FONTSET is nil, + use the default fontset. + (describe-fontset): If the current frame is not using a fontset, + call print-fontset with nil. + 2003-02-19 Andre Spiegel * vc.el (vc-binary-assoc, vc-binary-suffixes): Removed; these diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index 05a03d26f4d..de10d4c310f 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el @@ -1057,9 +1057,12 @@ but still contains full information about each coding system." (defun print-fontset (fontset &optional print-fonts) "Print information about FONTSET. +If FONTSET is nil, print information about the default fontset. If optional arg PRINT-FONTS is non-nil, also print names of all opened fonts for FONTSET. This function actually inserts the information in the current buffer." + (or fontset + (setq fontset (query-fontset "fontset-default"))) (let ((tail (aref (fontset-info fontset) 2)) elt chars font-spec opened prev-charset charset from to) (beginning-of-line) @@ -1138,9 +1141,8 @@ This shows which font is used for which character(s)." "Fontset (default, used by the current frame): " fontset-list nil t))))) (if (= (length fontset) 0) - (setq fontset (cdr (assq 'font (frame-parameters))))) - (if (not (setq fontset (query-fontset fontset))) - (error "Current frame is using font, not fontset")) + (setq fontset (frame-parameter nil 'font))) + (setq fontset (query-fontset fontset)) (help-setup-xref (list #'describe-fontset fontset) (interactive-p)) (with-output-to-temp-buffer (help-buffer) (with-current-buffer standard-output -- 2.39.2