* lisp/progmodes/sql.el: Turn `sql-*-statement-starters' to defvars.

These variables hold information on the SQL standard and
product-specific additions and should not be user-customizable.
This commit is contained in:
Ingo Lohmar 2021-05-27 22:52:11 +02:00
parent f1c3b82d40
commit a29a03c3bc
2 changed files with 26 additions and 27 deletions

View file

@ -2702,6 +2702,12 @@ The implementation was buggy, and multiple '&define' forms in an '&or'
form should be exceedingly rare. See the Info node "(elisp) Backtracking" in
the Emacs Lisp reference manual for background.
---
** 'sql-*-statement-starters' are no longer defcustoms.
These variables describe facts about the SQL standard and
product-specific additions. There should be no need for users to
customize them.
* Lisp Changes in Emacs 28.1

View file

@ -998,20 +998,6 @@ for the first time."
:version "24.1"
:type 'hook)
;; Customization for ANSI
(defcustom sql-ansi-statement-starters
(regexp-opt '("create" "alter" "drop"
"select" "insert" "update" "delete" "merge"
"grant" "revoke"))
"Regexp of keywords that start SQL commands.
All products share this list; products should define a regexp to
identify additional keywords in a variable defined by
the :statement feature."
:version "24.1"
:type 'regexp)
;; Customization for Oracle
(defcustom sql-oracle-program "sqlplus"
@ -1034,12 +1020,6 @@ You will find the file in your Orant\\bin directory."
:type 'sql-login-params
:version "24.1")
(defcustom sql-oracle-statement-starters
(regexp-opt '("declare" "begin" "with"))
"Additional statement starting keywords in Oracle."
:version "24.1"
:type 'string)
(defcustom sql-oracle-scan-on t
"Non-nil if placeholders should be replaced in Oracle SQLi.
@ -1240,13 +1220,6 @@ add your name with a \"-U\" prefix (such as \"-Umark\") to the list."
(push (match-string 1 row) res))))
(nreverse res))))
(defcustom sql-postgres-statement-starters
(regexp-opt '("with"))
"Additional statement-starting keywords in Postgres."
:type 'string
:group 'SQL
:version "28.1")
;; Customization for Interbase
(defcustom sql-interbase-program "isql"
@ -1510,6 +1483,26 @@ Based on `comint-mode-map'.")
table)
"Syntax table used in `sql-mode' and `sql-interactive-mode'.")
;; Motion Function Keywords
(defvar sql-ansi-statement-starters
(regexp-opt '("create" "alter" "drop"
"select" "insert" "update" "delete" "merge"
"grant" "revoke"))
"Regexp of keywords that start SQL commands.
All products share this list; products should define a regexp to
identify additional keywords in a variable defined by
the :statement feature.")
(defvar sql-oracle-statement-starters
(regexp-opt '("declare" "begin" "with"))
"Additional statement-starting keywords in Oracle.")
(defvar sql-postgres-statement-starters
(regexp-opt '("with"))
"Additional statement-starting keywords in Postgres.")
;; Font lock support
(defvar sql-mode-font-lock-object-name