You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
546 B
EmacsLisp

(defun org-format ()
(interactive)
(goto-char (region-beginning))
(while (re-search-forward " -" nil t)
(replace-match " "))
(goto-char (region-beginning))
(while (re-search-forward "'" nil t)
(replace-match ""))
(goto-char (region-beginning))
(while (re-search-forward "\\R\"" nil t)
(replace-match "\\R“"))
(goto-char (region-beginning))
(while (re-search-forward " \"" nil t)
(replace-match ""))
(goto-char (region-beginning))
(while (re-search-forward "\"" nil t)
(replace-match "")))