Add prelude-show-foreign-packages
This commit is contained in:
parent
239571f17b
commit
0dbb140fbd
1 changed files with 13 additions and 0 deletions
|
@ -56,6 +56,8 @@
|
|||
|
||||
(defun prelude-require-package (package)
|
||||
"Install PACKAGE unless already installed."
|
||||
(unless (memq package prelude-packages)
|
||||
(add-to-list 'prelude-packages package))
|
||||
(unless (package-installed-p package)
|
||||
(package-install package)))
|
||||
|
||||
|
@ -76,8 +78,19 @@ Missing packages are installed automatically."
|
|||
;; install the missing packages
|
||||
(prelude-require-packages prelude-packages)))
|
||||
|
||||
;; run package installation
|
||||
(prelude-install-packages)
|
||||
|
||||
(defun prelude-list-foreign-packages ()
|
||||
"Browse third-party packages not bundled with Prelude.
|
||||
|
||||
Behaves similarly to `package-list-packages', but shows only the packages that
|
||||
are installed and are not in `prelude-packages'. Useful for
|
||||
removing unwanted packages."
|
||||
(interactive)
|
||||
(package-show-package-list
|
||||
(set-difference package-activated-list prelude-packages)))
|
||||
|
||||
(defmacro prelude-auto-install (extension package mode)
|
||||
"When file with EXTENSION is opened triggers auto-install of PACKAGE.
|
||||
PACKAGE is installed only if not already present. The file is opened in MODE."
|
||||
|
|
Loading…
Reference in a new issue