From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.devel Subject: Re: [EPeterson@mcdonaldbradley.com: Kill ring leak in winemacs macros] Date: Wed, 03 Aug 2005 17:12:25 -0600 Message-ID: References: <34161.128.165.123.83.1123097221.squirrel@webmail.lanl.gov> <42F1208D.1070307@student.lu.se> <34340.128.165.123.83.1123102769.squirrel@webmail.lanl.gov> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1123111646 30972 80.91.229.2 (3 Aug 2005 23:27:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 Aug 2005 23:27:26 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 04 01:27:26 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E0SdQ-0002X3-MV for ged-emacs-devel@m.gmane.org; Thu, 04 Aug 2005 01:26:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E0Sfw-0001Il-Jy for ged-emacs-devel@m.gmane.org; Wed, 03 Aug 2005 19:29:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E0SbU-0000Tm-I7 for emacs-devel@gnu.org; Wed, 03 Aug 2005 19:24:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E0SbK-0000Od-En for emacs-devel@gnu.org; Wed, 03 Aug 2005 19:24:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E0SbJ-0000Mb-F1 for emacs-devel@gnu.org; Wed, 03 Aug 2005 19:24:41 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1E0SeL-0002wd-7c for emacs-devel@gnu.org; Wed, 03 Aug 2005 19:27:49 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1E0SQP-0001Kl-Ra for emacs-devel@gnu.org; Thu, 04 Aug 2005 01:13:25 +0200 Original-Received: from 207.167.42.60 ([207.167.42.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 04 Aug 2005 01:13:25 +0200 Original-Received: from ihs_4664 by 207.167.42.60 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 04 Aug 2005 01:13:25 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 55 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.60 User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: <34340.128.165.123.83.1123102769.squirrel@webmail.lanl.gov> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:41465 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41465 Stuart D. Herring wrote: > The variables `interprogram-cut-function' and > `interprogram-paste-function' can be set to nil to suppress the > synchronization, but this isn't just a customization issue (as in > "this isn't a problem, you should set X to Y") because the issue only > arises during keyboard macro execution. If we want to support this, > presumably we want a new variable thusly: > > (defcustom macro-private-kills nil > "*Non-nil means kill and yank commands executed by a keyboard macro > don't interact with window system cut and paste facilities." > :type 'boolean > :group 'killing > :version "22.1") > > Then `kill-new', `kill-append', and `current-kill' would be modified to > ignore `interprogram-*-function' if `macro-private-kills' is set and a > keyboard macro is executing. It would be simpler to temporarily bind the interprogram-*-functions variables to nil in execute-kbd-macro. > Better variable names and/or docstrings are of course welcome. How about: (defcustom kbd-macro-disable-interprogram-functions nil "Disable `interprogram-cut-function' and `interprogram-paste-function' while executing a keyboard macro. This allows keyboard macros to run independently of other programs." :type 'boolean :group 'killing) ; no keyboard macro or window system group (defadvice execute-kbd-macro (around kbd-macro-disable-interprogram-functions activate) "Respect `kbd-macro-disable-interprogram-fuctions'." (let ((interprogram-cut-function (if kbd-macro-disable-interprogram-functions nil interprogram-cut-function)) (interprogram-paste-function (if kbd-macro-disable-interprogram-functions nil interprogram-paste-function))) ad-do-it)) Or perhaps -ignore- is preferred over -disable- in variable names. P.S. I know that execute-kbd-macro is a built-in function defined in src/macros.c, and defadvice is not allowed in the lisp/*.el files. This is for illustration only. -- Kevin Rodgers