diff options
| author | Alan Mackenzie | 2019-11-09 12:09:30 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2019-11-09 12:09:30 +0000 |
| commit | b293aa91bcc7f553ffbc6c67027f3c86d06ffbd7 (patch) | |
| tree | 39f019da4ce7a41d1367c01f590487b529bad2a3 /etc | |
| parent | 6daa80d04e575a27f53f60f5fafd7fcba39b4b2a (diff) | |
| download | emacs-b293aa91bcc7f553ffbc6c67027f3c86d06ffbd7.tar.gz emacs-b293aa91bcc7f553ffbc6c67027f3c86d06ffbd7.zip | |
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
function.
(c-cpp-matchers): Call c-maybe-font-lock-wrong-style-comments when
appropriate.
* lisp/progmodes/cc-vars.el (c-mark-wrong-style-of-comment): New customizable
option.
* 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
footnote.
(Wrong Comment Style): New page.
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/NEWS | 8 |
1 files changed, 8 insertions, 0 deletions
| @@ -2264,6 +2264,14 @@ file-local variable, you may need to update the value. | |||
| 2264 | *** Declare 'define-overload' and 'define-child-mode' as obsolete | 2264 | *** Declare 'define-overload' and 'define-child-mode' as obsolete |
| 2265 | *** Rename several internal functions to use a ''mode-local-' prefix | 2265 | *** Rename several internal functions to use a ''mode-local-' prefix |
| 2266 | 2266 | ||
| 2267 | ** CC Mode | ||
| 2268 | |||
| 2269 | +++ | ||
| 2270 | *** You can now flag "wrong style" comments with font-lock-warning-face. | ||
| 2271 | To do this, use c-toggle-comment-style, if needed, to set the desired | ||
| 2272 | default comment style (block or line); then set the option | ||
| 2273 | c-mark-wrong-style-of-comment to non-nil. | ||
| 2274 | |||
| 2267 | 2275 | ||
| 2268 | * New Modes and Packages in Emacs 27.1 | 2276 | * New Modes and Packages in Emacs 27.1 |
| 2269 | 2277 | ||