Re: Different comment syntaxes in within the same buffer?
Arsen Arsenović <[email protected]>
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <[email protected]> |
Kristoffer Balintona <[email protected]> writes: > My specific case is that I'm using astro-ts-mode[1] for .astro files. So > although it can fontify the buffer just fine, it uses the same syntax > for comments regardless of where I am in it. > > (If I could figure out how to have Emacs use a different comment > syntax when appropriate, then I was thinking I could open a PR to the > package maintainer to add the functionality.) > > Ideally I'd use the existing astro tree-sitter grammar (rather than > `mmm-mode` or `polymode`, which I'm not familiar with) since it > already does its job well. See comment-setup-function. Example: https://codeberg.org/Arsen/gcc-md-mode/src/commit/20616ce351fcb9060b3b6365ded6ae44c47b3596/gcc-md-mode.el#L638-L663 https://codeberg.org/Arsen/gcc-md-mode/src/commit/20616ce351fcb9060b3b6365ded6ae44c47b3596/gcc-md-mode.el#L767-L768 -- Arsen Arsenović
signature.asc
(application/pgp-signature, 288 B)
-----BEGIN PGP SIGNATURE----- iKIEARYKAEoWIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCadpgzBsUgAAAAAAEAA5t YW51MiwyLjUrMS4xMiwyLDIQHGFyc2VuQGFhcnNlbi5tZQAKCRBSwpQwHqLEk1sC AP9JzFXBC+BDyeu/CTTKjDptd+KfYaL1RTuqfV88XI6vgQD+K5gBB7a9t+Sck/QF IFnx11emdabIJabMO7zJ3bvmCQY= =Nf8E -----END PGP SIGNATURE-----