Commit 2f646633 authored by Alan Mackenzie's avatar Alan Mackenzie
Browse files

CC Mode: Stop /**/ spuriously fontifying as a doc comment under gtkdoc

Also fix infinite loops by correcting two regexps.

* lisp/progmodes/cc-langs.el (c-last-c-comment-end-on-line-re)
(c-last-open-c-comment-start-on-line-re): Correct the regexp fragments
"\\*+[^/]" to "\\*+\\([^*/]\\|$\\)".

* lisp/progmodes/cc-fonts.el (gtkdoc-font-lock-keywords): Disallow /**/ for
doc comment fontification.
parent 1d435526
Pipeline #2607 failed with stage
in 90 minutes and 2 seconds
......@@ -2798,7 +2798,7 @@ need for `pike-font-lock-extra-types'.")
(defconst gtkdoc-font-lock-keywords
`((,(lambda (limit)
(c-font-lock-doc-comments "/\\*\\*\\([^*\n\r].*\\)?$" limit
(c-font-lock-doc-comments "/\\*\\*\\([^*/\n\r].*\\)?$" limit
gtkdoc-font-lock-doc-comments)
(c-font-lock-doc-comments "/\\*< " limit
gtkdoc-font-lock-doc-protection)
......
......@@ -1652,7 +1652,7 @@ backslash."
current line, if any, or nil in those languages without block
comments. When a match is found, submatch 1 contains the comment
ender."
t "\\(\\*/\\)\\([^*]\\|\\*+[^/]\\)*$"
t "\\(\\*/\\)\\([^*]\\|\\*+\\([^*/]\\|$\\)\\)*$"
awk nil)
(c-lang-defvar c-last-c-comment-end-on-line-re
(c-lang-const c-last-c-comment-end-on-line-re))
......@@ -1662,7 +1662,7 @@ ender."
current ine, if any, or nil in those languages without block
comments. When a match is found, submatch 1 contains the comment
starter."
t "\\(/\\*\\)\\([^*]\\|\\*+[^/]\\)*$"
t "\\(/\\*\\)\\([^*]\\|\\*+\\([^*/]\\|$\\)\\)*$"
awk nil)
(c-lang-defvar c-last-open-c-comment-start-on-line-re
(c-lang-const c-last-open-c-comment-start-on-line-re))
......
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