Fix selecting SQLite database files with sql-mode (Bug#23566)
* lisp/progmodes/sql.el (sql-sqlite-login-params): Allow any name as SQLite database file name, by default. (sql-get-login-ext): Fixed read-file-name arguments to provide path completion even if a database name pattern is customized and to allow creation of new SQLite database files. Copyright-paperwork-exempt: yes
This commit is contained in:
parent
e272032769
commit
75cdf42917
1 changed files with 8 additions and 6 deletions
|
@ -933,10 +933,10 @@ Starts `sql-interactive-mode' after doing some setup."
|
|||
:version "20.8"
|
||||
:group 'SQL)
|
||||
|
||||
(defcustom sql-sqlite-login-params '((database :file ".*\\.\\(db\\|sqlite[23]?\\)"))
|
||||
(defcustom sql-sqlite-login-params '((database :file nil))
|
||||
"List of login parameters needed to connect to SQLite."
|
||||
:type 'sql-login-params
|
||||
:version "24.1"
|
||||
:version "26.1"
|
||||
:group 'SQL)
|
||||
|
||||
;; Customization for MySQL
|
||||
|
@ -2954,13 +2954,15 @@ value. (The property value is used as the PREDICATE argument to
|
|||
((plist-member plist :file)
|
||||
(expand-file-name
|
||||
(read-file-name prompt
|
||||
(file-name-directory last-value) default t
|
||||
(file-name-directory last-value) default 'confirm
|
||||
(file-name-nondirectory last-value)
|
||||
(when (plist-get plist :file)
|
||||
`(lambda (f)
|
||||
(string-match
|
||||
(concat "\\<" ,(plist-get plist :file) "\\>")
|
||||
(file-name-nondirectory f)))))))
|
||||
(if (not (file-regular-p f))
|
||||
t
|
||||
(string-match
|
||||
(concat "\\<" ,(plist-get plist :file) "\\>")
|
||||
(file-name-nondirectory f))))))))
|
||||
|
||||
((plist-member plist :completion)
|
||||
(completing-read prompt-def (plist-get plist :completion) nil t
|
||||
|
|
Loading…
Add table
Reference in a new issue