emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CC-mode conflict with lucid.el


From: Martin Stjernholm
Subject: Re: CC-mode conflict with lucid.el
Date: Thu, 03 Jul 2003 17:20:58 +0200
User-agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/20.7 (gnu/linux)

Masayuki Ataka <address@hidden> wrote:

> cc-engine.el and lucid.el conflicts.
> 
> [TRIGER]
> (0) $ emacs -q
> (1) (require 'lucid) at first.
> (2) Open C file and write struct out of function.
> --- test.c ---
> struct a {
> -!-
> --------------
> (3) Hit TAB for indentation at the place of -!-.
> (4) ERORR: Args out of range
> 
> 
> [BACKTRACE]
> Debugger entered--Lisp error: (args-out-of-range 1 12)
>   parse-partial-sexp(1 12 nil nil (0 nil nil nil nil nil 0 nil nil nil))
>   syntax-ppss(12)
>   buffer-syntactic-context()
>   c-in-literal(12)
>   c-guess-basic-syntax()
>   c-indent-line()
>   #[nil "Â>ƒ)C ��x� � )iÆ Xƒ\"Ç !‚'G   !))‡ ‡" 
> [indent-line-function column (indent-relative indent-relative-maybe) 
> beginning-of-line "\n   " nil current-indentation indent-line-to] 2 680988 
> nil]()
>   c-indent-command(1)
>   call-interactively(c-indent-command)
> 
> 
> [I think...]
> File lucid.el defines function buffer-syntactic-context for XEmacs 
> compatibility.
> cc-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. If the function exists then CC
Mode only uses it under the assumption that it works like in XEmacs,
not that CC Mode runs in XEmacs. The lucid package also defines it
with the goal that it should work as in XEmacs, which apparently isn't
the case.

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 also see that the lucid.el version doesn't return 'block-comment
like the XEmacs original. That ought to be fixed too.

> (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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]