# HG changeset patch # User Kenichi Handa # Date 919648770 0 # Node ID 2f9d6ac5d4269d931727e6d60e98007a686c13fc # Parent 766feaa457a98de9f0e8d9cd726bdc26fb781dfd (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 -r 766feaa457a9 -r 2f9d6ac5d426 lisp/simple.el --- a/lisp/simple.el Mon Feb 22 01:59:01 1999 +0000 +++ b/lisp/simple.el Mon Feb 22 01:59:30 1999 +0000 @@ -533,7 +533,20 @@ (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)"