To save for example theme settings before the live preview, so theme will show exactly as after the activation.

A live preview shouldn't save *anything* to the database. Can you be more specific?

admin panel settings of the theme:

style css file

logo image

show excerpt in the home page - yes/no

etc..
so I use after_switch_theme action to save all this stuff, but on live preview event settings are not saved because this action is not called.

I think that after such hook will be available a lot of developers will start to develop themes in more professional way, because now I think some of them just use update_option function to insert a data for knowing if settings were saved or not.

etc..
so I use after_switch_theme action to save all this stuff, but on live preview event settings are not saved because this action is not called.

I think that after such hook will be available a lot of developers will start to develop themes in more professional way, because now I think some of them just use update_option function to insert a data for knowing if settings were saved or not.

So if we have activation and deactivation then we should have a life preview hook too.
Theme settings will be saved on theme activation or on theme live preview...
To check every time when the site loads if the settings were saved or not does not look very nice.

For me for example this is one thing that I think just is missed in the current WordPress build.

It would be great too to have a is_live_preview() function to know if the current state of theme is just a preview for reducing the files and load time but this is already for another ticket.

I agree to comment:3. Settings shouldn't be saved just because I preview something. get_option() supports a third parameter to define a default value, which should have in your case the same value as after a theme activation.

There is also an action start_previewing_theme[1] and you can use $wp_customize->is_preview()[2].