From cdafac63b1202e515817b86b1f38a9727d36650d Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 20 Jul 2026 23:25:40 -0500 Subject: refactor(go): pin grammar revision via struct accessor, not raw index --- modules/prog-general.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/prog-general.el') diff --git a/modules/prog-general.el b/modules/prog-general.el index 89771cbf..a1377160 100644 --- a/modules/prog-general.el +++ b/modules/prog-general.el @@ -131,8 +131,9 @@ REGEXP must be a string or an rx form." treesit-auto-recipe-list)) (go-recipe (and go-idx (nth go-idx treesit-auto-recipe-list)))) (when go-recipe - ;; Directly modify the slot value using aset (struct fields are vectors internally) - (aset go-recipe 6 "v0.19.1"))) ; slot 6 is :revision + ;; Use the struct accessor so a treesit-auto slot reorder can't silently + ;; write the pin into the wrong field. + (setf (treesit-auto-recipe-revision go-recipe) "v0.19.1"))) (treesit-auto-add-to-auto-mode-alist 'all) (global-treesit-auto-mode)) -- cgit v1.2.3