Commit graph

168 commits

Author SHA1 Message Date
Alan Mackenzie
f6558e2d48 Correct typos, enhance comments. 2008-01-27 16:56:04 +00:00
Alan Mackenzie
027d6bb114 (c-guess-basic-syntax): prevent a macro call inside a struct being
recognised as a K&R argument.
2008-01-14 19:23:32 +00:00
Alan Mackenzie
f189315dde (c-guess-basic-syntax): prevent a macro call inside a struct being
recognised as a K&R argument.
2008-01-14 19:17:31 +00:00
Miles Bader
59ce725a3b Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-987
2008-01-08 20:46:54 +00:00
Glenn Morris
4e643dd23c Add 2008 to copyright years. 2008-01-07 02:11:00 +00:00
Juanma Barranquero
1fc0c6247c (c-crosses-statement-barrier-p): Fix typo in docstring. 2007-11-15 18:27:06 +00:00
Juanma Barranquero
b414f37153 (c-crosses-statement-barrier-p): Fix typo in docstring. 2007-11-15 16:41:15 +00:00
Dan Nicolaescu
2f42c75fb0 * progmodes/gud.el (gud-target-name): Move definition before use.
* progmodes/dcl-mode.el: Require imenu at compile time.

* progmodes/cc-engine.el (c-maybe-stale-found-type): Pacify
byte-compiler.

* obsolete/fast-lock.el: Use featurep test instead of
string-match.

* eshell/esh-mode.el (eshell-handle-ansi-color): Require
ansi-color at compile time too.

* eshell/em-unix.el (eshell/info): Require info at compile time
too.

* w32-fns.el: Require w32-vars.

* diff-mode.el (diff-refine-hunk): Require smerge-mode at compile
time too.
2007-10-21 07:33:32 +00:00
Alan Mackenzie
82ba65cfe1 (c-brace-anchor-point): new function.
(c-add-stmt-syntax): Give accurate anchor points for "namespace", "extern"
etc., rather than BOI.  Fix addition of spurious syntactic-symbol
'defun-block-intro, replacing it with 'innamespace, etc.
2007-08-25 17:05:11 +00:00
Alan Mackenzie
a335046bf5 (c-brace-anchor-point): new function. (c-add-stmt-syntax): Give accurate
anchor points for "namespace", "extern" etc., rather than BOI.  Fix
addition of spurious syntactic-symbol 'defun-block-intro, replacing it
with 'innamespace, etc.
2007-08-25 16:50:26 +00:00
Glenn Morris
e7f767c25e Replace `iff' in doc-strings and comments. 2007-08-08 07:34:30 +00:00
Glenn Morris
1a484753b2 Switch license to GPLv3 or later. 2007-07-25 04:29:40 +00:00
Alan Mackenzie
1379f2c583 Fix fontification of labels, and other things with ":".
* progmodes/cc-engine.el (c-forward-label): The function now
returns 'goto-target, 'qt-2kwds-colon, 'qt-1kwd-colon, as well as
the former t.

* progmodes/cc-fonts.el (c-font-lock-declarations): Interpret the
new return code from c-forward-label, fontifying tokens properly.
Add some general comments throughout the file.
2007-04-06 21:21:55 +00:00
Alan Mackenzie
c421028a68 Fix typo. 2007-03-25 12:04:11 +00:00
Alan Mackenzie
580fba9486 (c-partial-ws-p, c-unfind-type, c-trim-found-types): new functions.
An ad hoc attempt to remove stale tokens from the cache `c-found-types'.
2007-03-08 21:52:30 +00:00
Alan Mackenzie
10489fcbef (c-in-knr-argdecl): Slight correction for, e.g. "void (*hdone)();" in a
k&r list.  (No WS between adjacent paren groups).
2007-02-02 23:06:41 +00:00
Glenn Morris
d7a0267c8d Add 2007 to copyright years. 2007-01-21 03:53:13 +00:00
Alan Mackenzie
9cf17ef136 Reformulate c-in-knr-argdecl to do much more rigorous analysis of
putative K&R regions.
2007-01-20 19:29:30 +00:00
Alan Mackenzie
e309f66c9e Add my name. 2007-01-20 18:33:11 +00:00
Alan Mackenzie
51c9af45fe Update CC Mode to version 5.31.4. The detailed changes are those
recorded in the ChangeLog for 2007-01-01.
2007-01-01 22:11:28 +00:00
Glenn Morris
92ab38343d Fix Copyright format. 2006-12-03 01:00:52 +00:00
Alan Mackenzie
cb694ab730 cc-align.el, cc-awk.el, cc-bytecomp.el, cc-cmds.el, cc-compat.el,
cc-defs.el, cc-engine.el, cc-fonts.el, cc-langs.el, cc-menus.el,
cc-mode.el, cc-styles.el, cc-subword.el, cc-vars.el:  Add 2006 to the
copyright statement.

cc-awk.el: (c-awk-after-change): Protect the match data with
save-match-data.  It was being corrupted when Font Lock was not enabled.
(ii): Fix a typo.

cc-cmds.el, cc-mode.el, cc-engine.el (c-update-modeline): Concatenate the
minor mode indicators directly onto mode-name, removing
c-submode-indicators.  Sometimes, c-s-i got separated from the mode name
on the mode line.

