changeset 100212:8770d8ed68e4

* international/mule-diag.el (list-character-sets): Doc fix. (list-character-sets-2): Fix info in header. Simplify. (print-coding-system): Simplify. (list-input-methods-1): Simplify. (mule-diag): Display current font/fontset for all window systems, not just X. Simplify.
author Juanma Barranquero <lekktu@gmail.com>
date Thu, 04 Dec 2008 15:23:54 +0000
parents 555a00476e3a
children a1639340ea7b
files lisp/ChangeLog lisp/international/mule-diag.el
diffstat 2 files changed, 33 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Dec 04 15:21:53 2008 +0000
+++ b/lisp/ChangeLog	Thu Dec 04 15:23:54 2008 +0000
@@ -1,3 +1,12 @@
+2008-12-04  Juanma Barranquero  <lekktu@gmail.com>
+
+	* international/mule-diag.el (list-character-sets): Doc fix.
+	(list-character-sets-2): Fix info in header.  Simplify.
+	(print-coding-system): Simplify.
+	(list-input-methods-1): Simplify.
+	(mule-diag): Display current font/fontset for all window systems,
+	not just X.  Simplify.
+
 2008-12-04  Glenn Morris  <rgm@gnu.org>
 
 	* vc-cvs.el (vc-cvs-register-switches): Doc fix.  Add t as option.
--- a/lisp/international/mule-diag.el	Thu Dec 04 15:21:53 2008 +0000
+++ b/lisp/international/mule-diag.el	Thu Dec 04 15:23:54 2008 +0000
@@ -63,7 +63,7 @@
 set.  The FINAL-CHAR column contains an ISO-2022 <final-char> to use
 for designating this character set in ISO-2022-based coding systems.
 
-With prefix arg, the output format gets more cryptic,
+With prefix ARG, the output format gets more cryptic,
 but still shows the full information."
   (interactive "P")
   (help-setup-xref (list #'list-character-sets arg) (interactive-p))
@@ -175,25 +175,22 @@
 ## The following attributes are listed in this order
 ## separated by a colon `:' in one line.
 ##	CHARSET-SYMBOL-NAME,
-##	DIMENSION (1 or 2)
-##	CHARS (94 or 96)
+##	DIMENSION (1-4)
+##	CHARS (number of characters in first dimension of charset)
 ##	ISO-FINAL-CHAR (character code of ISO-2022's final character)
 ##		-1 means that no final character is assigned.
 ##	DESCRIPTION (describing string of the charset)
 ")
-  (let ((l charset-list)
-	charset)
-    (while l
-      (setq charset (car l) l (cdr l))
-      (princ (format "%s:%d:%d:%d:%s\n"
-		     charset
-		     (charset-dimension charset)
-		     (charset-chars charset)
-;;;		     (char-width (make-char charset))
-;;; 		     (charset-direction charset)
-		     (charset-iso-final-char charset)
-;;;		     (charset-iso-graphic-plane charset)
-		     (charset-description charset))))))
+  (dolist (charset charset-list)
+    (princ (format "%s:%d:%d:%d:%s\n"
+		   charset
+		   (charset-dimension charset)
+		   (charset-chars charset)
+;;;		   (char-width (make-char charset))
+;;; 		   (charset-direction charset)
+		   (charset-iso-final-char charset)
+;;;		   (charset-iso-graphic-plane charset)
+		   (charset-description charset)))))
 
 (defvar non-iso-charset-alist nil
   "Obsolete.")
@@ -690,11 +687,9 @@
     (if (not (eq (car aliases) coding-system))
 	(princ (format "%s (alias of %s)\n" coding-system (car aliases)))
       (princ coding-system)
-      (setq aliases (cdr aliases))
-      (while aliases
+      (dolist (alias (cdr aliases))
 	(princ ",")
-	(princ (car aliases))
-	(setq aliases (cdr aliases)))
+	(princ alias))
       (princ (format ":%s:%c:%d:"
 		     type
 		     (coding-system-mnemonic coding-system)
@@ -997,19 +992,17 @@
 
 (defun list-input-methods-1 ()
   (if (not input-method-alist)
-      (progn
-	(princ "
+      (princ "
 No input method is available, perhaps because you have not
-installed LEIM (Libraries of Emacs Input Methods)."))
+installed LEIM (Libraries of Emacs Input Methods).")
     (princ "LANGUAGE\n  NAME (`TITLE' in mode line)\n")
     (princ "    SHORT-DESCRIPTION\n------------------------------\n")
     (setq input-method-alist
 	  (sort input-method-alist
 		(lambda (x y) (string< (nth 1 x) (nth 1 y)))))
-    (let ((l input-method-alist)
-	  language elt)
-      (while l
-	(setq elt (car l) l (cdr l))
+
+    (let (language)
+      (dolist (elt input-method-alist)
 	(when (not (equal language (nth 1 elt)))
 	  (setq language (nth 1 elt))
 	  (princ language)
@@ -1020,9 +1013,7 @@
 			 (if (and (consp title) (stringp (car title)))
 			     (car title)
 			   title))
-		       (let ((description (nth 4 elt)))
-			 (string-match ".*" description)
-			 (match-string 0 description))))))))
+		       (nth 4 elt)))))))
 
 ;;; DIAGNOSIS
 
@@ -1072,7 +1063,7 @@
 	(insert "Terminal: " (getenv "TERM")))
       (insert "\n\n")
 
-      (if (eq window-system 'x)
+      (if window-system
 	  (let ((font (cdr (assq 'font (frame-parameters)))))
 	    (insert "The selected frame is using the "
 		    (if (query-fontset font) "fontset" "font")
@@ -1101,10 +1092,8 @@
 	(insert-section 6 "Fontsets")
 	(insert "Fontset-Name\t\t\t\t\t\t  WDxHT Style\n")
 	(insert "------------\t\t\t\t\t\t  ----- -----\n")
-	(let ((fontsets (fontset-list)))
-	  (while fontsets
-	    (print-fontset (car fontsets) t)
-	    (setq fontsets (cdr fontsets)))))
+	(dolist (fontset (fontset-list))
+	  (print-fontset fontset t)))
       (print-help-return-message))))
 
 ;;;###autoload