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

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

[nongnu] elpa/emacsql a4b4dce9a5 07/11: Use `put' instead of `setf' and


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql a4b4dce9a5 07/11: Use `put' instead of `setf' and `get'
Date: Fri, 19 Jan 2024 19:00:24 -0500 (EST)

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

    Use `put' instead of `setf' and `get'
    
    Using `setf' together with a getter, is noisier than just using
    the corresponding setter by itself.
    
    However, stick to (setf (gethash ...)...)', because the argument
    order of `puthash' is weird.
---
 emacsql-compiler.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/emacsql-compiler.el b/emacsql-compiler.el
index 691f151b7c..1c645b64b4 100644
--- a/emacsql-compiler.el
+++ b/emacsql-compiler.el
@@ -20,8 +20,8 @@
   (let ((conditions (cl-remove-duplicates
                      (append parents (list symbol 'emacsql-error 'error)))))
     `(prog1 ',symbol
-       (setf (get ',symbol 'error-conditions) ',conditions
-             (get ',symbol 'error-message) ,message))))
+       (put ',symbol 'error-conditions ',conditions)
+       (put ',symbol 'error-message ,message))))
 
 (emacsql-deferror emacsql-error () ;; parent condition for all others
   "EmacSQL had an unhandled condition")



reply via email to

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