Skip to content

Commit

Permalink
fix(cli): don't load subdirs.el again
Browse files Browse the repository at this point in the history
Doom loaded subdirs.el's in `load-path`, but doesn't need to. This
normally wasn't an issue because subdirs.el files are typically
idempotent, but there is one case where it isn't: on nixpkgs, with
certain configurations on top of programs.emacs (see
NixOS/nixpkgs#267548), which will cause file-missing errors trying to
load the user's site-lisp afterwards (see #7681).

Ref: NixOS/nixpkgs#267548
Fix: #7681
Amend: 6c0b7e1
  • Loading branch information
hlissner committed Sep 1, 2024
1 parent 086aed3 commit 2bc6dd2
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions lisp/doom-cli.el
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,9 @@
;; information to the user, like deprecation notices, file-loaded messages,
;; and linter warnings. With this, that output is suppressed.
(quiet!
(require 'cl nil t)
(unless site-run-file
(let ((site-run-file "site-start")
(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 inhibit-message t))
(unless (string-prefix-p lispdir dir)
(let ((default-directory dir))
(load (expand-file-name "leim-list.el") t inhibit-message t)))
(setq tail (cdr tail)))
(require 'cl nil t) ; "Package cl is deprecated"
(unless site-run-file ; unset in doom.el
(when-let ((site-run-file (get 'site-run-file 'initial-value)))
(load site-run-file t inhibit-message))))

(setq-default
Expand Down

0 comments on commit 2bc6dd2

Please sign in to comment.