Function: shadow-site-match

shadow-site-match is a byte-compiled function defined in shadowfile.el.gz.

Signature

(shadow-site-match SITE1 SITE2)

Documentation

Non-nil if SITE1 is or includes SITE2.

Each may be a host or cluster name; if they are clusters, regexp of SITE1 will be matched against the primary of SITE2.

Source Code

;; Defined in /usr/src/emacs/lisp/shadowfile.el.gz
(defun shadow-site-match (site1 site2)
  "Non-nil if SITE1 is or includes SITE2.
Each may be a host or cluster name; if they are clusters, regexp of SITE1 will
be matched against the primary of SITE2."
  (or (string-equal site1 site2) ; quick check
      (let* ((cluster1 (shadow-get-cluster site1))
	     (primary2 (shadow-site-primary site2)))
	(if cluster1
	    (string-match (shadow-cluster-regexp cluster1) primary2)
	  (string-equal site1 primary2)))))