General, minor refactor/reformatting
This commit is contained in:
parent
742687a51e
commit
f9b6f6746f
6 changed files with 25 additions and 26 deletions
|
@ -53,7 +53,6 @@ detected.")
|
|||
(setq-hook! '(eshell-mode-hook term-mode-hook) hscroll-margin 0)
|
||||
|
||||
(defun doom*optimize-literal-mode-for-large-files (buffer)
|
||||
"TODO"
|
||||
(with-current-buffer buffer
|
||||
(when find-file-literally
|
||||
(setq buffer-read-only t)
|
||||
|
@ -233,7 +232,7 @@ savehist file."
|
|||
`(("." . ,(concat doom-cache-dir "undo-tree-hist/"))))
|
||||
(global-undo-tree-mode +1)
|
||||
|
||||
;; compress undo history with xz
|
||||
;; compress undo history with xz/gzip
|
||||
(and (fset 'doom*undo-tree-make-history-save-file-name
|
||||
(cond ((executable-find "zstd") (lambda (file) (concat file ".zst")))
|
||||
((executable-find "gzip") (lambda (file) (concat file ".gz")))))
|
||||
|
|
|
@ -59,11 +59,9 @@ session of Dooming. Will noop if used more than once, unless FORCE-P is
|
|||
non-nil."
|
||||
(when (or force-p (not doom-init-modules-p))
|
||||
(setq doom-init-modules-p t)
|
||||
|
||||
(load! "init" doom-private-dir t)
|
||||
(unless doom-modules
|
||||
(setq doom-modules (make-hash-table :test 'equal)))
|
||||
|
||||
(maphash (lambda (key plist)
|
||||
(let ((doom--current-module key)
|
||||
(doom--current-flags (plist-get plist :flags)))
|
||||
|
|
|
@ -49,21 +49,22 @@ Emacs.")
|
|||
"Purge projectile cache entries that:
|
||||
|
||||
a) have too many files (see `doom-projectile-cache-limit'),
|
||||
b) represent blacklised directories that are too big, change too often or are
|
||||
b) represent blacklisted directories that are too big, change too often or are
|
||||
private. (see `doom-projectile-cache-blacklist'),
|
||||
c) are not valid projectile projects."
|
||||
(cl-loop with blacklist = (mapcar #'file-truename doom-projectile-cache-blacklist)
|
||||
for proot in (hash-table-keys projectile-projects-cache)
|
||||
for len = (length (gethash proot projectile-projects-cache))
|
||||
if (or (>= len doom-projectile-cache-limit)
|
||||
(member (substring proot 0 -1) blacklist)
|
||||
(and doom-projectile-cache-purge-non-projects
|
||||
(not (doom-project-p proot))))
|
||||
do (doom-log "Removed %S from projectile cache" proot)
|
||||
and do (remhash proot projectile-projects-cache)
|
||||
and do (remhash proot projectile-projects-cache-time)
|
||||
and do (remhash proot projectile-project-type-cache))
|
||||
(projectile-serialize-cache))
|
||||
(when (bound-and-true-p projectile-projects-cache)
|
||||
(cl-loop with blacklist = (mapcar #'file-truename doom-projectile-cache-blacklist)
|
||||
for proot in (hash-table-keys projectile-projects-cache)
|
||||
for len = (length (gethash proot projectile-projects-cache))
|
||||
if (or (>= len doom-projectile-cache-limit)
|
||||
(member (substring proot 0 -1) blacklist)
|
||||
(and doom-projectile-cache-purge-non-projects
|
||||
(not (doom-project-p proot))))
|
||||
do (doom-log "Removed %S from projectile cache" proot)
|
||||
and do (remhash proot projectile-projects-cache)
|
||||
and do (remhash proot projectile-projects-cache-time)
|
||||
and do (remhash proot projectile-project-type-cache))
|
||||
(projectile-serialize-cache)))
|
||||
(add-hook 'kill-emacs-hook #'doom|cleanup-project-cache)
|
||||
|
||||
;; It breaks projectile's project root resolution if HOME is a project (e.g.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue