Function: markdown-insert-bold

markdown-insert-bold is an interactive and natively compiled function defined in markdown-mode.el.

Signature

(markdown-insert-bold)

Documentation

Insert markup to make a region or word bold.

If there is an active region, make the region bold. If the point is at a non-bold word, make the word bold. If the point is at a bold word or phrase, remove the bold markup. Otherwise, simply insert bold delimiters and place the point in between them.

Key Bindings

markdown-mode-map C-c C-s b markdown-mode-style-map b

Source Code

;; Defined in /nix/store/p33zgg95aglc47pl6zlgs43vki0snxf8-emacs-packages-deps/share/emacs/site-lisp/elpa/markdown-mode-20260827.909/markdown-mode.el
(defun markdown-insert-bold ()
  "Insert markup to make a region or word bold.
If there is an active region, make the region bold.  If the point
is at a non-bold word, make the word bold.  If the point is at a
bold word or phrase, remove the bold markup.  Otherwise, simply
insert bold delimiters and place the point in between them."
  (interactive)
  (let ((delim (if markdown-bold-underscore "__" "**")))
    (markdown--insert-common delim delim markdown-regex-bold 2 4 'markdown-bold-face t)))