;;; mule-diag.el --- show diagnosis of multilingual environment (Mule)
-;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2000-2012 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008
+;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
;; Copyright (C) 2003
;;; Code:
;; Make sure the help-xref button type is defined.
-(require 'help-fns)
+(require 'help-mode)
;;; General utility function
(defun print-list (&rest args)
"Print all arguments with single space separator in one line."
- (while (cdr args)
- (when (car args)
- (princ (car args))
- (princ " "))
- (setq args (cdr args)))
- (princ (car args))
+ (princ (mapconcat (lambda (arg) (prin1-to-string arg t)) args " "))
(princ "\n"))
;;; CHARSET
The D column contains the dimension of this character set. The CH
column contains the number of characters in a block of this character
-set. The FINAL-CHAR column contains an ISO-2022 <final-char> to use
-for designating this character set in ISO-2022-based coding systems.
+set. The FINAL-BYTE column contains an ISO-2022 <final-byte> to use
+in the designation escape sequence for 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))
+ (help-setup-xref (list #'list-character-sets arg)
+ (called-interactively-p 'interactive))
(with-output-to-temp-buffer "*Character Set List*"
(with-current-buffer standard-output
(if arg
(indent-to 48)
(insert "| +--CHARS\n")
(let ((columns '(("CHARSET-NAME" . name) "\t\t\t\t\t"
- ("D CH FINAL-CHAR" . iso-spec)))
+ ("D CH FINAL-BYTE" . iso-spec)))
pos)
(while columns
(if (stringp (car columns))
;; Insert information of character sets.
(dolist (elt (append charset-info-list (list t) supplementary-list))
(if (eq elt t)
- (insert "-------------- Supplementary Character Sets --------------")
+ (progn
+ (insert "\n-------------- ")
+ (insert-text-button "Supplementary Character Sets"
+ 'type 'help-info
+ 'help-args '("(emacs)Charsets"))
+ (insert " --------------
+Character sets for defining other charsets, or for backward compatibility
+"))
(insert-text-button (symbol-name (car elt)) ; NAME
:type 'list-charset-chars
'help-args (list (car elt)))
## 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.")
Optional arguments are DEFAULT-VALUE and INITIAL-INPUT.
DEFAULT-VALUE, if non-nil, is the default value.
INITIAL-INPUT, if non-nil, is a string inserted in the minibuffer initially.
-See the documentation of the function `completing-read' for the
-detailed meanings of these arguments."
+See the documentation of the function `completing-read' for the detailed
+meanings of these arguments."
(let* ((table (mapcar (lambda (x) (list (symbol-name x))) charset-list))
(charset (completing-read prompt table
nil t initial-input 'charset-history
(interactive (list (read-charset "Charset: ")))
(or (charsetp charset)
(error "Invalid charset: %S" charset))
- (help-setup-xref (list #'describe-character-set charset) (interactive-p))
+ (help-setup-xref (list #'describe-character-set charset)
+ (called-interactively-p 'interactive))
(with-output-to-temp-buffer (help-buffer)
(with-current-buffer standard-output
(insert "Character set: " (symbol-name charset))
(when (> char 0)
(insert "Final char of ISO2022 designation sequence: ")
(insert (format "`%c'\n" char))))
- (insert (format "Width (how many columns on screen): %d\n"
- (aref char-width-table (make-char charset))))
(let (aliases)
(dolist (c charset-list)
(if (and (not (eq c charset))
(when val
(if (cadr elt) (insert (cadr elt)))
(if (nth 2 elt)
- (insert (funcall (nth 2 elt) val)))
+ (let ((print-length 10) (print-level 2))
+ (princ (funcall (nth 2 elt) val) (current-buffer))))
(insert ?\n)))))))
\f
;;; CODING-SYSTEM
-(eval-when-compile ; dynamic bondage
- (defvar graphic-register))
+(defvar graphic-register) ; dynamic bondage
;; Print information about designation of each graphic register in
;; DESIGNATIONS in human readable format. See the documentation of
(if (null coding-system)
(describe-current-coding-system)
(help-setup-xref (list #'describe-coding-system coding-system)
- (interactive-p))
+ (called-interactively-p 'interactive))
(with-output-to-temp-buffer (help-buffer)
(print-coding-system-briefly coding-system 'doc-string)
(let ((type (coding-system-type coding-system))
(princ " (text with random binary characters)"))
((eq type 'emacs-mule)
(princ " (Emacs 21 internal encoding)"))
+ ((eq type 'big5))
(t (princ ": invalid coding-system.")))
(princ "\nEOL type: ")
(let ((eol-type (coding-system-eol-type coding-system)))
eol-type of `process-coding-system' for read (of the current buffer, if any)
`process-coding-system' for write (of the current buffer, if any)
eol-type of `process-coding-system' for write (of the current buffer, if any)
- `default-buffer-file-coding-system'
- eol-type of `default-buffer-file-coding-system'
+ default `buffer-file-coding-system'
+ eol-type of default `buffer-file-coding-system'
`default-process-coding-system' for read
eol-type of `default-process-coding-system' for read
`default-process-coding-system' for write
(coding-system-eol-type-mnemonic (car process-coding-systems))
(coding-system-mnemonic (cdr process-coding-systems))
(coding-system-eol-type-mnemonic (cdr process-coding-systems))
- (coding-system-mnemonic default-buffer-file-coding-system)
- (coding-system-eol-type-mnemonic default-buffer-file-coding-system)
+ (coding-system-mnemonic (default-value 'buffer-file-coding-system))
+ (coding-system-eol-type-mnemonic
+ (default-value 'buffer-file-coding-system))
(coding-system-mnemonic (car default-process-coding-system))
(coding-system-eol-type-mnemonic (car default-process-coding-system))
(coding-system-mnemonic (cdr default-process-coding-system))
(print-coding-system-briefly buffer-file-coding-system)
(princ "Not set locally, use the default.\n"))
(princ "Default coding system (for new files):\n ")
- (print-coding-system-briefly default-buffer-file-coding-system)
+ (print-coding-system-briefly (default-value 'buffer-file-coding-system))
(princ "Coding system for keyboard input:\n ")
(print-coding-system-briefly (keyboard-coding-system))
(princ "Coding system for terminal output:\n ")
(print-coding-system-briefly (terminal-coding-system))
- (princ "Coding system for inter-client cut and paste:\n ")
- (print-coding-system-briefly selection-coding-system)
+ (when (boundp 'selection-coding-system)
+ (princ "Coding system for inter-client cut and paste:\n ")
+ (print-coding-system-briefly selection-coding-system))
(when (get-buffer-process (current-buffer))
(princ "Coding systems for process I/O:\n")
(princ " encoding input to the process: ")
(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)
"Display a list of all coding systems.
This shows the mnemonic letter, name, and description of each coding system.
-With prefix arg, the output format gets more cryptic,
+With prefix ARG, the output format gets more cryptic,
but still contains full information about each coding system."
(interactive "P")
(with-output-to-temp-buffer "*Help*"
\f
;;; FONT
-(defun describe-font-internal (font-info &optional verbose)
- "Print information about a font in FONT-INFO."
+(declare-function font-info "font.c" (name &optional frame))
+
+(defun describe-font-internal (font-info &optional ignored)
+ "Print information about a font in FONT-INFO.
+The IGNORED argument is ignored."
(print-list "name (opened by):" (aref font-info 0))
(print-list " full name:" (aref font-info 1))
(print-list " size:" (format "%2d" (aref font-info 2)))
(interactive "sFont name (default current choice for ASCII chars): ")
(or (and window-system (fboundp 'fontset-list))
(error "No fonts being used"))
- (let (fontset font-info)
- (when (or (not fontname) (= (length fontname) 0))
- (setq fontname (frame-parameter nil 'font))
- ;; Check if FONTNAME is a fontset.
- (if (query-fontset fontname)
- (setq fontset fontname
- fontname (nth 1 (assq 'ascii
- (aref (fontset-info fontname) 2))))))
+ (let (font-info)
+ (if (or (not fontname) (= (length fontname) 0))
+ (setq fontname (face-attribute 'default :font)))
(setq font-info (font-info fontname))
(if (null font-info)
- (if fontset
+ (if (fontp fontname 'font-object)
;; The font should be surely used. So, there's some
;; problem about getting information about it. It is
;; better to print the fontname to show which font has
;; this problem.
- (message "No information about \"%s\"" fontname)
- (message "No matching font being used"))
+ (message "No information about \"%s\"" (font-xlfd-name fontname))
+ (message "No matching font found"))
(with-output-to-temp-buffer "*Help*"
- (describe-font-internal font-info 'verbose)))))
+ (describe-font-internal font-info)))))
(defun print-fontset-element (val)
;; VAL has this format:
(dolist (opened (cdr elt))
(insert "\n\t[" opened "]")))))))
+(declare-function query-fontset "fontset.c" (pattern &optional regexpp))
+(declare-function fontset-info "fontset.c" (fontset &optional frame))
+
(defun print-fontset (fontset &optional print-opened)
"Print information about FONTSET.
-If FONTSET is nil, print information about the default fontset.
+FONTSET nil means the fontset of the selected frame, t means the
+default fontset.
If optional arg PRINT-OPENED is non-nil, also print names of all opened
fonts for FONTSET. This function actually inserts the information in
the current buffer."
- (or fontset
- (setq fontset (query-fontset "fontset-default")))
+ (if (eq fontset t)
+ (setq fontset (query-fontset "fontset-default"))
+ (if (eq fontset nil)
+ (setq fontset (face-attribute 'default :fontset))))
(beginning-of-line)
+ (narrow-to-region (point) (point))
(insert "Fontset: " fontset "\n")
(insert (propertize "CHAR RANGE" 'face 'underline)
" (" (propertize "CODE RANGE" 'face 'underline) ")\n")
(insert " " (propertize "FONT NAME" 'face 'underline)
" (" (propertize "REQUESTED" 'face 'underline)
" and [" (propertize "OPENED" 'face 'underline) "])")
- (let ((info (fontset-info fontset)))
+ (let* ((info (fontset-info fontset))
+ (default-info (char-table-extra-slot info 0))
+ start1 end1 start2 end2)
(describe-vector info 'print-fontset-element)
- (insert "\n ---<fallback to the default fontset>---")
- (describe-vector (char-table-extra-slot info 0) 'print-fontset-element)))
+ (when (char-table-range info nil)
+ ;; The default of FONTSET is described.
+ (setq start1 (re-search-backward "^default"))
+ (delete-region (point) (line-end-position))
+ (insert "\n ---<fallback to the default of the specified fontset>---")
+ (put-text-property (line-beginning-position) (point) 'face 'highlight)
+ (goto-char (point-max))
+ (setq end1 (setq start2 (point))))
+ (when default-info
+ (insert "\n ---<fallback to the default fontset>---")
+ (put-text-property (line-beginning-position) (point) 'face 'highlight)
+ (describe-vector default-info 'print-fontset-element)
+ (when (char-table-range default-info nil)
+ ;; The default of the default fontset is described.
+ (setq end2 (re-search-backward "^default"))
+ (delete-region (point) (line-end-position))
+ (insert "\n ---<fallback to the default of the default fontset>---")
+ (put-text-property (line-beginning-position) (point) 'face 'highlight)))
+ (if (and start1 end2)
+ ;; Reorder the printed information to match with the font
+ ;; searching strategy; i.e. FONTSET, the default fontset,
+ ;; default of FONTSET, default of the default fontset.
+ (transpose-regions start1 end1 start2 end2))
+ (goto-char (point-max)))
+ (widen))
+
+(defvar fontset-alias-alist)
+(declare-function fontset-list "fontset.c" ())
;;;###autoload
(defun describe-fontset (fontset)
"Fontset (default used by the current frame): "
fontset-list nil t)))))
(if (= (length fontset) 0)
- (setq fontset (frame-parameter nil 'font)))
- (setq fontset (query-fontset fontset))
- (help-setup-xref (list #'describe-fontset fontset) (interactive-p))
+ (setq fontset (face-attribute 'default :fontset))
+ (setq fontset (query-fontset fontset)))
+ (help-setup-xref (list #'describe-fontset fontset)
+ (called-interactively-p 'interactive))
(with-output-to-temp-buffer (help-buffer)
(with-current-buffer standard-output
(print-fontset fontset t))))
+(declare-function fontset-plain-name "fontset" (fontset))
+
;;;###autoload
(defun list-fontsets (arg)
"Display a list of all fontsets.
(interactive "P")
(if (not (and window-system (fboundp 'fontset-list)))
(error "No fontsets being used")
- (help-setup-xref (list #'list-fontsets arg) (interactive-p))
+ (help-setup-xref (list #'list-fontsets arg)
+ (called-interactively-p 'interactive))
(with-output-to-temp-buffer (help-buffer)
(with-current-buffer standard-output
;; This code is duplicated near the end of mule-diag.
(defun list-input-methods ()
"Display information about all input methods."
(interactive)
- (help-setup-xref '(list-input-methods) (interactive-p))
+ (help-setup-xref '(list-input-methods)
+ (called-interactively-p 'interactive))
(with-output-to-temp-buffer (help-buffer)
(list-input-methods-1)
(with-current-buffer standard-output
(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)
(if (and (consp title) (stringp (car title)))
(car title)
title))
- (let ((description (nth 4 elt)))
- (string-match ".*" description)
- (match-string 0 description))))))))
+ ;; If the doc is multi-line, indent all
+ ;; non-blank lines. (Bug#8066)
+ (replace-regexp-in-string "\n\\(.\\)" "\n \\1"
+ (or (nth 4 elt) ""))))))))
\f
;;; DIAGNOSIS
(insert "Version of this emacs:\n " (emacs-version) "\n\n")
(insert "Configuration options:\n " system-configuration-options "\n\n")
(insert "Multibyte characters awareness:\n"
- (format " default: %S\n" default-enable-multibyte-characters)
+ (format " default: %S\n" (default-value
+ 'enable-multibyte-characters))
(format " current-buffer: %S\n\n" enable-multibyte-characters))
(insert "Current language environment: " current-language-environment
"\n\n")
(insert-section 2 "Display")
(if window-system
- (insert "Window-system: "
- (symbol-name window-system)
- (format "%s" window-system-version))
+ (insert (format "Window-system: %s, version %s"
+ window-system window-system-version))
(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")
- ":\n\t" font))
+ (insert "The font and fontset of the selected frame are:\n"
+ " font: " font "\n"
+ " fontset: " (face-attribute 'default :fontset) "\n"))
(insert "Coding system of the terminal: "
(symbol-name (terminal-coding-system))))
(insert "\n\n")
(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)))))
- (print-help-return-message))))
+ (dolist (fontset (fontset-list))
+ (print-fontset fontset t)
+ (insert "\n")))
+ (help-print-return-message))))
;;;###autoload
-(defcustom unicodedata-file nil
- "Location of UnicodeData file.
-This is the UnicodeData.txt file from the Unicode consortium, used for
-diagnostics. If it is non-nil `describe-char-after' will print data
-looked up from it."
- :group 'mule
- :type '(choice (const :tag "None" nil)
- file))
-
-;; We could convert the unidata file into a Lispy form once-for-all
-;; and distribute it for loading on demand. It might be made more
-;; space-efficient by splitting strings word-wise and replacing them
-;; with lists of symbols interned in a private obarray, e.g.
-;; "LATIN SMALL LETTER A" => '(LATIN SMALL LETTER A).
+(defun font-show-log (&optional limit)
+ "Show log of font listing and opening.
+Prefix arg LIMIT says how many fonts to show for each listing.
+The default is 20. If LIMIT is negative, do not limit the listing."
+ (interactive "P")
+ (setq limit (if limit (prefix-numeric-value limit) 20))
+ (if (eq font-log t)
+ (message "Font logging is currently suppressed")
+ (with-output-to-temp-buffer "*Help*"
+ (set-buffer standard-output)
+ (dolist (elt (reverse font-log))
+ (insert (format "%s: %s\n" (car elt) (cadr elt)))
+ (setq elt (nth 2 elt))
+ (if (or (vectorp elt) (listp elt))
+ (let ((i 0))
+ (catch 'tag
+ (mapc #'(lambda (x)
+ (setq i (1+ i))
+ (when (= i limit)
+ (insert " ...\n")
+ (throw 'tag nil))
+ (insert (format " %s\n" x)))
+ elt)))
+ (insert (format " %s\n" elt)))))))
-;;;###autoload
-(defun unicode-data (char)
- "Return a list of Unicode data for unicode CHAR.
-Each element is a list of a property description and the property value.
-The list is null if CHAR isn't found in `unicodedata-file'."
- (when unicodedata-file
- (unless (file-exists-p unicodedata-file)
- (error "`unicodedata-file' %s not found" unicodedata-file))
- (save-excursion
- (set-buffer (find-file-noselect unicodedata-file t t))
- (goto-char (point-min))
- (let ((hex (format "%04X" char))
- found first last)
- (if (re-search-forward (concat "^" hex) nil t)
- (setq found t)
- ;; It's not listed explicitly. Look for ranges, e.g. CJK
- ;; ideographs, and check whether it's in one of them.
- (while (and (re-search-forward "^\\([^;]+\\);[^;]+First>;" nil t)
- (>= char (setq first
- (string-to-number (match-string 1) 16)))
- (progn
- (forward-line 1)
- (looking-at "^\\([^;]+\\);[^;]+Last>;")
- (> char
- (setq last
- (string-to-number (match-string 1) 16))))))
- (if (and (>= char first)
- (<= char last))
- (setq found t)))
- (if found
- (let ((fields (mapcar (lambda (elt)
- (if (> (length elt) 0)
- elt))
- (cdr (split-string
- (buffer-substring
- (line-beginning-position)
- (line-end-position))
- ";")))))
- ;; The length depends on whether the last field was empty.
- (unless (or (= 13 (length fields))
- (= 14 (length fields)))
- (error "Invalid contents in %s" unicodedata-file))
- ;; The field names and values lists are slightly
- ;; modified from Mule-UCS unidata.el.
- (list
- (list "Name" (let ((name (nth 0 fields)))
- ;; Check for <..., First>, <..., Last>
- (if (string-match "\\`\\(<[^,]+\\)," name)
- (concat (match-string 1 name) ">")
- name)))
- (list "Category"
- (cdr (assoc
- (nth 1 fields)
- '(("Lu" . "uppercase letter")
- ("Ll" . "lowercase letter")
- ("Lt" . "titlecase letter")
- ("Mn" . "non-spacing mark")
- ("Mc" . "spacing-combining mark")
- ("Me" . "enclosing mark")
- ("Nd" . "decimal digit")
- ("Nl" . "letter number")
- ("No" . "other number")
- ("Zs" . "space separator")
- ("Zl" . "line separator")
- ("Zp" . "paragraph separator")
- ("Cc" . "other control")
- ("Cf" . "other format")
- ("Cs" . "surrogate")
- ("Co" . "private use")
- ("Cn" . "not assigned")
- ("Lm" . "modifier letter")
- ("Lo" . "other letter")
- ("Pc" . "connector punctuation")
- ("Pd" . "dash punctuation")
- ("Ps" . "open punctuation")
- ("Pe" . "close punctuation")
- ("Pi" . "initial-quotation punctuation")
- ("Pf" . "final-quotation punctuation")
- ("Po" . "other punctuation")
- ("Sm" . "math symbol")
- ("Sc" . "currency symbol")
- ("Sk" . "modifier symbol")
- ("So" . "other symbol")))))
- (list "Combining class"
- (cdr (assoc
- (string-to-number (nth 2 fields))
- '((0 . "Spacing")
- (1 . "Overlays and interior")
- (7 . "Nuktas")
- (8 . "Hiragana/Katakana voicing marks")
- (9 . "Viramas")
- (10 . "Start of fixed position classes")
- (199 . "End of fixed position classes")
- (200 . "Below left attached")
- (202 . "Below attached")
- (204 . "Below right attached")
- (208 . "Left attached (reordrant around \
-single base character)")
- (210 . "Right attached")
- (212 . "Above left attached")
- (214 . "Above attached")
- (216 . "Above right attached")
- (218 . "Below left")
- (220 . "Below")
- (222 . "Below right")
- (224 . "Left (reordrant around single base \
-character)")
- (226 . "Right")
- (228 . "Above left")
- (230 . "Above")
- (232 . "Above right")
- (233 . "Double below")
- (234 . "Double above")
- (240 . "Below (iota subscript)")))))
- (list "Bidi category"
- (cdr (assoc
- (nth 3 fields)
- '(("L" . "Left-to-Right")
- ("LRE" . "Left-to-Right Embedding")
- ("LRO" . "Left-to-Right Override")
- ("R" . "Right-to-Left")
- ("AL" . "Right-to-Left Arabic")
- ("RLE" . "Right-to-Left Embedding")
- ("RLO" . "Right-to-Left Override")
- ("PDF" . "Pop Directional Format")
- ("EN" . "European Number")
- ("ES" . "European Number Separator")
- ("ET" . "European Number Terminator")
- ("AN" . "Arabic Number")
- ("CS" . "Common Number Separator")
- ("NSM" . "Non-Spacing Mark")
- ("BN" . "Boundary Neutral")
- ("B" . "Paragraph Separator")
- ("S" . "Segment Separator")
- ("WS" . "Whitespace")
- ("ON" . "Other Neutrals")))))
- (list "Decomposition"
- (if (nth 4 fields)
- (let* ((parts (split-string (nth 4 fields)))
- (info (car parts)))
- (if (string-match "\\`<\\(.+\\)>\\'" info)
- (setq info (match-string 1 info))
- (setq info nil))
- (if info (setq parts (cdr parts)))
- (setq parts (mapconcat
- (lambda (arg)
- (string (string-to-number arg 16)))
- parts " "))
- (concat info parts))))
- (list "Decimal digit value"
- (nth 5 fields))
- (list "Digit value"
- (nth 6 fields))
- (list "Numeric value"
- (nth 7 fields))
- (list "Mirrored"
- (if (equal "Y" (nth 8 fields))
- "yes"))
- (list "Old name" (nth 9 fields))
- (list "ISO 10646 comment" (nth 10 fields))
- (list "Uppercase" (and (nth 11 fields)
- (string (string-to-number
- (nth 11 fields) 16))))
- (list "Lowercase" (and (nth 12 fields)
- (string (string-to-number
- (nth 12 fields) 16))))
- (list "Titlecase" (and (nth 13 fields)
- (string (string-to-number
- (nth 13 fields) 16)))))))))))
(provide 'mule-diag)
-;; arch-tag: cd3b607c-2893-45a0-a4fa-a6535754dbee
;;; mule-diag.el ends here