changeset 46339:469cf4d8b62b

Document binding `deactivate-mark' around something that modifies the buffer so as to keep the mark active.
author Richard M. Stallman <rms@gnu.org>
date Fri, 12 Jul 2002 23:31:02 +0000
parents 6cf0fbc1d7da
children dd413d2af8ad
files lispref/markers.texi
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lispref/markers.texi	Fri Jul 12 23:30:17 2002 +0000
+++ b/lispref/markers.texi	Fri Jul 12 23:31:02 2002 +0000
@@ -558,6 +558,16 @@
 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