1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-19 18:13:55 +00:00
Commit Graph

240 Commits

Author SHA1 Message Date
Richard M. Stallman
f37bbf0885 (canonically-space-region): Doc fix.
(fill-context-prefix): If the second line has the first line prefix,
plus whitespace, use the part that the first line shares.
(fill-individual-paragraphs): When prefix changes,
usually get the new prefix from just one line,
with an exception for indented first lines of paragraphs.
Start a new paragraph when a line has extra indentation
after the fill prefix.
1997-09-14 20:27:34 +00:00
Richard M. Stallman
4574ee6c8d (fill-individual-paragraphs): Don't include
paragraph-separate lines in any paragraph; just skip them.
1997-09-08 06:47:05 +00:00
Richard M. Stallman
b4d413d983 (fill-individual-paragraphs): Fix handling
of adaptive-fill.  Call fill-context-prefix, but bind
adaptive-fill-first-line-regexp to a null string.
1997-08-18 20:08:38 +00:00
Richard M. Stallman
66d6ec94bb (fill-region-as-paragraph):
When justifying, cope if line ends in spaces and no newline.
1997-08-12 15:52:17 +00:00
Richard M. Stallman
4dc0f0fc0e (enable-kinsoku): Doc fix. 1997-08-09 03:41:42 +00:00
Richard M. Stallman
82d5a63762 (fill-context-prefix): Accept a whitespace
prefix from the second line, regardless of the first line.
1997-08-07 20:51:57 +00:00
Richard M. Stallman
21942e0198 (adaptive-fill-first-line-regexp): Fix regexp. 1997-08-01 19:20:29 +00:00
Richard M. Stallman
c61005b96d (fill-context-prefix): Be stricter about
whether first-line prefix is compatible with second-line prefix.
1997-07-27 19:56:21 +00:00
Richard M. Stallman
368d104a8a Doc fixes. 1997-07-07 18:27:33 +00:00
Richard M. Stallman
b03ddefc2c (fill-context-prefix): Fix previous change. 1997-06-18 20:26:21 +00:00
Richard M. Stallman
44a0dbd7cd Fix previous change. 1997-06-17 21:47:30 +00:00
Richard M. Stallman
b5263b80d3 (fill-context-prefix): Fix criteria for first line,
and for second line; always fetch prefixes from both lines.
1997-06-17 21:46:40 +00:00
Richard M. Stallman
536d3fc556 (fill-context-prefix): Don't crash if RESULT is nil when AT-SECOND is t. 1997-06-12 18:42:28 +00:00
Richard M. Stallman
849f04e14d (fill-context-prefix): If we get a prefix from the
second line of the paragraph, verify the first line has it too.

