help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Problem binding to a key


From: Rjjd
Subject: Re: Problem binding to a key
Date: Fri, 20 Apr 2007 16:14:29 GMT
User-agent: Thunderbird 1.5.0.10 (Windows/20070221)

weber wrote:
On 20 abr, 11:54, Cecil Westerhof <d...@dummy.nl> wrote:
I have the following two lines in my .emacs:
  (define-key global-map "\C-cw" 'clipboard-kill-ring-save)
  (define-key global-map "\C-x\C-kw" 'clipboard-kill-ring-save)

The first line is no problem, the second gives:
  error: "Key sequence C-x C-k w uses invalid prefix characters"

What I understood from 'Learning GNU Emacs' is the second way, the way you
should bind your own definitions. Why does it not work?

Because C-k already has another definition (killing text)
You have to "undefine" C-k with something like this:
(global-set-key "\C-k" nil)
Hope it helps,
weber

But doesn't Cecil need to unbind \C-x\C-k, and not merely \C-k?
C-x C-k runs the command edit-kbd-macro.

Regards,
Bob


reply via email to

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