From 5a376b7d9d80ecaf3e28b2afe0784107fe843267 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 22 Feb 1999 01:59:30 +0000 Subject: [PATCH] (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. --- lisp/simple.el | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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." (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) + (char-table-p + (get encoder 'translation-table))) + (aref (get encoder 'translation-table) char)) + (t + (error "Invalid property in %s" + coding-system))))))) (setq encoding-msg (if external (format "(0%o, %d, 0x%x, ext 0x%x)" -- 2.39.2