Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

bug#14392: 24.3.50; VHDL mode rebinds DEL and M-DEL

1 view
Skip to first unread message

Dima Kogan

unread,
May 12, 2013, 12:27:01 PM5/12/13
to 14...@debbugs.gnu.org
I'm using a very recent build of emacs from source:

GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars)
of 2013-04-27 on dex, modified by Debian
(emacs-snapshot package, version 2:20130427-1)
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
System Description: Debian GNU/Linux 7.0 (wheezy)

VHDL mode sets up many of its own key bindings. Two of these bindings
aren't really VHDL specific, but rather represent user preferences:

(define-key vhdl-mode-map [delete] 'delete-char)
(define-key vhdl-mode-map [(meta delete)] 'kill-word))

These redefine the behaviour of DEL and M-DEL in VHDL mode in a way
that's not specific to VHDL. The new behavior of M-DEL is different from
the emacs default, which is to kill backward, not forward. There's no
reason to have this in VHDL mode, and it acts only to surprise users
with non-convention behavior.

The attached patch removes these bindings.

0001-vhdl-mode-removed-key-bindings-not-specific-to-VHDL.patch

Eli Zaretskii

unread,
May 12, 2013, 12:51:18 PM5/12/13
to Dima Kogan, 14...@debbugs.gnu.org
> From: Dima Kogan <di...@secretsauce.net>
> Date: Sun, 12 May 2013 09:27:01 -0700
>
> (define-key vhdl-mode-map [delete] 'delete-char)
> (define-key vhdl-mode-map [(meta delete)] 'kill-word))
>
> These redefine the behaviour of DEL and M-DEL in VHDL mode in a way
> that's not specific to VHDL. The new behavior of M-DEL is different from
> the emacs default, which is to kill backward, not forward.

The above bindings bind 'delete', not DEL, which is a different key.



Dima Kogan

unread,
May 12, 2013, 6:17:52 PM5/12/13
to 14...@debbugs.gnu.org
Thanks for looking, Eli. You're right, they are different. For some
yet-unknown reason I was seeing those lines break my M-backspace
binding. Restarting with 'emacs -Q' made it work, even with those lines
enabled.

Regardless, I do think the patch is appropriate. Suppose a user has
customized those particular keys in their .emacs to have some particular
global binding. Why would it be desirable to override those
customizations for VHDL?



Glenn Morris

unread,
May 17, 2013, 8:26:40 PM5/17/13
to Dima Kogan, Reto Zimmermann, 14...@debbugs.gnu.org
Dima Kogan wrote:

> VHDL mode sets up many of its own key bindings. Two of these bindings
> aren't really VHDL specific, but rather represent user preferences:
>
> (define-key vhdl-mode-map [delete] 'delete-char)
> (define-key vhdl-mode-map [(meta delete)] 'kill-word))

Thanks; removed.

BTW, there is no need for vhdl-template-map-init, vhdl-model-map-init,
vhdl-mode-map-init, ... to exist. The variable can simply be initialized
in the defvar in the normal way.



0 new messages