diff options
| author | Kenichi Handa | 2008-05-30 02:37:31 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-05-30 02:37:31 +0000 |
| commit | 7736dabea784c9fb44b3d1a9a1882a5ff3e16271 (patch) | |
| tree | 2c6fdd091c60694e27aaa32cefbee93431977378 | |
| parent | 22b7086bdb9c73c1381b74e5f6a11aa8f7830a18 (diff) | |
| download | emacs-7736dabea784c9fb44b3d1a9a1882a5ff3e16271.tar.gz emacs-7736dabea784c9fb44b3d1a9a1882a5ff3e16271.zip | |
(describe-font): Don't check fontset
here, and just call font-info. Get the default font by from the
default face.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/international/mule-diag.el | 17 |
2 files changed, 12 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b18b186f6de..27e6b5e64a8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2008-05-30 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * international/mule-diag.el (describe-font): Don't check fontset | ||
| 4 | here, and just call font-info. Get the default font by from the | ||
| 5 | default face. | ||
| 6 | |||
| 1 | 2008-05-29 Kenichi Handa <handa@m17n.org> | 7 | 2008-05-29 Kenichi Handa <handa@m17n.org> |
| 2 | 8 | ||
| 3 | * international/mule-conf.el (utf-8-sig, utf-8-auto): New coding | 9 | * 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 91c7ef78207..c01e15cf2d6 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." | |||
| 835 | (interactive "sFont name (default current choice for ASCII chars): ") | 835 | (interactive "sFont name (default current choice for ASCII chars): ") |
| 836 | (or (and window-system (fboundp 'fontset-list)) | 836 | (or (and window-system (fboundp 'fontset-list)) |
| 837 | (error "No fonts being used")) | 837 | (error "No fonts being used")) |
| 838 | (let (fontset font-info) | 838 | (let (font-info) |
| 839 | (when (or (not fontname) (= (length fontname) 0)) | 839 | (if (or (not fontname) (= (length fontname) 0)) |
| 840 | (setq fontname (frame-parameter nil 'font)) | 840 | (setq fontname (face-attribute 'default :font))) |
| 841 | ;; Check if FONTNAME is a fontset. | ||
| 842 | (if (query-fontset fontname) | ||
| 843 | (setq fontset fontname | ||
| 844 | fontname (nth 1 (assq 'ascii | ||
| 845 | (aref (fontset-info fontname) 2)))))) | ||
| 846 | (setq font-info (font-info fontname)) | 841 | (setq font-info (font-info fontname)) |
| 847 | (if (null font-info) | 842 | (if (null font-info) |
| 848 | (if fontset | 843 | (if (fontp fontname 'font-object) |
| 849 | ;; The font should be surely used. So, there's some | 844 | ;; The font should be surely used. So, there's some |
| 850 | ;; problem about getting information about it. It is | 845 | ;; problem about getting information about it. It is |
| 851 | ;; better to print the fontname to show which font has | 846 | ;; better to print the fontname to show which font has |
| 852 | ;; this problem. | 847 | ;; this problem. |
| 853 | (message "No information about \"%s\"" fontname) | 848 | (message "No information about \"%s\"" (font-xlfd-name fontname)) |
| 854 | (message "No matching font being used")) | 849 | (message "No matching font found")) |
| 855 | (with-output-to-temp-buffer "*Help*" | 850 | (with-output-to-temp-buffer "*Help*" |
| 856 | (describe-font-internal font-info 'verbose))))) | 851 | (describe-font-internal font-info 'verbose))))) |
| 857 | 852 | ||