No. M-DEL
is bound to the function backward-kill-word
, which calls kill-region
. Anything that calls kill-region
puts the killed text into the kill-ring
, and also into the system clipboard. This is what differentiates the “kill commands” from commands that merely delete text from the buffer.
You could call delete-region
instead, or you could paste from the clipboard before killing any text.
I recommend the latter, though you may also want to know about the exchange-point-and-mark
command. Yanking text will set the mark just before inserting the yanked text, so you can yank something, run exchange-point-and-mark
(bound to C-x C-x
by default) to go back to where you started, then call backward-kill-word
. This should do what you want.
There is no backward-delete-word
, but it is trivial to write it yourself if you really want it:
(defun backward-delete-word (arg)
"Delete characters backward until encountering the beginning of a word.
With argument ARG, do this that many times."
(interactive "p")
(delete-word (- arg)))
(defun delete-word (arg)
"Delete characters forward until encountering the end of a word.
With argument ARG, do this that many times."
(interactive "p")
(delete-region (point) (progn (forward-word arg) (point))))