Commit b293aa91 authored by Alan Mackenzie's avatar Alan Mackenzie
Browse files

CC Mode. Allow fontification of "wrong" style comments with warning face.

This fixes bug #4192.

* etc/NEWS: Add a new entry.

* lisp/progmodes/cc-defs.el (c-font-lock-flush): New macro.

* lisp/progmodes/cc-cmds.el (c-toggle-comment-style): On toggling the comment
style, invoke c-font-lock-flush when c-mark-wrong-style-of-comment is non-nil,
to cause that marking to be done instead on the other style of comment.

* lisp/progmodes/cc-fonts.el (c-maybe-font-lock-wrong-style-comments): New
(c-cpp-matchers): Call c-maybe-font-lock-wrong-style-comments when

* lisp/progmodes/cc-vars.el (c-mark-wrong-style-of-comment): New customizable

* doc/misc/cc-mode.texi (top level, Indentation Commands, Guessing the Style,
Custom Macros): For some opening quote marks, correct '' to ``.
(Minor Modes): Add an xref to the new page "Wrong Comment Style" in a
(Wrong Comment Style): New page.
parent 6daa80d0
Pipeline #3981 failed with stage
in 25 minutes and 26 seconds