emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/sesman 0f86bd3d34 021/100: Rename sesman-ensure-linked-ses


From: ELPA Syncer
Subject: [nongnu] elpa/sesman 0f86bd3d34 021/100: Rename sesman-ensure-linked-session -> sesman-ensure-session
Date: Tue, 28 Dec 2021 14:05:59 -0500 (EST)

branch: elpa/sesman
commit 0f86bd3d34a2144e52014a4423da78d3faa7588e
Author: Vitalie Spinu <spinuvit@gmail.com>
Commit: Vitalie Spinu <spinuvit@gmail.com>

    Rename sesman-ensure-linked-session -> sesman-ensure-session
---
 sesman.el | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/sesman.el b/sesman.el
index 9fe6cc5ae7..adf3bc7d42 100644
--- a/sesman.el
+++ b/sesman.el
@@ -496,6 +496,12 @@ return a list of sessions, otherwise a single session."
 CXT-TYPES is as in `sesman-linked-sessions'."
   (car (sesman-linked-sessions system cxt-types)))
 
+(defun sesman-ensure-session (system &optional cxt-types)
+  "Get the most relevant linked session for SYSTEM or throw if none exists.
+CXT-TYPES is as in `sesman-linked-sessions'."
+  (or (car (sesman-linked-sessions system))
+      (user-error "No linked %s sessions" system)))
+
 (defun sesman-linked-sessions (system &optional cxt-types)
   "Return a list of SYSTEM sessions linked in current context.
 CXT-TYPES is a list of context types to consider.  Defaults to the
@@ -508,13 +514,6 @@ list returned from `sesman-context-types'."
               (gethash (car assoc) sesman-sessions-hashmap))
             (sesman-current-links system cxt-types))))
 
-(defun sesman-ensure-linked-session (system)
-  "Ensure that at least one SYSTEM session is linked to the current context.
-If there is at least one linked session, return the most relevant session.
-Otherwise throw an error."
-  (or (car (sesman-linked-sessions system))
-      (user-error "No %s sessions linked to current context" system)))
-
 (defun sesman-session-links (system session &optional as-string)
   "Retrieve all links for SYSTEM's SESSION from the global `SESSION-LINKS'.
 Return an alist of the form



reply via email to

[Prev in Thread] Current Thread [Next in Thread]