diff options
| author | Richard M. Stallman | 2005-08-09 11:42:54 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-08-09 11:42:54 +0000 |
| commit | 8d68e9b54192a5276c4de27fd18fb750be6955f4 (patch) | |
| tree | 99e7058ab145479f55d46d194eb4fd14db06aaec /lisp/progmodes/sql.el | |
| parent | c56509c06c0b9e6a1a4b19c69e1ac8fab88c2367 (diff) | |
| download | emacs-8d68e9b54192a5276c4de27fd18fb750be6955f4.tar.gz emacs-8d68e9b54192a5276c4de27fd18fb750be6955f4.zip | |
(sql-interactive-mode-map): Use fboundp.
(sql-read-passwd): Use read-passwd.
Diffstat (limited to 'lisp/progmodes/sql.el')
| -rw-r--r-- | lisp/progmodes/sql.el | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 129137c32fd..7e259dfb6e4 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el | |||
| @@ -736,10 +736,11 @@ Used by `sql-rename-buffer'.") | |||
| 736 | 736 | ||
| 737 | (defvar sql-interactive-mode-map | 737 | (defvar sql-interactive-mode-map |
| 738 | (let ((map (make-sparse-keymap))) | 738 | (let ((map (make-sparse-keymap))) |
| 739 | (if (functionp 'set-keymap-parent) | 739 | (if (fboundp 'set-keymap-parent) |
| 740 | (set-keymap-parent map comint-mode-map); Emacs | 740 | (set-keymap-parent map comint-mode-map); Emacs |
| 741 | (set-keymap-parents map (list comint-mode-map))); XEmacs | 741 | (if (fboundp 'set-keymap-parents) |
| 742 | (if (functionp 'set-keymap-name) | 742 | (set-keymap-parents map (list comint-mode-map)))); XEmacs |
| 743 | (if (fboundp 'set-keymap-name) | ||
| 743 | (set-keymap-name map 'sql-interactive-mode-map)); XEmacs | 744 | (set-keymap-name map 'sql-interactive-mode-map)); XEmacs |
| 744 | (define-key map (kbd "C-j") 'sql-accumulate-and-indent) | 745 | (define-key map (kbd "C-j") 'sql-accumulate-and-indent) |
| 745 | (define-key map (kbd "C-c C-w") 'sql-copy-column) | 746 | (define-key map (kbd "C-c C-w") 'sql-copy-column) |
| @@ -1901,16 +1902,8 @@ appended to the SQLi buffer without disturbing your SQL buffer." | |||
| 1901 | (describe-function 'sql-help)) | 1902 | (describe-function 'sql-help)) |
| 1902 | 1903 | ||
| 1903 | (defun sql-read-passwd (prompt &optional default) | 1904 | (defun sql-read-passwd (prompt &optional default) |
| 1904 | "Read a password using PROMPT. | 1905 | "Read a password using PROMPT. Optional DEFAULT is password to start with." |
| 1905 | Optional DEFAULT is password to start with. This function calls | 1906 | (read-passwd prompt nil default)) |
| 1906 | `read-passwd' if it is available. If not, function | ||
| 1907 | `ange-ftp-read-passwd' is called. This should always be available, | ||
| 1908 | even in old versions of Emacs." | ||
| 1909 | (if (fboundp 'read-passwd) | ||
| 1910 | (read-passwd prompt nil default) | ||
| 1911 | (unless (fboundp 'ange-ftp-read-passwd) | ||
| 1912 | (autoload 'ange-ftp-read-passwd "ange-ftp")) | ||
| 1913 | (ange-ftp-read-passwd prompt default))) | ||
| 1914 | 1907 | ||
| 1915 | (defun sql-get-login (&rest what) | 1908 | (defun sql-get-login (&rest what) |
| 1916 | "Get username, password and database from the user. | 1909 | "Get username, password and database from the user. |