Function: combobulate--drag
combobulate--drag is a natively compiled function defined in
combobulate-manipulation.el.
Signature
(combobulate--drag DIRECTION)
Documentation
Perform a drag operation on the current navigation node in DIRECTION.
If the current node has no siblings in the specified direction, an error is raised. If the operation is successful, the cursor is moved to the modified node.
Source Code
;; Defined in /nix/store/b5fvrwzi3zvkabyzx0in6gw1cj963z46-emacs-packages-deps/share/emacs/site-lisp/combobulate-manipulation.el
(defun combobulate--drag (direction)
"Perform a drag operation on the current navigation node in DIRECTION.
If the current node has no siblings in the specified direction,
an error is raised. If the operation is successful, the cursor is
moved to the modified node."
(let* ((up (eq direction 'up))
(node (or (combobulate--get-nearest-navigable-node) (error "No navigable node")))
(sibling (combobulate--get-sibling node (if up 'backward 'forward)))
(self (combobulate--get-sibling node 'self)))
(unless sibling
(error "No sibling node to swap with in that direction"))
(combobulate--goto-node sibling)
(save-excursion (combobulate--swap-node-regions self sibling))
(combobulate--get-sibling (combobulate--get-nearest-navigable-node) 'self)))