Commit graph

85 commits

Author SHA1 Message Date
Glenn Morris
95df8112a0 Refill some long/short copyright headers. 2011-01-26 00:36:39 -08:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Glenn Morris
0d9f702fd0 Nuke arch-tags. 2011-01-15 15:16:57 -08:00
Stefan Monnier
77ab81d054 Merge from emacs-23 2011-01-14 12:18:41 -05:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Alan Mackenzie
7f0789c9db cc-langs.el (c-type-decl-prefix-key): C++ bit: move
"\(const\|throw\|volatile\)\>" nearer the start of the regexp, so that
these keywords aren't wrongly matched as identifiers.
2010-10-19 20:45:42 +00:00
Alan Mackenzie
e15f8aaa0e Enhance fontification of declarators to take account of the
presence/absence of "typedef".

cc-engine.el (c-forward-type): New &optional param "brace-block-too".
(c-forward-decl-or-cast-1): cdr of return value now indicates the
presence of either or both of a "struct"-like keyword and "typedef".

cc-fonts.el (c-complex-decl-matchers): Remove the heuristic fontification
of declarators which follow a "}".
(c-font-lock-declarations): Fontify declarators according to the
presence/absence of "typedef".

cc-langs.el (c-typedef-kwds c-typedef-key): New lang variable for
"typedef".
(c-typedef-decl-key): New lang variable built from c-typedef-decl-kwds.
2010-10-09 19:58:28 +00:00
Chong Yidong
bd78fa1d54 Add "Package:" file headers to denote built-in packages. 2010-08-29 12:17:13 -04:00
Alan Mackenzie
452ea85502 Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
Contributed by Nathaniel Flath.
2010-07-31 20:01:08 +00:00
Alan Mackenzie
e42a330165 Reverse 2009-12-03T16:02:10Z!acm@muc.de "Enhance `c-parse-state' to run efficiently in
\"brace desserts\".".
2010-04-12 18:58:52 +00:00
Alan Mackenzie
7af4bf3aea Reverse change 2010-02-04T21:15:37Z!acm@muc.de: "Change strategy for marking < and > as template
delimiters: mark them strictly in matching pairs."
2010-04-12 15:15:07 +00:00
Alan Mackenzie
dd969a56a5 Change strategy for marking < and > as template delimiters: mark them
strictly in matching pairs.
2010-02-04 21:15:37 +00:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Alan Mackenzie
0ec1d2c5bb Enhance `c-parse-state' to run efficiently in "brace desserts".
* progmodes/cc-mode.el (c-basic-common-init): Call
c-state-cache-init.
(c-neutralize-syntax-in-and-mark-CPP):  Renamed from
c-extend-and-neutralize-syntax-in-CPP.  Mark each CPP construct by
placing `category' properties value 'c-cpp-delimiter at its
boundaries.

* progmodes/cc-langs.el (c-before-font-lock-function):
c-extend-and-neutralize-syntax-in-CPP has been renamed
c-neutralize-syntax-in-and-mark-CPP.

* progmodes/cc-fonts.el (c-cpp-matchers): Mark template brackets
with `category' properties now, not `syntax-table' ones.

* progmodes/cc-engine.el (c-syntactic-end-of-macro): A new
enhanced (but slower) version of c-end-of-macro that won't land
inside a literal or on another awkward character.
(c-state-cache-too-far, c-state-cache-start)
(c-state-nonlit-pos-interval, c-state-nonlit-pos-cache)
(c-state-nonlit-pos-cache-limit, c-state-point-min)
(c-state-point-min-lit-type, c-state-point-min-lit-start)
(c-state-min-scan-pos, c-state-brace-pair-desert)
(c-state-old-cpp-beg, c-state-old-cpp-end): New constants and
buffer local variables.
(c-state-literal-at, c-state-lit-beg)
(c-state-cache-non-literal-place, c-state-get-min-scan-pos)
(c-state-mark-point-min-literal, c-state-cache-top-lparen)
(c-state-cache-top-paren, c-state-cache-after-top-paren)
(c-get-cache-scan-pos, c-get-fallback-scan-pos)
(c-state-balance-parens-backwards, c-parse-state-get-strategy)
(c-renarrow-state-cache)
(c-append-lower-brace-pair-to-state-cache)
(c-state-push-any-brace-pair, c-append-to-state-cache)
(c-remove-stale-state-cache)
(c-remove-stale-state-cache-backwards, c-state-cache-init)
(c-invalidate-state-cache-1, c-parse-state-1)
(c-invalidate-state-cache): New defuns/defmacros/defsubsts.
(c-parse-state): Enhanced and refactored.
(c-debug-parse-state): Amended to deal with all the new variables.

