fix editorconfig setup bug

This commit is contained in:
zedhugh committed 2022-10-29 04:12:21 +08:00
1 parent 9b9523f5a1
commit b173fa0557
1 file changed
+8 -7
+8 -7
View File
@@ -2,15 +2,16 @@
(autoload 'editorconfig-mode "editorconfig" "" t) (autoload 'editorconfig-mode "editorconfig" "" t)
(setq creature/editorconfig-timer (defun creature/editorconfig-setup ()
(run-with-idle-timer 5 nil #'editorconfig-mode)) (editorconfig-mode 1)
(remove-hook 'find-file-hook #'creature/editorconfig-setup)
(add-hook 'find-file-hook #'editorconfig-mode)
(with-eval-after-load 'editorconfig
(remove-hook 'find-file-hook #'editorconfig-mode)
(cancel-timer creature/editorconfig-timer) (cancel-timer creature/editorconfig-timer)
(makunbound 'creature/editorconfig-timer)) (makunbound 'creature/editorconfig-timer))
(setq creature/editorconfig-timer
(run-with-idle-timer 5 nil #'creature/editorconfig-setup))
(add-hook 'find-file-hook #'creature/editorconfig-setup)
(provide 'init-editorconfig) (provide 'init-editorconfig)