Mercurial > hg > xemacs-beta
comparison lisp/paragraphs.el @ 450:98528da0b7fc r21-2-40
Import from CVS: tag r21-2-40
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:39:20 +0200 |
parents | 1ccc32a20af4 |
children | d8c768dcca7a |
comparison
equal
deleted
inserted
replaced
449:c83749d23eb5 | 450:98528da0b7fc |
---|---|
122 ;; something very minimal, even including "." (which makes every hard newline | 122 ;; something very minimal, even including "." (which makes every hard newline |
123 ;; start a new paragraph). | 123 ;; start a new paragraph). |
124 | 124 |
125 (defconst paragraph-separate "[ \t\f]*$" "\ | 125 (defconst paragraph-separate "[ \t\f]*$" "\ |
126 *Regexp for beginning of a line that separates paragraphs. | 126 *Regexp for beginning of a line that separates paragraphs. |
127 If you change this, you may have to change paragraph-start also. | 127 If you change this, you may have to change `paragraph-start' also. |
128 | |
129 A line matching this is not part of any paragraph. | |
128 | 130 |
129 This is matched against the text at the left margin, which is not necessarily | 131 This is matched against the text at the left margin, which is not necessarily |
130 the beginning of the line, so it should not use \"^\" as an anchor. This | 132 the beginning of the line, so it should not use \"^\" as an anchor. This |
131 ensures that the paragraph functions will work equally within a region of | 133 ensures that the paragraph functions will work equally within a region of |
132 text indented by a margin setting.") | 134 text indented by a margin setting.") |
345 (defun forward-sentence (&optional arg) | 347 (defun forward-sentence (&optional arg) |
346 "Move forward to next `sentence-end'. With argument, repeat. | 348 "Move forward to next `sentence-end'. With argument, repeat. |
347 With negative argument, move backward repeatedly to `sentence-beginning'. | 349 With negative argument, move backward repeatedly to `sentence-beginning'. |
348 | 350 |
349 The variable `sentence-end' is a regular expression that matches ends of | 351 The variable `sentence-end' is a regular expression that matches ends of |
350 sentences. Also, every paragraph boundary terminates sentences as well." | 352 sentences. A paragraph boundary also terminates a sentence." |
351 (interactive "_p") ; XEmacs | 353 (interactive "_p") ; XEmacs |
352 (or arg (setq arg 1)) | 354 (or arg (setq arg 1)) |
353 (while (< arg 0) | 355 (while (< arg 0) |
354 (let ((par-beg (save-excursion (start-of-paragraph-text) (point)))) | 356 (let ((par-beg (save-excursion (start-of-paragraph-text) (point)))) |
355 (if (re-search-backward (concat sentence-end "[^ \t\n]") par-beg t) | 357 (if (re-search-backward (concat sentence-end "[^ \t\n]") par-beg t) |