From: Alan M. <ac...@mu...> - 2006-01-31 22:00:27
|
Hi, Richard! On Tue, 31 Jan 2006, Richard M. Stallman wrote: >In man/display.texi it says: > Comment and string fontification (or ``syntactic'' fontification) >relies on analysis of the syntactic structure of the buffer text. For >the sake of speed, some modes, including C mode and Lisp mode, >rely on a special convention: an open-parenthesis or open-brace in the >leftmost column always defines the @w{beginning} of a defun, and is >thus always outside any string or comment. (@xref{Left Margin >Paren}.) If you don't follow this convention, Font Lock mode can >misfontify the text that follows an open-parenthesis or open-brace in >the leftmost column that is inside a string or comment. >Is that still true for C mode? No. Or, at least, it shouldn't be. In more detail: (i) CC Mode tries to set open-paren-in-column-0-is-defun-start buffer-locally to nil. I think there's a bug in cc-defs.el, though, so it doesn't succeed. I'll look at this tomorrow, and fix it if need be. (ii) If the user binds C-M-[ae] to c-\(beginining\|end\)-of-defun, those commands do the Right Thing regardless of open-paren-in-column-0-is-defun-start. Incidentally, I'm about to release the bug-fix release CC Mode 5.31.3. There are show-stopper bugs fixed in it. I hope to commit it to savannah by ~Wednesday 8th February, possibly sooner. -- Alan Mackenzie (Munich, Germany) |