Mercurial > emacs
comparison lisp/international/mule-diag.el @ 90580:7f3f771c85fa
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 382-398)
- Update from CVS
- Update from erc--emacs--22
- Fix ERC bug introduced in last patch
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 123-125)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-101
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 16 Aug 2006 14:08:49 +0000 |
parents | ee12d75eb214 12a2fefc1194 |
children | 6588c6259dfb |
comparison
equal
deleted
inserted
replaced
90579:c78f05b8f09e | 90580:7f3f771c85fa |
---|---|
828 (print-list " baseline-offset:" (format "%2d" (aref font-info 4))) | 828 (print-list " baseline-offset:" (format "%2d" (aref font-info 4))) |
829 (print-list "relative-compose:" (format "%2d" (aref font-info 5)))) | 829 (print-list "relative-compose:" (format "%2d" (aref font-info 5)))) |
830 | 830 |
831 ;;;###autoload | 831 ;;;###autoload |
832 (defun describe-font (fontname) | 832 (defun describe-font (fontname) |
833 "Display information about fonts which partially match FONTNAME." | 833 "Display information about a font whose name is FONTNAME. |
834 (interactive "sFontname (default current choice for ASCII chars): ") | 834 The font must be already used by Emacs." |
835 (interactive "sFont name (default current choice for ASCII chars): ") | |
835 (or (and window-system (fboundp 'fontset-list)) | 836 (or (and window-system (fboundp 'fontset-list)) |
836 (error "No fontsets being used")) | 837 (error "No fonts being used")) |
837 (when (or (not fontname) (= (length fontname) 0)) | 838 (let (fontset font-info) |
838 (setq fontname (cdr (assq 'font (frame-parameters)))) | 839 (when (or (not fontname) (= (length fontname) 0)) |
839 (if (query-fontset fontname) | 840 (setq fontname (frame-parameter nil 'font)) |
840 (setq fontname | 841 ;; Check if FONTNAME is a fontset. |
841 (nth 1 (assq 'ascii (aref (fontset-info fontname) 2)))))) | 842 (if (query-fontset fontname) |
842 (let ((font-info (font-info fontname))) | 843 (setq fontset fontname |
844 fontname (nth 1 (assq 'ascii | |
845 (aref (fontset-info fontname) 2)))))) | |
846 (setq font-info (font-info fontname)) | |
843 (if (null font-info) | 847 (if (null font-info) |
844 (message "No matching font") | 848 (if fontset |
849 ;; The font should be surely used. So, there's some | |
850 ;; problem about getting information about it. It is | |
851 ;; better to print the fontname to show which font has | |
852 ;; this problem. | |
853 (message "No information about \"%s\"" fontname) | |
854 (message "No matching font being used")) | |
845 (with-output-to-temp-buffer "*Help*" | 855 (with-output-to-temp-buffer "*Help*" |
846 (describe-font-internal font-info 'verbose))))) | 856 (describe-font-internal font-info 'verbose))))) |
847 | 857 |
848 (defun print-fontset-element (val) | 858 (defun print-fontset-element (val) |
849 ;; VAL has this format: | 859 ;; VAL has this format: |