[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, 09 Jul 2003 01:31:30 +0200
Gnus/5.090016 (Oort Gnus v0.16) Emacs/20.7 (gnu/linux)
> From: "Zoltan Kemenczy" <address@hidden>
> Subject: cc-engine:c-guess-basic-syntax related problem in latest CVS
> To: <address@hidden>
> Date: Tue Jul 8 04:11:46 2003 +0200
> Try S-M-; (c-guess-basic-syntax) at different points within a buffer
> visiting a C source file that is *write-protected*... - I get a "Buffer is
> read-only: #<buffer foo.c>" message in many places. If the buffer is made
> writeable, the syntactic information is returned...
This has to do with functions that make "hidden buffer changes", i.e.
change text properties for internal purposes. See the blurb on that
near the top of cc-engine.el. c-guess-basic-syntax is a function that
could do such hidden buffer changes, but I've now wrapped it so that
it can be called in read only mode again.
> A related question (that started all this) is that the point value of the
> syntactic information is now returned as '(syntax-symbol point-integer) list
> (it used to be a cons cell: '(symbol . point-integer)). This breaks my
> gud-find-class function inside gud.el. I fixed that function (to use more
> maintainable predicate functions on the syntactic info as opposed to the
> (car (cdr...)), but before I submit the patch, I'd like to ask if this
> change to the '(syntax-symbol point-integer) is there to stay...
It is. I had to do that change to be able to extend syntactic
information. There's a note about it in NEWS (which I've extended a
I think such predicate functions belong in CC Mode. How did you design
- Re: address@hidden: cc-engine:c-guess-basic-syntax related problem in latest CVS],
Martin Stjernholm <=