Mercurial > emacs
changeset 19265:6b31dac7f72b
(print-fontset): Don't hang even if a
fontset name doesn't confirm to XLFD.
(describe-current-coding-system): Do not show the same coding
system twice in the list of priority order.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Sun, 10 Aug 1997 04:07:03 +0000 |
parents | 6122dbba797f |
children | a042f26b7a4c |
files | lisp/international/mule-diag.el |
diffstat | 1 files changed, 25 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/international/mule-diag.el Sun Aug 10 04:07:03 1997 +0000 +++ b/lisp/international/mule-diag.el Sun Aug 10 04:07:03 1997 +0000 @@ -300,15 +300,19 @@ (princ "\nPriority order for recognizing coding systems when reading files:\n") (let ((l coding-category-list) (i 1) + (coding-list nil) coding aliases) (while l (setq coding (symbol-value (car l))) - (princ (format " %d. %s" i coding)) - (when (setq aliases (get coding 'alias-coding-systems)) - (princ " ") - (princ (cons 'alias: aliases))) - (terpri) - (setq l (cdr l) i (1+ i)))) + (when (not (memq coding coding-list)) + (setq coding-list (cons coding coding-list)) + (princ (format " %d. %s" i coding)) + (when (setq aliases (get coding 'alias-coding-systems)) + (princ " ") + (princ (cons 'alias: aliases))) + (terpri) + (setq i (1+ i))) + (setq l (cdr l)))) (princ "\n Other coding systems cannot be distinguished automatically from these, and therefore cannot be recognized automatically with the present coding system priorities.\n\n") @@ -527,20 +531,22 @@ (height (aref fontset-info 1)) (fonts (and print-fonts (aref fontset-info 2))) (xlfd-fields (x-decompose-font-name fontset)) - (weight (aref xlfd-fields xlfd-regexp-weight-subnum)) - (slant (aref xlfd-fields xlfd-regexp-slant-subnum)) style) - (if (string-match "^bold$\\|^demibold$" weight) - (setq style (concat weight " ")) - (setq style "medium ")) - (cond ((string-match "^i$" slant) - (setq style (concat style "italic"))) - ((string-match "^o$" slant) - (setq style (concat style "slant"))) - ((string-match "^ri$" slant) - (setq style (concat style "reverse italic"))) - ((string-match "^ro$" slant) - (setq style (concat style "reverse slant")))) + (if xlfd-fields + (let ((weight (aref xlfd-fields xlfd-regexp-weight-subnum)) + (slant (aref xlfd-fields xlfd-regexp-slant-subnum))) + (if (string-match "^bold$\\|^demibold$" weight) + (setq style (concat weight " ")) + (setq style "medium ")) + (cond ((string-match "^i$" slant) + (setq style (concat style "italic"))) + ((string-match "^o$" slant) + (setq style (concat style "slant"))) + ((string-match "^ri$" slant) + (setq style (concat style "reverse italic"))) + ((string-match "^ro$" slant) + (setq style (concat style "reverse slant"))))) + (setq style " ? ")) (beginning-of-line) (insert fontset) (indent-to 58)