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

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

[nongnu] elpa/emacsql e498dd1dea 336/427: Drop emacsql-escape-format's K


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql e498dd1dea 336/427: Drop emacsql-escape-format's KIND argument.
Date: Tue, 13 Dec 2022 02:59:59 -0500 (EST)

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

    Drop emacsql-escape-format's KIND argument.
    
    No caller actually uses this argument and while it was optional the
    documentation strongly indicated that it usually should be provided,
    which was confusing.
---
 emacsql-compiler.el | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/emacsql-compiler.el b/emacsql-compiler.el
index 36142cc6fd..3f20758225 100644
--- a/emacsql-compiler.el
+++ b/emacsql-compiler.el
@@ -88,15 +88,9 @@
     (vector (concat "(" (mapconcat #'emacsql-escape-scalar vector ", ") ")"))
     (otherwise (emacsql-error "Invalid vector %S" vector))))
 
-(defun emacsql-escape-format (thing &optional kind)
-  "Escape THING for use as a `format' spec, pre-escaping for KIND.
-KIND should be :scalar or :identifier."
-  (replace-regexp-in-string
-   "%" "%%" (cl-case kind
-              (:scalar (emacsql-escape-scalar thing))
-              (:identifier (emacsql-escape-identifier thing))
-              (:vector (emacsql-escape-vector thing))
-              (otherwise thing))))
+(defun emacsql-escape-format (thing)
+  "Escape THING for use as a `format' spec."
+  (replace-regexp-in-string "%" "%%" thing))
 
 ;;; Schema compiler
 



reply via email to

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