Homepage: https://www.gnu.org/software/emacs
Author: Alex Schroeder
Specialized comint.el for SQL interpreters
Please send bug reports and bug fixes to the mailing list at bug-gnu-emacs@gnu.org. See also the general help list at https://lists.gnu.org/mailman/listinfo/help-gnu-emacs I monitor this list actively. If you send an e-mail to Alex Schroeder it usually makes it to me when Alex has a chance to forward them along (Thanks, Alex). This file provides a sql-mode and a sql-interactive-mode. The original goals were two simple modes providing syntactic highlighting. The interactive mode had to provide a command-line history; the other mode had to provide "send region/buffer to SQL interpreter" functions. "simple" in this context means easy to use, easy to maintain and little or no bells and whistles. This has changed somewhat as experience with the mode has accumulated. Support for different flavors of SQL and command interpreters was available in early versions of sql.el. This support has been extended and formalized in later versions. Part of the impetus for the improved support of SQL flavors was borne out of the current maintainers consulting experience. In the past twenty years, I have used Oracle, Sybase, Informix, MySQL, Postgres, and SQLServer. On some assignments, I have used two or more of these concurrently. If anybody feels like extending this sql mode, take a look at the above mentioned modes and write a sqlx-mode on top of this one. If this proves to be difficult, please suggest changes that will facilitate your plans. Facilities have been provided to add products and product-specific configuration. sql-interactive-mode is used to interact with a SQL interpreter process in a SQLi buffer (usually called `*SQL*'). The SQLi buffer is created by calling a SQL interpreter-specific entry function or sql-product-interactive. Do *not* call sql-interactive-mode by itself. The list of currently supported interpreters and the corresponding entry function used to create the SQLi buffers is shown with `sql-help' (M-x sql-help). Since sql-interactive-mode is built on top of the general command-interpreter-in-a-buffer mode (comint mode), it shares a common base functionality, and a common set of bindings, with all modes derived from comint mode. This makes these modes easier to use. sql-mode can be used to keep editing SQL statements. The SQL statements can be sent to the SQL process in the SQLi buffer. For documentation on the functionality provided by comint mode, and the hooks available for customizing it, see the file `comint.el'. Hint for newbies: take a look at `dabbrev-expand', `abbrev-mode', and `imenu-add-menubar-index'.