aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa1999-02-22 01:59:30 +0000
committerKenichi Handa1999-02-22 01:59:30 +0000
commit5a376b7d9d80ecaf3e28b2afe0784107fe843267 (patch)
tree23a87729d3c5a15a6900a48d83f8394d26c154eb
parentbd72be60b4a9dfb84bfc090cf1c9f98fc7ea6f89 (diff)
downloademacs-5a376b7d9d80ecaf3e28b2afe0784107fe843267.tar.gz
emacs-5a376b7d9d80ecaf3e28b2afe0784107fe843267.zip
(what-cursor-position): charset-origin-alist property
of a coding system may be a translation table or a symbol of which `translation-table' property is a translation table.
-rw-r--r--lisp/simple.el15
1 files changed, 14 insertions, 1 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 18f8bc9a4b9..ce4effbe709 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -533,7 +533,20 @@ Each language environment may show different external character components."
533 (setq slot 533 (setq slot
534 (coding-system-get coding-system 'charset-origin-alist)) 534 (coding-system-get coding-system 'charset-origin-alist))
535 (setq slot (assq charset slot))) 535 (setq slot (assq charset slot)))
536 (setq external (list (nth 1 slot) (funcall (nth 2 slot) char)))) 536 (let ((encoder (nth 2 slot)))
537 (setq external
538 (list (nth 1 slot)
539 (cond ((functionp encoder)
540 (funcall encoder char))
541 ((char-table-p encoder)
542 (aref encoder char))
543 ((and (symbolp encoder)
544 (char-table-p
545 (get encoder 'translation-table)))
546 (aref (get encoder 'translation-table) char))
547 (t
548 (error "Invalid property in %s"
549 coding-system)))))))
537 (setq encoding-msg 550 (setq encoding-msg
538 (if external 551 (if external
539 (format "(0%o, %d, 0x%x, ext 0x%x)" 552 (format "(0%o, %d, 0x%x, ext 0x%x)"