Speed up multisession--set-value-sqlite slightly

* lisp/emacs-lisp/multisession.el
(multisession--set-value-sqlite): Use `readablep'.
This commit is contained in:
Lars Ingebrigtsen 2022-01-22 15:13:19 +01:00
parent f047d3c513
commit 573ec193be

View file

@ -218,10 +218,9 @@ DOC should be a doc string, and ARGS are keywords as applicable to
(let ((print-length nil)
(print-circle t)
(print-level nil))
(prin1-to-string value))))
(condition-case nil
(ignore (read-from-string pvalue))
(error (error "Unable to store unreadable value: %s" pvalue)))
(readablep value))))
(when (and value (not pvalue))
(error "Unable to store unreadable value: %s" value))
(sqlite-execute
multisession--db
"insert into multisession(package, key, sequence, value) values(?, ?, 1, ?) on conflict(package, key) do update set sequence = sequence + 1, value = ?"