[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/emacsql 1b8297b671 06/11: Use `setq' instead of `setf'
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/emacsql 1b8297b671 06/11: Use `setq' instead of `setf' |
Date: |
Fri, 19 Jan 2024 19:00:24 -0500 (EST) |
branch: elpa/emacsql
commit 1b8297b671a6e9df9554df5f62d7e0748a2200dd
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Use `setq' instead of `setf'
Generalized variables and `setf' are cool, but using this macro for
a regular variables means that one cannot immediately know that it
is not a generalized variable.
---
emacsql-compiler.el | 8 ++++----
emacsql-mysql.el | 2 +-
emacsql-psql.el | 4 ++--
emacsql.el | 6 +++---
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/emacsql-compiler.el b/emacsql-compiler.el
index f74ed77e5e..691f151b7c 100644
--- a/emacsql-compiler.el
+++ b/emacsql-compiler.el
@@ -264,7 +264,7 @@ Only use within `emacsql-with-params'!"
(emacsql-escape-scalar thing))))
(prog1 (if (eq (cdr param) :schema) "(%s)" "%s")
(check param)
- (setf emacsql--vars (nconc emacsql--vars (list param))))))))
+ (setq emacsql--vars (nconc emacsql--vars (list param))))))))
(defun emacsql--*vector (vector)
"Prepare VECTOR."
@@ -358,7 +358,7 @@ to create an SQL expression."
((and (eq arity :binary) (>= argument-count 2))
(let ((result (reverse expr)))
(dotimes (_ (- argument-count 2))
- (setf result (nconc (reverse expr) (cdr result))))
+ (setq result (nconc (reverse expr) (cdr result))))
(to-format-string (nreverse result))))
(t (emacsql-error "Wrong number of operands for %s" op))))))
@@ -465,7 +465,7 @@ string returned is wrapped with parentheses."
"Append parameters from PREPARED to `emacsql--vars', return the string.
Only use within `emacsql-with-params'!"
(cl-destructuring-bind (string . vars) prepared
- (setf emacsql--vars (nconc emacsql--vars vars))
+ (setq emacsql--vars (nconc emacsql--vars vars))
string))
(defun emacsql-prepare--string (string)
@@ -505,7 +505,7 @@ Only use within `emacsql-with-params'!"
(emacsql-escape-format
(emacsql-escape-scalar item))))
into parts
- do (setf last item)
+ do (setq last item)
finally (cl-return
(mapconcat #'identity parts " ")))))
diff --git a/emacsql-mysql.el b/emacsql-mysql.el
index 629b3b862c..3fbd2870c6 100644
--- a/emacsql-mysql.el
+++ b/emacsql-mysql.el
@@ -126,7 +126,7 @@ http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html")
collect (read) into row
when (looking-at "\n")
collect row into rows
- and do (setf row ())
+ and do (setq row ())
and do (forward-char)
finally (cl-return rows)))))
diff --git a/emacsql-psql.el b/emacsql-psql.el
index ab0e1da3cb..37b23d879a 100644
--- a/emacsql-psql.el
+++ b/emacsql-psql.el
@@ -77,7 +77,7 @@
http://www.postgresql.org/docs/7.3/static/sql-keywords-appendix.html")
(when hostname
(push "-h" args)
(push hostname args))
- (setf args (nreverse args))
+ (setq args (nreverse args))
(let* ((buffer (generate-new-buffer " *emacsql-psql*"))
(psql emacsql-psql-executable)
(command (mapconcat #'shell-quote-argument (cons psql args) " "))
@@ -139,7 +139,7 @@
http://www.postgresql.org/docs/7.3/static/sql-keywords-appendix.html")
collect (read) into row
when (looking-at "\n")
collect row into rows
- and do (progn (forward-char 1) (setf row ()))
+ and do (progn (forward-char 1) (setq row ()))
finally (cl-return rows)))))
(provide 'emacsql-psql)
diff --git a/emacsql.el b/emacsql.el
index 9eb9c7002f..4a1c3a155f 100644
--- a/emacsql.el
+++ b/emacsql.el
@@ -303,10 +303,10 @@ multiple times before the changes are committed."
(when (= 1 emacsql--transaction-level)
(emacsql emacsql--connection [:begin]))
(let ((result (progn ,@body)))
- (setf emacsql--result result)
+ (setq emacsql--result result)
(when (= 1 emacsql--transaction-level)
(emacsql emacsql--connection [:commit]))
- (setf emacsql--completed t)))
+ (setq emacsql--completed t)))
(emacsql-locked (emacsql emacsql--connection [:rollback])
(sleep-for 0.05))))
(when (and (= 1 emacsql--transaction-level)
@@ -355,7 +355,7 @@ Each column must be a plain symbol, no expressions allowed
here."
`(let ((emacsql--results (emacsql ,connection ,sql ,@args))
(emacsql--final nil))
(dolist (emacsql--result emacsql--results emacsql--final)
- (setf emacsql--final
+ (setq emacsql--final
(cl-destructuring-bind ,(cl-coerce vars 'list) emacsql--result
,@body)))))))
- [nongnu] elpa/emacsql updated (e2b2df570d -> ffd501a588), ELPA Syncer, 2024/01/19
- [nongnu] elpa/emacsql ce25410db4 03/11: Update cl-flet indentation, ELPA Syncer, 2024/01/19
- [nongnu] elpa/emacsql 1bea33bd45 04/11: test: Fix indentation, ELPA Syncer, 2024/01/19
- [nongnu] elpa/emacsql 8be75b66b1 05/11: Use `and' instead of `when' if value matters, ELPA Syncer, 2024/01/19
- [nongnu] elpa/emacsql 1b8297b671 06/11: Use `setq' instead of `setf',
ELPA Syncer <=
- [nongnu] elpa/emacsql a4b4dce9a5 07/11: Use `put' instead of `setf' and `get', ELPA Syncer, 2024/01/19
- [nongnu] elpa/emacsql 777abb9e9e 09/11: Use `oref' instead of `slot-value', ELPA Syncer, 2024/01/19
- [nongnu] elpa/emacsql ffd501a588 11/11: Newline cosmetics, ELPA Syncer, 2024/01/19
- [nongnu] elpa/emacsql 3ec2c96e58 02/11: emacsql-log-buffer: Deprecate this accessor for log-buffer slot, ELPA Syncer, 2024/01/19
- [nongnu] elpa/emacsql 49b9858683 01/11: Change case of EmacSQL in deprecation warning, ELPA Syncer, 2024/01/19
- [nongnu] elpa/emacsql dacc764567 08/11: Use `oref' instead of `eieio-oref', ELPA Syncer, 2024/01/19
- [nongnu] elpa/emacsql fdd0dbec38 10/11: Use `oset' instead of `setf' and `slot-value', ELPA Syncer, 2024/01/19