Function: htmlize-create-auto-links
htmlize-create-auto-links is a byte-compiled function defined in
htmlize.el.
Signature
(htmlize-create-auto-links)
Documentation
Add htmlize-link property to all mailto links in the buffer.
Source Code
;; Defined in ~/.emacs.d/elpa/htmlize-20250724.1703/htmlize.el
(defun htmlize-create-auto-links ()
"Add `htmlize-link' property to all mailto links in the buffer."
(save-excursion
(goto-char (point-min))
(while (re-search-forward
"<\\(\\(mailto:\\)?\\([-=+_.a-zA-Z0-9]+@[-_.a-zA-Z0-9]+\\)\\)>"
nil t)
(let* ((address (match-string 3))
(beg (match-beginning 0)) (end (match-end 0))
(uri (concat "mailto:" (htmlize-despam-address address))))
(htmlize-make-link-overlay beg end uri)))
(goto-char (point-min))
(while (re-search-forward "<\\(\\(URL:\\)?\\([a-zA-Z]+://[^;]+\\)\\)>"
nil t)
(htmlize-make-link-overlay
(match-beginning 0) (match-end 0) (match-string 3)))))