lazy load recentf-mode and editorconfig-mode

This commit is contained in:
zedhugh committed 2022-10-28 23:43:58 +08:00
1 parent 07cf24b6f2
commit af755d41e7
2 files changed
+22 -3

No files matched your search

+10 -3
View File
@@ -1,9 +1,16 @@
;; -*- coding: utf-8; lexical-binding: t; -*-
(require 'editorconfig)
(autoload 'editorconfig-mode "editorconfig" "" t)
(editorconfig-mode 1)
(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)
(cancel-timer creature/editorconfig-timer)
(makunbound 'creature/editorconfig-timer))
(setq creature/editorconfig-timer nil)
(provide 'init-editorconfig)