all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Raoul Gough <jcmqtdxb@pzyg63192870.net>
To: help-gnu-emacs@gnu.org
Subject: Re: how to change C-x prefix to C-k in a clean way?
Date: Tue, 10 Mar 2009 22:50:43 +0000	[thread overview]
Message-ID: <m2k56x56ws.fsf@yahoo.co.uk> (raw)
In-Reply-To: gp5odv$10tp$1@colin2.muc.de

Alan Mackenzie <acm@muc.de> writes:

> In comp.emacs Xah Lee <xahlee@gmail.com> wrote:
>> On Mar 6, 9:21?pm, Teemu Likonen <tliko...@iki.fi> 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.


  parent reply	other threads:[~2009-03-10 22:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-07  3:27 how to change C-x prefix to C-k in a clean way? Xah Lee
2009-03-07  5:21 ` Teemu Likonen
2009-03-07 23:19   ` Xah Lee
2009-03-10 13:02     ` Alan Mackenzie
2009-03-10 18:42       ` Johan Bockgård
2009-03-10 22:50       ` Raoul Gough [this message]
2009-03-08 15:05 ` Michael Heerdegen
2009-03-11 15:36 ` rustom
2009-03-11 21:31   ` Xah Lee
2009-03-12 17:45     ` prad
  -- strict thread matches above, loose matches on Subject: below --
2009-03-12 13:40 Rustom Mody
     [not found] <mailman.3015.1237105221.31690.help-gnu-emacs@gnu.org>
2009-03-16  5:18 ` B. T. Raven
2009-03-16 13:17   ` rustom
2009-03-20  4:07     ` Xah Lee
2009-03-20 10:53     ` Rupert Swarbrick
2009-03-20  7:49 Rustom Mody

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2k56x56ws.fsf@yahoo.co.uk \
    --to=jcmqtdxb@pzyg63192870.net \
    --cc=RaoulGough@yahoo.co.uk \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.