Function: sesman-has-links-p

sesman-has-links-p is a byte-compiled function defined in sesman.el.

Signature

(sesman-has-links-p SYSTEM &optional CXT-TYPES)

Documentation

Return t if there is at least one linked session.

CXT-TYPES defaults to sesman-context-types for current SYSTEM.

Source Code

;; Defined in ~/.emacs.d/elpa/sesman-20240417.1723/sesman.el
(defun sesman-has-links-p (system &optional cxt-types)
  "Return t if there is at least one linked session.
CXT-TYPES defaults to `sesman-context-types' for current SYSTEM."
  (let ((cxt-types (or cxt-types (sesman-context-types system)))
        (found))
    (condition-case nil
        (mapc (lambda (l)
                (when (eq system (sesman--lnk-system-name l))
                  (let ((cxt (sesman--lnk-context-type l)))
                    (when (and (member cxt cxt-types)
                               (sesman-relevant-context-p cxt (sesman--lnk-value l)))
                      (setq found t)
                      (throw 'found nil)))))
              sesman-links-alist)
      (error))
    found))