[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/magit 3deaad3d29 16/28: Use mapcan instead of cl-mapcan
From: |
Jonas Bernoulli |
Subject: |
[nongnu] elpa/magit 3deaad3d29 16/28: Use mapcan instead of cl-mapcan |
Date: |
Fri, 6 Dec 2024 17:17:04 -0500 (EST) |
branch: elpa/magit
commit 3deaad3d29a552e6cf9370dcb0b6a0e676ffb5bc
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Use mapcan instead of cl-mapcan
We used to use `cl-mapcan' to support Emacs 25, but since we require
at least version 26.1 now, we can switch to the optimized `mapcan'.
---
lisp/magit-base.el | 14 +++++++-------
lisp/magit-mode.el | 2 +-
lisp/magit-remote.el | 4 ++--
lisp/magit-repos.el | 6 +++---
lisp/magit-section.el | 14 +++++++-------
lisp/magit-tag.el | 2 +-
lisp/magit.el | 2 +-
7 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/lisp/magit-base.el b/lisp/magit-base.el
index b84f372cc0..69e1b2a3f9 100644
--- a/lisp/magit-base.el
+++ b/lisp/magit-base.el
@@ -871,10 +871,10 @@ See info node `(magit)Debugging Tools' for more
information."
#'shell-quote-argument
`(,(concat invocation-directory invocation-name)
"-Q" "--eval" "(setq debug-on-error t)"
- ,@(cl-mapcan
+ ,@(mapcan
(lambda (dir) (list "-L" dir))
(delete-dups
- (cl-mapcan
+ (mapcan
(lambda (lib)
(if-let ((path (locate-library lib)))
(list (file-name-directory path))
@@ -911,11 +911,11 @@ as STRING."
(i 0))
`(let ((,s ,string))
(let ,(save-match-data
- (cl-mapcan (lambda (sym)
- (cl-incf i)
- (and (not (eq (aref (symbol-name sym) 0) ?_))
- (list (list sym (list 'match-string i s)))))
- varlist))
+ (mapcan (lambda (sym)
+ (cl-incf i)
+ (and (not (eq (aref (symbol-name sym) 0) ?_))
+ (list (list sym (list 'match-string i s)))))
+ varlist))
,@body))))
(defun magit-delete-line ()
diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el
index 2d3370af2a..e1b47a00e9 100644
--- a/lisp/magit-mode.el
+++ b/lisp/magit-mode.el
@@ -1051,7 +1051,7 @@ Run hooks `magit-pre-refresh-hook' and
`magit-post-refresh-hook'."
(when magit-refresh-verbose
(message "Refreshing buffer `%s'..." (buffer-name)))
(let* ((buffer (current-buffer))
- (windows (cl-mapcan
+ (windows (mapcan
(lambda (window)
(with-selected-window window
(with-current-buffer buffer
diff --git a/lisp/magit-remote.el b/lisp/magit-remote.el
index 3f9aa429ba..aa218ee8ff 100644
--- a/lisp/magit-remote.el
+++ b/lisp/magit-remote.el
@@ -209,8 +209,8 @@ the now stale refspecs. Other stale branches are not
removed."
nil refs))
(magit-confirm 'prune-stale-refspecs nil
(format "Prune %%d stale refspecs and %d branches"
- (length (cl-mapcan (lambda (s) (copy-sequence (cdr s)))
- stale)))
+ (length (mapcan (lambda (s) (copy-sequence (cdr s)))
+ stale)))
nil
(mapcar (pcase-lambda (`(,refspec . ,refs))
(concat refspec "\n"
diff --git a/lisp/magit-repos.el b/lisp/magit-repos.el
index 95fbd65357..335713aa6b 100644
--- a/lisp/magit-repos.el
+++ b/lisp/magit-repos.el
@@ -502,9 +502,9 @@ instead."
(or (magit-toplevel) default-directory)))))
(defun magit-list-repos ()
- (cl-mapcan (pcase-lambda (`(,dir . ,depth))
- (magit-list-repos-1 dir depth))
- magit-repository-directories))
+ (mapcan (pcase-lambda (`(,dir . ,depth))
+ (magit-list-repos-1 dir depth))
+ magit-repository-directories))
(defun magit-list-repos-1 (directory depth)
(cond ((file-readable-p (expand-file-name ".git" directory))
diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 89c41b58b2..cd77f558df 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -2303,7 +2303,7 @@ Configuration'."
(or magit--imenu-group-types
magit--imenu-item-types)
(let ((index
- (cl-mapcan
+ (mapcan
(lambda (section)
(cond
(magit--imenu-group-types
@@ -2436,12 +2436,12 @@ with the variables' values as arguments, which were
recorded by
(format "%s%s"
(substring (symbol-name major-mode) 0 -5)
(if-let ((vars (get major-mode 'magit-bookmark-variables)))
- (cl-mapcan (lambda (var)
- (let ((val (symbol-value var)))
- (if (and val (atom val))
- (list val)
- val)))
- vars)
+ (mapcan (lambda (var)
+ (let ((val (symbol-value var)))
+ (if (and val (atom val))
+ (list val)
+ val)))
+ vars)
"")))
;;; Bitmaps
diff --git a/lisp/magit-tag.el b/lisp/magit-tag.el
index aa2647d700..1b4f282daf 100644
--- a/lisp/magit-tag.el
+++ b/lisp/magit-tag.el
@@ -226,7 +226,7 @@ a tag qualifies as a release tag."
(mapcar
#'cdr
(nreverse
- (cl-sort (cl-mapcan
+ (cl-sort (mapcan
(lambda (line)
(and (string-match " +" line)
(let ((tag (substring line 0 (match-beginning 0)))
diff --git a/lisp/magit.el b/lisp/magit.el
index b450236537..ee6d04d6a0 100644
--- a/lisp/magit.el
+++ b/lisp/magit.el
@@ -514,7 +514,7 @@ is run in the top-level directory of the current working
tree."
(defun magit-read-gpg-secret-key
(prompt &optional initial-input history predicate default)
(require 'epa)
- (let* ((keys (cl-mapcan
+ (let* ((keys (mapcan
(lambda (cert)
(and (or (not predicate)
(funcall predicate cert))
- [nongnu] elpa/magit 8a6ca692fe 14/28: magit-process-password-prompt-regexps: Add another user@host lookup, (continued)
- [nongnu] elpa/magit 8a6ca692fe 14/28: magit-process-password-prompt-regexps: Add another user@host lookup, Jonas Bernoulli, 2024/12/06
- [nongnu] elpa/magit 7adad8c8d3 28/28: Release version 4.1.3, Jonas Bernoulli, 2024/12/06
- [nongnu] elpa/magit cea06e4d4e 27/28: Bump dependencies, Jonas Bernoulli, 2024/12/06
- [nongnu] elpa/magit e52dedf07f 22/28: magit-stash-{pop, apply}: Stop after successfully installing conflict, Jonas Bernoulli, 2024/12/06
- [nongnu] elpa/magit 8cee789f7a 10/28: magit-anything-staged-p: Extend comment about Git v2.46.{0, 1} bugs, Jonas Bernoulli, 2024/12/06
- [nongnu] elpa/magit 70aa9eeee0 20/28: Update changelog, Jonas Bernoulli, 2024/12/06
- [nongnu] elpa/magit a98ebd273f 13/28: magit-process-password-auth-source: Trim docstring, Jonas Bernoulli, 2024/12/06
- [nongnu] elpa/magit 46824fb4c1 24/28: Fix typos in changelog, Jonas Bernoulli, 2024/12/06
- [nongnu] elpa/magit 089f130f73 11/28: ci: Generate statistics weekly, Jonas Bernoulli, 2024/12/06
- [nongnu] elpa/magit fed387282a 12/28: magit-submodule-populate: Support --recursive, Jonas Bernoulli, 2024/12/06
- [nongnu] elpa/magit 3deaad3d29 16/28: Use mapcan instead of cl-mapcan,
Jonas Bernoulli <=
- [nongnu] elpa/magit e8b85e43d4 23/28: magit-stash-push: Move "--" after other arguments, Jonas Bernoulli, 2024/12/06
- [nongnu] elpa/magit 908de59440 26/28: Update changelog, Jonas Bernoulli, 2024/12/06
- [nongnu] elpa/magit 961b966f9a 25/28: Require magit-process for the benefit of magit-auto-revert-mode, Jonas Bernoulli, 2024/12/06
- [nongnu] elpa/magit 621b67fc7e 15/28: magit-list-special-refnames: Cosmetics, Jonas Bernoulli, 2024/12/06
- [nongnu] elpa/magit 93a7752842 17/28: magit-bookmark-name: Cosmetics, Jonas Bernoulli, 2024/12/06
- [nongnu] elpa/magit 1e17181a21 19/28: Regenerate texi manual, Jonas Bernoulli, 2024/12/06
- [nongnu] elpa/magit 98667fa8b2 21/28: magit-stash-{pop, apply}: Copy edit documentation, Jonas Bernoulli, 2024/12/06
- [nongnu] elpa/magit 1c30bb1f9f 03/28: Use transient-scope, Jonas Bernoulli, 2024/12/06
- [nongnu] elpa/magit 49c096722d 18/28: magit-insert-untracked-files: Improve docs, Jonas Bernoulli, 2024/12/06