Skip to content

Instantly share code, notes, and snippets.

@fredRos fredRos/.emacs
Created May 8, 2017

Embed
What would you like to do?
Minimal syntax highlighting for emails. Colorize multiple quotes up to 5 levels in different colors. Use with thunderbird as external editor.
;; http://ergoemacs.org/emacs/elisp_syntax_coloring.html
(setq fredmail-highlights
'(("^[ \t]*>>>>>.*$" . 'org-level-5)
("^[ \t]*>>>>.*$" . 'org-level-4)
("^[ \t]*>>>.*$" . 'org-level-3)
("^[ \t]*>>.*$" . 'org-level-2)
("^[ \t]*>.*$" . 'org-level-1)
("\\*.*\\*" . 'markdown-bold-face)
))
(define-derived-mode fredmail-mode fundamental-mode "fredmail"
"major mode for editing emails."
(setq font-lock-defaults '(fredmail-highlights)))
(add-to-list 'auto-mode-alist '("\\.eml\\'" . fredmail-mode))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.