[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Should delete-window switch to next buffer when there is only one wi
From: |
Emanuel Berg |
Subject: |
Re: Should delete-window switch to next buffer when there is only one window? |
Date: |
Tue, 14 Jan 2014 23:40:15 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Ernest Adrogué <nfdisco@gmail.com> writes:
> Currently if you attempt to delete an only window,
> the following message shows up
>
> Attempt to delete minibuffer or sole ordinary window
>
> I think that perhaps it would be better if it
> switched buffers instead. What do you think?
I haven't thought about that, but this is the kind of
hacking I like, when Emacs figures out what you mean,
based on something that isn't part of the command
itself.
Try this:
(defun delete-window-or-switch ()
(interactive)
(if (= 1 (count-windows)) (switch-buffer)
(delete-window) ))
--
underground experts united:
http://user.it.uu.se/~embe8573