comparison lisp/paragraphs.el @ 367:a4f53d9b3154 r21-1-13

Import from CVS: tag r21-1-13
author cvs
date Mon, 13 Aug 2007 11:01:07 +0200
parents 1f0dabaa0855
children cc15677e0335
comparison
equal deleted inserted replaced
366:83d76f480a59 367:a4f53d9b3154
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.
130 132
131 This is matched against the text at the left margin, which is not necessarily 133 This is matched against the text at the left margin, which is not necessarily
132 the beginning of the line, so it should not use \"^\" as an anchor. This 134 the beginning of the line, so it should not use \"^\" as an anchor. This
133 ensures that the paragraph functions will work equally within a region of 135 ensures that the paragraph functions will work equally within a region of
134 text indented by a margin setting.") 136 text indented by a margin setting.")
349 (defun forward-sentence (&optional arg) 351 (defun forward-sentence (&optional arg)
350 "Move forward to next `sentence-end'. With argument, repeat. 352 "Move forward to next `sentence-end'. With argument, repeat.
351 With negative argument, move backward repeatedly to `sentence-beginning'. 353 With negative argument, move backward repeatedly to `sentence-beginning'.
352 354
353 The variable `sentence-end' is a regular expression that matches ends of 355 The variable `sentence-end' is a regular expression that matches ends of
354 sentences. Also, every paragraph boundary terminates sentences as well." 356 sentences. A paragraph boundary also terminates a sentence."
355 (interactive "_p") ; XEmacs 357 (interactive "_p") ; XEmacs
356 (or arg (setq arg 1)) 358 (or arg (setq arg 1))
357 (while (< arg 0) 359 (while (< arg 0)
358 (let ((par-beg (save-excursion (start-of-paragraph-text) (point)))) 360 (let ((par-beg (save-excursion (start-of-paragraph-text) (point))))
359 (if (re-search-backward (concat sentence-end "[^ \t\n]") par-beg t) 361 (if (re-search-backward (concat sentence-end "[^ \t\n]") par-beg t)