Function: combobulate-procedure--filter-nodes-by-relationship
combobulate-procedure--filter-nodes-by-relationship is a natively
compiled function defined in combobulate-procedure.el.
Signature
(combobulate-procedure--filter-nodes-by-relationship SELECTOR NODE FN)
Documentation
Filter NODES by the relationship defined by FN against NODE.
FN should be a function that takes a node and whether to include
anonymous nodes and return the nodes that match the relationship.
Source Code
;; Defined in /nix/store/b5fvrwzi3zvkabyzx0in6gw1cj963z46-emacs-packages-deps/share/emacs/site-lisp/combobulate-procedure.el
(defun combobulate-procedure--filter-nodes-by-relationship (selector node fn)
"Filter NODES by the relationship defined by FN against NODE.
FN should be a function that takes a node and whether to include
anonymous nodes and return the nodes that match the relationship."
(map-let (:match-rules :discard-rules :default-mark :anonymous)
;; we can have either a plist or `t', indicating that we want
;; all matches
(if (eq selector 't) (list :match-rules 't) selector)
(let* ((match-rules (combobulate-procedure-expand-rules match-rules))
(discard-rules
(combobulate-procedure-expand-rules discard-rules))
(default-mark
(or default-mark
(and match-rules discard-rules
(error "Cannot have both `:match-rules' and `:discard-rules'
without explicitly setting `:default-mark'"))
(if match-rules '@discard '@match)))
(anonymous (or anonymous combobulate-procedure-include-anonymous-nodes))
(nodes (funcall fn node anonymous)))
(combobulate-procedure--mark-nodes
nodes
:match-types match-rules
:discard-types discard-rules
:keep-anonymous anonymous
:default-mark default-mark))))