1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-15 09:47:20 +00:00
Commit Graph

38 Commits

Author SHA1 Message Date
Martin Stjernholm
2a15eb73df Updated CC Mode to 5.30.9. 2004-08-11 16:22:21 +00:00
Martin Stjernholm
037558bfd9 CC Mode update (5.30.8). 2003-11-16 16:55:08 +00:00
Martin Stjernholm
449a2b0d2e (c-parse-state): Fixed bug that could cause errors when the state
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.
2003-09-24 13:55:23 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Martin Stjernholm
2c9c19547f (c-just-after-func-arglist-p): Safeguard against unbalanced sexps. 2003-08-26 11:51:16 +00:00
Martin Stjernholm
ff959bab84 2003-08-01 Martin Stjernholm <bug-cc-mode@gnu.org>
* 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.
2003-08-03 12:29:57 +00:00
Martin Stjernholm
1e33046972 (c-literal-faces): Declare as a variable since it might be modified. 2003-07-16 20:54:46 +00:00
Richard M. Stallman
485fe977a0 (c-declare-lang-variables): Don't use mapcan. 2003-07-13 00:20:39 +00:00
Martin Stjernholm
7bfc3fdba3 2003-07-08 Martin Stjernholm <bug-cc-mode@gnu.org>
* 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.
2003-07-08 23:24:44 +00:00
Martin Stjernholm
d9e94c2273 Updated CC Mode to version 5.30. 2003-07-03 12:30:59 +00:00
Martin Stjernholm
e33c01bb57 (c-parse-state): Added kludge to avoid an infinite loop when Emacs'
open-paren-in-column-zero rule kicks in and causes the sexp functions
to misbehave.
2003-03-23 01:58:30 +00:00
Juanma Barranquero
6c83d99f87 Fix typo in comment. 2002-10-18 08:52:37 +00:00
Martin Stjernholm
0e35704fe3 (c-forward-syntactic-ws): Fixed a bug that could cause an infinite
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.
2002-08-20 21:59:10 +00:00
Sam Steingold
65125928fe (c-search-uplist-for-classkey): When `search-end' is a cons, use its car. 2002-07-25 13:23:27 +00:00
Martin Stjernholm
3ce79cf555 (c-add-stmt-syntax): Fixed some cases of wrong anchoring, e.g. for
else-if compounds.
2002-05-25 16:18:59 +00:00
Martin Stjernholm
b3cf7e18a3 (c-beginning-of-decl-1): Better way to handle protection labels, one
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.
2002-04-30 23:02:19 +00:00
Martin Stjernholm
a66cd3ee16 CC Mode update to version 5.29. This is for testing; it's not a released
version.
2002-04-22 00:35:36 +00:00
Stefan Monnier
2f85befdd5 (c-backward-to-start-of-if): Don't assume point-min == 1. 2002-04-12 03:05:04 +00:00
Stefan Monnier
244db8a266 (c-parse-state): Typo. From Martin Stjernholm. 2001-11-19 22:55:33 +00:00
Stefan Monnier
174acba338 (c-beginning-of-member-init-list):
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>.
2001-10-24 16:07:06 +00:00
Pavel Janík
3afbc435ac Some fixes to follow coding conventions. 2001-07-16 07:46:48 +00:00
Gerd Moellmann
130c507e58 Update to version 5.28. 2001-03-21 12:59:36 +00:00
Dave Love
e7cff5504b Fix copyright years. 2000-12-06 20:24:23 +00:00
Gerd Moellmann
ce8c7486aa (c-looking-at-inexpr-block): Replaced a call to
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.
2000-07-24 11:11:20 +00:00
Gerd Moellmann
51f606dea8 Installed version 5.26 1999-12-12 18:24:19 +00:00
Richard M. Stallman
6393fef266 (c-inside-bracelist-p): Tighter test for
Java anonymous array expressions ("new Foo[] {.. bracelist ..}").
1999-08-05 15:01:46 +00:00
Simon Marshall
abb7e5cfc3 Added c-at-toplevel-p for font-lock.el. 1999-02-17 09:46:28 +00:00
Barry A. Warsaw
0ec8351b95 Installed CC Mode 5.25. 1999-02-08 16:53:18 +00:00
Richard M. Stallman
b2acd78958 (c-inside-bracelist-p): Fix for enum test.
(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.
1998-03-08 06:49:04 +00:00
Richard M. Stallman
e1c458ae08 (c-forward-syntactic-ws, c-backward-syntactic-ws):
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.
1998-02-17 07:08:44 +00:00
Karl Heuer
6430c434e3 (c-guess-basic-syntax):
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.
1997-10-23 07:48:09 +00:00
Karl Heuer
55be952731 (c-end-of-statement-1):
Wrap backward-up-list in a c-safe call so no
error results when buffer contains only a comment and point is at
eob.
1997-10-23 07:33:21 +00:00
Richard M. Stallman
9796cb5b2f (c-end-of-statement-1): Wrap backward-up-list in a c-safe call so no
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.
1997-09-08 03:20:49 +00:00
Richard M. Stallman
041ec7f62a (c-end-of-statement-1): Eliminate false hits on important characters
inside literals (strings, comments).
1997-08-16 03:38:57 +00:00
Richard M. Stallman
0ba1556126 (c-guess-basic-syntax): CASE 5D.4: template argument continuation
lines are now analyzed as template-args-cont.
1997-08-11 22:14:14 +00:00
Richard M. Stallman
d0c50a29ad (c-beginning-of-statement-1): When checking for bare semi, don't match
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.
1997-08-09 18:28:54 +00:00
Richard M. Stallman
640012115a (c-maybe-labelp): Add defvar. 1997-07-18 02:11:28 +00:00
Richard M. Stallman
785eecbbba Initial revision 1997-07-10 07:54:06 +00:00