From 1d7151e98e9da5eeb4e341cfdb7d1f4462dc5b70 Mon Sep 17 00:00:00 2001 From: Filipp Gunbin Date: Wed, 11 Jul 2018 05:28:21 +0300 Subject: [PATCH] Fix Bug#32107 * lisp/progmodes/sql.el (sql-buffer-live-p): Fix handling of optional connection argument. (Bug#32107) --- lisp/progmodes/sql.el | 5 +++-- 1 file 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. -- 2.39.2