Serial1 uses SERCOM0 on the Arduino Zero, although this different on the MKR series boards. The Serial1 and interrupt service routine (ISR) for SERCOM0 are declared in the Arduino Zero's "variant.cpp" file.
The main disadvantage of altering the "variant.cpp" file, is that it will be overwritten each time the Arduino Zero core is updated, currently version 1.6.19.
A possible solution is to create your own custom Arduino core for your board. Although it's somewhat old now, I've detailed how to do this here: Adding custom (Zero based) boards to the Arduino IDE - Arduino Zero - Arduino Forum. The JSON configuration file references to the versions of bossac, openocd and CMSIS might be out of date by now.
Yes, it's possible just to comment out or delete the Serial1 declaration and ISR and recreate it in your sketch.
It's also possible declare the function name as a weakly declared linker symbol in the "variant.cpp" file, allowing it to be subsequently overriden in your sketch:
Maybe I did not understand.
This is the code of my sketch, without changing anything in the compiler.
But nothing goes, not even what was going before.
No, but I meant if there's a way not to change variant.cpp
Delete Serial1 and recreate it ? (Only on sketch)
Or add other type of end transmission interrupt.
Unfortunately, there's no way of doing that without modifying the "variant.cpp" file.
As Arduino chose not to make the serial handler functions weakly declared linker symbols in the "variant.cpp" file, it's therefore not possible to override these functions in your sketch.
Like I mentioned, the other option is to create and maintain your own board entry and copy of the Arduino core code on the Arduino IDE. It's then possible to make changes to your copy of the "variant.cpp" file without affecting other boards.