From: Gerd Moellmann Date: Sat, 21 Aug 1999 19:31:34 +0000 (+0000) Subject: (backward-kill-paragraph): Don't move X-Git-Tag: emacs-pretest-21.0.90~7080 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3574d3781da7dd0237053aaa00f7820498ce5dcc;p=emacs.git (backward-kill-paragraph): Don't move point into mini-buffer prompt. (backward-kill-sentence): Ditto. --- 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." 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 @@ With arg, repeat; negative arg -N means kill back to Nth 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." (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'."