[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/leaf 61365188be 02/28: Merge pull request #505 from gks
From: |
ELPA Syncer |
Subject: |
[elpa] externals/leaf 61365188be 02/28: Merge pull request #505 from gksato/feature#504-package-save-selected |
Date: |
Wed, 19 Jan 2022 18:58:35 -0500 (EST) |
branch: externals/leaf
commit 61365188be30c34c0e8b6f2004488e60a83dfcd6
Merge: 0ccc52bb85 1f51e90e99
Author: Naoya Yamashita <conao3@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #505 from gksato/feature#504-package-save-selected
On :package, save already installed pkgs into selected-packages
---
README.md | 10 ++++++----
README.org | 10 ++++++----
leaf-tests.el | 10 ++++++----
leaf.el | 6 ++++--
4 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/README.md b/README.md
index abaa2f29b0..0bbdd99c3d 100644
--- a/README.md
+++ b/README.md
@@ -396,11 +396,13 @@ Since `:ensure` is to use `package.el` by default,
`:ensure` and `:package` prod
(prog1 'macrostep
(leaf-handler-package macrostep macrostep nil)))
- ;; `leaf-handler-package' expandion example.
- ;; If `macrostep' isn't installed, try to install.
- ;; If fail install, update local cache and retry to install.
+ ;; `leaf-handler-package' expansion example.
+ ;; If `macrostep' is installed, set it as a selected package;
+ ;; otherwise try to install it.
+ ;; If installation fails, update local cache and retry to install.
((leaf-handler-package macrostep macrostep nil)
- (unless (package-installed-p 'macrostep)
+ (if (package-installed-p 'macrostep)
+ (package--update-selected-packages '(macrostep) nil)
(unless (assoc 'macrostep package-archive-contents)
(package-refresh-contents))
(condition-case err
diff --git a/README.org b/README.org
index 251288f56e..6d4a49bf2c 100644
--- a/README.org
+++ b/README.org
@@ -414,11 +414,13 @@ Since ~:ensure~ is to use ~package.el~ by default,
~:ensure~ and
(prog1 'macrostep
(leaf-handler-package macrostep macrostep nil)))
- ;; `leaf-handler-package' expandion example.
- ;; If `macrostep' isn't installed, try to install.
- ;; If fail install, update local cache and retry to install.
+ ;; `leaf-handler-package' expansion example.
+ ;; If `macrostep' is installed, set it as a selected package;
+ ;; otherwise try to install it.
+ ;; If installation fails, update local cache and retry to install.
((leaf-handler-package macrostep macrostep nil)
- (unless (package-installed-p 'macrostep)
+ (if (package-installed-p 'macrostep)
+ (package--update-selected-packages '(macrostep) nil)
(unless (assoc 'macrostep package-archive-contents)
(package-refresh-contents))
(condition-case err
diff --git a/leaf-tests.el b/leaf-tests.el
index 3fb5534298..86bf79fdec 100644
--- a/leaf-tests.el
+++ b/leaf-tests.el
@@ -2385,11 +2385,13 @@ Example:
(prog1 'macrostep
(leaf-handler-package macrostep macrostep nil)))
- ;; `leaf-handler-package' expandion example.
- ;; If `macrostep' isn't installed, try to install.
- ;; If fail install, update local cache and retry to install.
+ ;; `leaf-handler-package' expansion example.
+ ;; If `macrostep' is installed, set it as a selected package;
+ ;; otherwise try to install it.
+ ;; If installation fails, update local cache and retry to install.
((leaf-handler-package macrostep macrostep nil)
- (unless (package-installed-p 'macrostep)
+ (if (package-installed-p 'macrostep)
+ (package--update-selected-packages '(macrostep) nil)
(unless (assoc 'macrostep package-archive-contents)
(package-refresh-contents))
(condition-case _err
diff --git a/leaf.el b/leaf.el
index 49937269c9..1f579f84c1 100644
--- a/leaf.el
+++ b/leaf.el
@@ -1074,8 +1074,10 @@ FN also accept list of FN."
(add-to-list 'leaf--paths (cons ',name file)))))
(defmacro leaf-handler-package (name pkg _pin)
- "Handler ensure PKG via PIN in NAME leaf block."
- `(unless (package-installed-p ',pkg)
+ "Handler for ensuring the installation of PKG with package.el
+via PIN in the leaf block NAME."
+ `(if (package-installed-p ',pkg)
+ (package--update-selected-packages '(,pkg) nil)
(unless (assoc ',pkg package-archive-contents)
(package-refresh-contents))
(condition-case _err
- [elpa] externals/leaf d314af8e9f 26/28: Merge pull request #521 from lorniu/master, (continued)
- [elpa] externals/leaf d314af8e9f 26/28: Merge pull request #521 from lorniu/master, ELPA Syncer, 2022/01/19
- [elpa] externals/leaf 7460e3c5eb 11/28: Merge pull request #518 from conao3/test, ELPA Syncer, 2022/01/19
- [elpa] externals/leaf 2d395ee3d4 24/28: Merge pull request #525 from conao3/warn-after-keyword, ELPA Syncer, 2022/01/19
- [elpa] externals/leaf 5ac6ae61e1 04/28: leaf-keys use the BIND-KEYMAP-PKG ranther than :package's value, when 'bind-keymap being non-nil., ELPA Syncer, 2022/01/19
- [elpa] externals/leaf 5469c1b5cf 03/28: Bugfix: leaf-keys-bind-keymap*'s error: number of arguments., ELPA Syncer, 2022/01/19
- [elpa] externals/leaf 9d79978574 05/28: Merge pull request #509 from meziberry/p/leaf-keys-bind-keymap-asterisk, ELPA Syncer, 2022/01/19
- [elpa] externals/leaf 749593adae 08/28: tagged v4.5.3, ELPA Syncer, 2022/01/19
- [elpa] externals/leaf 7cc38f9739 23/28: tagged v4.5.5, ELPA Syncer, 2022/01/19
- [elpa] externals/leaf d732e4b88c 07/28: use just `push` instead of using `package--update-selected-packages`, ELPA Syncer, 2022/01/19
- [elpa] externals/leaf e800a2288e 16/28: transform nil into (), ELPA Syncer, 2022/01/19
- [elpa] externals/leaf 61365188be 02/28: Merge pull request #505 from gksato/feature#504-package-save-selected,
ELPA Syncer <=
- [elpa] externals/leaf 3a6b31f737 10/28: run test also on Emacs-27.2, ELPA Syncer, 2022/01/19
- [elpa] externals/leaf 8418473614 14/28: transform nil to (), ELPA Syncer, 2022/01/19
- [elpa] externals/leaf 8b5bbac137 06/28: Merge pull request #512 from meziberry/p/leaf-keys, ELPA Syncer, 2022/01/19
- [elpa] externals/leaf 91f7ba756c 18/28: tagged v4.5.4, ELPA Syncer, 2022/01/19
- [elpa] externals/leaf 097cb1d2fd 25/28: Remove extra quote before (lambda) generated by `leaf-key`., ELPA Syncer, 2022/01/19
- [elpa] externals/leaf 81ba02fb43 17/28: add lambda bind pattern to README, ELPA Syncer, 2022/01/19
- [elpa] externals/leaf 9eb18e8c9c 28/28: Merge pull request #526 from lorniu/minor-mode, ELPA Syncer, 2022/01/19
- [elpa] externals/leaf 7d5e17e41d 09/28: Merge pull request #517 from conao3/fix-custom, ELPA Syncer, 2022/01/19
- [elpa] externals/leaf 0a698d240e 21/28: Merge pull request #519 from Nyoho/fix/typo, ELPA Syncer, 2022/01/19