; Fix typo in treesit-explore-mode
authorYuan Fu <casouri@gmail.com>
Sat, 4 Jan 2025 05:39:32 +0000 (21:39 -0800)
committerYuan Fu <casouri@gmail.com>
Sat, 4 Jan 2025 05:40:42 +0000 (21:40 -0800)
* lisp/treesit.el (treesit-explore-mode): We added the hook to
kill-buffer-hook, so make sure to remove it from
kill-buffer-hook, not post-command-hook.

lisp/treesit.el

index d788edf7ffc406e184ea45d8590d34c3d8f981bc..2887521110b7d044ee00046eb59f2e3d60ae8684 100644 (file)
@@ -3601,7 +3601,7 @@ window."
     ;; Turn off explore mode.
     (remove-hook 'post-command-hook
                  #'treesit--explorer-post-command t)
-    (remove-hook 'post-command-hook
+    (remove-hook 'kill-buffer-hook
                  #'treesit--explorer-kill-explorer-buffer t)
     (treesit--explorer-kill-explorer-buffer)))