Mercurial > emacs
changeset 105206:60cf2b54da00
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.
author | Alan Mackenzie <acm@muc.de> |
---|---|
date | Sat, 26 Sep 2009 09:18:41 +0000 |
parents | 3603226f3cf8 |
children | 4233b4bcb3c2 |
files | lisp/progmodes/cc-engine.el lisp/progmodes/cc-langs.el |
diffstat | 2 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/cc-engine.el Sat Sep 26 09:08:54 2009 +0000 +++ b/lisp/progmodes/cc-engine.el Sat Sep 26 09:18:41 2009 +0000 @@ -1067,8 +1067,9 @@ (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
--- a/lisp/progmodes/cc-langs.el Sat Sep 26 09:08:54 2009 +0000 +++ b/lisp/progmodes/cc-langs.el Sat Sep 26 09:18:41 2009 +0000 @@ -2885,7 +2885,7 @@ 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)