summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-langs.el
Commit message (Collapse)AuthorAgeFilesLines
* Prefer UTF-8 when the encoding shouldn't matter and changes are small.Paul Eggert2013-03-051-2/+2
|
* In doc, use standard American English style for e.g., etc., i.e.Paul Eggert2013-02-121-1/+1
|
* Update copyright notices for 2013.Paul Eggert2013-01-011-1/+1
|
* Update some function declarationsGlenn Morris2012-09-131-3/+4
| | | | | | | | * lisp/calc/calc-ext.el (math-compose-expr): * lisp/calc/calc.el (math-compose-expr): * lisp/progmodes/cc-defs.el (cl-macroexpand-all): * lisp/progmodes/cc-langs.el (delete-duplicates, mapcan) (cl-macroexpand-all): Update declarations.
* * progmodes/cc-langs.el (c-symbol-start): Include char _.Leo Liu2012-07-201-1/+1
| | | | Fixes: debbugs:11986
* Depessimize the handling of very large macros.Alan Mackenzie2012-03-021-2/+4
|
* Optimise font locking in long enum definitions.Alan Mackenzie2012-01-081-0/+6
|
* Add 2012 to FSF copyright years for Emacs filesGlenn Morris2012-01-051-1/+1
|
* Introduce a mechanism to widen the region used in context font locking.Alan Mackenzie2011-12-241-2/+24
| | | | Use this to protect declarations from losing their contexts.
* Fix unstable fontification inside templates.Alan Mackenzie2011-12-231-16/+22
|
* Add the switch statement to AWK Mode.Alan Mackenzie2011-12-131-5/+5
|
* Spelling fixes.Paul Eggert2011-12-111-1/+1
|
* Spelling fixes.Paul Eggert2011-11-261-1/+1
|
* Fix typos.Juanma Barranquero2011-11-201-1/+1
|
* Spelling fixes.Paul Eggert2011-11-191-4/+4
|
* Add c-nonlabel-token-2-key to cc-langs.el.Alan Mackenzie2011-11-031-0/+8
|
* Amend to indent and fontify macros "which include their own semicolon"Alan Mackenzie2011-10-271-28/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | correctly, using the "virtual semicolon" mechanism. cc-defs.el: Update "virtual semicolon" comments. cc-engine.el (c-crosses-statement-barrier-p): Recoded to scan one line at at time rather than having \n and \r explicitly in c-stmt-delim-chars (for some modes, e.g. AWK). (c-forward-label): Amend for virtual semicolons. (c-at-macro-vsemi-p, c-macro-vsemi-status-unknown-p): New functions cc-fonts.el (c-font-lock-declarations): Take account of the new C macros. cc-langs.el (c-at-vsemi-p-fn, c-vsemi-status-unknown-p-fn): move to earlier in the file. (c-opt-cpp-symbol, c-line-comment-start-regexp): New language variables. (c-opt-cpp-macro-define): Make into a full language variable. (c-stmt-delim-chars, c-stmt-delim-chars-with-comma): Special value for AWK Mode (including \n, \r) removed, no longer needed. cc-mode.el (c-mode, c++-mode, objc-mode): Invoke c-make-macro-with-semi-re. cc-vars.el (c-macro-with-semi-re, c-macro-names-with-semicolon): New variables. (c-make-macro-with-semi-re): New function cc-mode.texi (Indentation Commands): Mention "macros with semicolons". (Other Special Indentations): Add an xref to "Macros with ;". (Customizing Macros): Add stuff about syntax in macros. Add an xref to "Macros with ;". (Macros with ;): New page.
* Resolve invalid use of a regexp in regexp-opt.Alan Mackenzie2011-08-201-5/+2
| | | | | | | | | | | | cc-fonts.el (c-complex-decl-matchers): Add in special detection for a java annotation. cc-engine.el (c-forward-decl-or-cast-1): Add in special detection for a java annotation. cc-langs.el (c-prefix-spec-kwds-re): Remove the special handling for java. (c-modifier-kwds): Remove the regexp "@[A-za-z0-9]+".
* Fontify CPP expressions correctly when starting in the middle of such aAlan Mackenzie2011-08-201-0/+10
| | | | | | | | | | | | | | | | construct. Mainly for when jit-lock etc. starts a chunk here. cc-fonts.el (c-font-lock-context): new buffer local variable. (c-make-font-lock-search-form): new function, extracted from c-make-font-lock-search-function. (c-make-font-lock-search-function): Use the above function. (c-make-font-lock-context-search-function): New function. (c-cpp-matchers): Enhance the preprocessor expression case with the above function (c-font-lock-complex-decl-prepare): Test for being in a CPP form which takes an expression. cc-langs.el (c-cpp-expr-intro-re): New lang-variable.
* Fontify bitfield declarations properly.Alan Mackenzie2011-07-261-0/+22
| | | | | | | | | | | | | | | | cc-langs.el (c-has-bitfields): New lang variable. (c-symbol-chars): Now exported as a lang variable. (c-not-primitive-type-keywords): New lang variable. cc-fonts.el (c-font-lock-declarations): Jump over the QT keyword "more" to prevent "more slots: ...." being spuriously parsed as a bitfield declaraion. cc-engine.el (c-beginning-of-statement-1): Refactor and enhance to handle bitfield declarations. (c-punctuation-in): New function. (c-forward-decl-or-cast-1): Enhance CASE 3 to handle bitfield declarations properly.
* Prevent cc-langs.elc being loaded at run time.Alan Mackenzie2011-07-221-3/+2
| | | | | | | cc-mode.el: Remove two autoload forms which loaded cc-langs. cc-langs.el (c-make-init-lang-vars-fun): Don't emit "(require 'cc-langs)". Quote a form so it will evaluate at (cc-mode's) compilation time.
* CC Mode: Fontify declarators properly when, e.g., a jit-lock chunk beginsAlan Mackenzie2011-07-181-1/+1
| | | | inside a declaration. Changed cc-engine.el, cc-langs.el, cc-fonts.el.
* progmodes/cc-guess.el: New file.Alan Mackenzie2011-06-301-0/+13
| | | | | | | | progmodes/cc-langs.el (c-mode-menu): Added "Style..." submenu. progmodes/cc-styles.el (cc-choose-style-for-mode): New function derived from `c-basic-common-init'. progmodes/cc-mode.el (top-level): Require cc-guess. (c-basic-common-init): Use `cc-choose-style-for-mode'.
* Refill some long/short copyright headers.Glenn Morris2011-01-261-2/+1
|
* Convert consecutive FSF copyright years to ranges.Glenn Morris2011-01-241-2/+1
|
* Nuke arch-tags.Glenn Morris2011-01-151-1/+0
|
* Merge from emacs-23Stefan Monnier2011-01-141-1/+1
|\
| * Add 2011 to FSF/AIST copyright years.Glenn Morris2011-01-021-1/+1
| |
| * Reverse 2009-12-03T16:02:10Z!acm@muc.de "Enhance `c-parse-state' to run ↵Alan Mackenzie2010-04-121-1/+1
| | | | | | | | | | | | efficiently in \"brace desserts\".".
| * Reverse change 2010-02-04T21:15:37Z!acm@muc.de: "Change strategy for marking ↵Alan Mackenzie2010-04-121-43/+12
| | | | | | | | | | | | < and > as template delimiters: mark them strictly in matching pairs."
* | cc-langs.el (c-type-decl-prefix-key): C++ bit: moveAlan Mackenzie2010-10-191-3/+3
| | | | | | | | | | "\(const\|throw\|volatile\)\>" nearer the start of the regexp, so that these keywords aren't wrongly matched as identifiers.
* | Enhance fontification of declarators to take account of theAlan Mackenzie2010-10-091-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Add "Package:" file headers to denote built-in packages.Chong Yidong2010-08-291-2/+2
| |
* | Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).Alan Mackenzie2010-07-311-13/+25
|/ | | | Contributed by Nathaniel Flath.
* Change strategy for marking < and > as template delimiters: mark themAlan Mackenzie2010-02-041-12/+43
| | | | strictly in matching pairs.
* Add 2010 to copyright years.Glenn Morris2010-01-131-1/+1
|
* Enhance `c-parse-state' to run efficiently in "brace desserts".Alan Mackenzie2009-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-11-20 Tassilo Horn <tassilo@member.fsf.org>Tassilo Horn2009-11-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* cc-langs.el (c-nonlabel-token-key): Allow quoted character constants (asAlan Mackenzie2009-09-261-1/+1
| | | | | | case labels). cc-engine.el (c-beginning-of-statement-1): Correct buggy bracketing.
* cc-mode.el (c-extend-and-neutralize-CPP-line): Renamed fromAlan Mackenzie2009-05-191-1/+1
| | | | | | | | | 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.
* Enhancements for Objective-C:Alan Mackenzie2009-04-301-1/+1
| | | | | | | | | | | | | | 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.
* cc-engine.el (c-beginning-of-statement-1): Enhance to parse case clausesAlan Mackenzie2009-02-211-0/+11
| | | | | with (compile-time) expressions. cc-langs.el (c-case-kwds-regexp): New variable for the above.
* (declare-function): Add compatibility stub.Glenn Morris2009-01-171-0/+10
| | | | (delete-duplicates, mapcan, cl-macroexpand-all): Declare.
* Comment (minor header format fixes).Glenn Morris2009-01-111-1/+2
|
* Add 2009 to copyright years.Glenn Morris2009-01-051-1/+1
|
* (c-opt-op-identitier-prefix): Fix typo.Glenn Morris2008-09-021-1/+1
|
* Switch to recommended form of GPLv3 permissions notice.Glenn Morris2008-05-061-6/+4
|
* Merge from emacs--rel--22Miles Bader2008-04-181-4/+5
|\ | | | | | | Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1112
| * (c-before-font-lock-function): Correct a typo in the doc string.Alan Mackenzie2008-04-061-5/+6
| |
| * (c-before-font-lock-function): Fix bug in doc-string, "c-old-LEN" ->Alan Mackenzie2008-03-011-3/+3
| | | | | | | | "c-old-END".