From b4b3f244d3b0f7d91df290b5ef1d66df39bdba99 Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Thu, 30 May 2024 15:24:45 +0200 Subject: [PATCH] closql--slot-properties: New function --- closql.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/closql.el b/closql.el index 8f98851..59243e7 100644 --- a/closql.el +++ b/closql.el @@ -232,10 +232,13 @@ (symbol-name (if (symbolp tbl) tbl (car tbl)))))))) (defun closql--slot-get (object-or-class slot prop) - (let ((s (cl-find slot - (closql--object-slots object-or-class) - :key #'cl--slot-descriptor-name))) - (and s (cdr (assoc prop (cl--slot-descriptor-props s)))))) + (cdr (assq prop (closql--slot-properties object-or-class slot)))) + +(defun closql--slot-properties (object-or-class slot) + (and-let* ((desc (cl-find slot + (closql--object-slots object-or-class) + :key #'cl--slot-descriptor-name))) + (cl--slot-descriptor-props desc))) (defun closql--object-slots (object-or-class) (eieio-class-slots