help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[h-e-w] split-window-recent


From: Nascif Abousalh-Neto
Subject: [h-e-w] split-window-recent
Date: Fri, 16 May 2003 19:08:55 -0400

Hi all,
        I use the following command bound to C-x 2 (according to my notes the code was created by Colin Walters, thanks!)

(defun split-window-recent ()
  "Split the current window, and show the next most recently used
buffer in the newly created window."
  (interactive)
  (split-window)
  (let ((nextbuf (caddr (buffer-list))))
    (when nextbuf
      (show-buffer (next-window (selected-window))
                   nextbuf))))

It is quite nice 90% of the time, but every now and then it selects the minibuffer buffer into the new window - which is clearly an annoyance. I would like to test if the "nextbuf" buffer is the minibuffer, but there seems to be no "minibuffer-p" or equivalent test predicate (on GNU Emacs 21.2).

Any ideas?
TIA,
        Nascif


reply via email to

[Prev in Thread] Current Thread [Next in Thread]