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

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

[nongnu] elpa/emacsql 769abe20fa 183/427: Don't rely on a closure in cle


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql 769abe20fa 183/427: Don't rely on a closure in cleanup hook.
Date: Tue, 13 Dec 2022 02:59:40 -0500 (EST)

branch: elpa/emacsql
commit 769abe20fa6182d11e283b1737c40ef16e57ccf8
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>

    Don't rely on a closure in cleanup hook.
    
    It's unnecessary so just skip it.
---
 emacsql-psql.el   | 2 +-
 emacsql-sqlite.el | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/emacsql-psql.el b/emacsql-psql.el
index 9001cef311..ea6358e371 100644
--- a/emacsql-psql.el
+++ b/emacsql-psql.el
@@ -59,7 +59,7 @@
                                       :dbname dbname)))
       (prog1 connection
         (setf (process-sentinel process)
-              (lambda (_proc _) (kill-buffer buffer)))
+              (lambda (proc _) (kill-buffer (process-buffer proc))))
         (when debug
           (setf (emacsql-log-buffer connection)
                 (generate-new-buffer "*emacsql-log*")))
diff --git a/emacsql-sqlite.el b/emacsql-sqlite.el
index 0fa6c7f3f0..06165cc714 100644
--- a/emacsql-sqlite.el
+++ b/emacsql-sqlite.el
@@ -51,7 +51,8 @@ buffer. This is for debugging purposes."
          (sqlite3 emacsql-sqlite3-executable)
          (process (start-process "emacsql-sqlite" buffer sqlite3
                                  "-interactive" fullfile)))
-    (setf (process-sentinel process) (lambda (_proc _) (kill-buffer buffer)))
+    (setf (process-sentinel process)
+          (lambda (proc _) (kill-buffer (process-buffer proc))))
     (process-send-string process ".mode list\n")
     (process-send-string process ".separator ' '\n")
     (process-send-string process ".nullvalue nil\n")



reply via email to

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