branch: elpa/emacsql
commit fdd0dbec38d8d1089dfeadc52f4c6a901c1bd22b
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
Use `oset' instead of `setf' and `slot-value'
---
emacsql.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/emacsql.el b/emacsql.el
index 755e985c60..16c75bd291 100644
--- a/emacsql.el
+++ b/emacsql.el
@@ -260,9 +260,9 @@ specific error conditions."
(defun emacsql-register (connection)
"Register CONNECTION for automatic cleanup and return CONNECTION."
- (let ((finalizer (make-finalizer (lambda () (emacsql-close connection)))))
- (prog1 connection
- (setf (slot-value connection 'finalizer) finalizer))))
+ (prog1 connection
+ (oset connection finalizer
+ (make-finalizer (lambda () (emacsql-close connection))))))
;;; Useful macros