aboutsummaryrefslogtreecommitdiff
path: root/modules/prog-python.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-15 15:10:19 -0500
committerCraig Jennings <c@cjennings.net>2026-05-15 15:10:19 -0500
commit74cffcac0c9bb8e4a7ee33d51ff1f2cd9a2cd7f0 (patch)
tree9f15fd69ddac57a6ec7476fac08938d6495a693a /modules/prog-python.el
parent45cdc8f41fdf337dfd8dd82f278c4c55654cf83e (diff)
downloaddotemacs-74cffcac0c9bb8e4a7ee33d51ff1f2cd9a2cd7f0.tar.gz
dotemacs-74cffcac0c9bb8e4a7ee33d51ff1f2cd9a2cd7f0.zip
feat(yas): activate yasnippet globally with fundamental-mode extras
The yasnippet use-package block switches from `:hook (prog-mode . yas-minor-mode)` to `:demand t` + `(yas-global-mode 1)`. That makes yas-minor-mode active in every buffer, not just prog-mode-derived ones. I added a small helper, `cj/--yas-activate-fundamental-extras`, attached as `:hook (yas-minor-mode . ...)`. It calls `(yas-activate-extra-mode 'fundamental-mode)` so the snippet table at `snippets/fundamental-mode/` is consulted in every buffer regardless of the buffer's own major mode. That's what makes universal triggers like `<cj` work everywhere. The new `tests/test-prog-general-yas-activation.el` covers both wiring (yas-global-mode on, fundamental-mode in yas-extra-modes, yas-minor-mode active in org/text buffers) and end-to-end expansion (the marker snippet expands correctly in fundamental, text, org, emacs-lisp, and python-ts modes). 9 tests, all green; full unit suite green with no regressions.
Diffstat (limited to 'modules/prog-python.el')
0 files changed, 0 insertions, 0 deletions