Fix site files not loading in batch session
Should help with loading Snap environment or packages installed via the system package manager (like mu4e). Fixes #4198
This commit is contained in:
parent
5b50a57b85
commit
91573dd95f
1 changed files with 20 additions and 0 deletions
20
bin/doom
20
bin/doom
|
@ -23,6 +23,26 @@
|
|||
(expand-file-name
|
||||
"../" (file-name-directory (file-truename load-file-name)))))
|
||||
|
||||
;; HACK Load `cl' and site files manually to prevent polluting logs and stdout
|
||||
;; with deprecation and/or file load messages.
|
||||
(let ((inhibit-message t))
|
||||
(require 'cl)
|
||||
(unless site-run-file
|
||||
(setq site-run-file "site-start")
|
||||
(let ((verbose (or (getenv "DEBUG") init-file-debug))
|
||||
(tail load-path)
|
||||
(lispdir (expand-file-name "../lisp" data-directory))
|
||||
dir)
|
||||
(while tail
|
||||
(setq dir (car tail))
|
||||
(let ((default-directory dir))
|
||||
(load (expand-file-name "subdirs.el") t (not verbose) t))
|
||||
(or (string-prefix-p lispdir dir)
|
||||
(let ((default-directory dir))
|
||||
(load (expand-file-name "leim-list.el") t (not verbose) t)))
|
||||
(setq tail (cdr tail)))
|
||||
(load site-run-file t (not verbose)))))
|
||||
|
||||
(kill-emacs
|
||||
(pcase
|
||||
(catch 'exit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue