# HG changeset patch # User Richard M. Stallman # Date 1026516662 0 # Node ID 469cf4d8b62bf3ccdff7f3d76fe0bc1c55a37dd8 # Parent 6cf0fbc1d7da7953ba569a15db4ccdae8f73537e Document binding `deactivate-mark' around something that modifies the buffer so as to keep the mark active. diff -r 6cf0fbc1d7da -r 469cf4d8b62b lispref/markers.texi --- 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