cc-cmds.el, cc-mode.el: Rename c-hungry-backspace to
c-hungry-delete-backwards, at the request of RMS.  Leave the old name as
an alias.

cc-cmds.el (c-electric-brace, c-electric-semi&comma, c-electric-colon):
Correct doc-strings: "/ln" -> "/la".

cc-cmds.el (c-electric-brace): Fix clean-up brace-else-brace (error due
to mbeg, mend being undefined).

cc-defs.el (c-version): Update to 5.31.3.

cc-defs.el: [Supersedes patch V1.38]: (top level): Check for a buggy
font-lock-compile-keywords ONLY in XEmacs.  GNU Emacs 22 now has a check
which would throw an error here.

cc-engine.el (c-beginning-of-statement-1): Clarify doc-string and
comments.  Distinguish real labels ("case 1:" or "foo:") from non-labels
("public:").

cc-engine.el (c-after-change-check-<>-operators): Remove save-match-data,
reversing change for V1.45.  save-match-data is now in c-after-change.

cc-engine.el (c-forward-objc-directive): Replace c-forward-token-2 with
crude coding; c-f-t-2 doesn't move over a token at EOB.  Objc Mode was
hanging after typing, e.g., "@implementation".

cc-langs.el (c-filter-ops): Made it available at runtime too to work when
`c-make-init-lang-vars-fun' needs to evaluate from source.

cc-langs.el (c-make-init-lang-vars-fun): Improved the error message when
there's an evaluation error to show whether it's loaded from source or
not.
(c-mode-menu): Add menu items for Electric Mode and Subword Mode.

cc-mode.el (c-after-change): Protect the match data with save-match-data.
It was getting corrupted by c-after-change-check-<>-operators.

cc-mode.el: File Local variables: Solve the problem where both `mode' and
c-file-offsets are specified: `mode' will overwrite c-f-o's settings:
(c-remove-any-local-eval-or-mode-variables): new function.
(c-postprocess-file-styles): call the above new function, within
c-tentative-buffer-change, to splat `mode' and `eval' before the second
hack-local-variables.
2006-02-24 15:33:02 +00:00
Nick Roberts
d91362c9e0 Update copyright for 2006. 2006-02-10 09:00:31 +00:00
Stefan Monnier
f3725983e7 (c-after-change-check-<>-operators):
After-change-functions should not clobber the match data.
2005-12-16 20:07:49 +00:00
Alan Mackenzie
0386b551af Update CC Mode to release 5.31. 2005-12-02 12:30:36 +00:00
Richard M. Stallman
4f047c58a2 (c-guess-basic-syntax): Add autoload. 2005-08-09 11:39:24 +00:00
Nick Roberts
034babe1e1 Update copyright for release of 22.1 for progmodes directory. 2005-08-01 08:43:45 +00:00
Juanma Barranquero
a4632380fa (c-guess-basic-syntax): Remove spurious call to `zerop'. 2005-05-23 09:16:17 +00:00
Martin Stjernholm
3efc2cd768 2005-05-23 Martin Stjernholm <bug-cc-mode@gnu.org>
CC Mode update to 5.30.10:

	* cc-fonts.el (c-font-lock-declarators): Fixed bug where the point
	could go past the limit in decoration level 2, thereby causing
	errors during interactive fontification.

	* cc-mode.el (c-make-inherited-keymap): Fixed cc-bytecomp bug when
	the file is evaluated interactively.

	* cc-engine.el (c-guess-basic-syntax): Handle operator
	declarations somewhat better in C++.

	* cc-styles.el, cc-mode.el (c-run-mode-hooks): New helper macro to
	make use of run-mode-hooks' which has been added in Emacs 21.1.

	(c-mode, c++-mode, objc-mode, java-mode, idl-mode, pike-mode,
	awk-mode): Use it.

	(make-local-hook): Suppress warning about obsoleteness.

	* cc-engine.el, cc-align.el, cc-cmds.el
	(c-append-backslashes-forward, c-delete-backslashes-forward,
	c-find-decl-spots, c-semi&comma-no-newlines-before-nonblanks):
	Compensate for return value from forward-line' when it has moved
	but not to a different line due to eob.

	* cc-engine.el (c-guess-basic-syntax): Fixed anchoring in
	objc-method-intro' and objc-method-args-cont'.

2005-05-23  Alan Mackenzie  <bug-cc-mode@gnu.org>

	CC Mode update to 5.30.10:

	* cc-mode.el, cc-engine.el, cc-align.el: Change the FSF's address
	in the copyright statement.  Incidentally, change "along with GNU
	Emacs" to "along with this program" where it occurs.

	* cc-mode.el: Add a fourth parameter t' to the awk-mode autoload,
	so that it is interactive, hence can be found by M-x awk-mode
	whilst cc-mode is yet to be loaded.  Reported by Glenn Morris
	<gmorris+emacs@ast.cam.ac.uk>.

	* cc-awk.el: Add character classes (e.g. "[:alpha:]") into AWK
	Mode's regexps.

2005-05-23  Kevin Ryde  <user42@zip.com.au>:

	* cc-align.el (c-lineup-argcont): Ignore conses for {} pairs from
	c-parse-state, to avoid a lisp error (on bad code).
2005-05-23 00:03:59 +00:00
Richard M. Stallman
bbf87c2985 (c-literal-faces): Add font-lock-comment-delimiter-face. 2005-05-14 11:30:27 +00:00
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