[Top][All Lists]

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

Re: confusion with defining keys

From: Emanuel Berg
Subject: Re: confusion with defining keys
Date: Thu, 12 Jun 2014 16:17:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> 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 "...")).

All of those seem to work:

(global-set-key (kbd "M-RET") 'find-file-at-line) ; 1
(global-set-key "\M-\r"       'find-file-at-line) ; 2
(global-set-key [?\M-\r]      'find-file-at-line) ; 3

But another thing, when you do

(global-set-key [M-RET] 'find-file-at-line)

it says

(error "To bind the key M-RET, use \"\\M-\\r\", not [M-RET]")

- that should indicate "\M-\r", right? (example 2)

So why does the [...] syntax recommend the "..."
syntax, if the "..." is the one outdated/incomplete and
[...] the one modern/universal?

underground experts united:

reply via email to

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