From: Alan Mackenzie Date: Fri, 2 Aug 2019 13:38:13 +0000 (+0000) Subject: CC Mode: Fix error in macro cache. This fixes bug #36802 X-Git-Tag: emacs-27.0.90~1753 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=558038ccb76614d60bf54cb62359027d25e00f72;p=emacs.git 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. --- 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))))