Close Except/Like Plugin
Assumed you have these documents opened in Kate:
Then you have the following options to close documents as displayed in the screenshot:
Use the checkbox in the last item of the list to enable or disable a confirmation dialog. The selected option will be applied to both close actions.