[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: cc-engine:c-guess-basic-syntax related problem in l
Re: address@hidden: cc-engine:c-guess-basic-syntax related problem in latest CVS]
Wed, 16 Jul 2003 23:13:23 +0200
Gnus/5.090016 (Oort Gnus v0.16) Emacs/20.7 (gnu/linux)
"Zoltan Kemenczy" <address@hidden> wrote:
> Getting syntax information on write-protected C++ buffers does work now...
> (however, visiting a .java file now doesn't load java-mode?? :-( .
Perhaps you haven't updated your loaddefs.el file lately?
> Two "predicates" (there must be a better term for "getAttribute"
> type methods?)
I call them accessor functions.
> I found useful to define (inside gud-find-class as local symbols)
> (fset 'syntax-symbol (lambda (x) (car (car x)))) ; symbol of first
> syntactic element
> (fset 'syntax-point (lambda (x) (car (cdr (car x))))) ; point (integer) of
> first syntactic element
I find it more generic to make accessor functions for a single
syntactic element and then treat the syntactic context as a normal
list of them (i.e. no use defining accessors for the list itself).
There are many cases where single elements are handled.
> It's just common sense to have such predicates with the "objects",
> so if you agree, redesign/name them for cc-engine, and I'll patch
> gud-jdb accordingly...
I've now added c-langelem-sym, c-langelem-pos, and c-langelem-2nd-pos
(which makes use of the new extended information in some syntactic
elements). (The naming scheme stems from the already existing