2

I have this in my init.el:

(global-set-key (kbd "C-h") 'backward-delete-char)

Matlab mode resets my global setting back to "help", and I can't get to use "local-set-key" in the buffer - it doesn't end key sequence when I press C-h, waiting to input of the next character (C-h-).

Is there a way to interactively fix it?

Rogach
  • 26,050
  • 21
  • 93
  • 172

1 Answers1

2

One strategy would be to add a hook for your matlab mode:

(add-hook 'matlab-mode-hook
  (lambda ()
    (local-set-key (kbd "C-h") 'backward-delete-char)))

As for interactively fixing it, I'm not aware of anyway to interactively give C-h as input to local-set-key...

Rafe Kettler
  • 75,757
  • 21
  • 156
  • 151