So I have a custom .emacs file that I have a series of key strokes bound to. The specific key stroke that I'm speaking of is C-d
which I have bound to left-word
via the line (global-set-key (kbd "C-d") 'left-word)
This works fine for any major mode that I've used except for java-mode
. For some reason, when I'm in java-mode
, the key becomes bound to c-electric-delete-forward
.
Anyone have any idea as to why this key binding override works in all major modes except for Java?
C-d
your global binding does not take effect. Presumablyjava-mode-map
does so. You're probably looking for stackoverflow.com/questions/683425/… but I recommend also reading masteringemacs.org/article/mastering-key-bindings-emacs – phils Nov 10 '17 at 3:52