Function: kotl-mode:add-below-parent
kotl-mode:add-below-parent is an interactive and byte-compiled
function defined in kotl-mode.el.
Signature
(kotl-mode:add-below-parent &optional CELLS-TO-ADD CONTENTS PLIST NO-FILL)
Documentation
Add new cells as initial children of the current cell's parent.
Return the last one added.
Optional prefix arg number of CELLS-TO-ADD defaults to 1. Add new cells with optional CONTENTS string, attributes in PLIST, a property list, and NO-FILL flag to prevent any filling of CONTENTS.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kotl-mode.el
(defun kotl-mode:add-below-parent (&optional cells-to-add contents plist no-fill)
"Add new cells as initial children of the current cell's parent.
Return the last one added.
Optional prefix arg number of CELLS-TO-ADD defaults to 1. Add
new cells with optional CONTENTS string, attributes in PLIST, a
property list, and NO-FILL flag to prevent any filling of
CONTENTS."
(interactive "*p")
(when (null cells-to-add) (setq cells-to-add 1))
(unless (and (natnump cells-to-add) (/= cells-to-add 0))
(error "(kotl-mode:add-below-parent): `cells-to-add' must be a positive integer"))
;; Add first cell as the first child of the parent and then any more
;; as siblings of that one
(let ((last-added-cell
(if (kotl-mode:up-level 1)
;; Add preceding sibling cell when on first cell at
;; current level other than level 1
(kotl-mode:add-cell '(4) contents plist no-fill)
(kotl-mode:beginning-of-buffer)
;; Add preceding sibling when on level 1 first cell
(kotl-mode:add-cell 0 contents plist no-fill))))
(if (> (setq cells-to-add (1- cells-to-add)) 0)
(kotl-mode:add-cell cells-to-add contents plist no-fill)
last-added-cell)))