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

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

Re: Can I disable yank's automatic "set mark"


From: Rick
Subject: Re: Can I disable yank's automatic "set mark"
Date: Wed, 08 Dec 2010 15:35:28 -0000

On Wed, 10 Nov 2010 13:29:37 -0500, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:

>> Whenever I yank (ctrl-y) text into a buffer, the mark is automatically
>> set.  Is there any way to disable this behavior?
> 
> Not directly, no.  Here's how I found out:
>
>  [... yank code deleted]
> 
> So if you want to change it you have 2 solutions: create a new command
> `my-yank' which copies all the above code except for the push-mark call,
> or create a new command which calls `yank' and then undoes that push-mark,
> e.g.
> 
> (defun my-yank ()
>   "Put your description here."
>   (interactive)
>   (yank)
>   (pop-mark))
> 
> 
>         Stefan

Thank you! That's exactly what I need.

Rick



reply via email to

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