General cleanup + refactor
This commit is contained in:
parent
12e786db9a
commit
8c9269c9a2
4 changed files with 9 additions and 6 deletions
|
@ -71,8 +71,7 @@
|
||||||
(defun doom|dont-kill-scratch-buffer ()
|
(defun doom|dont-kill-scratch-buffer ()
|
||||||
(if (not (eq (buffer-name) "*scratch*"))
|
(if (not (eq (buffer-name) "*scratch*"))
|
||||||
t
|
t
|
||||||
(bury-buffer)
|
(ignore (bury-buffer))))
|
||||||
nil))
|
|
||||||
(add-hook 'kill-buffer-query-functions 'doom|dont-kill-scratch-buffer)
|
(add-hook 'kill-buffer-query-functions 'doom|dont-kill-scratch-buffer)
|
||||||
|
|
||||||
;; enabled by default in Emacs 25+. No thanks.
|
;; enabled by default in Emacs 25+. No thanks.
|
||||||
|
|
|
@ -99,8 +99,10 @@ see if NAME should be activated.
|
||||||
|
|
||||||
:modes MODES -- if buffers are derived from MODES (one or a list of symbols).
|
:modes MODES -- if buffers are derived from MODES (one or a list of symbols).
|
||||||
|
|
||||||
:files FILES -- if project contains FILES (relative to project root); takes a
|
:files FILES -- if project contains FILES; takes a solitary string or a form
|
||||||
solitary string or a form comprised of (and ...) and/or (or ...) forms.
|
comprised of (and ...) and/or (or ...) forms. Each path is relative to the
|
||||||
|
project root, however, if prefixed with a '.' or '..', it is relative to the
|
||||||
|
current buffer.
|
||||||
|
|
||||||
:match REGEXP -- if file name matches REGEXP
|
:match REGEXP -- if file name matches REGEXP
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
;;; ui/doom-dashboard/config.el
|
||||||
|
|
||||||
(defvar +doom-dashboard-name " *doom*"
|
(defvar +doom-dashboard-name " *doom*"
|
||||||
"TODO")
|
"TODO")
|
||||||
|
|
|
@ -53,15 +53,16 @@
|
||||||
(push (cons 'background-color (face-background 'default)) default-frame-alist)
|
(push (cons 'background-color (face-background 'default)) default-frame-alist)
|
||||||
(push (cons 'foreground-color (face-foreground 'default)) default-frame-alist)
|
(push (cons 'foreground-color (face-foreground 'default)) default-frame-alist)
|
||||||
|
|
||||||
;; brighter real buffers
|
|
||||||
(defun +doom|buffer-mode-on ()
|
(defun +doom|buffer-mode-on ()
|
||||||
|
"Enable `doom-buffer-mode' in buffers that are real (see
|
||||||
|
`doom-real-buffer-p')."
|
||||||
(when (and (not doom-buffer-mode)
|
(when (and (not doom-buffer-mode)
|
||||||
(doom-real-buffer-p))
|
(doom-real-buffer-p))
|
||||||
(doom-buffer-mode +1)))
|
(doom-buffer-mode +1)))
|
||||||
(add-hook 'after-change-major-mode-hook '+doom|buffer-mode-on)
|
(add-hook 'after-change-major-mode-hook '+doom|buffer-mode-on)
|
||||||
|
|
||||||
;; Popup buffers should always be dimmed
|
|
||||||
(defun +doom|buffer-mode-off ()
|
(defun +doom|buffer-mode-off ()
|
||||||
|
"Disable `doom-buffer-mode' in popup buffers."
|
||||||
(when (and doom-buffer-mode
|
(when (and doom-buffer-mode
|
||||||
(not (get-buffer-window-list)))
|
(not (get-buffer-window-list)))
|
||||||
(doom-buffer-mode -1)))
|
(doom-buffer-mode -1)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue