Function: dictionary-connection-status

dictionary-connection-status is a byte-compiled function defined in dictionary-connection.el.gz.

Signature

(dictionary-connection-status CONNECTION)

Documentation

Return the status of the CONNECTION.

Possible return values are the symbols:
    nil: argument is not a connection object
    none: argument is not connected
    up: connection is open and buffer is existing
    down: connection is closed
    alone: connection is not associated with a buffer

Source Code

;; Defined in /usr/src/emacs/lisp/net/dictionary-connection.el.gz
(defun dictionary-connection-status (connection)
  "Return the status of the CONNECTION.
Possible return values are the symbols:
    nil:    argument is not a connection object
    `none':  argument is not connected
    `up':    connection is open and buffer is existing
    `down':  connection is closed
    `alone': connection is not associated with a buffer"
  (when (dictionary-connection-p connection)
    (let ((process (dictionary-connection-process connection))
          (buffer (dictionary-connection-buffer connection)))
      (if (not process)
          'none
        (if (not (buffer-live-p buffer))
            'alone
          (if (not (eq (process-status process) 'open))
              'down
            'up))))))