diff options
| author | Luc Teirlinck | 2003-11-11 03:58:26 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2003-11-11 03:58:26 +0000 |
| commit | 409edc05695acae45695b4ea9bbb73cb7ab48f11 (patch) | |
| tree | fcfa7d4513bd89a18da09bf92d133f4c7644a359 | |
| parent | d63b2da83c08640096866ac592177d88b259c262 (diff) | |
| download | emacs-409edc05695acae45695b4ea9bbb73cb7ab48f11.tar.gz emacs-409edc05695acae45695b4ea9bbb73cb7ab48f11.zip | |
(Creating Markers): Specify insertion type of created markers. Add
xref to `Marker Insertion Types'. Second argument to `copy-marker' is
optional.
(Marker Insertion Types): Mention that most markers are created with
insertion type nil.
(The Mark): Correctly describe when `mark' signals an error.
(The Region): Correctly describe when `region-beginning' and
`region-end' signal an error.
| -rw-r--r-- | lispref/markers.texi | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/lispref/markers.texi b/lispref/markers.texi index e50dacd8829..eb576f235cd 100644 --- a/lispref/markers.texi +++ b/lispref/markers.texi | |||
| @@ -144,6 +144,9 @@ to the present position of point, or to the beginning or end of the | |||
| 144 | accessible portion of the buffer, or to the same place as another given | 144 | accessible portion of the buffer, or to the same place as another given |
| 145 | marker. | 145 | marker. |
| 146 | 146 | ||
| 147 | The next four functions all return markers with insertion type | ||
| 148 | @code{nil}. @xref{Marker Insertion Types}. | ||
| 149 | |||
| 147 | @defun make-marker | 150 | @defun make-marker |
| 148 | This function returns a newly created marker that does not point | 151 | This function returns a newly created marker that does not point |
| 149 | anywhere. | 152 | anywhere. |
| @@ -201,7 +204,7 @@ chapter. | |||
| 201 | @end example | 204 | @end example |
| 202 | @end defun | 205 | @end defun |
| 203 | 206 | ||
| 204 | @defun copy-marker marker-or-integer insertion-type | 207 | @defun copy-marker marker-or-integer &optional insertion-type |
| 205 | If passed a marker as its argument, @code{copy-marker} returns a | 208 | If passed a marker as its argument, @code{copy-marker} returns a |
| 206 | new marker that points to the same place and the same buffer as does | 209 | new marker that points to the same place and the same buffer as does |
| 207 | @var{marker-or-integer}. If passed an integer as its argument, | 210 | @var{marker-or-integer}. If passed an integer as its argument, |
| @@ -320,6 +323,10 @@ marker should do by setting its @dfn{insertion type}. Note that use of | |||
| 320 | @code{insert-before-markers} ignores markers' insertion types, always | 323 | @code{insert-before-markers} ignores markers' insertion types, always |
| 321 | relocating a marker to point after the inserted text. | 324 | relocating a marker to point after the inserted text. |
| 322 | 325 | ||
| 326 | Most functions that create markers, without explicitly specifying an | ||
| 327 | insertion type, create them with insertion type @code{nil}. Also, the | ||
| 328 | mark has, by default, insertion type @code{nil}. | ||
| 329 | |||
| 323 | @defun set-marker-insertion-type marker type | 330 | @defun set-marker-insertion-type marker type |
| 324 | This function sets the insertion type of marker @var{marker} to | 331 | This function sets the insertion type of marker @var{marker} to |
| 325 | @var{type}. If @var{type} is @code{t}, @var{marker} will advance when | 332 | @var{type}. If @var{type} is @code{t}, @var{marker} will advance when |
| @@ -432,10 +439,11 @@ programming. So we do not describe it here. | |||
| 432 | @cindex current buffer mark | 439 | @cindex current buffer mark |
| 433 | This function returns the current buffer's mark position as an integer. | 440 | This function returns the current buffer's mark position as an integer. |
| 434 | 441 | ||
| 435 | If the mark is inactive, @code{mark} normally signals an error. | 442 | If Transient Mark mode is enabled, @code{mark-even-if-inactive} is |
| 436 | However, if @var{force} is non-@code{nil}, then @code{mark} returns the | 443 | @code{nil} and and the mark is inactive, @code{mark} normally signals |
| 437 | mark position anyway---or @code{nil}, if the mark is not yet set for | 444 | an error. However, if @var{force} is non-@code{nil}, then @code{mark} |
| 438 | this buffer. | 445 | returns the mark position anyway---or @code{nil}, if the mark is not |
| 446 | yet set for this buffer. | ||
| 439 | @end defun | 447 | @end defun |
| 440 | 448 | ||
| 441 | @defun mark-marker | 449 | @defun mark-marker |
| @@ -617,20 +625,21 @@ Various functions operate on text delimited by point and the mark, but | |||
| 617 | only those functions specifically related to the region itself are | 625 | only those functions specifically related to the region itself are |
| 618 | described here. | 626 | described here. |
| 619 | 627 | ||
| 628 | The next two functions signal an error if the mark does not point | ||
| 629 | anywhere. If Transient Mark mode is enabled and | ||
| 630 | @code{mark-even-if-inactive} is @code{nil}, they also signal an error | ||
| 631 | if the mark is inactive. | ||
| 632 | |||
| 620 | @defun region-beginning | 633 | @defun region-beginning |
| 621 | This function returns the position of the beginning of the region (as | 634 | This function returns the position of the beginning of the region (as |
| 622 | an integer). This is the position of either point or the mark, | 635 | an integer). This is the position of either point or the mark, |
| 623 | whichever is smaller. | 636 | whichever is smaller. |
| 624 | |||
| 625 | If the mark does not point anywhere, an error is signaled. | ||
| 626 | @end defun | 637 | @end defun |
| 627 | 638 | ||
| 628 | @defun region-end | 639 | @defun region-end |
| 629 | This function returns the position of the end of the region (as an | 640 | This function returns the position of the end of the region (as an |
| 630 | integer). This is the position of either point or the mark, whichever is | 641 | integer). This is the position of either point or the mark, whichever is |
| 631 | larger. | 642 | larger. |
| 632 | |||
| 633 | If the mark does not point anywhere, an error is signaled. | ||
| 634 | @end defun | 643 | @end defun |
| 635 | 644 | ||
| 636 | Few programs need to use the @code{region-beginning} and | 645 | Few programs need to use the @code{region-beginning} and |