[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sesman 1a6c5448cb 081/100: Don't use deleted sesman-connec
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sesman 1a6c5448cb 081/100: Don't use deleted sesman-connected-p |
Date: |
Tue, 28 Dec 2021 14:06:04 -0500 (EST) |
branch: elpa/sesman
commit 1a6c5448cbcab6320570ca17a04b7487cdae0bd5
Author: Vitalie Spinu <spinuvit@gmail.com>
Commit: Vitalie Spinu <spinuvit@gmail.com>
Don't use deleted sesman-connected-p
---
sesman.el | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/sesman.el b/sesman.el
index d1dfc9ccc2..7b8ffc3c31 100644
--- a/sesman.el
+++ b/sesman.el
@@ -498,14 +498,14 @@ buffer."
["Show Session Info" sesman-info]
"--"
["Start" sesman-start]
- ["Restart" sesman-restart :active (sesman-connected-p)]
- ["Quit" sesman-quit :active (sesman-connected-p)]
+ ["Restart" sesman-restart :active (sesman-current-session
(sesman--system))]
+ ["Quit" sesman-quit :active (sesman-current-session (sesman--system))]
"--"
- ["Link with Buffer" sesman-link-with-buffer :active (sesman-connected-p)]
- ["Link with Directory" sesman-link-with-directory :active
(sesman-connected-p)]
- ["Link with Project" sesman-link-with-project :active (sesman-connected-p)]
+ ["Link with Buffer" sesman-link-with-buffer :active
(sesman-current-session (sesman--system))]
+ ["Link with Directory" sesman-link-with-directory :active
(sesman-current-session (sesman--system))]
+ ["Link with Project" sesman-link-with-project :active
(sesman-current-session (sesman--system))]
"--"
- ["Unlink" sesman-unlink :active (sesman-connected-p)])
+ ["Unlink" sesman-unlink :active (sesman-current-session (sesman--system))])
"Sesman Menu.")
(defun sesman-install-menu (map)
@@ -608,6 +608,18 @@ types to consider. Defaults to the list returned from
`sesman-context-types'."
(sesman--friendly-sessions system 'sort)))
(sesman--linked-sessions system 'sort cxt-types)))
+(defun sesman-current-session (system &optional cxt-types)
+ "Get the most relevant current session for the SYSTEM.
+CXT-TYPES is a list of context types to consider."
+ (or (car (sesman--linked-sessions system 'sort cxt-types))
+ (car (sesman--friendly-sessions system 'sort))))
+
+(defun sesman-ensure-session (system &optional cxt-types)
+ "Get the most relevant linked session for SYSTEM or throw if none exists.
+CXT-TYPES is a list of context types to consider."
+ (or (sesman-current-session system cxt-types)
+ (user-error "No linked %s sessions" system)))
+
(defun sesman-has-sessions-p (system)
"Return t if there is at least one session registered with SYSTEM."
(let ((system (or system (sesman--system)))
@@ -659,18 +671,6 @@ return a list of sessions, otherwise a single session."
(ses (assoc sym sessions)))
(if ask-all (list ses) ses))))))
-(defun sesman-current-session (system &optional cxt-types)
- "Get the most relevant current session for the SYSTEM.
-CXT-TYPES is a list of context types to consider."
- (or (car (sesman--linked-sessions system 'sort cxt-types))
- (car (sesman--friendly-sessions system 'sort))))
-
-(defun sesman-ensure-session (system &optional cxt-types)
- "Get the most relevant linked session for SYSTEM or throw if none exists.
-CXT-TYPES is a list of context types to consider."
- (or (sesman-current-session system cxt-types)
- (user-error "No linked %s sessions" system)))
-
(defvar sesman--cxt-abbrevs '(buffer "buf" project "proj" directory "dir"))
(defun sesman--format-context (cxt-type cxt-val extra-face)
(let* ((face (intern (format "sesman-%s-face" cxt-type)))
- [nongnu] elpa/sesman 8f2784a4ba 001/100: Initial commit, (continued)
- [nongnu] elpa/sesman 8f2784a4ba 001/100: Initial commit, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 7987deb2c4 011/100: Makefile, tests, travis, checkdoc, .dir-locals, .gitignore etc., ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman b839a2379a 005/100: More bulk updates, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 27bd3bf457 020/100: Remove disambiguation defcustom and simplify sesman-ensure-linked-session, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman df5a081689 029/100: Fix a fixme :-), ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 5fc5934b5f 044/100: Extend semantics of 'which' argument in interactive commands, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman b8a1cdd20e 056/100: Add lint target for convenience, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 779c034180 082/100: Update doc of the sesman-project generic, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 81a2136489 078/100: New SORT argument to sesman-current-links, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 083cf73f3f 079/100: Version 0.3.2, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 1a6c5448cb 081/100: Don't use deleted sesman-connected-p,
ELPA Syncer <=
- [nongnu] elpa/sesman 3a08e3e7de 085/100: Bump dev version, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 9c921699ce 090/100: Use elipsis instead of %%s for the common session name, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 90974f9fcf 092/100: Update README: sesman-kill* -> sesman-quit*, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 2a1a9a4ccf 087/100: Promote sesman-expand-path into public API, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman e8bfb0e379 091/100: Convert buffers to strings during formatting, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman fe92090cb6 099/100: Reformulate sesman-unlink docs, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 16fb6eca09 016/100: Fix package-lint issues, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman cdb8e0973a 018/100: Port back from CIDER, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman d8f293ff6e 024/100: Fix MELPA badge link, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman ea2e4fa0fe 039/100: Propagate system through `sesman-context`, ELPA Syncer, 2021/12/28