fix editorconfig setup bug
This commit is contained in:
1 file changed
+8
-7
@@ -2,15 +2,16 @@
|
||||
|
||||
(autoload 'editorconfig-mode "editorconfig" "" t)
|
||||
|
||||
(setq creature/editorconfig-timer
|
||||
(run-with-idle-timer 5 nil #'editorconfig-mode))
|
||||
|
||||
(add-hook 'find-file-hook #'editorconfig-mode)
|
||||
|
||||
(with-eval-after-load 'editorconfig
|
||||
(remove-hook 'find-file-hook #'editorconfig-mode)
|
||||
(defun creature/editorconfig-setup ()
|
||||
(editorconfig-mode 1)
|
||||
(remove-hook 'find-file-hook #'creature/editorconfig-setup)
|
||||
(cancel-timer 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)
|
||||
Reference in new issue
Block a user