I am looking for a way to highlight or use different face of quoted text in plain text. It seems that there should be a sophisticated/enhanced text mode but I cannot find it.
If there isn't a easy solution, can you let me know where should I begin to write a function?
Thank you very much!
A noob who has been using Emacs from 19.xx
For the regexp, I think you want to exclude
"
itself in the string content, except when escaped. Something like this ---"
, followed by either a non"
or an escaped character, followed by"
:But be aware that matching quotations "..." is notorious. I do exactly that in Info+, but there are a few Info nodes where this highlighting gets thrown off by the occasional lone
\"
or?\"
in manuals that refer to such programming constructs.I'm not sure about a major-mode that already does this, but you can make one easily enough using define-derived-mode
Alternatively, you can add a hook to text-mode:
Generally speaking, a good mode for editing any text is org-mode. It does not font-lock strings by default, though.