Skip to content

Commit

Permalink
Use string-join instead of mapconcat
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsius committed Jun 23, 2024
1 parent 601b3a5 commit efddd69
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions emacsql-compiler.el
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

(require 'cl-lib)

(eval-when-compile (require 'subr-x))

;;; Error symbols

(defmacro emacsql-deferror (symbol parents message)
Expand Down Expand Up @@ -507,8 +509,7 @@ Only use within `emacsql-with-params'!"
(emacsql-escape-scalar item))))
into parts
do (setq last item)
finally (cl-return
(mapconcat #'identity parts " ")))))
finally (cl-return (string-join parts " ")))))

(defun emacsql-prepare (sql)
"Expand SQL (string or sexp) into a prepared statement."
Expand Down
4 changes: 3 additions & 1 deletion emacsql-sqlite.el
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

;;; Code:

(eval-when-compile (require 'subr-x))

(require 'emacsql)
(require 'emacsql-sqlite-common)

Expand Down Expand Up @@ -153,7 +155,7 @@ If called with non-nil ERROR, signal an error on failure."
(let ((log (get-buffer-create byte-compile-log-buffer)))
(with-current-buffer log
(let ((inhibit-read-only t))
(insert (mapconcat #'identity (cons cc arguments) " ") "\n")
(insert (string-join (cons cc arguments) " ") "\n")
(let ((pos (point))
(ret (apply #'call-process cc nil (if async 0 t) t
arguments)))
Expand Down

0 comments on commit efddd69

Please sign in to comment.