]> code.delx.au - gnu-emacs/blobdiff - lispref/markers.texi
*** empty log message ***
[gnu-emacs] / lispref / markers.texi
index 0fa549bdd1639b738d00e269ee8a31967e575e6f..dec9396a7877d394dd3dd043da8e4178d9e356ec 100644 (file)
@@ -1,6 +1,7 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998 Free Software Foundation, Inc. 
+@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999
+@c   Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../info/markers
 @node Markers, Text, Positions, Top
@@ -136,7 +137,7 @@ integer or floating point) or a marker, @code{nil} otherwise.
 @end defun
 
 @node Creating Markers
-@section Functions That Create Markers
+@section Functions that Create Markers
 
   When you create a new marker, you can make it point nowhere, or point
 to the present position of point, or to the beginning or end of the
@@ -302,6 +303,12 @@ This function returns the buffer that @var{marker} points into, or
 @end example
 @end defun
 
+@defun buffer-has-markers-at position
+@tindex buffer-has-markers-at
+This function returns @code{t} if one or more markers
+point at position @var{position} in the current buffer.
+@end defun
+
 @node Marker Insertion Types
 @section Marker Insertion Types
 
@@ -314,15 +321,13 @@ marker should do by setting its @dfn{insertion type}.  Note that use of
 relocating a marker to point after the inserted text.
 
 @defun set-marker-insertion-type marker type
-@tindex set-marker-insertion-type
 This function sets the insertion type of marker @var{marker} to
-@var{type}.  If @var{type} is @code{t}, @var{marker} will advances when
-text is inserted at it.  If @var{type} is @code{nil}, @var{marker} does
-not advance when text is inserted there.
+@var{type}.  If @var{type} is @code{t}, @var{marker} will advance when
+text is inserted at its position.  If @var{type} is @code{nil},
+@var{marker} does not advance when text is inserted there.
 @end defun
 
 @defun marker-insertion-type marker
-@tindex marker-insertion-type
 This function reports the current insertion type of @var{marker}.
 @end defun
 
@@ -419,6 +424,10 @@ mark on the mark ring.  The variable @code{mark-ring-max} specifies the
 maximum number of entries in the mark ring; once the list becomes this
 long, adding a new element deletes the last element.
 
+  There is also a separate global mark ring, but that is used only in a
+few particular user-level commands, and is not relevant to Lisp
+programming.  So we do not describe it here.
+
 @defun mark &optional force
 @cindex current buffer mark
 This function returns the current buffer's mark position as an integer.
@@ -549,6 +558,16 @@ command loop deactivates the mark after the command returns (if
 Transient Mark mode is enabled).  All the primitives that change the
 buffer set @code{deactivate-mark}, to deactivate the mark when the
 command is finished.
+
+To write Lisp code that modifies the buffer without causing
+deactivation of the mark at the end of the command, bind
+@code{deactivate-mark} to @code{nil} around the code that does the
+modification.  For example:
+
+@example
+(let (deactivate-mark)
+  (insert " "))
+@end example
 @end defvar
 
 @defun deactivate-mark
@@ -576,7 +595,7 @@ marks of the current buffer, most recent first.
 @example
 @group
 mark-ring
-@result{} (#<marker at 11050 in markers.texi> 
+@result{} (#<marker at 11050 in markers.texi>
     #<marker at 10832 in markers.texi>
     @dots{})
 @end group