* 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.
(cherry picked from commit
55f43f5b220ed3cc49141257918e51e403dd85ac)
;; 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)))