(defun add-spaces (&optional num)
"Add spaces until the line has num spaces"
(interactive "p")
(if (<= num 1) (setq num 70))
(end-of-line)
(while (> num (- (line-end-position) (line-beginning-position)))
(insert " "))
(beginning-of-line))
(defun convert-utf-to-html-entites ()
"Convert utf entities to html"
(interactive)
(save-excursion
(setq case-fold-search nil)
(beginning-of-buffer)
(while (search-forward "«" nil t)
(replace-match "«" nil t))
(beginning-of-buffer)
(while (search-forward "»" nil t)
(replace-match "»" nil t))
(beginning-of-buffer)
(while (search-forward "–" nil t)
(replace-match "–" nil t))
(beginning-of-buffer)
(while (search-forward "—" nil t)
(replace-match "—" nil t))
(beginning-of-buffer)
(while (search-forward "Є" nil t) ; YE
(replace-match "Є" nil t))
(beginning-of-buffer)
(while (search-forward "є" nil t) ; YE
(replace-match "є" nil t))
(beginning-of-buffer)
(while (search-forward "і" nil t) ; i
(replace-match "і" nil t))
(beginning-of-buffer)
(while (search-forward "ї" nil t) ; yi
(replace-match "ї" nil t))
(beginning-of-buffer)
(while (search-forward "І" nil t) ; yi
(replace-match "І" nil t))
))
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>