Commit graph

80 commits

Author SHA1 Message Date
Miles Bader
a113b3ca32 Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1121
2008-04-23 05:55:42 +00:00
Stefan Monnier
cbee283dd7 Fix up comment convention on the arch-tag lines. 2008-04-10 14:10:46 +00:00
Stefan Monnier
7d56274281 (c-basic-common-init): Don't set
font-lock-extend-after-change-region-function globally.
2008-04-08 15:27:49 +00:00
Alan Mackenzie
8714fc1869 (c-basic-common-init): Set font-lock-extend-after-change-region-function.
(c-extend-after-change-region): New function, used in
font-lock-extend-after-change-region-function, thus superseding advice on
the Font Lock after change functions.
(c-advise-fl-for-region): Remove this macro.
2008-04-06 21:13:11 +00:00
Alan Mackenzie
afd2c2fc74 (c-extend-after-change-region): New function, used in
font-lock-extend-after-change-region-function, thus superseding advice on
the Font Lock after change functions.
2008-04-06 20:33:05 +00:00
Alan Mackenzie
f18ea992ca (c-neutralize-syntax-in-CPP): Fix coding bug. 2008-03-04 22:15:39 +00:00
Alan Mackenzie
0ce2ec82c9 (c-neutralize-syntax-in-CPP): Fix coding bug. 2008-03-01 09:05:12 +00:00
Miles Bader
51fb064bc7 Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1090
2008-03-01 01:28:31 +00:00
Alan Mackenzie
d70e242245 (c-neutralize-syntax-in-CPP): Fix a bug on typing "#" at EOB. 2008-02-25 21:15:50 +00:00
Miles Bader
b03f96dc5a Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1074
2008-02-24 10:09:07 +00:00
Alan Mackenzie
f8016ed60d (c-extend-region-for-CPP): always set c-old-EOM. 2008-02-20 22:18:28 +00:00
Alan Mackenzie
1d1e48680d Set of changes so that "obtrusive" syntactic elements in a
C/C++/ObjC preprocessor line (e.g. an unbalanced string quote or
unmatched paren) don't interact syntactically with stuff outside
the CPP line.
(c-basic-common-init): C and ObjC now use syntax-table text properties.
(c-common-init): Call language specific before/after-change functions at
mode initialisation.
(c-new-BEG, c-new-END, c-old-BOM, c-old-EOM): new variables.
(c-extend-region-for-CPP, c-neutralize-CPP-line,
c-neutralize-syntax-in-CPP): new functions.
(c-before-change, c-after-change): call the new language specific change
functions defined in cc-langs.el.
(c-advise-fl-for-region): new macro.
(awk-mode): Remove AWK specific stuff which has been refactored into
language independent stuff.
2008-02-19 22:14:40 +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
Thien-Thi Nguyen
d2f795854e * progmodes/cc-vars.el (defcustom-c-stylevar): Eval VAL.
(c-comment-continuation-stars): No longer declare with
cc-bytecomp-obsolete-var and cc-bytecomp-defvar.
(c-block-comment-prefix): Use symbol-value to
access c-comment-continuation-stars.
* progmodes/cc-mode.el (c-initialize-cc-mode):
Use symbol-value to access c-comment-continuation-stars.
2007-12-18 09:21:28 +00:00
Glenn Morris
d61ca8d5cc (c-postprocess-file-styles)
(c-submit-bug-report): Use mapc rather than mapcar.
2007-10-12 03:03:25 +00:00
Dan Nicolaescu
17ee46255f * progmodes/cc-mode.el (c-mode-base-map): Use
c-indent-line-or-region instead of c-indent-line.

