I shifted from vim recently, and wish app-emacs/gentoo-syntax can provide better syntax-highlight for the USE flags in /etc/make.conf. For example: USE="emacs -vim" The "emacs" in blue color and "-vim" in red color, or some other colors. Thanks! Reproducible: Always
I haven't found time for this yet, and most probably won't in the next future. Patches are welcome.
Emacs doesn't use ebuild-mode for make.conf, but conf-unix-mode. For the requested highlighting, one would have to add "USE=" and the flag syntax to the font-lock keywords of that mode (or a mode derived from it), most likely something of the form "(matcher . anchored-highlighter)". See the Elisp Reference Manual: https://www.gnu.org/software/emacs/manual/html_node/elisp/Search_002dbased-Fontification.html A complication is that a variable assignment in make.conf can span multiple lines, therefore the standard line-based approach won't work. A possible solution to this is outlined here: https://www.gnu.org/software/emacs/manual/html_node/elisp/Multiline-Font-Lock.html Also, comment #1 still applies.