aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorAlan Mackenzie2011-08-20 22:02:25 +0000
committerAlan Mackenzie2011-08-20 22:02:25 +0000
commite371503373b87716827e2ed0f3ba5b2d89981ef4 (patch)
tree114231b116f3173563fdf1c67dfa43ef8b576d3c /lisp
parent024a2d76113268052dd9fa85c915c6fb9f29c152 (diff)
downloademacs-e371503373b87716827e2ed0f3ba5b2d89981ef4.tar.gz
emacs-e371503373b87716827e2ed0f3ba5b2d89981ef4.zip
Resolve invalid use of a regexp in regexp-opt.
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]+".
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog14
-rw-r--r--lisp/progmodes/cc-engine.el4
-rw-r--r--lisp/progmodes/cc-fonts.el4
-rw-r--r--lisp/progmodes/cc-langs.el7
4 files changed, 22 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cab26924041..efacb110d1b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,17 @@
12011-08-20 Alan Mackenzie <acm@muc.de>
2
3 Resolve invalid use of a regexp in regexp-opt.
4
5 * cc-fonts.el (c-complex-decl-matchers): Add in special detection
6 for a java annotation.
7
8 * cc-engine.el (c-forward-decl-or-cast-1): Add in special
9 detection for a java annotation.
10
11 * cc-langs.el (c-prefix-spec-kwds-re): Remove the special handling
12 for java.
13 (c-modifier-kwds): Remove the regexp "@[A-za-z0-9]+".
14
12011-08-20 Chong Yidong <cyd@stupidchicken.com> 152011-08-20 Chong Yidong <cyd@stupidchicken.com>
2 16
3 * startup.el (normal-top-level-add-subdirs-to-load-path): Doc fix 17 * startup.el (normal-top-level-add-subdirs-to-load-path): Doc fix
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 0d88f85d263..a1cbdc16560 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -6325,7 +6325,9 @@ comment at the start of cc-engine.el for more info."
6325 (let* ((start (point)) kwd-sym kwd-clause-end found-type) 6325 (let* ((start (point)) kwd-sym kwd-clause-end found-type)
6326 6326
6327 ;; Look for a specifier keyword clause. 6327 ;; Look for a specifier keyword clause.
6328 (when (looking-at c-prefix-spec-kwds-re) 6328 (when (or (looking-at c-prefix-spec-kwds-re)
6329 (and (c-major-mode-is 'java-mode)
6330 (looking-at "@[A-Za-z0-9]+")))
6329 (if (looking-at c-typedef-key) 6331 (if (looking-at c-typedef-key)
6330 (setq at-typedef t)) 6332 (setq at-typedef t))
6331 (setq kwd-sym (c-keyword-sym (match-string 1))) 6333 (setq kwd-sym (c-keyword-sym (match-string 1)))
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index dea205221c9..3d5dc30d823 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -1666,7 +1666,9 @@ on level 2 only and so aren't combined with `c-complex-decl-matchers'."
1666 (unless (c-skip-comments-and-strings limit) 1666 (unless (c-skip-comments-and-strings limit)
1667 (c-forward-syntactic-ws) 1667 (c-forward-syntactic-ws)
1668 ;; Handle prefix declaration specifiers. 1668 ;; Handle prefix declaration specifiers.
1669 (when (looking-at c-prefix-spec-kwds-re) 1669 (when (or (looking-at c-prefix-spec-kwds-re)
1670 (and (c-major-mode-is 'java-mode)
1671 (looking-at "@[A-Za-z0-9]+")))
1670 (c-forward-keyword-clause 1)) 1672 (c-forward-keyword-clause 1))
1671 ,(if (c-major-mode-is 'c++-mode) 1673 ,(if (c-major-mode-is 'c++-mode)
1672 `(when (and (c-forward-type) 1674 `(when (and (c-forward-type)
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 153ef0880c7..279c5e46c46 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -1823,7 +1823,7 @@ will be handled."
1823 "bindsTo" "delegatesTo" "implements" "proxy" "storedOn") 1823 "bindsTo" "delegatesTo" "implements" "proxy" "storedOn")
1824 ;; Note: "const" is not used in Java, but it's still a reserved keyword. 1824 ;; Note: "const" is not used in Java, but it's still a reserved keyword.
1825 java '("abstract" "const" "final" "native" "private" "protected" "public" 1825 java '("abstract" "const" "final" "native" "private" "protected" "public"
1826 "static" "strictfp" "synchronized" "transient" "volatile" "@[A-Za-z0-9]+") 1826 "static" "strictfp" "synchronized" "transient" "volatile")
1827 pike '("final" "inline" "local" "nomask" "optional" "private" "protected" 1827 pike '("final" "inline" "local" "nomask" "optional" "private" "protected"
1828 "public" "static" "variant")) 1828 "public" "static" "variant"))
1829 1829
@@ -1909,10 +1909,7 @@ one of `c-type-list-kwds', `c-ref-list-kwds',
1909 1909
1910(c-lang-defconst c-prefix-spec-kwds-re 1910(c-lang-defconst c-prefix-spec-kwds-re
1911 ;; Adorned regexp of `c-prefix-spec-kwds'. 1911 ;; Adorned regexp of `c-prefix-spec-kwds'.
1912 t (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds)) 1912 t (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds)))
1913 java (replace-regexp-in-string
1914 "\\\\\\[" "["
1915 (replace-regexp-in-string "\\\\\\+" "+" (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds)))))
1916 1913
1917(c-lang-defvar c-prefix-spec-kwds-re (c-lang-const c-prefix-spec-kwds-re)) 1914(c-lang-defvar c-prefix-spec-kwds-re (c-lang-const c-prefix-spec-kwds-re))
1918 1915