comparison lisp/mule/mule-debug.el @ 207:e45d5e7c476e r20-4b2

Import from CVS: tag r20-4b2
author cvs
date Mon, 13 Aug 2007 10:03:52 +0200
parents fe104dbd9147
children 2c611d1463a6
comparison
equal deleted inserted replaced
206:d3e9274cbc4e 207:e45d5e7c476e
70 ; (princ (format " %x" (aref ccl i))) 70 ; (princ (format " %x" (aref ccl i)))
71 ; (setq i (1+ i))) 71 ; (setq i (1+ i)))
72 ; (princ "\n"))))) 72 ; (princ "\n")))))
73 ; (charset-list)) 73 ; (charset-list))
74 ; )) 74 ; ))
75
76 (defun describe-designation (cs register)
77 (let ((charset
78 (coding-system-property
79 cs (intern (format "charset-g%d" register))))
80 (force
81 (coding-system-property
82 cs (intern (format "force-g%d-on-output" register)))))
83 (princ
84 (format
85 " G%d: %s%s\n"
86 register
87 (cond ((null charset) "never used")
88 ((eq t charset) "none")
89 (t (charset-name charset)))
90 (if force " (explicit designation required)" "")))))
91
92 ;;;###autoload
93 (defun describe-coding-system (cs)
94 "Display documentation of the coding-system CS."
95 (interactive "zCoding-system: ")
96 (setq cs (get-coding-system cs))
97 (with-output-to-temp-buffer "*Help*"
98 (princ (format "Coding-system %s [%s]:\n"
99 (coding-system-name cs)
100 (coding-system-mnemonic cs)))
101 (princ (format " %s\n" (coding-system-doc-string cs)))
102 (let ((type (coding-system-type cs)))
103 (princ "Type: ") (princ type) (terpri)
104 (case type
105 ('iso2022
106 (princ "\nInitial designations:\n")
107 (dolist (register '(0 1 2 3))
108 (describe-designation cs register))
109 (princ "\nOther properties: \n")
110 (dolist (prop '(short no-ascii-eol no-ascii-cntl seven lock-shift no-iso6429))
111 (princ (format " %s: " (symbol-name prop)))
112 (princ (coding-system-property cs prop))
113 (terpri)))
114 ;;(princ " short: ") (princ (coding-system-short))
115 ;;(princ (if (aref flags 4) "ShortForm" "LongForm"))
116 ;;(if (aref flags 5) (princ ", ASCII@EOL"))
117 ;;(if (aref flags 6) (princ ", ASCII@CNTL"))
118 ;;(princ (if (coding-system-seven cs) ", 7bit" ", 8bit"))
119 ;;(if (aref flags 8) (princ ", UseLockingShift"))
120 ;;(if (aref flags 9) (princ ", UseRoman"))
121 ;;(if (aref flags 10) (princ ", UseOldJIS"))
122 ;;(if (aref flags 11) (princ ", No ISO6429"))
123 ;;(terpri))
124
125 ('big5
126 ;;(princ (if flags "Big-ETen\n" "Big-HKU\n")))
127 ))
128 (princ (format "\nEOL-Type: %s\n"
129 (case (coding-system-eol-type cs)
130 ('nil "null (= LF)")
131 ('lf "LF")
132 ('crlf "CRLF")
133 ('cr "CR")
134 (t "invalid"))))
135 )))
136 75
137 ;;;###autoload 76 ;;;###autoload
138 (defun list-coding-system-briefly () 77 (defun list-coding-system-briefly ()
139 "Display coding-systems currently used with a brief format in mini-buffer." 78 "Display coding-systems currently used with a brief format in mini-buffer."
140 (interactive) 79 (interactive)