[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/descr-text.el,v

From: Kenichi Handa
Subject: [Emacs-diffs] Changes to emacs/lisp/descr-text.el,v
Date: Fri, 01 Aug 2008 12:47:44 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Kenichi Handa <handa>   08/08/01 12:47:44

Index: descr-text.el
RCS file: /cvsroot/emacs/emacs/lisp/descr-text.el,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -b -r1.68 -r1.69
--- descr-text.el       25 Jul 2008 12:01:59 -0000      1.68
+++ descr-text.el       1 Aug 2008 12:47:44 -0000       1.69
@@ -341,10 +341,11 @@
                   (format "%s:%s (#x%02X)" type name code)
                 (format "%s:%s (#x%04X%04X)"
                         type name (car code) (cdr code))))))
-    (let* ((coding (terminal-coding-system))
-          (encoded (encode-coding-char char coding)))
+    (let* ((charset (get-text-property pos 'charset))
+          (coding (terminal-coding-system))
+          (encoded (encode-coding-char char coding charset)))
       (if encoded
-         (encoded-string-description encoded coding)))))
+         (encoded-string-description encoded coding charset)))))
 ;; Return a string of CH with composition for padding on both sides.
@@ -363,7 +364,7 @@
   (if (>= pos (point-max))
       (error "No character follows specified position"))
   (let* ((char (char-after pos))
-        (charset (char-charset char))
+        (charset (or (get-text-property pos 'charset) (char-charset char)))
         (composition (find-composition pos nil nil t))
         (component-chars nil)
         (display-table (or (window-display-table)
@@ -388,7 +389,9 @@
              (kill-buffer tmp-buf))))
         item-list max-width code)
-    (setq code (encode-char char charset))
+    (or (setq code (encode-char char charset))
+       (setq charset (char-charset char)
+             code (encode-char char charset)))
     (setq item-list
             ,(format "%s (%d, #o%o, #x%x)"
@@ -450,7 +453,7 @@
               (string-as-unibyte (char-to-string char)) nil))
            ("file code"
             ,@(let* ((coding buffer-file-coding-system)
-                     (encoded (encode-coding-char char coding)))
+                     (encoded (encode-coding-char char coding charset)))
                 (if encoded
                     (list (encoded-string-description encoded coding)
                           (format "(encoded by coding system %S)" coding))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]