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

From: Dima Kogan <[email-masked]>
Date: Sun, 12 May 2013 09:27:01 -0700

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.

>From 16a4de34ef7ee0986ef04cd90d1657f977c701e7 Mon Sep 17 00:00:00 2001
From: Dima Kogan <[email-masked]>
Date: Sun, 12 May 2013 09:20:19 -0700
Subject: [PATCH] vhdl mode: removed key bindings not specific to VHDL

This mode was binding [delete] to 'delete-char and [(meta delete)] to
'kill-word. These have nothing to do with VHDL and everything to do with a
particular user's preferences. These should go into a user's .emacs instead
---
 lisp/progmodes/vhdl-mode.el |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 1a7ecb5..71b3444 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -2723,9 +2723,6 @@ STRING are replaced by `-' and substrings are converted to lower case."
   (define-key vhdl-mode-map "\M-^"	   'vhdl-delete-indentation)
   ;; backspace/delete key bindings
   (define-key vhdl-mode-map [backspace]	   'backward-delete-char-untabify)
-  (unless (boundp 'delete-key-deletes-forward) ; XEmacs variable
-    (define-key vhdl-mode-map [delete]	     'delete-char)
-    (define-key vhdl-mode-map [(meta delete)] 'kill-word))
   ;; mode specific key bindings
   (define-key vhdl-mode-map "\C-c\C-m\C-e" 'vhdl-electric-mode)
   (define-key vhdl-mode-map "\C-c\C-m\C-s" 'vhdl-stutter-mode)
-- 
1.7.10.4