allout-make-topic-prefix is a compiled Lisp function in `
(allout-make-topic-prefix &optional PRIOR-BULLET NEW DEPTH INSTEAD NUMBER-CONTROL INDEX)
Generate a topic prefix suitable for optional arg DEPTH, or current depth.
All the arguments are optional.
PRIOR-BULLET indicates the bullet of the prefix being changed, or
nil if none. This bullet may be preserved (other options
notwithstanding) if it is on the `allout-distinctive-bullets-string',
Second arg NEW indicates that a new topic is being opened after the
topic at point, if non-nil. Default bullet for new topics, eg, may
be set (contingent to other args) to numbered bullets if previous
sibling is one. The implication otherwise is that the current topic
is being adjusted -- shifted or rebulleted -- and we don't consider
bullet or previous sibling.
Third arg DEPTH forces the topic prefix to that depth, regardless of
the current topics' depth.
If INSTEAD is:
- nil, then the bullet char for the context is used, per distinction or depth
- a (numeric) character, then character's string representation is used
- a string, then the user is asked for bullet with the first char as default
- anything else, the user is solicited with bullet char per context as default
(INSTEAD overrides other options, including, eg, a distinctive
Fifth arg, NUMBER-CONTROL, matters only if `allout-numbered-bullet'
is non-nil *and* no specific INSTEAD was specified. Then
NUMBER-CONTROL non-nil forces prefix to either numbered or
unnumbered format, depending on the value of the sixth arg, INDEX.
(Note that NUMBER-CONTROL does *not* apply to level 1 topics. Sorry...)
If NUMBER-CONTROL is non-nil and sixth arg INDEX is non-nil then
the prefix of the topic is forced to be numbered. Non-nil
NUMBER-CONTROL and nil INDEX forces non-numbered format on the
bullet. Non-nil NUMBER-CONTROL and non-nil, non-number INDEX means
that the index for the numbered prefix will be derived, by counting
siblings back to start of level. If INDEX is a number, then that
number is used as the index for the numbered prefix (allowing, eg,
sequential renumbering to not require this function counting back the
index for each successive sibling).