1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-14 09:39:42 +00:00
Commit Graph

64 Commits

Author SHA1 Message Date
Stefan Monnier
556594956b (sql-product-alist): Add :name tag to entries.
(sql-product): Use it.
(sql-mode-menu): Auto-generate the menu based on sql-product-alist.
(sql-set-product): Add completion.
(sql-highlight-oracle-keywords, sql-highlight-postgres-keywords)
(sql-highlight-linter-keywords, sql-highlight-ms-keywords)
(sql-highlight-ansi-keywords, sql-highlight-sybase-keywords)
(sql-highlight-informix-keywords, sql-highlight-interbase-keywords)
(sql-highlight-ingres-keywords, sql-highlight-solid-keywords)
(sql-highlight-mysql-keywords, sql-highlight-sqlite-keywords)
(sql-highlight-db2-keywords): Remove.
(sql-find-sqli-buffer, sql-set-sqli-buffer-generally)
(sql-highlight-product): Use derived-mode-p.
(sql-set-sqli-buffer): Use with-current-buffer.
(sql-connect-informix, sql-connect-ingres, sql-connect-oracle): Simplify.
2009-08-16 15:48:15 +00:00
Glenn Morris
f5107fea3e Ian Eure <ian at digg.com> (tiny change)
(sql-product-alist, sql-connect-sqlite): Remove host, user, password
options not applicable to SQlite. (Bug#1904)
2009-02-14 03:38:00 +00:00
Glenn Morris
ae940284fa Add 2009 to copyright years. 2009-01-05 03:18:22 +00:00
Glenn Morris
fffa137cb7 American English spelling fix. 2008-06-27 07:34:53 +00:00
Glenn Morris
b1fc2b5014 Switch to recommended form of GPLv3 permissions notice. 2008-05-06 07:25:26 +00:00
Stefan Monnier
cbee283dd7 Fix up comment convention on the arch-tag lines. 2008-04-10 14:10:46 +00:00
Miles Bader
59ce725a3b Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-987
2008-01-08 20:46:54 +00:00
Glenn Morris
4e643dd23c Add 2008 to copyright years. 2008-01-07 02:11:00 +00:00
Juanma Barranquero
f77183c083 (top): Use mapc' rather than mapcar'. 2007-09-26 00:28:25 +00:00
Glenn Morris
1a484753b2 Switch license to GPLv3 or later. 2007-07-25 04:29:40 +00:00
Glenn Morris
d7a0267c8d Add 2007 to copyright years. 2007-01-21 03:53:13 +00:00
Richard M. Stallman
01295a2211 (sql-mode-abbrev-table): Corrected initialization.
(sql-mode-syntax-table): Disable double quoted strings.
(sql-mode-font-lock-object-name): Added TYPE and TYPE BODY.
2006-12-25 20:11:21 +00:00
Glenn Morris
e5a4bf4852 (sql-mode-abbrev-table): Define abbrevs even if abbrev-table is
non-nil (saved user abbrevs may have been restored).
2006-12-05 05:25:36 +00:00
Nick Roberts
d91362c9e0 Update copyright for 2006. 2006-02-10 09:00:31 +00:00
Juanma Barranquero
ec38bb4664 (font-lock-keyword-face, font-lock-set-defaults, font-lock-string-face):
Add defvars.
2005-08-30 11:15:37 +00:00
Juanma Barranquero
280412d8d4 (sql-interactive-mode): Fix typo in docstring. 2005-08-29 11:02:42 +00:00
Richard M. Stallman
8d68e9b541 (sql-interactive-mode-map): Use fboundp.
(sql-read-passwd): Use read-passwd.
2005-08-09 11:42:54 +00:00
Nick Roberts
034babe1e1 Update copyright for release of 22.1 for progmodes directory. 2005-08-01 08:43:45 +00:00
Lute Kamstra
3a35cf56e7 Update FSF's address. 2005-07-04 17:55:18 +00:00
Juanma Barranquero
b9584f65f3 (SQL): Finish `defgroup' description with period.
(sql-copy-column): "?\ " -> "?\s".
2005-07-04 03:25:26 +00:00
Lute Kamstra
03789b211d (sql-interactive-mode): Use delay-mode-hooks. 2005-06-14 12:03:52 +00:00
Lute Kamstra
9a9691963d * progmodes/ada-mode.el (ada-mode):
* progmodes/antlr-mode.el (antlr-mode):
* progmodes/autoconf.el (autoconf-mode):
* progmodes/dcl-mode.el (dcl-mode):
* progmodes/delphi.el (delphi-mode):
* progmodes/ebrowse.el (ebrowse-tree-mode)
(ebrowse-electric-list-mode, ebrowse-member-mode)
(ebrowse-electric-position-mode):
* progmodes/f90.el (f90-mode):
* progmodes/fortran.el (fortran-mode):
* progmodes/icon.el (icon-mode):
* progmodes/idlw-help.el (idlwave-help-mode):
* progmodes/idlw-shell.el (idlwave-shell-mode):
* progmodes/idlwave.el (idlwave-mode):
* progmodes/inf-lisp.el (inferior-lisp-mode):
* progmodes/m4-mode.el (m4-mode):
* progmodes/meta-mode.el (metafont-mode, metapost-mode):
* progmodes/modula2.el (modula-2-mode):
* progmodes/octave-inf.el (inferior-octave-mode):
* progmodes/octave-mod.el (octave-mode):
* progmodes/pascal.el (pascal-mode):
* progmodes/sh-script.el (sh-mode):
* progmodes/sql.el (sql-mode, sql-interactive-mode):
* progmodes/vhdl-mode.el (vhdl-mode):
* progmodes/xscheme.el (scheme-interaction-mode):  Use run-mode-hooks.
2005-05-26 16:43:37 +00:00
Kim F. Storm
bf247b6ed0 Change release version from 21.4 to 22.1 throughout.
Change development version from 21.3.50 to 22.0.50.
2005-02-09 15:50:47 +00:00
Stefan Monnier
9a9069c994 (sql-xemacs-p, sql-emacs19-p, sql-emacs20-p): Remove.
(sql-mode-syntax-table): Use shared GNU EMacs/XEmacs syntax.
(sql-builtin-face, sql-doc-face): Remove.
(sql-mode-ansi-font-lock-keywords)
(sql-mode-oracle-font-lock-keywords)
(sql-mode-postgres-font-lock-keywords)
(sql-mode-linter-font-lock-keywords)
(sql-mode-ms-font-lock-keywords)
(sql-mode-mysql-font-lock-keywords): Use standard fonts.
(sql-product-font-lock): Fix font-lock reset when font rules change.
(sql-highlight-product): Remove incorrect font-lock reset logic.
2004-05-04 21:59:40 +00:00
Stefan Monnier
9fd8cb3673 (sql-product-alist): Rename variable `sql-product-support'.
Add Postgres login parameters.
(sql-set-product, sql-product-feature): Update with renamed variable.
(sql-connect-postgres): Add username prompt.
(sql-imenu-generic-expression, sql-mode-font-lock-object-name):
Make patterns less product specific.
(sql-xemacs-p, sql-emacs19-p): Add flags for emacs variants.
(sql-mode-abbrev-table): Modify initialization.
(sql-builtin-face): Add variable.
(sql-keywords-re): Add macro.
(sql-mode-ansi-font-lock-keywords): Update for ANSI-92.
(sql-mode-oracle-font-lock-keywords): Update for Oracle 9i.
(sql-mode-postgres-font-lock-keywords): Update for Postgres 7.3.
(sql-mode-mysql-font-lock-keywords): Update for MySql 4.0.
(sql-mode-linter-font-lock-keywords)
(sql-mode-ms-font-lock-keywords): Use `sql-keywords-re' macro.
(sql-mode-sybase-font-lock-keywords, sql-mode-informix-font-lock-keywords)
(sql-mode-interbase-font-lock-keywords, sql-mode-ingres-font-lock-keywords)
(sql-mode-solid-font-lock-keywords, sql-mode-sqlite-font-lock-keywords)
(sql-mode-db2-font-lock-keywords): Default to nil.
(sql-product-font-lock): Always highlight ANSI keywords.
(sql-add-product-keywords): Made similar to `font-lock-add-keywords'.
(sql-send-string): Add function.
2004-04-29 21:55:28 +00:00
Richard M. Stallman
dc45d1a608 Change maintainer. 2003-09-12 00:55:27 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Alex Schroeder
78024f8836 Patch by Michael Mauger <mmaug@yahoo.com>
Version 1.8.0 of sql-mode.

Simplify selection of SQL products to define highlighting and
interactive mode.  Includes detailed instructions on adding
support for new products.

* sql.el (sql-product): New variable.  Identifies SQL product for
use in highlighting and interactive mode.
(sql-interactive-product): New variable.  SQL product for
sql-interactive-mode.
(sql-product-support): New variable.  Specifies product-specific
parameters to drive highlighting and interactive mode.
(sql-imenu-generic-expression): Add more object types.
(sql-sqlite-options): Correct comment.
(sql-ms-program): Use "osql" rather than "isql".
(sql-prompt-regexp, sql-prompt-length): Update comment.
(sql-mode-menu): Add "Start SQLi session" entry.  Replace
Highlighting submenu with Product menu.  Fix Send Region entry.
(sql-mode-abbrev-table): Add abbreviations.  Support of
SYSTEM-FLAG on define-abbrev.  Support was removed with last
check-in; it now handles older Emacsen without the SYSTEM-FLAG.
(sql-mode-font-lock-object-name): Add font-lock pattern for object
names.
(sql-mode-ansi-font-lock-keywords): Set as default value.
(sql-mode-oracle-font-lock-keywords): Set as default value.
Support Oracle 9i keywords.
(sql-mode-postgres-font-lock-keywords): Set as default value.
(sql-mode-linter-font-lock-keywords): Set as default value.
(sql-mode-ms-font-lock-keywords): New variable.  Support Microsoft
SQLServer 2000.
(sql-mode-sybase-font-lock-keywords)
(sql-mode-interbase-font-lock-keywords)
(sql-mode-sqlite-font-lock-keywords)
(sql-mode-strong-font-lock-keywords)
(sql-mode-mysql-font-lock-keywords)
(sql-mode-db2-font-lock-keywords): New variables.  Default to ANSI
keywords.
(sql-mode-font-lock-defaults): Update comment.
(sql-product-feature): New function.  Returns feature associated
with a product from `sql-product-support' alist.
(sql-product-font-lock): New function.  Set font-lock support
based on `sql-product'.
(sql-add-product-keywords): New function.  Add font-lock rules to
product-specific keyword variables.
(sql-set-product): New function.  Set `sql-product' and apply
appropriate font-lock highlighting.
(sql-highlight-product): New function.  Set font-lock support
based on a product.  Also set mode name to include product name.
(sql-highlight-ansi-keywords, sql-highlight-oracle-keywords)
(sql-highlight-postgres-keywords, sql-highlight-linter-keywords):
Use `sql-set-product'.
(sql-highlight-ms-keywords)
(sql-highlight-sybase-keywords)
(sql-highlight-interbase-keywords)
(sql-highlight-strong-keywords)
(sql-highlight-mysql-keywords)
(sql-highlight-sqlite-keywords)
(sql-highlight-db2-keywords): New functions.  Use
`sql-set-product'.
(sql-get-login): Prompt in the same order as the tokens.
(sql-mode): Uses `sql-product-highlight' and
`sql-product-font-lock'.
(sql-product-interactive): New function.  Common portions of
product-specific interactive mode wrappers.
(sql-interactive-mode): Rewritten to use product features.
(sql-oracle, sql-sybase, sql-informix, sql-sqlite, sql-mysql)
(sql-solid, sql-ingres, sql-ms, sql-postgres, sql-interbase)
(sql-db2, sql-linter): Use `sql-product-interactive'.
(sql-connect-oracle, sql-connect-sybase, sql-connect-informix)
(sql-connect-sqlite, sql-connect-mysql, sql-connect-solid)
(sql-connect-ingres, sql-connect-postgres)
(sql-connect-interbase, sql-connect-db2, sql-connect-linter): New
functions.  Format command line parameters and invoke comint on
the appropriate interpreter.  Code was in the corresponding
`sql-xyz' function before.
(sql-connect-ms): New function.  Support -E argument to use
operating system credentials for authentication.
2003-08-18 17:29:23 +00:00
Juanma Barranquero
b4dd5c9ca5 Revert last change. 2003-07-14 20:39:39 +00:00
Juanma Barranquero
9c7bda2fc1 Version 1.8.0 of sql-mode.
Simplify selection of SQL products to define highlighting and
interactive mode.  Includes detailed instructions on adding support
for new products.

(sql-product): New variable.  Identifies SQL product for use in highlighting and
interactive mode.
(sql-interactive-product): New variable.  SQL product for sql-interactive-mode.
(sql-product-support): New variable.  Specifies product-specific parameters to
drive highlighting and interactive mode.
(sql-imenu-generic-expression): Add more object types.
(sql-sqlite-options): Correct comment.
(sql-ms-program): Use "osql" rather than "isql".
(sql-prompt-regexp, sql-prompt-length): Update comment.
(sql-mode-menu): Add "Start SQLi session" entry.  Replace Highlighting submenu
with Product menu.  Fix Send Region entry.
(sql-mode-abbrev-table): Add abbreviations.  Support of SYSTEM-FLAG on
define-abbrev.  Support was removed with last check-in; it now handles older
Emacsen without the SYSTEM-FLAG.
(sql-mode-font-lock-object-name): Add font-lock pattern for object names.
(sql-mode-ansi-font-lock-keywords): Set as default value.
(sql-mode-oracle-font-lock-keywords): Set as default value.  Support Oracle 9i
keywords.
(sql-mode-postgres-font-lock-keywords): Set as default value.
(sql-mode-linter-font-lock-keywords): Set as default value.
(sql-mode-ms-font-lock-keywords): New variable.  Support Microsoft SQLServer
2000.
(sql-mode-sybase-font-lock-keywords)
(sql-mode-interbase-font-lock-keywords)
(sql-mode-sqlite-font-lock-keywords)
(sql-mode-strong-font-lock-keywords)
(sql-mode-mysql-font-lock-keywords)
(sql-mode-db2-font-lock-keywords): New variables.  Default to ANSI keywords.
(sql-mode-font-lock-defaults): Update comment.
(sql-product-feature): New function.  Returns feature associated with a product
from `sql-product-support' alist.
(sql-product-font-lock): New function.  Set font-lock support based on
`sql-product'.
(sql-add-product-keywords): New function.  Add font-lock rules to
product-specific keyword variables.
(sql-set-product): New function.  Set `sql-product' and apply appropriate
font-lock highlighting.
(sql-highlight-product): New function.  Set font-lock support based on a
product.  Also set mode name to include product name.
(sql-highlight-ansi-keywords, sql-highlight-oracle-keywords)
(sql-highlight-postgres-keywords, sql-highlight-linter-keywords):
Use `sql-set-product'.
(sql-highlight-ms-keywords)
(sql-highlight-sybase-keywords)
(sql-highlight-interbase-keywords)
(sql-highlight-strong-keywords)
(sql-highlight-mysql-keywords)
(sql-highlight-sqlite-keywords)
(sql-highlight-db2-keywords): New functions.  Use `sql-set-product'.
(sql-get-login): Prompt in the same order as the tokens.
(sql-mode): Uses `sql-product-highlight' and `sql-product-font-lock'.
(sql-product-interactive): New function.  Common portions of product-specific
interactive mode wrappers.
(sql-interactive-mode): Rewritten to use product features.
(sql-oracle, sql-sybase, sql-informix, sql-sqlite, sql-mysql)
(sql-solid, sql-ingres, sql-ms, sql-postgres, sql-interbase)
(sql-db2, sql-linter): Use `sql-product-interactive'.
(sql-connect-oracle, sql-connect-sybase, sql-connect-informix)
(sql-connect-sqlite, sql-connect-mysql, sql-connect-solid)
(sql-connect-ingres, sql-connect-postgres)
(sql-connect-interbase, sql-connect-db2, sql-connect-linter): New functions.
Format command line parameters and invoke comint on the appropriate interpreter.
Code was in the corresponding `sql-xyz' function before.
(sql-connect-ms): New function.  Support -E argument to use operating system
credentials for authentication.
2003-07-13 17:19:18 +00:00
Juanma Barranquero
5d538ce37e Add support for SQLite interpreter. 2003-06-17 20:58:37 +00:00
Juanma Barranquero
f4df536d0a Added LINTER support.
(sql-linter-program): New variable.
(sql-linter-options): New variable.
(sql-mode-menu): Added Linter keywords.
(sql-mode-linter-font-lock-keywords): New variable.
(sql-highlight-linter-keywords): New function.
(sql-linter): New function.
(sql-ms-options): New variable.
(sql-ms): Use it.
2002-11-21 08:32:06 +00:00
Richard M. Stallman
754dfe82dc (sql-escape-newlines-and-send)
(sql-query-placeholders-and-send): Fix previous change.
2002-01-17 01:39:49 +00:00
Richard M. Stallman
60a193e282 (sql-query-placeholders-and-send): Handle
comint-input-sender-no-newline like comint-simple-send.
(sql-escape-newlines-and-send): Likewise.
2002-01-13 04:44:22 +00:00
Pavel Janík
42f2e96aea (sql-mode-abbrev-table): Mark all the predefined abbrevs as "system"
abbrevs.
2001-12-30 22:12:02 +00:00
Richard M. Stallman
4da8ff79a0 (sql-mode): Doc change.
(sql-mode-syntax-table): Backslash is no longer an escape character.
2001-11-13 02:22:40 +00:00
Gerd Moellmann
058fb10a33 (sql-mysql): Doc change by RMS.
(sql-db2): Doc change.
(sql-help): Doc change by Christian Egli <christian.egli@stest.ch>.
(sql-mysql): Doc change by Christian Egli <christian.egli@stest.ch>.
2001-10-29 09:35:04 +00:00
Gerd Moellmann
aa88e662fc (sql-db2): Doc change.
(sql-postgres): Add the database at the end of the
parameters instead of at the beginning.
(sql-postgres-options): Doc change.
2001-08-20 10:02:07 +00:00
Gerd Moellmann
624ef9b3c2 (sql-escape-newlines-and-send): New function.
(sql-db2): Set comint-input-sender to
sql-escape-newlines-and-send.

(sql-db2-program): New option.
(sql-db2-options): New option.
(sql-db2): New function.

(sql-mode-menu): Added highlighting entries.
(sql-highlight-oracle-keywords): New function.
(sql-highlight-postgres-keywords): New function.
(sql-highlight-ansi-keywords): New function.

(sql-help): Doc change.
2001-04-20 10:03:48 +00:00
Gerd Moellmann
eb3f61dd1f (sql-interbase): New function.
(sql-interbase-program): New option.
(sql-interbase-options): New option.
And some typos fixed: "customise" to "customize".
2001-03-06 12:26:35 +00:00
Gerd Moellmann
7a65c85c72 (sql-sybase): Fix typo (was: query user about server two
times instead of server and database).

(sql-sybase): Doc change.
(sql-mysql): Doc change.
(sql-postgres): Doc change.
2001-03-05 09:47:59 +00:00
Gerd Moellmann
524c8caf60 (sql-sybase-options): New option.
(sql-sybase): Use it.  Add sql-database to the list of parameters
provided for login.  The options -w 2048 -n are not used any more.
(sql-postgres-options): Changed default from "--pset" to "-P".
(sql-mysql-options): Doc change.
(sql-stop): Doc change.
2000-12-19 10:09:25 +00:00
Gerd Moellmann
9b5360aa71 (sql-sybase-options): New option.
(sql-sybase): Use it.  Add sql-database to the list of parameters
provided for login.  The options -w 2048 -n are not used any more.
2000-10-18 14:38:55 +00:00
Gerd Moellmann
542c655271 (sql-mysql-options): New variable.
(sql-mysql): Use it.
2000-10-05 15:26:13 +00:00
Gerd Moellmann
311e7a8990 (sql-postgres): Use sql-postgres-options.
(sql-postgres-options): New variable.

(sql-mode-menu): Work around missing variable mark-active
in XEmacs.
(sql-mode): Added call to easy-menu-add for XEmacs compatibility.
(sql-interactive-mode): Added call to easy-menu-add for XEmacs
compatibility.
2000-09-05 10:44:21 +00:00
Gerd Moellmann
c0bbaf57af (sql-magic-go): Use comint-bol.
(sql-copy-column): Use comint-line-beginning-position.
(comint-line-beginning-position): Define a replacement for
comint-line-beginning-position if it is not fboundp.

(sql-mode-map): TAB is no longer defined in sql-mode-map;
it didn't have any effect anyway.

(sql-postgres): Jason Beegan's patch uses the parameters
--pset and pager=off instead of sending \\o|cat at the beginning
of the session.
2000-08-17 11:20:50 +00:00
Miles Bader
04231ab822 Add compatibility definition of comint-line-beginning-position. 2000-08-16 02:34:28 +00:00
Miles Bader
3035b15651 (sql-magic-go): Use comint-bol instead of explicitly matching
comint-prompt-regexp.
(sql-copy-column): Use comint-line-beginning-position instead of
  explicitly matching comint-prompt-regexp.
2000-08-07 14:52:52 +00:00
Gerd Moellmann
77d352a676 (sql-ms): Added autoload cookie.
(sql-ingres, sql-solid, sql-mysql, sql-informix, sql-sybase)
(sql-oracle): Ditto.
(sql-help): Doc change.

(sql-mode-oracle-font-lock-keywords): Added PL/SQL keywords, data
types and exceptions.

(sql-placeholder-history): New variable.
(sql-query-placeholders-and-send): New function that will query
the user and replace placeholders with user input.
(sql-oracle): If running on NT, set comint-input-sender to
sql-query-placeholders-and-send.

(sql-stop): If in the SQLi buffer, insert stop notification, else
present it as a message.

(sql-input-ring-separator): Doc change.
(sql-input-ring-file-name): Doc change.
(sql-interactive-mode): Use `sql-input-ring-separator' and
`sql-input-ring-file-name' to set the comint-mode equivalents
without making them local variables.
(sql-stop): Don't bind `sql-input-ring-separator' and
`sql-input-ring-file-name' dynamically to their comint-mode
equivalents.
2000-07-27 20:06:37 +00:00
Gerd Moellmann
9ef3882f5d (sql-interactive-mode-map): Use `kbd' in calls to
`define-key'; instead of checking `(emacs-version)' check for
`set-keymap-parent' and `set-keymap-name' directly.  Add entries
for `;' and `o' which might be electric.

(sql-electric-stuff): New user option.
(sql-magic-go): New function which uses `sql-electric-stuff'.
(sql-magic-semicolon): New function which uses
`sql-electric-stuff'.

(sql-accumulate-and-indent): Insert newline if `comint-accumulate'
is not fboundp.

(sql-oracle-options): New variable.
(sql-oracle): Use it.

(sql-imenu-generic-expression): Doc change.
(sql-find-sqli-buffer): Make sure the default-value of sql-buffer
is used.

(sql-informix): Added command line parameter "-" to force
sql-informix-program to use stdout.
2000-06-26 13:09:49 +00:00