From 9b44824620fd500b9e7094bd1a8ca23608cb2e5b Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sat, 18 Jun 2022 16:41:57 +0000 Subject: CC Mode: Add accurate handling for backslash in C line and block comments This is needed to handle the idiosyncratic meaning of backslash in comments in the C and C++ standards. * lisp/progmodes/cc-engine.el: Correct a spelling error. * lisp/progmodes/cc-mode.el (c-before-change-fix-comment-escapes) (c-after-change-fix-comment-escapes): New functions. * lisp/progmodes/cc-langs.el (c-get-state-before-change-functions): Add c-before-change-fix-comment-escapes to the C/Objc and C++ values. (c-before-font-lock-functions): Add c-after-change-fix-comment-escapes to the C/Objc and C++ values. --- lisp/progmodes/cc-engine.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/progmodes/cc-engine.el') diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index f9c33f51495..cfbb668baeb 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -6837,7 +6837,7 @@ comment at the start of cc-engine.el for more info." (let ((type (c-syntactic-content from to c-recognize-<>-arglists))) (unless (gethash type c-found-types) (puthash type t c-found-types) - (when (and (not c-record-found-types) ; Only call `c-fontify-new-fount-type' + (when (and (not c-record-found-types) ; Only call `c-fontify-new-found-type' ; when we haven't "bound" c-found-types ; to itself in c-forward-<>-arglist. (eq (string-match c-symbol-key type) 0) -- cgit v1.2.3