From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rick Newsgroups: gmane.emacs.help Subject: Re: Can I disable yank's automatic "set mark" Date: Thu, 11 Nov 2010 04:48:30 -0700 Organization: None Message-ID: <4cdbd80e$0$24189$c3e8da3$50776f34@news.astraweb.com> References: <4cda84d7$0$29178$c3e8da3$88b277c5@news.astraweb.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1291954359 4539 80.91.229.12 (10 Dec 2010 04:12:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Dec 2010 04:12:39 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 10 05:12:32 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQuLO-0001Yb-Qy for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Dec 2010 05:12:30 +0100 Original-Received: from localhost ([127.0.0.1]:36405 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQuLN-0000Uw-Qr for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 23:12:29 -0500 Original-Path: usenet.stanford.edu!news.glorb.com!news2.glorb.com!news.astraweb.com!border5.newsrouter.astraweb.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 28 Original-NNTP-Posting-Host: 47759782.news.astraweb.com Original-X-Trace: DXC=]KAhMJPL??^<>SSnB4kIGXL?0kYOcDh@ZTG5oCeeJ@lY\g^KX1`]9C]ki>@a>bjai\BghIF=diG]RQDI; 024faMZ:eSY]GH]g]QKe6oX0dRSIR Original-Xref: usenet.stanford.edu gnu.emacs.help:182337 X-Mailman-Approved-At: Thu, 09 Dec 2010 20:23:44 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:77320 Archived-At: On Wed, 10 Nov 2010 13:29:37 -0500, Stefan Monnier 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