comparison lisp/simple.el @ 1556:fce86d06a758

* simple.el (previous-line): Doc fix. * simple.el (kill-line): Don't shift point before doing the delete.
author Jim Blandy <jimb@redhat.com>
date Sat, 07 Nov 1992 06:13:23 +0000
parents 5004c07a8250
children 9de0900ca56a
comparison
equal deleted inserted replaced
1555:695c6eb2ff31 1556:fce86d06a758
814 814
815 When calling from a program, nil means \"no arg\", 815 When calling from a program, nil means \"no arg\",
816 a number counts as a prefix arg." 816 a number counts as a prefix arg."
817 (interactive "P") 817 (interactive "P")
818 (kill-region (point) 818 (kill-region (point)
819 (progn 819 ;; Don't shift point before doing the delete; that way,
820 ;; undo will record the right position of point.
821 (save-excursion
820 (if arg 822 (if arg
821 (forward-line (prefix-numeric-value arg)) 823 (forward-line (prefix-numeric-value arg))
822 (if (eobp) 824 (if (eobp)
823 (signal 'end-of-buffer nil)) 825 (signal 'end-of-buffer nil))
824 (if (looking-at "[ \t]*$") 826 (if (looking-at "[ \t]*$")
1239 The command \\[set-goal-column] can be used to create 1241 The command \\[set-goal-column] can be used to create
1240 a semipermanent goal column to which this command always moves. 1242 a semipermanent goal column to which this command always moves.
1241 Then it does not try to move vertically. 1243 Then it does not try to move vertically.
1242 1244
1243 If you are thinking of using this in a Lisp program, consider using 1245 If you are thinking of using this in a Lisp program, consider using
1244 `forward-line' with negative argument instead.. It is usually easier 1246 `forward-line' with a negative argument instead. It is usually easier
1245 to use and more reliable (no dependence on goal column, etc.)." 1247 to use and more reliable (no dependence on goal column, etc.)."
1246 (interactive "p") 1248 (interactive "p")
1247 (line-move (- arg)) 1249 (line-move (- arg))
1248 nil) 1250 nil)
1249 1251