[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Oracle SQL-mode
From: |
James Sullivan |
Subject: |
Oracle SQL-mode |
Date: |
Thu, 15 Mar 2001 11:38:34 -0600 |
Hello. I got Jim Lange's sql-mode written specifically for Oracle
PL/SQL*Plus and it would not compile.
It gives me the following error:
!! Invalid read syntax (("] in a list" ))
What I dont understand is that ']' is in a string, not a list. Here is the
code: (the error is at the [describe-mode]' section):
(defun sql-mode ()
"Major mode for editing SQL*Plus batch files.
\{sql-mode-map}
sql-send-buffer and sql-send-region are commands that will send SQL*Plus
commands defined in the current buffer to SQL*Plus to be executed. Output
is displayed in the *sqlplus* buffer (which will open as separate window
if it does not already exist). (use `\[describe-mode]` while in *sqlplus*
buffer for information on sqlplus-mode.)
Entry to this mode calls the value of sqlplus-mode-hook with no args,
if that value is non-nil. Abbrev-mode is also enabled with the following
abbreviations available by default:
s -> Select
f -> From
w -> Where
o -> Order By
Use \[list-abbrevs] for a full list.
If the SQL statements to be executed contain variables prefixed with colons
or INTO clauses, the colons are converted into ampersands and the INTO
clauses
are removed before being sent to SQL*Plus. This provides compatibility with
Pro*C, SQL*Report, and SQL*Forms (.inp files). For example,
SELECT SYSDATE + :days_added INTO :variable FROM SYSTEM.DUAL
is converted to
SELECT SYSDATE + &days_added FROM SYSTEM.DUAL
and the user is prompted to enter the value of days_added."
(interactive)
(setq major-mode `sql-mode)
(setq mode-name "SQL")
(use-local-map sql-mode-map)
(set-syntax-table sql-mode-syntax-table)
(setq local-abbrev-table sql-mode-abbrev-table)
(abbrev-mode 1)
(setq abbrev-all-caps 1)
(setq require-final-newline t)
(run-hooks `sql-mode-hook)
)
any suggestions?
James Sullivan
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Oracle SQL-mode,
James Sullivan <=