Refactor DOOM init & add new init hooks
+ Add doom-init-hook and doom-post-init-hook to simplify Emacs init hooks into less ambiguous ones. + Attach former after-init-hook and emacs-startup-hook hooks to new doom init hooks. + Vastly improves daemon and tty support: preventing incorrect colors from bleeding across face class barriers, and into GUI Emacs and vice versa, when spawned with emacsclient. + Fix persp-mode breaking Emacs daemon, and ensuring that initialization is done properly in terminal Emacs (and emacsclient frames).
This commit is contained in:
parent
d3054f4679
commit
4984a548d1
17 changed files with 121 additions and 80 deletions
|
@ -107,7 +107,7 @@ fundamental-mode) for performance sake."
|
|||
savehist-autosave-interval nil ; save on kill only
|
||||
savehist-additional-variables '(kill-ring search-ring regexp-search-ring)
|
||||
save-place-file (concat doom-cache-dir "saveplace"))
|
||||
(add-hook! 'emacs-startup-hook #'(savehist-mode save-place-mode))
|
||||
(add-hook! 'doom-init-hook #'(savehist-mode save-place-mode))
|
||||
|
||||
;; Keep track of recently opened files
|
||||
(def-package! recentf
|
||||
|
@ -151,7 +151,7 @@ fundamental-mode) for performance sake."
|
|||
(t (error "%s is an invalid action for :editorconfig" action)))))
|
||||
|
||||
:config
|
||||
(add-hook 'emacs-startup-hook #'editorconfig-mode)
|
||||
(add-hook 'doom-init-hook #'editorconfig-mode)
|
||||
|
||||
(defun doom|editorconfig-whitespace-mode-maybe (&rest _)
|
||||
"Show whitespace-mode when file uses TABS (ew)."
|
||||
|
@ -169,7 +169,7 @@ fundamental-mode) for performance sake."
|
|||
sp-max-pair-length 3)
|
||||
|
||||
:config
|
||||
(add-hook 'emacs-startup-hook #'smartparens-global-mode)
|
||||
(add-hook 'doom-init-hook #'smartparens-global-mode)
|
||||
(require 'smartparens-config)
|
||||
;; Smartparens interferes with Replace mode
|
||||
(add-hook 'evil-replace-state-entry-hook #'turn-off-smartparens-mode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue