From 95a39b33959b98f4b314c1c441060682bf49aa44 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Mon, 21 Aug 2017 11:47:29 -0700 Subject: [PATCH] Test c fontification fix From: Alan Mackenzie --- lisp/progmodes/cc-mode.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 0bf89b9a36..f27ec8722c 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1549,10 +1549,13 @@ c-fl-decl-end (c-backward-syntactic-ws) (when (setq pos1 (c-on-identifier)) (goto-char pos1) - (when (and (c-forward-declarator) - (eq (c-forward-token-2) 0)) - (c-backward-syntactic-ws) - (point))))) + (let ((lim (save-excursion + (and (c-beginning-of-macro) + (progn (c-end-of-macro) (point)))))) + (when (and (c-forward-declarator lim) + (eq (c-forward-token-2 1 nil lim) 0)) + (c-backward-syntactic-ws) + (point)))))) (defun c-change-expand-fl-region (_beg _end _old-len) ;; Expand the region (c-new-BEG c-new-END) to an after-change font-lock -- 2.11.0