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: calc-undo keybinding Date: Thu, 20 Jan 2011 10:53:22 -0500 Message-ID: References: <87pqrryjmf.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1295538828 7989 80.91.229.12 (20 Jan 2011 15:53:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 20 Jan 2011 15:53:48 +0000 (UTC) Cc: joakim@verona.se, Emacs developers To: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 20 16:53:42 2011 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 1PfwpN-000756-L9 for ged-emacs-devel@m.gmane.org; Thu, 20 Jan 2011 16:53:40 +0100 Original-Received: from localhost ([127.0.0.1]:58798 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfwpL-00012o-II for ged-emacs-devel@m.gmane.org; Thu, 20 Jan 2011 10:53:35 -0500 Original-Received: from [140.186.70.92] (port=41962 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfwpD-0000zb-UG for emacs-devel@gnu.org; Thu, 20 Jan 2011 10:53:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PfwpA-0002mt-0A for emacs-devel@gnu.org; Thu, 20 Jan 2011 10:53:25 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:52993 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pfwp9-0002mi-Ty for emacs-devel@gnu.org; Thu, 20 Jan 2011 10:53:23 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAO7oN01FpZLq/2dsb2JhbACkUHS+RYVQBIRvjjg X-IronPort-AV: E=Sophos;i="4.60,351,1291611600"; d="scan'208";a="88710860" Original-Received: from 69-165-146-234.dsl.teksavvy.com (HELO ceviche.home) ([69.165.146.234]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 20 Jan 2011 10:53:22 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 393E266102; Thu, 20 Jan 2011 10:53:22 -0500 (EST) In-Reply-To: <87pqrryjmf.fsf@gmail.com> (=?utf-8?B?IsWgdMSbcMOhbiBOxJtt?= =?utf-8?B?ZWMiJ3M=?= message of "Thu, 20 Jan 2011 11:06:32 +0100") 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:134823 Archived-At: >> --- lisp/calc/calc-ext.el 2011-01-16 02:21:30 +0000 >> +++ lisp/calc/calc-ext.el 2011-01-19 23:12:20 +0000 >> @@ -136,8 +136,7 @@ >> (define-key calc-mode-map "\C-w" 'calc-kill-region) >> (define-key calc-mode-map "\M-w" 'calc-copy-region-as-kill) >> (define-key calc-mode-map "\M-\C-w" 'kill-ring-save) >> - (define-key calc-mode-map "\C-_" 'calc-undo) >> - (define-key calc-mode-map "\C-xu" 'calc-undo) >> + (substitute-key-definition 'undo 'calc-undo calc-mode-map global-map) >> (define-key calc-mode-map "\M-\C-m" 'calc-last-args) >> >> (define-key calc-mode-map "a" nil) > Why not just use command remapping, i.e. > (define-key calc-mode-map [remap undo] 'calc-undo) > ? (It won't work on XEmacs AFAIK, but that's not a problem for you I'm > guessing.) That's an alternative, yes. Not knowing enough about how what calc-undo does, I can't judge whether that's preferable (which mostly depends on whether it's OK to render the real `undo' completely unreachable (other than via M-x undo) in those buffers). I'll let the Calc maintainer figure that one out. Stefan