branch: elpa/magit commit da78e8ef0d51e77923944a19ca21de460412b317 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
Use ## and seq-filter instead of --filter --- lisp/magit-apply.el | 2 +- lisp/magit-branch.el | 14 +++++++------- lisp/magit-git.el | 10 +++++----- lisp/magit-mode.el | 8 ++++---- lisp/magit-remote.el | 3 ++- lisp/magit-submodule.el | 4 ++-- 6 files changed, 21 insertions(+), 20 deletions(-) diff --git a/lisp/magit-apply.el b/lisp/magit-apply.el index 17d055c78f4..f521d950162 100644 --- a/lisp/magit-apply.el +++ b/lisp/magit-apply.el @@ -477,7 +477,7 @@ ignored) files." (defun magit-unstage-intent (files) (if-let ((staged (magit-staged-files)) - (intent (--filter (member it staged) files))) + (intent (seq-filter (##member % staged) files))) (magit-unstage-1 intent) (user-error "Already unstaged"))) diff --git a/lisp/magit-branch.el b/lisp/magit-branch.el index 11ba296fff0..2693402eec1 100644 --- a/lisp/magit-branch.el +++ b/lisp/magit-branch.el @@ -355,10 +355,10 @@ when using `magit-branch-and-checkout'." (interactive (let* ((current (magit-get-current-branch)) (local (magit-list-local-branch-names)) - (remote (--filter (and (string-match "[^/]+/" it) - (not (member (substring it (match-end 0)) - (cons "HEAD" local)))) - (magit-list-remote-branch-names))) + (remote (seq-filter (##and (string-match "[^/]+/" %) + (not (member (substring % (match-end 0)) + (cons "HEAD" local)))) + (magit-list-remote-branch-names))) (choices (nconc (delete current local) remote)) (atpoint (magit-branch-at-point)) (choice (magit-completing-read @@ -733,9 +733,9 @@ prompt is confusing." (if (= (process-exit-status process) 1) (if-let ((on-remote (mapcar (##concat "refs/remotes/" remote "/" %) (magit-remote-list-branches remote))) - (rest (--filter (and (not (member it on-remote)) - (magit-ref-exists-p it)) - refs))) + (rest (seq-filter (##and (not (member % on-remote)) + (magit-ref-exists-p %)) + refs))) (progn (process-put process 'inhibit-refresh t) (magit-process-sentinel process event) diff --git a/lisp/magit-git.el b/lisp/magit-git.el index c93df24009b..b7779c6b369 100644 --- a/lisp/magit-git.el +++ b/lisp/magit-git.el @@ -1949,8 +1949,8 @@ SORTBY is a key or list of keys to pass to the `--sort' flag of (magit-list-related-branches "--contains" commit args)) (defun magit-list-publishing-branches (&optional commit) - (--filter (magit-rev-ancestor-p (or commit "HEAD") it) - magit-published-branches)) + (seq-filter (##magit-rev-ancestor-p (or commit "HEAD") %) + magit-published-branches)) (defun magit-list-merged-branches (&optional commit &rest args) (magit-list-related-branches "--merged" commit args)) @@ -1959,9 +1959,9 @@ SORTBY is a key or list of keys to pass to the `--sort' flag of (magit-list-related-branches "--no-merged" commit args)) (defun magit-list-unmerged-to-upstream-branches () - (--filter (and-let* ((upstream (magit-get-upstream-branch it))) - (member it (magit-list-unmerged-branches upstream))) - (magit-list-local-branch-names))) + (seq-filter (##and-let* ((upstream (magit-get-upstream-branch %))) + (member % (magit-list-unmerged-branches upstream))) + (magit-list-local-branch-names))) (defun magit-list-branches-pointing-at (commit) (let ((re (format "\\`%s refs/\\(heads\\|remotes\\)/\\(.*\\)\\'" diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el index baf35f88ac4..13709ab1336 100644 --- a/lisp/magit-mode.el +++ b/lisp/magit-mode.el @@ -834,10 +834,10 @@ into thinking a buffer belongs to a repo that it doesn't.") (defun magit-mode-get-buffers () (let ((topdir (magit-toplevel))) - (--filter (with-current-buffer it - (and (derived-mode-p 'magit-mode) - (equal magit--default-directory topdir))) - (buffer-list)))) + (seq-filter (##with-current-buffer % + (and (derived-mode-p 'magit-mode) + (equal magit--default-directory topdir))) + (buffer-list)))) (defvar-local magit-buffer-locked-p nil) (put 'magit-buffer-locked-p 'permanent-local t) diff --git a/lisp/magit-remote.el b/lisp/magit-remote.el index 03df57aaa4d..0196604cd99 100644 --- a/lisp/magit-remote.el +++ b/lisp/magit-remote.el @@ -184,7 +184,8 @@ the now stale refspecs. Other stale branches are not removed." (push (cons refspec (if (string-match "\\*" ours) (let ((re (replace-match ".*" t t ours))) - (--filter (string-match-p re it) tracking-refs)) + (seq-filter (##string-match-p re %) + tracking-refs)) (list (car (member ours tracking-refs))))) stale))))) (if (not stale) diff --git a/lisp/magit-submodule.el b/lisp/magit-submodule.el index ce4c148713e..d6cb3ce4805 100644 --- a/lisp/magit-submodule.el +++ b/lisp/magit-submodule.el @@ -179,8 +179,8 @@ and also setting this variable to t will lead to tears." ("f" "Fetch modules" magit-fetch-modules)]) (defun magit-submodule-arguments (&rest filters) - (--filter (and (member it filters) it) - (transient-args 'magit-submodule))) + (seq-filter (##and (member % filters) %) + (transient-args 'magit-submodule))) (defclass magit--git-submodule-suffix (transient-suffix) ())