Commit 83bbb481 authored by Alan Mackenzie's avatar Alan Mackenzie
Browse files

CC Mode - use font-lock-comment-delimiter-face on block comment end delimiters

In particular when the default comment type is currently line comments.  Do
this by setting font-lock-comment-end-skip.

* lisp/progmodes/cc-cmds.el (c-font-lock-comment-end-skip): New lang const.
(font-lock-comment-end-skip): New c-lang-setvar.
parent d82e73f0
Pipeline #405 failed with stage
in 27 minutes and 11 seconds
......@@ -1529,6 +1529,17 @@ properly."
(c-lang-defvar c-block-comment-ender-regexp
(c-lang-const c-block-comment-ender-regexp))
(c-lang-defconst c-font-lock-comment-end-skip
;; Regexp which matches whitespace followed by the end of a block comment
;; (if such exists in the language). This is used by font lock to determine
;; the portion of the end of a comment to fontify with
;; `font-lock-comment-delimiter-face'.
t (if (c-lang-const c-block-comment-ender)
(concat "[ \t]*" (c-lang-const c-block-comment-ender-regexp))
"a\\`")) ; Doesn't match anything.
(c-lang-setvar font-lock-comment-end-skip
(c-lang-const c-font-lock-comment-end-skip))
(c-lang-defconst c-comment-start-regexp
;; Regexp to match the start of any type of comment.
t (let ((re (c-make-keywords-re nil
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment