[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ement f4cb5056db 2/4: Change: (ement-complete-session)
From: |
ELPA Syncer |
Subject: |
[elpa] externals/ement f4cb5056db 2/4: Change: (ement-complete-session) Add prompt argument |
Date: |
Thu, 22 Sep 2022 15:57:34 -0400 (EDT) |
branch: externals/ement
commit f4cb5056db50b3f855106b9301e93d02a1513ff0
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Change: (ement-complete-session) Add prompt argument
---
ement-lib.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ement-lib.el b/ement-lib.el
index e98c441b31..a80377c01f 100644
--- a/ement-lib.el
+++ b/ement-lib.el
@@ -331,12 +331,12 @@ THEN and ELSE are passed to `ement-api', which see."
:content-type content-type :data data :data-type 'binary
:then then :else else))
-(defun ement-complete-session ()
+(cl-defun ement-complete-session (&key (prompt "Session: "))
"Return an Ement session selected with completion."
(cl-etypecase (length ement-sessions)
((integer 1 1) (cdar ement-sessions))
((integer 2 *) (let* ((ids (mapcar #'car ement-sessions))
- (selected-id (completing-read "Session: " ids nil
t)))
+ (selected-id (completing-read prompt ids nil t)))
(alist-get selected-id ement-sessions nil nil #'equal)))
(otherwise (user-error "No active sessions. Call `ement-connect' to log
in"))))