aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2011-11-26 15:51:58 +0200
committerEli Zaretskii2011-11-26 15:51:58 +0200
commita3dcc84e76ab44bf0855a1392a7e0b9bde45e1c3 (patch)
treef81203e0a306c29db579853a2128484847f2f284
parent394305db3457d6799f87cc058ac58ff577991b4e (diff)
downloademacs-a3dcc84e76ab44bf0855a1392a7e0b9bde45e1c3.tar.gz
emacs-a3dcc84e76ab44bf0855a1392a7e0b9bde45e1c3.zip
Update and enhance documentation of display of control characters.
doc/emacs/display.texi (Text Display): Update the description, cross-references, and indexing related to display of control characters and raw bytes. doc/lispref/display.texi (Usual Display): Update the description, cross-references, and indexing related to display of control characters and raw bytes.
-rw-r--r--doc/emacs/ChangeLog6
-rw-r--r--doc/emacs/display.texi26
-rw-r--r--doc/lispref/ChangeLog6
-rw-r--r--doc/lispref/display.texi53
4 files changed, 57 insertions, 34 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 8cef196c90d..9abed71d1c7 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,9 @@
12011-11-26 Eli Zaretskii <eliz@gnu.org>
2
3 * display.texi (Text Display): Update the description,
4 cross-references, and indexing related to display of control
5 characters and raw bytes.
6
12011-11-25 Chong Yidong <cyd@gnu.org> 72011-11-25 Chong Yidong <cyd@gnu.org>
2 8
3 * frames.texi (Frames): Rewrite introduction. 9 * frames.texi (Frames): Rewrite introduction.
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index a7ecc0dc551..4334d99461f 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -1216,7 +1216,7 @@ characters include @acronym{ASCII} numbers, letters, and punctuation
1216characters, as well as many non-@acronym{ASCII} characters. 1216characters, as well as many non-@acronym{ASCII} characters.
1217 1217
1218@vindex tab-width 1218@vindex tab-width
1219@cindex control character 1219@cindex control characters on display
1220 The @acronym{ASCII} character set contains non-printing @dfn{control 1220 The @acronym{ASCII} character set contains non-printing @dfn{control
1221characters}. Two of these are displayed specially: the newline 1221characters}. Two of these are displayed specially: the newline
1222character (Unicode code point @code{U+000A}) is displayed by starting 1222character (Unicode code point @code{U+000A}) is displayed by starting
@@ -1228,19 +1228,21 @@ value between 1 and 1000, inclusive. Note that how the tab character
1228in the buffer is displayed has nothing to do with the definition of 1228in the buffer is displayed has nothing to do with the definition of
1229@key{TAB} as a command. 1229@key{TAB} as a command.
1230 1230
1231 Other @acronym{ASCII} control characters are displayed as a caret 1231 Other @acronym{ASCII} control characters, whose codes are below
1232@code{U+0020} (octal 40, decimal 32), are displayed as a caret
1232(@samp{^}) followed by the non-control version of the character, with 1233(@samp{^}) followed by the non-control version of the character, with
1233the @code{escape-glyph} face. For instance, the @samp{control-A} 1234the @code{escape-glyph} face. For instance, the @samp{control-A}
1234character, @code{U+0001}, is displayed as @samp{^A}. 1235character, @code{U+0001}, is displayed as @samp{^A}.
1235 1236
1237@cindex octal escapes
1236@vindex ctl-arrow 1238@vindex ctl-arrow
1237 The non-@acronym{ASCII}, non-printing characters @code{U+0080} 1239 The raw bytes with codes @code{U+0080} (octal 200) through
1238(octal 200) through @code{U+009F} (octal 237) are displayed as octal 1240@code{U+009F} (octal 237) are displayed as @dfn{octal escape
1239escape sequences, with the @code{escape-glyph} face. For instance, 1241sequences}, with the @code{escape-glyph} face. For instance,
1240character code @code{U+0098} (octal 230) is displayed as @samp{\230}. 1242character code @code{U+0098} (octal 230) is displayed as @samp{\230}.
1241If you change the buffer-local variable @code{ctl-arrow} to 1243If you change the buffer-local variable @code{ctl-arrow} to
1242@code{nil}, @acronym{ASCII} control characters are also displayed as 1244@code{nil}, the @acronym{ASCII} control characters are also displayed
1243octal escape sequences instead of caret escape sequences. 1245as octal escape sequences instead of caret escape sequences.
1244 1246
1245@vindex nobreak-char-display 1247@vindex nobreak-char-display
1246@cindex non-breaking space 1248@cindex non-breaking space
@@ -1270,10 +1272,12 @@ elisp, The Emacs Lisp Reference Manual}.
1270 On graphical displays, some characters may have no glyphs in any of 1272 On graphical displays, some characters may have no glyphs in any of
1271the fonts available to Emacs. These @dfn{glyphless characters} are 1273the fonts available to Emacs. These @dfn{glyphless characters} are
1272normally displayed as boxes containing the hexadecimal character code. 1274normally displayed as boxes containing the hexadecimal character code.
1273You can control the display method by customizing the variable 1275Similarly, on text terminals, characters that cannot be displayed
1274@code{glyphless-char-display-control}. @xref{Glyphless Chars,, 1276using the terminal encoding (@pxref{Terminal Coding}) are normally
1275Glyphless Character Display, elisp, The Emacs Lisp Reference Manual}, 1277displayed as question signs. You can control the display method by
1276for details. 1278customizing the variable @code{glyphless-char-display-control}.
1279@xref{Glyphless Chars,, Glyphless Character Display, elisp, The Emacs
1280Lisp Reference Manual}, for details.
1277 1281
1278@node Cursor Display 1282@node Cursor Display
1279@section Displaying the Cursor 1283@section Displaying the Cursor
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index b0a7ce4ae47..72efbee0b5a 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,9 @@
12011-11-26 Eli Zaretskii <eliz@gnu.org>
2
3 * display.texi (Usual Display): Update the description,
4 cross-references, and indexing related to display of control
5 characters and raw bytes.
6
12011-11-25 Martin Rudalics <rudalics@gmx.at> 72011-11-25 Martin Rudalics <rudalics@gmx.at>
2 8
3 * windows.texi (Splitting Windows): Fix description of 9 * windows.texi (Splitting Windows): Fix description of
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 9849420b1f5..2032ecdc5bc 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -5638,39 +5638,45 @@ code. You can override these conventions by setting up a display table
5638@itemize @bullet 5638@itemize @bullet
5639@item 5639@item
5640Character codes 32 through 126 map to glyph codes 32 through 126. 5640Character codes 32 through 126 map to glyph codes 32 through 126.
5641Normally this means they display as themselves. 5641Normally this means they display as themselves, but a display table
5642can change that.
5642 5643
5643@item 5644@item
5644Character code 9 is a horizontal tab. It displays as whitespace 5645Character code 9 is a horizontal tab. It displays as whitespace
5645up to a position determined by @code{tab-width}. 5646up to a position determined by @code{tab-width}.
5646 5647
5647@item 5648@item
5648Character code 10 is a newline. 5649Character code 10 is a newline. It is normally invisible on display,
5650and has the effect of ending the preceding line and starting a new
5651line.
5649 5652
5650@item 5653@item
5651All other codes in the range 0 through 31, and code 127, display in one 5654All other codes in the range 0 through 31 display in one of two ways
5652of two ways according to the value of @code{ctl-arrow}. If it is 5655according to the value of @code{ctl-arrow}. If it is non-@code{nil},
5653non-@code{nil}, these codes map to sequences of two glyphs, where the 5656these codes map to sequences of two glyphs, where the first glyph is
5654first glyph is the @acronym{ASCII} code for @samp{^}. (A display table can 5657the @acronym{ASCII} code for @samp{^}. (A display table can specify a
5655specify a glyph to use instead of @samp{^}.) Otherwise, these codes map 5658glyph to use instead of @samp{^}.) Otherwise, these codes map just
5656just like the codes in the range 128 to 255. 5659like the raw bytes in the range 128 to 255 (described below).
5657 5660
5658On MS-DOS terminals, Emacs arranges by default for the character code 5661@cindex octal escapes
5659127 to be mapped to the glyph code 127, which normally displays as an
5660empty polygon. This glyph is used to display non-@acronym{ASCII} characters
5661that the MS-DOS terminal doesn't support. @xref{MS-DOS and MULE,,,
5662emacs, The GNU Emacs Manual}.
5663
5664@item 5662@item
5665Character codes 128 through 255 map to sequences of four glyphs, where 5663Raw bytes (@pxref{Text Representations}) with codes 128 through 255,
5666the first glyph is the @acronym{ASCII} code for @samp{\}, and the others are 5664and the @acronym{ASCII} control character with code 127, display as
5667digit characters representing the character code in octal. (A display 5665sequences of four glyphs, where the first glyph is the @acronym{ASCII}
5668table can specify a glyph to use instead of @samp{\}.) 5666code for @samp{\}, and the others are digit characters representing
5667the character code in octal. (A display table can specify a glyph to
5668use instead of @samp{\}.) This is known as the @dfn{octal escape}
5669display.
5669 5670
5670@item 5671@item
5671Multibyte character codes above 256 are displayed as themselves, or as 5672Non-@acronym{ASCII} character codes above 127 are displayed as
5672a question mark or a hex code or an empty box if the terminal cannot 5673themselves, if the terminal and the available fonts support them.
5673display that character. 5674Characters that are not supported by the terminal, or (on window
5675systems) have no fonts available for them, are displayed as a question
5676mark or a hex code or an empty box. @xref{Glyphless Chars}, for how
5677to control display of the characters not supported by the terminal or
5678fonts. Display tables can change how a character is displayed, even
5679if it is supported.
5674@end itemize 5680@end itemize
5675 5681
5676 The usual display conventions apply even when there is a display 5682 The usual display conventions apply even when there is a display
@@ -5695,7 +5701,8 @@ mode line using the new values, call the function
5695This buffer-local variable controls how control characters are 5701This buffer-local variable controls how control characters are
5696displayed. If it is non-@code{nil}, they are displayed as a caret 5702displayed. If it is non-@code{nil}, they are displayed as a caret
5697followed by the character: @samp{^A}. If it is @code{nil}, they are 5703followed by the character: @samp{^A}. If it is @code{nil}, they are
5698displayed as a backslash followed by three octal digits: @samp{\001}. 5704displayed as octal escapes: a backslash followed by three octal
5705digits, as in @samp{\001}.
5699@end defopt 5706@end defopt
5700 5707
5701@defopt tab-width 5708@defopt tab-width