[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CC-mode conflict with lucid.el
From: |
Stefan Monnier |
Subject: |
Re: CC-mode conflict with lucid.el |
Date: |
Thu, 03 Jul 2003 20:55:23 -0400 |
> > File lucid.el defines function buffer-syntactic-context for XEmacs
> > compatibility. c-engine.el defines alias for function c-in-literal if
> > the function buffer-syntactic-context is available.
> > I think cc-engine.el should not use buffer-syntactic-context in order to
> > check out XEmacs, if they wanted to.
>
> I regard this as a bug in lucid.el.
That sounds right. Note that lucid.el introduces lots of opportunities
for such problems so it should generally be avoided. The function
buffer-syntactic-context should simply be commented out from lucid.el.
I added it for no good reason (other than the fact that I had written
it and felt like I might as well install it there, which was obviously
a mistake).
If someone could do that for me, that'd be great.
> If the buffer-syntactic-context replacement worked, it's even possible
> that it improves the speed in CC Mode since the Emacs counterpart
> syntax-ppss is not yet used everywhere where it could do good.
I guess the problem is that the buffer is narrowed when syntax-ppss
is called. We should probably fix syntax-ppss to widen when needed.
> I also see that the lucid.el version doesn't return 'block-comment
> like the XEmacs original. That ought to be fixed too.
IIRC, the problem is that it's poorly defined: the doc says it returns
block-comments for line-terminated comments, but the implementation
returns block-comments for "style b comments". The two are orthogonal.
I think it's pretty easy to adjust buffer-syntactic-context to emulate
the behavior of the XEmacs code (it's more difficult to make it agree
with the doc).
> > (I can't follow why the function parse-partial-sexp returns error!)
>
> Haven't investigated that, but it looks like a problem in syntax-ppss
> in syntax.el.
Indeed,
Stefan
Re: CC-mode conflict with lucid.el, Richard Stallman, 2003/07/04