Update packages

This commit is contained in:
2016-10-22 16:25:44 +02:00
parent 42b437055b
commit 0d078ffb05
1156 changed files with 238 additions and 219 deletions

View File

@@ -0,0 +1,18 @@
#contributor: Xah Lee (XahLee.org)
#name: find and replace on region
# key: x-find-replace
# --
(defun replace-html-chars-region (start end)
"Replace “<” to “&lt;” and other chars in HTML.
This works on the current region."
(interactive "r")
(save-restriction
(narrow-to-region start end)
(goto-char (point-min))
(while (search-forward "&" nil t) (replace-match "&amp;" nil t))
(goto-char (point-min))
(while (search-forward "<" nil t) (replace-match "&lt;" nil t))
(goto-char (point-min))
(while (search-forward ">" nil t) (replace-match "&gt;" nil t))
)
)