core-ui: general refactor/reformatting
This commit is contained in:
parent
52cdb0bd83
commit
9b1385b725
1 changed files with 24 additions and 26 deletions
|
@ -24,10 +24,29 @@ Expects a `font-spec'.")
|
||||||
return a string). This changes the 'long' name of a major-mode, allowing for
|
return a string). This changes the 'long' name of a major-mode, allowing for
|
||||||
shorter major mode name in the mode-line. See `doom|set-mode-name'.")
|
shorter major mode name in the mode-line. See `doom|set-mode-name'.")
|
||||||
|
|
||||||
|
|
||||||
;; Hook(s)
|
|
||||||
(defvar doom-init-ui-hook nil
|
(defvar doom-init-ui-hook nil
|
||||||
"List of hooks to run when core-ui is initialized.")
|
"List of hooks to run when the UI has been initialized.")
|
||||||
|
|
||||||
|
(defvar doom-load-theme-hook nil
|
||||||
|
"Hook run when the theme (and font) is initialized (or reloaded
|
||||||
|
with `doom//reload-theme').")
|
||||||
|
|
||||||
|
(defvar doom-before-switch-window-hook nil
|
||||||
|
"Hook run before `switch-window' or `switch-frame' are called. See
|
||||||
|
`doom-after-switch-window-hook'.")
|
||||||
|
|
||||||
|
(defvar doom-after-switch-window-hook nil
|
||||||
|
"Hook run after `switch-window' or `switch-frame' are called. See
|
||||||
|
`doom-before-switch-window-hook'.")
|
||||||
|
|
||||||
|
(defvar doom-before-switch-buffer-hook nil
|
||||||
|
"Hook run before `switch-to-buffer' and `display-buffer' are called. See
|
||||||
|
`doom-after-switch-buffer-hook'.")
|
||||||
|
|
||||||
|
(defvar doom-after-switch-buffer-hook nil
|
||||||
|
"Hook run before `switch-to-buffer' and `display-buffer' are called. See
|
||||||
|
`doom-before-switch-buffer-hook'.")
|
||||||
|
|
||||||
|
|
||||||
(setq-default
|
(setq-default
|
||||||
ansi-color-for-comint-mode t
|
ansi-color-for-comint-mode t
|
||||||
|
@ -309,26 +328,6 @@ from the default."
|
||||||
;; Custom hooks
|
;; Custom hooks
|
||||||
;;
|
;;
|
||||||
|
|
||||||
(defvar doom-load-theme-hook nil
|
|
||||||
"Hook run when the theme (and font) is initialized (or reloaded
|
|
||||||
with `doom//reload-theme').")
|
|
||||||
|
|
||||||
(defvar doom-before-switch-window-hook nil
|
|
||||||
"Hook run before `switch-window' or `switch-frame' are called. See
|
|
||||||
`doom-after-switch-window-hook'.")
|
|
||||||
|
|
||||||
(defvar doom-after-switch-window-hook nil
|
|
||||||
"Hook run after `switch-window' or `switch-frame' are called. See
|
|
||||||
`doom-before-switch-window-hook'.")
|
|
||||||
|
|
||||||
(defvar doom-before-switch-buffer-hook nil
|
|
||||||
"Hook run before `switch-to-buffer' and `display-buffer' are called. See
|
|
||||||
`doom-after-switch-buffer-hook'.")
|
|
||||||
|
|
||||||
(defvar doom-after-switch-buffer-hook nil
|
|
||||||
"Hook run before `switch-to-buffer' and `display-buffer' are called. See
|
|
||||||
`doom-before-switch-buffer-hook'.")
|
|
||||||
|
|
||||||
(defun doom*switch-frame-hooks (orig-fn frame &optional norecord)
|
(defun doom*switch-frame-hooks (orig-fn frame &optional norecord)
|
||||||
(if (eq frame (selected-frame))
|
(if (eq frame (selected-frame))
|
||||||
(funcall orig-fn frame norecord)
|
(funcall orig-fn frame norecord)
|
||||||
|
@ -487,7 +486,7 @@ character that looks like a space that `whitespace-mode' won't affect.")
|
||||||
:commands (nlinum-relative-mode nlinum-relative-on nlinum-relative-off)
|
:commands (nlinum-relative-mode nlinum-relative-on nlinum-relative-off)
|
||||||
:config
|
:config
|
||||||
(setq nlinum-format " %d ")
|
(setq nlinum-format " %d ")
|
||||||
(after! evil (nlinum-relative-setup-evil)))
|
(add-hook 'evil-mode #'nlinum-relative-setup-evil))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
@ -571,7 +570,6 @@ frame's window-system, the theme will be reloaded.")
|
||||||
(after! posframe
|
(after! posframe
|
||||||
;; TODO Find a better place for this
|
;; TODO Find a better place for this
|
||||||
(defun doom|delete-posframe-on-escape ()
|
(defun doom|delete-posframe-on-escape ()
|
||||||
"TODO"
|
|
||||||
(unless (frame-parameter (selected-frame) 'posframe-buffer)
|
(unless (frame-parameter (selected-frame) 'posframe-buffer)
|
||||||
(cl-loop for frame in (frame-list)
|
(cl-loop for frame in (frame-list)
|
||||||
if (and (frame-parameter frame 'posframe-buffer)
|
if (and (frame-parameter frame 'posframe-buffer)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue