emerge-combine-versions-template is a variable defined in `emerge.el'.
Its value is

"#ifdef NEW\n%b#else /* not NEW */\n%a#endif /* not NEW */\n"

Template for `emerge-combine-versions' to combine the two versions.
The template is inserted as a string, with the following interpolations:
%a the A version of the difference
%b the B version of the difference
%% the character `%'
Don't forget to end the template with a newline.
Note that this variable can be made local to a particular merge buffer by
giving a prefix argument to `emerge-set-combine-versions-template'.

You can customize this variable.