diff options
| author | Bozhidar Batsov <bozhidar@batsov.dev> | 2026-02-15 00:20:35 +0200 |
|---|---|---|
| committer | Bozhidar Batsov <bozhidar@batsov.dev> | 2026-02-15 00:20:35 +0200 |
| commit | b55462304c1a9428c10b6fe7f85b26292b332ba7 (patch) | |
| tree | f28f4b4405c02ebe8e34778e35ca1d5913560569 | |
| parent | 098f4b940933b5cebd991d75cae28cdff310ea2f (diff) | |
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.
| -rw-r--r-- | projectile.el | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/projectile.el b/projectile.el index 5cd1f13..9abcd90 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." |
