[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sesman 5a11793697 054/100: Fix tests and checkdoc
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sesman 5a11793697 054/100: Fix tests and checkdoc |
Date: |
Tue, 28 Dec 2021 14:06:02 -0500 (EST) |
branch: elpa/sesman
commit 5a11793697b621650fbfc5f3254f8400dee85759
Author: Vitalie Spinu <spinuvit@gmail.com>
Commit: Vitalie Spinu <spinuvit@gmail.com>
Fix tests and checkdoc
---
sesman-test.el | 2 ++
sesman.el | 25 +++++++++++++------------
2 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/sesman-test.el b/sesman-test.el
index d9481de795..b080070d8c 100644
--- a/sesman-test.el
+++ b/sesman-test.el
@@ -100,6 +100,7 @@
(ert-deftest sesman-quit-test ()
(with-empty-sesman-vars
+
;; alphabetic relevance
(let ((sesman-system 'A))
(sesman-start)
@@ -110,6 +111,7 @@
(should-not (string=
(car ses)
(car (sesman-current-session 'A))))))
+
;; recency relevance
(let ((sesman-system 'B))
(sesman-start)
diff --git a/sesman.el b/sesman.el
index 7aafed6fe6..391328e104 100644
--- a/sesman.el
+++ b/sesman.el
@@ -156,8 +156,8 @@ Can be either a symbol, or a function returning a symbol.")
(sesman-context cxt-type
system)))
(sesman--all-system-sessions system 'sort)
'ask-new))))
- (sesman--link-session system session cxt-type cxt-val)
- (run-hooks 'sesman-post-command-hook))
+ (prog1 (sesman--link-session system session cxt-type cxt-val)
+ (run-hooks 'sesman-post-command-hook)))
(error (format "%s association not allowed for this system (%s)"
(capitalize cxt-name)
system)))))
@@ -308,13 +308,13 @@ If SORT is non-nil, sort in relevance order."
(interactive)
(let ((system (sesman--system)))
(message "Starting new %s session ..." system)
- (sesman-start-session system)
- (run-hooks 'sesman-post-command-hook)))
+ (prog1 (sesman-start-session system)
+ (run-hooks 'sesman-post-command-hook))))
;;;###autoload
(defun sesman-restart (&optional which)
"Restart sesman session.
- When WHICH is nil, restart the current session; when a single universal
+When WHICH is nil, restart the current session; when a single universal
argument or 'linked, restart all linked sessions; when a double universal
argument, t or 'all, restart all sessions. For programmatic use, WHICH can also
be a session or a name of the session, in which case that session is
restarted."
@@ -615,15 +615,16 @@ CXT-TYPES is as in `sesman-linked-sessions'."
(user-error "No linked %s sessions" system)))
(defvar sesman--cxt-abbrevs '(buffer "buf" project "proj" directory "dir"))
-(defun sesman-grouped-links (system session &optional sort-current-first
as-string)
+(defun sesman-grouped-links (system session &optional current-first as-string)
"Retrieve all links for SYSTEM's SESSION from the global
`sesman-links-alist'.
Return an alist of the form
((buffer buffers..)
(directory directories...)
(project projects...)).
-When `sort-current-first' is non-nil, a cons of two lists as above is returned
-with car containing links relevant in current context and cdr all other links.
-If AS-STRING is non-nil, return an equivalent string representation."
+
+When `CURRENT-FIRST' is non-nil, a cons of two lists as above is returned with
+car containing links relevant in current context and cdr all other links. If
+AS-STRING is non-nil, return an equivalent string representation."
(let* ((system (or system (sesman--system)))
(session (or session (sesman-current-session system)))
(ses-name (car session))
@@ -633,12 +634,12 @@ If AS-STRING is non-nil, return an equivalent string
representation."
(reverse)))
(out (mapcar (lambda (x) (list x))
(sesman-context-types system)))
- (out-rel (when sort-current-first
+ (out-rel (when current-first
(copy-alist out))))
(mapc (lambda (link)
(let* ((type (sesman--lnk-context-type link))
(val (sesman--lnk-value link))
- (entry (if (and sort-current-first
+ (entry (if (and current-first
(sesman-relevant-link-p link))
(assoc type out-rel)
(assoc type out))))
@@ -662,7 +663,7 @@ If AS-STRING is non-nil, return an equivalent string
representation."
(when out " | ")
(mapconcat fmt-fn out ", "))
(mapconcat fmt-fn out ", ")))
- (if sort-current-first
+ (if current-first
(cons out-rel out)
out)))))
- [nongnu] elpa/sesman 9c921699ce 090/100: Use elipsis instead of %%s for the common session name, (continued)
- [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
- [nongnu] elpa/sesman 47678331da 051/100: New semantics of sesman-session-info generic, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 5a11793697 054/100: Fix tests and checkdoc,
ELPA Syncer <=
- [nongnu] elpa/sesman 34521cd5c2 049/100: Fix buffer lookup, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 3df33018f1 089/100: Strip trailing slash in `sesman-expand-path`, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 163984c60e 059/100: Better handling of overlays and sensor, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 6b0d6e318d 062/100: New UI and API functions sesman-link-with-least-specific and sesman-link-session, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 2b5135c00a 064/100: Version 0.2.1, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 209d9966e5 008/100: Renaming, refactoring ..., ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 665721c52f 066/100: Move context faces to sesman.el and use for info display, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 5a9727ee82 072/100: Expand all paths with file-truename and cache, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 14475d8192 080/100: [Fix #10] Defalias sesman-link-session, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 53efa0a9ca 086/100: Honor sesman-follow-symlinks in path expansion and project lookup, ELPA Syncer, 2021/12/28