tags:

views:

35

answers:

1

Hello,

I am using Emacs and most shortcuts work normally, but M-Del for deleting a word backwards produces either an error at the bottom of a `scan' error, and at other times moves the cursor a set of lines below. Any ideas why this may be happening? M-Del works fine for deleting forward words. (** from a comment made below it appear that the command is mapped to a down paragraph lisp function instead of delete a word backwards? How can I reset the mappings to the standard one?)

Best.

A: 

http://stackoverflow.com/questions/3541962/writing-lisp-emacs-key-binding-and-cannot-specify-the-delete-character/3543201#3543201

has the answer (by Gilles). It looks like there is a bug on some systems due to an overlap with a shell command shadow translating ESC-x to ESC C-d

it can be seen from running

M-x load-library edmacro M-x edmacro-insert-key M-del

giving ESC C-d

in the folder ~/.emacs.d/ creating a file init.el and inserting

(global-set-key [escape delete] 'backward-kill-word)

this though overrides all uses of ESC from M (meta key) to be translated as escape rendering common M-d, M-w, etc all unseen except for M-del

so the solution is to remap the faulty remapping back to the correct binding.

(global-set-key (kbd "M-C-d") 'backward-kill-word)

Best

Vass