From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: `mouse-save-then-kill' changes Date: Sun, 7 Nov 2010 12:36:42 -0800 Message-ID: References: <59B673DED28140FEBB895891578B6202@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1289162244 14950 80.91.229.12 (7 Nov 2010 20:37:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 7 Nov 2010 20:37:24 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Stefan Monnier'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 07 21:37:17 2010 Return-path: Envelope-to: ged-emacs-devel@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 1PFBzE-00012A-DB for ged-emacs-devel@m.gmane.org; Sun, 07 Nov 2010 21:37:12 +0100 Original-Received: from localhost ([127.0.0.1]:44583 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PFBzD-0008JN-Tw for ged-emacs-devel@m.gmane.org; Sun, 07 Nov 2010 15:37:11 -0500 Original-Received: from [140.186.70.92] (port=59505 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PFBz8-0008GX-Qx for emacs-devel@gnu.org; Sun, 07 Nov 2010 15:37:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PFBz7-0003bK-Gn for emacs-devel@gnu.org; Sun, 07 Nov 2010 15:37:06 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:40663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PFBz7-0003a8-BV for emacs-devel@gnu.org; Sun, 07 Nov 2010 15:37:05 -0500 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id oA7Kb03v013591 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 7 Nov 2010 20:37:01 GMT Original-Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id oA7KQp99022632; Sun, 7 Nov 2010 20:36:58 GMT Original-Received: from abhmt020.oracle.com by acsmt353.oracle.com with ESMTP id 756875891289162200; Sun, 07 Nov 2010 12:36:40 -0800 Original-Received: from dradamslap1 (/10.159.221.90) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 07 Nov 2010 12:36:39 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Act+r3sbIwrLrQe/TmyXgLzhhQGhRwACecCA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:132431 Archived-At: > > Now (Emacs 24) I have to (a) duplicate all of the code of > > `mouse-save-then-kill', (b) replace the 3 lines that delete or kill > > the region by a call to `foobar', and (c) change references to > > `mouse-save-then-kill' within the new command to the new command > > name - e.g. places where the code checks `(eq last-command > > 'mouse-save-then-kill)'. > > Maybe you can use buffer-substring-filters instead? Thanks for suggesting something. But I don't really see how that var might fit in here. Can you elaborate? That var is used only by `filter-buffer-substring'. That function is used in `mouse-save-then-kill', but only in the calls to `kill-new', which are places unrelated to the part that kills or deletes the region. So I don't see how that var would help. [BTW - Dunno whether the suggested use of `b-s-f' would be only for Emacs 24+ or also for other versions (since I don't know how you're suggesting to use it). But if it is for Emacs 24+ then I guess you mean `filter-buffer-substring-functions' - `b-s-f' is now obsolete. ;-) And if for other versions also then it won't work for Emacs 20 or 21 (no such var).]