aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGerd Moellmann1999-08-21 19:31:34 +0000
committerGerd Moellmann1999-08-21 19:31:34 +0000
commit3574d3781da7dd0237053aaa00f7820498ce5dcc (patch)
treec02dfc31d7dab47ca79fd0bb282fbbbeb66c5712 /lisp
parent7d1e984f8fdbfa9bcb1fa279969d98308d587f10 (diff)
downloademacs-3574d3781da7dd0237053aaa00f7820498ce5dcc.tar.gz
emacs-3574d3781da7dd0237053aaa00f7820498ce5dcc.zip
(backward-kill-paragraph): Don't move
point into mini-buffer prompt. (backward-kill-sentence): Ditto.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/textmodes/paragraphs.el14
1 files changed, 12 insertions, 2 deletions
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el
index 0c9c2e0c702..6f958ce5aac 100644
--- a/lisp/textmodes/paragraphs.el
+++ b/lisp/textmodes/paragraphs.el
@@ -323,7 +323,12 @@ negative arg -N means kill backward to Nth start of paragraph."
323With arg N, kill back to Nth start of paragraph; 323With arg N, kill back to Nth start of paragraph;
324negative arg -N means kill forward to Nth end of paragraph." 324negative arg -N means kill forward to Nth end of paragraph."
325 (interactive "*p") 325 (interactive "*p")
326 (kill-region (point) (progn (backward-paragraph arg) (point)))) 326 (let ((start (point))
327 (end (progn (backward-paragraph arg) (point)))
328 (prompt-end (minibuffer-prompt-end)))
329 (when (> end prompt-end)
330 (goto-char (setq end prompt-end)))
331 (kill-region start end)))
327 332
328(defun transpose-paragraphs (arg) 333(defun transpose-paragraphs (arg)
329 "Interchange this (or next) paragraph with previous one." 334 "Interchange this (or next) paragraph with previous one."
@@ -393,7 +398,12 @@ With arg, repeat; negative arg -N means kill back to Nth start of sentence."
393 "Kill back from point to start of sentence. 398 "Kill back from point to start of sentence.
394With arg, repeat, or kill forward to Nth end of sentence if negative arg -N." 399With arg, repeat, or kill forward to Nth end of sentence if negative arg -N."
395 (interactive "*p") 400 (interactive "*p")
396 (kill-region (point) (progn (backward-sentence arg) (point)))) 401 (let ((start (point))
402 (end (progn (backward-sentence arg) (point)))
403 (prompt-end (minibuffer-prompt-end)))
404 (when (> end prompt-end)
405 (goto-char (setq end prompt-end)))
406 (kill-region start end)))
397 407
398(defun mark-end-of-sentence (arg) 408(defun mark-end-of-sentence (arg)
399 "Put mark at end of sentence. Arg works as in `forward-sentence'." 409 "Put mark at end of sentence. Arg works as in `forward-sentence'."