Commit graph

15 commits

Author SHA1 Message Date
Lars Ingebrigtsen
49910adf87 Fix cl-generic bootstrap problems
* lisp/sqlite-mode.el (require):
* lisp/net/eudc.el (require):
* lisp/arc-mode.el (require): Require subr-x, since these files
are using macros from there.
* lisp/emacs-lisp/subr-x.el (with-memoization): Move from here...
* lisp/subr.el (with-memoization): ... to here, as it's used from
the preloaded cl-generic.el file.

* lisp/emacs-lisp/cl-generic.el (cl--generic-compiler): Don't use
the autoloaded `byte-compile' function during bootstrap.
(cl--generic-get-dispatcher): Don't require subr-x, either.

cl-generic has been preloaded since 2015, and most usages of it (in
preloaded files) work fine.  In particular, using `cl-defgeneric' is
unproblematic.  However, `cl-defmethod' would end up pulling in the
byte compiler (at load time), which would make it impossible to use
`cl-defmethod' in pre-loaded files, and this change fixes that (but
possibly not in the most self-evidently correct way).
2022-06-24 11:04:51 +02:00
Yoav Marco
72b1007987 (sqlite-mode--column-names): Suppport nested parens
* lisp/sqlite-mode.el (sqlite-mode--column-names): Make parsing
more resilient (bug#55363).

Copyright-paperwork-exempt: yes
2022-05-11 14:05:37 +02:00
Eli Zaretskii
823b6b8d26 ; Add 2022 to copyright years. 2022-01-01 07:07:15 -05:00
Lars Ingebrigtsen
6c9adafa93 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.
2021-12-12 10:22:58 +01:00
dick r. chiang
8e948ab97e Fix some compilation warnings in sqlite-less builds
* test/src/sqlite-tests.el:
* lisp/sqlite-mode.el: Avoid compilation warnings in builds
without libsqlite (bug#52440).
2021-12-12 07:13:46 +01:00
Lars Ingebrigtsen
4b29468dbe Tweak erroring in sqlite-mode-delete
* lisp/sqlite-mode.el (sqlite-mode-delete): Use user-error instead
of error for user-level stuff.
2021-12-12 05:55:35 +01:00
Lars Ingebrigtsen
6656a4d161 Make sqlite-mode-list-tables work on older sqlite versions
* lisp/sqlite-mode.el (sqlite-mode-list-tables): Use sqlite_master
instead of sqlite_schema, since the former name is the historical
name and is available in all sqlite3 versions:
https://sqlite.org/schematab.html
2021-12-12 05:41:07 +01:00
Eli Zaretskii
8c50016b10 Improve documentation of sqlite3 support
* lisp/sqlite-mode.el (sqlite-mode-list-data):
* configure.ac (HAVE_SQLITE3): Fix typos.

* doc/lispref/text.texi (Database): Improve and clarify wording,
add index entries, mention all the function arguments.

* etc/NEWS: Minor wording changes of the sqlite entries.
2021-12-11 13:04:55 +02:00
Lars Ingebrigtsen
cabb049a50 Add confirmation to sqlite-mode-delete
* lisp/sqlite-mode.el (sqlite-mode-delete): Add confirmation.
2021-12-11 09:28:57 +01:00
Lars Ingebrigtsen
d727796e1f Don't leave open cursors when listing sqlite data
* lisp/sqlite-mode.el (sqlite-mode-list-data)
(sqlite--mode--list-data): Don't leave open cursor (because they
block other processes from deleting stuff).
(sqlite-mode-delete): Adjust to new layout.
2021-12-11 09:02:52 +01:00
Lars Ingebrigtsen
5d476a9ed8 Add FIXME comment
* lisp/sqlite-mode.el (sqlite-mode-delete): New command.
(sqlite--mode--list-data, sqlite-mode-list-data): Adjust to new
command.
2021-12-11 08:18:09 +01:00
Lars Ingebrigtsen
7cbda71617 Add an sqlite-mode-delete command
* lisp/sqlite-mode.el (sqlite-mode-delete): New command.
(sqlite--mode--list-data, sqlite-mode-list-data): Adjust to new
command.
2021-12-11 08:18:09 +01:00
Lars Ingebrigtsen
fb11575f3c Improve sqlite-mode--tablify tables
* lisp/sqlite-mode.el (sqlite-mode--tablify): Tweak column widths
and sanitize newlines.
2021-12-11 06:50:58 +01:00
Lars Ingebrigtsen
ad1b80d91d Fix sqlite-mode.el build problems
* lisp/sqlite-mode.el (sqlite-mode-list-tables): Fix function
rename usage.
2021-12-11 06:31:42 +01:00
Lars Ingebrigtsen
e5f71051a0 Add a new mode for examining sqlite files
* lisp/sqlite-mode.el: New file.
2021-12-11 06:23:57 +01:00