Commit 0000ee90 authored by Alan Mackenzie's avatar Alan Mackenzie
Browse files

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.
parent d9a13f68
......@@ -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
......
......@@ -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)
......
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