unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14392: 24.3.50; VHDL mode rebinds DEL and M-DEL
@ 2013-05-12 16:27 Dima Kogan
  2013-05-12 16:51 ` Eli Zaretskii
  2013-05-18  0:26 ` Glenn Morris
  0 siblings, 2 replies; 4+ messages in thread
From: Dima Kogan @ 2013-05-12 16:27 UTC (permalink / raw)
  To: 14392

[-- Attachment #1: Type: text/plain, Size: 953 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-vhdl-mode-removed-key-bindings-not-specific-to-VHDL.patch --]
[-- Type: text/x-diff, Size: 1319 bytes --]

From 16a4de34ef7ee0986ef04cd90d1657f977c701e7 Mon Sep 17 00:00:00 2001
From: Dima Kogan <dima@secretsauce.net>
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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-18  0:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-12 16:27 bug#14392: 24.3.50; VHDL mode rebinds DEL and M-DEL Dima Kogan
2013-05-12 16:51 ` Eli Zaretskii
2013-05-12 22:17   ` Dima Kogan
2013-05-18  0:26 ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).