[Top][All Lists]

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

Re: how to change C-x prefix to C-k in a clean way?

From: Raoul Gough
Subject: Re: how to change C-x prefix to C-k in a clean way?
Date: Tue, 10 Mar 2009 22:50:43 +0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (darwin)

Alan Mackenzie <address@hidden> writes:

> In comp.emacs Xah Lee <address@hidden> wrote:
>> On Mar 6, 9:21?pm, Teemu Likonen <address@hidden> wrote:
>>> On 2009-03-06 19:27 (-0800), Xah Lee wrote:
>>> > is there a way to remap all the C-x key to another, say C-k?
>>> I think it's simply
>>> ? ? (global-set-key (kbd "C-k") ctl-x-map)
>>> See (info "(elisp) Prefix Keys")
>> that doesn't seems to work though.
>> I was excited for a moment, then it turns out not working.
>> When you do C-h v, it still consider C-x a prefix even if you set it
>> to nil...
> After that, bind C-x to whatever you want in the global map.  Repeat
> for all other existing keymaps (mapatoms and keymap-p are your friends).

I started off down that path once, because I wanted C-j to work like
C-x in all modes. However, I now do it like this instead:

(keyboard-translate ?\C-j ?\C-x) ;; Make C-j do C-x for easier typing

To get the kill-region bound to C-x in all cases, I think you'd just
have to do this:

(keyboard-translate ?\C-x ?\M-w)

In my case, choosing C-j was actually a little unfortunate, because in
some modes the original meaning of C-j is useful (mainly when it has a
meaning distinct from ENTER). I probably should have gone with C-k,
but now I'm used to C-j I don't want to change :-)

[followups set to comp.emacs only]

Raoul Gough.

reply via email to

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