]> git.eshelyaron.com Git - emacs.git/commitdiff
(describe-char-after): Call
authorKenichi Handa <handa@m17n.org>
Wed, 17 May 2000 23:31:47 +0000 (23:31 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 17 May 2000 23:31:47 +0000 (23:31 +0000)
internal-char-font, not char-font.  If internal-char-font returns
nil, display "-- none --".

lisp/international/mule-diag.el

index 715c98607b8c11e399f1ccf3c376a069cae01437..c4094df5c847dd95f9b0e2438c43f1bde8f26828 100644 (file)
@@ -472,7 +472,14 @@ which font is being used for displaying the character."
         (composed (if composition (buffer-substring (car composition)
                                                     (nth 1 composition))))
         item-list max-width)
-    (unless (eq charset 'unknown)
+    (if (eq charset 'unknown)
+       (setq item-list
+             `(("character"
+                ,(format "%s (0%o, %d, 0x%x) -- invalid character code"
+                         (if (< char 256)
+                             (single-key-description char)
+                           (char-to-string char))
+                         char char char))))
       (setq item-list
            `(("character"
               ,(format "%s (0%o, %d, 0x%x)" (if (< char 256)
@@ -508,44 +515,45 @@ which font is being used for displaying the character."
                     (list "not encodable by coding system"
                           (symbol-name coding)))))
              ,(if window-system
-                  (list "font" (char-font (point)))
+                  (list "font" (or (internal-char-font (point))
+                                   "-- none --"))
                 (list "terminal code"
                       (let* ((coding (terminal-coding-system))
                              (encoded (encode-coding-char char coding)))
                         (if encoded
                             (encoded-string-description encoded coding)
-                          "not encodable"))))))
-      (setq max-width (apply #'max (mapcar #'(lambda (x) (length (car x)))
-                                          item-list)))
-      (with-output-to-temp-buffer "*Help*"
-       (save-excursion
-         (set-buffer standard-output)
-         (let ((formatter (format "%%%ds:" max-width)))
-           (dolist (elt item-list)
-             (insert (format formatter (car elt)))
-             (dolist (clm (cdr elt))
-               (when (>= (+ (current-column) (string-width clm) 1)
-                         (frame-width))
-                 (insert "\n")
-                 (indent-to (1+ max-width)))
-               (insert " " clm))
-             (insert "\n")))
-         (when composition
-           (insert "\nComposed with the following characerter(s) "
-                   (mapconcat (lambda (x) (format "`%c'" x))
-                              (substring composed 1)
-                              ", ")
-                   " to form `" composed "'")
-           (if (nth 3 composition)
-               (insert ".\n")
-             (insert "\nby the rule ("
-                     (mapconcat (lambda (x)
-                                  (format (if (consp x) "%S" "?%c") x))
-                                (nth 2 composition)
-                                " ")
-                     ").\n"
-                     "See the variable `reference-point-alist' for the meaning of the rule.\n")))
-         )))))
+                          "not encodable")))))))
+    (setq max-width (apply #'max (mapcar #'(lambda (x) (length (car x)))
+                                        item-list)))
+    (with-output-to-temp-buffer "*Help*"
+      (save-excursion
+       (set-buffer standard-output)
+       (let ((formatter (format "%%%ds:" max-width)))
+         (dolist (elt item-list)
+           (insert (format formatter (car elt)))
+           (dolist (clm (cdr elt))
+             (when (>= (+ (current-column) (string-width clm) 1)
+                       (frame-width))
+               (insert "\n")
+               (indent-to (1+ max-width)))
+             (insert " " clm))
+           (insert "\n")))
+       (when composition
+         (insert "\nComposed with the following characerter(s) "
+                 (mapconcat (lambda (x) (format "`%c'" x))
+                            (substring composed 1)
+                            ", ")
+                 " to form `" composed "'")
+         (if (nth 3 composition)
+             (insert ".\n")
+           (insert "\nby the rule ("
+                   (mapconcat (lambda (x)
+                                (format (if (consp x) "%S" "?%c") x))
+                              (nth 2 composition)
+                              " ")
+                   ").\n"
+                   "See the variable `reference-point-alist' for the meaning of the rule.\n")))
+       ))))
 
 \f
 ;;; CODING-SYSTEM