help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `yank-and-mark` command?


From: Stefan Monnier
Subject: Re: `yank-and-mark` command?
Date: Sun, 05 Jul 2015 14:35:42 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> I am trying to mimic C-y C-x C-x.  I have considered using
> a keyboard macro, but I would prefer a Lisp alternative.

That doesn't say in which way your code doesn't work like you want.
But my guess is that the yank sets deactivate-mark and
exchange-point-and-mark doesn't reset it, so after running the command
the mark is deactivated by the default code that deactivates the mark
after buffer modifications.

So you'll want to add (setq deactivate-mark nil) either before or after
exchange-point-and-mark.


        Stefan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]