(adaptive-fill-regexp): Allow - and |;
allow spaces within the prefix.  Allow numeric headings.
(adaptive-fill-first-line-regexp): New variable.
(fill-context-prefix): Use adaptive-fill-first-line-regexp.
If prefix from first line seems unreasonable, use whitespace instead.
Reject it entirely only if it is a paragraph-starter.
1997-06-11 06:51:29 +00:00
Kenichi Handa
c4cd8760a2 (enable-kinsoku): Name changed form do-kinsoku.
(fill-region-as-paragraph): Do `kinsoku' processing only if both
enable-kinsoku and enable-multibyte-characters are non-nil.
1997-05-17 02:01:42 +00:00
Richard M. Stallman
9d325ebf0d Use defgroup and defcustom. 1997-05-05 15:00:53 +00:00
Karl Heuer
c9d611f447 (do-kinsoku): New variable.
(fill-region-as-paragraph): Handle `kinsoku' processing.
1997-02-20 05:33:51 +00:00
Richard M. Stallman
d7fa5aa239 Change defconsts to defvars. 1996-12-16 01:33:02 +00:00
Richard M. Stallman
7b9f06576b (fill-individual-paragraphs): Don't get stuck
if no newline at the end of the region.
1996-05-31 04:17:02 +00:00
Richard M. Stallman
253996a892 (fill-region-as-paragraph): Fix the second check for
whether we reached the end of the paragraph.
1996-03-19 20:05:11 +00:00
Richard M. Stallman
a58fcb999b (fill-context-prefix): Unused var `eol' deleted. 1996-03-17 19:08:44 +00:00
Richard M. Stallman
9596811a3d Comment change. 1996-03-02 06:37:35 +00:00
Erik Naggum
f3253b8f05 (fill-region-as-paragraph): Doc fix. 1996-02-22 02:57:50 +00:00
Karl Heuer
8c37989580 (canonically-space-region): Use insert-before-markers
when inserting spaces at end of line.

(fill-region-as-paragraph): New arg SQUEEZE-AFTER.
1996-02-21 21:20:28 +00:00
Erik Naggum
b578f267af Update FSF's address. 1996-01-14 07:34:30 +00:00
Karl Heuer
dcfe5c0511 (fill-region-as-paragraph): Check again for reaching
the end of the paragraph, after we adjust for places we can't break
and make sure to keep at least one word.
1996-01-09 23:18:07 +00:00
Karl Heuer
5512735ef6 (fill-context-prefix, unjustify-current-line,
unjustify-region): Doc fix.
1996-01-04 23:35:23 +00:00
Richard M. Stallman
3103b038de (fill-paragraph-function): Doc fix. 1995-12-24 23:30:18 +00:00
Karl Heuer
dea10df4d4 (fill-context-prefix): Doc fix. 1995-12-13 02:09:24 +00:00
Richard M. Stallman
0bcfa3ac91 (fill-context-prefix): New arg first-line-regexp. 1995-11-18 16:42:57 +00:00
Richard M. Stallman
2b6eb8c6ce (fill-region-as-paragraph): Remove redundant "setq from".
Don't add extra newline at end if there is no text in paragraph --
doing so can make fill-region loop.
When testing for indentation exceeding fill-column, skip back over tabs too.

(fill-context-prefix): Use adaptive-fill-regexp only if non-nil.

(fill-context-prefix): Check adaptive-fill-function non-nil.
1995-11-17 23:32:15 +00:00
Richard M. Stallman
86ddc17c9c (fill-region-as-paragraph): Handle left margin extending to or past
fill-column.
1995-11-15 01:30:28 +00:00
Richard M. Stallman
c62861749e (fill-individual-paragraphs): Advance 1 line in inner loop. 1995-11-14 23:28:24 +00:00
Richard M. Stallman
16cf6ab20b (fill-region-as-paragraph): Since adaptive-fill-regexp
is supposed to match text STARTING at the left margin, use
`looking-at' rather than `re-search-forward'.
(fill-individual-paragraphs): Match fill-prefixes starting at left-margin.
1995-11-11 05:30:49 +00:00
Richard M. Stallman
d09d7ba961 (fill-region-as-paragraph): Use fill-context-prefix.
(fill-context-prefix): New function.

(fill-region-as-paragraph): Don't insert extra space
at end of filled region.

