[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: confusion with defining keys
From: |
Stefan Monnier |
Subject: |
Re: confusion with defining keys |
Date: |
Wed, 11 Jun 2014 22:48:17 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
> It would seem there are some exceptions to that rule!
Nope, you just misunderstood the rule.
> (global-set-key [RET] 'newline-and-indent) ; (error "To bind the key
> RET, use \"\\r\", not [RET]")
What you write between [...] does not use the same syntax as what's
written in "..." (and neither is the same as what's written in (kbd
"...")).
E.g. instead of the above, you want
(global-set-key [?\r] 'newline-and-indent)
Similarly [M-SPC] should be [?\M-\s]
Stefan