[mew-dist 22989] Re: split horizon

Hideyuki SHIRAI ( 白井秀行 ) shirai at example.com
2003年 1月 23日 (木) 19:58:31 JST


From: Kazu Yamamoto (山本和彦) <kazu at example.com> さん曰く
Subject: [mew-dist 22945] Re: split horizon
Message-ID: <20030121.130434.125095233.kazu at example.com>
Date: Tue, 21 Jan 2003 13:04:34 +0900 (JST)

> anon cvs に XEmacs にも対応したコードを入れました。update すれば、パッ
> チは不要です。
> 
> # まだ、直したいところはあるのだけれど。

かずさんの思っている直したいところとは違うと思うのですが、
mew-use-full-window => t にしていると、split が無力なので、パッ
チのように Mew 以外で使っている Window だけ消すというふうにする
のはどうでしょうか。height が小さくなり過ぎると全部消しちゃいま
すけど、それはまぁしょうがないということで。

ちなみに、Mew のものか否かは major-mode が 'mew-' ではじまってい
るかで判断しています。

# walk-windows の使い方もわかったことだし ^^;;;

-- 
白井秀行@ぼくは nil

P.S.
おおさわさんの名前を大村さんと書いてしまいました (_ _)
-------------- next part --------------
*** mew-summary3.el.orig	Thu Jan 23 12:26:03 2003
--- mew-summary3.el	Thu Jan 23 19:02:27 2003
***************
*** 36,42 ****
    (unless mew-use-other-frame-for-draft
      (if (get-buffer (mew-buffer-message))
  	(delete-windows-on (mew-buffer-message)))
!     (if (or mew-use-full-window (< (window-height) 25)) (delete-other-windows))
      (let ((split-window-keep-point t))
        (split-window-vertically))))
  
--- 36,45 ----
    (unless mew-use-other-frame-for-draft
      (if (get-buffer (mew-buffer-message))
  	(delete-windows-on (mew-buffer-message)))
!     (if (< (window-height) 25)
! 	(delete-other-windows)
!       (if mew-use-full-window
! 	  (mew-delete-other-window)))
      (let ((split-window-keep-point t))
        (split-window-vertically))))
  
*** mew.el.orig	Thu Jan 23 17:12:29 2003
--- mew.el	Thu Jan 23 19:38:55 2003
***************
*** 351,356 ****
--- 351,373 ----
  ;;;
  ;;; Window configuration
  ;;;
+ (defun mew-delete-other-window ()
+   (unless (one-window-p)
+     (let ((owin (selected-window))
+ 	  wins ret)
+       (walk-windows (lambda (win)
+ 		      (set-buffer (window-buffer win))
+ 		      (unless (or (eq owin win)
+ 				  (string-match "^mew-" (symbol-name major-mode)))
+ 			(setq wins (cons win wins))))
+ 		    nil)
+       (while wins
+ 	(unless (one-window-p)
+ 	  (setq ret t)
+ 	  (delete-window (car wins)))
+ 	(setq wins (cdr wins)))
+       (select-window owin)
+       ret)))
  
  (defun mew-window-configure (action)
    "Configure windows accroding to ACTION.
***************
*** 374,384 ****
  	 (height nil) (winsum nil) (sum-height 0) (msg-height 0))
      (setq height (+ (if obufwin (window-height obufwin) 0)
  		    (if msgwin  (window-height msgwin)  0)))
!     (when (or mew-use-full-window
! 	      (<= height (* 2 window-min-height)))
        ;; Delete other windows and use full emacs window.
        (delete-other-windows)
        (setq height (window-height (selected-window))))
      ;;
      (if (get-buffer msgbuf)
  	(delete-windows-on msgbuf)
--- 391,406 ----
  	 (height nil) (winsum nil) (sum-height 0) (msg-height 0))
      (setq height (+ (if obufwin (window-height obufwin) 0)
  		    (if msgwin  (window-height msgwin)  0)))
!     (cond
!      ((<= height (* 2 window-min-height))
        ;; Delete other windows and use full emacs window.
        (delete-other-windows)
        (setq height (window-height (selected-window))))
+      ((and mew-use-full-window
+ 	   (mew-delete-other-window))
+       ;; delete windows all but Mew's one.
+       (setq height (+ (if obufwin (window-height obufwin) 0)
+ 		      (if msgwin  (window-height msgwin)  0)))))
      ;;
      (if (get-buffer msgbuf)
  	(delete-windows-on msgbuf)


Mew-dist メーリングリストの案内