changeset 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 40c5518fe5b3
children 539e3b0aef5f 141d3f14d8c3
files lisp/ChangeLog lisp/international/characters.el
diffstat 2 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Nov 26 19:29:06 2010 -0800
+++ b/lisp/ChangeLog	Sat Nov 27 10:40:19 2010 +0200
@@ -1,3 +1,8 @@
+2010-11-27  Eli Zaretskii  <eliz@gnu.org>
+
+	* international/characters.el (glyphless-char-display-control):
+	Exclude newline and TAB from the c0-control group.
+
 2010-11-27  Glenn Morris  <rgm@gnu.org>
 
 	* mail/sendmail.el (build-mail-aliases): Doc fix for autoload.
--- 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