aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2000-05-17 23:31:47 +0000
committerKenichi Handa2000-05-17 23:31:47 +0000
commitc151654a5a25d76b3fc031e889142176e7ae58b2 (patch)
tree59ada5cbc1cb951e2506f5623041805960c40ce0
parent1ff005e1ed4bc9847924b466ca030007060ad05d (diff)
downloademacs-c151654a5a25d76b3fc031e889142176e7ae58b2.tar.gz
emacs-c151654a5a25d76b3fc031e889142176e7ae58b2.zip
(describe-char-after): Call
internal-char-font, not char-font. If internal-char-font returns nil, display "-- none --".
-rw-r--r--lisp/international/mule-diag.el76
1 files changed, 42 insertions, 34 deletions
diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el
index 715c98607b8..c4094df5c84 100644
--- a/lisp/international/mule-diag.el
+++ b/lisp/international/mule-diag.el
@@ -472,7 +472,14 @@ which font is being used for displaying the character."
472 (composed (if composition (buffer-substring (car composition) 472 (composed (if composition (buffer-substring (car composition)
473 (nth 1 composition)))) 473 (nth 1 composition))))
474 item-list max-width) 474 item-list max-width)
475 (unless (eq charset 'unknown) 475 (if (eq charset 'unknown)
476 (setq item-list
477 `(("character"
478 ,(format "%s (0%o, %d, 0x%x) -- invalid character code"
479 (if (< char 256)
480 (single-key-description char)
481 (char-to-string char))
482 char char char))))
476 (setq item-list 483 (setq item-list
477 `(("character" 484 `(("character"
478 ,(format "%s (0%o, %d, 0x%x)" (if (< char 256) 485 ,(format "%s (0%o, %d, 0x%x)" (if (< char 256)
@@ -508,44 +515,45 @@ which font is being used for displaying the character."
508 (list "not encodable by coding system" 515 (list "not encodable by coding system"
509 (symbol-name coding))))) 516 (symbol-name coding)))))
510 ,(if window-system 517 ,(if window-system
511 (list "font" (char-font (point))) 518 (list "font" (or (internal-char-font (point))
519 "-- none --"))
512 (list "terminal code" 520 (list "terminal code"
513 (let* ((coding (terminal-coding-system)) 521 (let* ((coding (terminal-coding-system))
514 (encoded (encode-coding-char char coding))) 522 (encoded (encode-coding-char char coding)))
515 (if encoded 523 (if encoded
516 (encoded-string-description encoded coding) 524 (encoded-string-description encoded coding)
517 "not encodable")))))) 525 "not encodable")))))))
518 (setq max-width (apply #'max (mapcar #'(lambda (x) (length (car x))) 526 (setq max-width (apply #'max (mapcar #'(lambda (x) (length (car x)))
519 item-list))) 527 item-list)))
520 (with-output-to-temp-buffer "*Help*" 528 (with-output-to-temp-buffer "*Help*"
521 (save-excursion 529 (save-excursion
522 (set-buffer standard-output) 530 (set-buffer standard-output)
523 (let ((formatter (format "%%%ds:" max-width))) 531 (let ((formatter (format "%%%ds:" max-width)))
524 (dolist (elt item-list) 532 (dolist (elt item-list)
525 (insert (format formatter (car elt))) 533 (insert (format formatter (car elt)))
526 (dolist (clm (cdr elt)) 534 (dolist (clm (cdr elt))
527 (when (>= (+ (current-column) (string-width clm) 1) 535 (when (>= (+ (current-column) (string-width clm) 1)
528 (frame-width)) 536 (frame-width))
529 (insert "\n") 537 (insert "\n")
530 (indent-to (1+ max-width))) 538 (indent-to (1+ max-width)))
531 (insert " " clm)) 539 (insert " " clm))
532 (insert "\n"))) 540 (insert "\n")))
533 (when composition 541 (when composition
534 (insert "\nComposed with the following characerter(s) " 542 (insert "\nComposed with the following characerter(s) "
535 (mapconcat (lambda (x) (format "`%c'" x)) 543 (mapconcat (lambda (x) (format "`%c'" x))
536 (substring composed 1) 544 (substring composed 1)
537 ", ") 545 ", ")
538 " to form `" composed "'") 546 " to form `" composed "'")
539 (if (nth 3 composition) 547 (if (nth 3 composition)
540 (insert ".\n") 548 (insert ".\n")
541 (insert "\nby the rule (" 549 (insert "\nby the rule ("
542 (mapconcat (lambda (x) 550 (mapconcat (lambda (x)
543 (format (if (consp x) "%S" "?%c") x)) 551 (format (if (consp x) "%S" "?%c") x))
544 (nth 2 composition) 552 (nth 2 composition)
545 " ") 553 " ")
546 ").\n" 554 ").\n"
547 "See the variable `reference-point-alist' for the meaning of the rule.\n"))) 555 "See the variable `reference-point-alist' for the meaning of the rule.\n")))
548 ))))) 556 ))))
549 557
550 558
551;;; CODING-SYSTEM 559;;; CODING-SYSTEM