aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa1997-08-10 04:07:03 +0000
committerKenichi Handa1997-08-10 04:07:03 +0000
commit5cfcd8bc91b66448bbde3b0213b95129c8f83918 (patch)
treebe274e0d82a8546f7d3236ce86e07ce48989dee3
parent2de6d4470ce134cb92aefc0d7a296a6fd292c3a4 (diff)
downloademacs-5cfcd8bc91b66448bbde3b0213b95129c8f83918.tar.gz
emacs-5cfcd8bc91b66448bbde3b0213b95129c8f83918.zip
(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.
-rw-r--r--lisp/international/mule-diag.el44
1 files changed, 25 insertions, 19 deletions
diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el
index 85df7141788..01757f92029 100644
--- a/lisp/international/mule-diag.el
+++ b/lisp/international/mule-diag.el
@@ -300,15 +300,19 @@ at the place of `..':
300 (princ "\nPriority order for recognizing coding systems when reading files:\n") 300 (princ "\nPriority order for recognizing coding systems when reading files:\n")
301 (let ((l coding-category-list) 301 (let ((l coding-category-list)
302 (i 1) 302 (i 1)
303 (coding-list nil)
303 coding aliases) 304 coding aliases)
304 (while l 305 (while l
305 (setq coding (symbol-value (car l))) 306 (setq coding (symbol-value (car l)))
306 (princ (format " %d. %s" i coding)) 307 (when (not (memq coding coding-list))
307 (when (setq aliases (get coding 'alias-coding-systems)) 308 (setq coding-list (cons coding coding-list))
308 (princ " ") 309 (princ (format " %d. %s" i coding))
309 (princ (cons 'alias: aliases))) 310 (when (setq aliases (get coding 'alias-coding-systems))
310 (terpri) 311 (princ " ")
311 (setq l (cdr l) i (1+ i)))) 312 (princ (cons 'alias: aliases)))
313 (terpri)
314 (setq i (1+ i)))
315 (setq l (cdr l))))
312 (princ "\n Other coding systems cannot be distinguished automatically 316 (princ "\n Other coding systems cannot be distinguished automatically
313 from these, and therefore cannot be recognized automatically 317 from these, and therefore cannot be recognized automatically
314 with the present coding system priorities.\n\n") 318 with the present coding system priorities.\n\n")
@@ -527,20 +531,22 @@ but contains full information about each coding systems."
527 (height (aref fontset-info 1)) 531 (height (aref fontset-info 1))
528 (fonts (and print-fonts (aref fontset-info 2))) 532 (fonts (and print-fonts (aref fontset-info 2)))
529 (xlfd-fields (x-decompose-font-name fontset)) 533 (xlfd-fields (x-decompose-font-name fontset))
530 (weight (aref xlfd-fields xlfd-regexp-weight-subnum))
531 (slant (aref xlfd-fields xlfd-regexp-slant-subnum))
532 style) 534 style)
533 (if (string-match "^bold$\\|^demibold$" weight) 535 (if xlfd-fields
534 (setq style (concat weight " ")) 536 (let ((weight (aref xlfd-fields xlfd-regexp-weight-subnum))
535 (setq style "medium ")) 537 (slant (aref xlfd-fields xlfd-regexp-slant-subnum)))
536 (cond ((string-match "^i$" slant) 538 (if (string-match "^bold$\\|^demibold$" weight)
537 (setq style (concat style "italic"))) 539 (setq style (concat weight " "))
538 ((string-match "^o$" slant) 540 (setq style "medium "))
539 (setq style (concat style "slant"))) 541 (cond ((string-match "^i$" slant)
540 ((string-match "^ri$" slant) 542 (setq style (concat style "italic")))
541 (setq style (concat style "reverse italic"))) 543 ((string-match "^o$" slant)
542 ((string-match "^ro$" slant) 544 (setq style (concat style "slant")))
543 (setq style (concat style "reverse slant")))) 545 ((string-match "^ri$" slant)
546 (setq style (concat style "reverse italic")))
547 ((string-match "^ro$" slant)
548 (setq style (concat style "reverse slant")))))
549 (setq style " ? "))
544 (beginning-of-line) 550 (beginning-of-line)
545 (insert fontset) 551 (insert fontset)
546 (indent-to 58) 552 (indent-to 58)