]> git.eshelyaron.com Git - emacs.git/commitdiff
cc-langs.el (c-nonlabel-token-key): Allow quoted character constants (as
authorAlan Mackenzie <acm@muc.de>
Sat, 26 Sep 2009 09:18:41 +0000 (09:18 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 26 Sep 2009 09:18:41 +0000 (09:18 +0000)
case labels).

cc-engine.el (c-beginning-of-statement-1): Correct buggy bracketing.

lisp/progmodes/cc-engine.el
lisp/progmodes/cc-langs.el

index 24b5a9b33f1ea732cef2994d7e9b4b6a1fd4c3a7..0b631d47d777e913a29605a90ce42f109a17a675 100644 (file)
@@ -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
index 9c19e791c3ec0c96453730873eb519d24b560774..0e0eca228bc35f881a1ba0ca4157ba9b1e180b1e 100644 (file)
@@ -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)