* indent.el (indent-for-tab-command): First check if the region is
active.
2007-09-24 17:48:50 +00:00
Alan Mackenzie
3d38de912c Fix problem with modes derived from CC Mode: Move macro
`c-make-emacs-variables-local' from cc-mode.el to cc-langs.el.  Call it
from c-make-init-lang-vars-fun (cc-langs.el) instead of
c-init-language-vars-for (cc-mode.el).
2007-07-28 11:51:38 +00:00
Alan Mackenzie
473944f358 Fix problem with modes derived from CC Mode: Move macro
`c-make-emacs-variables-local' from cc-mode.el to cc-langs.el.  Call it
from c-make-init-lang-vars-fun (cc-langs.el) instead of
c-init-language-vars-for (cc-mode.el).
2007-07-28 11:45:55 +00:00
Glenn Morris
1a484753b2 Switch license to GPLv3 or later. 2007-07-25 04:29:40 +00:00
Alan Mackenzie
5c4c911a17 (c-remove-any-local-eval-or-mode-variables): When removing lines, also
remove the \n.  Correction of patch of 2007-04-21.
2007-06-20 08:27:53 +00:00
Glenn Morris
46ff758022 Stefan Monnier <monnier at iro.umontreal.ca>
(c-before-change): Use point-min rather than 1.
2007-04-28 20:39:11 +00:00
Martin Rudalics
33a9c08c34 (c-remove-any-local-eval-or-mode-variables): Use delete-region
instead of kill-line.
2007-04-21 22:00:45 +00:00
Alan Mackenzie
6bc7293bd6 (c-before-change): Fix BOB bug. 2007-03-25 12:03:13 +00:00
David Kastrup
7a147065e4 (c-make-emacs-variables-local): Use
`mapcar' rather than `mapcan' to silence compiler warning.
2007-03-23 09:52:42 +00:00
Alan Mackenzie
d4e5bf0f80 (c-before-change): insert call of `save-match-data'. 2007-03-09 23:11:15 +00:00
Alan Mackenzie
9c184ed25c (c-unfind-enclosing-token, c-unfind-coalesced-tokens, c-before-change): new
functions;
(c-maybe-stale-found-type): new variable.
An ad hoc attempt to remove stale tokens from the cache `c-found-types'.
2007-03-08 21:50:51 +00:00
Glenn Morris
d7a0267c8d Add 2007 to copyright years. 2007-01-21 03:53:13 +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
Alan Mackenzie
99c8496ec5 (c-basic-common-init): don't set open-paren-in-column-0-is-defun-start to
nil any more.
2006-12-17 22:15:46 +00:00
Glenn Morris
92ab38343d Fix Copyright format. 2006-12-03 01:00:52 +00:00
Alan Mackenzie
26b8f810d0 * progmodes/cc-langs.el (c-emacs-variable-inits): new variable.
(c-lang-setvar): new macro.
(c-make-init-lang-vars-fun): Use the initialization forms in
c-emacs-variable-inits in addition to those in c-lang-variable-inits.
(comment-start, comment-end, comment-start-skip): Change these from
c-lang-defvar's to c-lang-setvar's.

* progmodes/cc-mode.el (c-make-emacs-variables-local): new macro,
which calls make-local-variable on the elements of
c-emacs-variable-inits.
(c-init-language-vars-for): Call this new macro.
2006-07-20 09:48:09 +00:00
Alan Mackenzie
3c0ab532f8 * progmodes/cc-awk.el, cc-defs.el, cc-fonts.el, cc-langs.el,
cc-mode.el: Changes to eradicate eval-after-load.
2006-07-10 13:19:14 +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
Alan Mackenzie
0386b551af Update CC Mode to release 5.31. 2005-12-02 12:30:36 +00:00
Stefan Monnier
6d1f4dc422 (c-basic-common-init): Remove calls to
make-local-variable which we do not need any more.
2005-10-03 21:23:06 +00:00
Richard M. Stallman
5ac71a6af1 (c-font-lock-init): Specify font-lock-lines-before. 2005-09-23 18:26:09 +00:00
Nick Roberts
034babe1e1 Update copyright for release of 22.1 for progmodes directory. 2005-08-01 08:43:45 +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
Nick Roberts
a70d41f7d3 (cc-define-alist, cc-create-define-alist):
Remove these recent additions.
(c-mode): Restore to before 2005-04-28.
2005-05-03 06:45:08 +00:00
Nick Roberts
9c09f54acc (cc-create-define-alist): Use a shell.
(cc-mode-cpp-program): Rename to cc-define-list-program and
move to cc-vars.el.
2005-05-02 00:28:20 +00:00
Nick Roberts
fbc6be52eb (cc-mode-cpp-program): Change to "gcc -E". 2005-05-01 22:52:29 +00:00
Nick Roberts
f55b37c038 (c-mode): If there is no file (Macroexpansion) don't create an alist. 2005-04-30 05:16:49 +00:00
Nick Roberts
6661c5bb79 (cc-create-define-alist): Check that file
exists. Initialise cc-define-alist.
(c-mode): Add cc-create-define-alist locally to after-save-hook.
2005-04-29 23:47:30 +00:00
Sam Steingold
bb9c1f2a82 (cc-mode-cpp-program): New user variable.
(cc-create-define-alist): Use it instead of the hard-coded string.
2005-04-29 18:23:33 +00:00
Nick Roberts
a5bad486cc (cc-create-define-alist): New function.
(cc-define-alist): New variable.
(c-mode): Make it local and set it.
2005-04-27 21:59:43 +00:00
Richard M. Stallman
1750e02f51 (c-common-init): Use mode-require-final-newline. 2004-12-31 14:51:05 +00:00
Richard M. Stallman
791887d93f (awk-mode autoload): Supply t meaning interactive function. 2004-12-03 00:57:23 +00:00
Daniel Pfeiffer
1aaf8a45ee (c-basic-common-initc-font-lock-init, c-font-lock-init): Eliminate obsolete make-local-hook.
(c-mode, c++-mode, objc-mode, java-mode, idl-mode, pike-mode, awk-mode): Use run-mode-hooks.
2004-11-13 20:23:38 +00:00