emacs-devel
[Top][All Lists]
Advanced

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

Re: A possible bug in the use of "\C-m"/[return] in define-key


From: Stefan Monnier
Subject: Re: A possible bug in the use of "\C-m"/[return] in define-key
Date: Tue, 29 Apr 2008 23:30:59 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> I just noticed that

>   (define-key js2-mode-map [return] #'js2-enter-key)
>   (use-local-map js2-mode-map)

> overrides

>   (define-key viper-vi-basic-map "\C-m" 'viper-next-line-at-bol)

> even though viper-vi-basic-map is managed in `emulation-mode-map-alists'.

> I mean that when I type RET I get js2-enter-key, not viper-next-line-at-bol.

> Something is obviously wrong - somewhere, but where?

js2 should probably not bind `return' but "\C-m".
By binding `return' it asks Emacs to distinguish `return' from C-m.
Of course under ttys `return' doesn't exist, only C-m does so js2's
binding won't work there.


        Stefan




reply via email to

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