1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-20 12:40:56 -08:00
Commit graph

10 commits

Author SHA1 Message Date
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