Mercurial > emacs
comparison lispref/positions.texi @ 61594:7a990909b5f9
(Positions): Clarify converting marker to integer.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 17 Apr 2005 15:46:33 +0000 |
parents | 951cb9c59174 |
children | 60e0429c79b1 |
comparison
equal
deleted
inserted
replaced
61593:6654a6208131 | 61594:7a990909b5f9 |
---|---|
13 (or before the first character, or after the last character), so we can | 13 (or before the first character, or after the last character), so we can |
14 speak of the character before or after a given position. However, we | 14 speak of the character before or after a given position. However, we |
15 often speak of the character ``at'' a position, meaning the character | 15 often speak of the character ``at'' a position, meaning the character |
16 after that position. | 16 after that position. |
17 | 17 |
18 Positions are usually represented as integers starting from 1, but can | 18 Positions are usually represented as integers starting from 1, but |
19 also be represented as @dfn{markers}---special objects that relocate | 19 can also be represented as @dfn{markers}---special objects that |
20 automatically when text is inserted or deleted so they stay with the | 20 relocate automatically when text is inserted or deleted so they stay |
21 surrounding characters. Functions that expect an argument to be a | 21 with the surrounding characters. Functions that expect an argument to |
22 position (an integer), but accept a marker as a substitute, normally | 22 be a position (an integer), but accept a marker as a substitute, |
23 ignore the marker buffer. Of course, markers used this way usually | 23 normally ignore which buffer the marker points into; they convert the |
24 point to a position in the buffer that the function operates on, but | 24 marker to an integer, and use that integer, exactly as if you had |
25 that is entirely the programmer's responsibility. @xref{Markers}. | 25 passed the integer as the argument. Markers used this way usually |
26 point to a position in the buffer that the function will operate on, | |
27 but if not, they are converted to integers anyway. @xref{Markers}. | |
26 | 28 |
27 See also the ``field'' feature (@pxref{Fields}), which provides | 29 See also the ``field'' feature (@pxref{Fields}), which provides |
28 functions that are used by many cursor-motion commands. | 30 functions that are used by many cursor-motion commands. |
29 | 31 |
30 @menu | 32 @menu |