On Sat, Jan 15, 2011 at 9:23 PM, LanX wrote: > Can anybody shed any light on this, or point me in a better direction? I had to solve this recently -- keeping the region active after a command modifies the buffer. The relevant documentation is here: http://www.gnu.org/s/emacs/manual/html_node/elisp/The-Mark.html Variable: *deactivate-mark* If 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 set 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 deactivate-mark to nil around the code that does the modification. For example: (let (deactivate-mark) (insert " ")) -- Le