From 229c3fa541398f6087147b7dc180b0b602c731dd Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Tue, 5 Jan 2016 10:30:55 +0000 Subject: [PATCH] Make C++ buffers writeable when writing their initial text properties. This is a correction to yesterday's CC Mode patch. * lisp/progmodes/cc-engine.el (c-before-change-check-<>-operators): Put c-save-buffer-state around the function rather than a mere `let'. --- lisp/progmodes/cc-engine.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 2a35a647ff8..3301d415923 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -5596,9 +5596,10 @@ comment at the start of cc-engine.el for more info." ;; FIXME!!! This routine ignores the possibility of macros entirely. ;; 2010-01-29. (save-excursion - (let ((beg-lit-limits (progn (goto-char beg) (c-literal-limits))) - (end-lit-limits (progn (goto-char end) (c-literal-limits))) - new-beg new-end beg-limit end-limit) + (c-save-buffer-state + ((beg-lit-limits (progn (goto-char beg) (c-literal-limits))) + (end-lit-limits (progn (goto-char end) (c-literal-limits))) + new-beg new-end beg-limit end-limit) ;; Locate the earliest < after the barrier before the changed region, ;; which isn't already marked as a paren. (goto-char (if beg-lit-limits (car beg-lit-limits) beg)) -- 2.39.2