diff options
| author | Kai Großjohann | 2002-02-15 08:53:15 +0000 |
|---|---|---|
| committer | Kai Großjohann | 2002-02-15 08:53:15 +0000 |
| commit | cad113ae34fd336c0ea44dacf12c267cdb94d9ce (patch) | |
| tree | dd65ff473805a1a75a4daa29ce0569317dea3f69 /lisp/textmodes | |
| parent | 66c8296f833ff25ec680feaaaf2ba57f429919de (diff) | |
| download | emacs-cad113ae34fd336c0ea44dacf12c267cdb94d9ce.tar.gz emacs-cad113ae34fd336c0ea44dacf12c267cdb94d9ce.zip | |
* lisp/simple.el (mark-word): Mark more if repeated.
* lisp/textmodes/paragraphs.el (mark-paragraph): Ditto.
(mark-end-of-sentence): Ditto.
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/paragraphs.el | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el index ed9a78696fd..91d9b1699f9 100644 --- a/lisp/textmodes/paragraphs.el +++ b/lisp/textmodes/paragraphs.el | |||
| @@ -325,14 +325,23 @@ With argument ARG, puts mark at end of a following paragraph, so that | |||
| 325 | the number of paragraphs marked equals ARG. | 325 | the number of paragraphs marked equals ARG. |
| 326 | 326 | ||
| 327 | If ARG is negative, point is put at end of this paragraph, mark is put | 327 | If ARG is negative, point is put at end of this paragraph, mark is put |
| 328 | at beginning of this or a previous paragraph." | 328 | at beginning of this or a previous paragraph. |
| 329 | |||
| 330 | If this command is repeated, it marks the next ARG paragraphs after (or | ||
| 331 | before, if arg is negative) the ones already marked." | ||
| 329 | (interactive "p") | 332 | (interactive "p") |
| 330 | (unless arg (setq arg 1)) | 333 | (let (here) |
| 331 | (when (zerop arg) | 334 | (unless arg (setq arg 1)) |
| 332 | (error "Cannot mark zero paragraphs")) | 335 | (when (zerop arg) |
| 333 | (forward-paragraph arg) | 336 | (error "Cannot mark zero paragraphs")) |
| 334 | (push-mark nil t t) | 337 | (when (and (eq last-command this-command) (mark t)) |
| 335 | (backward-paragraph arg)) | 338 | (setq here (point)) |
| 339 | (goto-char (mark))) | ||
| 340 | (forward-paragraph arg) | ||
| 341 | (push-mark nil t t) | ||
| 342 | (if here | ||
| 343 | (goto-char here) | ||
| 344 | (backward-paragraph arg)))) | ||
| 336 | 345 | ||
| 337 | (defun kill-paragraph (arg) | 346 | (defun kill-paragraph (arg) |
| 338 | "Kill forward to end of paragraph. | 347 | "Kill forward to end of paragraph. |
| @@ -424,13 +433,17 @@ With arg, repeat, or kill forward to Nth end of sentence if negative arg -N." | |||
| 424 | (kill-region (point) (progn (backward-sentence arg) (point)))) | 433 | (kill-region (point) (progn (backward-sentence arg) (point)))) |
| 425 | 434 | ||
| 426 | (defun mark-end-of-sentence (arg) | 435 | (defun mark-end-of-sentence (arg) |
| 427 | "Put mark at end of sentence. Arg works as in `forward-sentence'." | 436 | "Put mark at end of sentence. Arg works as in `forward-sentence'. |
| 437 | If this command is repeated, it marks the next ARG sentences after the | ||
| 438 | ones already marked." | ||
| 428 | (interactive "p") | 439 | (interactive "p") |
| 429 | (push-mark | 440 | (push-mark |
| 430 | (save-excursion | 441 | (save-excursion |
| 431 | (forward-sentence arg) | 442 | (if (and (eq last-command this-command) (mark t)) |
| 432 | (point)) | 443 | (goto-char (mark))) |
| 433 | nil t)) | 444 | (forward-sentence arg) |
| 445 | (point)) | ||
| 446 | nil t)) | ||
| 434 | 447 | ||
| 435 | (defun transpose-sentences (arg) | 448 | (defun transpose-sentences (arg) |
| 436 | "Interchange this (next) and previous sentence." | 449 | "Interchange this (next) and previous sentence." |