summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1992-10-18 22:56:00 +0000
committerRichard M. Stallman <rms@gnu.org>1992-10-18 22:56:00 +0000
commit2247b0fc583c4350007d2201bf28b05e82256c7d (patch)
tree75a61c7936909d351eb28fe3442b222974cf56c5 /lisp
parent1ddea2ab1f1991b38c94807768b51b87dd42a4e4 (diff)
downloademacs-2247b0fc583c4350007d2201bf28b05e82256c7d.tar.gz
(kill-sentence, backward-kill-sentence):
(kill-paragraph, backward-kill-paragraph): Don't change point before calling kill-region.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/textmodes/paragraphs.el12
1 files changed, 4 insertions, 8 deletions
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el
index 66e48080bb4..3147367b9ce 100644
--- a/lisp/textmodes/paragraphs.el
+++ b/lisp/textmodes/paragraphs.el
@@ -133,14 +133,14 @@ The paragraph marked is the one that contains point or follows point."
With arg N, kill forward to Nth end of paragraph;
negative arg -N means kill backward to Nth start of paragraph."
(interactive "p")
- (kill-region (point) (progn (forward-paragraph arg) (point))))
+ (kill-region (point) (save-excursion (forward-paragraph arg) (point))))
(defun backward-kill-paragraph (arg)
"Kill back to start of paragraph.
With arg N, kill back to Nth start of paragraph;
negative arg -N means kill forward to Nth end of paragraph."
(interactive "p")
- (kill-region (point) (progn (backward-paragraph arg) (point))))
+ (kill-region (point) (save-excursion (backward-paragraph arg) (point))))
(defun transpose-paragraphs (arg)
"Interchange this (or next) paragraph with previous one."
@@ -204,17 +204,13 @@ See `forward-sentence' for more information."
"Kill from point to end of sentence.
With arg, repeat; negative arg -N means kill back to Nth start of sentence."
(interactive "*p")
- (let ((beg (point)))
- (forward-sentence arg)
- (kill-region beg (point))))
+ (kill-region (point) (save-excursion (forward-sentence arg) (point))))
(defun backward-kill-sentence (&optional arg)
"Kill back from point to start of sentence.
With arg, repeat, or kill forward to Nth end of sentence if negative arg -N."
(interactive "*p")
- (let ((beg (point)))
- (backward-sentence arg)
- (kill-region beg (point))))
+ (kill-region (point) (save-excursion (forward-sentence arg) (point))))
(defun mark-end-of-sentence (arg)
"Put mark at end of sentence. Arg works as in `forward-sentence'."