Mercurial > hg > xemacs-beta
comparison lisp/window-xemacs.el @ 286:57709be46d1b r21-0b41
Import from CVS: tag r21-0b41
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:35:03 +0200 |
parents | 558f606b08ae |
children |
comparison
equal
deleted
inserted
replaced
285:9a3756523c1b | 286:57709be46d1b |
---|---|
135 (interactive) | 135 (interactive) |
136 (let ((wc (or config (current-window-configuration))) | 136 (let ((wc (or config (current-window-configuration))) |
137 (stack (window-config-stack))) | 137 (stack (window-config-stack))) |
138 (if (or (= 0 (undoable-stack-a-length stack)) | 138 (if (or (= 0 (undoable-stack-a-length stack)) |
139 (not (equal (undoable-stack-a-top stack) wc))) | 139 (not (equal (undoable-stack-a-top stack) wc))) |
140 (progn | 140 (undoable-stack-push stack wc)))) |
141 (undoable-stack-push stack wc) | |
142 ;; kludge. | |
143 (if (featurep 'toolbar) | |
144 (set-specifier-dirty-flag default-toolbar)))))) | |
145 | 141 |
146 (defun pop-window-configuration () | 142 (defun pop-window-configuration () |
147 "Pop the top window configuration off the window-config stack and set it. | 143 "Pop the top window configuration off the window-config stack and set it. |
148 Before setting the new window configuration, the current window configuration | 144 Before setting the new window configuration, the current window configuration |
149 is pushed onto the \"unpop\" stack. | 145 is pushed onto the \"unpop\" stack. |
159 (while (equal popped wc) | 155 (while (equal popped wc) |
160 (setq popped (undoable-stack-pop stack))) | 156 (setq popped (undoable-stack-pop stack))) |
161 (undoable-stack-push stack wc) | 157 (undoable-stack-push stack wc) |
162 (undoable-stack-undo stack) | 158 (undoable-stack-undo stack) |
163 (set-window-configuration popped) | 159 (set-window-configuration popped) |
164 ;; probably not necessary: | |
165 (if (featurep 'toolbar) | |
166 (set-specifier-dirty-flag default-toolbar)) | |
167 popped) | 160 popped) |
168 (trunc-stack-bottom | 161 (trunc-stack-bottom |
169 (error "Bottom of window config stack"))))) | 162 (error "Bottom of window config stack"))))) |
170 | 163 |
171 (defun unpop-window-configuration () | 164 (defun unpop-window-configuration () |
189 (progn | 182 (progn |
190 (undoable-stack-redo stack) | 183 (undoable-stack-redo stack) |
191 (undoable-stack-pop stack)))) | 184 (undoable-stack-pop stack)))) |
192 (undoable-stack-push stack wc) | 185 (undoable-stack-push stack wc) |
193 (set-window-configuration popped) | 186 (set-window-configuration popped) |
194 ;; probably not necessary: | |
195 (if (featurep 'toolbar) | |
196 (set-specifier-dirty-flag default-toolbar)) | |
197 popped) | 187 popped) |
198 (trunc-stack-bottom | 188 (trunc-stack-bottom |
199 (error "Top of window config stack"))))) | 189 (error "Top of window config stack"))))) |
200 | 190 |
201 | 191 |