Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 2f9c63a4c6
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (31 sloc) 0.799 kb
;;; Some utility function
(defun undos ()
"Remove the <CR> in DOS files"
(interactive)
(save-excursion
(goto-char (point-min))
(replace-string "
" "")
(goto-char (point-min))
(replace-string "" "") ))
(defun unansi ()
"Remove the ansi markup in files"
(interactive)
(save-excursion
(goto-char (point-min))
(replace-regexp "\\([\\[0-9;\\]*m\\|\r\\)" "")
))
(defun unhtml ()
"Remove the HTML tags in a file"
(interactive)
(save-excursion
(goto-char (point-min))
(replace-regexp "<[^>]*>" "")
(goto-char (point-min))
(replace-string "&nbsp;" " ")
(goto-char (point-min))
(replace-string "&lt;" "<")
(goto-char (point-min))
(replace-string "&gt;" ">")
(goto-char (point-min))
(replace-string "&amp;" "&") ))
Jump to Line
Something went wrong with that request. Please try again.