Function: sesman--link-lookup-fn

sesman--link-lookup-fn is a byte-compiled function defined in sesman.el.

Signature

(sesman--link-lookup-fn &optional SYSTEM SES-NAME CXT-TYPE CXT-VAL X)

Source Code

;; Defined in ~/.emacs.d/elpa/sesman-20240417.1723/sesman.el
;; FIXME: make this a macro
(defun sesman--link-lookup-fn (&optional system ses-name cxt-type cxt-val x)
  (let ((system (or system (caar x)))
        (ses-name (or ses-name (cdar x)))
        (cxt-type (or cxt-type (nth 1 x)))
        (cxt-val (or cxt-val (nth 2 x))))
    (lambda (el)
      (and (or (null system) (eq (caar el) system))
           (or (null ses-name) (equal (cdar el) ses-name))
           (or (null cxt-type)
               (if (listp cxt-type)
                   (member (nth 1 el) cxt-type)
                 (eq (nth 1 el) cxt-type)))
           (or (null cxt-val) (equal (nth 2 el) cxt-val))))))