comparison lisp/simple.el @ 101828:fde299e29d94

(kill-whole-line): Provide a default argument of 1.
author Glenn Morris <rgm@gnu.org>
date Fri, 06 Feb 2009 03:59:15 +0000
parents 50a9b1249468
children 0750b250db3d
comparison
equal deleted inserted replaced
101827:ec4427ac212e 101828:fde299e29d94
3217 With prefix ARG, kill that many lines starting from the current line. 3217 With prefix ARG, kill that many lines starting from the current line.
3218 If ARG is negative, kill backward. Also kill the preceding newline. 3218 If ARG is negative, kill backward. Also kill the preceding newline.
3219 \(This is meant to make \\[repeat] work well with negative arguments.\) 3219 \(This is meant to make \\[repeat] work well with negative arguments.\)
3220 If ARG is zero, kill current line but exclude the trailing newline." 3220 If ARG is zero, kill current line but exclude the trailing newline."
3221 (interactive "p") 3221 (interactive "p")
3222 (or arg (setq arg 1))
3222 (if (and (> arg 0) (eobp) (save-excursion (forward-visible-line 0) (eobp))) 3223 (if (and (> arg 0) (eobp) (save-excursion (forward-visible-line 0) (eobp)))
3223 (signal 'end-of-buffer nil)) 3224 (signal 'end-of-buffer nil))
3224 (if (and (< arg 0) (bobp) (save-excursion (end-of-visible-line) (bobp))) 3225 (if (and (< arg 0) (bobp) (save-excursion (end-of-visible-line) (bobp)))
3225 (signal 'beginning-of-buffer nil)) 3226 (signal 'beginning-of-buffer nil))
3226 (unless (eq last-command 'kill-region) 3227 (unless (eq last-command 'kill-region)