|
|
|
|
(defun org-format ()
|
|
|
|
|
(interactive)
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward " -" nil t)
|
|
|
|
|
(replace-match " –"))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward " –" nil t)
|
|
|
|
|
(replace-match " –"))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward "/ –" nil t)
|
|
|
|
|
(replace-match " –/"))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward " \\.\\.\\." nil t)
|
|
|
|
|
(replace-match " …"))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward " …" nil t)
|
|
|
|
|
(replace-match " …"))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward "'" nil t)
|
|
|
|
|
(replace-match "’"))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward " \n" nil t)
|
|
|
|
|
(replace-match "\n"))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward "\n\"" nil t)
|
|
|
|
|
(replace-match "\n“"))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward " \"" nil t)
|
|
|
|
|
(replace-match " “"))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward "\"" nil t)
|
|
|
|
|
(replace-match "”"))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward "“/" nil t)
|
|
|
|
|
(replace-match "/“"))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward "/”" nil t)
|
|
|
|
|
(replace-match "”/"))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward "=”" nil t)
|
|
|
|
|
(replace-match "=\""))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward "”>" nil t)
|
|
|
|
|
(replace-match "\">"))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward "”/>" nil t)
|
|
|
|
|
(replace-match "\"/>"))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward "=\"\\([^>]*\\)”" nil t)
|
|
|
|
|
(replace-match "=\"\\1\"")))
|