Function: markdown-ts-toc-insert-template
markdown-ts-toc-insert-template is an autoloaded, interactive and
byte-compiled function defined in markdown-ts-mode-x.el.gz.
Signature
(markdown-ts-toc-insert-template &optional CHAR)
Documentation
Insert a `markdown-ts-mode` table of contents template at point.
CHAR is the template type "b" for basic, "c" for complete. If CHAR is nil and the command is run interactively, prompt for a template.
The basic template uses all defaults and is likely the best choice for most uses. The complete template illustrates all parameters set to their defaults and is useful as a starting point to customize a table.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/markdown-ts-mode-x.el.gz
;;;###autoload
(defun markdown-ts-toc-insert-template (&optional char)
"Insert a `markdown-ts-mode` table of contents template at point.
CHAR is the template type \"b\" for basic, \"c\" for complete. If CHAR
is nil and the command is run interactively, prompt for a template.
The basic template uses all defaults and is likely the best choice for
most uses. The complete template illustrates all parameters set to
their defaults and is useful as a starting point to customize a table."
(interactive
(list (car (read-multiple-choice
"Table of contents template"
'((?b "basic")
(?c "complete"))))))
(pcase char
(?b
(insert "<!-- markdown-ts-toc: -->\n"
"<!-- markdown-ts-toc-end: -->\n"))
(?c
(insert "<!-- markdown-ts-toc: -*- "
"min-depth: 1; "
"max-depth: nil; "
"candidates: (heading); "
"from: below; "
"style: item; "
"indent: 1; "
"no-link: nil; "
"relative-depth: nil; "
"ignore: nil; "
"-*- -->\n"
"<!-- markdown-ts-toc-end: -->\n"))
(_ (user-error "No such template type: %c" char))))