changeset 25361:bf9932dab556

(backward-kill-paragraph): Don't move point into mini-buffer prompt. (backward-kill-sentence): Ditto.
author Gerd Moellmann <gerd@gnu.org>
date Sat, 21 Aug 1999 19:31:34 +0000
parents 2f3ad0a21be5
children 4b8bf7aa0497
files lisp/textmodes/paragraphs.el
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/paragraphs.el	Sat Aug 21 19:31:13 1999 +0000
+++ b/lisp/textmodes/paragraphs.el	Sat Aug 21 19:31:34 1999 +0000
@@ -323,7 +323,12 @@
 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))))
+  (let ((start (point))
+	(end (progn (backward-paragraph arg) (point)))
+	(prompt-end (minibuffer-prompt-end)))
+    (when (> end prompt-end)
+      (goto-char (setq end prompt-end)))
+    (kill-region start end)))
 
 (defun transpose-paragraphs (arg)
   "Interchange this (or next) paragraph with previous one."
@@ -393,7 +398,12 @@
   "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")
-  (kill-region (point) (progn (backward-sentence arg) (point))))
+  (let ((start (point))
+	(end (progn (backward-sentence arg) (point)))
+	(prompt-end (minibuffer-prompt-end)))
+    (when (> end prompt-end)
+      (goto-char (setq end prompt-end)))
+    (kill-region start end)))
 
 (defun mark-end-of-sentence (arg)
   "Put mark at end of sentence.  Arg works as in `forward-sentence'."