From 65b9a8a6c7e2b6e731c025d11880dca3403e5f63 Mon Sep 17 00:00:00 2001 From: John Turner Date: Tue, 12 Sep 2023 00:43:53 -0400 Subject: [PATCH] fixup --- packages/treesit.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/treesit.el b/packages/treesit.el index 31e4c43..ec9034b 100644 --- a/packages/treesit.el +++ b/packages/treesit.el @@ -12,7 +12,7 @@ :requires treesit :hook (rust-ts-mode . (lambda () - (when (featurep 'rust-mode) - (add-hook before-save-hook rust-before-save-method) - (add-hook after-save-hook rust-after-save-method) + (when (require 'rust-mode nil t) + (add-hook 'before-save-hook 'rust-before-save-method nil t) + (add-hook 'after-save-hook 'rust-after-save-method nil t) (use-local-map (make-composed-keymap (list rust-ts-mode-map rust-mode-map)))))))