added about 10 elisp keywords. work in progress to add more.

This commit is contained in:
Xah Lee
2010-08-05 07:44:11 +00:00
parent 53d1d705d2
commit 6c35178715
22 changed files with 74 additions and 24 deletions

View File

@@ -0,0 +1,17 @@
#contributor: Xah Lee (XahLee.org)
#name: find and replace on region
# --
(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))
)
)