]> git.eshelyaron.com Git - emacs.git/commitdiff
(what-cursor-position): charset-origin-alist property
authorKenichi Handa <handa@m17n.org>
Mon, 22 Feb 1999 01:59:30 +0000 (01:59 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 22 Feb 1999 01:59:30 +0000 (01:59 +0000)
of a coding system may be a translation table or a symbol of which
`translation-table' property is a translation table.

lisp/simple.el

index 18f8bc9a4b949205ebc0d546d6c90e5f07c63d7b..ce4effbe709a2ba55ce4954e2f99354d0a39364b 100644 (file)
@@ -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)"