(fill-individual-paragraphs): Insist on nonempty header name,
in the special mailp case.
1995-11-10 17:13:56 +00:00
Richard M. Stallman
c2dd39b26f (adaptive-fill-function): Change defun to defvar. 1995-10-11 04:59:48 +00:00
Richard M. Stallman
68152e8f81 (fill-region-as-paragraph): Don't find adaptive-fill-regexp
on first line of paragraph if it's a paragraph-separate line.
Don't look past the intended line.
(adaptive-fill-function): New variable.
(fill-region-as-paragraph): Use it.
(colon-double-space): New variable.
(canonically-space-region): Put two spaces after colon if necessary.
1995-08-02 18:36:20 +00:00
Karl Heuer
34a5f45f7e (canonically-space-region): Doc fix.
(fill-region-as-paragraph): In adaptive-fill-mode,
if paragraph has one line, take the fill prefix from it.
(adaptive-fill-regexp): Doc fix.
(fill-individual-paragraphs): Use `adaptive-fill-regexp'
to determine `fill-prefix' if `adaptive-fill-mode' is non-nil.
1995-07-17 22:50:30 +00:00
Richard M. Stallman
1e87252ca9 (current-fill-column): If fill-column is nil, return nil. 1995-06-29 03:21:26 +00:00
Richard M. Stallman
f344058994 (fill-paragraph, fill-region, fill-nonuniform-paragraphs)
(fill-individual-paragraphs): Pass `full' for JUSTIFY arg,
in the interactive spec, if have prefix arg.
1995-04-14 18:33:44 +00:00
Richard M. Stallman
4455f41c28 (fill-region-as-paragraph): Undo previous change.
Instead, set JUSTIFY to `full' in the interactive spec.
1995-04-10 08:02:39 +00:00
Richard M. Stallman
42457d75fc (fill-region): Avoid error on reaching end of buffer. 1995-04-07 23:44:45 +00:00
Richard M. Stallman
078e01466d (fill-region-as-paragraph): If JUSTIFY is non-nil,
pass t to justify-current-line.
1995-04-07 06:02:37 +00:00
Karl Heuer
732be46569 Update copyright. 1995-04-07 01:20:53 +00:00
Richard M. Stallman
24aac19dbb (fill-region-as-paragraph): Remove fill-prefix first, then remove indentation. 1995-04-02 00:11:19 +00:00
Richard M. Stallman
25a8d958d1 (adaptive-fill-regexp): Skip # or ;.
Allow more than one of them (or *'s or >'s).
1995-03-13 06:31:48 +00:00
Richard M. Stallman
845681f650 (adaptive-fill-regexp): Skip #'s and ;'s. 1995-03-13 06:26:39 +00:00
Boris Goldowsky
1095bc3caa (set-fill-prefix): start from left-margin.
(fill-region-as-paragraph): don't delete hard newlines.  ignore whitespace
at beginning of region.  Remove justification indentation.
(fill-region): Don't use paragraph-movement commands when use-hard-newlines
is true, just search for hard newlines.
(current-justification): take care at EOB.
(set-justification): new argWHOLE-PAR.  Callers changed.
(justify-current-line): Error if JUSTIFY arg is not reasonable.
Better interaction if there is a fill-prefix.
"Line too long" warning removed.
(unjustify-current-line, unjustify-region): New functions.
1995-02-23 18:22:04 +00:00
Richard M. Stallman
e86fe0d789 (fill-paragraph): Bind fill-paragraph-function to nil before calling it. 1995-02-02 19:28:31 +00:00
Richard M. Stallman
86dfb30a1b (fill-paragraph-function): New variable.
(fill-paragraph): Use it.
1995-02-02 09:50:23 +00:00
Richard M. Stallman
5f63637658 (justify-current-line): Avoid error comparing fill-prefix
near end of buffer.  Do nothing fast if justification not wanted.
1995-01-25 00:05:59 +00:00
Richard M. Stallman
7112bf0f2a (fill-region-as-paragraph): At end, advance over any newlines
that were in the region but excluded from filling.
1995-01-20 23:06:06 +00:00
Richard M. Stallman
9a04e20535 (fill-region-as-paragraph): left-margin renamed to current-left-margin. 1995-01-19 04:29:17 +00:00
Richard M. Stallman
f43726fd67 (current-justification): Renamed from current-justification. Callers changed. 1995-01-19 04:27:15 +00:00
Richard M. Stallman
0cb08f9838 (set-justification): New function.
(set-justification-{none,left,right,full,center}): New functions.
(fill-region-as-paragraph, fill-region, justify-current-line): New
arg NOSQUEEZE defeats normal removal of extra whitespace.
(fill-region-as-paragraph, fill-region)
(fill-nonuniform-paragraphs, fill-individual-paragraphs):
Arg JUSTIFY-FLAG (JUSTIFYP) renamed to JUSTIFY.
(fill-region-as-paragraph): Obey left-margin; fill-prefix starts
after left-margin.  Disable filling if JUSTIFY == none, but indent to
margin anyway.
Adaptive-fill removes text-props from fill-prefixes it finds.
Adaptive-fill no longer has to notice left-margin: std fill does that.
Use fill-column and canonically-space-region functions.
(canonically-space-region): New fn split from fill-region-as-paragraph.
(fill-region): New args NOSQUEEZE (as above) and TO-EOP.
(default-justification): New variable.
(current-left-margin, fill-column, justification): New functions.
(fill-paragraph): Use fill-region-as-paragraph when possible.
(justify-current-line): New arguments; different kinds of
justification handled.  Uses left-margin and fill-column functions.
1995-01-19 04:20:52 +00:00
Richard M. Stallman
a098333dae (fill-region-as-paragraph): Don't modify newline
at end of paragraph, to make sure text-properties are preserved.
(fill-paragraph): Call fill-region, not fill-region-as-paragraph,
to avoid clobbering paragraph-internal hard-newlines.
(fill-region): If use-hard-newlines is on, divide into
"paragraphs" by breaking at every hard newline, temporarily
ignoring paragraph-start.
1995-01-13 08:44:26 +00:00
Richard M. Stallman
c4b55ff15c (fill-region-as-paragraph): If region starts in mid-line,
don't fill the text before that, but count it for indentation.
(fill-region): If region starts in mid-line, keep whole line
in the region, but pass the region start to fill-region-as-paragraph.
1994-12-04 19:49:21 +00:00
Richard M. Stallman
a461b8e01e (fill-individual-paragraphs): Avoid infinite loop
if mailp is set and no message was yanked.
1994-10-26 09:32:04 +00:00
Richard M. Stallman
481c029557 (fill-region, fill-region-as-paragraph): Fix previous change. 1994-10-02 02:23:21 +00:00
Richard M. Stallman
fc35793099 (fill-region, fill-region-as-paragraph):
If specified region ends before a newline, include that newline.
1994-10-01 07:35:26 +00:00
Richard M. Stallman
30d653c401 (justify-current-line): Inherit props when inserting spaces. 1994-09-23 20:46:35 +00:00
Richard M. Stallman
43203a1d75 (justify-current-line): Delete space at end of line. 1994-07-27 20:09:22 +00:00
Richard M. Stallman
32b50df655 (fill-region-as-paragraph): if left-margin is nonzero,
do adaptive-fill processing even for one-line paragraphs.
1994-05-28 08:15:16 +00:00
Karl Heuer
8f1204db34 Update copyright. 1994-05-03 23:47:06 +00:00
Richard M. Stallman
8f985fe23c (sentence-end-double-space): New variable.
(fill-region-as-paragraph): Handle it.
1994-02-04 04:45:52 +00:00
Richard M. Stallman
aea2e14ce5 (fill-region-as-paragraph): Do allow breaking line at a period
followed by two spaces, in the case where we are insisting on having at
least one complete word.
1993-12-23 03:47:45 +00:00
Richard M. Stallman
30b786c340 (fill-individual-paragraphs): Fix skipping headers of yanked message. 1993-11-12 23:35:39 +00:00
Richard M. Stallman
47f3858d11 (fill-region-as-paragraph): When we take one word
after the fill column, don't stop at period with just one space.
When checking whether at beginning of line, if no fill prefix,
ignore intervening whitespace.
1993-08-02 05:55:56 +00:00
Richard M. Stallman
362a07f4a4 (fill-region-as-paragraph): Move misplaced paren
ending `(if (eobp) nil ...)'.
In the loop that avoids breaking after `.' with one space,
break if we actually have two spaces.
1993-07-30 07:01:23 +00:00
Richard M. Stallman
e407986c56 (fill-nonuniform-paragraphs): New command. 1993-04-11 04:02:23 +00:00
Richard M. Stallman
55718e15d6 (fill-individual-paragraphs): When skipping mail headers, skip to a blank line. 1993-03-28 22:56:29 +00:00
Richard M. Stallman
cc1344d5cf Cancel previous change; this version should be identical to version 1.17. 1993-03-28 22:07:36 +00:00
Eric S. Raymond
008d65cfd9 (fill-paragraph, justify-current-line) Now uses the skip-syntax-
forward and backward characters and char-syntax to be smart about
filling syntaxes other than text.

