• Alan Mackenzie's avatar
    Fix Pike Mode's autodoc doc comments style's continued lines. · a85befa4
    Alan Mackenzie authored
    * lisp/progmodes/cc-engine.el (c-forward-sws, c-backward-sws): Recognize
    matches of c-doc-line-join-re as syntactic whitespace.
    (c-find-decl-prefix-search): Recognize and move over matches of
    c-doc-line-join-re as whitespace.
    (c-find-decl-spots): Before moving backward a char, check (bobp).  Before
    moving forward over a comment, check it isn't possibly a "bright" comment.
    
    * lisp/progmodes/cc-fonts.el (c-get-doc-comment-style): New function,
    extracted from c-compose-keywords-list.
    (c-compose-keywords-list): Call the above new function.
    (pike-font-lock-keywords, pike-font-lock-keywords-2)
    (pike-font-lock-keywords-3): Call c-set-doc-comment-res.
    (c-doc-line-join-re, c-doc-bright-comment-start-re, c-doc-line-join-end-ch):
    New variables.
    (c-set-doc-comment-re-element, c-set-doc-comment-char-list): New macros.
    (c-set-doc-comment-res): New function.
    (c-font-lock-doc-comments): For consistency and repeatability, in a sequence
    of C++ style doc comments, don't fontify the region between BOL and the
    comment marker.
    (autodoc-line-join-re, autodoc-bright-comment-start-re)
    (autodoc-line-join-end-ch): New variables.
    
    * lisp/progmodes/cc-mode.el (c-doc-fl-decl-start, c-doc-fl-decl-end): New
    functions.
    (c-change-expand-fl-region, c-context-expand-fl-region): Call the above two
    new functions for extra possibilities for the start and end of a construct.
    
    * doc/misc/cc-mode.texi (Doc Comments): Add a sentence drawing attention to
    the possibility of fontifying constructs within a doc comment.
    a85befa4
cc-mode.texi 277 KB