jed-users mailing list

[2006 Date Index] [2006 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Paragraph reformatting functionality


On Fri, 20 Jan 2006 09:46:53 -0500, "John E. Davis" <davis@xxxxxxxxxxxxx> said:

> I hope the SegV did not occur in jed.

In structured_text.sl:
   % show("line", what_line, "calling st_is_paragraph_separator");
   return orelse{line_is_empty()}{line_is_list()>0};
   % attention: there is a segfault if the paragraph_separator_hook returns
   % values higher than 1!

What Gunter probably tried first was
   return orelse{line_is_empty()}{line_is_list()};

I'm not sure about the segfault but it won't work, probably because of
the line

   while ((1 == is_paragraph_sep ())

in text.c

> > * By default, a line which is a paragraph separator doesnot get
> >   formatted :-(

> I am not sure what you mean.  Do you have a simple example?

What he means is that in JED there is only a paragraph separator, while
Emacs has a paragraph_separator and a paragraph_start:

,----
|    The precise definition of a paragraph boundary is controlled by the
| variables `paragraph-separate' and `paragraph-start'.  The value of
| `paragraph-start' is a regexp that should match any line that either
| starts or separates paragraphs.  The value of `paragraph-separate' is
| another regexp that should match only lines that separate paragraphs
| without being part of any paragraph (for example, blank lines).  Lines
| that start a new paragraph and are contained in it must match only
| `paragraph-start', not `paragraph-separate'.  For example, in
| Fundamental mode, `paragraph-start' is `"[ \t\n\f]"', and
| `paragraph-separate' is `"[ \t\f]*$"'.
`----

You can get around this by narrowing to the paragraph, as is done in
e.g. email.sl, since the first paragraph in the buffer does not have a
paragraph separator preceding it.

> >So maybe I have to write a format_paragraph from scratch.
You could also comment out the line
	!if (bobp) go_down_1;
in subpar.sl to get the desired effect.

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2006 date index] [2006 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]