Go to the first, previous, next, last section, table of contents.


Mark Relocation

An important feature of marks is that they always point to the same character, even when the buffer has been modified, changing the position of the character (i.e. if some text is deleted from somewhere before the character its position will probably change).

Every time a buffer is modified each mark which points to a character in that buffer is examined and then, if necessary, the position it points to is changed to take account of the buffer's new state.

Basically, what happens is that each mark will try to point at the same character all the time. If some text is inserted at the position of the mark the mark's position will be advanced to the end of the insertion and hence the original character.

The only time the mark will not point at the same character is when the character is deleted from the buffer. In this case the mark will point to the start of the deletion.


Go to the first, previous, next, last section, table of contents.