branch: elpa/hyperdrive commit d60f9ed3e59b18cb51ea77fbdaa84411f226cc24 Author: Joseph Turner <jos...@ushin.org> Commit: Joseph Turner <jos...@ushin.org>
Change: (h/menu-hyperdrive) Add transient binding for toggling safep --- hyperdrive-menu.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hyperdrive-menu.el b/hyperdrive-menu.el index 63b1e92657..31d4b5f974 100644 --- a/hyperdrive-menu.el +++ b/hyperdrive-menu.el @@ -276,6 +276,7 @@ ("p" h/menu-set-petname :transient t) ("n" h/menu-set-nickname :transient t :inapt-if-not (lambda () (h/writablep (h/menu--scope)))) + ("S" h/menu-mark-as-safe :transient t) ( :info (lambda () (h//format (h/menu--scope) "Domain: %D" h/raw-formats)) :if (lambda () (h/domains (h/menu--scope)))) (:info (lambda () (format "Latest version: %s" (h/latest-version (h/menu--scope))))) @@ -460,6 +461,17 @@ (h/menu--scope))) (h/set-nickname nickname hyperdrive)) +(transient-define-suffix h/menu-mark-as-safe (hyperdrive safep) + :description + (lambda () + (format "Safe: %s" + (if (alist-get 'safep (h/etc (h/menu--scope))) + (propertize "Yes" 'face 'success) + (propertize "No" 'face 'error)))) + (interactive + (list (h/menu--scope) (not (alist-get 'safep (h/etc (h/menu--scope)))))) + (h/mark-as-safe hyperdrive safep)) + ;;;; Menu Utilities (defun h/menu--scope ()