]> code.delx.au - gnu-emacs/blobdiff - lisp/descr-text.el
* proced.el (proced-tree-flag): Fix typo in docstring.
[gnu-emacs] / lisp / descr-text.el
index 13f97303783c7ad4ee554b992594bc239ad20c83..f7bf647d15108aa237eecbcf1db7a88c1e5e2d49 100644 (file)
@@ -180,13 +180,14 @@ otherwise."
        (describe-property-list properties)))))
 \f
 (defcustom describe-char-unidata-list
-  '(name general-category decomposition old-name)
+  '(name old-name general-category decomposition)
   "List of Unicode-based character property names shown by `describe-char'."
   :group 'mule
   :version "23.1"
   :type '(choice (const :tag "All properties" t)
           (set
            (const :tag "Unicode Name" name)
+           (const :tag "Unicode old name" old-name)
            (const :tag "Unicode general category " general-category)
            (const :tag "Unicode canonical combining class"
                   canonical-combining-class)
@@ -196,7 +197,6 @@ otherwise."
            (const :tag "Unicode digit value" digit-value)
            (const :tag "Unicode numeric value" numeric-value)
            (const :tag "Unicode mirrored" mirrored)
-           (const :tag "Unicode old name" old-name)
            (const :tag "Unicode ISO 10646 comment" iso-10646-comment)
            (const :tag "Unicode simple uppercase mapping" uppercase)
            (const :tag "Unicode simple lowercase mapping" lowercase)
@@ -601,14 +601,28 @@ as well as widgets, buttons, overlays, and text properties."
                        "\"")))
          (if (and (vectorp (nth 2 composition))
                   (vectorp (aref (nth 2 composition) 0)))
-             (let ((font (aref (aref (nth 2 composition) 0) 0)))
-               (insert " using this font:\n  "
-                       (symbol-name (font-get font :type))
-                       ?:
-                       (aref (query-font font) 0)
-                       "\nby these glyphs:\n")
-               (mapc (lambda (x) (insert (format "  %S\n" x)))
-                     (nth 2 composition)))
+             (let* ((gstring (nth 2 composition))
+                    (font (lgstring-font gstring))
+                    (nglyphs (lgstring-glyph-len gstring))
+                    (i 0)
+                    glyph)
+               (if font
+                   (progn
+                     (insert " using this font:\n  "
+                             (symbol-name (font-get font :type))
+                             ?:
+                             (aref (query-font font) 0)
+                             "\nby these glyphs:\n")
+                     (while (and (< i nglyphs)
+                                 (setq glyph (lgstring-glyph gstring i)))
+                       (insert (format "  %S\n" glyph))
+                       (setq i (1+ i))))
+                 (insert " by these characters:\n")
+                 (while (and (< i nglyphs)
+                             (setq glyph (lgstring-glyph gstring i)))
+                   (insert (format " %c (#x%d)\n"
+                                   (lglyph-char glyph) (lglyph-char glyph)))
+                   (setq i (1+ i)))))
            (insert " by the rule:\n\t(")
            (let ((first t))
              (mapc (lambda (x)