Function: combobulate-display-create-locus

combobulate-display-create-locus is a natively compiled function defined in combobulate-display.el.

Signature

(combobulate-display-create-locus START-NODE)

Source Code

;; Defined in /nix/store/b5fvrwzi3zvkabyzx0in6gw1cj963z46-emacs-packages-deps/share/emacs/site-lisp/combobulate-display.el
(defun combobulate-display-create-locus (start-node)
  (let* ((parent (combobulate-nav-get-parent start-node))
         (grand-parent (combobulate-nav-get-parent parent))
         (ztree (combobulate-ztree-list-zip (list (or grand-parent parent))))
         (children
          (cons (if grand-parent parent nil)
                (mapcar (lambda (n)
                          (cons n (mapcar #'list
                                          (seq-remove #'combobulate-node-blank-p
                                                      (seq-filter #'combobulate-navigable-node-p
                                                                  ;; make this configurable
                                                                  (seq-take (combobulate-node-children n) 1))))))
                        (seq-uniq
                         (seq-remove #'combobulate-node-blank-p
                                     (seq-filter #'combobulate-navigable-node-p
                                                 (list
                                                  (combobulate-node-prev-sibling start-node)
                                                  start-node
                                                  (combobulate-node-next-sibling start-node)))))))))
    (combobulate-ztree-append-child
     ztree
     (if grand-parent children (cons children nil)))))