|
From: | Lennart Borgman (gmail) |
Subject: | Re: C-mode blows away may Ctrl-C binding with a prefix -- how to remap prefix? |
Date: | Sat, 19 Apr 2008 12:57:49 +0200 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 |
Eli Zaretskii wrote:
Date: Sat, 19 Apr 2008 10:23:43 +0200 From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> David Hansen wrote:On Fri, 18 Apr 2008 11:18:20 -0700 (PDT) lindahlb@hotmail.com wrote:I'm currently using Windows-esque key bindings for copy (Ctrl-c), cut (Ctrl-x) and paste (Ctrl-v). They work fine, except when I open a C/C+ + file. In the major mode, it remaps the (Ctrl-c) key to a keymap prefix. I want to remap this keymap prefix to another key and return the (Ctrl-c) mapping to my own copy command. How do I do this? I currently have a c-mode customization hook, but couldn't figure out how to do it there. Here is what I tried: (define-key c-mode-base-map "\C-c" 'smart-copy)Pretty all major modes use C-c as a prefix. Better get used to the `real' key bindings.If cua-mode does not work as expected it is a bug in Emacs.But I don't think the OP uses CUA Mode. I think he simply rebinds C-c, C-v, C-x, etc. to the copy/cut/paste functions.
Yes, you are probably right. Then the solution might simply be to use cua-mode.
[Prev in Thread] | Current Thread | [Next in Thread] |