[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sesman 0303d66f0e 019/100: Rename link accessors --link- -
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sesman 0303d66f0e 019/100: Rename link accessors --link- -> --lnk- to avoid naming confusion |
Date: |
Tue, 28 Dec 2021 14:05:59 -0500 (EST) |
branch: elpa/sesman
commit 0303d66f0ee95e78ff80e13aeee0335a4f960281
Author: Vitalie Spinu <spinuvit@gmail.com>
Commit: Vitalie Spinu <spinuvit@gmail.com>
Rename link accessors --link- -> --lnk- to avoid naming confusion
---
sesman.el | 38 ++++++++++++++++++--------------------
1 file changed, 18 insertions(+), 20 deletions(-)
diff --git a/sesman.el b/sesman.el
index 852db93938..c0d5c44b93 100644
--- a/sesman.el
+++ b/sesman.el
@@ -210,11 +210,11 @@ Can be either a symbol, or a function returning a
symbol.")
(defun sesman--format-link (link)
(let ((val (sesman--abbrev-path-maybe
- (sesman--link-value link))))
+ (sesman--lnk-value link))))
(format "%s(%s)->%s"
- (sesman--link-context-type link)
+ (sesman--lnk-context-type link)
(if (listp val) (cdr val) val)
- (propertize (sesman--link-session-name link) 'face 'bold))))
+ (propertize (sesman--lnk-session-name link) 'face 'bold))))
(defun sesman--ask-for-link (prompt links &optional ask-all)
(let* ((name.keys (mapcar (lambda (link)
@@ -232,18 +232,6 @@ Can be either a symbol, or a function returning a symbol.")
(t
(cdr (assoc sel name.keys))))))
-(defun sesman--link-system-name (link)
- (caar link))
-
-(defun sesman--link-session-name (link)
- (cdar link))
-
-(defun sesman--link-context-type (link)
- (cadr link))
-
-(defun sesman--link-value (link)
- (nth 2 link))
-
(defun sesman--sort-sessions (system sessions)
(seq-sort (lambda (x1 x2)
(sesman-more-relevant-p system x1 x2))
@@ -256,6 +244,16 @@ Can be either a symbol, or a function returning a symbol.")
(gethash (car x2)
sesman-sessions-hashmap)))
links))
+;; link data structure accessors
+(defun sesman--lnk-system-name (lnk)
+ (caar lnk))
+(defun sesman--lnk-session-name (lnk)
+ (cdar lnk))
+(defun sesman--lnk-context-type (lnk)
+ (cadr lnk))
+(defun sesman--lnk-value (lnk)
+ (nth 2 lnk))
+
;;; User Interface
@@ -550,8 +548,8 @@ If AS-STRING is non-nil, return an equivalent string
representation."
(out (mapcar (lambda (x) (list x))
(sesman-context-types system))))
(mapc (lambda (link)
- (let* ((type (sesman--link-context-type link))
- (val (sesman--link-value link))
+ (let* ((type (sesman--lnk-context-type link))
+ (val (sesman--lnk-value link))
(entry (assoc type out)))
(when entry
(setcdr entry (cons val (cdr entry))))))
@@ -597,10 +595,10 @@ CXT-TYPES defaults to `sesman-context-types' for current
SYSTEM."
(found))
(condition-case nil
(mapc (lambda (l)
- (when (eq system (sesman--link-system-name l))
- (let ((cxt (sesman--link-context-type l)))
+ (when (eq system (sesman--lnk-system-name l))
+ (let ((cxt (sesman--lnk-context-type l)))
(when (and (member cxt cxt-types)
- (sesman-relevant-context-p cxt
(sesman--link-value l)))
+ (sesman-relevant-context-p cxt
(sesman--lnk-value l)))
(setq found t)
(throw 'found nil)))))
sesman-links-alist)
- [nongnu] branch elpa/sesman created (now e0f555f963), ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 6aa04521eb 012/100: Add badges, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 0f6eadfb1a 004/100: Idem, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman b27755c150 003/100: Major update before cider integration, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman e83fcfd939 002/100: Add readme, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 4f52cccf26 013/100: Update readme, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman fea061de16 007/100: Add sesman menu, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman a39f0e2c1b 015/100: Add commentary, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 13f7748b9f 017/100: Rename sesman-single-link-contexts -> sesman-single-link-context-types, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 0303d66f0e 019/100: Rename link accessors --link- -> --lnk- to avoid naming confusion,
ELPA Syncer <=
- [nongnu] elpa/sesman 0f86bd3d34 021/100: Rename sesman-ensure-linked-session -> sesman-ensure-session, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 43b0c9ef2a 026/100: [Fix #4] Rename lingering sesman-ensure-linked-session, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman fb4d2784f3 025/100: Fix typo in README, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 16be56c643 032/100: Add a missing :package-version to a defcustom, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 4229e2128c 027/100: Replace a redundant let*, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 9ec1c330a6 034/100: Fix typo sesman-more-relevant-p -> sesman-more-recent-p, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman e340810e82 030/100: Refer to a few commands with the #' notation, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman ae94cee124 033/100: [Fix #3] Remove outdated links from readme and add link to CIDER implementation, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 77ca42e33c 037/100: Add tests, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman d4b8a12249 036/100: Allow prompting for context in sesman-link-with-xyz commands, ELPA Syncer, 2021/12/28