Function: sql-buffer-live-p
sql-buffer-live-p is a byte-compiled function defined in sql.el.gz.
Signature
(sql-buffer-live-p BUFFER &optional PRODUCT CONNECTION)
Documentation
Return non-nil if the process associated with buffer is live.
BUFFER can be a buffer object or a buffer name. The buffer must
be a live buffer, have a running process attached to it, be in
sql-interactive-mode, and, if PRODUCT or CONNECTION are
specified, it's sql-product or sql-connection must match.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/sql.el.gz
(defun sql-buffer-live-p (buffer &optional product connection)
"Return non-nil if the process associated with buffer is live.
BUFFER can be a buffer object or a buffer name. The buffer must
be a live buffer, have a running process attached to it, be in
`sql-interactive-mode', and, if PRODUCT or CONNECTION are
specified, it's `sql-product' or `sql-connection' must match."
(when buffer
(setq buffer (get-buffer buffer))
(and buffer
(buffer-live-p buffer)
(comint-check-proc buffer)
(with-current-buffer buffer
(and (derived-mode-p 'sql-interactive-mode)
(or (not product)
(eq product sql-product))
(or (not connection)
(and (stringp connection)
(string= connection sql-connection))))))))