-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pam; mark some packages as built-in to don't install them
- Loading branch information
1 parent
66f7d5e
commit fee59f3
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
;;; my-pam.el --- My configuration of pam -*- lexical-binding: t; -*- | ||
|
||
;; Copyright (C) 2024 semenInRussia | ||
|
||
;; Author: semenInRussia <hrams205@gmail.com> | ||
;; Version: 0.1 | ||
;; Homepage: https://github.com/semeninrussia/emacs.el | ||
|
||
;;; Commentary: | ||
|
||
;; My configuration of `pam': my own small package manager built over | ||
;; `straight'. | ||
|
||
;;; Code: | ||
|
||
(require 'leaf) | ||
|
||
;; Some packages can depended on the packages which already installed | ||
;; into Emacs. (see `consult-eglot') | ||
;; | ||
;; When `straight' and `pam' install this packages it can install | ||
;; `eglot' second time. In this file I fix this problem | ||
|
||
(defvar my-built-in-packages '(eglot | ||
eldoc | ||
external-completion | ||
flymake | ||
jsonrpc | ||
project | ||
seq | ||
transient | ||
imenu | ||
xref) | ||
"List of packages which alread built-in Emacs.") | ||
|
||
(defun my-pam-mark-built-ins () | ||
"My mark all built-in packages as built-in for `straight' and `pam'." | ||
(let ((xs my-built-in-packages)) | ||
(while xs | ||
(pam-use-package `(,(car xs) | ||
:type built-in)) | ||
(setq xs (cdr xs))))) | ||
|
||
(advice-add 'pam--load-straight | ||
:around | ||
(defun my-pam-maybe-mark-built-ins (&rest args) | ||
(let ((need-p (not pam-straight-already-loaded-p))) | ||
(apply args) | ||
(and need-p | ||
(my-pam-mark-built-in))))) | ||
|
||
;;; my-pam.el ends here |