]> git.eshelyaron.com Git - emacs.git/commitdiff
Java Mode: Handle strings as case labels correctly.
authorAlan Mackenzie <acm@muc.de>
Sat, 23 Jul 2016 10:43:34 +0000 (10:43 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 23 Jul 2016 10:43:34 +0000 (10:43 +0000)
This fixes debbugs #23901.

* lisp/progmodes/cc-langs.el (c-nonlabel-token-key): Remove "\"" from the
Java value.

lisp/progmodes/cc-langs.el

index 4d366848998ae009de629d01d985e83fb29b402f..30949f8aee1bdc4030db4b7916b7b51162b6b577 100644 (file)
@@ -3253,8 +3253,8 @@ i.e. before \":\".  Only used if `c-recognize-colon-labels' is set."
                          (append (c-lang-const c-label-kwds)
                                  (c-lang-const c-protection-kwds))
                          :test 'string-equal)))
-  ;; Don't allow string literals, except in AWK.  Character constants are OK.
-  (c objc java pike idl) (concat "\"\\|"
+  ;; Don't allow string literals, except in AWK and Java.  Character constants are OK.
+  (c objc pike idl) (concat "\"\\|"
                                 (c-lang-const c-nonlabel-token-key))
   ;; Also check for open parens in C++, to catch member init lists in
   ;; constructors.  We normally allow it so that macros with arguments