1 |
@c -*-texinfo-*- |
@c -*-texinfo-*- |
2 |
@c This is part of the GNU Emacs Lisp Reference Manual. |
@c This is part of the GNU Emacs Lisp Reference Manual. |
3 |
@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999 |
@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999 |
4 |
@c Free Software Foundation, Inc. |
@c Free Software Foundation, Inc. |
5 |
@c See the file elisp.texi for copying conditions. |
@c See the file elisp.texi for copying conditions. |
6 |
@setfilename ../info/objects |
@setfilename ../info/objects |
7 |
@node Lisp Data Types, Numbers, Introduction, Top |
@node Lisp Data Types, Numbers, Introduction, Top |
248 |
The usual read syntax for alphanumeric characters is a question mark |
The usual read syntax for alphanumeric characters is a question mark |
249 |
followed by the character; thus, @samp{?A} for the character |
followed by the character; thus, @samp{?A} for the character |
250 |
@kbd{A}, @samp{?B} for the character @kbd{B}, and @samp{?a} for the |
@kbd{A}, @samp{?B} for the character @kbd{B}, and @samp{?a} for the |
251 |
character @kbd{a}. |
character @kbd{a}. |
252 |
|
|
253 |
For example: |
For example: |
254 |
|
|
279 |
@cindex @samp{\r} |
@cindex @samp{\r} |
280 |
@cindex escape |
@cindex escape |
281 |
@cindex @samp{\e} |
@cindex @samp{\e} |
282 |
|
@cindex space |
283 |
|
@cindex @samp{\s} |
284 |
You can express the characters Control-g, backspace, tab, newline, |
You can express the characters Control-g, backspace, tab, newline, |
285 |
vertical tab, formfeed, return, del, and escape as @samp{?\a}, |
vertical tab, formfeed, space, return, del, and escape as @samp{?\a}, |
286 |
@samp{?\b}, @samp{?\t}, @samp{?\n}, @samp{?\v}, @samp{?\f}, |
@samp{?\b}, @samp{?\t}, @samp{?\n}, @samp{?\v}, @samp{?\f}, |
287 |
@samp{?\r}, @samp{?\d}, and @samp{?\e}, respectively. Thus, |
@samp{?\r}, @samp{?\d}, @samp{?\e}, and @samp{?\s}, respectively. Thus, |
288 |
|
|
289 |
@example |
@example |
290 |
?\a @result{} 7 ; @r{@kbd{C-g}} |
?\a @result{} 7 ; @r{@kbd{C-g}} |
295 |
?\f @result{} 12 ; @r{formfeed character, @kbd{C-l}} |
?\f @result{} 12 ; @r{formfeed character, @kbd{C-l}} |
296 |
?\r @result{} 13 ; @r{carriage return, @key{RET}, @kbd{C-m}} |
?\r @result{} 13 ; @r{carriage return, @key{RET}, @kbd{C-m}} |
297 |
?\e @result{} 27 ; @r{escape character, @key{ESC}, @kbd{C-[}} |
?\e @result{} 27 ; @r{escape character, @key{ESC}, @kbd{C-[}} |
298 |
|
?\s @result{} 32 ; @r{space character, @key{SPC}} |
299 |
?\\ @result{} 92 ; @r{backslash character, @kbd{\}} |
?\\ @result{} 92 ; @r{backslash character, @kbd{\}} |
300 |
?\d @result{} 127 ; @r{delete character, @key{DEL}} |
?\d @result{} 127 ; @r{delete character, @key{DEL}} |
301 |
@end example |
@end example |
400 |
character. This distinction is possible only when you use X terminals |
character. This distinction is possible only when you use X terminals |
401 |
or other special terminals; ordinary terminals do not report the |
or other special terminals; ordinary terminals do not report the |
402 |
distinction to the computer in any way. The Lisp syntax for |
distinction to the computer in any way. The Lisp syntax for |
403 |
the shift bit is @samp{\S-}; thus, @samp{?\C-\S-o} or @samp{?\C-\S-O} |
the shift bit is @samp{\S-}; thus, @samp{?\C-\S-o} or @samp{?\C-\S-O} |
404 |
represents the shifted-control-o character. |
represents the shifted-control-o character. |
405 |
|
|
406 |
@cindex hyper characters |
@cindex hyper characters |
410 |
in a character: @dfn{hyper}, @dfn{super} and @dfn{alt}. The syntaxes |
in a character: @dfn{hyper}, @dfn{super} and @dfn{alt}. The syntaxes |
411 |
for these bits are @samp{\H-}, @samp{\s-} and @samp{\A-}. (Case is |
for these bits are @samp{\H-}, @samp{\s-} and @samp{\A-}. (Case is |
412 |
significant in these prefixes.) Thus, @samp{?\H-\M-\A-x} represents |
significant in these prefixes.) Thus, @samp{?\H-\M-\A-x} represents |
413 |
@kbd{Alt-Hyper-Meta-x}. |
@kbd{Alt-Hyper-Meta-x}. Note that @samp{\s} (without the @samp{-}) |
414 |
|
represents the space character. |
415 |
@tex |
@tex |
416 |
Numerically, the |
Numerically, the |
417 |
bit values are @math{2^{22}} for alt, @math{2^{23}} for super and @math{2^{24}} for hyper. |
bit values are @math{2^{22}} for alt, @math{2^{23}} for super and @math{2^{24}} for hyper. |
459 |
@samp{()\|;'`"#.,} to avoid confusing the Emacs commands for editing |
@samp{()\|;'`"#.,} to avoid confusing the Emacs commands for editing |
460 |
Lisp code. Also add a backslash before whitespace characters such as |
Lisp code. Also add a backslash before whitespace characters such as |
461 |
space, tab, newline and formfeed. However, it is cleaner to use one of |
space, tab, newline and formfeed. However, it is cleaner to use one of |
462 |
the easily readable escape sequences, such as @samp{\t}, instead of an |
the easily readable escape sequences, such as @samp{\t} or @samp{\s}, |
463 |
actual whitespace character such as a tab. |
instead of an actual whitespace character such as a tab or a space. |
464 |
|
|
465 |
@node Symbol Type |
@node Symbol Type |
466 |
@subsection Symbol Type |
@subsection Symbol Type |
903 |
in documentation strings, |
in documentation strings, |
904 |
but the newline is \ |
but the newline is \ |
905 |
ignored if escaped." |
ignored if escaped." |
906 |
@result{} "It is useful to include newlines |
@result{} "It is useful to include newlines |
907 |
in documentation strings, |
in documentation strings, |
908 |
but the newline is ignored if escaped." |
but the newline is ignored if escaped." |
909 |
@end example |
@end example |
910 |
|
|
936 |
represent a unibyte non-@sc{ascii} character with its character code, |
represent a unibyte non-@sc{ascii} character with its character code, |
937 |
which must be in the range from 128 (0200 octal) to 255 (0377 octal). |
which must be in the range from 128 (0200 octal) to 255 (0377 octal). |
938 |
This forces a unibyte string. |
This forces a unibyte string. |
939 |
|
|
940 |
@xref{Text Representations}, for more information about the two |
@xref{Text Representations}, for more information about the two |
941 |
text representations. |
text representations. |
942 |
|
|
1075 |
constant that follows actually specifies the contents of the bool-vector |
constant that follows actually specifies the contents of the bool-vector |
1076 |
as a bitmap---each ``character'' in the string contains 8 bits, which |
as a bitmap---each ``character'' in the string contains 8 bits, which |
1077 |
specify the next 8 elements of the bool-vector (1 stands for @code{t}, |
specify the next 8 elements of the bool-vector (1 stands for @code{t}, |
1078 |
and 0 for @code{nil}). The least significant bits of the character |
and 0 for @code{nil}). The least significant bits of the character |
1079 |
correspond to the lowest indices in the bool-vector. If the length is not a |
correspond to the lowest indices in the bool-vector. If the length is not a |
1080 |
multiple of 8, the printed representation shows extra elements, but |
multiple of 8, the printed representation shows extra elements, but |
1081 |
these extras really make no difference. |
these extras really make no difference. |