Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 346653 - app-emacs/ebuild-mode: highlight /etc/portage/make.conf better
Summary: app-emacs/ebuild-mode: highlight /etc/portage/make.conf better
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement with 1 vote (vote)
Assignee: Emacs project
URL:
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks:
 
Reported: 2010-11-24 14:04 UTC by Yu Yuwei
Modified: 2023-08-31 18:27 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yu Yuwei 2010-11-24 14:04:22 UTC
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
Comment 1 Ulrich Müller gentoo-dev 2011-01-29 10:21:46 UTC
I haven't found time for this yet, and most probably won't in the next future.

Patches are welcome.
Comment 2 Ulrich Müller gentoo-dev 2023-08-31 13:29:32 UTC
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.