I want to add an option to save the emacs kill ring in the Emacs Pro Essentials plugin.
What I’d really like is a hook for when the editor is going to exit, so I can save the kill ring then, but no such hook exists.
But maybe settings() are saved automatically on exit, and I have just been overthinking this? My experience with settings, however, is that they are saved every time you add or remove something from the settings object. (You get a log message in the console when you do that - I am using settings to keep the isearch history …)
It seems like settings in views are saved automatically by sublime, so I thought, Maybe I can create an invisible view (is there such a thing?) and store the kill ring on that view’s settings, and then it would be saved automatically on exit then.
I admit I am being lazy. I can write tests on all these things but I am hoping somebody out there in plugin land has some advice.