;;; gnus-win.el --- window configuration functions for Gnus
-;; Copyright (C) 1996,97,98,99 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000
+;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
(article 1.0)))
(t
'(vertical 1.0
- (summary 0.25 point)
- (if gnus-carpal '(summary-carpal 4))
- (article 1.0)))))
+ (summary 0.25 point)
+ (if gnus-carpal '(summary-carpal 4))
+ (article 1.0)))))
(server
(vertical 1.0
(server 1.0 point)
(defun gnus-configure-frame (split &optional window)
"Split WINDOW according to SPLIT."
(unless window
- (setq window (get-buffer-window (current-buffer))))
+ (setq window (or (get-buffer-window (current-buffer)) (selected-window))))
(select-window window)
;; This might be an old-stylee buffer config.
(when (vectorp split)
(t (cdr (assq type gnus-window-to-buffer))))))
(unless buffer
(error "Invalid buffer type: %s" type))
- (switch-to-buffer (gnus-get-buffer-create
- (gnus-window-to-buffer-helper buffer)))
+ (let ((buf (gnus-get-buffer-create
+ (gnus-window-to-buffer-helper buffer))))
+ (if (eq buf (window-buffer (selected-window))) (set-buffer buf)
+ (switch-to-buffer buf)))
(when (memq 'frame-focus split)
(setq gnus-window-frame-focus window))
;; We return the window if it has the `point' spec.
(setq gnus-frame-split-p nil)
(unless split
- (error "No such setting: %s" setting))
+ (error "No such setting in `gnus-buffer-configuration': %s" setting))
(if (and (setq all-visible (gnus-all-windows-visible-p split))
(not force))
(switch-to-buffer nntp-server-buffer))
(select-frame frame)))
- (switch-to-buffer nntp-server-buffer)
(let (gnus-window-frame-focus)
- (gnus-configure-frame split (get-buffer-window (current-buffer)))
+ (switch-to-buffer nntp-server-buffer)
+ (gnus-configure-frame split)
(when gnus-window-frame-focus
(select-frame (window-frame gnus-window-frame-focus))))))))
(if (and (setq buf (get-buffer (gnus-window-to-buffer-helper buffer)))
(setq win (get-buffer-window buf t)))
(if (memq 'point split)
- (setq all-visible win))
+ (setq all-visible win))
(setq all-visible nil)))
(t
(when (eq type 'frame)