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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user