From: Richard M. Stallman Date: Fri, 12 Jul 2002 23:31:02 +0000 (+0000) Subject: Document binding `deactivate-mark' around something that modifies the X-Git-Tag: ttn-vms-21-2-B4~14165 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ce218967c1fc2bc5a1ec96281d05d0e17058e28c;p=emacs.git Document binding `deactivate-mark' around something that modifies the buffer so as to keep the mark active. --- diff --git a/lispref/markers.texi b/lispref/markers.texi index e18e987bf22..508955e39df 100644 --- a/lispref/markers.texi +++ b/lispref/markers.texi @@ -558,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