According to the documentation:
<C-delete>
runs the command kill-word (found in global-map), which is
an interactive compiled Lisp function in ‘simple.el’
.
It is bound to <C-delete>, M-d
.
(kill-word ARG)
Kill characters forward until encountering the end of a word. With
argument ARG, do this that many times.
Now, let's browse the source code:
(defun kill-word (arg)
"Kill characters forward until encountering the end of a word.
With argument ARG, do this that many times."
(interactive "p")
(kill-region (point) (progn (forward-word arg) (point))))
Then, inside the documentation for the kill-region
function we find:
Kill ("cut") text between point and mark.
This deletes the text from the buffer and saves it in the kill ring
.
The command [yank] can retrieve it from there. (If you want to save
the region without killing it, use [kill-ring-save].)
[...]
Lisp programs should use this function for killing text. (To delete
text, use delete-region
.)
Now, if you want to go further, this is some function you can use, for deleting without copying to kill-ring:
(defun my-delete-word (arg)
"Delete characters forward until encountering the end of a word.
With argument, do this that many times.
This command does not push text to `kill-ring'."
(interactive "p")
(delete-region
(point)
(progn
(forward-word arg)
(point))))
(defun my-backward-delete-word (arg)
"Delete characters backward until encountering the beginning of a word.
With argument, do this that many times.
This command does not push text to `kill-ring'."
(interactive "p")
(my-delete-word (- arg)))
(defun my-delete-line ()
"Delete text from current position to end of line char.
This command does not push text to `kill-ring'."
(interactive)
(delete-region
(point)
(progn (end-of-line 1) (point)))
(delete-char 1))
(defun my-delete-line-backward ()
"Delete text between the beginning of the line to the cursor position.
This command does not push text to `kill-ring'."
(interactive)
(let (p1 p2)
(setq p1 (point))
(beginning-of-line 1)
(setq p2 (point))
(delete-region p1 p2)))
; bind them to emacs's default shortcut keys:
(global-set-key (kbd "C-S-k") 'my-delete-line-backward) ; Ctrl+Shift+k
(global-set-key (kbd "C-k") 'my-delete-line)
(global-set-key (kbd "M-d") 'my-delete-word)
(global-set-key (kbd "<M-backspace>") 'my-backward-delete-word)
Courtesy of ErgoEmacs
undo
. Wild guess, though.