cache contains info on parts that have been narrowed out.
(c-forward-keyword-clause): Fixed error handling. This bug could
cause interactive font locking to bail out.
(c-just-after-func-arglist-p): Handle paren-style types in Pike. Also
fixed some cases of insufficient handling of unbalanced parens.
* cc-engine.el (c-end-of-current-token): Return whether or not the
point moved.
(c-search-decl-header-end): Don't trip up on operator identifiers
in C++ and operators like == in all languages.
* cc-engine.el (c-backward-to-decl-anchor): Detect leading labels
correctly.
* cc-engine.el (c-guess-basic-syntax): Do not do hidden buffer
changes; there's third party code that calls this function
directly.
2003-07-07 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-fonts.el (javadoc-font-lock-keywords,
autodoc-font-lock-keywords): Don't byte compile on font lock
initialization when running from byte compiled files.
2003-07-06 Alan Mackenzie <bug-cc-mode@gnu.org>
* cc-engine.el: Fix AWK mode indentation when previous statement
ends with auto-increment "++".
2003-07-05 Martin Stjernholm <bug-cc-mode@gnu.org>
* cc-langs.el, cc-styles.el (c-style-alist, c-lang-variable-inits,
c-lang-variable-inits-tail): The values of these are changed, so
declare them as variables and not constants.
loop if something that looks like a macro begins in the middle of a
line.
(c-parse-state): Fixed a bug that could cause `c-state-cache' to
contain two conses in sequence when there's an unbalanced open paren
in a macro.
which doesn't get confused by inherit colons.
(c-end-of-decl-1): Don't treat functions that have "class" or "struct"
in the return type as classes or structs.
Better handling of C++ template args to avoid confusion with `<'
and `>' used as operators in member init expressions.
From Martin Stjernholm <bug-cc-mode@gnu.org>.
c-beginning-of-statement-1 that caused a bad case of recursion
which could consume a lot of CPU in large classes in languages
that have in-expression classes (i.e. Java and Pike).
(c-guess-basic-syntax): Check for in-expression
statements before top level constructs (i.e. case 6 is moved
before case 5 and is now case 4) to catch in-expression
classes in top level expressions correctly.
(c-guess-basic-syntax): Less naive handling of
objc-method-intro. Case 4 removed and case 5I added.
(c-beginning-of-inheritance-list,
c-guess-basic-syntax): Fixed recognition of inheritance lists
when the lines begins with a comma.
(c-forward-syntactic-ws): Fixed an infloop bug
when the buffer ends with a macro continuation char.
(c-guess-basic-syntax): Added support for
function definitions as statements in Pike. The first
statement in a lambda block is now labeled defun-block-intro
instead of statement-block-intro.
(c-narrow-out-enclosing-class): Whack the state
so that the class surrounding point is selected, not the one
innermost in the state.
(c-guess-basic-syntax): Fixed bug in
recognition of switch labels having hanging multiline
statements.
(c-beginning-of-member-init-list): Broke out
some code in c-guess-basic-syntax to a separate function.
(c-just-after-func-arglist-p): Fixed
recognition of member inits with multiple line arglists.
(c-guess-basic-syntax): New case 5B.3 to detect
member-init-cont when the commas are in funny places.
(c-looking-at-bos): New helper function.
(c-looking-at-inexpr-block): More tests to tell
inexpr and toplevel classes apart in Pike.
(c-guess-basic-syntax): Fixed bogus recognition
of case 9A.
(c-guess-basic-syntax): Made the cpp-macro
a syntax modifier like comment-intro, to make it possible to
get syntactic indentation for preprocessor directives. It's
incompatible wrt to lineup functions on cpp-macro, but it has
no observable effect in the 99.9% common case where cpp-macro
is set to -1000.
(c-guess-basic-syntax): Fixed bug with missed
member-init-cont when the preceding arglist is several lines.
(c-beginning-of-statement-1): Fixed bug where
we were left at comments preceding the first statement when
reaching the beginning of the buffer.
(c-beginning-of-closest-statement): New helper
function to go back to the closest preceding statement start,
which could be inside a conditional statement.
(c-guess-basic-syntax): Use
c-beginning-of-closest-statement in cases 10B.2, 17B and 17C.
(c-guess-basic-syntax): Better handling of
arglist-intro, arglist-cont-nonempty and arglist-close when
the arglist is nested inside parens. Cases 7A, 7C and 7F
changed.
(c-beginning-of-statement-1): Fixed handling of
multiline Pike type decls.
(c-guess-basic-syntax): Fixed bug with
fully::qualified::names in C++ member init lists. Preamble in
case 5D changed.
(c-collect-line-comments): Require same comment start column.
(c-guess-basic-syntax): Fixes for nesting of and
repeated defun-open's inside extern and namespace clauses. This
is done by passing a relpos to `inextern-lang' and `innamespace'.
Also, the relpos in `defun-open' is no longer always bol. It's
always bol when on the top level, however. Changed cases: 5A.5, 5I, 14A.
(c-forward-token-1, c-backward-token-1): New functions to move by tokens.
c-guess-basic-syntax): Fixes for Java 1.1 array initialization brace lists.
Don't narrow, just make a simple check against the given limit.
(c-collect-line-comments): New function.
(c-literal-limits): New function that finds the start and end pos
of a comment or string surrounding point.
(c-literal-limits-fast): A faster variant of `c-literal-limits'
for newer Emacsen where the state returned from
`parse-partial-sexp' contains the starting pos of the last literal.
(c-parse-state): Use (c-point 'bod) instead of
beginning-of-defun directly.
(c-guess-basic-syntax): Fixed a few byte compiler warnings.
(c-backward-to-start-of-do): Break infloop for
invalid code, e.g. when someone types while (TRUE) { at the top of
a buffer, we shouldn't hang when the { is typed!
(c-backward-to-start-of-if): Ensure never
move forward, not even if point < lim.
(c-search-uplist-for-classkey): When searching up for a class key,
instead of hardcoding the extended search for "extern", use the new
variable c-extra-toplevel-key, which is language dependent. For C++,
this variable includes the keyword "namespace" which will match C++
namespace introducing blocks.
(c-guess-basic-syntax): Support for recognizing C++ namespace
blocks, by elaborating on the mechanism used to find external
language blocks. Searches which hardcoded "extern" now use
c-extra-toplevel-key, a language dependent variable. Case clauses
that were modified: CASE 5A.1, CASE 5A.4, CASE 5F, CASE 5I, CASE
14A.
CASE 3: we can now determine whether we're at the beginning of a
cpp macro definition, or inside the middle of one. Set syntax to
'cpp-macro in the former case, 'cpp-macro-cont in the latter. In
both cases, the relpos is the beginning of the macro.
(c-forward-syntactic-ws): Added code that skips forward over
multi-line cpp macros.
(c-beginning-of-macro): Moved, and made into a defsubst. This
function can now actually find the beginning of a multi-line C
preprocessor macro.
(c-backward-syntactic-ws): Use c-beginning-of-macro to skip backwards
over multi-line macro definitions.
(c-in-literal, c-fast-in-literal): Use c-beginning-of-macro to
find out whether we're in a multi-line macro definition.
(c-fast-in-literal): Function which should be faster than
c-in-literal. In XEmacs, this uses buffer-syntactic-context.
CASE 5F: extern-lang-close relpos should be
element 0 of inclass-p, not element 1.
(c-beginning-of-statement-1):
Watch out for keywords which have a
preceding underscore.
error results when buffer contains only a comment and point is at eob.
(c-inside-bracelist-p): Add a test to the enum list test so that enum
in a k&r arg decl doesn't confuse handling of the function body.
on a semi following a close brace.
(c-guess-basic-syntax): CASE 5I: When adding 'inclass syntax, use the
relpos pointing to the class opening brace, unless that hangs on the
right side, in which case, use the start of the class/struct keyword.