From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: `mouse-save-then-kill' changes Date: Sun, 07 Nov 2010 22:38:54 -0500 Message-ID: References: <59B673DED28140FEBB895891578B6202@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1289187546 4033 80.91.229.12 (8 Nov 2010 03:39:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 8 Nov 2010 03:39:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 08 04:39:02 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 1PFIZS-0001Mw-5U for ged-emacs-devel@m.gmane.org; Mon, 08 Nov 2010 04:39:02 +0100 Original-Received: from localhost ([127.0.0.1]:50909 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PFIZR-0005GO-B7 for ged-emacs-devel@m.gmane.org; Sun, 07 Nov 2010 22:39:01 -0500 Original-Received: from [140.186.70.92] (port=59268 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PFIZN-0005GC-5X for emacs-devel@gnu.org; Sun, 07 Nov 2010 22:38:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PFIZM-0004la-4K for emacs-devel@gnu.org; Sun, 07 Nov 2010 22:38:57 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:46916 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PFIZM-0004lT-29 for emacs-devel@gnu.org; Sun, 07 Nov 2010 22:38:56 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar0IAKP/1kxMCpqE/2dsb2JhbAChBX9yuWSFSASEWI1a X-IronPort-AV: E=Sophos;i="4.58,312,1286164800"; d="scan'208";a="81884078" Original-Received: from 76-10-154-132.dsl.teksavvy.com (HELO pastel.home) ([76.10.154.132]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 07 Nov 2010 22:38:54 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 23A76A86CC; Sun, 7 Nov 2010 22:38:54 -0500 (EST) In-Reply-To: (Drew Adams's message of "Sun, 7 Nov 2010 12:36:42 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:132433 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? I obviously can't, since I don't know what you're actually doing. This said, rather than ask us to write the code differently so that you can override an internal function (which is likely to get renamed/inlined/changed at some point in the future), I recommend you ask for a hook instead. Stefan