Commit 5a376b7d authored by Kenichi Handa's avatar Kenichi Handa

(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.
parent bd72be60
......@@ -533,7 +533,20 @@ Each language environment may show different external character components."
(setq slot
(coding-system-get coding-system 'charset-origin-alist))
(setq slot (assq charset slot)))
(setq external (list (nth 1 slot) (funcall (nth 2 slot) char))))
(let ((encoder (nth 2 slot)))
(setq external
(list (nth 1 slot)
(cond ((functionp encoder)
(funcall encoder char))
((char-table-p encoder)
(aref encoder char))
((and (symbolp encoder)
(get encoder 'translation-table)))
(aref (get encoder 'translation-table) char))
(error "Invalid property in %s"
(setq encoding-msg
(if external
(format "(0%o, %d, 0x%x, ext 0x%x)"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment