comparison lisp/mule/mule-cmds.el @ 4621:127dbf03e1af

Correct a test failure uncovered by the last commit. lisp/ChangeLog addition: 2009-02-17 Aidan Kehoe <kehoea@parhasard.net> * mule/mule-cmds.el (finish-set-language-environment): Correct this function, don't try to format non-control characters with ^ followed by their value plus (char-int ?@).
author Aidan Kehoe <kehoea@parhasard.net>
date Tue, 17 Feb 2009 13:42:36 +0000
parents ba06a6cae484
children 02b7c7189041
comparison
equal deleted inserted replaced
4620:4dc42d1fe684 4621:127dbf03e1af
778 (map-char-table 778 (map-char-table
779 #'(lambda (key entry) 779 #'(lambda (key entry)
780 (setq string (decode-coding-string (string entry) 780 (setq string (decode-coding-string (string entry)
781 invalid-sequence-coding-system)) 781 invalid-sequence-coding-system))
782 (when (= 1 (length string)) 782 (when (= 1 (length string))
783 ;; Treat Unicode error sequence chars as the octets
784 ;; corresponding to those on disk:
785 (setq unicode-error-lookup
786 (get-char-table (aref string 0)
787 unicode-error-default-translation-table))
788 (when unicode-error-lookup
789 (setq string (format "%c" unicode-error-lookup)))
783 ;; Treat control characters specially: 790 ;; Treat control characters specially:
784 (cond 791 (when (string-match "^[\x00-\x1f\x80-\x9f]$" string)
785 ((string-match "^[\x00-\x1f\x80-\x9f]$" string) 792 (setq string (format "^%c" (+ ?@ (aref string 0))))))
786 (setq string (format "^%c" (+ ?@ (aref string 0)))))
787 ((setq unicode-error-lookup
788 (get-char-table (aref string 0)
789 unicode-error-default-translation-table))
790 (setq string (format "^%c" (+ ?@ unicode-error-lookup))))))
791 (setq glyph (make-glyph (vector 'string :data string))) 793 (setq glyph (make-glyph (vector 'string :data string)))
792 (set-glyph-face glyph 'unicode-invalid-sequence-warning-face) 794 (set-glyph-face glyph 'unicode-invalid-sequence-warning-face)
793 (put-char-table key glyph disp-table) 795 (put-char-table key glyph disp-table)
794 nil) 796 nil)
795 unicode-error-default-translation-table)) 797 unicode-error-default-translation-table))