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

c-indent-new-comment-line: don't test for a macro in a comment

This fixes bug#9860.

* lisp/progmodes/cc-cmds (c-indent-new-comment-line): Test for
a comment/string before testing for a macro, thus preventing a
"macro" being spuriously recognized in a comment.  This allows
auto-fill-mode to work on a line beginning with # in a comment.
parent 98748aa6
Pipeline #26778 failed with stages
in 544 minutes and 58 seconds
......@@ -4909,7 +4909,8 @@ If a fill prefix is specified, it overrides all the above."
(setq c-lit-limits (c-literal-limits nil nil t)))
(unless c-lit-type
(setq c-lit-type (c-literal-type c-lit-limits)))
(if (memq (cond ((c-query-and-set-macro-start) 'cpp)
(if (memq (cond ((memq c-lit-type '(c c++ string)) c-lit-type)
((c-query-and-set-macro-start) 'cpp)
((null c-lit-type) 'code)
(t c-lit-type))
c-ignore-auto-fill)
......
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