projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cbd8fac
)
Close SQL database when corresponding 'sqlite-mode' buffer is killed
author
Thomas Hilke
<t.hilke@rollomatic.ch>
Fri, 15 Sep 2023 08:30:25 +0000
(10:30 +0200)
committer
Eli Zaretskii
<eliz@gnu.org>
Sat, 16 Sep 2023 10:20:45 +0000
(13:20 +0300)
* lisp/sqlite-mode.el (sqlite-mode-open-file): Close DB when the
buffer is killed. (Bug#65998)
Copyright-paperwork-exempt: yes
lisp/sqlite-mode.el
patch
|
blob
|
history
diff --git
a/lisp/sqlite-mode.el
b/lisp/sqlite-mode.el
index 8cb944853693f85d34a80be53f7b926547dddbf0..71c9e57fc12d2404aee1c8c1adbfc572be3870c9 100644
(file)
--- a/
lisp/sqlite-mode.el
+++ b/
lisp/sqlite-mode.el
@@
-63,6
+63,7
@@
(setq-local sqlite--db (sqlite-open file))
(unless (sqlitep sqlite--db)
(error "`sqlite-open' failed to open SQLite file"))
+ (add-hook 'kill-buffer-hook (lambda () (sqlite-close sqlite--db)) nil t)
(sqlite-mode-list-tables))
(defun sqlite-mode-list-tables ()