]> git.eshelyaron.com Git - emacs.git/commitdiff
(print-fontset): Don't hang even if a
authorKenichi Handa <handa@m17n.org>
Sun, 10 Aug 1997 04:07:03 +0000 (04:07 +0000)
committerKenichi Handa <handa@m17n.org>
Sun, 10 Aug 1997 04:07:03 +0000 (04:07 +0000)
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.

lisp/international/mule-diag.el

index 85df7141788a8f4ea808a75352fb57abffa7cf25..01757f9202970263e2e73618f64175c2f7834a59 100644 (file)
@@ -300,15 +300,19 @@ at the place of `..':
       (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 @@ but contains full information about each coding systems."
         (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)