Function: comint-kill-whole-line

comint-kill-whole-line is an interactive and byte-compiled function defined in comint.el.gz.

Signature

(comint-kill-whole-line &optional COUNT)

Documentation

Kill current line, ignoring read-only and field properties.

With prefix arg COUNT, kill that many lines starting from the current line. If COUNT is negative, kill backward. Also kill the preceding newline, instead of the trailing one. (This is meant to make C-x z (repeat) work well with negative arguments.) If COUNT is zero, kill current line but exclude the trailing newline. The read-only status of newlines is updated with comint-update-fence, if necessary.

Probably introduced at or before Emacs version 22.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/comint.el.gz
(defun comint-kill-whole-line (&optional count)
  "Kill current line, ignoring read-only and field properties.
With prefix arg COUNT, kill that many lines starting from the current line.
If COUNT is negative, kill backward.  Also kill the preceding newline,
instead of the trailing one.  \(This is meant to make \\[repeat] work well
with negative arguments.)
If COUNT is zero, kill current line but exclude the trailing newline.
The read-only status of newlines is updated with `comint-update-fence',
if necessary."
  (interactive "p" comint-mode)
  (let ((inhibit-read-only t) (inhibit-field-text-motion t))
    (kill-whole-line count)
    (when (>= count 0) (comint-update-fence))))