Mercurial > emacs
changeset 49875:40b0b48205b3
(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.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 20 Feb 2003 08:43:04 +0000 |
parents | 3bdee1887901 |
children | 964dde5d6acd |
files | lisp/international/mule-diag.el |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/international/mule-diag.el Thu Feb 20 08:40:35 2003 +0000 +++ b/lisp/international/mule-diag.el Thu Feb 20 08:43:04 2003 +0000 @@ -1057,9 +1057,12 @@ (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 @@ "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