branch: elpa/projectile
commit b55462304c1a9428c10b6fe7f85b26292b332ba7
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>

    Revert seq-keep usage; not available via compat on Emacs 27
    
    seq-keep was added in Emacs 29.1 and is not provided by the compat
    package.  Revert to (delq nil (mapcar ...)) which works on all
    supported Emacs versions.
---
 projectile.el | 41 +++++++++++++++++++++--------------------
 1 file changed, 21 insertions(+), 20 deletions(-)

diff --git a/projectile.el b/projectile.el
index 5cd1f13b51..9abcd90d34 100644
--- a/projectile.el
+++ b/projectile.el
@@ -1919,10 +1919,10 @@ With a prefix argument, show NLINES of context."
 
 (defun projectile-normalise-paths (patterns)
   "Remove leading `/' from the elements of PATTERNS."
-  (seq-keep (lambda (pat) (and (string-prefix-p "/" pat)
-                               ;; remove the leading /
-                               (substring pat 1)))
-             patterns))
+  (delq nil (mapcar (lambda (pat) (and (string-prefix-p "/" pat)
+                                       ;; remove the leading /
+                                       (substring pat 1)))
+                    patterns)))
 
 (defun projectile-expand-paths (paths)
   "Expand the elements of PATHS.
@@ -4348,16 +4348,16 @@ which it shares its arglist."
                  " -path "
                  (mapconcat
                   #'identity
-                  (seq-keep (lambda (ignore)
-                              (cond ((stringp ignore)
-                                     (shell-quote-argument
-                                      (concat "*/" ignore)))
-                                    ((consp ignore)
-                                     (and (funcall (car ignore) dir)
-                                          (shell-quote-argument
-                                           (concat "*/"
-                                                   (cdr ignore)))))))
-                            grep-find-ignored-directories)
+                  (delq nil (mapcar (lambda (ignore)
+                                      (cond ((stringp ignore)
+                                             (shell-quote-argument
+                                              (concat "*/" ignore)))
+                                            ((consp ignore)
+                                             (and (funcall (car ignore) dir)
+                                                  (shell-quote-argument
+                                                   (concat "*/"
+                                                           (cdr ignore)))))))
+                                    grep-find-ignored-directories))
                   " -o -path ")
                  " "
                  (shell-quote-argument ")")
@@ -5619,12 +5619,13 @@ directories."
   "Return a list of all open projects.
 An open project is a project with any open buffers."
   (seq-uniq
-   (seq-keep (lambda (buffer)
-               (with-current-buffer buffer
-                 (when-let* ((project-root (projectile-project-root)))
-                   (when (projectile-project-buffer-p buffer project-root)
-                     (abbreviate-file-name project-root)))))
-             (buffer-list))))
+   (delq nil
+         (mapcar (lambda (buffer)
+                   (with-current-buffer buffer
+                     (when-let* ((project-root (projectile-project-root)))
+                       (when (projectile-project-buffer-p buffer project-root)
+                         (abbreviate-file-name project-root)))))
+                 (buffer-list)))))
 
 (defun projectile--remove-current-project (projects)
   "Remove the current project (if any) from the list of PROJECTS."

Reply via email to