# HG changeset patch # User Alan Mackenzie # Date 1225739016 0 # Node ID c6c533f20c51245b1c664441ea9f64d2ca0b9851 # Parent c764fa1cc84aa55d0d3c923d82833fb384c4f85d (c-forward-label): Fix for QT macros. diff -r c764fa1cc84a -r c6c533f20c51 lisp/progmodes/cc-engine.el --- a/lisp/progmodes/cc-engine.el Mon Nov 03 19:02:48 2008 +0000 +++ b/lisp/progmodes/cc-engine.el Mon Nov 03 19:03:36 2008 +0000 @@ -5954,7 +5954,8 @@ label-end qt-symbol-idx macro-start ; if we're in one. - label-type) + label-type + kwd) (cond ;; "case" or "default" (Doesn't apply to AWK). ((looking-at c-label-kwds-regexp) @@ -6107,12 +6108,13 @@ ((looking-at ":\\([^:]\\|\\'\\)") ; A single colon. (forward-char) (setq label-type - (if (string= "signals" ; Special QT macro - (buffer-substring-no-properties start label-end)) + (if (or (string= "signals" ; Special QT macro + (setq kwd (buffer-substring-no-properties start label-end))) + (string= "Q_SIGNALS" kwd)) 'qt-1kwd-colon 'goto-target))) ((and qt-symbol-idx - (search-forward-regexp "\\=slots\\>" limit t) + (search-forward-regexp "\\=\\(slots\\|Q_SLOTS\\)\\>" limit t) (progn (c-forward-syntactic-ws limit) (looking-at ":\\([^:]\\|\\'\\)"))) ; A single colon (forward-char)