>>>> "Yoshiki" == Yoshiki Hayashi
<yoshiki(a)xemacs.org> writes:
> I think a synch to Emacs 20.7, possibly with some additional
> features, _is_ the right way to go here. The main changes I've
> noticed so far over there are (1) a variable that _really_
> disables kinsoku (if I read the code correctly) and (2) instead
> of hard-coding searches and using looking-at, kinsoku is
> implemented via text properties.
Yoshiki> Agreed except that I don't think I understand (2). What
Yoshiki> kind of use of text property do you have in mind?
Oops, I think I got that wrong; I accidentally blew away my tree so
don't have sources to look at right now. Not text properties, exactly,
but properties of charsets.
In the current XEmacs implementation, there is a regexp
`word-across-newline', and kinsoku is implemented
(if (looking-at word-across-newline)
;; break here is OK
;; dame, dame, go back and try again
)
(Obviously more complex, but you get the idea.)
In Emacs 20.7, it's done by setting a kinsoku property on character
sets or with category tables, and doing something like
(if (charset-property (char-charset (char-after (point)))
'word-across-newline)
;; hai, ganbatte, go for it
;; dame dame, no good go back
)
This is more compatible with handling kinsoku language by language,
which is preferable.
The reason I was thinking of text properties is that there is this
long-standing problem with kinsoku, that kinsoku means that whitespace
needs to be preserved at line breaks. So the hack that has
historically been used is to leave a space at the end of the line, but
this screws up automated format checking tools. (Yes, there are still
organizations out there that insist you set the margins to 80 columns,
and heaven help the programmer if there's whitespace hanging out into
the right margin.) One thing that could be done here is to set a text
property on the newline to indicate whether it is significant
whitespace or just a line break.
This doesn't help to preserve whitespace across file saves,
unfortunately; however, if you don't kill the buffer, Emacs will
remember the state even though there is no indication in the saved
file.
Yoshiki> Perhaps another change is (3) fix two-column hack of
Yoshiki> Japanese characters. However, I haven't given any
Yoshiki> thought to this issue.
This is relatively hard, I think. What did you have in mind?
--
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences Tel/fax: +81 (298) 53-5091
_________________ _________________ _________________ _________________
What are those straight lines for? "XEmacs rules."