diff options
| author | Alan Mackenzie | 2019-08-02 13:38:13 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2019-08-02 13:39:57 +0000 |
| commit | 558038ccb76614d60bf54cb62359027d25e00f72 (patch) | |
| tree | 3e9e9065d71381c53c40e474af2d92af6b3b8f1e | |
| parent | eddf4664d786e16b34f6bd0af238a567feb5012c (diff) | |
| download | emacs-558038ccb76614d60bf54cb62359027d25e00f72.tar.gz emacs-558038ccb76614d60bf54cb62359027d25e00f72.zip | |
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 @@ | |||
| 271 | (setcdr c-macro-cache nil) | 271 | (setcdr c-macro-cache nil) |
| 272 | (setq c-macro-cache-start-pos beg | 272 | (setq c-macro-cache-start-pos beg |
| 273 | c-macro-cache-syntactic nil | 273 | c-macro-cache-syntactic nil |
| 274 | c-macro-cache-no-comment nil)) | ||
| 275 | ((and c-macro-cache-start-pos | ||
| 276 | (< beg c-macro-cache-start-pos)) | ||
| 277 | (setq c-macro-cache-start-pos beg | ||
| 278 | c-macro-cache-syntactic nil | ||
| 274 | c-macro-cache-no-comment nil)))) | 279 | c-macro-cache-no-comment nil)))) |
| 275 | 280 | ||
| 276 | (defun c-macro-is-genuine-p () | 281 | (defun c-macro-is-genuine-p () |