* progmodes/cc-defs.el (c-<-as-paren-syntax, c-mark-<-as-paren)
(c->-as-paren-syntax, c-mark->-as-paren, c-unmark-<->-as-paren):
modify to use category text properties rather than syntax-table
ones.
(c-suppress-<->-as-parens, c-restore-<->-as-parens): new defsubsts
to switch off/on the syntactic paren property of C++ template
delimiters using the category property.
(c-with-<->-as-parens-suppressed): Macro to invoke code with
template delims suppressed.
(c-cpp-delimiter, c-set-cpp-delimiters, c-clear-cpp-delimiters):
New constant/macros which apply category properties to the start
and end of preprocessor constructs.
(c-comment-out-cpps, c-uncomment-out-cpps): defsubsts which
"comment out" the syntactic value of characters in preprocessor
constructs.
(c-with-cpps-commented-out)
(c-with-all-but-one-cpps-commented-out): Macros to invoke code
with characters in all or all but one preprocessor constructs
"commented out".
2009-12-03 16:02:10 +00:00
Tassilo Horn
653d15547a 2009-11-20 Tassilo Horn <tassilo@member.fsf.org>
* progmodes/cc-cmds.el (c-update-modeline)
	(c-forward-into-nomenclature, c-backward-into-nomenclature): Refer
	to subword.el functions instead of cc-subword.el.

	* progmodes/cc-mode.el (subword-mode, c-mode-base-map): Refer to
	subword.el functions instead of cc-subword.el.

	* progmodes/cc-subword.el: Renamed to subword.el.
	* subword.el: Renamed from progmodes/cc-subword.el.
	(subword-mode-map): Renamed from c-subword-mode-map.
	(subword-mode): Renamed from c-subword-mode.
	(global-subword-mode): New global minor mode.
	(forward-subword): Renamed from c-forward-subword.
	(backward-subword): Renamed from c-backward-subword.
	(mark-subword): Renamed from c-mark-subword.
	(kill-subword): Renamed from c-kill-subword.
	(backward-kill-subword): Renamed from c-backward-kill-subword.
	(transpose-subwords): Renamed from c-tranpose-subword.
	(downcase-subword): Renamed from c-downcase-subword.
	(capitalize-subword): Renamed from c-capitalize-subword.
	(forward-subword-internal): Renamed from
	c-forward-subword-internal.
	(backward-subword-internal): Renamed from
	c-backward-subword-internal.
2009-11-20 08:22:32 +00:00
Alan Mackenzie
0000ee90eb cc-langs.el (c-nonlabel-token-key): Allow quoted character constants (as
case labels).

cc-engine.el (c-beginning-of-statement-1): Correct buggy bracketing.
2009-09-26 09:18:41 +00:00
Alan Mackenzie
a0526d5ee5 cc-mode.el (c-extend-and-neutralize-CPP-line): Renamed from
c-neutralize-syntax-in-CPP.  Set the variables c-new-BEG and c-new-END,
thus extending the font-lock region.
(c-font-lock-init): Don't set obsolete variable font-lock-lines-before.

cc-langs.el (c-before-font-lock-function): Rename a value to
c-extend-and-neutralize-syntax-in-CPP.
2009-05-19 22:35:07 +00:00
Alan Mackenzie
f0e4b2f240 Enhancements for Objective-C:
cc-vars.el
(c-objc-method-arg-min-delta-to-bracket,
c-objc-method-arg-unfinished-offset, c-objc-method-parameter-offset): New
variables.
(c-offsets-alist): Use c-lineup-ObjC-method-call-colons in entry for
objc-method-call-cont.

cc-langs.el (c-constant-kwds): New ObjC keywords "YES", "NO",
"NS_DURING", "NS_HANDLER", "NS_ENDHANDLER".

