@@ -669,7 +669,7 @@ expression, to some statements, or perhaps to whole functions, the
669669syntactic recognition can be wrong. @ccmode {} manages to figure it
670670out correctly most of the time, though.
671671
672- Some macros, when invoked, '' have their own semicolon''. To get the
672+ Some macros, when invoked, `` have their own semicolon''. To get the
673673next line indented correctly, rather than as a continuation line,
674674@xref {Macros with ; }.
675675
@@ -1149,7 +1149,9 @@ find useful while writing new code or editing old code:
11491149@table @asis
11501150@item comment style
11511151This specifies whether comment commands (such as @kbd {M-; }) insert
1152- block comments or line comments.
1152+ block comments or line comments@footnote {You can emphasize
1153+ non-default style comments in your code by giving their delimiters
1154+ @code {font-lock-warning-face }. @xref {Wrong Comment Style }. }.
11531155@item electric mode
11541156When this is enabled, certain visible characters cause reformatting as
11551157they are typed. This is normally helpful, but can be a nuisance when
@@ -1866,6 +1868,7 @@ sections apply to the other languages.
18661868* Font Locking Preliminaries ::
18671869 * Faces ::
18681870 * Doc Comments ::
1871+ * Wrong Comment Style ::
18691872 * Misc Font Locking ::
18701873 * AWK Mode Font Locking ::
18711874@end menu
@@ -2069,7 +2072,7 @@ since those aren't syntactic errors in themselves.
20692072
20702073
20712074@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2072- @node Doc Comments , Misc Font Locking , Faces , Font Locking
2075+ @node Doc Comments , Wrong Comment Style , Faces , Font Locking
20732076@comment node-name, next, previous, up
20742077@section Documentation Comments
20752078@cindex documentation comments
@@ -2149,7 +2152,29 @@ If you add support for another doc comment style, please consider
21492152contributing it: send a note to @email {bug-cc-mode @@ gnu.org }.
21502153
21512154@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2152- @node Misc Font Locking , AWK Mode Font Locking , Doc Comments , Font Locking
2155+ @node Wrong Comment Style , Misc Font Locking , Doc Comments , Font Locking
2156+ @comment node-name, next, previous, up
2157+ @section Marking ``Wrong'' style comments
2158+ @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2159+
2160+ Most languages supported by @ccmode {} have two styles of comments,
2161+ namely block comments and line comments. Your project may have such a
2162+ strong preference for one of them, that you wish ``wrong'' style
2163+ comments to be clearly marked.
2164+
2165+ You can get @ccmode {} to do this by setting the default comment style,
2166+ if necessary, (@pxref {Minor Modes }) and setting the customizable
2167+ option @code {c-mark-wrong-style-of-comment } to non-@code {nil }.
2168+
2169+ @defvar c-mark-wrong-style-of-comment
2170+ @vindex mark-wrong-style-of-comment (c-)
2171+ When this customizable option is non-@code {nil }, comment delimiters
2172+ which aren't of the default style will be fontified with
2173+ @code {font-lock-warning-face }.
2174+ @end defvar
2175+
2176+ @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2177+ @node Misc Font Locking , AWK Mode Font Locking , Wrong Comment Style , Font Locking
21532178@comment node-name, next, previous, up
21542179@section Miscellaneous Font Locking
21552180@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -2885,11 +2910,11 @@ should not be changed directly; use @code{c-add-style} instead.
28852910
28862911Instead of specifying a style, you can get @ccmode {} to @dfn {guess }
28872912your style by examining an already formatted code buffer. @ccmode {}
2888- then determines the '' most frequent'' offset (@pxref {c-offsets-alist })
2913+ then determines the `` most frequent'' offset (@pxref {c-offsets-alist })
28892914for each of the syntactic symbols (@pxref {Indentation Engine Basics })
2890- encountered in the buffer, and the '' most frequent'' value of
2915+ encountered in the buffer, and the `` most frequent'' value of
28912916c-basic-offset (@pxref {Customizing Indentation }), then merges the
2892- current style with these '' guesses'' to form a new style. This
2917+ current style with these `` guesses'' to form a new style. This
28932918combined style is known as the @dfn {guessed style }.
28942919
28952920To do this, call @code {c-guess } (or one of the other 5 guessing
@@ -6927,7 +6952,7 @@ is @code{nil}, all lines inside macro definitions are analyzed as
69276952Because a macro can expand into anything at all, near where one is
69286953invoked @ccmode {} can only indent and fontify code heuristically.
69296954Sometimes it gets it wrong. Usually you should try to design your
6930- macros so that they '' look like ordinary code'' when you invoke them.
6955+ macros so that they `` look like ordinary code'' when you invoke them.
69316956However, two situations are so common that @ccmode {} handles them
69326957specially: that is when certain macros needn't (or mustn't) be
69336958followed by a @samp {; }, and when certain macros (or compiler
0 commit comments