• Alan Mackenzie's avatar
    Implement C++ Mode attributes. This fixes bug #36650. · 5ccaee4b
    Alan Mackenzie authored
    * lisp/progmodes/cc-engine.el (c-looking-at-c++-attribute)
    (c-enclosing-c++-attribute, c-slow-enclosing-c++-attribute): New macro and
    functions.
    (c-crosses-statement-barrier-p): Add [ into skip-chars for C++ Mode, and use
    it to detect and skip over an attribute whilst scanning forward.
    (c-sws-lit-type): Use the new value 'attribute.
    (c-invalidate-sws-region-before): Put a save-match-data around this function.
    Detect and handle an enclosing attribute at either END or BEG.
    (c-invalidate-sws-region-after): Handle C++ attributes.
    (c-forward-sws, c-backward-sws): Handle C++ attributes.
    
    * lisp/progmodes/cc-mode.el (c-fl-decl-end): Detect and handle point being
    inside a C++ attribute.
    5ccaee4b
cc-engine.el 519 KB