Add modules/lib/defuns-web.el
This commit is contained in:
parent
a61d3b8299
commit
5f76c92334
1 changed files with 18 additions and 0 deletions
18
modules/lib/defuns-web.el
Normal file
18
modules/lib/defuns-web.el
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
;;; defuns-web.el
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun narf/web-html-email2mailto (beg end)
|
||||||
|
(interactive "r")
|
||||||
|
(replace-regexp "\\b\\([a-zA-Z0-9._+-%]+@[a-zA-Z0-9-.]+\\.[a-zA-Z]+\\)\\b"
|
||||||
|
"<a href=\"mailto:\\1\">\\1</a>"
|
||||||
|
nil beg end))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun narf/web-html-url2anchor (beg end)
|
||||||
|
(interactive "r")
|
||||||
|
(replace-regexp "\\bhttps?://.+?\\b"
|
||||||
|
"<a href=\"\\1\">\\1</a>"
|
||||||
|
nil beg end))
|
||||||
|
|
||||||
|
(provide 'defuns-web)
|
||||||
|
;;; defuns-web.el ends here
|
Loading…
Add table
Add a link
Reference in a new issue