From 3ef303fb670303571999aa5b9765ea91ad02ce56 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 14 Jun 2024 02:38:58 +0100 Subject: (Emacs/elisp)~cl-reduce -> string-join --- Emacs/.config/emacs/elisp/search.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Emacs/.config/emacs/elisp/search.el') diff --git a/Emacs/.config/emacs/elisp/search.el b/Emacs/.config/emacs/elisp/search.el index 344d92f..922d9a6 100644 --- a/Emacs/.config/emacs/elisp/search.el +++ b/Emacs/.config/emacs/elisp/search.el @@ -42,8 +42,7 @@ Returns a list of files with the directory preprended to them." names))) (defun +search/get-all-candidates () - (cl-reduce - #'(lambda (x y) (append x y)) + (string-join (mapcar #'(lambda (directory) (+search/get-candidates (expand-file-name directory))) +search/directories))) @@ -56,11 +55,11 @@ Returns a list of files with the directory preprended to them." (swiper))))) (defun +search/-format-grep-candidates () - (cl-reduce - #'(lambda (x y) (concat x " " y)) + (string-join (mapcar #'(lambda (x) (concat "\"" x "\"")) - (cl-remove-if #'directory-name-p (+search/get-all-candidates))))) + (cl-remove-if #'directory-name-p (+search/get-all-candidates))) + " ")) (defun +search/search-all () (interactive) -- cgit v1.2.3-13-gbd6f