diff options
| author | Alan Mackenzie <acm@muc.de> | 2019-08-02 13:38:13 +0000 |
|---|---|---|
| committer | Alan Mackenzie <acm@muc.de> | 2019-08-02 13:39:57 +0000 |
| commit | 558038ccb76614d60bf54cb62359027d25e00f72 (patch) | |
| tree | 3e9e9065d71381c53c40e474af2d92af6b3b8f1e | |
| parent | eddf4664d786e16b34f6bd0af238a567feb5012c (diff) | |
| download | emacs-558038ccb76614d60bf54cb62359027d25e00f72.tar.gz | |
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.
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 5 |
1 files changed, 5 insertions, 0 deletions
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 @@ -271,6 +271,11 @@ (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)))) (defun c-macro-is-genuine-p () |
