diff options
| author | Karl Heuer | 1995-06-06 19:21:15 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-06-06 19:21:15 +0000 |
| commit | bfe721d172158ccdcd925e55f5a658421ca0d4fe (patch) | |
| tree | 2d2882c335a04acb20662d2b5aa6dc2246a6f0aa /lispref/objects.texi | |
| parent | 5c4276bc6de449d416cc83dd034892da66badcb7 (diff) | |
| download | emacs-bfe721d172158ccdcd925e55f5a658421ca0d4fe.tar.gz emacs-bfe721d172158ccdcd925e55f5a658421ca0d4fe.zip | |
*** empty log message ***
Diffstat (limited to 'lispref/objects.texi')
| -rw-r--r-- | lispref/objects.texi | 111 |
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 | |||
| 115 | part of the Lisp objects which represent the program within the Lisp | 115 | part of the Lisp objects which represent the program within the Lisp |
| 116 | system. | 116 | system. |
| 117 | 117 | ||
| 118 | The @samp{#@@@var{count}} construct, which skips the next @var{count} | ||
| 119 | characters, is useful for program-generated comments containing binary | ||
| 120 | data. 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}: | |||
| 305 | characters that exist in @sc{ASCII}, but for keyboard input purposes, | 310 | characters that exist in @sc{ASCII}, but for keyboard input purposes, |
| 306 | you can turn any character into a control character with @samp{C-}. The | 311 | you can turn any character into a control character with @samp{C-}. The |
| 307 | character codes for these non-@sc{ASCII} control characters include the | 312 | character codes for these non-@sc{ASCII} control characters include the |
| 308 | 2**22 bit as well as the code for the corresponding non-control | 313 | @iftex |
| 314 | $2^{26}$ | ||
| 315 | @end iftex | ||
| 316 | @ifinfo | ||
| 317 | 2**26 | ||
| 318 | @end ifinfo | ||
| 319 | bit as well as the code for the corresponding non-control | ||
| 309 | character. Ordinary terminals have no way of generating non-@sc{ASCII} | 320 | character. Ordinary terminals have no way of generating non-@sc{ASCII} |
| 310 | control characters, but you can generate them straightforwardly using an | 321 | control characters, but you can generate them straightforwardly using an |
| 311 | X terminal. | 322 | X 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 |
| 325 | the 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 | ||
| 332 | As a result, it is currently not possible to represent the character | ||
| 333 | @kbd{Control-?}, which is a meaningful input character under X. It is | ||
| 334 | not easy to change this as various Lisp files refer to @key{DEL} in this | ||
| 335 | way. | ||
| 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, |
| 320 | we recommend the @samp{^} syntax; for control characters in keyboard | 338 | we recommend the @samp{^} syntax; for control characters in keyboard |
| 321 | input, we prefer the @samp{C-} syntax. This does not affect the meaning | 339 | input, 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} |
| 326 | modifier key. The integer that represents such a character has the | 344 | modifier key. The integer that represents such a character has the |
| 327 | 2**23 bit set (which on most machines makes it a negative number). We | 345 | @iftex |
| 346 | $2^{27}$ | ||
| 347 | @end iftex | ||
| 348 | @ifinfo | ||
| 349 | 2**27 | ||
| 350 | @end ifinfo | ||
| 351 | bit set (which on most machines makes it a negative number). We | ||
| 328 | use high bits for this and other modifiers to make possible a wide range | 352 | use high bits for this and other modifiers to make possible a wide range |
| 329 | of basic character codes. | 353 | of 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 | ||
| 360 | 2**7 | ||
| 361 | @end ifinfo | ||
| 362 | bit indicates a meta character, so the meta | ||
| 332 | characters that can fit in a string have codes in the range from 128 to | 363 | characters that can fit in a string have codes in the range from 128 to |
| 333 | 255, and are the meta versions of the ordinary @sc{ASCII} characters. | 364 | 255, 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 |
| 345 | part of @sc{ASCII}, but @sc{ASCII} has no way to represent whether a | 376 | part of @sc{ASCII}, but @sc{ASCII} has no way to represent whether a |
| 346 | control character is upper case or lower case. Emacs uses the 2**21 bit | 377 | control character is upper case or lower case. Emacs uses the |
| 347 | to indicate that the shift key was used for typing a control character. | 378 | @iftex |
| 348 | This distinction is possible only when you use X terminals or other | 379 | $2^{25}$ |
| 349 | special terminals; ordinary terminals do not indicate the distinction to | 380 | @end iftex |
| 350 | the computer in any way. | 381 | @ifinfo |
| 382 | 2**25 | ||
| 383 | @end ifinfo | ||
| 384 | bit to indicate that the shift key was used for typing a control | ||
| 385 | character. This distinction is possible only when you use X terminals | ||
| 386 | or other special terminals; ordinary terminals do not indicate the | ||
| 387 | distinction 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 |
| 356 | in a character: @dfn{hyper}, @dfn{super} and @dfn{alt}. The syntaxes | 393 | in a character: @dfn{hyper}, @dfn{super} and @dfn{alt}. The syntaxes |
| 357 | for these bits are @samp{\H-}, @samp{\s-} and @samp{\A-}. Thus, | 394 | for 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}. |
| 359 | bit values are 2**18 for alt, 2**19 for super and 2**20 for hyper. | 396 | @iftex |
| 397 | Numerically, the | ||
| 398 | bit values are $2^{22}$ for alt, $2^{23}$ for super and $2^{24}$ for hyper. | ||
| 399 | @end iftex | ||
| 400 | @ifinfo | ||
| 401 | Numerically, the | ||
| 402 | bit 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 |
| 427 | in contrast to Emacs Lisp, in which upper case and lower case letters | 471 | Lisp, upper case and lower case letters are distinct. |
| 428 | are 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 |
| 432 | the fifth example is escaped to prevent it from being read as a number. | 475 | the fifth example is escaped to prevent it from being read as a number. |
| 433 | This is not necessary in the last example because the rest of the name | 476 | This is not necessary in the sixth example because the rest of the name |
| 434 | makes it invalid as a number. | 477 | makes it invalid as a number. |
| 435 | 478 | ||
| 436 | @example | 479 | @example |
| @@ -762,7 +805,14 @@ string containing just a single double-quote character. | |||
| 762 | characters.) | 805 | characters.) |
| 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 |
| 765 | string constant, this sets the 2**7 bit of the character in the string. | 808 | string constant, this sets the |
| 809 | @iftex | ||
| 810 | $2^{7}$ | ||
| 811 | @end iftex | ||
| 812 | @ifinfo | ||
| 813 | 2**7 | ||
| 814 | @end ifinfo | ||
| 815 | bit of the character in the string. | ||
| 766 | This is not the same representation that the meta modifier has in a | 816 | This is not the same representation that the meta modifier has in a |
| 767 | character on its own (not inside a string). @xref{Character Type}. | 817 | character 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 | |||
| 917 | function to be called. @xref{Byte Compilation}, for information about | 967 | function to be called. @xref{Byte Compilation}, for information about |
| 918 | the byte compiler. | 968 | the byte compiler. |
| 919 | 969 | ||
| 920 | The printed representation for a byte-code function object is like that | 970 | The printed representation and read syntax for a byte-code function |
| 921 | for a vector, with an additional @samp{#} before the opening @samp{[}. | 971 | object is like that for a vector, with an additional @samp{#} before the |
| 972 | opening @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 |
| 1000 | a local variable binding list (@pxref{Buffer-Local Variables}). | 1051 | a local variable binding list (@pxref{Buffer-Local Variables}). |
| 1052 | |||
| 1053 | @item | ||
| 1054 | a list of overlays (@pxref{Overlays}). | ||
| 1055 | |||
| 1056 | @item | ||
| 1057 | text 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 | |||
| 1006 | behavior of programs in different buffers, without actually changing the | 1063 | behavior of programs in different buffers, without actually changing the |
| 1007 | programs. | 1064 | programs. |
| 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 |
| 1067 | of another buffer. @xref{Indirect Buffers}. | ||
| 1068 | |||
| 1069 | Buffers have no read syntax. They print in hash notation, showing the | ||
| 1010 | buffer name. | 1070 | buffer 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. |
| 1189 | Each buffer and each window can have its own display table. A display | 1249 | Each buffer and each window can have its own display table. A display |
| 1190 | table is actually a vector of length 261. @xref{Display Tables}. | 1250 | table 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}. | |||
| 1196 | appearance of a part of a buffer. It contains markers delimiting a | 1256 | appearance of a part of a buffer. It contains markers delimiting a |
| 1197 | range of the buffer, plus a property list (a list whose elements are | 1257 | range of the buffer, plus a property list (a list whose elements are |
| 1198 | alternating property names and values). Overlays are used to present | 1258 | alternating property names and values). Overlays are used to present |
| 1199 | parts of the buffer temporarily in a different display style. | 1259 | parts of the buffer temporarily in a different display style. They have |
| 1200 | 1260 | no 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 | ||
| 1202 | read syntax, and print in hash notation, giving the buffer name and | ||
| 1203 | range of positions. | 1261 | range 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 | |||
| 1585 | Two distinct buffers are never @code{equal}, even if their contents | ||
| 1586 | are 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 |