[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: reload customization
From: |
Barry Margolin |
Subject: |
Re: reload customization |
Date: |
Wed, 11 Feb 2015 11:43:44 -0500 |
User-agent: |
MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) |
In article <8761b8z9zu.fsf@engels.histomat.net>,
Haines Brown <haines@engels.histomat.net> wrote:
> In my init file I have
>
> (defun reload () "Reloads .emacs interactively."
> (interactive)
> (load "~/.emacs"))
>
> The problem is that I also have
>
> (split-window-horizontally)
>
> As things now stand, a reload splits current window so that I end up
> with three. I'd like to have reload instead preserve the two window
> split.
Wrap it with save-window-excursion:
(save-window-excursion
(load "~/.emacs"))
You should read the caveats in
https://www.gnu.org/software/emacs/manual/html_node/elisp/Window-Configur
ations.html
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***