Function: combobulate-get-parents-until

combobulate-get-parents-until is a natively compiled function defined in combobulate-navigation.el.

Signature

(combobulate-get-parents-until POINT-NODE STOP-PARENT)

Documentation

Collect parents of POINT-NODE until STOP-PARENT is found.

Source Code

;; Defined in /nix/store/b5fvrwzi3zvkabyzx0in6gw1cj963z46-emacs-packages-deps/share/emacs/site-lisp/combobulate-navigation.el
(defun combobulate-get-parents-until (point-node stop-parent)
  "Collect parents of POINT-NODE until STOP-PARENT is found."
  (let ((collected)
        (all-parents (combobulate-get-parents point-node)))
    (when (member stop-parent all-parents)
      (while all-parents
        (let ((parent (pop all-parents)))
          (if (equal parent stop-parent)
              (setq all-parents nil)
            (push parent collected))))
      (reverse (cons stop-parent collected)))))