comparison lisp/paragraphs.el @ 371:cc15677e0335 r21-2b1

Import from CVS: tag r21-2b1
author cvs
date Mon, 13 Aug 2007 11:03:08 +0200
parents a4f53d9b3154
children 8626e4521993
comparison
equal deleted inserted replaced
370:bd866891f083 371:cc15677e0335
124 ;; start a new paragraph). 124 ;; start a new paragraph).
125 125
126 ;; XEmacs -- use purecopy 126 ;; XEmacs -- use purecopy
127 (defconst paragraph-separate (purecopy "[ \t\f]*$") "\ 127 (defconst paragraph-separate (purecopy "[ \t\f]*$") "\
128 *Regexp for beginning of a line that separates paragraphs. 128 *Regexp for beginning of a line that separates paragraphs.
129 If you change this, you may have to change `paragraph-start' also. 129 If you change this, you may have to change paragraph-start also.
130
131 A line matching this is not part of any paragraph.
132 130
133 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
134 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
135 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
136 text indented by a margin setting.") 134 text indented by a margin setting.")
351 (defun forward-sentence (&optional arg) 349 (defun forward-sentence (&optional arg)
352 "Move forward to next `sentence-end'. With argument, repeat. 350 "Move forward to next `sentence-end'. With argument, repeat.
353 With negative argument, move backward repeatedly to `sentence-beginning'. 351 With negative argument, move backward repeatedly to `sentence-beginning'.
354 352
355 The variable `sentence-end' is a regular expression that matches ends of 353 The variable `sentence-end' is a regular expression that matches ends of
356 sentences. A paragraph boundary also terminates a sentence." 354 sentences. Also, every paragraph boundary terminates sentences as well."
357 (interactive "_p") ; XEmacs 355 (interactive "_p") ; XEmacs
358 (or arg (setq arg 1)) 356 (or arg (setq arg 1))
359 (while (< arg 0) 357 (while (< arg 0)
360 (let ((par-beg (save-excursion (start-of-paragraph-text) (point)))) 358 (let ((par-beg (save-excursion (start-of-paragraph-text) (point))))
361 (if (re-search-backward (concat sentence-end "[^ \t\n]") par-beg t) 359 (if (re-search-backward (concat sentence-end "[^ \t\n]") par-beg t)