]> git.eshelyaron.com Git - emacs.git/commitdiff
Check for support in sqlite-mode-open-file
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 12 Dec 2021 09:22:52 +0000 (10:22 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 12 Dec 2021 09:22:58 +0000 (10:22 +0100)
* lisp/sqlite-mode.el (sqlite-mode-open-file): Error out earlier
when we don't have sqlite support.

lisp/sqlite-mode.el

index 43d76c4fd70addaee5c5ac9d14b2c7205093d5b5..082eb8276e8813376e1ba125b5a4c8419c748bb9 100644 (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)