emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: calc-undo keybinding


From: Stefan Monnier
Subject: Re: calc-undo keybinding
Date: Thu, 20 Jan 2011 10:53:22 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>> --- 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]