Function: completion-kill-region

completion-kill-region is an interactive and byte-compiled function defined in completion.el.gz.

Signature

(completion-kill-region &optional BEG END)

Documentation

Kill between point and mark.

The text is deleted but saved in the kill ring. The command C-y (yank) can retrieve it from there.
(If you want to kill and then yank immediately, use M-x copy-region-as-kill (copy-region-as-kill).)

This is the primitive for programs to kill text (as opposed to deleting it). Supply two arguments, character positions indicating the stretch of text
 to be killed.
Any command that calls this function is a "kill command". If the previous command was also a kill command, the text killed this time appends to the text killed last time to make one entry in the kill ring. Patched to remove the most recent completion.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/completion.el.gz
;;-----------------------------------------------
;; Kill region patch
;;-----------------------------------------------

(defun completion-kill-region (&optional beg end)
  "Kill between point and mark.
The text is deleted but saved in the kill ring.
The command \\[yank] can retrieve it from there.
\(If you want to kill and then yank immediately, use \\[copy-region-as-kill].)

This is the primitive for programs to kill text (as opposed to deleting it).
Supply two arguments, character positions indicating the stretch of text
 to be killed.
Any command that calls this function is a \"kill command\".
If the previous command was also a kill command,
the text killed this time appends to the text killed last time
to make one entry in the kill ring.
Patched to remove the most recent completion."
  (interactive "r")
  (cond ((eq last-command 'complete)
	 (delete-region (point) cmpl-last-insert-location)
	 (insert cmpl-original-string)
	 (setq completion-to-accept nil))
	(t
	 (kill-region beg end))))