diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-13 01:31:32 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-13 01:31:32 -0500 |
| commit | 59b1232ce02f215758beb083b00e0ad1e36528f7 (patch) | |
| tree | a329f6dde5116e8ba60df2d8eb321782debec198 /modules/system-lib.el | |
| parent | 5d7633c74dbe47690eb837946ca9f17453dbe13f (diff) | |
| download | dotemacs-59b1232ce02f215758beb083b00e0ad1e36528f7.tar.gz dotemacs-59b1232ce02f215758beb083b00e0ad1e36528f7.zip | |
fix(snippets): stop electric-pair from stranding ">" after "<"-key snippets
Most of the yasnippet keys start with "<" (<cj, <for, <main, ...), mirroring org-tempo. electric-pair-mode pairs "<" into "<>" wherever the mode's syntax table gives "<" paren syntax, which org and the pairing-enabled prog modes both do. So typing "<cj" lands as "<cj>", and expanding the "<cj" key strands the ">" after the snippet. The cj-comment block came out with a "#+end_src>" 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 "<"-prefixed snippet convention intact across all 14 of them, at the cost of "<>" 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.
Diffstat (limited to 'modules/system-lib.el')
0 files changed, 0 insertions, 0 deletions
