From: Alan Mackenzie Date: Sat, 23 Jul 2016 10:43:34 +0000 (+0000) Subject: Java Mode: Handle strings as case labels correctly. X-Git-Tag: emacs-26.0.90~1840^2~16 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=edcdf64960a2ab4e8d9ce4419874e43b6d3ccee4;p=emacs.git 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. --- diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 4d366848998..30949f8aee1 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -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