I like to start my work in Emacs with two open windows. For that, I have a function (split-window-horizontally) in my .emacs file.
It works with no problems, splitting window into two side-by-side windows after each evaluation of .emacs buffer. Of course, it also splits window every time I re-evaluate .emacs file to test some new setting. How can I tell emacs not to split the window after each evaluation of .emacs buffer, but rather only after restarting emacs?
I'm looking for something like:
(eval-only-after-restart
(split-window-horizontally))
Is there any such function? Or another way how to do it?
Like this:
(unless (boundp 'done-split-window-horizontally)
(split-window-horizontally)
(setq done-split-window-horizontally t))
Another way:
(add-hook 'emacs-startup-hook #'split-window-horizontally)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With