comparison man/internals/internals.texi @ 444:576fb035e263 r21-2-37

Import from CVS: tag r21-2-37
author cvs
date Mon, 13 Aug 2007 11:36:19 +0200
parents abe6d1db359e
children 1ccc32a20af4
comparison
equal deleted inserted replaced
443:a8296e22da4e 444:576fb035e263
1811 1811
1812 Lisp lists are popular data structures in the C code as well as in 1812 Lisp lists are popular data structures in the C code as well as in
1813 Elisp. There are two sets of macros that iterate over lists. 1813 Elisp. There are two sets of macros that iterate over lists.
1814 @code{EXTERNAL_LIST_LOOP_@var{n}} should be used when the list has been 1814 @code{EXTERNAL_LIST_LOOP_@var{n}} should be used when the list has been
1815 supplied by the user, and cannot be trusted to be acyclic and 1815 supplied by the user, and cannot be trusted to be acyclic and
1816 nil-terminated. A @code{malformed-list} or @code{circular-list} error 1816 @code{nil}-terminated. A @code{malformed-list} or @code{circular-list} error
1817 will be generated if the list being iterated over is not entirely 1817 will be generated if the list being iterated over is not entirely
1818 kosher. @code{LIST_LOOP_@var{n}}, on the other hand, is faster and less 1818 kosher. @code{LIST_LOOP_@var{n}}, on the other hand, is faster and less
1819 safe, and can be used only on trusted lists. 1819 safe, and can be used only on trusted lists.
1820 1820
1821 Related macros are @code{GET_EXTERNAL_LIST_LENGTH} and 1821 Related macros are @code{GET_EXTERNAL_LIST_LENGTH} and
4808 they are used that are worth remembering are various elisp commands, as 4808 they are used that are worth remembering are various elisp commands, as
4809 for example @code{or}, @code{and}, @code{if}, @code{cond}, @code{while}, 4809 for example @code{or}, @code{and}, @code{if}, @code{cond}, @code{while},
4810 @code{setq}, etc., miscellaneous @code{gui_item_...} functions, 4810 @code{setq}, etc., miscellaneous @code{gui_item_...} functions,
4811 everything related to @code{eval} (@code{Feval_buffer}, @code{call0}, 4811 everything related to @code{eval} (@code{Feval_buffer}, @code{call0},
4812 ...) and inside @code{Fsignal}. The latter is used to handle signals, as 4812 ...) and inside @code{Fsignal}. The latter is used to handle signals, as
4813 for example the ones raised by every @code{QUITE}-macro triggered after 4813 for example the ones raised by every @code{QUIT}-macro triggered after
4814 pressing Ctrl-g. 4814 pressing Ctrl-g.
4815 4815
4816 @node garbage_collect_1, mark_object, Invocation, Garbage Collection - Step by Step 4816 @node garbage_collect_1, mark_object, Invocation, Garbage Collection - Step by Step
4817 @subsection @code{garbage_collect_1} 4817 @subsection @code{garbage_collect_1}
4818 @cindex @code{garbage_collect_1} 4818 @cindex @code{garbage_collect_1}
5388 @cindex mark method 5388 @cindex mark method
5389 A @dfn{mark} method. This is called during the marking stage and passed 5389 A @dfn{mark} method. This is called during the marking stage and passed
5390 a function pointer (usually the @code{mark_object()} function), which is 5390 a function pointer (usually the @code{mark_object()} function), which is
5391 used to mark an object. All Lisp objects that are contained within the 5391 used to mark an object. All Lisp objects that are contained within the
5392 object need to be marked by applying this function to them. The mark 5392 object need to be marked by applying this function to them. The mark
5393 method should also return a Lisp object, which should be either nil or 5393 method should also return a Lisp object, which should be either @code{nil} or
5394 an object to mark. (This can be used in lieu of calling 5394 an object to mark. (This can be used in lieu of calling
5395 @code{mark_object()} on the object, to reduce the recursion depth, and 5395 @code{mark_object()} on the object, to reduce the recursion depth, and
5396 consequently should be the most heavily nested sub-object, such as a 5396 consequently should be the most heavily nested sub-object, such as a
5397 long list.) 5397 long list.)
5398 5398
8111 @item 8111 @item
8112 All windows have three fields governing their contents: 8112 All windows have three fields governing their contents:
8113 these are @dfn{hchild} (a list of horizontally-arrayed children), 8113 these are @dfn{hchild} (a list of horizontally-arrayed children),
8114 @dfn{vchild} (a list of vertically-arrayed children), and @dfn{buffer} 8114 @dfn{vchild} (a list of vertically-arrayed children), and @dfn{buffer}
8115 (the buffer contained in a leaf window). Exactly one of 8115 (the buffer contained in a leaf window). Exactly one of
8116 these will be non-nil. Remember that @dfn{horizontally-arrayed} 8116 these will be non-@code{nil}. Remember that @dfn{horizontally-arrayed}
8117 means ``side-by-side'' and @dfn{vertically-arrayed} means 8117 means ``side-by-side'' and @dfn{vertically-arrayed} means
8118 @dfn{one above the other}. 8118 @dfn{one above the other}.
8119 8119
8120 @item 8120 @item
8121 Leaf windows also have markers in their @code{start} (the 8121 Leaf windows also have markers in their @code{start} (the
8122 first buffer position displayed in the window) and @code{pointm} 8122 first buffer position displayed in the window) and @code{pointm}
8123 (the window's stashed value of @code{point}---see above) fields, 8123 (the window's stashed value of @code{point}---see above) fields,
8124 while combination windows have nil in these fields. 8124 while combination windows have @code{nil} in these fields.
8125 8125
8126 @item 8126 @item
8127 The list of children for a window is threaded through the 8127 The list of children for a window is threaded through the
8128 @code{next} and @code{prev} fields of each child window. 8128 @code{next} and @code{prev} fields of each child window.
8129 8129
8529 8529
8530 @node Zero-Length Extents, Mathematics of Extent Ordering, Format of the Extent Info, Extents 8530 @node Zero-Length Extents, Mathematics of Extent Ordering, Format of the Extent Info, Extents
8531 @section Zero-Length Extents 8531 @section Zero-Length Extents
8532 8532
8533 Extents can be zero-length, and will end up that way if their endpoints 8533 Extents can be zero-length, and will end up that way if their endpoints
8534 are explicitly set that way or if their detachable property is nil 8534 are explicitly set that way or if their detachable property is @code{nil}
8535 and all the text in the extent is deleted. (The exception is open-open 8535 and all the text in the extent is deleted. (The exception is open-open
8536 zero-length extents, which are barred from existing because there is 8536 zero-length extents, which are barred from existing because there is
8537 no sensible way to define their properties. Deletion of the text in 8537 no sensible way to define their properties. Deletion of the text in
8538 an open-open extent causes it to be converted into a closed-open 8538 an open-open extent causes it to be converted into a closed-open
8539 extent.) Zero-length extents are primarily used to represent 8539 extent.) Zero-length extents are primarily used to represent