Commit edcdf649 authored by Alan Mackenzie's avatar Alan Mackenzie
Browse files

Java Mode: Handle strings as case labels correctly.

This fixes debbugs #23901.

* lisp/progmodes/cc-langs.el (c-nonlabel-token-key): Remove "\"" from the
Java value.
parent 03f32876
...@@ -3253,8 +3253,8 @@ i.e. before \":\". Only used if `c-recognize-colon-labels' is set." ...@@ -3253,8 +3253,8 @@ i.e. before \":\". Only used if `c-recognize-colon-labels' is set."
(append (c-lang-const c-label-kwds) (append (c-lang-const c-label-kwds)
(c-lang-const c-protection-kwds)) (c-lang-const c-protection-kwds))
:test 'string-equal))) :test 'string-equal)))
;; Don't allow string literals, except in AWK. Character constants are OK. ;; Don't allow string literals, except in AWK and Java. Character constants are OK.
(c objc java pike idl) (concat "\"\\|" (c objc pike idl) (concat "\"\\|"
(c-lang-const c-nonlabel-token-key)) (c-lang-const c-nonlabel-token-key))
;; Also check for open parens in C++, to catch member init lists in ;; Also check for open parens in C++, to catch member init lists in
;; constructors. We normally allow it so that macros with arguments ;; constructors. We normally allow it so that macros with arguments
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment