diff options
author | John Wiegley <johnw@newartisans.com> | 2016-02-15 14:11:03 -0800 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2016-02-15 14:11:03 -0800 |
commit | 220613e089ec012ae4ab319637365132ce8dc306 (patch) | |
tree | 715595598dfd3d80ba7c4306a0ea8f010b320db4 /lisp/progmodes/cc-langs.el | |
parent | ca03b85b9c1b8908f2651eaf594780c7b5217f61 (diff) | |
parent | d4b93e11a519cf71beca69654fda158d01a26c3b (diff) | |
download | emacs-220613e089ec012ae4ab319637365132ce8dc306.tar.gz emacs-220613e089ec012ae4ab319637365132ce8dc306.tar.bz2 emacs-220613e089ec012ae4ab319637365132ce8dc306.zip |
Merge from origin/emacs-25
d4b93e1 Minor fixes in global-auto-composition-mode
02b037b Allow arithmetic operators inside C++ template constructs.
44b16f6 Avoid crashes in semi-malformed 'condition-case'
652e5b4 Allow arithmetic operators inside C++ template constructs.
d9ea795 Fix regression with 'recent-keys' and keyboard macros
903603f Fix wording in a doc-view.el comment
cf79616 ; Spelling fixes
f8bf1b3 CONTRIBUTE cleanups and updates
f3aaca3 Port USE_STACK_LISP_OBJECTS fix to Clang
1834ac7 Port to x86 GCC 4.3.1 and earlier
8482949 Fix point movement under 'scroll-conservatively'
c1313b5 Replace colon in file name (not legal on Windows)
f7af26c Fix a typo in edt.texi
8badf95 Make 'mmap_realloc' on MS-Windows more reliable
856cd94 Grep alias `all' shall not match parent directory
Diffstat (limited to 'lisp/progmodes/cc-langs.el')
-rw-r--r-- | lisp/progmodes/cc-langs.el | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index ef894043bce..86b6bec78a1 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -228,6 +228,12 @@ the evaluated constant value at compile time." ;; with the group symbol for each group and should return non-nil ;; if that group is to be included. ;; + ;; OP-FILTER selects the operators. It is either t to select all + ;; operators, a string to select all operators for which `string-match' + ;; matches the operator with the string, or a function which will be + ;; called with the operator and should return non-nil when the operator + ;; is to be selected. + ;; ;; If XLATE is given, it's a function which is called for each ;; matching operator and its return value is collected instead. ;; If it returns a list, the elements are spliced directly into @@ -1237,7 +1243,6 @@ operators." t "\\`<." (lambda (op) (substring op 1))))) - (c-lang-defvar c-<-op-cont-regexp (c-lang-const c-<-op-cont-regexp)) (c-lang-defconst c->-op-cont-tokens @@ -1256,7 +1261,6 @@ operators." ;; Regexp matching the second and subsequent characters of all ;; multicharacter tokens that begin with ">". t (c-make-keywords-re nil (c-lang-const c->-op-cont-tokens))) - (c-lang-defvar c->-op-cont-regexp (c-lang-const c->-op-cont-regexp)) (c-lang-defconst c->-op-without->-cont-regexp @@ -1271,10 +1275,19 @@ operators." "\\`>>" (lambda (op) (substring op 1))) :test 'string-equal))) - (c-lang-defvar c->-op-without->-cont-regexp (c-lang-const c->-op-without->-cont-regexp)) +(c-lang-defconst c-multichar->-op-not->>-regexp + ;; Regexp matching multichar tokens containing ">", except ">>" + t (c-make-keywords-re nil + (delete ">>" + (c-filter-ops (c-lang-const c-all-op-syntax-tokens) + t + "\\(.>\\|>.\\)")))) +(c-lang-defvar c-multichar->-op-not->>-regexp + (c-lang-const c-multichar->-op-not->>-regexp)) + (c-lang-defconst c-stmt-delim-chars ;; The characters that should be considered to bound statements. To ;; optimize `c-crosses-statement-barrier-p' somewhat, it's assumed to @@ -3079,6 +3092,20 @@ expression is considered to be a type." ; generics is not yet coded in CC Mode. (c-lang-defvar c-recognize-<>-arglists (c-lang-const c-recognize-<>-arglists)) +(c-lang-defconst c-<>-notable-chars-re + "A regexp matching any single character notable inside a <...> construct. +This must include \"<\" and \">\", and should include \",\", and +any character which cannot be valid inside such a construct. +This is used in `c-forward-<>-arglist-recur' to try to detect +sequences of tokens which cannot be a template/generic construct. +When \"(\" is present, that defun will attempt to parse a +parenthesized expression inside the template. When \")\" is +present it will treat an unbalanced closing paren as a sign of +the invalidity of the putative template construct." + t "[<;{},|+&->)]" + c++ "[<;{},>()]") +(c-lang-defvar c-<>-notable-chars-re (c-lang-const c-<>-notable-chars-re)) + (c-lang-defconst c-enums-contain-decls "Non-nil means that an enum structure can contain declarations." t nil |