This change was inspired by Richard Caley's fill-para package from LCD,
but the implementation is original.
1993-03-27 01:58:16 +00:00
Eric S. Raymond
e41b2db1da Added or corrected Commentary sections 1993-03-22 03:27:18 +00:00
Jim Blandy
9dfcfbc914 * simple.el (yank, yank-pop): Always return nil; don't rely on
exchange-point-and-mark to return nil.
	* fill.el (justify-current-line): Return nil, to be sure to
	conform with documentation.
1993-03-11 07:05:23 +00:00
Richard M. Stallman
89cd98f3ef (fill-paragraph): Don't actually change point before
calling fill-region-as-paragraph.
(fill-region-as-paragraph): Save point on undo list at start.
1992-10-04 04:10:02 +00:00
Richard M. Stallman
c382a89aa5 entered into RCS 1992-09-01 19:05:09 +00:00
Eric S. Raymond
3a801d0c71 *** empty log message *** 1992-07-22 04:22:42 +00:00
Richard M. Stallman
b9c7647e50 *** empty log message *** 1992-07-19 16:46:51 +00:00
Eric S. Raymond
fd7fa35a05 *** empty log message *** 1992-07-17 08:15:29 +00:00
Eric S. Raymond
e516799970 *** empty log message *** 1992-07-16 21:47:34 +00:00
Jim Blandy
e5d77022e8 *** empty log message *** 1992-06-30 13:54:21 +00:00
Richard M. Stallman
d5a92c0640 *** empty log message *** 1992-06-24 22:42:10 +00:00
Richard M. Stallman
406a57c16e *** empty log message *** 1992-06-22 01:29:50 +00:00
Richard M. Stallman
31c75fa730 *** empty log message *** 1992-06-02 02:33:00 +00:00
Eric S. Raymond
c0274f385f *** empty log message *** 1992-05-30 23:54:21 +00:00
Jim Blandy
e065a56e2d *** empty log message *** 1992-05-10 18:15:10 +00:00
Jim Blandy
aa228418e9 *** empty log message *** 1991-12-21 09:14:03 +00:00
Richard M. Stallman
54d7f6504d *** empty log message *** 1991-03-20 04:10:45 +00:00
root
f53a262dd9 Initial revision 1990-07-27 04:20:16 +00:00