Function: markdown-promote
markdown-promote is an interactive and byte-compiled function defined
in markdown-mode.el.
Signature
(markdown-promote)
Documentation
Promote or move element at point to the left.
Depending on the context, this function will promote a heading or list item at the point, move a table column to the left, or cycle markup.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/markdown-mode-20260321.143/markdown-mode.el
(defun markdown-promote ()
"Promote or move element at point to the left.
Depending on the context, this function will promote a heading or
list item at the point, move a table column to the left, or cycle
markup."
(interactive)
(let (bounds)
(cond
;; Promote atx heading subtree
((thing-at-point-looking-at markdown-regex-header-atx)
(markdown-promote-subtree))
;; Promote setext heading
((thing-at-point-looking-at markdown-regex-header-setext)
(markdown-cycle-setext -1))
;; Promote horizontal rule
((thing-at-point-looking-at markdown-regex-hr)
(markdown-cycle-hr -1))
;; Promote list item
((setq bounds (markdown-cur-list-item-bounds))
(markdown-promote-list-item bounds))
;; Move table column to the left
((markdown-table-at-point-p)
(call-interactively #'markdown-table-move-column-left))
;; Promote bold
((thing-at-point-looking-at markdown-regex-bold)
(markdown-cycle-bold))
;; Promote italic
((thing-at-point-looking-at markdown-regex-italic)
(markdown-cycle-italic))
(t
(user-error "Nothing to promote at point")))))