summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipp Gunbin <fgunbin@fastmail.fm>2018-07-11 05:28:21 +0300
committerFilipp Gunbin <fgunbin@fastmail.fm>2018-07-11 05:30:10 +0300
commit1d7151e98e9da5eeb4e341cfdb7d1f4462dc5b70 (patch)
tree089138bdd12d3ab9672400cf00a9532be216d7a3
parent39489f782e436a490d1bec32d7ed9b7bcdacda24 (diff)
downloademacs-1d7151e98e9da5eeb4e341cfdb7d1f4462dc5b70.tar.gz
Fix Bug#32107
* lisp/progmodes/sql.el (sql-buffer-live-p): Fix handling of optional connection argument. (Bug#32107)
-rw-r--r--lisp/progmodes/sql.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index 223fb2ec936..ba180c2b26c 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -1270,8 +1270,9 @@ specified, it's `sql-product' or `sql-connection' must match."
(and (derived-mode-p 'sql-interactive-mode)
(or (not product)
(eq product sql-product))
- (or (stringp connection)
- (string= connection sql-connection)))))))
+ (or (not connection)
+ (and (stringp connection)
+ (string= connection sql-connection))))))))
;; Keymap for sql-interactive-mode.