<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/tests/test-prog-general--electric-pair-angle.el, branch main</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2026-06-13T06:31:32+00:00</updated>
<entry>
<title>fix(snippets): stop electric-pair from stranding "&gt;" after "&lt;"-key snippets</title>
<updated>2026-06-13T06:31:32+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-06-13T06:31:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=d9c90e83b6ae6525fa733116edbe7634f143fd92'/>
<id>urn:sha1:d9c90e83b6ae6525fa733116edbe7634f143fd92</id>
<content type='text'>
Most of the yasnippet keys start with "&lt;" (&lt;cj, &lt;for, &lt;main, ...), mirroring org-tempo. electric-pair-mode pairs "&lt;" into "&lt;&gt;" wherever the mode's syntax table gives "&lt;" paren syntax, which org and the pairing-enabled prog modes both do. So typing "&lt;cj" lands as "&lt;cj&gt;", and expanding the "&lt;cj" key strands the "&gt;" after the snippet. The cj-comment block came out with a "#+end_src&gt;" close fence, which breaks the cj-scan fence parser and made every respond-to-cj-comments pass hand-parse around it.

I set electric-pair-inhibit-predicate globally to inhibit the open angle bracket and defer to the default for every other character. That keeps the "&lt;"-prefixed snippet convention intact across all 14 of them, at the cost of "&lt;&gt;" auto-pairing where it might otherwise be wanted (C++ templates). The snippet convention is universal, so it wins.

Surfaced from the smoke project, which kept hitting the malformed fence in its todo.org.
</content>
</entry>
</feed>
