.emacs-my
changeset 628 c00e41cc019e
parent 627 a64819b490c3
child 629 f441ee5e03d4
--- a/.emacs-my	Thu Apr 07 18:37:49 2011 +0300
+++ b/.emacs-my	Fri Apr 08 13:13:07 2011 +0300
@@ -1454,6 +1454,19 @@
 ;;; ----------------------------------------------------------------
 (message "html")
 
+(defun text2html (start end)
+  (interactive "r")
+  (save-excursion
+    (save-restriction
+      (narrow-to-region start end)
+      (goto-char (point-min))
+      (replace-string "&" "&")
+      (goto-char (point-min))
+      (replace-string "<" "&lt;")
+      (goto-char (point-min))
+      (replace-string ">" "&gt;")
+      )))
+
 ;;; ----------------------------------------------------------------
 (message "nxml")