Warn before quitting in Safari
Fabio's answer seems not to works as expected, not sure if I have a different version of BTT, or osx. Anyway, I found another option: simply bind Quit Safari with another keybinding.

Go to system preferences -> Keyboard -> Shortcuts -> App Shortcuts -> Add new one ('+' sign) -> Choose Safari from the Application menu -> Enter in the Menu Title the exact text: Quit Safari -> Set another shortcut than cmd-Q, I used ^-cmd-Q (option+command+q).


If you do want quit Safari, you can use this shortcut, or quit from the menu.