[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/emacsql 8fa7c00978 170/427: Add sentinel cleanup to psql.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/emacsql 8fa7c00978 170/427: Add sentinel cleanup to psql. |
Date: |
Tue, 13 Dec 2022 02:59:39 -0500 (EST) |
branch: elpa/emacsql
commit 8fa7c00978882d9c7c41897ba53f2e7bd949718b
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>
Add sentinel cleanup to psql.
---
emacsql-psql.el | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/emacsql-psql.el b/emacsql-psql.el
index adac77bc99..008eb8334c 100644
--- a/emacsql-psql.el
+++ b/emacsql-psql.el
@@ -50,14 +50,17 @@
:process process
:dbname dbname)))
(prog1 connection
+ (setf (process-sentinel process)
+ (lambda (_proc _) (kill-buffer buffer)))
(emacsql-register connection)
- (emacsql-send-string connection "\\pset pager off")
- (emacsql-send-string connection "\\pset null nil")
- (emacsql-send-string connection "\\a")
- (emacsql-send-string connection "\\t")
- (emacsql-send-string connection "\\f ' '")
- (emacsql-send-string connection "\\set PROMPT1 ]")
- (emacsql-send-string connection "EMACSQL;") ; error message flush
+ (mapc (apply-partially #'emacsql-send-string connection)
+ '("\\pset pager off"
+ "\\pset null nil"
+ "\\a"
+ "\\t"
+ "\\f ' '"
+ "\\set PROMPT1 ]"
+ "EMACSQL;")) ; error message flush
(emacsql-wait connection)))))
(defmethod emacsql-close ((connection emacsql-psql-connection))
- [nongnu] elpa/emacsql 936ac5bc86 386/427: Define emacsql using cl-defgeneric, (continued)
- [nongnu] elpa/emacsql 936ac5bc86 386/427: Define emacsql using cl-defgeneric, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql e597696682 358/427: Fix some indentation (whitespace cleanup), ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 76489e0a10 362/427: Tweak Makefile documentation, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 8c5f095458 368/427: Bump to version 3.0.0 (#20), ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 49348329df 376/427: Document op. precedence handling, clean up format string expansion, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 50ae54d159 053/427: Use expressions in select columns., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql a13eba5f05 059/427: Use the timeout argument in emacsql-wait., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql d440b44778 076/427: Add escape vector test., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 1db49d7f4c 090/427: Add Windows notice again., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 1ad58cd68d 108/427: Allow substatement in IN operator., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 8fa7c00978 170/427: Add sentinel cleanup to psql.,
ELPA Syncer <=
- [nongnu] elpa/emacsql 6d17256e1b 171/427: Add a mix-in class to reduce code duplication., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 749becb017 181/427: Disable notices and warnings in psql., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql e42d939235 187/427: In SQLite, block for up to 30 seconds on db lock., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 3ba9109d45 198/427: Start using real version numbers., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql de0bde9a02 207/427: Use Cask package-file directive instead., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql bb3dbfc891 213/427: Set a global query timeout., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 394bb062aa 219/427: Add a small library for determining binary to use., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql f030b9952d 224/427: Fix up psql-connection., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql dc2afbbc1f 221/427: Adjust the Emacsql wire protocol., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 6318472b20 223/427: Link the Makefiles together., ELPA Syncer, 2022/12/13