aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck2003-11-11 03:58:26 +0000
committerLuc Teirlinck2003-11-11 03:58:26 +0000
commit409edc05695acae45695b4ea9bbb73cb7ab48f11 (patch)
treefcfa7d4513bd89a18da09bf92d133f4c7644a359
parentd63b2da83c08640096866ac592177d88b259c262 (diff)
downloademacs-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.texi27
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
144accessible portion of the buffer, or to the same place as another given 144accessible portion of the buffer, or to the same place as another given
145marker. 145marker.
146 146
147The 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
148This function returns a newly created marker that does not point 151This function returns a newly created marker that does not point
149anywhere. 152anywhere.
@@ -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
205If passed a marker as its argument, @code{copy-marker} returns a 208If passed a marker as its argument, @code{copy-marker} returns a
206new marker that points to the same place and the same buffer as does 209new 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
321relocating a marker to point after the inserted text. 324relocating a marker to point after the inserted text.
322 325
326Most functions that create markers, without explicitly specifying an
327insertion type, create them with insertion type @code{nil}. Also, the
328mark has, by default, insertion type @code{nil}.
329
323@defun set-marker-insertion-type marker type 330@defun set-marker-insertion-type marker type
324This function sets the insertion type of marker @var{marker} to 331This 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
433This function returns the current buffer's mark position as an integer. 440This function returns the current buffer's mark position as an integer.
434 441
435If the mark is inactive, @code{mark} normally signals an error. 442If Transient Mark mode is enabled, @code{mark-even-if-inactive} is
436However, 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
437mark position anyway---or @code{nil}, if the mark is not yet set for 444an error. However, if @var{force} is non-@code{nil}, then @code{mark}
438this buffer. 445returns the mark position anyway---or @code{nil}, if the mark is not
446yet 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
617only those functions specifically related to the region itself are 625only those functions specifically related to the region itself are
618described here. 626described here.
619 627
628The next two functions signal an error if the mark does not point
629anywhere. If Transient Mark mode is enabled and
630@code{mark-even-if-inactive} is @code{nil}, they also signal an error
631if the mark is inactive.
632
620@defun region-beginning 633@defun region-beginning
621This function returns the position of the beginning of the region (as 634This function returns the position of the beginning of the region (as
622an integer). This is the position of either point or the mark, 635an integer). This is the position of either point or the mark,
623whichever is smaller. 636whichever is smaller.
624
625If 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
629This function returns the position of the end of the region (as an 640This function returns the position of the end of the region (as an
630integer). This is the position of either point or the mark, whichever is 641integer). This is the position of either point or the mark, whichever is
631larger. 642larger.
632
633If 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