diff options
| author | Eli Zaretskii | 2018-05-20 10:25:26 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2018-05-20 10:25:26 +0300 |
| commit | 845fe038e790c7c62c6b294f88648644a4ae7ddd (patch) | |
| tree | c628ba3f04bd53df86b4c037ec5ea26b1d1b000d | |
| parent | a3885f56534400e8adacf199476ccc407eb20286 (diff) | |
| download | emacs-845fe038e790c7c62c6b294f88648644a4ae7ddd.tar.gz emacs-845fe038e790c7c62c6b294f88648644a4ae7ddd.zip | |
Fix buffer names in sql.el
* lisp/progmodes/sql.el (sql-product-interactive): Fix the way the
buffer name is determined by prefix arg. (Bug#31446)
| -rw-r--r-- | lisp/progmodes/sql.el | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index e4db6cc38a2..d783f6542e6 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el | |||
| @@ -4263,9 +4263,17 @@ the call to \\[sql-product-interactive] with | |||
| 4263 | (funcall (sql-get-product-feature product :sqli-comint-func) | 4263 | (funcall (sql-get-product-feature product :sqli-comint-func) |
| 4264 | product | 4264 | product |
| 4265 | (sql-get-product-feature product :sqli-options) | 4265 | (sql-get-product-feature product :sqli-options) |
| 4266 | (if (and new-name (string-prefix-p "SQL" new-name t)) | 4266 | (cond |
| 4267 | new-name | 4267 | ((zerop new-name) |
| 4268 | (concat "SQL: " new-name)))) | 4268 | "*SQL*") |
| 4269 | ((stringp new-name) | ||
| 4270 | (if (string-prefix-p "*SQL: " new-name t) | ||
| 4271 | new-name | ||
| 4272 | (concat "*SQL: " new-name "*"))) | ||
| 4273 | ((eq new-name '(4)) | ||
| 4274 | (sql-rename-buffer new-name)) | ||
| 4275 | (t | ||
| 4276 | (format "*SQL: %s*" new-name))))) | ||
| 4269 | 4277 | ||
| 4270 | ;; Set SQLi mode. | 4278 | ;; Set SQLi mode. |
| 4271 | (let ((sql-interactive-product product)) | 4279 | (let ((sql-interactive-product product)) |