From: Kenichi Handa Date: Mon, 22 Feb 1999 01:59:30 +0000 (+0000) Subject: (what-cursor-position): charset-origin-alist property X-Git-Tag: emacs-20.4~577 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5a376b7d9d80ecaf3e28b2afe0784107fe843267;p=emacs.git (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. --- 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)"