emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/emacsql fdd0dbec38 10/11: Use `oset' instead of `setf' and


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql fdd0dbec38 10/11: Use `oset' instead of `setf' and `slot-value'
Date: Fri, 19 Jan 2024 19:00:24 -0500 (EST)

branch: elpa/emacsql
commit fdd0dbec38d8d1089dfeadc52f4c6a901c1bd22b
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    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
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]