Commit 8d6eaa00 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(kill-paragraph): Don't use save-excursion.

(backward-kill-paragraph): Likewise.
(kill-sentence, backward-kill-sentence): Likewise.
parent e6291fe1
...@@ -154,14 +154,14 @@ The paragraph marked is the one that contains point or follows point." ...@@ -154,14 +154,14 @@ The paragraph marked is the one that contains point or follows point."
With arg N, kill forward to Nth end of paragraph; With arg N, kill forward to Nth end of paragraph;
negative arg -N means kill backward to Nth start of paragraph." negative arg -N means kill backward to Nth start of paragraph."
(interactive "p") (interactive "p")
(kill-region (point) (save-excursion (forward-paragraph arg) (point)))) (kill-region (point) (progn (forward-paragraph arg) (point))))
(defun backward-kill-paragraph (arg) (defun backward-kill-paragraph (arg)
"Kill back to start of paragraph. "Kill back to start of paragraph.
With arg N, kill back to Nth start of paragraph; With arg N, kill back to Nth start of paragraph;
negative arg -N means kill forward to Nth end of paragraph." negative arg -N means kill forward to Nth end of paragraph."
(interactive "p") (interactive "p")
(kill-region (point) (save-excursion (backward-paragraph arg) (point)))) (kill-region (point) (progn (backward-paragraph arg) (point))))
(defun transpose-paragraphs (arg) (defun transpose-paragraphs (arg)
"Interchange this (or next) paragraph with previous one." "Interchange this (or next) paragraph with previous one."
...@@ -225,13 +225,13 @@ See `forward-sentence' for more information." ...@@ -225,13 +225,13 @@ See `forward-sentence' for more information."
"Kill from point to end of sentence. "Kill from point to end of sentence.
With arg, repeat; negative arg -N means kill back to Nth start of sentence." With arg, repeat; negative arg -N means kill back to Nth start of sentence."
(interactive "*p") (interactive "*p")
(kill-region (point) (save-excursion (forward-sentence arg) (point)))) (kill-region (point) (progn (forward-sentence arg) (point))))
(defun backward-kill-sentence (&optional arg) (defun backward-kill-sentence (&optional arg)
"Kill back from point to start of sentence. "Kill back from point to start of sentence.
With arg, repeat, or kill forward to Nth end of sentence if negative arg -N." With arg, repeat, or kill forward to Nth end of sentence if negative arg -N."
(interactive "*p") (interactive "*p")
(kill-region (point) (save-excursion (backward-sentence arg) (point)))) (kill-region (point) (progn (backward-sentence arg) (point))))
(defun mark-end-of-sentence (arg) (defun mark-end-of-sentence (arg)
"Put mark at end of sentence. Arg works as in `forward-sentence'." "Put mark at end of sentence. Arg works as in `forward-sentence'."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment