diff options
| author | Juanma Barranquero | 2010-04-24 04:59:23 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2010-04-24 04:59:23 +0200 |
| commit | 063c63240306442ef4cbd82b7b0ca34b04b6a005 (patch) | |
| tree | c029b13de5bdd3a6300d59e6b6f74ad45d3161b1 | |
| parent | e89dee790913cca76031b2379ae91b77fbdaf8d9 (diff) | |
| download | emacs-063c63240306442ef4cbd82b7b0ca34b04b6a005.tar.gz emacs-063c63240306442ef4cbd82b7b0ca34b04b6a005.zip | |
* progmodes/sql.el: Fix typos.
| -rw-r--r-- | lisp/ChangeLog | 22 | ||||
| -rw-r--r-- | lisp/progmodes/sql.el | 97 |
2 files changed, 69 insertions, 50 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0235ca8e1a6..d09d201f880 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,25 @@ | |||
| 1 | 2010-04-24 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * progmodes/sql.el (sql-electric-stuff): Fix typo in tag. | ||
| 4 | (sql-oracle-program, sql-sqlite-options) | ||
| 5 | (sql-query-placeholders-and-send): Doc fixes. | ||
| 6 | (sql-set-product, sql-interactive-mode): Reflow docstrings. | ||
| 7 | (sql-imenu-generic-expression, sql-buffer) | ||
| 8 | (sql-mode-ansi-font-lock-keywords, sql-mode-oracle-font-lock-keywords) | ||
| 9 | (sql-mode-postgres-font-lock-keywords, sql-mode-ms-font-lock-keywords) | ||
| 10 | (sql-mode-sybase-font-lock-keywords) | ||
| 11 | (sql-mode-informix-font-lock-keywords) | ||
| 12 | (sql-mode-interbase-font-lock-keywords) | ||
| 13 | (sql-mode-ingres-font-lock-keywords, sql-mode-solid-font-lock-keywords) | ||
| 14 | (sql-mode-mysql-font-lock-keywords, sql-mode-sqlite-font-lock-keywords) | ||
| 15 | (sql-mode-db2-font-lock-keywords, sql-mode-font-lock-keywords) | ||
| 16 | (sql-product-feature, sql-highlight-product) | ||
| 17 | (comint-line-beginning-position, sql-rename-buffer) | ||
| 18 | (sql-toggle-pop-to-buffer-after-send-region) | ||
| 19 | (sql-oracle, sql-sybase, sql-informix, sql-sqlite, sql-mysql, sql-solid) | ||
| 20 | (sql-ingres, sql-ms, sql-postgres, sql-interbase, sql-db2, sql-linter): | ||
| 21 | Fix typos in docstrings. | ||
| 22 | |||
| 1 | 2010-04-23 Juri Linkov <juri@jurta.org> | 23 | 2010-04-23 Juri Linkov <juri@jurta.org> |
| 2 | 24 | ||
| 3 | * info.el (Info-fontify-node): Put Info-breadcrumbs to the `display' | 25 | * info.el (Info-fontify-node): Put Info-breadcrumbs to the `display' |
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index c7aa2291258..e79b13f3fe2 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el | |||
| @@ -419,7 +419,7 @@ send current input in the SQLi buffer to the process. | |||
| 419 | If set to nil, then you must use \\[comint-send-input] in order to send | 419 | If set to nil, then you must use \\[comint-send-input] in order to send |
| 420 | current input in the SQLi buffer to the process." | 420 | current input in the SQLi buffer to the process." |
| 421 | :type '(choice (const :tag "Nothing" nil) | 421 | :type '(choice (const :tag "Nothing" nil) |
| 422 | (const :tag "The semikolon `;'" semicolon) | 422 | (const :tag "The semicolon `;'" semicolon) |
| 423 | (const :tag "The string `go' by itself" go)) | 423 | (const :tag "The string `go' by itself" go)) |
| 424 | :version "20.8" | 424 | :version "20.8" |
| 425 | :group 'SQL) | 425 | :group 'SQL) |
| @@ -450,9 +450,9 @@ buffer is shown using `display-buffer'." | |||
| 450 | "Define interesting points in the SQL buffer for `imenu'. | 450 | "Define interesting points in the SQL buffer for `imenu'. |
| 451 | 451 | ||
| 452 | This is used to set `imenu-generic-expression' when SQL mode is | 452 | This is used to set `imenu-generic-expression' when SQL mode is |
| 453 | entered. Subsequent changes to sql-imenu-generic-expression will not | 453 | entered. Subsequent changes to `sql-imenu-generic-expression' will |
| 454 | affect existing SQL buffers because imenu-generic-expression is a | 454 | not affect existing SQL buffers because imenu-generic-expression is |
| 455 | local variable.") | 455 | a local variable.") |
| 456 | 456 | ||
| 457 | ;; history file | 457 | ;; history file |
| 458 | 458 | ||
| @@ -516,7 +516,7 @@ is changed." | |||
| 516 | 516 | ||
| 517 | Starts `sql-interactive-mode' after doing some setup. | 517 | Starts `sql-interactive-mode' after doing some setup. |
| 518 | 518 | ||
| 519 | Under NT, \"sqlplus\" usually starts the sqlplus \"GUI\". In order to | 519 | On Windows, \"sqlplus\" usually starts the sqlplus \"GUI\". In order to |
| 520 | start the sqlplus console, use \"plus33\" or something similar. You | 520 | start the sqlplus console, use \"plus33\" or something similar. You |
| 521 | will find the file in your Orant\\bin directory. | 521 | will find the file in your Orant\\bin directory. |
| 522 | 522 | ||
| @@ -542,9 +542,7 @@ The program can also specify a TCP connection. See `make-comint'." | |||
| 542 | :group 'SQL) | 542 | :group 'SQL) |
| 543 | 543 | ||
| 544 | (defcustom sql-sqlite-options nil | 544 | (defcustom sql-sqlite-options nil |
| 545 | "*List of additional options for `sql-sqlite-program'. | 545 | "*List of additional options for `sql-sqlite-program'." |
| 546 | The following list of options is reported to make things work | ||
| 547 | on Windows: \"-C\" \"-t\" \"-f\" \"-n\"." | ||
| 548 | :type '(repeat string) | 546 | :type '(repeat string) |
| 549 | :version "20.8" | 547 | :version "20.8" |
| 550 | :group 'SQL) | 548 | :group 'SQL) |
| @@ -727,7 +725,7 @@ Starts `sql-interactive-mode' after doing some setup." | |||
| 727 | (defvar sql-buffer nil | 725 | (defvar sql-buffer nil |
| 728 | "Current SQLi buffer. | 726 | "Current SQLi buffer. |
| 729 | 727 | ||
| 730 | The global value of sql-buffer is the name of the latest SQLi buffer | 728 | The global value of `sql-buffer' is the name of the latest SQLi buffer |
| 731 | created. Any SQL buffer created will make a local copy of this value. | 729 | created. Any SQL buffer created will make a local copy of this value. |
| 732 | See `sql-interactive-mode' for more on multiple sessions. If you want | 730 | See `sql-interactive-mode' for more on multiple sessions. If you want |
| 733 | to change the SQLi buffer a SQL mode sends its SQL strings to, change | 731 | to change the SQLi buffer a SQL mode sends its SQL strings to, change |
| @@ -992,8 +990,8 @@ statement. The format of variable should be a valid | |||
| 992 | This variable is used by `sql-mode' and `sql-interactive-mode'. The | 990 | This variable is used by `sql-mode' and `sql-interactive-mode'. The |
| 993 | regular expressions are created during compilation by calling the | 991 | regular expressions are created during compilation by calling the |
| 994 | function `regexp-opt'. Therefore, take a look at the source before | 992 | function `regexp-opt'. Therefore, take a look at the source before |
| 995 | you define your own sql-mode-ansi-font-lock-keywords. You may want to | 993 | you define your own `sql-mode-ansi-font-lock-keywords'. You may want |
| 996 | add functions and PL/SQL keywords.") | 994 | to add functions and PL/SQL keywords.") |
| 997 | 995 | ||
| 998 | (defvar sql-mode-oracle-font-lock-keywords | 996 | (defvar sql-mode-oracle-font-lock-keywords |
| 999 | (let ((oracle-functions (sql-keywords-re | 997 | (let ((oracle-functions (sql-keywords-re |
| @@ -1208,7 +1206,7 @@ add functions and PL/SQL keywords.") | |||
| 1208 | This variable is used by `sql-mode' and `sql-interactive-mode'. The | 1206 | This variable is used by `sql-mode' and `sql-interactive-mode'. The |
| 1209 | regular expressions are created during compilation by calling the | 1207 | regular expressions are created during compilation by calling the |
| 1210 | function `regexp-opt'. Therefore, take a look at the source before | 1208 | function `regexp-opt'. Therefore, take a look at the source before |
| 1211 | you define your own sql-mode-oracle-font-lock-keywords. You may want | 1209 | you define your own `sql-mode-oracle-font-lock-keywords'. You may want |
| 1212 | to add functions and PL/SQL keywords.") | 1210 | to add functions and PL/SQL keywords.") |
| 1213 | 1211 | ||
| 1214 | (defvar sql-mode-postgres-font-lock-keywords | 1212 | (defvar sql-mode-postgres-font-lock-keywords |
| @@ -1296,7 +1294,7 @@ to add functions and PL/SQL keywords.") | |||
| 1296 | This variable is used by `sql-mode' and `sql-interactive-mode'. The | 1294 | This variable is used by `sql-mode' and `sql-interactive-mode'. The |
| 1297 | regular expressions are created during compilation by calling the | 1295 | regular expressions are created during compilation by calling the |
| 1298 | function `regexp-opt'. Therefore, take a look at the source before | 1296 | function `regexp-opt'. Therefore, take a look at the source before |
| 1299 | you define your own sql-mode-postgres-font-lock-keywords.") | 1297 | you define your own `sql-mode-postgres-font-lock-keywords'.") |
| 1300 | 1298 | ||
| 1301 | (defvar sql-mode-linter-font-lock-keywords | 1299 | (defvar sql-mode-linter-font-lock-keywords |
| 1302 | (let ((linter-keywords (sql-keywords-re | 1300 | (let ((linter-keywords (sql-keywords-re |
| @@ -1482,7 +1480,7 @@ function `regexp-opt'.") | |||
| 1482 | This variable is used by `sql-mode' and `sql-interactive-mode'. The | 1480 | This variable is used by `sql-mode' and `sql-interactive-mode'. The |
| 1483 | regular expressions are created during compilation by calling the | 1481 | regular expressions are created during compilation by calling the |
| 1484 | function `regexp-opt'. Therefore, take a look at the source before | 1482 | function `regexp-opt'. Therefore, take a look at the source before |
| 1485 | you define your own sql-mode-ms-font-lock-keywords.") | 1483 | you define your own `sql-mode-ms-font-lock-keywords'.") |
| 1486 | 1484 | ||
| 1487 | (defvar sql-mode-sybase-font-lock-keywords nil | 1485 | (defvar sql-mode-sybase-font-lock-keywords nil |
| 1488 | "Sybase SQL keywords used by font-lock. | 1486 | "Sybase SQL keywords used by font-lock. |
| @@ -1490,7 +1488,7 @@ you define your own sql-mode-ms-font-lock-keywords.") | |||
| 1490 | This variable is used by `sql-mode' and `sql-interactive-mode'. The | 1488 | This variable is used by `sql-mode' and `sql-interactive-mode'. The |
| 1491 | regular expressions are created during compilation by calling the | 1489 | regular expressions are created during compilation by calling the |
| 1492 | function `regexp-opt'. Therefore, take a look at the source before | 1490 | function `regexp-opt'. Therefore, take a look at the source before |
| 1493 | you define your own sql-mode-sybase-font-lock-keywords.") | 1491 | you define your own `sql-mode-sybase-font-lock-keywords'.") |
| 1494 | 1492 | ||
| 1495 | (defvar sql-mode-informix-font-lock-keywords nil | 1493 | (defvar sql-mode-informix-font-lock-keywords nil |
| 1496 | "Informix SQL keywords used by font-lock. | 1494 | "Informix SQL keywords used by font-lock. |
| @@ -1498,7 +1496,7 @@ you define your own sql-mode-sybase-font-lock-keywords.") | |||
| 1498 | This variable is used by `sql-mode' and `sql-interactive-mode'. The | 1496 | This variable is used by `sql-mode' and `sql-interactive-mode'. The |
| 1499 | regular expressions are created during compilation by calling the | 1497 | regular expressions are created during compilation by calling the |
| 1500 | function `regexp-opt'. Therefore, take a look at the source before | 1498 | function `regexp-opt'. Therefore, take a look at the source before |
| 1501 | you define your own sql-mode-informix-font-lock-keywords.") | 1499 | you define your own `sql-mode-informix-font-lock-keywords'.") |
| 1502 | 1500 | ||
| 1503 | (defvar sql-mode-interbase-font-lock-keywords nil | 1501 | (defvar sql-mode-interbase-font-lock-keywords nil |
| 1504 | "Interbase SQL keywords used by font-lock. | 1502 | "Interbase SQL keywords used by font-lock. |
| @@ -1506,7 +1504,7 @@ you define your own sql-mode-informix-font-lock-keywords.") | |||
| 1506 | This variable is used by `sql-mode' and `sql-interactive-mode'. The | 1504 | This variable is used by `sql-mode' and `sql-interactive-mode'. The |
| 1507 | regular expressions are created during compilation by calling the | 1505 | regular expressions are created during compilation by calling the |
| 1508 | function `regexp-opt'. Therefore, take a look at the source before | 1506 | function `regexp-opt'. Therefore, take a look at the source before |
| 1509 | you define your own sql-mode-interbase-font-lock-keywords.") | 1507 | you define your own `sql-mode-interbase-font-lock-keywords'.") |
| 1510 | 1508 | ||
| 1511 | (defvar sql-mode-ingres-font-lock-keywords nil | 1509 | (defvar sql-mode-ingres-font-lock-keywords nil |
| 1512 | "Ingres SQL keywords used by font-lock. | 1510 | "Ingres SQL keywords used by font-lock. |
| @@ -1514,7 +1512,7 @@ you define your own sql-mode-interbase-font-lock-keywords.") | |||
| 1514 | This variable is used by `sql-mode' and `sql-interactive-mode'. The | 1512 | This variable is used by `sql-mode' and `sql-interactive-mode'. The |
| 1515 | regular expressions are created during compilation by calling the | 1513 | regular expressions are created during compilation by calling the |
| 1516 | function `regexp-opt'. Therefore, take a look at the source before | 1514 | function `regexp-opt'. Therefore, take a look at the source before |
| 1517 | you define your own sql-mode-interbase-font-lock-keywords.") | 1515 | you define your own `sql-mode-interbase-font-lock-keywords'.") |
| 1518 | 1516 | ||
| 1519 | (defvar sql-mode-solid-font-lock-keywords nil | 1517 | (defvar sql-mode-solid-font-lock-keywords nil |
| 1520 | "Solid SQL keywords used by font-lock. | 1518 | "Solid SQL keywords used by font-lock. |
| @@ -1522,7 +1520,7 @@ you define your own sql-mode-interbase-font-lock-keywords.") | |||
| 1522 | This variable is used by `sql-mode' and `sql-interactive-mode'. The | 1520 | This variable is used by `sql-mode' and `sql-interactive-mode'. The |
| 1523 | regular expressions are created during compilation by calling the | 1521 | regular expressions are created during compilation by calling the |
| 1524 | function `regexp-opt'. Therefore, take a look at the source before | 1522 | function `regexp-opt'. Therefore, take a look at the source before |
| 1525 | you define your own sql-mode-solid-font-lock-keywords.") | 1523 | you define your own `sql-mode-solid-font-lock-keywords'.") |
| 1526 | 1524 | ||
| 1527 | (defvar sql-mode-mysql-font-lock-keywords | 1525 | (defvar sql-mode-mysql-font-lock-keywords |
| 1528 | (let ((mysql-funcs (sql-keywords-re | 1526 | (let ((mysql-funcs (sql-keywords-re |
| @@ -1599,7 +1597,7 @@ you define your own sql-mode-solid-font-lock-keywords.") | |||
| 1599 | This variable is used by `sql-mode' and `sql-interactive-mode'. The | 1597 | This variable is used by `sql-mode' and `sql-interactive-mode'. The |
| 1600 | regular expressions are created during compilation by calling the | 1598 | regular expressions are created during compilation by calling the |
| 1601 | function `regexp-opt'. Therefore, take a look at the source before | 1599 | function `regexp-opt'. Therefore, take a look at the source before |
| 1602 | you define your own sql-mode-mysql-font-lock-keywords.") | 1600 | you define your own `sql-mode-mysql-font-lock-keywords'.") |
| 1603 | 1601 | ||
| 1604 | (defvar sql-mode-sqlite-font-lock-keywords nil | 1602 | (defvar sql-mode-sqlite-font-lock-keywords nil |
| 1605 | "SQLite SQL keywords used by font-lock. | 1603 | "SQLite SQL keywords used by font-lock. |
| @@ -1607,7 +1605,7 @@ you define your own sql-mode-mysql-font-lock-keywords.") | |||
| 1607 | This variable is used by `sql-mode' and `sql-interactive-mode'. The | 1605 | This variable is used by `sql-mode' and `sql-interactive-mode'. The |
| 1608 | regular expressions are created during compilation by calling the | 1606 | regular expressions are created during compilation by calling the |
| 1609 | function `regexp-opt'. Therefore, take a look at the source before | 1607 | function `regexp-opt'. Therefore, take a look at the source before |
| 1610 | you define your own sql-mode-sqlite-font-lock-keywords.") | 1608 | you define your own `sql-mode-sqlite-font-lock-keywords'.") |
| 1611 | 1609 | ||
| 1612 | (defvar sql-mode-db2-font-lock-keywords nil | 1610 | (defvar sql-mode-db2-font-lock-keywords nil |
| 1613 | "DB2 SQL keywords used by font-lock. | 1611 | "DB2 SQL keywords used by font-lock. |
| @@ -1615,14 +1613,14 @@ you define your own sql-mode-sqlite-font-lock-keywords.") | |||
| 1615 | This variable is used by `sql-mode' and `sql-interactive-mode'. The | 1613 | This variable is used by `sql-mode' and `sql-interactive-mode'. The |
| 1616 | regular expressions are created during compilation by calling the | 1614 | regular expressions are created during compilation by calling the |
| 1617 | function `regexp-opt'. Therefore, take a look at the source before | 1615 | function `regexp-opt'. Therefore, take a look at the source before |
| 1618 | you define your own sql-mode-db2-font-lock-keywords.") | 1616 | you define your own `sql-mode-db2-font-lock-keywords'.") |
| 1619 | 1617 | ||
| 1620 | (defvar sql-mode-font-lock-keywords nil | 1618 | (defvar sql-mode-font-lock-keywords nil |
| 1621 | "SQL keywords used by font-lock. | 1619 | "SQL keywords used by font-lock. |
| 1622 | 1620 | ||
| 1623 | Setting this variable directly no longer has any affect. Use | 1621 | Setting this variable directly no longer has any affect. Use |
| 1624 | `sql-product' and `sql-add-product-keywords' to control the | 1622 | `sql-product' and `sql-add-product-keywords' to control the |
| 1625 | highlighting rules in sql-mode.") | 1623 | highlighting rules in SQL mode.") |
| 1626 | 1624 | ||
| 1627 | 1625 | ||
| 1628 | 1626 | ||
| @@ -1631,7 +1629,7 @@ highlighting rules in sql-mode.") | |||
| 1631 | (defun sql-product-feature (feature &optional product) | 1629 | (defun sql-product-feature (feature &optional product) |
| 1632 | "Lookup `feature' needed to support the current SQL product. | 1630 | "Lookup `feature' needed to support the current SQL product. |
| 1633 | 1631 | ||
| 1634 | See \[sql-product-alist] for a list of products and supported features." | 1632 | See `sql-product-alist' for a list of products and supported features." |
| 1635 | (plist-get | 1633 | (plist-get |
| 1636 | (cdr (assoc (or product sql-product) | 1634 | (cdr (assoc (or product sql-product) |
| 1637 | sql-product-alist)) | 1635 | sql-product-alist)) |
| @@ -1720,8 +1718,7 @@ adds a fontification pattern to fontify identifiers ending in | |||
| 1720 | ;;; Functions to switch highlighting | 1718 | ;;; Functions to switch highlighting |
| 1721 | 1719 | ||
| 1722 | (defun sql-highlight-product () | 1720 | (defun sql-highlight-product () |
| 1723 | "Turns on the appropriate font highlighting for the SQL product | 1721 | "Turn on the appropriate font highlighting for the SQL product selected." |
| 1724 | selected." | ||
| 1725 | (when (derived-mode-p 'sql-mode) | 1722 | (when (derived-mode-p 'sql-mode) |
| 1726 | ;; Setup font-lock | 1723 | ;; Setup font-lock |
| 1727 | (sql-product-font-lock nil t) | 1724 | (sql-product-font-lock nil t) |
| @@ -1730,8 +1727,7 @@ selected." | |||
| 1730 | (setq mode-name (concat "SQL[" (prin1-to-string sql-product) "]")))) | 1727 | (setq mode-name (concat "SQL[" (prin1-to-string sql-product) "]")))) |
| 1731 | 1728 | ||
| 1732 | (defun sql-set-product (product) | 1729 | (defun sql-set-product (product) |
| 1733 | "Set `sql-product' to product and enable appropriate | 1730 | "Set `sql-product' to product and enable appropriate highlighting." |
| 1734 | highlighting." | ||
| 1735 | (interactive | 1731 | (interactive |
| 1736 | (list (completing-read "Enter SQL product: " | 1732 | (list (completing-read "Enter SQL product: " |
| 1737 | (mapcar (lambda (info) (symbol-name (car info))) | 1733 | (mapcar (lambda (info) (symbol-name (car info))) |
| @@ -1752,7 +1748,7 @@ highlighting." | |||
| 1752 | (if (not (fboundp 'comint-line-beginning-position)) | 1748 | (if (not (fboundp 'comint-line-beginning-position)) |
| 1753 | ;; comint-line-beginning-position is defined in Emacs 21 | 1749 | ;; comint-line-beginning-position is defined in Emacs 21 |
| 1754 | (defun comint-line-beginning-position () | 1750 | (defun comint-line-beginning-position () |
| 1755 | "Returns the buffer position of the beginning of the line, after any prompt. | 1751 | "Return the buffer position of the beginning of the line, after any prompt. |
| 1756 | The prompt is assumed to be any text at the beginning of the line matching | 1752 | The prompt is assumed to be any text at the beginning of the line matching |
| 1757 | the regular expression `comint-prompt-regexp', a buffer local variable." | 1753 | the regular expression `comint-prompt-regexp', a buffer local variable." |
| 1758 | (save-excursion (comint-bol nil) (point)))) | 1754 | (save-excursion (comint-bol nil) (point)))) |
| @@ -1974,7 +1970,7 @@ This is used to set `sql-alternate-buffer-name' within | |||
| 1974 | sql-database))) | 1970 | sql-database))) |
| 1975 | 1971 | ||
| 1976 | (defun sql-rename-buffer () | 1972 | (defun sql-rename-buffer () |
| 1977 | "Renames a SQLi buffer." | 1973 | "Rename a SQLi buffer." |
| 1978 | (interactive) | 1974 | (interactive) |
| 1979 | (rename-buffer (format "*SQL: %s*" sql-alternate-buffer-name) t)) | 1975 | (rename-buffer (format "*SQL: %s*" sql-alternate-buffer-name) t)) |
| 1980 | 1976 | ||
| @@ -2007,8 +2003,8 @@ Inserts SELECT or commas if appropriate." | |||
| 2007 | (insert column) | 2003 | (insert column) |
| 2008 | (message "%s" column)))) | 2004 | (message "%s" column)))) |
| 2009 | 2005 | ||
| 2010 | ;; On NT, SQL*Plus for Oracle turns on full buffering for stdout if it | 2006 | ;; On Windows, SQL*Plus for Oracle turns on full buffering for stdout |
| 2011 | ;; is not attached to a character device; therefore placeholder | 2007 | ;; if it is not attached to a character device; therefore placeholder |
| 2012 | ;; replacement by SQL*Plus is fully buffered. The workaround lets | 2008 | ;; replacement by SQL*Plus is fully buffered. The workaround lets |
| 2013 | ;; Emacs query for the placeholders. | 2009 | ;; Emacs query for the placeholders. |
| 2014 | 2010 | ||
| @@ -2017,8 +2013,9 @@ Inserts SELECT or commas if appropriate." | |||
| 2017 | 2013 | ||
| 2018 | (defun sql-query-placeholders-and-send (proc string) | 2014 | (defun sql-query-placeholders-and-send (proc string) |
| 2019 | "Send to PROC input STRING, maybe replacing placeholders. | 2015 | "Send to PROC input STRING, maybe replacing placeholders. |
| 2020 | Placeholders are words starting with and ampersand like &this. | 2016 | Placeholders are words starting with an ampersand like &this. |
| 2021 | This function is used for `comint-input-sender' if using `sql-oracle' on NT." | 2017 | This function is used for `comint-input-sender' if using |
| 2018 | `sql-oracle' on Windows." | ||
| 2022 | (while (string-match "&\\(\\sw+\\)" string) | 2019 | (while (string-match "&\\(\\sw+\\)" string) |
| 2023 | (setq string (replace-match | 2020 | (setq string (replace-match |
| 2024 | (read-from-minibuffer | 2021 | (read-from-minibuffer |
| @@ -2104,7 +2101,7 @@ Every newline in STRING will be preceded with a space and a backslash." | |||
| 2104 | "Toggle `sql-pop-to-buffer-after-send-region'. | 2101 | "Toggle `sql-pop-to-buffer-after-send-region'. |
| 2105 | 2102 | ||
| 2106 | If given the optional parameter VALUE, sets | 2103 | If given the optional parameter VALUE, sets |
| 2107 | sql-toggle-pop-to-buffer-after-send-region to VALUE." | 2104 | `sql-toggle-pop-to-buffer-after-send-region' to VALUE." |
| 2108 | (interactive "P") | 2105 | (interactive "P") |
| 2109 | (if value | 2106 | (if value |
| 2110 | (setq sql-pop-to-buffer-after-send-region value) | 2107 | (setq sql-pop-to-buffer-after-send-region value) |
| @@ -2187,8 +2184,8 @@ you must tell Emacs. Here's how to do that in your `~/.emacs' file: | |||
| 2187 | "Major mode to use a SQL interpreter interactively. | 2184 | "Major mode to use a SQL interpreter interactively. |
| 2188 | 2185 | ||
| 2189 | Do not call this function by yourself. The environment must be | 2186 | Do not call this function by yourself. The environment must be |
| 2190 | initialized by an entry function specific for the SQL interpreter. See | 2187 | initialized by an entry function specific for the SQL interpreter. |
| 2191 | `sql-help' for a list of available entry functions. | 2188 | See `sql-help' for a list of available entry functions. |
| 2192 | 2189 | ||
| 2193 | \\[comint-send-input] after the end of the process' output sends the | 2190 | \\[comint-send-input] after the end of the process' output sends the |
| 2194 | text from the end of process to the end of the current line. | 2191 | text from the end of process to the end of the current line. |
| @@ -2360,7 +2357,7 @@ the variables `sql-user', `sql-password', and `sql-database' as | |||
| 2360 | defaults, if set. Additional command line parameters can be stored in | 2357 | defaults, if set. Additional command line parameters can be stored in |
| 2361 | the list `sql-oracle-options'. | 2358 | the list `sql-oracle-options'. |
| 2362 | 2359 | ||
| 2363 | The buffer is put in sql-interactive-mode, giving commands for sending | 2360 | The buffer is put in SQL interactive mode, giving commands for sending |
| 2364 | input. See `sql-interactive-mode'. | 2361 | input. See `sql-interactive-mode'. |
| 2365 | 2362 | ||
| 2366 | To specify a coding system for converting non-ASCII characters | 2363 | To specify a coding system for converting non-ASCII characters |
| @@ -2392,7 +2389,7 @@ parameters and command options." | |||
| 2392 | (nconc (list parameter) sql-oracle-options) | 2389 | (nconc (list parameter) sql-oracle-options) |
| 2393 | sql-oracle-options)) | 2390 | sql-oracle-options)) |
| 2394 | (set-buffer (apply 'make-comint "SQL" sql-oracle-program nil parameter)) | 2391 | (set-buffer (apply 'make-comint "SQL" sql-oracle-program nil parameter)) |
| 2395 | ;; SQL*Plus is buffered on WindowsNT; this handles &placeholders. | 2392 | ;; SQL*Plus is buffered on Windows; this handles &placeholders. |
| 2396 | (if (eq window-system 'w32) | 2393 | (if (eq window-system 'w32) |
| 2397 | (setq comint-input-sender 'sql-query-placeholders-and-send)))) | 2394 | (setq comint-input-sender 'sql-query-placeholders-and-send)))) |
| 2398 | 2395 | ||
| @@ -2411,7 +2408,7 @@ the variables `sql-server', `sql-user', `sql-password', and | |||
| 2411 | `sql-database' as defaults, if set. Additional command line parameters | 2408 | `sql-database' as defaults, if set. Additional command line parameters |
| 2412 | can be stored in the list `sql-sybase-options'. | 2409 | can be stored in the list `sql-sybase-options'. |
| 2413 | 2410 | ||
| 2414 | The buffer is put in sql-interactive-mode, giving commands for sending | 2411 | The buffer is put in SQL interactive mode, giving commands for sending |
| 2415 | input. See `sql-interactive-mode'. | 2412 | input. See `sql-interactive-mode'. |
| 2416 | 2413 | ||
| 2417 | To specify a coding system for converting non-ASCII characters | 2414 | To specify a coding system for converting non-ASCII characters |
| @@ -2455,7 +2452,7 @@ If buffer exists and a process is running, just switch to buffer | |||
| 2455 | Interpreter used comes from variable `sql-informix-program'. Login uses | 2452 | Interpreter used comes from variable `sql-informix-program'. Login uses |
| 2456 | the variable `sql-database' as default, if set. | 2453 | the variable `sql-database' as default, if set. |
| 2457 | 2454 | ||
| 2458 | The buffer is put in sql-interactive-mode, giving commands for sending | 2455 | The buffer is put in SQL interactive mode, giving commands for sending |
| 2459 | input. See `sql-interactive-mode'. | 2456 | input. See `sql-interactive-mode'. |
| 2460 | 2457 | ||
| 2461 | To specify a coding system for converting non-ASCII characters | 2458 | To specify a coding system for converting non-ASCII characters |
| @@ -2494,7 +2491,7 @@ the variables `sql-user', `sql-password', `sql-database', and | |||
| 2494 | `sql-server' as defaults, if set. Additional command line parameters | 2491 | `sql-server' as defaults, if set. Additional command line parameters |
| 2495 | can be stored in the list `sql-sqlite-options'. | 2492 | can be stored in the list `sql-sqlite-options'. |
| 2496 | 2493 | ||
| 2497 | The buffer is put in sql-interactive-mode, giving commands for sending | 2494 | The buffer is put in SQL interactive mode, giving commands for sending |
| 2498 | input. See `sql-interactive-mode'. | 2495 | input. See `sql-interactive-mode'. |
| 2499 | 2496 | ||
| 2500 | To specify a coding system for converting non-ASCII characters | 2497 | To specify a coding system for converting non-ASCII characters |
| @@ -2538,7 +2535,7 @@ the variables `sql-user', `sql-password', `sql-database', and | |||
| 2538 | `sql-server' as defaults, if set. Additional command line parameters | 2535 | `sql-server' as defaults, if set. Additional command line parameters |
| 2539 | can be stored in the list `sql-mysql-options'. | 2536 | can be stored in the list `sql-mysql-options'. |
| 2540 | 2537 | ||
| 2541 | The buffer is put in sql-interactive-mode, giving commands for sending | 2538 | The buffer is put in SQL interactive mode, giving commands for sending |
| 2542 | input. See `sql-interactive-mode'. | 2539 | input. See `sql-interactive-mode'. |
| 2543 | 2540 | ||
| 2544 | To specify a coding system for converting non-ASCII characters | 2541 | To specify a coding system for converting non-ASCII characters |
| @@ -2585,7 +2582,7 @@ Interpreter used comes from variable `sql-solid-program'. Login uses | |||
| 2585 | the variables `sql-user', `sql-password', and `sql-server' as | 2582 | the variables `sql-user', `sql-password', and `sql-server' as |
| 2586 | defaults, if set. | 2583 | defaults, if set. |
| 2587 | 2584 | ||
| 2588 | The buffer is put in sql-interactive-mode, giving commands for sending | 2585 | The buffer is put in SQL interactive mode, giving commands for sending |
| 2589 | input. See `sql-interactive-mode'. | 2586 | input. See `sql-interactive-mode'. |
| 2590 | 2587 | ||
| 2591 | To specify a coding system for converting non-ASCII characters | 2588 | To specify a coding system for converting non-ASCII characters |
| @@ -2627,7 +2624,7 @@ If buffer exists and a process is running, just switch to buffer | |||
| 2627 | Interpreter used comes from variable `sql-ingres-program'. Login uses | 2624 | Interpreter used comes from variable `sql-ingres-program'. Login uses |
| 2628 | the variable `sql-database' as default, if set. | 2625 | the variable `sql-database' as default, if set. |
| 2629 | 2626 | ||
| 2630 | The buffer is put in sql-interactive-mode, giving commands for sending | 2627 | The buffer is put in SQL interactive mode, giving commands for sending |
| 2631 | input. See `sql-interactive-mode'. | 2628 | input. See `sql-interactive-mode'. |
| 2632 | 2629 | ||
| 2633 | To specify a coding system for converting non-ASCII characters | 2630 | To specify a coding system for converting non-ASCII characters |
| @@ -2664,7 +2661,7 @@ variables `sql-user', `sql-password', `sql-database', and `sql-server' | |||
| 2664 | as defaults, if set. Additional command line parameters can be stored | 2661 | as defaults, if set. Additional command line parameters can be stored |
| 2665 | in the list `sql-ms-options'. | 2662 | in the list `sql-ms-options'. |
| 2666 | 2663 | ||
| 2667 | The buffer is put in sql-interactive-mode, giving commands for sending | 2664 | The buffer is put in SQL interactive mode, giving commands for sending |
| 2668 | input. See `sql-interactive-mode'. | 2665 | input. See `sql-interactive-mode'. |
| 2669 | 2666 | ||
| 2670 | To specify a coding system for converting non-ASCII characters | 2667 | To specify a coding system for converting non-ASCII characters |
| @@ -2717,7 +2714,7 @@ the variables `sql-database' and `sql-server' as default, if set. | |||
| 2717 | Additional command line parameters can be stored in the list | 2714 | Additional command line parameters can be stored in the list |
| 2718 | `sql-postgres-options'. | 2715 | `sql-postgres-options'. |
| 2719 | 2716 | ||
| 2720 | The buffer is put in sql-interactive-mode, giving commands for sending | 2717 | The buffer is put in SQL interactive mode, giving commands for sending |
| 2721 | input. See `sql-interactive-mode'. | 2718 | input. See `sql-interactive-mode'. |
| 2722 | 2719 | ||
| 2723 | To specify a coding system for converting non-ASCII characters | 2720 | To specify a coding system for converting non-ASCII characters |
| @@ -2768,7 +2765,7 @@ Interpreter used comes from variable `sql-interbase-program'. Login | |||
| 2768 | uses the variables `sql-user', `sql-password', and `sql-database' as | 2765 | uses the variables `sql-user', `sql-password', and `sql-database' as |
| 2769 | defaults, if set. | 2766 | defaults, if set. |
| 2770 | 2767 | ||
| 2771 | The buffer is put in sql-interactive-mode, giving commands for sending | 2768 | The buffer is put in SQL interactive mode, giving commands for sending |
| 2772 | input. See `sql-interactive-mode'. | 2769 | input. See `sql-interactive-mode'. |
| 2773 | 2770 | ||
| 2774 | To specify a coding system for converting non-ASCII characters | 2771 | To specify a coding system for converting non-ASCII characters |
| @@ -2810,7 +2807,7 @@ If buffer exists and a process is running, just switch to buffer | |||
| 2810 | Interpreter used comes from variable `sql-db2-program'. There is not | 2807 | Interpreter used comes from variable `sql-db2-program'. There is not |
| 2811 | automatic login. | 2808 | automatic login. |
| 2812 | 2809 | ||
| 2813 | The buffer is put in sql-interactive-mode, giving commands for sending | 2810 | The buffer is put in SQL interactive mode, giving commands for sending |
| 2814 | input. See `sql-interactive-mode'. | 2811 | input. See `sql-interactive-mode'. |
| 2815 | 2812 | ||
| 2816 | If you use \\[sql-accumulate-and-indent] to send multiline commands to | 2813 | If you use \\[sql-accumulate-and-indent] to send multiline commands to |
| @@ -2859,7 +2856,7 @@ local connections, `sql-server' refers to the server name from the | |||
| 2859 | for this to work). If `sql-password' is an empty string, inl will use | 2856 | for this to work). If `sql-password' is an empty string, inl will use |
| 2860 | an empty password. | 2857 | an empty password. |
| 2861 | 2858 | ||
| 2862 | The buffer is put in sql-interactive-mode, giving commands for sending | 2859 | The buffer is put in SQL interactive mode, giving commands for sending |
| 2863 | input. See `sql-interactive-mode'. | 2860 | input. See `sql-interactive-mode'. |
| 2864 | 2861 | ||
| 2865 | \(Type \\[describe-mode] in the SQL buffer for a list of commands.)" | 2862 | \(Type \\[describe-mode] in the SQL buffer for a list of commands.)" |