comparison lisp/international/mule-cmds.el @ 67036:d7b4fada70f0

(encoded-string-description): Use Lisp-readable syntax for hex.
author Juri Linkov <juri@jurta.org>
date Sun, 20 Nov 2005 07:45:19 +0000
parents 68bf866a394c
children 08bc4f887f34 69e184bbba16
comparison
equal deleted inserted replaced
67035:0f0c4f1205cd 67036:d7b4fada70f0
2645 (setq str (string-as-unibyte str)) 2645 (setq str (string-as-unibyte str))
2646 (mapconcat 2646 (mapconcat
2647 (if (and coding-system (eq (coding-system-type coding-system) 2)) 2647 (if (and coding-system (eq (coding-system-type coding-system) 2))
2648 ;; Try to get a pretty description for ISO 2022 escape sequences. 2648 ;; Try to get a pretty description for ISO 2022 escape sequences.
2649 (function (lambda (x) (or (cdr (assq x iso-2022-control-alist)) 2649 (function (lambda (x) (or (cdr (assq x iso-2022-control-alist))
2650 (format "0x%02X" x)))) 2650 (format "#x%02X" x))))
2651 (function (lambda (x) (format "0x%02X" x)))) 2651 (function (lambda (x) (format "#x%02X" x))))
2652 str " ")) 2652 str " "))
2653 2653
2654 (defun encode-coding-char (char coding-system) 2654 (defun encode-coding-char (char coding-system)
2655 "Encode CHAR by CODING-SYSTEM and return the resulting string. 2655 "Encode CHAR by CODING-SYSTEM and return the resulting string.
2656 If CODING-SYSTEM can't safely encode CHAR, return nil." 2656 If CODING-SYSTEM can't safely encode CHAR, return nil."