Skip to content

Commit

Permalink
tweak(evil): disable mode if load grammar fails
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan-leba committed Oct 30, 2023
1 parent 22df8b4 commit 4b5848a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion evil-tree-edit.el
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,11 @@ This is so that the current node will be properly highlighted in explorer mode."
:lighter " TE"
(cond
(evil-tree-edit-mode
(tree-edit-load-grammar-for-major-mode)
(condition-case err
(tree-edit-load-grammar-for-major-mode)
(error
(evil-tree-edit-mode -1)
(signal (car err) (cdr err))))
(evil-tree-edit-set-state-bindings major-mode)
;; HACK: Above mode binding won't come into effect until the state is changed.
(evil-normal-state)
Expand Down

0 comments on commit 4b5848a

Please sign in to comment.