[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 75c9214c35 19/19: hypb:require-package: Promp
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole 75c9214c35 19/19: hypb:require-package: Prompt user with y/n query before install pkg |
Date: |
Sun, 24 Jul 2022 16:57:39 -0400 (EDT) |
branch: externals/hyperbole
commit 75c9214c359af9fd33960f43477ceea5e170686f
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>
hypb:require-package: Prompt user with y/n query before install pkg
---
ChangeLog | 3 +++
hypb.el | 8 +++++---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0e69a0d6c8..ff3a313605 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2022-07-24 Bob Weiner <rsw@gnu.org>
+* hypb.el (hypb:require-package): Prompt user with y/n query before
+ installing a package when it is not already installed.
+
* hbut.el (ibut:at-p, ibut:create): Ensure lbl-key is always set to
name, if available, and lbl-start and lbl-end point to the text
start and end for an ibut.
diff --git a/hypb.el b/hypb.el
index c8f485a134..e3e60ad3ae 100644
--- a/hypb.el
+++ b/hypb.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 6-Oct-91 at 03:42:38
-;; Last-Mod: 17-Jul-22 at 11:38:43 by Bob Weiner
+;; Last-Mod: 24-Jul-22 at 11:41:00 by Bob Weiner
;;
;; Copyright (C) 1991-2022 Free Software Foundation, Inc.
;; See the "HY-COPY" file for license information.
@@ -602,14 +602,16 @@ that returns a replacement string."
;;;###autoload
(defun hypb:require-package (package-name)
- "Install, if necessary, and require the Emacs PACKAGE-NAME.
+ "Prompt user to install, if necessary, and require the Emacs PACKAGE-NAME.
PACKAGE-NAME may be a symbol or a string."
(when (stringp package-name)
(setq package-name (intern package-name)))
(unless (symbolp package-name)
(error "(hypb:require-package): package-name must be a symbol or string,
not '%s'" package-name))
(unless (package-installed-p package-name)
- (package-install package-name))
+ (if (y-or-n-p (format "Install package `%s' required by this command?"
package-name))
+ (package-install package-name)
+ (keyboard-quit)))
(require package-name))
(defun hypb:return-process-output (program &optional infile &rest args)
- [elpa] externals/hyperbole 80d1d2dd4c 12/19: Update tests to work with new ibut:create code, (continued)
- [elpa] externals/hyperbole 80d1d2dd4c 12/19: Update tests to work with new ibut:create code, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole c38d137510 03/19: Merge branch 'master' of hyperbole, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole e9015341c0 08/19: hypb.el: Support devdocs-lookup package, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 4860da0802 07/19: hsettings.el (hyperbole-web-search): Add flag to return search expr, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 72ca3f0041 10/19: hui-mini.el: Multi-line menu support; add To/ and Doc a-z menus, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 7a86ea33e2 09/19: Add ibut:create and allow Assist Key :help for Elisp functions, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole c517641b51 18/19: * ibut:create Ensure lbl-key is always set to name, if available, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 694f3110fd 02/19: hsys-org.el: Activate only if not at eol or eob, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole d256f195ee 11/19: Fix major issues with ibut:create but some tests still fail, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 5e6e10dd6e 13/19: elisp-compiler-msg: Add Smart Key support for ERT "Test <symbol>", ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 75c9214c35 19/19: hypb:require-package: Prompt user with y/n query before install pkg,
ELPA Syncer <=
- [elpa] externals/hyperbole dcb0b9e7aa 17/19: Merge branch 'master' of hyperbole; initial 80-col comment fixes, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole dcc51fb827 15/19: Change pushd to cd since /bin/sh does not support pushd, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 716507c51c 16/19: Fix a number of issues with ibut attribute handling, ELPA Syncer, 2022/07/24