Hello,
This a is small patch that removes compilation-buffer-name-function-from define-compilation-mode. compilation-buffer-name-function is used before the major-mode is loaded, therefore overriding it in define-compilation-mode is ineffectual. Removing it from the list of overridden variables will ensure that it is not mistaken for a variable that can be major mode specific. Also the function compilation-start takes an optional argument name-function, so there is already a mechanism to override it.