[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request/RFC: proper highlighting of code embedded in comment
From: |
Stefan Monnier |
Subject: |
Re: Feature request/RFC: proper highlighting of code embedded in comments |
Date: |
Mon, 17 Oct 2016 09:12:14 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
> (font-lock-add-keywords nil '(("^ *>>> \\(.*\\)" (0
> (indirect-font-lock-highlighter 1 'python-mode)))))
IIUC you additionally want to handle the "... " lines.
> Stefan (and emacs-devel!), do you think I should add this to ELPA?
Feel free.
> Are there downsides I should be aware of?
The usual:
- running the major mode might run "side-effecting code" from the user's
hook. I consider it a bug in the user's setup, but it does happen.
- it fails to take into account local modifications of the font-lock rules.
- ...
Nothing too terrible, I think.
Stefan