aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Lohmar2021-05-27 22:52:11 +0200
committerIngo Lohmar2021-05-27 22:54:40 +0200
commita29a03c3bc8f16ab49fbc192567c1ee8428f34ea (patch)
tree2e8de95ff9dbb5e2e1f74ba91b55f3a9ce62d1fa
parentf1c3b82d401eecd1facbe0a6c07ccde100ad65d8 (diff)
downloademacs-a29a03c3bc8f16ab49fbc192567c1ee8428f34ea.tar.gz
emacs-a29a03c3bc8f16ab49fbc192567c1ee8428f34ea.zip
* 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.
-rw-r--r--etc/NEWS6
-rw-r--r--lisp/progmodes/sql.el47
2 files changed, 26 insertions, 27 deletions
diff --git a/etc/NEWS b/etc/NEWS
index ea74dfe2179..876f63c69c6 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2702,6 +2702,12 @@ The implementation was buggy, and multiple '&define' forms in an '&or'
2702form should be exceedingly rare. See the Info node "(elisp) Backtracking" in 2702form should be exceedingly rare. See the Info node "(elisp) Backtracking" in
2703the Emacs Lisp reference manual for background. 2703the Emacs Lisp reference manual for background.
2704 2704
2705---
2706** 'sql-*-statement-starters' are no longer defcustoms.
2707These variables describe facts about the SQL standard and
2708product-specific additions. There should be no need for users to
2709customize them.
2710
2705 2711
2706* Lisp Changes in Emacs 28.1 2712* Lisp Changes in Emacs 28.1
2707 2713
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index 2bfb222182d..f144549cf6d 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -998,20 +998,6 @@ for the first time."
998 :version "24.1" 998 :version "24.1"
999 :type 'hook) 999 :type 'hook)
1000 1000
1001;; Customization for ANSI
1002
1003(defcustom sql-ansi-statement-starters
1004 (regexp-opt '("create" "alter" "drop"
1005 "select" "insert" "update" "delete" "merge"
1006 "grant" "revoke"))
1007 "Regexp of keywords that start SQL commands.
1008
1009All products share this list; products should define a regexp to
1010identify additional keywords in a variable defined by
1011the :statement feature."
1012 :version "24.1"
1013 :type 'regexp)
1014
1015;; Customization for Oracle 1001;; Customization for Oracle
1016 1002
1017(defcustom sql-oracle-program "sqlplus" 1003(defcustom sql-oracle-program "sqlplus"
@@ -1034,12 +1020,6 @@ You will find the file in your Orant\\bin directory."
1034 :type 'sql-login-params 1020 :type 'sql-login-params
1035 :version "24.1") 1021 :version "24.1")
1036 1022
1037(defcustom sql-oracle-statement-starters
1038 (regexp-opt '("declare" "begin" "with"))
1039 "Additional statement starting keywords in Oracle."
1040 :version "24.1"
1041 :type 'string)
1042
1043(defcustom sql-oracle-scan-on t 1023(defcustom sql-oracle-scan-on t
1044 "Non-nil if placeholders should be replaced in Oracle SQLi. 1024 "Non-nil if placeholders should be replaced in Oracle SQLi.
1045 1025
@@ -1240,13 +1220,6 @@ add your name with a \"-U\" prefix (such as \"-Umark\") to the list."
1240 (push (match-string 1 row) res)))) 1220 (push (match-string 1 row) res))))
1241 (nreverse res)))) 1221 (nreverse res))))
1242 1222
1243(defcustom sql-postgres-statement-starters
1244 (regexp-opt '("with"))
1245 "Additional statement-starting keywords in Postgres."
1246 :type 'string
1247 :group 'SQL
1248 :version "28.1")
1249
1250;; Customization for Interbase 1223;; Customization for Interbase
1251 1224
1252(defcustom sql-interbase-program "isql" 1225(defcustom sql-interbase-program "isql"
@@ -1510,6 +1483,26 @@ Based on `comint-mode-map'.")
1510 table) 1483 table)
1511 "Syntax table used in `sql-mode' and `sql-interactive-mode'.") 1484 "Syntax table used in `sql-mode' and `sql-interactive-mode'.")
1512 1485
1486;; Motion Function Keywords
1487
1488(defvar sql-ansi-statement-starters
1489 (regexp-opt '("create" "alter" "drop"
1490 "select" "insert" "update" "delete" "merge"
1491 "grant" "revoke"))
1492 "Regexp of keywords that start SQL commands.
1493
1494All products share this list; products should define a regexp to
1495identify additional keywords in a variable defined by
1496the :statement feature.")
1497
1498(defvar sql-oracle-statement-starters
1499 (regexp-opt '("declare" "begin" "with"))
1500 "Additional statement-starting keywords in Oracle.")
1501
1502(defvar sql-postgres-statement-starters
1503 (regexp-opt '("with"))
1504 "Additional statement-starting keywords in Postgres.")
1505
1513;; Font lock support 1506;; Font lock support
1514 1507
1515(defvar sql-mode-font-lock-object-name 1508(defvar sql-mode-font-lock-object-name