aboutsummaryrefslogtreecommitdiffstats
path: root/lispref/objects.texi
diff options
context:
space:
mode:
authorKarl Heuer1995-06-06 19:21:15 +0000
committerKarl Heuer1995-06-06 19:21:15 +0000
commitbfe721d172158ccdcd925e55f5a658421ca0d4fe (patch)
tree2d2882c335a04acb20662d2b5aa6dc2246a6f0aa /lispref/objects.texi
parent5c4276bc6de449d416cc83dd034892da66badcb7 (diff)
downloademacs-bfe721d172158ccdcd925e55f5a658421ca0d4fe.tar.gz
emacs-bfe721d172158ccdcd925e55f5a658421ca0d4fe.zip
*** empty log message ***
Diffstat (limited to 'lispref/objects.texi')
-rw-r--r--lispref/objects.texi111
1 files changed, 87 insertions, 24 deletions
diff --git a/lispref/objects.texi b/lispref/objects.texi
index fc06466112c..4952f07514e 100644
--- a/lispref/objects.texi
+++ b/lispref/objects.texi
@@ -115,6 +115,11 @@ the end of line. The Lisp reader discards comments; they do not become
115part of the Lisp objects which represent the program within the Lisp 115part of the Lisp objects which represent the program within the Lisp
116system. 116system.
117 117
118 The @samp{#@@@var{count}} construct, which skips the next @var{count}
119characters, is useful for program-generated comments containing binary
120data. The Emacs Lisp byte compiler uses this in its output files
121(@pxref{Byte Compilation}). It isn't meant for source files, however.
122
118 @xref{Comment Tips}, for conventions for formatting comments. 123 @xref{Comment Tips}, for conventions for formatting comments.
119 124
120@node Programming Types 125@node Programming Types
@@ -305,17 +310,30 @@ equivalent to @samp{?\^I} and to @samp{?\^i}:
305characters that exist in @sc{ASCII}, but for keyboard input purposes, 310characters that exist in @sc{ASCII}, but for keyboard input purposes,
306you can turn any character into a control character with @samp{C-}. The 311you can turn any character into a control character with @samp{C-}. The
307character codes for these non-@sc{ASCII} control characters include the 312character codes for these non-@sc{ASCII} control characters include the
3082**22 bit as well as the code for the corresponding non-control 313@iftex
314$2^{26}$
315@end iftex
316@ifinfo
3172**26
318@end ifinfo
319bit as well as the code for the corresponding non-control
309character. Ordinary terminals have no way of generating non-@sc{ASCII} 320character. Ordinary terminals have no way of generating non-@sc{ASCII}
310control characters, but you can generate them straightforwardly using an 321control characters, but you can generate them straightforwardly using an
311X terminal. 322X terminal.
312 323
313 You can think of the @key{DEL} character as @kbd{Control-?}: 324 For historical reasons, Emacs treats the @key{DEL} character as
325the control equivalent of @kbd{?}:
314 326
315@example 327@example
316?\^? @result{} 127 ?\C-? @result{} 127 328?\^? @result{} 127 ?\C-? @result{} 127
317@end example 329@end example
318 330
331@noindent
332As a result, it is currently not possible to represent the character
333@kbd{Control-?}, which is a meaningful input character under X. It is
334not easy to change this as various Lisp files refer to @key{DEL} in this
335way.
336
319 For representing control characters to be found in files or strings, 337 For representing control characters to be found in files or strings,
320we recommend the @samp{^} syntax; for control characters in keyboard 338we recommend the @samp{^} syntax; for control characters in keyboard
321input, we prefer the @samp{C-} syntax. This does not affect the meaning 339input, we prefer the @samp{C-} syntax. This does not affect the meaning
@@ -324,11 +342,24 @@ of the program, but may guide the understanding of people who read it.
324@cindex meta characters 342@cindex meta characters
325 A @dfn{meta character} is a character typed with the @key{META} 343 A @dfn{meta character} is a character typed with the @key{META}
326modifier key. The integer that represents such a character has the 344modifier key. The integer that represents such a character has the
3272**23 bit set (which on most machines makes it a negative number). We 345@iftex
346$2^{27}$
347@end iftex
348@ifinfo
3492**27
350@end ifinfo
351bit set (which on most machines makes it a negative number). We
328use high bits for this and other modifiers to make possible a wide range 352use high bits for this and other modifiers to make possible a wide range
329of basic character codes. 353of basic character codes.
330 354
331 In a string, the 2**7 bit indicates a meta character, so the meta 355 In a string, the
356@iftex
357$2^{7}$
358@end iftex
359@ifinfo
3602**7
361@end ifinfo
362bit indicates a meta character, so the meta
332characters that can fit in a string have codes in the range from 128 to 363characters that can fit in a string have codes in the range from 128 to
333255, and are the meta versions of the ordinary @sc{ASCII} characters. 364255, and are the meta versions of the ordinary @sc{ASCII} characters.
334(In Emacs versions 18 and older, this convention was used for characters 365(In Emacs versions 18 and older, this convention was used for characters
@@ -343,11 +374,17 @@ or as @samp{?\M-\101}. Likewise, you can write @kbd{C-M-b} as
343 374
344 The case of an ordinary letter is indicated by its character code as 375 The case of an ordinary letter is indicated by its character code as
345part of @sc{ASCII}, but @sc{ASCII} has no way to represent whether a 376part of @sc{ASCII}, but @sc{ASCII} has no way to represent whether a
346control character is upper case or lower case. Emacs uses the 2**21 bit 377control character is upper case or lower case. Emacs uses the
347to indicate that the shift key was used for typing a control character. 378@iftex
348This distinction is possible only when you use X terminals or other 379$2^{25}$
349special terminals; ordinary terminals do not indicate the distinction to 380@end iftex
350the computer in any way. 381@ifinfo
3822**25
383@end ifinfo
384bit to indicate that the shift key was used for typing a control
385character. This distinction is possible only when you use X terminals
386or other special terminals; ordinary terminals do not indicate the
387distinction to the computer in any way.
351 388
352@cindex hyper characters 389@cindex hyper characters
353@cindex super characters 390@cindex super characters
@@ -355,8 +392,15 @@ the computer in any way.
355 The X Window System defines three other modifier bits that can be set 392 The X Window System defines three other modifier bits that can be set
356in a character: @dfn{hyper}, @dfn{super} and @dfn{alt}. The syntaxes 393in a character: @dfn{hyper}, @dfn{super} and @dfn{alt}. The syntaxes
357for these bits are @samp{\H-}, @samp{\s-} and @samp{\A-}. Thus, 394for these bits are @samp{\H-}, @samp{\s-} and @samp{\A-}. Thus,
358@samp{?\H-\M-\A-x} represents @kbd{Alt-Hyper-Meta-x}. Numerically, the 395@samp{?\H-\M-\A-x} represents @kbd{Alt-Hyper-Meta-x}.
359bit values are 2**18 for alt, 2**19 for super and 2**20 for hyper. 396@iftex
397Numerically, the
398bit values are $2^{22}$ for alt, $2^{23}$ for super and $2^{24}$ for hyper.
399@end iftex
400@ifinfo
401Numerically, the
402bit values are 2**22 for alt, 2**23 for super and 2**24 for hyper.
403@end ifinfo
360 404
361@cindex @samp{?} in character constant 405@cindex @samp{?} in character constant
362@cindex question mark in character constant 406@cindex question mark in character constant
@@ -423,14 +467,13 @@ do such a thing.
423@cindex CL note---case of letters 467@cindex CL note---case of letters
424@quotation 468@quotation
425@b{Common Lisp note:} In Common Lisp, lower case letters are always 469@b{Common Lisp note:} In Common Lisp, lower case letters are always
426``folded'' to upper case, unless they are explicitly escaped. This is 470``folded'' to upper case, unless they are explicitly escaped. In Emacs
427in contrast to Emacs Lisp, in which upper case and lower case letters 471Lisp, upper case and lower case letters are distinct.
428are distinct.
429@end quotation 472@end quotation
430 473
431 Here are several examples of symbol names. Note that the @samp{+} in 474 Here are several examples of symbol names. Note that the @samp{+} in
432the fifth example is escaped to prevent it from being read as a number. 475the fifth example is escaped to prevent it from being read as a number.
433This is not necessary in the last example because the rest of the name 476This is not necessary in the sixth example because the rest of the name
434makes it invalid as a number. 477makes it invalid as a number.
435 478
436@example 479@example
@@ -762,7 +805,14 @@ string containing just a single double-quote character.
762characters.) 805characters.)
763 806
764 If you use the @samp{\M-} syntax to indicate a meta character in a 807 If you use the @samp{\M-} syntax to indicate a meta character in a
765string constant, this sets the 2**7 bit of the character in the string. 808string constant, this sets the
809@iftex
810$2^{7}$
811@end iftex
812@ifinfo
8132**7
814@end ifinfo
815bit of the character in the string.
766This is not the same representation that the meta modifier has in a 816This is not the same representation that the meta modifier has in a
767character on its own (not inside a string). @xref{Character Type}. 817character on its own (not inside a string). @xref{Character Type}.
768 818
@@ -917,8 +967,9 @@ the evaluator handles this data type specially when it appears as a
917function to be called. @xref{Byte Compilation}, for information about 967function to be called. @xref{Byte Compilation}, for information about
918the byte compiler. 968the byte compiler.
919 969
920The printed representation for a byte-code function object is like that 970The printed representation and read syntax for a byte-code function
921for a vector, with an additional @samp{#} before the opening @samp{[}. 971object is like that for a vector, with an additional @samp{#} before the
972opening @samp{[}.
922 973
923@node Autoload Type 974@node Autoload Type
924@subsection Autoload Type 975@subsection Autoload Type
@@ -998,6 +1049,12 @@ a local keymap (@pxref{Keymaps}); and,
998 1049
999@item 1050@item
1000a local variable binding list (@pxref{Buffer-Local Variables}). 1051a local variable binding list (@pxref{Buffer-Local Variables}).
1052
1053@item
1054a list of overlays (@pxref{Overlays}).
1055
1056@item
1057text properties for the text in the buffer (@pxref{Text Properties}).
1001@end itemize 1058@end itemize
1002 1059
1003@noindent 1060@noindent
@@ -1006,7 +1063,10 @@ override global bindings or values. These are used to customize the
1006behavior of programs in different buffers, without actually changing the 1063behavior of programs in different buffers, without actually changing the
1007programs. 1064programs.
1008 1065
1009 Buffers have no read syntax. They print in hash notation with the 1066 A buffer may be @dfn{indirect}, which means it shares the text
1067of another buffer. @xref{Indirect Buffers}.
1068
1069 Buffers have no read syntax. They print in hash notation, showing the
1010buffer name. 1070buffer name.
1011 1071
1012@example 1072@example
@@ -1187,7 +1247,7 @@ and modify syntax tables.
1187 1247
1188 A @dfn{display table} specifies how to display each character code. 1248 A @dfn{display table} specifies how to display each character code.
1189Each buffer and each window can have its own display table. A display 1249Each buffer and each window can have its own display table. A display
1190table is actually a vector of length 261. @xref{Display Tables}. 1250table is actually a vector of length 262. @xref{Display Tables}.
1191 1251
1192@node Overlay Type 1252@node Overlay Type
1193@subsection Overlay Type 1253@subsection Overlay Type
@@ -1196,12 +1256,12 @@ table is actually a vector of length 261. @xref{Display Tables}.
1196appearance of a part of a buffer. It contains markers delimiting a 1256appearance of a part of a buffer. It contains markers delimiting a
1197range of the buffer, plus a property list (a list whose elements are 1257range of the buffer, plus a property list (a list whose elements are
1198alternating property names and values). Overlays are used to present 1258alternating property names and values). Overlays are used to present
1199parts of the buffer temporarily in a different display style. 1259parts of the buffer temporarily in a different display style. They have
1200 1260no read syntax, and print in hash notation, giving the buffer name and
1201 @xref{Overlays}, for how to create and use overlays. They have no
1202read syntax, and print in hash notation, giving the buffer name and
1203range of positions. 1261range of positions.
1204 1262
1263 @xref{Overlays}, for how to create and use overlays.
1264
1205@node Type Predicates 1265@node Type Predicates
1206@section Type Predicates 1266@section Type Predicates
1207@cindex predicates 1267@cindex predicates
@@ -1521,6 +1581,9 @@ use @code{string=} (@pxref{Text Comparison}).
1521 @result{} nil 1581 @result{} nil
1522@end group 1582@end group
1523@end example 1583@end example
1584
1585Two distinct buffers are never @code{equal}, even if their contents
1586are the same.
1524@end defun 1587@end defun
1525 1588
1526 The test for equality is implemented recursively, and circular lists may 1589 The test for equality is implemented recursively, and circular lists may