As I stated in a previous message
(
http://www.xemacs.org/list-archives/xemacs-beta/200009/msg00056.html),
I'm working on implementing support for the 'syntax-table text property
feature (from FSF Emacs >= 19.33). I've run across a couple issues that
I wanted to run by the XEmacs community to get an idea of what the
proper thing to do is.
Firstly, I've noticed that, unlike FSF Emacs, there are essentially two
chunks of code that deal with interpreting syntax in buffers:
syntax.c:parse-partial-sexp and font-lock.c:syntactically-sectionize.
FSF Emacs doesn't use the latter, and essentially duplicates its
functionality using parse-partial-sexp.
Each is called from
font-lock.el:font-lock-fontify-syntactically-region, and the claim in
the XEmacs sources is that the XEmacs version is "much faster because
of the C support [it provides]". This may have been the case at one
time, but it seems to me that just as much code is in C now via
parse-partial-sexp as is provided by syntactically-sectionize.
In fact, it seems like there's a fair amount of duplication of work
between syntactically-sectionize and parse-partial-sexp, and I'm
wondering whether the font-lock code should just be synced with FSF's
and syntactically-sectionize done away with. I suppose the definitive
answer would be provided by benchmarking the two approaches, but I
wanted to see if this path seemed reasonable before I started looking
into it further.
On a totally separate issue, I've noticed a difference in the
colorization between XEmacs and FSF Emacs. Specifically, FSF highlights
the delimiter characters for strings and comments, whereas XEmacs
doesn't for strings, and sort of kludges support for it for comments.
Some examples:
XEmacs: "<color>This is a string</color>"
FSF: <color>"This is a string"</color>
XEmacs <color># This is a comment
</color>
FSF: <color># This is a comment
</color>
^^ these are the same only because they're manually
adjusted by syntactically-sectionize
I'd like to rectify this, and wondered whether anyone would have a
problem with it. (Actually, if I just sync font-lock.el as described in
the first question, this would happen as well.)