(Emacs/elisp)~cl-reduce -> string-join
This commit is contained in:
@@ -60,9 +60,7 @@ urls)."
|
|||||||
(cons
|
(cons
|
||||||
(format "%s %s" name
|
(format "%s %s" name
|
||||||
(substring-no-properties
|
(substring-no-properties
|
||||||
(cl-reduce #'(lambda (x y) (concat x ":" y))
|
(string-join tags ":")))
|
||||||
tags
|
|
||||||
:initial-value "")))
|
|
||||||
url)))
|
url)))
|
||||||
|
|
||||||
(defvar +bookmark/--cache nil
|
(defvar +bookmark/--cache nil
|
||||||
|
|||||||
@@ -42,8 +42,7 @@ Returns a list of files with the directory preprended to them."
|
|||||||
names)))
|
names)))
|
||||||
|
|
||||||
(defun +search/get-all-candidates ()
|
(defun +search/get-all-candidates ()
|
||||||
(cl-reduce
|
(string-join
|
||||||
#'(lambda (x y) (append x y))
|
|
||||||
(mapcar #'(lambda (directory)
|
(mapcar #'(lambda (directory)
|
||||||
(+search/get-candidates (expand-file-name directory)))
|
(+search/get-candidates (expand-file-name directory)))
|
||||||
+search/directories)))
|
+search/directories)))
|
||||||
@@ -56,11 +55,11 @@ Returns a list of files with the directory preprended to them."
|
|||||||
(swiper)))))
|
(swiper)))))
|
||||||
|
|
||||||
(defun +search/-format-grep-candidates ()
|
(defun +search/-format-grep-candidates ()
|
||||||
(cl-reduce
|
(string-join
|
||||||
#'(lambda (x y) (concat x " " y))
|
|
||||||
(mapcar
|
(mapcar
|
||||||
#'(lambda (x) (concat "\"" x "\""))
|
#'(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 ()
|
(defun +search/search-all ()
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|||||||
Reference in New Issue
Block a user