diff options
| author | Richard M. Stallman | 1999-02-19 04:27:18 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1999-02-19 04:27:18 +0000 |
| commit | c04bb32e2186e4fe4ee6a952e59efc15c28885eb (patch) | |
| tree | b26def46949bb83affebcfe4746def8fa634b88e | |
| parent | c7055d6660dc1e2d000bd7a3e28f6bd8872630c4 (diff) | |
| download | emacs-c04bb32e2186e4fe4ee6a952e59efc15c28885eb.tar.gz emacs-c04bb32e2186e4fe4ee6a952e59efc15c28885eb.zip | |
Set version to 1.4.1. Changed mail address to
alex@gnu.org. Mention the mailin listg sql.el@gnu.org.
(sql-input-ring-separator): Doc fix.
(sql-mode-syntax-table): double-dash starts comments is defined as
". 56" instead of ". 12b" for XEmacs.
(sql-stop, sql-interactive-mode): Doc fixes.
(sql-postgres): Queries for database and server, not just one.
(sql-set-sqli-buffer): sql-set-sqli-hook must be quoted.
| -rw-r--r-- | lisp/progmodes/sql.el | 46 |
1 files changed, 27 insertions, 19 deletions
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index c8b7a2e62eb..03b03b6a61d 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el | |||
| @@ -2,9 +2,9 @@ | |||
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1998, 1999 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1998, 1999 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Alex Schroeder <a.schroeder@bsiag.ch> | 5 | ;; Author: Alex Schroeder <alex@gnu.org> |
| 6 | ;; Maintainer: Alex Schroeder <a.schroeder@bsiag.ch> | 6 | ;; Maintainer: Alex Schroeder <alex@gnu.org> |
| 7 | ;; Version: 1.4.0 | 7 | ;; Version: 1.4.1 |
| 8 | ;; Keywords: comm languages processes | 8 | ;; Keywords: comm languages processes |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| @@ -26,8 +26,10 @@ | |||
| 26 | 26 | ||
| 27 | ;;; Commentary: | 27 | ;;; Commentary: |
| 28 | 28 | ||
| 29 | ;; Please send me bug reports and bug fixes so that I can merge them | 29 | ;; Please send bug reports and bug fixes to the mailing list at |
| 30 | ;; into the master source. | 30 | ;; sql.el@gnu.org so that I can merge them into the master source. If |
| 31 | ;; you want to subscribe to the mailing list, send mail to | ||
| 32 | ;; sql.el-request@gnu.org with 'subscribe' in the subject line. | ||
| 31 | 33 | ||
| 32 | ;; You can get the latest version of this file from my homepage | 34 | ;; You can get the latest version of this file from my homepage |
| 33 | ;; <URL:http://www.geocities.com/TimesSquare/6120/emacs.html>. | 35 | ;; <URL:http://www.geocities.com/TimesSquare/6120/emacs.html>. |
| @@ -173,10 +175,13 @@ the input ring is initialized from a history file. | |||
| 173 | 175 | ||
| 174 | This variable used to locally set `comint-input-ring-separator' when | 176 | This variable used to locally set `comint-input-ring-separator' when |
| 175 | reading or writing the history file. `comint-input-ring-separator' is | 177 | reading or writing the history file. `comint-input-ring-separator' is |
| 176 | new in Emacs 20.4; if your Emacs does not have it, setting | 178 | not yet part of Emacs; if your Emacs does not have it, setting |
| 177 | `sql-input-ring-separator' will have no effect. In that case multiline | 179 | `sql-input-ring-separator' will have no effect. In that case multiline |
| 178 | commands will be split into several commands when the input history is | 180 | commands will be split into several commands when the input history is |
| 179 | read, as if you had set `sql-input-ring-separator' to \"\\n\"." | 181 | read, as if you had set `sql-input-ring-separator' to \"\\n\". |
| 182 | |||
| 183 | The source code contains a link to a homepage that might have a patch | ||
| 184 | for comint.el to download." | ||
| 180 | :type 'string | 185 | :type 'string |
| 181 | :group 'SQL) | 186 | :group 'SQL) |
| 182 | 187 | ||
| @@ -411,7 +416,9 @@ Used by `sql-rename-buffer'.") | |||
| 411 | (modify-syntax-entry ?/ ". 14" table) | 416 | (modify-syntax-entry ?/ ". 14" table) |
| 412 | (modify-syntax-entry ?* ". 23" table) | 417 | (modify-syntax-entry ?* ". 23" table) |
| 413 | ;; double-dash starts comment | 418 | ;; double-dash starts comment |
| 414 | (modify-syntax-entry ?- ". 12b" table) | 419 | (if (string-match "XEmacs\\|Lucid" emacs-version) |
| 420 | (modify-syntax-entry ?- ". 56" table) | ||
| 421 | (modify-syntax-entry ?- ". 12b" table)) | ||
| 415 | ;; newline and formfeed end coments | 422 | ;; newline and formfeed end coments |
| 416 | (modify-syntax-entry ?\n "> b" table) | 423 | (modify-syntax-entry ?\n "> b" table) |
| 417 | (modify-syntax-entry ?\f "> b" table) | 424 | (modify-syntax-entry ?\f "> b" table) |
| @@ -710,7 +717,7 @@ If you call it from anywhere else, it sets the global copy of | |||
| 710 | (if new-buffer | 717 | (if new-buffer |
| 711 | (progn | 718 | (progn |
| 712 | (setq sql-buffer new-buffer) | 719 | (setq sql-buffer new-buffer) |
| 713 | (run-hooks sql-set-sqli-hook))))) | 720 | (run-hooks 'sql-set-sqli-hook))))) |
| 714 | 721 | ||
| 715 | (defun sql-show-sqli-buffer () | 722 | (defun sql-show-sqli-buffer () |
| 716 | "Show the name of current SQLi buffer. | 723 | "Show the name of current SQLi buffer. |
| @@ -931,9 +938,7 @@ run. | |||
| 931 | 938 | ||
| 932 | Variable `sql-input-ring-file-name' controls the initialisation of the | 939 | Variable `sql-input-ring-file-name' controls the initialisation of the |
| 933 | input ring history. `comint-input-ring-file-name' is temporarily bound | 940 | input ring history. `comint-input-ring-file-name' is temporarily bound |
| 934 | to `sql-input-ring-file-name' and `comint-input-ring-separator' is | 941 | to `sql-input-ring-file-name' when reading the input history. |
| 935 | temporarily bound to `sql-input-ring-separator' when reading the input | ||
| 936 | history. | ||
| 937 | 942 | ||
| 938 | Variables `comint-output-filter-functions', a hook, and | 943 | Variables `comint-output-filter-functions', a hook, and |
| 939 | `comint-scroll-to-bottom-on-input' and | 944 | `comint-scroll-to-bottom-on-input' and |
| @@ -1001,8 +1006,7 @@ you entered, right above the output it created. | |||
| 1001 | Writes the input history to a history file using | 1006 | Writes the input history to a history file using |
| 1002 | `comint-write-input-ring' and inserts a short message in the SQL buffer. | 1007 | `comint-write-input-ring' and inserts a short message in the SQL buffer. |
| 1003 | `comint-comint-input-ring-file-name' is temporarily bound to | 1008 | `comint-comint-input-ring-file-name' is temporarily bound to |
| 1004 | `sql-input-ring-file-name' and `comint-input-ring-separator' is | 1009 | `sql-input-ring-file-name'. |
| 1005 | temporarily bound to `sql-input-ring-separator'. | ||
| 1006 | 1010 | ||
| 1007 | This function is a sentinel watching the SQL interpreter process. | 1011 | This function is a sentinel watching the SQL interpreter process. |
| 1008 | Sentinels will always get the two parameters PROCESS and EVENT." | 1012 | Sentinels will always get the two parameters PROCESS and EVENT." |
| @@ -1359,7 +1363,7 @@ If buffer exists and a process is running, just switch to buffer | |||
| 1359 | `*SQL*'. | 1363 | `*SQL*'. |
| 1360 | 1364 | ||
| 1361 | Interpreter used comes from variable `sql-postgres-program'. Login uses | 1365 | Interpreter used comes from variable `sql-postgres-program'. Login uses |
| 1362 | the variable `sql-database' as default, if set. | 1366 | the variables `sql-database' and `sql-server' as default, if set. |
| 1363 | 1367 | ||
| 1364 | The buffer is put in sql-interactive-mode, giving commands for sending | 1368 | The buffer is put in sql-interactive-mode, giving commands for sending |
| 1365 | input. See `sql-interactive-mode'. | 1369 | input. See `sql-interactive-mode'. |
| @@ -1380,12 +1384,16 @@ Try to set `comint-output-filter-functions' like this: | |||
| 1380 | (interactive) | 1384 | (interactive) |
| 1381 | (if (comint-check-proc "*SQL*") | 1385 | (if (comint-check-proc "*SQL*") |
| 1382 | (pop-to-buffer "*SQL*") | 1386 | (pop-to-buffer "*SQL*") |
| 1383 | (sql-get-login 'database) | 1387 | (sql-get-login 'database 'server) |
| 1384 | (message "Login...") | 1388 | (message "Login...") |
| 1385 | ;; username and password are ignored. | 1389 | ;; username and password are ignored. |
| 1386 | (if (string= "" sql-database) | 1390 | (let ((params)) |
| 1387 | (set-buffer (make-comint "SQL" sql-postgres-program nil)) | 1391 | (if (not (string= "" sql-database)) |
| 1388 | (set-buffer (make-comint "SQL" sql-postgres-program nil sql-database))) | 1392 | (setq params (append (list sql-database) params))) |
| 1393 | (if (not (string= "" sql-server)) | ||
| 1394 | (setq params (append (list "-h" sql-server) params))) | ||
| 1395 | (set-buffer (apply 'make-comint "SQL" sql-postgres-program | ||
| 1396 | nil params))) | ||
| 1389 | (setq sql-prompt-regexp "^.*> *") | 1397 | (setq sql-prompt-regexp "^.*> *") |
| 1390 | (setq sql-prompt-length 5) | 1398 | (setq sql-prompt-length 5) |
| 1391 | ;; This is a lousy hack to prevent psql from truncating it's output | 1399 | ;; This is a lousy hack to prevent psql from truncating it's output |