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

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

CC-mode conflict with lucid.el


From: Masayuki Ataka
Subject: CC-mode conflict with lucid.el
Date: Tue, 17 Jun 2003 23:02:23 +0900 (JST)

Hi,

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 can't follow why the function parse-partial-sexp returns error!)

[Patch]
--- cc-engine.el~       Tue Jun 17 22:30:29 2003
+++ cc-engine.el        Tue Jun 17 22:30:03 2003
@@ -927,7 +927,7 @@
      ((eq context 'block-comment) 'c)
      ((and detect-cpp (save-excursion (c-beginning-of-macro lim))) 'pound))))
 
-(if (fboundp 'buffer-syntactic-context)
+(if (and (featurep 'xemacs) (fboundp 'buffer-syntactic-context))
     (defalias 'c-in-literal 'c-fast-in-literal))
 
 (defun c-literal-limits (&optional lim near not-in-delimiter)


P.S.
---
Emacs external package X-Symbol loads lucid.el at initialization.
So, X-Symbol user always loads lucid.el before cc-engine.el.


In GNU Emacs 21.3.50.14 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2003-05-19 on zack.math.sci.hiroshima-u.ac.jp
configured using `configure '--without-xim''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ja_JP.eucJP
  locale-coding-system: japanese-iso-8bit
  default-enable-multibyte-characters: t

Recent input:
SPC b u SPC <return> C-n C-n C-n C-n C-n C-n C-n C-n 
C-p C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-x o M-x 
w 3 m <return> C-n C-n C-n C-n C-n C-n C-n <tab> <return> 
C-s l u c i d C-g C-g C-x o C-x C-f C-g C-x C-w c c 
SPC SPC - e n g i n e . e l <return> C-x o M-x e m 
a SPC v e <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> r e 
p o SPC SPC r SPC SPC SPC b SPC <return>

Recent messages:
Result: nil [18 times]
Args out of range: 1, 13
error: "Cannot return from the debugger in an error"
Quit [3 times]
Rendering...done
Fontifying...done
Quit [2 times]
Saving file /home/m1378502/prog/java/seikyo/cc-engine.el...
Wrote /home/m1378502/prog/java/seikyo/cc-engine.el
Making completion list... [3 times]

reply via email to

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