Function: markdown-insert-uri
markdown-insert-uri is an interactive and natively compiled function
defined in markdown-mode.el.
Signature
(markdown-insert-uri &optional URI)
Documentation
Insert markup for an inline URI.
If there is an active region, use it as the URI. If the point is at a URI, wrap it with angle brackets. If the point is at an inline URI, remove the angle brackets. Otherwise, simply insert angle brackets place the point between them.
Key Bindings
markdown-mode-map C-c C-a u
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-uri (&optional uri)
"Insert markup for an inline URI.
If there is an active region, use it as the URI. If the point is
at a URI, wrap it with angle brackets. If the point is at an
inline URI, remove the angle brackets. Otherwise, simply insert
angle brackets place the point between them."
(interactive)
(if (use-region-p)
;; Active region
(let ((bounds (markdown-unwrap-things-in-region
(region-beginning) (region-end)
markdown-regex-angle-uri 0 2)))
(markdown-wrap-or-insert "<" ">" nil (car bounds) (cdr bounds)))
;; Markup removal, URI at point, new URI, or empty markup insertion
(if (thing-at-point-looking-at markdown-regex-angle-uri)
(markdown-unwrap-thing-at-point nil 0 2)
(if uri
(insert "<" uri ">")
(markdown-wrap-or-insert "<" ">" 'url nil nil)))))