0

Here is my key binding.
I want to set C-h to delete-backward-char in all modes, but in octave mode, when I pressed C-h, it shows C-h (Type ? for further options)-. So I add the last 3 lines in my .emacs file, but it doesn't work. C-h still works as the help function.

(global-set-key (kbd "C-?") 'help-command)
(global-set-key (kbd "C-h") 'delete-backward-char)
(define-key octave-mode-map (kbd "C-h") nil)
(define-key octave-mode-map (kbd "C-h a") nil)
(define-key octave-mode-map (kbd "C-h d") nil)
Drew
  • 29,895
  • 7
  • 74
  • 104
Ladih
  • 791
  • 1
  • 12
  • 22

1 Answers1

1

octave.el appears to set those bindings in three different keymaps:

  • octave-mode-map
  • inferior-octave-mode-map
  • octave-help-mode-map

You might also refer to Globally override key binding in Emacs

Community
  • 1
  • 1
phils
  • 71,335
  • 11
  • 153
  • 198