Function: sql-stop

sql-stop is a byte-compiled function defined in sql.el.gz.

Signature

(sql-stop PROCESS EVENT)

Documentation

Called when the SQL process is stopped.

Writes the input history to a history file using comint-write-input-ring and inserts a short message in the SQL buffer.

This function is a sentinel watching the SQL interpreter process. Sentinels will always get the two parameters PROCESS and EVENT.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/sql.el.gz
(defun sql-stop (process event)
  "Called when the SQL process is stopped.

Writes the input history to a history file using
`comint-write-input-ring' and inserts a short message in the SQL buffer.

This function is a sentinel watching the SQL interpreter process.
Sentinels will always get the two parameters PROCESS and EVENT."
  (when (buffer-live-p (process-buffer process))
    (with-current-buffer (process-buffer process)
      (let
          ((comint-input-ring-separator sql-input-ring-separator)
           (comint-input-ring-file-name sql-input-ring-file-name))
        (comint-write-input-ring))

      (if (not buffer-read-only)
          (insert (format "\nProcess %s %s\n" process event))
        (message "Process %s %s" process event)))))