Is it possible to temporarily disable buffer (and frame) redraws? I particuarly mean situation, when I disable some theme and enable another one, and would like to avoid a moment when emacs flashes with white background.
To prepare, load any two dark themes in any way you like. For example eval the following snippet (I use twilight and molokai but any dark themes will do):
(load-theme 'twilight 't 't) (load-theme 'molokai 't 't) (enable-theme 'twilight)
Then simulate actual problem: try eval-ing that:
(disable-theme 'twilight) (enable-theme 'molokai)
at least in my case Emacs redraws itself in white before picking new colors, what causes unpleasant screen flash. Before you ask: reversing the order (enabling new before disabling old) does not help, in fact it sometimes flashes twice.
I look for tricks like
(let ((inhibit-something-to-keep-emacs-from-repainting)) (disable-theme 'twilight) (enable-theme 'molokai))
or maybe for another way to reload themes.
PS inhibit-redisplay, whatever it is, does not seem to help.