diff --git a/windows.el b/windows.el index 7504a3c..27950b2 100644 --- a/windows.el +++ b/windows.el @@ -647,6 +647,16 @@ ;;Variables for Emacs 19 (defvar win:no-raise-at-save nil "*Non-nil inhibits win-save-all-configurations from raising each frame.") +(defvar win:delete-frame-with-window t +;; we could get fancier with this, maybe. +;; use special values like: +;; :other => delete frame only if it's not the selected frame +;; :current => delete frame only if it is the selected frame +;; '(:other :current) => equivalent to 't' + "Non-nil, to cause `win:delete-window' to _not_ delete the frame of the +delted window. + +only relevant if `win:use-frame' is non-nil.") ;(Rev.1.4) (defvar win:frame-parameters-to-save-default (delq nil @@ -930,19 +940,22 @@ (aref win:configs n)) ;;currently selected window (error "Can't delete sole window")) (if (or force - (y-or-n-p (format "Erase %sconfiguration of %c{%s}?" - (if killbufmsg "buffer and " "") - (+ n win:base-key) (aref win:names n)))) + (y-or-n-p (format "Erase %sconfiguration of %c{%s}?" + (if killbufmsg "buffer and " "") + (+ n win:base-key) (aref win:names n)))) (progn - (if win:use-frame (delete-frame (aref win:configs n))) - (aset win:configs n nil) - (aset win:names-prefix n "") - (if (= n win:current-config) - (let ((free (win:free-window-min))) - (setq win:current-config win:last-config - win:last-config free) - (win:set-wc win:current-config))) - (win:update-mode-line win:current-config))) + (and win:use-frame + win:delete-frame-with-window + (delete-frame (aref win:configs n))) + (aset win:configs n nil) + (aset win:names-prefix n "") + (if (and (= n win:current-config) + win:delete-frame-with-window) + (let ((free (win:free-window-min))) + (setq win:current-config win:last-config + win:last-config free) + (win:set-wc win:current-config))) + (win:update-mode-line win:current-config))) (message "")) (defun win:store-buffer-list (index) @@ -2114,6 +2127,20 @@ (run-hooks 'win-load-hook) ;; $Log$ +;; Revision 2.35 2002/03/08 01:12:13 yuuji +;; By Sean Champ ; +;; win:delete-frame-with-window : added +;; +;; #'win:delete-window : +;; if win:delete-frame-with-window is nil: +;; 1) do not delete the frame of the window +;; 2) do not call #'win:set-wc +;; +;; these changes have been tested, and appear to work well enough. +;; +;; (xemacs 21.5.4, with gtk widgets, might make some strange widgets appear +;; in the buffer that is selected after the key-sequence C-c C-w 9 c ) +;; ;; Revision 2.34 2002/01/29 14:09:21 yuuji ;; Call win:restore-buffer-list in win-load-all-configurations so that ;; buffer-list order in each window can be back at resume-windows.