|
From: | Le Wang |
Subject: | Re: restore region after replace-string |
Date: | Sun, 16 Jan 2011 18:28:21 +0800 |
Variable: deactivate-markIf an editor command sets this variable non-
nil
, then the editor command loop deactivates the mark after the command returns (if Transient Mark mode is enabled). All the primitives that change the buffer setdeactivate-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
deactivate-mark
tonil
around the code that does the modification. For example:(let (deactivate-mark)(insert " "))
--
[Prev in Thread] | Current Thread | [Next in Thread] |