Commit graph

297 commits

Author SHA1 Message Date
Stefan Monnier
8748595969 (fill-paragraph): Go to BOL before calling forward-paragraph to make
sure its return value is meaningful.
2002-10-07 13:54:44 +00:00
Stefan Monnier
3078db3222 (fill-paragraph): Give up if there's no paragraph at or after point. 2002-10-03 23:01:51 +00:00
Juanma Barranquero
f7a53caeeb (fill-nonuniform-paragraphs, fill-individual-paragraphs): Fix spacing. 2002-09-06 07:18:44 +00:00
Stefan Monnier
dc864d6e59 (fill-context-prefix): Fix last change with yet-another-approach. 2002-04-29 04:02:22 +00:00
Stefan Monnier
79424eea3d (fill-region-as-paragraph): Use save-excursion instead of relying on
forward-line to bring us where we started.
2002-04-12 02:56:29 +00:00
Stefan Monnier
4599773d96 (fill-context-prefix): Fix up last change. 2002-04-12 00:01:53 +00:00
Stefan Monnier
bb424945f3 (canonically-space-region): Obey sentence-end.
Don't add spaces at end of sentences at end of line.
(fill-move-to-break-point): Make sure the result is always greater
than linebeg, so we ensure forward progress.
(fill-region-as-paragraph): Compare to `to' rather than eobp.
(fill-paragraph): Don't rebind fill-paragraph-function.
2002-04-11 22:00:07 +00:00
Stefan Monnier
d47e9c0658 (adaptive-fill-regexp): Add ! and %.
(fill-delete-prefix): Remove indentation while removing prefix.
(fill-delete-newlines): Obey sentence-end.
(fill-move-to-break-point, fill-newline): New functions extracted
from fill-region-as-paragraph.
(fill-region-as-paragraph): Use them.
Don't fiddle with fill-indent-according-to-mode.
2002-04-10 21:21:12 +00:00
Stefan Monnier
419275721f (fill-context-prefix): Match the two prefixes
differently to avoid pathological exponential-time case.
2002-04-10 18:19:44 +00:00
Richard M. Stallman
c3f9a06ab9 (set-justification): Rename arg VALUE to STYLE.
(set-justification-left, set-justification-right): Doc fix.
2001-12-07 03:34:59 +00:00
Pavel Janík
d9a4974038 Doc fixes. 2001-12-03 06:11:37 +00:00
Stefan Monnier
4bcb1be178 (fill-indent-according-to-mode): Default to nil. 2001-11-25 22:37:00 +00:00
Stefan Monnier
2f4fa275e8 (fill-delete-prefix, fill-delete-newlines):
New functions, extracted from fill-region-as-paragraph.
(fill-region-as-paragraph): Use them.
Use an end marker instead of eob.
Ignore whitespace-only fill-prefixes when indenting according to mode.
Simply the loop that searches for spaces backwards.
2001-11-19 23:51:03 +00:00
Stefan Monnier
6d1f0a5ea9 (fill-context-prefix): Fix braino. 2001-11-03 00:55:10 +00:00
Stefan Monnier
2d78d3e878 (fill-region-as-paragraph): Don't forget to skip
over current whitespace before looking for a preceding space.
2001-11-02 03:10:46 +00:00
Stefan Monnier
03e3e2e91f (sentence-end-double-space, sentence-end-without-period): Move to paragraphs.
(fill-indent-according-to-mode): Change default to t.
(fill-context-prefix): Simplify control-flow and use a more
sophisticated merge that unifies both previous checks.
(fill-single-word-nobreak-p, fill-french-nobreak-p): New funs.
(fill-nobreak-predicate): Make it into a defcustom'd hook.
(fill-nobreak-p): New fun.
(fill-region-as-paragraph): Use it.
Handle `fill-indent-according-to-mode' slightly differently.
(fill-individual-paragraphs-prefix): Simplify the control-flow.
(fill-individual-paragraphs-citation): Fix.
2001-10-30 08:08:12 +00:00
Stefan Monnier
9371f619b9 (adaptive-fill-regexp): Admit tabs as well. 2001-08-22 22:20:06 +00:00
Pavel Janík
6228c05b99 Keyword added and FSF specified as Maintainer. 2001-08-06 10:12:17 +00:00
Stefan Monnier
da197e7571 (fill-region-as-paragraph): Don't look further back than LINEBEG. 2001-06-25 19:20:15 +00:00
Stefan Monnier
1cc218de32 (fill-individual-paragraphs-prefix): Fix transcription typo. 2001-03-23 08:18:51 +00:00
Stefan Monnier
3212cc84cd (fill-context-prefix): Allow first-line-prefix to match paragraph-start. 2001-03-07 00:12:59 +00:00
Stefan Monnier
cb91b2c7ee (fill-region-as-paragraph): Skip spaces backward
rather than using (match-beginning 0) when searching for break point.
Because match-data might have been destroyed by fill-nobreak-predicate
or might never have been setup if the re-search-backward has failed.
2001-02-22 20:09:13 +00:00
Dave Love
ef4d4394bf (adaptive-fill-function): Fix :type 2001-02-07 23:31:57 +00:00
Gerd Moellmann
2441692dc8 (set-fill-prefix): Cancel fill prefix if point
is in front of the left-margin, if any.
2001-01-31 16:12:41 +00:00
Miles Bader
27849a6528 (skip-line-prefix): New function.
(fill-region-as-paragraph, fill-region): Return the fill-prefix.
(fill-paragraph): Don't leave point inside the fill-prefix.
2000-11-13 12:11:04 +00:00
Stefan Monnier
178932de25 (fill-indent-according-to-mode): New var.
(fill-region-as-paragraph): Use it.
2000-11-10 11:43:55 +00:00
Dave Love
742c182294 (sentence-end-double-space)
(sentence-end-without-period):  Doc fix.
(adaptive-fill-regexp): Purecopy.
(unjustify-current-line): Use line-end-position.
(fill-individual-paragraphs-prefix): Use line-beginning-position.
2000-10-06 19:50:40 +00:00
Kenichi Handa
b1376368e2 (fill-find-break-point): Check the validity of charset. 2000-06-07 12:00:23 +00:00
Gerd Moellmann
3b99a4f882 (fill-individual-paragraphs): If a no-prefix
line is followed by one that matches CITATION-REGEXP, end the
paragraph.
2000-04-03 19:28:16 +00:00
Gerd Moellmann
7190ab8737 (fill-common-string-prefix): New function.
(fill-context-prefix): Use the longest common substring of both
prefixes, if there is one.
2000-01-11 21:42:12 +00:00
Kenichi Handa
34a500b327 (fill-find-break-point): Delete codes for
composite characters.
(fill-region-as-paragraph): Likewise.
1999-12-15 00:52:08 +00:00
Richard M. Stallman
ea9ae18a55 (fill-region-as-paragraph, canonically-space-region):
Respect colon-double-space at end of line.
1999-09-08 07:50:19 +00:00
Karl Heuer
cc7e972037 (fill-individual-paragraphs): Calculate new
fill prefix on each line while looping to the end of paragraph.
End paragraph if it's longer than the existing fill prefix.
1999-07-30 14:34:28 +00:00
Karl Heuer
39f5988df8 (fill-context-prefix): Doc fix. 1999-07-30 14:31:57 +00:00
Karl Heuer
e7029763ca (fill-region-as-paragraph): Fix previous change. 1999-07-27 20:06:20 +00:00
Kenichi Handa
9d289ed7c7 (fill-region-as-paragraph): Fix previous change. 1999-07-26 00:29:37 +00:00
Kenichi Handa
7141e1e0ff (fill-region-as-paragraph): Fix previous change. 1999-07-26 00:14:37 +00:00
Kenichi Handa
ca29a33e6a (fill-region-as-paragraph): Avoid backing up
before left margin and fill-prefix by fill-find-break-point.
1999-07-23 07:27:21 +00:00
Dave Love
369aeb97a9 (canonically-space-region, justify-current-line): Add * to interactive
spec.
(fill-region-as-paragraph, fill-paragraph, fill-region)
(fill-nonuniform-paragraphs, fill-individual-paragraphs): Check
readonly buffer in interactive spec.
1999-07-20 16:02:27 +00:00
Dave Love
bdcb0e25c9 (sentence-end-double-space): Doc fix. 1999-03-12 18:48:09 +00:00
Kenichi Handa
971c2d04d2 (fill-region-as-paragraph): While deleting a
newline in multibyte buffer, if previous or next character is a
composite char, check the first component of the composite char.
1999-01-05 02:39:31 +00:00
Kenichi Handa
ce82deede2 (sentence-end-without-period): New variable.
(canonically-space-region): Pay attention to
sentence-end-without-period.
(fill-find-break-point): The first argument CHARSET deleted.
Caller changed.
(fill-region-as-paragraph): Pay attention to charset property
nospace-between-words and text property nospace-between-words.
1998-10-21 11:50:56 +00:00
Kenichi Handa
9732380494 Setup `fill-find-break-point-function'
property to character sets which require `kinsoku' processing for
filling.
(fill-find-break-point): New function.
(fill-region-as-paragraph): Don't check kinsoku-enable here.
Don't call kinsoku directly, intead call fill-find-break-point.
1998-10-19 00:40:10 +00:00
Karl Heuer
11da289651 (fill-individual-paragraphs-prefix):
Avoid nil value of `two-lines-citation-part'
1998-09-30 19:03:31 +00:00
Karl Heuer
c97a5db406 (fill-individual-paragraphs): Before deleting
the inserted newline, verify that one was really inserted.
1998-09-04 20:37:22 +00:00
Richard M. Stallman
b3a0387c09 (fill-individual-paragraphs-prefix): New
subroutine taken from fill-individual-paragraphs.  Really check that
JUST-ONE-LINE-PREFIX is longer than TWO-LINES-PREFIX in its whitespace.
(fill-individual-paragraphs-citation): New subroutine.
(fill-nonuniform-paragraphs): Arg MAILP renamed.
(fill-individual-paragraphs): Arg MAILP renamed.
1998-07-13 02:11:16 +00:00
Richard M. Stallman
fea4012025 (fill-individual-paragraphs): Fix previous change. 1998-07-09 05:32:47 +00:00
Richard M. Stallman
c221399445 (fill-individual-paragraphs): If JUST-ONE-LINE-PREFIX matches
TWO-LINES-PREFIX except with longer whitespace, treat that as a match
even is spaces are replaced with a tab.
1998-07-04 09:44:09 +00:00
Richard M. Stallman
bb801a426f (fill-paragraph):
Bind fill-paragraph-function to nil, if it doesn't do the job.
1998-06-05 22:27:42 +00:00
Richard M. Stallman
78652ce8bd (fill-region-as-paragraph):
Don't add a newline at the end, when there is none.
1998-05-23 20:00:18 +00:00