Function: kotl-mode:down-level

kotl-mode:down-level is an interactive and byte-compiled function defined in kotl-mode.el.

Signature

(kotl-mode:down-level ARG)

Documentation

Move down prefix ARG levels lower within current tree.

Error if called interactively and cannot move to the desired cell.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kotl-mode.el
(defun kotl-mode:down-level (arg)
  "Move down prefix ARG levels lower within current tree.
Error if called interactively and cannot move to the desired cell."
  (interactive "p")
  (kotl-mode:maintain-region-highlight)
  (if (< arg 0)
      (kotl-mode:up-level (- arg))
    ;; Enable user to return to this previous position if desired.
    (push-mark nil 'no-msg)
    (let ((child))
      (while (and (> arg 0) (kcell-view:child))
	(unless child
	  (setq child t))
	(setq arg (1- arg)))
      ;; Signal an error if called interactively and couldn't move
      ;; down at least 1 child level.
      (or child
	  (progn
	    (goto-char (mark t))
	    (pop-mark)
	    (when (called-interactively-p 'interactive)
	      (error "(kotl-mode:down-level): No child level to which to move")))))))