From c1f2501f55d7454222389244512f732ac5e778b4 Mon Sep 17 00:00:00 2001 From: Stephen Berman Date: Sat, 21 Sep 2024 22:23:11 +0200 Subject: [PATCH] Update and improve UI of sql-read-product (bug#73412) * lisp/progmodes/sql.el (sql-read-product): In invocation of completing-read use format-prompt and make deprecated argument INITIAL-INPUT nil. (sql-set-product, sql-product-interactive): In invocation of sql-read-product adjust prompt to use of format-prompt. --- lisp/progmodes/sql.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 5273ba2bee1..a0b350ce54f 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -2666,11 +2666,11 @@ highlighting rules in SQL mode.") "Read a valid SQL product." (let ((init (or (and initial (symbol-name initial)) "ansi"))) (intern (completing-read - prompt + (format-prompt prompt init) (mapcar (lambda (info) (symbol-name (car info))) sql-product-alist) nil 'require-match - init 'sql-product-history init)))) + nil 'sql-product-history init)))) (defun sql-add-product (product display &rest plist) "Add support for a database product in `sql-mode'. @@ -2912,7 +2912,7 @@ adds a fontification pattern to fontify identifiers ending in (defun sql-set-product (product) "Set `sql-product' to PRODUCT and enable appropriate highlighting." (interactive - (list (sql-read-product "SQL product: "))) + (list (sql-read-product "SQL product"))) (if (stringp product) (setq product (intern product))) (when (not (assoc product sql-product-alist)) (user-error "SQL product %s is not supported; treated as ANSI" product) @@ -4546,7 +4546,7 @@ the call to \\[sql-product-interactive] with (setq product (cond ((= (prefix-numeric-value product) 4) ; C-u, prompt for product - (sql-read-product "SQL product: " sql-product)) + (sql-read-product "SQL product" sql-product)) ((assoc product sql-product-alist) ; Product specified product) (t sql-product))) ; Default to sql-product -- 2.30.2