cc-align.el (c-lineup-ObjC-method-call-colons): New function.
2009-04-30 10:36:24 +00:00
Alan Mackenzie
d28e7f288e cc-engine.el (c-beginning-of-statement-1): Enhance to parse case clauses
with (compile-time) expressions.
cc-langs.el (c-case-kwds-regexp): New variable for the above.
2009-02-21 16:10:39 +00:00
Glenn Morris
66d279a7cd (declare-function): Add compatibility stub.
(delete-duplicates, mapcan, cl-macroexpand-all): Declare.
2009-01-17 20:02:41 +00:00
Glenn Morris
5858f68cd1 Comment (minor header format fixes). 2009-01-11 00:37:05 +00:00
Glenn Morris
ae940284fa Add 2009 to copyright years. 2009-01-05 03:18:22 +00:00
Glenn Morris
c97833f0ee (c-opt-op-identitier-prefix): Fix typo. 2008-09-02 02:30:38 +00:00
Glenn Morris
b1fc2b5014 Switch to recommended form of GPLv3 permissions notice. 2008-05-06 07:25:26 +00:00
Miles Bader
d02fe47dd3 Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1112
2008-04-18 02:56:45 +00:00
Stefan Monnier
cbee283dd7 Fix up comment convention on the arch-tag lines. 2008-04-10 14:10:46 +00:00
Alan Mackenzie
8835a0f7e6 (c-before-font-lock-function): Correct a typo in the doc string. 2008-04-06 21:14:28 +00:00
Alan Mackenzie
772a35442b (c-before-font-lock-function): Correct a typo in the doc string. 2008-04-06 20:34:25 +00:00
Alan Mackenzie
212906e24a (c-before-font-lock-function): Fix bug in doc-string, "c-old-LEN" ->
"c-old-END".
2008-03-04 22:14:37 +00:00
Alan Mackenzie
38cdd6f89d (c-before-font-lock-function): Fix bug in doc-string, "c-old-LEN" ->
"c-old-END".
2008-03-01 08:52:25 +00:00
Alan Mackenzie
5ee2e9881b 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-get-state-before-change-function, c-before-font-lock-function,
c-anchored-cpp-prefix): new language variables.
(c-cpp-message-directives): Handle "#warning" in C, C++ and ObjC.
2008-02-19 22:11:38 +00:00
Alan Mackenzie
9555a4cfeb (c-block-stmt-1-kwds, c-block-stmt-2-kwds, c-simple-stmt-kwds): New
Objective C keywords: @finally, @try, @catch, @synchronized, @throw.
2008-01-29 20:47:03 +00:00
Alan Mackenzie
cc1cce145e (c-specifier-key): Exclude "template" from this regexp; to allow the "{"
of a template function to be correctly anchored on "template", not the
following "<".
2008-01-29 20:30:54 +00:00
Glenn Morris
4e643dd23c Add 2008 to copyright years. 2008-01-07 02:11:00 +00:00
Glenn Morris
fbd4de656d (c-constant-kwds): Add java: null, true, false. 2007-08-28 02:51:09 +00:00
Alan Mackenzie
c382ec4021 (c-other-decl-block-key-in-symbols-alist): new language variable. 2007-08-25 16:54:09 +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
28abe5e279 Changes to make narrow-to-defun' and mark-defun' work properly in CC
Mode:

cc-defs.el (c-beginning-of-defun-1):
cc-cmds.el (c-beginning-of-defun, c-end-of-defun): bind
beginning/end-of-defun-function to nil around calls to
beginning/end-of-defun.

cc-langs.el (beginning-of-defun-function, end-of-defun-function): new
c-lang-setvar's.

cc-awk.el (c-awk-beginning-of-defun): Add "(or arg (setq arg 1))" to
enable non-interactive call.
2007-04-09 10:51:29 +00:00
Glenn Morris
d7a0267c8d Add 2007 to copyright years. 2007-01-21 03:53:13 +00:00
Alan Mackenzie
e309f66c9e Add my name. 2007-01-20 18:33:11 +00:00
Alan Mackenzie
e6a9e5841f (c-operators, c-filter-ops): Amend doc-string and comments. 2007-01-07 13:36:41 +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
Juanma Barranquero
48eb368876 (c-at-vsemi-p-fn, c-vsemi-status-unknown-p-fn): Doc fix. 2006-12-10 23:50:22 +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
Stefan Monnier
58bd87402e (c-mode-menu): Don't presume c-subword-mode is bound. 2006-04-14 11:30:20 +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