From 6ba79b56e894a2a2b75ff7de2e2f1af5dacbf600 Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Sat, 1 Jun 2024 19:27:42 +0200 Subject: [PATCH] closql--slot-table{,s}: No longer replace dashes in table names EmacSQL takes care of this. --- closql.el | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/closql.el b/closql.el index 4911931..cd7648e 100644 --- a/closql.el +++ b/closql.el @@ -224,10 +224,8 @@ (closql--slot-get obj slot :closql-class)) (defun closql--slot-table (obj slot) - (let ((tbl (closql--slot-get obj slot :closql-table))) - (and tbl (intern (string-replace - "-" "_" - (symbol-name (if (symbolp tbl) tbl (car tbl)))))))) + (and-let* ((tbl (closql--slot-get obj slot :closql-table))) + (if (symbolp tbl) tbl (car tbl)))) (defun closql--slot-get (object-or-class slot prop) (cdr (assq prop (closql--slot-properties object-or-class slot)))) @@ -613,8 +611,7 @@ (let ((tables (closql--slot-get obj slot :closql-table))) (unless (listp tables) (error "%s isn't an indirect slot" slot)) - (list (intern (string-replace "-" "_" (symbol-name (nth 0 tables)))) - (intern (string-replace "-" "_" (symbol-name (nth 1 tables))))))) + tables)) ;;; Utilities