[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/emacsql f58cdd1ebe 1/2: emacsql-log-buffer: Also deprecate
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/emacsql f58cdd1ebe 1/2: emacsql-log-buffer: Also deprecate as generalized variable |
Date: |
Tue, 23 Jan 2024 12:59:32 -0500 (EST) |
branch: elpa/emacsql
commit f58cdd1ebe892b3c5f79096e9e458133e989449f
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
emacsql-log-buffer: Also deprecate as generalized variable
Defining this obsolete accessor outside of `defclass' also means
that we can suppress the warning about it being obsolete, while
doing so.
---
emacsql.el | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/emacsql.el b/emacsql.el
index 16c75bd291..be3acc4570 100644
--- a/emacsql.el
+++ b/emacsql.el
@@ -94,7 +94,6 @@ may return `process', `user-ptr' or `sqlite' for this value.")
(log-buffer :type (or null buffer)
:initarg :log-buffer
:initform nil
- :accessor emacsql-log-buffer
:documentation "Output log (debug).")
(finalizer :documentation "Object returned from `make-finalizer'.")
(types :allocation :class
@@ -104,6 +103,15 @@ may return `process', `user-ptr' or `sqlite' for this
value.")
"A connection to a SQL database."
:abstract t)
+(cl-defmethod (setf emacsql-log-buffer) (value (obj emacsql-connection))
+ (oset obj log-buffer value))
+(make-obsolete-generalized-variable 'emacsql-log-buffer
+ "use (oset obj log-buffer val) instead."
+ "EmacsSQL 4.0.0")
+(with-suppressed-warnings ((obsolete emacsql-log-buffer))
+ (cl-defmethod emacsql-log-buffer ((obj emacsql-connection)) "\
+Retrieve the slot `log-buffer' from an object of class `emacsql-connection'."
+ (oref obj log-buffer)))
(make-obsolete 'emacsql-log-buffer "use (oref obj log-buffer) instead."
"EmacSQL 4.0.0")