• Jackson Ray Hamilton's avatar
    Font-lock JSX while editing it by extending regions · 4d2b5bbf
    Jackson Ray Hamilton authored
    * lisp/progmodes/js.el (js-jsx--font-lock-keywords):
    Call tag beginning and end matchers.
    (js-jsx--match-tag-beg, js-jsx--match-tag-end): New functions.
    (js-jsx--syntax-propertize-tag): Record buffer positions of JSXElement
    beginning and end for font-locking.
    (js-jsx--syntax-propertize-extend-region): New functions for extending
    the syntax-propertize region backwards to the start of a JSXElement so
    its JSXAttribute children on its n+1th lines can be parsed as such
    while editing those lines.
    (js-mode): Add js--syntax-propertize-extend-region to
js.el 148 KB