[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105508: Resolve invalid use of a reg
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105508: Resolve invalid use of a regexp in regexp-opt. |
Date: |
Sat, 20 Aug 2011 22:04:33 +0000 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105508 [merge]
committer: Alan Mackenzie <address@hidden>
branch nick: trunk
timestamp: Sat 2011-08-20 22:04:33 +0000
message:
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]+".
modified:
lisp/ChangeLog
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-fonts.el
lisp/progmodes/cc-langs.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-08-20 19:30:53 +0000
+++ b/lisp/ChangeLog 2011-08-20 22:02:25 +0000
@@ -1,3 +1,17 @@
+2011-08-20 Alan Mackenzie <address@hidden>
+
+ 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]+".
+
2011-08-20 Chong Yidong <address@hidden>
* startup.el (normal-top-level-add-subdirs-to-load-path): Doc fix
=== modified file 'lisp/progmodes/cc-engine.el'
--- a/lisp/progmodes/cc-engine.el 2011-08-16 20:10:40 +0000
+++ b/lisp/progmodes/cc-engine.el 2011-08-20 22:02:25 +0000
@@ -6325,7 +6325,9 @@
(let* ((start (point)) kwd-sym kwd-clause-end found-type)
;; Look for a specifier keyword clause.
- (when (looking-at c-prefix-spec-kwds-re)
+ (when (or (looking-at c-prefix-spec-kwds-re)
+ (and (c-major-mode-is 'java-mode)
+ (looking-at "@[A-Za-z0-9]+")))
(if (looking-at c-typedef-key)
(setq at-typedef t))
(setq kwd-sym (c-keyword-sym (match-string 1)))
=== modified file 'lisp/progmodes/cc-fonts.el'
--- a/lisp/progmodes/cc-fonts.el 2011-08-20 14:43:33 +0000
+++ b/lisp/progmodes/cc-fonts.el 2011-08-20 22:02:25 +0000
@@ -1666,7 +1666,9 @@
(unless (c-skip-comments-and-strings limit)
(c-forward-syntactic-ws)
;; Handle prefix declaration specifiers.
- (when (looking-at c-prefix-spec-kwds-re)
+ (when (or (looking-at c-prefix-spec-kwds-re)
+ (and (c-major-mode-is 'java-mode)
+ (looking-at "@[A-Za-z0-9]+")))
(c-forward-keyword-clause 1))
,(if (c-major-mode-is 'c++-mode)
`(when (and (c-forward-type)
=== modified file 'lisp/progmodes/cc-langs.el'
--- a/lisp/progmodes/cc-langs.el 2011-08-20 14:43:33 +0000
+++ b/lisp/progmodes/cc-langs.el 2011-08-20 22:02:25 +0000
@@ -1823,7 +1823,7 @@
"bindsTo" "delegatesTo" "implements" "proxy" "storedOn")
;; Note: "const" is not used in Java, but it's still a reserved keyword.
java '("abstract" "const" "final" "native" "private" "protected" "public"
- "static" "strictfp" "synchronized" "transient" "volatile"
"@[A-Za-z0-9]+")
+ "static" "strictfp" "synchronized" "transient" "volatile")
pike '("final" "inline" "local" "nomask" "optional" "private" "protected"
"public" "static" "variant"))
@@ -1909,10 +1909,7 @@
(c-lang-defconst c-prefix-spec-kwds-re
;; Adorned regexp of `c-prefix-spec-kwds'.
- t (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds))
- java (replace-regexp-in-string
- "\\\\\\[" "["
- (replace-regexp-in-string "\\\\\\+" "+" (c-make-keywords-re t
(c-lang-const c-prefix-spec-kwds)))))
+ t (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds)))
(c-lang-defvar c-prefix-spec-kwds-re (c-lang-const c-prefix-spec-kwds-re))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105508: Resolve invalid use of a regexp in regexp-opt.,
Alan Mackenzie <=