diff lisp/international/characters.el @ 111742:f026c8607795

Exclude NL and TAB from c0-control group for glyphless display. international/characters.el (glyphless-char-display-control): Exclude newline and TAB from the c0-control group.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 27 Nov 2010 10:40:19 +0200
parents 342ca5475c01
children 417b1e4d63cd
line wrap: on
line diff
--- a/lisp/international/characters.el	Fri Nov 26 19:29:06 2010 -0800
+++ b/lisp/international/characters.el	Sat Nov 27 10:40:19 2010 +0200
@@ -1305,7 +1305,12 @@
 	  (error "Invalid glyphless character display method: %s" method))
       (cond ((eq target 'c0-control)
 	     (set-char-table-range glyphless-char-display '(#x00 . #x1F)
-				   method))
+				   method)
+	     ;; Users will not expect their newlines and TABs be
+	     ;; displayed as anything but themselves, so exempt those
+	     ;; two characters from c0-control.
+	     (set-char-table-range glyphless-char-display #x9 nil)
+	     (set-char-table-range glyphless-char-display #xa nil))
 	    ((eq target 'c1-control)
 	     (set-char-table-range glyphless-char-display '(#x80 . #x9F)
 				   method))
@@ -1344,7 +1349,7 @@
 group.
 
 GROUP must be one of these symbols:
-  `c0-control':     U+0000..U+001F.
+  `c0-control':     U+0000..U+001F, but excluding newline and TAB.
   `c1-control':     U+0080..U+009F.
   `format-control': Characters of Unicode General Category `Cf',
                     such as U+200C (ZWNJ), U+200E (LRM), but