diff options
author | David Morgan <djm_uk@protonmail.com> | 2022-10-05 16:48:02 +0100 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2022-10-05 16:48:02 +0100 |
commit | 1dc08a98e718591b8b0d451e5ad4085d7f9f7163 (patch) | |
tree | a2091d6260ff2deb5e5fd45be84c9ea5c8b26889 /.emacs.d | |
parent | 332fca3978e9f951d2d245312e312f8c64782585 (diff) | |
download | dotfiles-1dc08a98e718591b8b0d451e5ad4085d7f9f7163.tar.gz |
Enable certain modes in after-init-hook
Diffstat (limited to '.emacs.d')
-rw-r--r-- | .emacs.d/lisp/init-editor.el | 9 | ||||
-rw-r--r-- | .emacs.d/lisp/init-project.el | 5 |
2 files changed, 5 insertions, 9 deletions
diff --git a/.emacs.d/lisp/init-editor.el b/.emacs.d/lisp/init-editor.el index 2bc5ff1..a01958d 100644 --- a/.emacs.d/lisp/init-editor.el +++ b/.emacs.d/lisp/init-editor.el @@ -66,13 +66,11 @@ ("M-Z" . zop-to-char)) (use-package savehist - :defer 3 :custom (savehist-additional-variables '(search-ring regexp-search-ring)) (savehist-autosave-interval 60) (savehist-file (expand-file-name "savehist" save-dir)) - :config - (savehist-mode +1)) + :hook (after-init . savehist-mode)) (use-package super-save :defer 5 @@ -85,15 +83,14 @@ (add-to-list 'super-save-hook-triggers 'find-file-hook)) (use-package recentf - :defer 10 :config - (recentf-mode +1) (add-to-list 'recentf-exclude (expand-file-name "elpa" user-emacs-directory)) :custom (recentf-save-file (expand-file-name "recentf" save-dir)) (recentf-max-saved-items 300) (recentf-max-menu-items 20) - (recentf-auto-cleanup (* 60 60))) + (recentf-auto-cleanup (* 60 60)) + :hook (after-init . recentf-mode)) (use-package flycheck :config diff --git a/.emacs.d/lisp/init-project.el b/.emacs.d/lisp/init-project.el index ac1c0da..ac27710 100644 --- a/.emacs.d/lisp/init-project.el +++ b/.emacs.d/lisp/init-project.el @@ -72,8 +72,6 @@ ("C-x f" . project-recentf)) (use-package perspective - ;; Don't restart persp-mode when re-evaluating, as it clears the current persp list - :init (or persp-mode (persp-mode)) :custom (persp-mode-prefix-key (kbd "C-c x")) :config ;; Based on jao-buffer-same-mode (https://jao.io/blog/2021-09-08-high-signal-to-noise-emacs-command.html) @@ -138,7 +136,8 @@ mode as the current buffer (or do nothing)." ("C-x 4 C-b" . persp-previous-buffer-same-mode-other-window) ("C-x C-S-b" . persp-switch-buffer-same-mode) ("C-c x x" . persp-switch-last) - ("C-c x ." . persp-switch-quick)) + ("C-c x ." . persp-switch-quick) + :hook (after-init . persp-mode)) (provide 'init-project) ;;; init-project.el ends here |