I would like to highlight some portions of code with a specific background color, but I would like the rest of code highlighting to remain in place. I.e., keywords should still be highlighted by font-lock as keywords, only their background should change.
At the moment, I am doing it with font-lock-add-keywords, where a regexp matches whatever I want to highlight and to every match it prepends a face defined like so:
(:background "#d1eaff")
But when it adds this face, it doesn't preserve the previous attributes like foreground color, and just uses the default face with this background color.
Is there a way to make it use the current faces and only replace their background colors with the new one? Like adding a new attribute to existing faces?