Skip to content

Commit

Permalink
feat(core): accept list grouped disabled packages
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Jun 22, 2023
1 parent 459981b commit e86a19a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/me-bootstrap.el
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
(advice-add
'use-package :around
(defun +use-package--check-if-disabled-a (origfn package &rest args)
(unless (memq package minemacs-disabled-packages)
(unless (+package-disabled-p package)
(add-to-list 'minemacs-configured-packages package t)
(apply origfn package args))))

Expand Down
3 changes: 3 additions & 0 deletions core/me-loaddefs.el
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,10 @@ Load environment variables from the file saved in
Add ROOTS to ignored projects, recentf, etc.
(fn &rest ROOTS)")
(autoload '+package-disabled-p "../elisp/+minemacs" "\
Is package PACKAGE disabled in `minemacs-disabled-packages'.
(fn PACKAGE)")
(autoload 'minemacs-run-build-functions "../elisp/+minemacs" "\
Run all build functions in `minemacs-build-functions'.
Expand Down
3 changes: 3 additions & 0 deletions elisp/+minemacs.el
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,9 @@ If N and M = 1, there's no benefit to using this macro over `remove-hook'.
(add-to-list 'recentf-exclude root))))

;;;###autoload
(defun +package-disabled-p (package)
"Is package PACKAGE disabled in `minemacs-disabled-packages'."
(and (memq package (apply #'append (mapcar #'ensure-list minemacs-disabled-packages))) t))

;;;###autoload
(defun minemacs-run-build-functions (&optional dont-ask-p)
Expand Down

0 comments on commit e86a19a

Please sign in to comment.