Function: picture-clear-line

picture-clear-line is an interactive and byte-compiled function defined in picture.el.gz.

Signature

(picture-clear-line ARG)

Documentation

Clear out rest of line; if at end of line, advance to next line.

Cleared-out line text goes into the kill ring, as do newlines that are advanced over. With prefix argument ARG, clear out (and save in kill ring) that many lines.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/picture.el.gz
(defun picture-clear-line (arg)
  "Clear out rest of line; if at end of line, advance to next line.
Cleared-out line text goes into the kill ring, as do newlines
that are advanced over.  With prefix argument ARG, clear out (and
save in kill ring) that many lines."
  (interactive "P")
  (if arg
      (progn
       (setq arg (prefix-numeric-value arg))
       (kill-line arg)
       (newline (if (> arg 0) arg (- arg))))
    (if (looking-at "[ \t]*$")
	(kill-ring-save (point) (progn (forward-line 1) (point)))
      (kill-region (point) (progn (end-of-line) (point))))))