diff options
| author | Alan Mackenzie | 2011-08-27 11:14:50 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2011-08-27 11:14:50 +0000 |
| commit | 9980ebf354c53717846c37d459d186f2dc4e063f (patch) | |
| tree | 4c58fe5729e17221e2e561cc3122d7fbf4c5e3b4 | |
| parent | 3fc9b2184582296ffe4a602d87534f35ba4b4919 (diff) | |
| download | emacs-9980ebf354c53717846c37d459d186f2dc4e063f.tar.gz emacs-9980ebf354c53717846c37d459d186f2dc4e063f.zip | |
textmodes/paragraphs.el. Undo previous accidental patch.
| -rw-r--r-- | lisp/textmodes/paragraphs.el | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el index 59454043c4e..a0892b5ebba 100644 --- a/lisp/textmodes/paragraphs.el +++ b/lisp/textmodes/paragraphs.el | |||
| @@ -456,25 +456,21 @@ sentences. Also, every paragraph boundary terminates sentences as well." | |||
| 456 | (sentence-end (sentence-end))) | 456 | (sentence-end (sentence-end))) |
| 457 | (while (< arg 0) | 457 | (while (< arg 0) |
| 458 | (let ((pos (point)) | 458 | (let ((pos (point)) |
| 459 | (par-beg | 459 | ;; We used to use (start-of-paragraph-text), but this can |
| 460 | (save-excursion | 460 | ;; prevent sentence-end from matching if it is anchored at |
| 461 | (start-of-paragraph-text) | 461 | ;; BOL and the paragraph starts indented. |
| 462 | ;; Move PAR-BEG back over indentation | 462 | (par-beg (save-excursion (backward-paragraph) (point)))) |
| 463 | ;; to allow s1entence-end to match if it is anchored at | 463 | (if (and (re-search-backward sentence-end par-beg t) |
| 464 | ;; BOL and the paragraph starts indented. | 464 | (or (< (match-end 0) pos) |
| 465 | (beginning-of-line) | 465 | (re-search-backward sentence-end par-beg t))) |
| 466 | (point)))) | 466 | (goto-char (match-end 0)) |
| 467 | (if (and (re-search-backward sentence-end par-beg t) | 467 | (goto-char par-beg))) |
| 468 | (or (< (match-end 0) pos) | ||
| 469 | (re-search-backward sentence-end par-beg t))) | ||
| 470 | (goto-char (match-end 0)) | ||
| 471 | (goto-char par-beg))) | ||
| 472 | (setq arg (1+ arg))) | 468 | (setq arg (1+ arg))) |
| 473 | (while (> arg 0) | 469 | (while (> arg 0) |
| 474 | (let ((par-end (save-excursion (end-of-paragraph-text) (point)))) | 470 | (let ((par-end (save-excursion (end-of-paragraph-text) (point)))) |
| 475 | (if (re-search-forward sentence-end par-end t) | 471 | (if (re-search-forward sentence-end par-end t) |
| 476 | (skip-chars-backward " \t\n") | 472 | (skip-chars-backward " \t\n") |
| 477 | (goto-char par-end))) | 473 | (goto-char par-end))) |
| 478 | (setq arg (1- arg))) | 474 | (setq arg (1- arg))) |
| 479 | (constrain-to-field nil opoint t))) | 475 | (constrain-to-field nil opoint t))) |
| 480 | 476 | ||