From 7ac3b2321f2196fcbc4c07587030ab6398f9a37d Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Fri, 14 Jun 2024 19:05:26 +0200 Subject: [PATCH] Clean up "lst:setup-go" --- README.org | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.org b/README.org index c801b9a..51aeb84 100644 --- a/README.org +++ b/README.org @@ -4977,12 +4977,9 @@ Links for further investigation are: #+name: lst:setup-go #+begin_src emacs-lisp -n :results silent (when (featurep 'treesit) - ;; Set `tab-width' in `after-change-major-mode-hook' function too. (setopt go-ts-mode-indent-offset 2) - (add-hook 'after-change-major-mode-hook - (defun on-go-ts-mode-hook () - (when (derived-mode-p 'go-ts-mode 'go-mod-ts-mode) - (setq-local tab-width 2)))) + (add-hook 'go-ts-mode-hook (lambda () + (setq-local tab-width 2))) (add-to-list 'auto-mode-alist `(,(rx ".go" eos) . go-ts-mode))) #+end_src