[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit c9fad8b58e 10/15: Use mapcar and delq instead o
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/git-commit c9fad8b58e 10/15: Use mapcar and delq instead of -keep |
Date: |
Mon, 31 Jul 2023 10:00:21 -0400 (EDT) |
branch: elpa/git-commit
commit c9fad8b58e84b624285ea5ec209bcb89759a5ba4
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Use mapcar and delq instead of -keep
---
lisp/magit-git.el | 31 ++++++++++++++++---------------
lisp/magit-refs.el | 14 +++++++-------
lisp/magit-submodule.el | 9 +++++++--
3 files changed, 30 insertions(+), 24 deletions(-)
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index aacdf6ffa5..cfff36543b 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -2357,21 +2357,22 @@ and this option only controls what face is used.")
(magit-branch-remote (push name remotes))
(t (push name other)))))
(setq remotes
- (-keep
- (lambda (name)
- (if (string-match "\\`\\([^/]*\\)/\\(.*\\)\\'" name)
- (let ((r (match-string 1 name))
- (b (match-string 2 name)))
- (and (not (equal b "HEAD"))
- (if (equal (concat "refs/remotes/" name)
- (magit-git-string
- "symbolic-ref"
- (format "refs/remotes/%s/HEAD" r)))
- (magit--propertize-face
- name 'magit-branch-remote-head)
- name)))
- name))
- remotes))
+ (delq nil
+ (mapcar
+ (lambda (name)
+ (if (string-match "\\`\\([^/]*\\)/\\(.*\\)\\'" name)
+ (let ((r (match-string 1 name))
+ (b (match-string 2 name)))
+ (and (not (equal b "HEAD"))
+ (if (equal (concat "refs/remotes/" name)
+ (magit-git-string
+ "symbolic-ref"
+ (format "refs/remotes/%s/HEAD"
r)))
+ (magit--propertize-face
+ name 'magit-branch-remote-head)
+ name)))
+ name))
+ remotes)))
(let* ((current (magit-get-current-branch))
(target (magit-get-upstream-branch current)))
(dolist (name branches)
diff --git a/lisp/magit-refs.el b/lisp/magit-refs.el
index 8073b66952..e4b31c826d 100644
--- a/lisp/magit-refs.el
+++ b/lisp/magit-refs.el
@@ -622,17 +622,17 @@ line is inserted at all."
(magit-make-margin-overlay nil t)))
(defun magit-refs--format-local-branches ()
- (let ((lines (-keep #'magit-refs--format-local-branch
- (magit-git-lines
- "for-each-ref"
- (concat "--format=\
+ (let ((lines (delq nil (mapcar #'magit-refs--format-local-branch
+ (magit-git-lines
+ "for-each-ref"
+ (concat "--format=\
%(HEAD)%00%(refname:short)%00%(refname)%00\
%(upstream:short)%00%(upstream)%00%(upstream:track)%00"
- (if magit-refs-show-push-remote "\
+ (if magit-refs-show-push-remote "\
%(push:remotename)%00%(push)%00%(push:track)%00%(subject)"
"%00%00%00%(subject)"))
- "refs/heads"
- magit-buffer-arguments))))
+ "refs/heads"
+ magit-buffer-arguments)))))
(unless (magit-get-current-branch)
(push (magit-refs--format-local-branch
(concat "*\0\0\0\0\0\0\0\0" (magit-rev-format "%s")))
diff --git a/lisp/magit-submodule.el b/lisp/magit-submodule.el
index e640528169..13288040fd 100644
--- a/lisp/magit-submodule.el
+++ b/lisp/magit-submodule.el
@@ -658,7 +658,12 @@ These sections can be expanded to show the respective
commits."
(defun magit-submodule-list-refresh ()
(setq tabulated-list-entries
- (-keep (lambda (module)
+ ;; Backport version 2.23 of seq lacks seq-keep. Once that is
+ ;; available trace this commment to find more instances where
+ ;; it should be used.
+ (delq nil
+ (mapcar
+ (lambda (module)
(let ((default-directory
(expand-file-name (file-name-as-directory module))))
(and (file-exists-p ".git")
@@ -673,7 +678,7 @@ These sections can be expanded to show the respective
commits."
,@props))
""))
magit-repolist-columns))))))
- (magit-list-module-paths)))
+ (magit-list-module-paths))))
(message "Listing submodules...")
(tabulated-list-init-header)
(tabulated-list-print t)
- [nongnu] elpa/git-commit updated (decd5f40dd -> 95d5be9ac3), ELPA Syncer, 2023/07/31
- [nongnu] elpa/git-commit 2b82fc2afc 01/15: Use cl-set-difference instead of -difference, ELPA Syncer, 2023/07/31
- [nongnu] elpa/git-commit da23111429 06/15: Use seq-remove instead of -remove-first, ELPA Syncer, 2023/07/31
- [nongnu] elpa/git-commit e8d4674fd7 08/15: Use seq-find instead of -first, ELPA Syncer, 2023/07/31
- [nongnu] elpa/git-commit 3029f64b4a 05/15: Use seq-remove instead of -remove, ELPA Syncer, 2023/07/31
- [nongnu] elpa/git-commit 488ed2ad58 04/15: Use seq-filter instead of -filter, ELPA Syncer, 2023/07/31
- [nongnu] elpa/git-commit a6f9c78374 11/15: Use seq-take and seq-drop instead of -split-at, ELPA Syncer, 2023/07/31
- [nongnu] elpa/git-commit a5ca96edcd 02/15: Use cl-union instead of -union, ELPA Syncer, 2023/07/31
- [nongnu] elpa/git-commit 82408757b0 03/15: Use seq-map-indexed instead of -map-indexed, ELPA Syncer, 2023/07/31
- [nongnu] elpa/git-commit c9fad8b58e 10/15: Use mapcar and delq instead of -keep,
ELPA Syncer <=
- [nongnu] elpa/git-commit bbb0afb516 13/15: No longer use -separate, ELPA Syncer, 2023/07/31
- [nongnu] elpa/git-commit 87afefca87 14/15: No longer use -none-p, ELPA Syncer, 2023/07/31
- [nongnu] elpa/git-commit 95d5be9ac3 15/15: No longer use certain obscure dash functions, ELPA Syncer, 2023/07/31
- [nongnu] elpa/git-commit dcbef90475 09/15: Use seq-some instead of -some, ELPA Syncer, 2023/07/31
- [nongnu] elpa/git-commit 8a8ac32def 12/15: magit--transient-args-and-files: New function, ELPA Syncer, 2023/07/31
- [nongnu] elpa/git-commit ecccdfa3a4 07/15: Use cl-substitute instead of -replace, ELPA Syncer, 2023/07/31