File:  [Local Repository] / reports / tools.el
Revision 1.4: download - view: text, annotated - select for diffs - revision graph
Fri Jul 15 04:32:00 2016 UTC (7 years, 11 months ago) by boris
Branches: MAIN
CVS tags: HEAD
New info

    1: (defun add-spaces (&optional num)
    2:   "Add spaces until the line has num spaces"
    3:   (interactive "p")
    4:   (if (<= num 1) (setq num 70))
    5:   (end-of-line)
    6:   (while (> num (- (line-end-position) (line-beginning-position)))
    7:     (insert " "))
    8:   (beginning-of-line))
    9: 
   10: (defun convert-utf-to-html-entites  ()
   11:   "Convert utf entities to html"
   12:   (interactive)
   13:   (save-excursion
   14:     (beginning-of-buffer)
   15:     (while (search-forward "«" nil t)
   16:     (replace-match "&laquo;" nil t))
   17:     (while (search-forward "»" nil t) 
   18:     (replace-match "&raquo;" nil t))
   19:     (while (search-forward "Є" nil t) ; YE
   20:     (replace-match "&#x404;" nil t))
   21:     (beginning-of-buffer)
   22:     (while (search-forward "і" nil t) ; i
   23:     (replace-match "&#1110;" nil t))
   24:     (beginning-of-buffer)
   25:     (while (search-forward "ї" nil t) ; yi
   26:     (replace-match "&#1111;" nil t))
   27:   ))

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>