Check for support in sqlite-mode-open-file

* lisp/sqlite-mode.el (sqlite-mode-open-file): Error out earlier
when we don't have sqlite support.
This commit is contained in:
Lars Ingebrigtsen 2021-12-12 10:22:52 +01:00
parent 8faada1f5a
commit 6c9adafa93

View file

@ -52,6 +52,8 @@
(defun sqlite-mode-open-file (file)
"Browse the contents of an sqlite file."
(interactive "fSQLite file name: ")
(unless (sqlite-available-p)
(error "This Emacs doesn't have SQLite support, so it can't view SQLite files"))
(pop-to-buffer (get-buffer-create
(format "*SQLite %s*" (file-name-nondirectory file))))
(sqlite-mode)