mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-21 06:55:39 +00:00
Close SQL database when corresponding 'sqlite-mode' buffer is killed
* lisp/sqlite-mode.el (sqlite-mode-open-file): Close DB when the buffer is killed. (Bug#65998) Copyright-paperwork-exempt: yes
This commit is contained in:
parent
cbd8fac283
commit
d9a1175a61
@ -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 ()
|
||||
|
Loading…
Reference in New Issue
Block a user