Improve the "try!" macro by embedding use-package
This commit is contained in:
parent
b6abd6fce9
commit
87c5b868db
|
@ -98,7 +98,12 @@ same NAME is set to t."
|
|||
|
||||
|
||||
(defmacro try! (pkg &rest details)
|
||||
"Try the PKG with the given DETAILS in the running session."
|
||||
"Try the PKG with the given DETAILS in the running session.
|
||||
|
||||
It will install the package using Nix and make it available to the current
|
||||
running session. For a persistant installation use `use!'."
|
||||
(declare (indent defun))
|
||||
|
||||
(let ((flake-dir (format "%s/share/fg42" (fg42-path)))
|
||||
(cwd (getenv "PWD")))
|
||||
(cd flake-dir)
|
||||
|
@ -107,7 +112,7 @@ same NAME is set to t."
|
|||
(out (car (string-split output "\n" t))))
|
||||
(add-emacs-vars out)
|
||||
(cd cwd)
|
||||
out)))
|
||||
`(use-package ,pkg ,@details))))
|
||||
|
||||
|
||||
(provide 'fpkg)
|
||||
|
|
Loading…
Reference in New Issue