predicate cookies: restrict to first 3 lines + set load-file-name
This commit is contained in:
parent
a41c651853
commit
f21c01fce2
1 changed files with 4 additions and 2 deletions
|
@ -495,8 +495,10 @@ loads MODULE SUBMODULE's packages.el file."
|
|||
"Returns the value of the ;;;###if predicate form in FILE."
|
||||
(with-temp-buffer
|
||||
(insert-file-contents-literally file nil 0 256)
|
||||
(if (re-search-forward "^;;;###if " nil t)
|
||||
(eval (sexp-at-point))
|
||||
(if (and (re-search-forward "^;;;###if " nil t)
|
||||
(<= (line-number-at-pos) 3))
|
||||
(let ((load-file-name file))
|
||||
(eval (sexp-at-point)))
|
||||
t)))
|
||||
|
||||
(defun doom-packages--async-run (fn)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue