kill-line - Delete all characters to the end of the line
n kill-line (C-k)
kill-line, when used with no argument n, deletes all text from the cursor to the end of a line, the end of line character is NOT deleted. The deleted text is placed in the kill buffer, see yank(2) for more information on the kill buffer. If the line is blank then the whole line is deleted, including the end of line character.
If a positive argument n is supplied the specified number of lines are deleted. If a negative argument is specified the previous -n lines are deleted. If n is 0 the command has no effect.
The Emacs Key binding for kill line ((C-k) ) may be re-bound to affect the behavior of the command.
; MicroEmacs binding. Bind to kill the end of line character 1 global-bind-key kill-line "C-k" ; GNU Emacs binding. Bind to leave the end of line character global-bind-key kill-line "C-k"
The behavior of kill-line was modified in November 2004. kill-line now interprets the numeric argument n in both a positive and negative direction. The existing implementation did not operated in a negative direction, the negative argument controlled the kill buffer behavior of the line. The kill behavior is no longer an option to kill-line and the line(s) are always added to the kill buffer, control of the kill buffer is required then deletion should be performed with kill-region(2).
The behavior of the end of line kill used to be controlled by a line(2m) mode, this behavior may be replicated by modification of the binding as described in the previous section.
Copyright (c) 1998-2006 JASSPA
Last Modified: 2006/07/28
Generated On: 2006/10/07