0

I use C-j for 'backward-char; however, when editing a .asm file it overwrites C-j to insert new line.

How do I disable this, and/or rebind to 'backward-char.

2 Answers2

3

This should do the trick for you:

(eval-after-load "asm-mode"
    '(define-key asm-mode-map (kbd "C-j") 'backward-delete-char))

(put that in your .emacs).

Trey Jackson
  • 73,529
  • 11
  • 197
  • 229
0

Try a mode-specific hook:

(defun my-asm-mode-hook ()
   (local-set-key (kbd "C-j") 'backward-delete-char))
(add-hook 'asm-mode-hook 'my-asm-mode-hook)
Lindydancer
  • 25,428
  • 4
  • 49
  • 68