Mercurial > emacs
comparison lisp/progmodes/sql.el @ 64837:f80fef683ab5
(sql-interactive-mode-map): Use fboundp.
(sql-read-passwd): Use read-passwd.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 09 Aug 2005 11:42:54 +0000 |
parents | 629afbe74e61 |
children | 7fbb366ab47a 2d92f5c9d6ae |
comparison
equal
deleted
inserted
replaced
64836:4457ed27ac76 | 64837:f80fef683ab5 |
---|---|
734 | 734 |
735 ;; Keymap for sql-interactive-mode. | 735 ;; Keymap for sql-interactive-mode. |
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) |
746 (define-key map (kbd "O") 'sql-magic-go) | 747 (define-key map (kbd "O") 'sql-magic-go) |
747 (define-key map (kbd "o") 'sql-magic-go) | 748 (define-key map (kbd "o") 'sql-magic-go) |
1899 appended to the SQLi buffer without disturbing your SQL buffer." | 1900 appended to the SQLi buffer without disturbing your SQL buffer." |
1900 (interactive) | 1901 (interactive) |
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. |
1917 | 1910 |
1918 The variables `sql-user', `sql-password', `sql-server', and | 1911 The variables `sql-user', `sql-password', `sql-server', and |