Add org-format-fr, use modus-themes

This commit is contained in:
trémeur 2023-02-19 21:03:03 +00:00
parent 64d6179e0d
commit 91158f65e1
2 changed files with 140 additions and 51 deletions

View file

@ -49,3 +49,74 @@
(goto-char (point-min))
(while (re-search-forward "=\"\\([^>]*\\)”" nil t)
(replace-match "=\"\\1\"")))
(defun org-format-fr ()
"Correct formatting in a French org file"
(interactive)
(org-format)
(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 " »"))
(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 "!"))
(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 ")))