From 558038ccb76614d60bf54cb62359027d25e00f72 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Fri, 2 Aug 2019 13:38:13 +0000 Subject: [PATCH] CC Mode: Fix error in macro cache. This fixes bug #36802 * lisp/progmodes/cc-engine.el (c-invalidate-macro-cache): Add in a cond arm to handle the change position being less than the recorded CPP contruct end. --- lisp/progmodes/cc-engine.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 37d4591fc96..a095277989a 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -269,6 +269,11 @@ ((and (cdr c-macro-cache) (< beg (cdr c-macro-cache))) (setcdr c-macro-cache nil) + (setq c-macro-cache-start-pos beg + c-macro-cache-syntactic nil + c-macro-cache-no-comment nil)) + ((and c-macro-cache-start-pos + (< beg c-macro-cache-start-pos)) (setq c-macro-cache-start-pos beg c-macro-cache-syntactic nil c-macro-cache-no-comment nil)))) -- 2.39.2