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."
"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'."