From 0000ee90eb09ea3f4c2f36ac8e453be3f0ec3f0e Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sat, 26 Sep 2009 09:18:41 +0000 Subject: [PATCH] cc-langs.el (c-nonlabel-token-key): Allow quoted character constants (as case labels). cc-engine.el (c-beginning-of-statement-1): Correct buggy bracketing. --- lisp/progmodes/cc-engine.el | 5 +++-- lisp/progmodes/cc-langs.el | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 24b5a9b33f1..0b631d47d77 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -1067,8 +1067,9 @@ comment at the start of cc-engine.el for more info." (not (eq ret 'beginning)) (looking-at c-case-kwds-regexp)) (if (< after-case:-pos start) - (setq pos after-case:-pos) - (setq ret 'label))) + (setq pos after-case:-pos)) + (if (eq ret 'same) + (setq ret 'label))) ;; Skip over the unary operators that can start the statement. (while (progn diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 9c19e791c3e..0e0eca228bc 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -2885,7 +2885,7 @@ tested at the beginning of every sexp in a suspected label, i.e. before \":\". Only used if `c-recognize-colon-labels' is set." t (concat ;; Don't allow string literals. - "[\"']\\|" + "\"\\|" ;; All keywords except `c-label-kwds' and `c-protection-kwds'. (c-make-keywords-re t (set-difference (c-lang-const c-keywords) -- 2.39.5