Mercurial > hg > xemacs-beta
changeset 4592:c6d4ffc018a6
Automated merge with ssh://aidan-guest@hg.debian.org//hg/xemacs/xemacs
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 31 Jan 2009 17:43:20 +0000 |
parents | 03ec57ae1d1e (current diff) dbe504bac1f4 (diff) |
children | 3623446b34bc 9dd42cb187ed |
files | |
diffstat | 2 files changed, 14 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sat Jan 31 22:47:43 2009 +0900 +++ b/lisp/ChangeLog Sat Jan 31 17:43:20 2009 +0000 @@ -1,3 +1,10 @@ +2009-01-31 Aidan Kehoe <kehoea@parhasard.net> + + * mule/mule-cmds.el (finish-set-language-environment): + Treat control characters specially in the + invalid-sequence-coding-system handling, display them using the + caret notation. + 2009-01-31 Aidan Kehoe <kehoea@parhasard.net> * frame.el (display-graphic-p):
--- a/lisp/mule/mule-cmds.el Sat Jan 31 22:47:43 2009 +0900 +++ b/lisp/mule/mule-cmds.el Sat Jan 31 17:43:20 2009 +0000 @@ -771,17 +771,18 @@ (let ((invalid-sequence-coding-system (get-language-info language-name 'invalid-sequence-coding-system)) (disp-table (specifier-instance current-display-table)) - glyph) + glyph string) (when (consp invalid-sequence-coding-system) (setq invalid-sequence-coding-system (car invalid-sequence-coding-system))) (map-char-table #'(lambda (key entry) - (setq glyph (make-glyph - (vector - 'string :data - (decode-coding-string (string entry) - invalid-sequence-coding-system)))) + (setq string (decode-coding-string (string entry) + invalid-sequence-coding-system)) + ;; Treat control characters specially: + (when (string-match "^[\x00-\x1f\x80-\x9f]$" string) + (setq string (format "^%c" (+ ?@ (aref string 0))))) + (setq glyph (make-glyph (vector 'string :data string))) (set-glyph-face glyph 'unicode-invalid-sequence-warning-face) (put-char-table key glyph disp-table) nil)