2549
|
1 ;;; paragraphs.el --- paragraph and sentence parsing
|
428
|
2
|
2549
|
3 ;; Copyright (C) 1985, 86, 87, 91, 94, 95, 96, 1997, 1999, 2000, 2001
|
|
4 ;; Free Software Foundation, Inc.
|
428
|
5
|
|
6 ;; Maintainer: FSF
|
|
7 ;; Keywords: wp, dumped
|
|
8
|
|
9 ;; This file is part of XEmacs.
|
|
10
|
|
11 ;; XEmacs is free software; you can redistribute it and/or modify it
|
|
12 ;; under the terms of the GNU General Public License as published by
|
|
13 ;; the Free Software Foundation; either version 2, or (at your option)
|
|
14 ;; any later version.
|
|
15
|
|
16 ;; XEmacs is distributed in the hope that it will be useful, but
|
|
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
19 ;; General Public License for more details.
|
|
20
|
|
21 ;; You should have received a copy of the GNU General Public License
|
|
22 ;; along with XEmacs; see the file COPYING. If not, write to the Free
|
|
23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
24 ;; 02111-1307, USA.
|
|
25
|
2549
|
26 ;;; Synched up with: FSF 21.3.
|
428
|
27
|
|
28 ;;; Commentary:
|
|
29
|
|
30 ;; This file is dumped with XEmacs.
|
|
31
|
|
32 ;; This package provides the paragraph-oriented commands documented in the
|
|
33 ;; XEmacs Reference Manual.
|
|
34
|
|
35 ;; 06/11/1997 - Use char-(after|before) instead of
|
|
36 ;; (following|preceding)-char. -slb
|
|
37
|
|
38 ;;; Code:
|
|
39
|
2549
|
40 (defgroup paragraphs nil
|
|
41 "Paragraph and sentence parsing."
|
|
42 :group 'editing)
|
428
|
43
|
2549
|
44 (define-minor-mode use-hard-newlines
|
428
|
45 "Minor mode to distinguish hard and soft newlines.
|
|
46 When active, the functions `newline' and `open-line' add the
|
|
47 text-property `hard' to newlines that they insert, and a line is
|
|
48 only considered as a candidate to match `paragraph-start' or
|
|
49 `paragraph-separate' if it follows a hard newline.
|
|
50
|
|
51 Prefix argument says to turn mode on if positive, off if negative.
|
|
52 When the mode is turned on, if there are newlines in the buffer but no hard
|
2549
|
53 newlines, ask the user whether to mark as hard any newlines preceeding a
|
428
|
54 `paragraph-start' line. From a program, second arg INSERT specifies whether
|
|
55 to do this; it can be `never' to change nothing, t or `always' to force
|
2549
|
56 marking, `guess' to try to do the right thing with no questions, nil
|
428
|
57 or anything else to ask the user.
|
|
58
|
|
59 Newlines not marked hard are called \"soft\", and are always internal
|
|
60 to paragraphs. The fill functions insert and delete only soft newlines."
|
2549
|
61 :group 'paragraphs
|
|
62 :extra-args (insert)
|
|
63 (when use-hard-newlines
|
428
|
64 ;; Turn mode on
|
|
65 ;; Intuit hard newlines --
|
|
66 ;; mark as hard any newlines preceding a paragraph-start line.
|
|
67 (if (or (eq insert t) (eq insert 'always)
|
|
68 (and (not (eq 'never insert))
|
|
69 (not (text-property-any (point-min) (point-max) 'hard t))
|
|
70 (save-excursion
|
|
71 (goto-char (point-min))
|
|
72 (search-forward "\n" nil t))
|
|
73 (or (eq insert 'guess)
|
|
74 (y-or-n-p "Make newlines between paragraphs hard? "))))
|
|
75 (save-excursion
|
|
76 (goto-char (point-min))
|
|
77 (while (search-forward "\n" nil t)
|
|
78 (let ((pos (point)))
|
|
79 (move-to-left-margin)
|
2549
|
80 (when (looking-at paragraph-start)
|
|
81 (set-hard-newline-properties (1- pos) pos))
|
|
82 ;; If paragraph-separate, newline after it is hard too.
|
|
83 (when (looking-at paragraph-separate)
|
|
84 (set-hard-newline-properties (1- pos) pos)
|
|
85 (end-of-line)
|
|
86 (unless (eobp)
|
|
87 (set-hard-newline-properties (point) (1+ (point)))))))))))
|
428
|
88
|
2549
|
89 (defcustom paragraph-start "\f\\|[ \t]*$" "\
|
428
|
90 *Regexp for beginning of a line that starts OR separates paragraphs.
|
|
91 This regexp should match lines that separate paragraphs
|
|
92 and should also match lines that start a paragraph
|
|
93 \(and are part of that paragraph).
|
|
94
|
|
95 This is matched against the text at the left margin, which is not necessarily
|
|
96 the beginning of the line, so it should never use \"^\" as an anchor. This
|
|
97 ensures that the paragraph functions will work equally well within a region
|
|
98 of text indented by a margin setting.
|
|
99
|
|
100 The variable `paragraph-separate' specifies how to distinguish
|
|
101 lines that start paragraphs from lines that separate them.
|
|
102
|
|
103 If the variable `use-hard-newlines' is non-nil, then only lines following a
|
2549
|
104 hard newline are considered to match."
|
|
105 :group 'paragraphs
|
|
106 :type 'regexp)
|
428
|
107
|
|
108 ;; paragraph-start requires a hard newline, but paragraph-separate does not:
|
|
109 ;; It is assumed that paragraph-separate is distinctive enough to be believed
|
|
110 ;; whenever it occurs, while it is reasonable to set paragraph-start to
|
|
111 ;; something very minimal, even including "." (which makes every hard newline
|
|
112 ;; start a new paragraph).
|
|
113
|
2549
|
114 (defcustom paragraph-separate "[ \t\f]*$"
|
|
115 "*Regexp for beginning of a line that separates paragraphs.
|
450
|
116 If you change this, you may have to change `paragraph-start' also.
|
|
117
|
|
118 A line matching this is not part of any paragraph.
|
428
|
119
|
|
120 This is matched against the text at the left margin, which is not necessarily
|
|
121 the beginning of the line, so it should not use \"^\" as an anchor. This
|
|
122 ensures that the paragraph functions will work equally within a region of
|
2549
|
123 text indented by a margin setting."
|
|
124 :group 'paragraphs
|
|
125 :type 'regexp)
|
|
126
|
|
127 (defcustom sentence-end-double-space t
|
|
128 "*Non-nil means a single space does not end a sentence.
|
|
129 This is relevant for filling. See also `sentence-end-without-period'
|
|
130 and `colon-double-space'.
|
|
131
|
|
132 This variable applies only to filling, not motion commands. To
|
|
133 change the behavior of motion commands, see `sentence-end'.
|
|
134
|
|
135 If you change this, you should also change `sentence-end'. See Info
|
|
136 node `Sentences'."
|
|
137 :type 'boolean
|
|
138 :group 'fill)
|
428
|
139
|
2549
|
140 (defcustom sentence-end-without-period nil
|
|
141 "*Non-nil means a sentence will end without a period.
|
|
142 For example, a sentence in Thai text ends with double space but
|
|
143 without a period."
|
|
144 :type 'boolean
|
|
145 :group 'fill)
|
|
146
|
|
147 (defcustom sentence-end
|
|
148 (purecopy
|
|
149 ;; This is a bit stupid since it's not auto-updated when the
|
2553
|
150 ;; other variables are changed, but it's still useful info.
|
2549
|
151 (concat (if sentence-end-without-period "\\w \\|")
|
2578
|
152 "[.?!"
|
|
153 (if (featurep 'mule)
|
|
154 (decode-coding-string "\033$B!#!%!)!*\033$A!##.#?#!\033$(0!$!%!)!*\033$(G!$!%!)!*\033(B" 'iso-2022-7bit)
|
|
155 "")
|
|
156 "][]\"')}]*"
|
2549
|
157 (if sentence-end-double-space
|
|
158 "\\($\\| $\\|\t\\| \\)" "\\($\\|[\t ]\\)")
|
|
159 "[ \t\n]*"))
|
|
160 "*Regexp describing the end of a sentence.
|
|
161 The value includes the whitespace following the sentence.
|
428
|
162 All paragraph boundaries also end sentences, regardless.
|
|
163
|
2549
|
164 The default value specifies that in order to be recognized as the end
|
|
165 of a sentence, the ending period, question mark, or exclamation point
|
|
166 must be followed by two spaces, unless it's inside some sort of quotes
|
|
167 or parenthesis.
|
|
168
|
|
169 See also the variable `sentence-end-double-space', the variable
|
|
170 `sentence-end-without-period' and Info node `Sentences'."
|
|
171 :group 'paragraphs
|
|
172 :type 'regexp)
|
428
|
173
|
2549
|
174 (defcustom page-delimiter "^\014"
|
|
175 "*Regexp describing line-beginnings that separate pages."
|
|
176 :group 'paragraphs
|
|
177 :type 'regexp)
|
428
|
178
|
2549
|
179 (defcustom paragraph-ignore-fill-prefix nil
|
|
180 "*Non-nil means the paragraph commands are not affected by `fill-prefix'.
|
|
181 This is desirable in modes where blank lines are the paragraph delimiters."
|
|
182 :group 'paragraphs
|
|
183 :type 'boolean)
|
428
|
184
|
|
185 (defun forward-paragraph (&optional arg)
|
|
186 "Move forward to end of paragraph.
|
2549
|
187 With argument ARG, do it ARG times;
|
|
188 a negative argument ARG = -N means move backward N paragraphs.
|
428
|
189
|
|
190 A line which `paragraph-start' matches either separates paragraphs
|
|
191 \(if `paragraph-separate' matches it also) or is the first line of a paragraph.
|
|
192 A paragraph end is the beginning of a line which is not part of the paragraph
|
2549
|
193 to which the end of the previous line belongs, or the end of the buffer.
|
|
194 Returns the count of paragraphs left to move."
|
428
|
195 (interactive "_p") ; XEmacs
|
|
196 (or arg (setq arg 1))
|
2549
|
197 (let* ((opoint (point))
|
|
198 (fill-prefix-regexp
|
428
|
199 (and fill-prefix (not (equal fill-prefix ""))
|
|
200 (not paragraph-ignore-fill-prefix)
|
|
201 (regexp-quote fill-prefix)))
|
|
202 ;; Remove ^ from paragraph-start and paragraph-sep if they are there.
|
|
203 ;; These regexps shouldn't be anchored, because we look for them
|
|
204 ;; starting at the left-margin. This allows paragraph commands to
|
|
205 ;; work normally with indented text.
|
|
206 ;; This hack will not find problem cases like "whatever\\|^something".
|
2549
|
207 (parstart (if (and (not (equal "" paragraph-start))
|
|
208 (equal ?^ (aref paragraph-start 0)))
|
|
209 (substring paragraph-start 1)
|
|
210 paragraph-start))
|
|
211 (parsep (if (and (not (equal "" paragraph-separate))
|
|
212 (equal ?^ (aref paragraph-separate 0)))
|
|
213 (substring paragraph-separate 1)
|
|
214 paragraph-separate))
|
|
215 (parsep
|
428
|
216 (if fill-prefix-regexp
|
2549
|
217 (concat parsep "\\|"
|
428
|
218 fill-prefix-regexp "[ \t]*$")
|
2549
|
219 parsep))
|
428
|
220 ;; This is used for searching.
|
2549
|
221 (sp-parstart (concat "^[ \t]*\\(?:" parstart "\\|" parsep "\\)"))
|
|
222 start found-start)
|
428
|
223 (while (and (< arg 0) (not (bobp)))
|
2549
|
224 (if (and (not (looking-at parsep))
|
428
|
225 (re-search-backward "^\n" (max (1- (point)) (point-min)) t)
|
2549
|
226 (looking-at parsep))
|
|
227 (setq arg (1+ arg))
|
428
|
228 (setq start (point))
|
|
229 ;; Move back over paragraph-separating lines.
|
446
|
230 (backward-char 1) (beginning-of-line)
|
428
|
231 (while (and (not (bobp))
|
|
232 (progn (move-to-left-margin)
|
2549
|
233 (looking-at parsep)))
|
|
234 (forward-line -1))
|
428
|
235 (if (bobp)
|
|
236 nil
|
2549
|
237 (setq arg (1+ arg))
|
428
|
238 ;; Go to end of the previous (non-separating) line.
|
|
239 (end-of-line)
|
|
240 ;; Search back for line that starts or separates paragraphs.
|
|
241 (if (if fill-prefix-regexp
|
2549
|
242 ;; There is a fill prefix; it overrides parstart.
|
4103
|
243 (let nil ; (multiple-lines)
|
428
|
244 (while (and (progn (beginning-of-line) (not (bobp)))
|
|
245 (progn (move-to-left-margin)
|
2549
|
246 (not (looking-at parsep)))
|
428
|
247 (looking-at fill-prefix-regexp))
|
4103
|
248 ; (unless (= (point) start)
|
|
249 ; (setq multiple-lines t))
|
428
|
250 (forward-line -1))
|
|
251 (move-to-left-margin)
|
2549
|
252 ;; This deleted code caused a long hanging-indent line
|
|
253 ;; not to be filled together with the following lines.
|
|
254 ;; ;; Don't move back over a line before the paragraph
|
|
255 ;; ;; which doesn't start with fill-prefix
|
|
256 ;; ;; unless that is the only line we've moved over.
|
|
257 ;; (and (not (looking-at fill-prefix-regexp))
|
|
258 ;; multiple-lines
|
|
259 ;; (forward-line 1))
|
428
|
260 (not (bobp)))
|
2549
|
261 (while (and (re-search-backward sp-parstart nil 1)
|
|
262 (setq found-start t)
|
428
|
263 ;; Found a candidate, but need to check if it is a
|
2549
|
264 ;; REAL parstart.
|
428
|
265 (progn (setq start (point))
|
|
266 (move-to-left-margin)
|
2549
|
267 (not (looking-at parsep)))
|
|
268 (not (and (looking-at parstart)
|
|
269 (or (not use-hard-newlines)
|
|
270 (get-text-property (1- start) 'hard)
|
|
271 (bobp)))))
|
|
272 (setq found-start nil)
|
428
|
273 (goto-char start))
|
2549
|
274 found-start)
|
428
|
275 ;; Found one.
|
|
276 (progn
|
|
277 ;; Move forward over paragraph separators.
|
|
278 ;; We know this cannot reach the place we started
|
|
279 ;; because we know we moved back over a non-separator.
|
|
280 (while (and (not (eobp))
|
|
281 (progn (move-to-left-margin)
|
2549
|
282 (looking-at parsep)))
|
428
|
283 (forward-line 1))
|
|
284 ;; If line before paragraph is just margin, back up to there.
|
|
285 (end-of-line 0)
|
|
286 (if (> (current-column) (current-left-margin))
|
|
287 (forward-char 1)
|
|
288 (skip-chars-backward " \t")
|
|
289 (if (not (bolp))
|
|
290 (forward-line 1))))
|
|
291 ;; No starter or separator line => use buffer beg.
|
2549
|
292 (goto-char (point-min))))))
|
|
293
|
428
|
294 (while (and (> arg 0) (not (eobp)))
|
2549
|
295 ;; Move forward over separator lines...
|
|
296 (while (and (not (eobp))
|
|
297 (progn (move-to-left-margin) (not (eobp)))
|
|
298 (looking-at parsep))
|
|
299 (forward-line 1))
|
|
300 (unless (eobp) (setq arg (1- arg)))
|
|
301 ;; ... and one more line.
|
|
302 (forward-line 1)
|
428
|
303 (if fill-prefix-regexp
|
2549
|
304 ;; There is a fill prefix; it overrides parstart.
|
428
|
305 (while (and (not (eobp))
|
|
306 (progn (move-to-left-margin) (not (eobp)))
|
2549
|
307 (not (looking-at parsep))
|
428
|
308 (looking-at fill-prefix-regexp))
|
|
309 (forward-line 1))
|
2549
|
310 (while (and (re-search-forward sp-parstart nil 1)
|
428
|
311 (progn (setq start (match-beginning 0))
|
|
312 (goto-char start)
|
|
313 (not (eobp)))
|
|
314 (progn (move-to-left-margin)
|
2549
|
315 (not (looking-at parsep)))
|
|
316 (or (not (looking-at parstart))
|
428
|
317 (and use-hard-newlines
|
|
318 (not (get-text-property (1- start) 'hard)))))
|
|
319 (forward-char 1))
|
|
320 (if (< (point) (point-max))
|
2549
|
321 (goto-char start))))
|
4103
|
322 (if-fboundp #'constrain-to-field
|
|
323 (constrain-to-field nil opoint t)
|
|
324 (error
|
|
325 'void-function
|
|
326 "constrain-to-field not available; is xemacs-base installed?"))
|
2549
|
327 ;; Return the number of steps that could not be done.
|
|
328 arg))
|
428
|
329
|
|
330 (defun backward-paragraph (&optional arg)
|
|
331 "Move backward to start of paragraph.
|
2549
|
332 With argument ARG, do it ARG times;
|
|
333 a negative argument ARG = -N means move forward N paragraphs.
|
428
|
334
|
|
335 A paragraph start is the beginning of a line which is a
|
|
336 `first-line-of-paragraph' or which is ordinary text and follows a
|
|
337 paragraph-separating line; except: if the first real line of a
|
|
338 paragraph is preceded by a blank line, the paragraph starts at that
|
|
339 blank line.
|
|
340
|
|
341 See `forward-paragraph' for more information."
|
|
342 (interactive "_p") ; XEmacs
|
|
343 (or arg (setq arg 1))
|
|
344 (forward-paragraph (- arg)))
|
|
345
|
687
|
346 (defun mark-paragraph (&optional arg)
|
428
|
347 "Put point at beginning of this paragraph, mark at end.
|
687
|
348 The paragraph marked is the one that contains point or follows point.
|
2549
|
349
|
|
350 With argument ARG, puts mark at end of a following paragraph, so that
|
|
351 the number of paragraphs marked equals ARG.
|
|
352
|
|
353 If ARG is negative, point is put at end of this paragraph, mark is put
|
|
354 at beginning of this or a previous paragraph.
|
|
355
|
|
356 If this command is repeated, it marks the next ARG paragraphs after (or
|
|
357 before, if arg is negative) the ones already marked."
|
687
|
358 (interactive "p")
|
|
359 (unless arg (setq arg 1))
|
|
360 (when (zerop arg)
|
|
361 (error "Cannot mark zero paragraphs"))
|
2549
|
362 (cond ((and (eq last-command this-command) (mark t))
|
|
363 (set-mark
|
|
364 (save-excursion
|
|
365 (goto-char (mark))
|
|
366 (forward-paragraph arg)
|
|
367 (point))))
|
|
368 (t
|
|
369 (forward-paragraph arg)
|
|
370 (push-mark nil t t)
|
|
371 (backward-paragraph arg))))
|
428
|
372
|
|
373 (defun kill-paragraph (arg)
|
|
374 "Kill forward to end of paragraph.
|
|
375 With arg N, kill forward to Nth end of paragraph;
|
|
376 negative arg -N means kill backward to Nth start of paragraph."
|
|
377 (interactive "*p") ; XEmacs
|
|
378 (kill-region (point) (progn (forward-paragraph arg) (point))))
|
|
379
|
|
380 (defun backward-kill-paragraph (arg)
|
|
381 "Kill back to start of paragraph.
|
|
382 With arg N, kill back to Nth start of paragraph;
|
|
383 negative arg -N means kill forward to Nth end of paragraph."
|
|
384 (interactive "*p") ; XEmacs
|
|
385 (kill-region (point) (progn (backward-paragraph arg) (point))))
|
|
386
|
|
387 (defun transpose-paragraphs (arg)
|
|
388 "Interchange this (or next) paragraph with previous one."
|
|
389 (interactive "*p")
|
|
390 (transpose-subr 'forward-paragraph arg))
|
|
391
|
|
392 (defun start-of-paragraph-text ()
|
|
393 (let ((opoint (point)) npoint)
|
|
394 (forward-paragraph -1)
|
|
395 (setq npoint (point))
|
|
396 (skip-chars-forward " \t\n")
|
|
397 ;; If the range of blank lines found spans the original start point,
|
|
398 ;; try again from the beginning of it.
|
|
399 ;; Must be careful to avoid infinite loop
|
|
400 ;; when following a single return at start of buffer.
|
|
401 (if (and (>= (point) opoint) (< npoint opoint))
|
|
402 (progn
|
|
403 (goto-char npoint)
|
|
404 (if (> npoint (point-min))
|
|
405 (start-of-paragraph-text))))))
|
|
406
|
|
407 (defun end-of-paragraph-text ()
|
|
408 (let ((opoint (point)))
|
|
409 (forward-paragraph 1)
|
446
|
410 (if (eq (char-before (point)) ?\n) (backward-char 1))
|
428
|
411 (if (<= (point) opoint)
|
|
412 (progn
|
|
413 (forward-char 1)
|
|
414 (if (< (point) (point-max))
|
|
415 (end-of-paragraph-text))))))
|
|
416
|
|
417 (defun forward-sentence (&optional arg)
|
|
418 "Move forward to next `sentence-end'. With argument, repeat.
|
|
419 With negative argument, move backward repeatedly to `sentence-beginning'.
|
|
420
|
|
421 The variable `sentence-end' is a regular expression that matches ends of
|
450
|
422 sentences. A paragraph boundary also terminates a sentence."
|
428
|
423 (interactive "_p") ; XEmacs
|
|
424 (or arg (setq arg 1))
|
2549
|
425 (let ((opoint (point)))
|
|
426 (while (< arg 0)
|
|
427 (let ((pos (point))
|
|
428 (par-beg (save-excursion (start-of-paragraph-text) (point))))
|
|
429 (if (and (re-search-backward sentence-end par-beg t)
|
|
430 (or (< (match-end 0) pos)
|
|
431 (re-search-backward sentence-end par-beg t)))
|
|
432 (goto-char (match-end 0))
|
|
433 (goto-char par-beg)))
|
|
434 (setq arg (1+ arg)))
|
|
435 (while (> arg 0)
|
|
436 (let ((par-end (save-excursion (end-of-paragraph-text) (point))))
|
|
437 (if (re-search-forward sentence-end par-end t)
|
|
438 (skip-chars-backward " \t\n")
|
|
439 (goto-char par-end)))
|
|
440 (setq arg (1- arg)))
|
4103
|
441 (if-fboundp #'constrain-to-field
|
|
442 (constrain-to-field nil opoint t)
|
|
443 (error
|
|
444 'void-function
|
|
445 "constrain-to-field not available; is xemacs-base installed?"))))
|
428
|
446
|
|
447 (defun backward-sentence (&optional arg)
|
|
448 "Move backward to start of sentence. With arg, do it arg times.
|
|
449 See `forward-sentence' for more information."
|
|
450 (interactive "_p") ; XEmacs
|
|
451 (or arg (setq arg 1))
|
|
452 (forward-sentence (- arg)))
|
|
453
|
|
454 (defun kill-sentence (&optional arg)
|
|
455 "Kill from point to end of sentence.
|
|
456 With arg, repeat; negative arg -N means kill back to Nth start of sentence."
|
|
457 (interactive "*p") ; XEmacs
|
|
458 (kill-region (point) (progn (forward-sentence arg) (point))))
|
|
459
|
|
460 (defun backward-kill-sentence (&optional arg)
|
|
461 "Kill back from point to start of sentence.
|
|
462 With arg, repeat, or kill forward to Nth end of sentence if negative arg -N."
|
|
463 (interactive "*p") ; XEmacs
|
|
464 (kill-region (point) (progn (backward-sentence arg) (point))))
|
|
465
|
|
466 (defun mark-end-of-sentence (arg)
|
2549
|
467 "Put mark at end of sentence. Arg works as in `forward-sentence'.
|
|
468 If this command is repeated, it marks the next ARG sentences after the
|
|
469 ones already marked."
|
428
|
470 (interactive "p")
|
|
471 ;; FSF Version:
|
2549
|
472 ; (push-mark
|
|
473 ; (save-excursion
|
|
474 ; (if (and (eq last-command this-command) (mark t))
|
|
475 ; (goto-char (mark)))
|
|
476 ; (forward-sentence arg)
|
|
477 ; (point))
|
|
478 ; nil t))
|
428
|
479 (mark-something 'mark-end-of-sentence 'forward-sentence arg))
|
|
480
|
|
481 (defun mark-end-of-line (arg)
|
|
482 "Put mark at end of line. Arg works as in `end-of-line'."
|
|
483 (interactive "p")
|
|
484 (mark-something 'mark-end-of-line 'end-of-line arg))
|
|
485
|
|
486 (defun transpose-sentences (arg)
|
|
487 "Interchange this (next) and previous sentence."
|
|
488 (interactive "*p")
|
|
489 (transpose-subr 'forward-sentence arg))
|
|
490
|
2549
|
491 ;;; Local Variables:
|
|
492 ;;; coding: iso-2022-7bit
|
|
493 ;;; End:
|
|
494
|
428
|
495 ;;; paragraphs.el ends here
|