diff options
| author | Gerd Moellmann | 1999-08-21 19:31:34 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 1999-08-21 19:31:34 +0000 |
| commit | 3574d3781da7dd0237053aaa00f7820498ce5dcc (patch) | |
| tree | c02dfc31d7dab47ca79fd0bb282fbbbeb66c5712 /lisp | |
| parent | 7d1e984f8fdbfa9bcb1fa279969d98308d587f10 (diff) | |
| download | emacs-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.el | 14 |
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." | |||
| 323 | With arg N, kill back to Nth start of paragraph; | 323 | With arg N, kill back to Nth start of paragraph; |
| 324 | negative arg -N means kill forward to Nth end of paragraph." | 324 | negative 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. |
| 394 | With arg, repeat, or kill forward to Nth end of sentence if negative arg -N." | 399 | With 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'." |