428
|
1 ;;; window-xemacs.el --- XEmacs window commands aside from those written in C.
|
|
2
|
|
3 ;; Copyright (C) 1985, 1989, 1993-94, 1997 Free Software Foundation, Inc.
|
|
4 ;; Copyright (C) 1995, 1996 Ben Wing.
|
|
5
|
|
6 ;; Maintainer: XEmacs Development Team
|
|
7 ;; Keywords: frames, extensions, dumped
|
|
8
|
|
9 ;; This file is part of XEmacs.
|
|
10
|
|
11 ;; XEmacs is free software; you can redistribute it and/or modify it
|
|
12 ;; under the terms of the GNU General Public License as published by
|
|
13 ;; the Free Software Foundation; either version 2, or (at your option)
|
|
14 ;; any later version.
|
|
15
|
|
16 ;; XEmacs is distributed in the hope that it will be useful, but
|
|
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
19 ;; General Public License for more details.
|
|
20
|
|
21 ;; You should have received a copy of the GNU General Public License
|
|
22 ;; along with XEmacs; see the file COPYING. If not, write to the
|
|
23 ;; Free Software Foundation, 59 Temple Place - Suite 330,
|
|
24 ;; Boston, MA 02111-1307, USA.
|
|
25
|
|
26 ;;; Synched up with: Not synched.
|
|
27
|
|
28 ;;; Commentary:
|
|
29
|
|
30 ;; This file is dumped with XEmacs.
|
|
31
|
|
32 ;; slb - 5/29/97
|
|
33 ;; Split apart from window.el in order to keep that file better in synch
|
|
34 ;; with Emacs.
|
|
35
|
|
36 ;;; Code:
|
|
37
|
|
38 (defgroup windows nil
|
|
39 "Windows within a frame."
|
|
40 :group 'environment)
|
|
41
|
|
42 (defun recenter (&optional n window)
|
|
43 "Center point in WINDOW and redisplay frame. With N, put point on line N.
|
|
44 The desired position of point is always relative to the window.
|
|
45 Just C-u as prefix means put point in the center of the window.
|
|
46 No N (i.e., it is nil) erases the entire frame and then
|
|
47 redraws with point in the center of the window.
|
|
48 If WINDOW is nil, the selected window is used."
|
|
49 (interactive "_P")
|
|
50 (center-to-window-line (if (consp n) nil n) window)
|
|
51 (when (null n)
|
|
52 (redraw-frame (window-frame window) t)))
|
|
53
|
444
|
54 (defun backward-other-window (count &optional which-frames which-devices)
|
|
55 "Select the COUNT'th different window on this frame, going backwards.
|
|
56 This is just like calling `other-window' with COUNT negated."
|
428
|
57 (interactive "p")
|
444
|
58 (other-window (- count) which-frames which-devices))
|
428
|
59
|
|
60 (defalias 'windows-of-buffer 'get-buffer-window-list)
|
|
61
|
|
62 (defun buffer-in-multiple-windows-p (&optional buffer)
|
|
63 "Return t if BUFFER is in multiple windows.
|
|
64 If BUFFER is not specified, the current buffer will be used."
|
|
65 (setq buffer (or buffer
|
|
66 (get-buffer buffer)
|
|
67 (get-file-buffer buffer)
|
|
68 (current-buffer)))
|
|
69 (> (length (windows-of-buffer buffer)) 1))
|
|
70
|
|
71 (defun window-list (&optional frame minibuf window)
|
|
72 "Return a list of windows on FRAME, beginning with WINDOW.
|
|
73 FRAME and WINDOW default to the selected ones.
|
|
74 Optional second arg MINIBUF t means count the minibuffer window
|
|
75 even if not active. If MINIBUF is neither t nor nil it means
|
|
76 not to count the minibuffer even if it is active."
|
1261
|
77 (setq frame (or frame (selected-frame))
|
|
78 window (or window (selected-window frame)))
|
428
|
79 (if (not (eq (window-frame window) frame))
|
|
80 (error "Window must be on frame."))
|
|
81 (let ((current-frame (selected-frame))
|
|
82 list)
|
|
83 (unwind-protect
|
|
84 (save-window-excursion
|
|
85 (select-frame frame)
|
|
86 (walk-windows
|
|
87 (function (lambda (cur-window)
|
|
88 (if (not (eq window cur-window))
|
|
89 (setq list (cons cur-window list)))))
|
|
90 minibuf)
|
|
91 (setq list (cons window list)))
|
|
92 (select-frame current-frame))))
|
|
93
|
|
94 ;; We used to have set-window-dedicated-p as an obsolete version
|
|
95 ;; of set-window-buffer-dedicated, but it really makes more sense
|
|
96 ;; this way.
|
|
97
|
|
98 (make-obsolete 'set-window-buffer-dedicated 'set-window-dedicated-p)
|
|
99 (defun set-window-buffer-dedicated (window buffer)
|
|
100 "Make WINDOW display BUFFER and be dedicated to that buffer.
|
|
101 Then Emacs will not automatically change which buffer appears in WINDOW.
|
|
102 If BUFFER is nil, make WINDOW not be dedicated (but don't change which
|
|
103 buffer appears in it currently)."
|
|
104 (if (bufferp buffer)
|
|
105 (set-window-buffer window (get-buffer-create buffer)))
|
|
106 (set-window-dedicated-p window (not (null buffer))))
|
1149
|
107
|
|
108 ;; Window configurations
|
428
|
109
|
3646
|
110 (defcustom window-configuration-includes-position nil
|
|
111 "*Whether restoring window configurations will restore positions too.
|
|
112 If nil, only the size of windows will be restored.
|
|
113
|
|
114 Note that setting this value to t may have counterintuitive consequences,
|
|
115 if a window manager employing virtual desktops is in use."
|
|
116 :type 'boolean
|
|
117 :group 'windows)
|
|
118
|
1149
|
119 (defstruct saved-window
|
|
120 currentp minibufferp minibuffer-scrollp
|
|
121 buffer mark-marker
|
|
122 start-marker
|
|
123 point-marker
|
|
124 pixel-left pixel-top pixel-right pixel-bottom
|
|
125 hscroll modeline-hscroll
|
|
126 dedicatedp
|
|
127 first-hchild first-vchild next-child)
|
|
128
|
|
129 (defstruct window-configuration
|
|
130 frame
|
2872
|
131 frame-top frame-left
|
1149
|
132 frame-pixel-width frame-pixel-height
|
|
133 current-buffer
|
|
134 minibuffer-pixel-height
|
|
135 min-width min-height
|
|
136 saved-root-window)
|
|
137
|
|
138 (defun window-configuration-equal (conf-1 conf-2)
|
|
139 "Returns a boolean indicating whether the two given configurations
|
3646
|
140 are identical.
|
|
141
|
|
142 Window configurations containing windows with different window
|
|
143 positions are not identical iff `window-configuration-includes-position'
|
|
144 is t."
|
1149
|
145 (or (eq conf-1 conf-2)
|
|
146 (and (eq (window-configuration-frame conf-1)
|
|
147 (window-configuration-frame conf-2))
|
|
148 (= (window-configuration-frame-pixel-width conf-1)
|
|
149 (window-configuration-frame-pixel-width conf-2))
|
|
150 (= (window-configuration-frame-pixel-height conf-1)
|
|
151 (window-configuration-frame-pixel-height conf-2))
|
3646
|
152 (if window-configuration-includes-position
|
|
153 (and (equal (window-configuration-frame-top conf-1)
|
|
154 (window-configuration-frame-top conf-2))
|
|
155 (equal (window-configuration-frame-left conf-1)
|
|
156 (window-configuration-frame-left conf-2)))
|
|
157 t)
|
1149
|
158 (eq (window-configuration-current-buffer conf-1)
|
|
159 (window-configuration-current-buffer conf-2))
|
|
160 (saved-window-equal (window-configuration-saved-root-window conf-1)
|
|
161 (window-configuration-saved-root-window conf-2)))))
|
|
162
|
|
163 (defun saved-window-equal (saved-1 saved-2)
|
|
164 "Returns a boolean indicating whether the two given saved windows
|
|
165 are identical."
|
|
166 (or (eq saved-1 saved-2)
|
|
167 (and (eq (saved-window-currentp saved-1)
|
|
168 (saved-window-currentp saved-2))
|
|
169 (eq (saved-window-minibuffer-scrollp saved-1)
|
|
170 (saved-window-minibuffer-scrollp saved-2))
|
|
171 (eq (saved-window-buffer saved-1)
|
|
172 (saved-window-buffer saved-2))
|
|
173 (equal (saved-window-mark-marker saved-1)
|
|
174 (saved-window-mark-marker saved-2))
|
|
175 (or (and (saved-window-currentp saved-1)
|
|
176 (saved-window-currentp saved-2))
|
|
177 (equal (saved-window-start-marker saved-1)
|
|
178 (saved-window-start-marker saved-2)))
|
|
179 (or (and (saved-window-currentp saved-1)
|
|
180 (saved-window-currentp saved-2))
|
|
181 (equal (saved-window-point-marker saved-1)
|
|
182 (saved-window-point-marker saved-2)))
|
|
183 (= (saved-window-pixel-left saved-1)
|
|
184 (saved-window-pixel-left saved-2))
|
|
185 (= (saved-window-pixel-top saved-1)
|
|
186 (saved-window-pixel-top saved-2))
|
|
187 (= (saved-window-pixel-right saved-1)
|
|
188 (saved-window-pixel-right saved-2))
|
|
189 (= (saved-window-pixel-bottom saved-1)
|
|
190 (saved-window-pixel-bottom saved-2))
|
|
191 (= (saved-window-hscroll saved-1)
|
|
192 (saved-window-hscroll saved-2))
|
1387
|
193 (equal (saved-window-modeline-hscroll saved-1)
|
|
194 (saved-window-modeline-hscroll saved-2))
|
1149
|
195 (eq (saved-window-dedicatedp saved-1)
|
|
196 (saved-window-dedicatedp saved-2))
|
|
197 (maybe-saved-window-equal (saved-window-first-hchild saved-1)
|
|
198 (saved-window-first-hchild saved-2))
|
|
199 (maybe-saved-window-equal (saved-window-first-vchild saved-1)
|
|
200 (saved-window-first-vchild saved-2))
|
|
201 (maybe-saved-window-equal (saved-window-next-child saved-1)
|
|
202 (saved-window-next-child saved-2)))))
|
|
203
|
|
204 (defun maybe-saved-window-equal (maybe-saved-1 maybe-saved-2)
|
|
205 "Returns a boolean indicating whether the two given saved windows
|
|
206 or NILs are identical."
|
|
207 (cond
|
|
208 ((and (not maybe-saved-1) (not maybe-saved-2)) t)
|
|
209 ((not maybe-saved-1) (not maybe-saved-2))
|
|
210 ((not maybe-saved-2) (not maybe-saved-1))
|
|
211 (t (saved-window-equal maybe-saved-1 maybe-saved-2))))
|
|
212
|
|
213 (defun current-window-configuration (&optional frame)
|
|
214 "Return an object representing the current window configuration of FRAME.
|
|
215 If FRAME is nil or omitted, use the selected frame.
|
|
216 This describes the number of windows, their sizes and current buffers,
|
|
217 and for each window on FRAME the displayed buffer, where display
|
|
218 starts, and the positions of point and mark.
|
|
219 An exception is made for point in the current buffer:
|
|
220 its value is -not- saved."
|
|
221 (let ((frame (or frame (selected-frame))))
|
|
222 ;; The original C code used complicated but still incomplete logic
|
|
223 ;; to decide if and how to restore the size of the minibuffer. It
|
|
224 ;; goes something like this:
|
|
225 ; (let ((real-font-height
|
|
226 ; (font-height (face-font 'default) frame))
|
|
227 ; (minibuffer-height
|
|
228 ; (if (and (minibuffer-window frame)
|
|
229 ; (not (frame-minibuffer-only-p frame)))
|
|
230 ; (window-pixel-height (minibuffer-window frame))
|
|
231 ; 0)))
|
|
232 ; ...)
|
|
233
|
|
234 (make-window-configuration
|
|
235 :frame frame
|
2885
|
236 :frame-top (frame-property frame 'top)
|
|
237 :frame-left (frame-property frame 'left)
|
1149
|
238 :frame-pixel-width (frame-pixel-width frame)
|
|
239 :frame-pixel-height (frame-pixel-height frame)
|
|
240 :current-buffer (current-buffer)
|
|
241 :min-width window-min-width :min-height window-min-height
|
|
242 :minibuffer-pixel-height (window-pixel-height (minibuffer-window frame))
|
|
243 ;; this tries to do what the old code did:
|
|
244 ; :minibuffer-height (if (zerop (% minibuffer-height real-font-height))
|
|
245 ; (- (/ minibuffer-height real-font-height)) ; lines
|
|
246 ; minibuffer-height) ; pixels
|
|
247 :saved-root-window (root-window->saved-window (frame-root-window frame)))))
|
|
248
|
|
249 (defun root-window->saved-window (window)
|
|
250 "Converts a root window into a tree of saved-window structures."
|
|
251 (let ((buffer (window-buffer window))
|
|
252 (edges (window-pixel-edges window)))
|
|
253 (let ((left (nth 0 edges))
|
|
254 (top (nth 1 edges))
|
|
255 (right (nth 2 edges))
|
|
256 (bottom (nth 3 edges)))
|
|
257 (let ((saved-window
|
|
258 (make-saved-window
|
|
259 :currentp (eq window (selected-window (window-frame window)))
|
|
260 :minibufferp (eq window (minibuffer-window (window-frame window)))
|
|
261 :minibuffer-scrollp (eq window minibuffer-scroll-window)
|
|
262 :buffer buffer
|
|
263 :pixel-left left :pixel-top top :pixel-right right :pixel-bottom bottom
|
|
264 :hscroll (window-hscroll window)
|
|
265 :modeline-hscroll (modeline-hscroll window)
|
|
266 :dedicatedp (window-dedicated-p window)
|
|
267 :first-hchild (if (window-first-hchild window)
|
|
268 (root-window->saved-window (window-first-hchild window))
|
|
269 nil)
|
|
270 :first-vchild (if (window-first-vchild window)
|
|
271 (root-window->saved-window (window-first-vchild window))
|
|
272 nil)
|
|
273 :next-child (if (window-next-child window)
|
|
274 (root-window->saved-window (window-next-child window))
|
|
275 nil))))
|
|
276 (if buffer
|
|
277 (progn
|
|
278 (let ((marker (make-marker)))
|
|
279 (set-marker marker (window-start window) buffer)
|
|
280 (setf (saved-window-start-marker saved-window) marker))
|
4136
|
281 (if (not (eq buffer (current-buffer)))
|
|
282 (let ((marker (make-marker)))
|
|
283 (set-marker marker (window-point window) buffer)
|
|
284 (setf (saved-window-point-marker saved-window) marker)))
|
1149
|
285 (setf (saved-window-mark-marker saved-window)
|
|
286 (copy-marker (mark-marker t buffer)))))
|
|
287 saved-window))))
|
|
288
|
|
289 (defun set-window-configuration (configuration)
|
|
290 "Set the configuration of windows and buffers as specified by CONFIGURATION.
|
|
291 CONFIGURATION must be a value previously returned
|
|
292 by `current-window-configuration'."
|
|
293 (let ((frame (window-configuration-frame configuration)))
|
|
294 (if (and (frame-live-p frame)
|
|
295 (not (window-configuration-equal configuration
|
|
296 (current-window-configuration))))
|
|
297 (really-set-window-configuration frame configuration))))
|
|
298
|
|
299 (defun really-set-window-configuration (frame configuration)
|
|
300 "Set the window configuration CONFIGURATION on live frame FRAME."
|
|
301 ;; avoid potential temporary problems
|
|
302 (setq window-min-width 0)
|
|
303 (setq window-min-height 0)
|
|
304 (setq minibuffer-scroll-window nil)
|
|
305
|
|
306 (frame-reduce-to-one-window frame)
|
|
307 (set-window-configuration-frame-size configuration)
|
2888
|
308
|
|
309 ; avoid setting these if they're already up-to-date
|
|
310 ; This also avoids potential inaccuracies in these settings --Mike
|
3646
|
311 (when window-configuration-includes-position
|
|
312 (let ((left (window-configuration-frame-left configuration))
|
|
313 (top (window-configuration-frame-top configuration)))
|
|
314 (if (not (equal left (frame-property frame 'left)))
|
|
315 (set-frame-property frame 'left left))
|
|
316 (if (not (equal top (frame-property frame 'top)))
|
|
317 (set-frame-property frame 'top top))))
|
1149
|
318
|
|
319 ;; these may have changed because of the delete
|
|
320 (let ((root-window (frame-root-window frame)))
|
|
321 (enlarge-window-pixels
|
|
322 (- (window-configuration-minibuffer-pixel-height configuration)
|
|
323 (window-pixel-height (minibuffer-window frame)))
|
|
324 nil
|
|
325 (minibuffer-window frame))
|
|
326
|
|
327 ;; avoid that `set-window-point' will set the buffer's point for
|
|
328 ;; the selected window
|
|
329 (select-window (minibuffer-window frame))
|
|
330
|
|
331 (let ((window-configuration-current-window nil))
|
1261
|
332 (declare (special window-configuration-current-window))
|
1149
|
333 (restore-saved-window configuration
|
|
334 root-window
|
|
335 (window-configuration-saved-root-window configuration)
|
|
336 'vertical)
|
|
337 (if window-configuration-current-window
|
|
338 (select-window window-configuration-current-window))))
|
|
339
|
|
340 (setq window-min-width (window-configuration-min-width configuration))
|
|
341 (setq window-min-height (window-configuration-min-height configuration))
|
|
342
|
2227
|
343 (let ((buffer (window-configuration-current-buffer configuration)))
|
|
344 (if (buffer-live-p buffer)
|
|
345 (set-buffer buffer)
|
|
346 (set-buffer (car (buffer-list))))))
|
1149
|
347
|
|
348 (defun set-window-configuration-frame-size (configuration)
|
|
349 "Restore the frame size of a window configuration."
|
|
350 (set-frame-pixel-size
|
|
351 (window-configuration-frame configuration)
|
|
352 (window-configuration-frame-pixel-width configuration)
|
|
353 (window-configuration-frame-pixel-height configuration)))
|
|
354
|
|
355 (defun frame-reduce-to-one-window (frame)
|
|
356 "Delete all windows except the minibuffer and one other in FRAME."
|
|
357 (let* ((root-window (frame-root-window frame))
|
|
358 (combination-start (or (window-first-hchild root-window)
|
|
359 (window-first-vchild root-window))))
|
|
360 (if combination-start
|
|
361 (window-reduce-to-one combination-start))))
|
|
362
|
1230
|
363 ;; Note that simply using `delete-other-windows' causes obscure
|
|
364 ;; breakage. --Mike
|
|
365
|
1149
|
366 (defun window-reduce-to-one (window)
|
|
367 "Make sure only one subwindow of WINDOW is left."
|
1230
|
368 (let ((window (window-next-child window)))
|
|
369 (while window
|
|
370 (if (window-live-p window)
|
|
371 (let ((next (window-next-child window)))
|
|
372 (delete-window window)
|
|
373 (setq window next)))))
|
|
374 (cond
|
|
375 ((window-first-hchild window)
|
|
376 (window-reduce-to-one (window-first-hchild window)))
|
|
377 ((window-first-vchild window)
|
|
378 (window-reduce-to-one (window-first-vchild window)))))
|
1149
|
379
|
|
380 (defun restore-saved-window (configuration window saved-window direction)
|
|
381 "Within CONFIGURATION, restore WINDOW to the state of SAVED-WINDOW."
|
1576
|
382 (and (saved-window-next-child saved-window)
|
|
383 (not (saved-window-minibufferp (saved-window-next-child saved-window)))
|
|
384 (progn
|
|
385 (cond ((eq direction 'vertical)
|
|
386 (split-window window nil nil))
|
|
387 ((eq direction 'horizontal)
|
|
388 (split-window window nil t)))
|
|
389 (restore-saved-window configuration
|
|
390 (window-next-child window)
|
|
391 (saved-window-next-child saved-window)
|
|
392 direction)))
|
1149
|
393
|
1576
|
394 (if (saved-window-first-hchild saved-window)
|
|
395 (restore-saved-window configuration
|
|
396 window
|
|
397 (saved-window-first-hchild saved-window)
|
|
398 'horizontal))
|
|
399 (if (saved-window-first-vchild saved-window)
|
|
400 (restore-saved-window configuration
|
|
401 window
|
|
402 (saved-window-first-vchild saved-window)
|
|
403 'vertical))
|
1149
|
404
|
|
405 (if (not (saved-window-minibufferp saved-window))
|
|
406 (restore-saved-window-parameters configuration window saved-window)))
|
|
407
|
|
408 (defun restore-saved-window-parameters (configuration window saved-window)
|
|
409 "Restore the window parameters stored in SAVED-WINDOW on WINDOW."
|
1261
|
410 (declare (special window-configuration-current-window))
|
1149
|
411 (let ((buffer (saved-window-buffer saved-window)))
|
|
412 (if (and buffer (buffer-live-p buffer))
|
|
413 (progn
|
|
414 (set-window-buffer window
|
|
415 (saved-window-buffer saved-window))
|
|
416 (set-window-start window
|
1161
|
417 (marker-position (saved-window-start-marker saved-window))
|
|
418 t)
|
4136
|
419 (if (markerp (saved-window-point-marker saved-window))
|
|
420 (set-window-point window
|
|
421 (marker-position (saved-window-point-marker saved-window))))
|
1149
|
422 (set-marker (mark-marker t buffer)
|
|
423 (marker-position (saved-window-mark-marker saved-window))
|
|
424 buffer)
|
|
425 (if (not (eq buffer (window-configuration-current-buffer configuration)))
|
|
426 (goto-char (window-point window) buffer)))))
|
|
427
|
|
428 (if (and (not (saved-window-first-hchild saved-window))
|
|
429 (not (saved-window-first-vchild saved-window)))
|
|
430 ;; only set size for non-container windows
|
|
431 (progn
|
|
432 ;; If this is the root window, it may be the only window.
|
|
433 ;; Because of mismatches between actual and reported frame
|
|
434 ;; size, it may not let us actually set the size of the root
|
|
435 ;; window to what we want. --Mike
|
|
436 (if (not (eq window (frame-root-window (window-frame window))))
|
|
437 (progn
|
|
438 (enlarge-window-pixels (- (saved-window-pixel-width saved-window)
|
|
439 (window-pixel-width window))
|
|
440 t
|
|
441 window)
|
|
442 (enlarge-window-pixels (- (saved-window-pixel-height saved-window)
|
|
443 (window-pixel-height window))
|
|
444 nil
|
|
445 window)))
|
|
446 (set-window-hscroll window (saved-window-hscroll saved-window))
|
|
447 (set-modeline-hscroll window
|
|
448 (saved-window-modeline-hscroll saved-window))
|
|
449 (set-window-dedicated-p window (saved-window-dedicatedp saved-window))))
|
|
450
|
|
451 (if (saved-window-currentp saved-window)
|
|
452 (setq window-configuration-current-window window))
|
|
453 (if (saved-window-minibuffer-scrollp saved-window)
|
|
454 (setq minibuffer-scroll-window window)))
|
|
455
|
|
456 (defun saved-window-pixel-width (saved-window)
|
|
457 "Compute the pixel width of SAVED-WINDOW."
|
|
458 (- (saved-window-pixel-right saved-window)
|
|
459 (saved-window-pixel-left saved-window)))
|
|
460
|
|
461 (defun saved-window-pixel-height (saved-window)
|
|
462 "Compute the pixel height of SAVED-WINDOW."
|
|
463 (- (saved-window-pixel-bottom saved-window)
|
|
464 (saved-window-pixel-top saved-window)))
|
428
|
465
|
|
466 ;; The window-config stack is stored as a list in frame property
|
|
467 ;; 'window-config-stack, with the most recent element at the front.
|
|
468 ;; When you pop off an element, the popped off element gets put at the
|
|
469 ;; front of frame property 'window-config-unpop-stack, so you can
|
|
470 ;; retrieve it using unpop-window-configuration.
|
|
471
|
|
472 (defcustom window-config-stack-max 16
|
|
473 "*Maximum size of window configuration stack.
|
|
474 Start discarding off end if it gets this big."
|
|
475 :type 'integer
|
|
476 :group 'windows)
|
|
477
|
|
478 (defun window-config-stack (&optional frame)
|
|
479 (or frame (setq frame (selected-frame)))
|
|
480 (let ((stack (frame-property frame 'window-config-stack)))
|
|
481 (if stack
|
|
482 (set-undoable-stack-max stack window-config-stack-max)
|
|
483 (progn
|
|
484 (setq stack (make-undoable-stack window-config-stack-max))
|
|
485 (set-frame-property frame 'window-config-stack stack)))
|
|
486 stack))
|
|
487
|
|
488 (defun push-window-configuration (&optional config)
|
|
489 "Push the current window configuration onto the window-config stack.
|
|
490 If CONFIG is specified, push it instead of the current window configuration.
|
|
491 Each frame has its own window-config stack."
|
|
492 (interactive)
|
|
493 (let ((wc (or config (current-window-configuration)))
|
|
494 (stack (window-config-stack)))
|
|
495 (if (or (= 0 (undoable-stack-a-length stack))
|
|
496 (not (equal (undoable-stack-a-top stack) wc)))
|
|
497 (undoable-stack-push stack wc))))
|
|
498
|
|
499 (defun pop-window-configuration ()
|
|
500 "Pop the top window configuration off the window-config stack and set it.
|
|
501 Before setting the new window configuration, the current window configuration
|
|
502 is pushed onto the \"unpop\" stack.
|
|
503 `unpop-window-configuration' undoes what this function does.
|
|
504 Each frame has its own window-config and \"unpop\" stack."
|
|
505 (interactive)
|
|
506 (let ((stack (window-config-stack))
|
|
507 (wc (current-window-configuration))
|
|
508 popped)
|
|
509 (condition-case nil
|
|
510 (progn
|
|
511 (setq popped (undoable-stack-pop stack))
|
|
512 (while (equal popped wc)
|
|
513 (setq popped (undoable-stack-pop stack)))
|
|
514 (undoable-stack-push stack wc)
|
|
515 (undoable-stack-undo stack)
|
|
516 (set-window-configuration popped)
|
|
517 popped)
|
|
518 (trunc-stack-bottom
|
|
519 (error "Bottom of window config stack")))))
|
|
520
|
|
521 (defun unpop-window-configuration ()
|
|
522 "Undo the effect of the most recent `pop-window-configuration'.
|
|
523 This does exactly the inverse of what `pop-window-configuration' does:
|
|
524 i.e. it pops a window configuration off of the \"unpop\" stack and
|
|
525 pushes the current window configuration onto the window-config stack.
|
|
526 Each frame has its own window-config and \"unpop\" stack."
|
|
527 (interactive)
|
|
528 (let ((stack (window-config-stack))
|
|
529 (wc (current-window-configuration))
|
|
530 popped)
|
|
531 (condition-case nil
|
|
532 (progn
|
|
533 (setq popped
|
|
534 (progn
|
|
535 (undoable-stack-redo stack)
|
|
536 (undoable-stack-pop stack)))
|
|
537 (while (equal popped wc)
|
|
538 (setq popped
|
|
539 (progn
|
|
540 (undoable-stack-redo stack)
|
|
541 (undoable-stack-pop stack))))
|
|
542 (undoable-stack-push stack wc)
|
|
543 (set-window-configuration popped)
|
|
544 popped)
|
|
545 (trunc-stack-bottom
|
|
546 (error "Top of window config stack")))))
|
|
547
|
|
548
|
|
549 ;;;;;;;;;;;;; display-buffer, moved here from C. Hallelujah.
|
|
550
|
442
|
551 (make-variable-buffer-local '__buffer-dedicated-frame)
|
|
552
|
|
553 (defun buffer-dedicated-frame (&optional buffer)
|
|
554 "Return the frame dedicated to this BUFFER, or nil if there is none.
|
|
555 No argument or nil as argument means use current buffer as BUFFER."
|
|
556 (let ((buffer (decode-buffer buffer)))
|
|
557 (let ((frame (symbol-value-in-buffer '__buffer-dedicated-frame buffer)))
|
|
558 ;; XEmacs addition: if the frame is dead, silently make it go away.
|
|
559 (when (and (framep frame) (not (frame-live-p frame)))
|
|
560 (with-current-buffer buffer
|
|
561 (setq __buffer-dedicated-frame nil))
|
|
562 (setq frame nil))
|
|
563 frame)))
|
|
564
|
|
565 (defun set-buffer-dedicated-frame (buffer frame)
|
|
566 "For this BUFFER, set the FRAME dedicated to it.
|
|
567 FRAME must be a frame or nil."
|
|
568 (let ((buffer (decode-buffer buffer)))
|
|
569 (and frame
|
|
570 (check-argument-type #'frame-live-p frame))
|
|
571 (with-current-buffer buffer
|
|
572 (setq __buffer-dedicated-frame frame))))
|
|
573
|
428
|
574 (defvar display-buffer-function nil
|
|
575 "If non-nil, function to call to handle `display-buffer'.
|
903
|
576 It will receive four args: the same as those to `display-buffer'.")
|
428
|
577
|
|
578 (defvar pre-display-buffer-function nil
|
|
579 "If non-nil, function that will be called from `display-buffer'
|
903
|
580 as the first action. It will receive four args: the same as those
|
428
|
581 to `display-buffer'.
|
|
582 This function may be used to select an appropriate frame for the buffer,
|
|
583 for example. See also the variable `display-buffer-function', which may
|
|
584 be used to completely replace the `display-buffer' function.
|
|
585 If the return value of this function is non-nil, it should be a frame,
|
|
586 and that frame will be used to display the buffer.")
|
|
587
|
|
588 (defcustom pop-up-frames nil
|
|
589 "*Non-nil means `display-buffer' should make a separate frame."
|
|
590 :type 'boolean
|
|
591 :group 'frames)
|
|
592
|
|
593 (defvar pop-up-frame-function nil
|
|
594 "Function to call to handle automatic new frame creation.
|
|
595 It is called with no arguments and should return a newly created frame.
|
|
596
|
|
597 A typical value might be `(lambda () (new-frame pop-up-frame-alist))'
|
|
598 where `pop-up-frame-alist' would hold the default frame parameters.")
|
|
599
|
|
600 (defcustom special-display-buffer-names nil
|
|
601 "*List of buffer names that should have their own special frames.
|
|
602 Displaying a buffer whose name is in this list makes a special frame for it
|
|
603 using `special-display-function'.
|
|
604
|
|
605 An element of the list can be a cons cell instead of just a string.
|
|
606 Then the car should be a buffer name, and the cdr specifies frame
|
|
607 parameters for creating the frame for that buffer.
|
|
608 More precisely, the cdr is passed as the second argument to
|
|
609 the function found in `special-display-function', when making that frame.
|
|
610 See also `special-display-regexps'."
|
|
611 :type '(repeat (choice :value ""
|
|
612 (string :tag "Name")
|
|
613 (cons :menu-tag "Properties"
|
|
614 :value ("" . nil)
|
|
615 (string :tag "Name")
|
|
616 (repeat :tag "Properties"
|
|
617 (group :inline t
|
|
618 (symbol :tag "Property")
|
|
619 (sexp :tag "Value"))))))
|
|
620 :group 'frames)
|
|
621
|
|
622 (defcustom special-display-regexps nil
|
|
623 "*List of regexps saying which buffers should have their own special frames.
|
|
624 If a buffer name matches one of these regexps, it gets its own frame.
|
|
625 Displaying a buffer whose name is in this list makes a special frame for it
|
|
626 using `special-display-function'.
|
|
627
|
|
628 An element of the list can be a cons cell instead of just a string.
|
|
629 Then the car should be the regexp, and the cdr specifies frame
|
|
630 parameters for creating the frame for buffers that match.
|
|
631 More precisely, the cdr is passed as the second argument to
|
|
632 the function found in `special-display-function', when making that frame.
|
|
633 See also `special-display-buffer-names'."
|
|
634 :type '(repeat (choice :value ""
|
|
635 regexp
|
|
636 (cons :menu-tag "Properties"
|
|
637 :value ("" . nil)
|
|
638 regexp
|
|
639 (repeat :tag "Properties"
|
|
640 (group :inline t
|
|
641 (symbol :tag "Property")
|
|
642 (sexp :tag "Value"))))))
|
|
643 :group 'frames)
|
|
644
|
|
645 (defvar special-display-function nil
|
|
646 "Function to call to make a new frame for a special buffer.
|
|
647 It is called with two arguments, the buffer and optional buffer specific
|
|
648 data, and should return a window displaying that buffer.
|
|
649 The default value makes a separate frame for the buffer,
|
|
650 using `special-display-frame-alist' to specify the frame parameters.
|
|
651
|
|
652 A buffer is special if its is listed in `special-display-buffer-names'
|
|
653 or matches a regexp in `special-display-regexps'.")
|
|
654
|
|
655 (defcustom same-window-buffer-names nil
|
|
656 "*List of buffer names that should appear in the selected window.
|
|
657 Displaying one of these buffers using `display-buffer' or `pop-to-buffer'
|
|
658 switches to it in the selected window, rather than making it appear
|
|
659 in some other window.
|
|
660
|
|
661 An element of the list can be a cons cell instead of just a string.
|
|
662 Then the car must be a string, which specifies the buffer name.
|
|
663 This is for compatibility with `special-display-buffer-names';
|
|
664 the cdr of the cons cell is ignored.
|
|
665
|
|
666 See also `same-window-regexps'."
|
|
667 :type '(repeat (string :tag "Name"))
|
|
668 :group 'windows)
|
|
669
|
|
670 (defcustom same-window-regexps nil
|
|
671 "*List of regexps saying which buffers should appear in the selected window.
|
|
672 If a buffer name matches one of these regexps, then displaying it
|
|
673 using `display-buffer' or `pop-to-buffer' switches to it
|
|
674 in the selected window, rather than making it appear in some other window.
|
|
675
|
|
676 An element of the list can be a cons cell instead of just a string.
|
|
677 Then the car must be a string, which specifies the buffer name.
|
|
678 This is for compatibility with `special-display-buffer-names';
|
|
679 the cdr of the cons cell is ignored.
|
|
680
|
|
681 See also `same-window-buffer-names'."
|
|
682 :type '(repeat regexp)
|
|
683 :group 'windows)
|
|
684
|
|
685 (defcustom pop-up-windows t
|
|
686 "*Non-nil means display-buffer should make new windows."
|
|
687 :type 'boolean
|
|
688 :group 'windows)
|
|
689
|
|
690 (defcustom split-height-threshold 500
|
|
691 "*display-buffer would prefer to split the largest window if this large.
|
|
692 If there is only one window, it is split regardless of this value."
|
|
693 :type 'integer
|
|
694 :group 'windows)
|
|
695
|
|
696 (defcustom split-width-threshold 500
|
|
697 "*display-buffer would prefer to split the largest window if this large.
|
|
698 If there is only one window, it is split regardless of this value."
|
|
699 :type 'integer
|
|
700 :group 'windows)
|
|
701
|
|
702 ;; Deiconify the frame containing the window WINDOW, then return WINDOW.
|
|
703
|
|
704 (defun display-buffer-1 (window)
|
|
705 (if (frame-iconified-p (window-frame window))
|
|
706 (make-frame-visible (window-frame window)))
|
|
707 window)
|
|
708
|
|
709 ;; Can you believe that all of this crap was formerly in C?
|
|
710 ;; Praise Jesus that it's not there any more.
|
|
711
|
903
|
712 (defun display-buffer (buffer &optional not-this-window-p override-frame
|
|
713 shrink-to-fit)
|
428
|
714 "Make BUFFER appear in some window on the current frame, but don't select it.
|
|
715 BUFFER can be a buffer or a buffer name.
|
|
716 If BUFFER is shown already in some window in the current frame,
|
|
717 just uses that one, unless the window is the selected window and
|
|
718 NOT-THIS-WINDOW-P is non-nil (interactively, with prefix arg).
|
|
719
|
|
720 If BUFFER has a dedicated frame, display on that frame instead of
|
|
721 the current frame, unless OVERRIDE-FRAME is non-nil.
|
|
722
|
|
723 If OVERRIDE-FRAME is non-nil, display on that frame instead of
|
|
724 the current frame (or the dedicated frame).
|
|
725
|
903
|
726 If SHRINK-TO-FIT is non-nil and splitting the window is appropriate, give
|
|
727 the new buffer less than half the space if it is small enough to fit.
|
|
728
|
428
|
729 If `pop-up-windows' is non-nil, always use the
|
|
730 current frame and create a new window regardless of whether the
|
|
731 buffer has a dedicated frame, and regardless of whether
|
|
732 OVERRIDE-FRAME was specified.
|
|
733
|
|
734 If `pop-up-frames' is non-nil, make a new frame if no window shows BUFFER.
|
|
735
|
2590
|
736 If the buffer name is a member of the `same-window-buffer-names' list,
|
|
737 or matches one of the `same-window-regexps' expressions, display the
|
|
738 buffer in the currently selected window.
|
|
739
|
428
|
740 Returns the window displaying BUFFER."
|
|
741 (interactive "BDisplay buffer:\nP")
|
|
742
|
|
743 (let ((wconfig (current-window-configuration))
|
|
744 (result
|
|
745 ;; We just simulate a `return' in C. This function is way ugly
|
|
746 ;; and does `returns' all over the place and there's no sense
|
|
747 ;; in trying to rewrite it to be more Lispy.
|
|
748 (catch 'done
|
1669
|
749 (let (window old-frame target-frame explicit-frame shrink-it)
|
428
|
750 (setq old-frame (or (last-nonminibuf-frame) (selected-frame)))
|
|
751 (setq buffer (get-buffer buffer))
|
|
752 (check-argument-type 'bufferp buffer)
|
|
753
|
|
754 (setq explicit-frame
|
|
755 (if pre-display-buffer-function
|
|
756 (funcall pre-display-buffer-function buffer
|
|
757 not-this-window-p
|
903
|
758 override-frame
|
|
759 shrink-to-fit)))
|
428
|
760
|
|
761 ;; Give the user the ability to completely reimplement
|
|
762 ;; this function via the `display-buffer-function'.
|
|
763 (if display-buffer-function
|
|
764 (throw 'done
|
|
765 (funcall display-buffer-function buffer
|
|
766 not-this-window-p
|
903
|
767 override-frame
|
|
768 shrink-to-fit)))
|
428
|
769
|
|
770 ;; If the buffer has a dedicated frame, that takes
|
|
771 ;; precedence over the current frame, and over what the
|
|
772 ;; pre-display-buffer-function did.
|
|
773 (let ((dedi (buffer-dedicated-frame buffer)))
|
|
774 (if (frame-live-p dedi) (setq explicit-frame dedi)))
|
|
775
|
|
776 ;; if override-frame is supplied, that takes precedence over
|
|
777 ;; everything. This is gonna look bad if the
|
|
778 ;; pre-display-buffer-function raised some other frame
|
|
779 ;; already.
|
|
780 (if override-frame
|
|
781 (progn
|
|
782 (check-argument-type 'frame-live-p override-frame)
|
|
783 (setq explicit-frame override-frame)))
|
|
784
|
|
785 (setq target-frame
|
|
786 (or explicit-frame
|
|
787 (last-nonminibuf-frame)
|
|
788 (selected-frame)))
|
|
789
|
|
790 ;; If we have switched frames, then set not-this-window-p
|
|
791 ;; to false. Switching frames means that selected-window
|
|
792 ;; is no longer the same as it was on entry -- it's the
|
|
793 ;; selected-window of target_frame instead of old_frame,
|
|
794 ;; so it's a fine candidate for display.
|
|
795 (if (not (eq old-frame target-frame))
|
|
796 (setq not-this-window-p nil))
|
|
797
|
|
798 ;; if it's in the selected window, and that's ok, then we're done.
|
|
799 (if (and (not not-this-window-p)
|
|
800 (eq buffer (window-buffer (selected-window))))
|
|
801 (throw 'done (display-buffer-1 (selected-window))))
|
|
802
|
|
803 ;; See if the user has specified this buffer should appear
|
|
804 ;; in the selected window.
|
|
805
|
|
806 (if not-this-window-p
|
|
807 nil
|
|
808
|
|
809 (if (or (member (buffer-name buffer) same-window-buffer-names)
|
|
810 (assoc (buffer-name buffer) same-window-buffer-names))
|
|
811 (progn
|
|
812 (switch-to-buffer buffer)
|
|
813 (throw 'done (display-buffer-1 (selected-window)))))
|
|
814
|
|
815 (let ((tem same-window-regexps))
|
|
816 (while tem
|
|
817 (let ((car (car tem)))
|
|
818 (if (or
|
|
819 (and (stringp car)
|
|
820 (string-match car (buffer-name buffer)))
|
|
821 (and (consp car) (stringp (car car))
|
|
822 (string-match (car car) (buffer-name buffer))))
|
|
823 (progn
|
|
824 (switch-to-buffer buffer)
|
|
825 (throw 'done (display-buffer-1
|
|
826 (selected-window))))))
|
|
827 (setq tem (cdr tem)))))
|
|
828
|
|
829 ;; If pop-up-frames, look for a window showing BUFFER on
|
|
830 ;; any visible or iconified frame. Otherwise search only
|
|
831 ;; the current frame.
|
|
832 (if (and (not explicit-frame)
|
|
833 (or pop-up-frames (not (last-nonminibuf-frame))))
|
|
834 (setq target-frame 0))
|
|
835
|
|
836 ;; Otherwise, find some window that it's already in, and
|
|
837 ;; return that, unless that window is the selected window
|
|
838 ;; and that isn't ok. What a contorted mess!
|
|
839 (setq window (or (if (not explicit-frame)
|
|
840 ;; search the selected frame
|
|
841 ;; first if the user didn't
|
|
842 ;; specify an explicit frame.
|
|
843 (get-buffer-window buffer nil))
|
|
844 (get-buffer-window buffer target-frame)))
|
|
845 (if (and window
|
|
846 (or (not not-this-window-p)
|
|
847 (not (eq window (selected-window)))))
|
|
848 (throw 'done (display-buffer-1 window)))
|
|
849
|
|
850 ;; Certain buffer names get special handling.
|
|
851 (if special-display-function
|
|
852 (progn
|
|
853 (if (member (buffer-name buffer)
|
|
854 special-display-buffer-names)
|
|
855 (throw 'done (funcall special-display-function buffer)))
|
|
856
|
|
857 (let ((tem (assoc (buffer-name buffer)
|
|
858 special-display-buffer-names)))
|
|
859 (if tem
|
|
860 (throw 'done (funcall special-display-function
|
|
861 buffer (cdr tem)))))
|
|
862
|
|
863 (let ((tem special-display-regexps))
|
|
864 (while tem
|
|
865 (let ((car (car tem)))
|
|
866 (if (and (stringp car)
|
|
867 (string-match car (buffer-name buffer)))
|
|
868 (throw 'done
|
|
869 (funcall special-display-function buffer)))
|
|
870 (if (and (consp car)
|
|
871 (stringp (car car))
|
|
872 (string-match (car car)
|
|
873 (buffer-name buffer)))
|
|
874 (throw 'done (funcall
|
|
875 special-display-function buffer
|
|
876 (cdr car)))))
|
|
877 (setq tem (cdr tem))))))
|
|
878
|
|
879 ;; If there are no frames open that have more than a minibuffer,
|
|
880 ;; we need to create a new frame.
|
|
881 (if (or pop-up-frames
|
|
882 (null (last-nonminibuf-frame)))
|
|
883 (progn
|
|
884 (setq window (frame-selected-window
|
|
885 (funcall pop-up-frame-function)))
|
|
886 (set-window-buffer window buffer)
|
|
887 (throw 'done (display-buffer-1 window))))
|
|
888
|
|
889 ;; Otherwise, make it be in some window, splitting if
|
|
890 ;; appropriate/possible. Do not split a window if we are
|
|
891 ;; displaying the buffer in a different frame than that which
|
|
892 ;; was current when we were called. (It is already in a
|
|
893 ;; different window by virtue of being in another frame.)
|
|
894 (if (or (and pop-up-windows (eq target-frame old-frame))
|
|
895 (eq 'only (frame-property (selected-frame) 'minibuffer))
|
|
896 ;; If the current frame is a special display frame,
|
|
897 ;; don't try to reuse its windows.
|
|
898 (window-dedicated-p (frame-root-window (selected-frame))))
|
|
899 (progn
|
|
900 (if (eq 'only (frame-property (selected-frame) 'minibuffer))
|
|
901 (setq target-frame (last-nonminibuf-frame)))
|
|
902
|
|
903 ;; Don't try to create a window if would get an error with
|
|
904 ;; height.
|
|
905 (if (< split-height-threshold (* 2 window-min-height))
|
|
906 (setq split-height-threshold (* 2 window-min-height)))
|
|
907
|
|
908 ;; Same with width.
|
|
909 (if (< split-width-threshold (* 2 window-min-width))
|
|
910 (setq split-width-threshold (* 2 window-min-width)))
|
|
911
|
|
912 ;; If the frame we would try to split cannot be split,
|
|
913 ;; try other frames.
|
|
914 (if (frame-property (if (null target-frame)
|
|
915 (selected-frame)
|
|
916 (last-nonminibuf-frame))
|
|
917 'unsplittable)
|
|
918 (setq window
|
|
919 ;; Try visible frames first.
|
|
920 (or (get-largest-window 'visible)
|
|
921 ;; If that didn't work, try iconified frames.
|
|
922 (get-largest-window 0)
|
|
923 (get-largest-window t)))
|
|
924 (setq window (get-largest-window target-frame)))
|
|
925
|
|
926 ;; If we got a tall enough full-width window that
|
|
927 ;; can be split, split it.
|
|
928 (if (and window
|
|
929 (not (frame-property (window-frame window)
|
|
930 'unsplittable))
|
|
931 (>= (window-height window) split-height-threshold)
|
|
932 (or (>= (window-width window)
|
|
933 split-width-threshold)
|
|
934 (and (window-leftmost-p window)
|
|
935 (window-rightmost-p window))))
|
|
936 (setq window (split-window window))
|
1669
|
937 (let (upper other)
|
428
|
938 (setq window (get-lru-window target-frame))
|
|
939 ;; If the LRU window is selected, and big enough,
|
|
940 ;; and can be split, split it.
|
|
941 (if (and window
|
|
942 (not (frame-property (window-frame window)
|
|
943 'unsplittable))
|
|
944 (or (eq window (selected-window))
|
|
945 (not (window-parent window)))
|
|
946 (>= (window-height window)
|
|
947 (* 2 window-min-height)))
|
|
948 (setq window (split-window window)))
|
|
949 ;; If get-lru-window returned nil, try other approaches.
|
|
950 ;; Try visible frames first.
|
|
951 (or window
|
|
952 (setq window (or (get-largest-window 'visible)
|
|
953 ;; If that didn't work, try
|
|
954 ;; iconified frames.
|
|
955 (get-largest-window 0)
|
|
956 ;; Try invisible frames.
|
|
957 (get-largest-window t)
|
|
958 ;; As a last resort, make
|
|
959 ;; a new frame.
|
|
960 (frame-selected-window
|
|
961 (funcall
|
|
962 pop-up-frame-function)))))
|
|
963 ;; If window appears above or below another,
|
|
964 ;; even out their heights.
|
|
965 (if (window-previous-child window)
|
|
966 (setq other (window-previous-child window)
|
|
967 upper other))
|
|
968 (if (window-next-child window)
|
|
969 (setq other (window-next-child window)
|
|
970 upper window))
|
|
971 ;; Check that OTHER and WINDOW are vertically arrayed.
|
|
972 (if (and other
|
|
973 (not (= (nth 1 (window-pixel-edges other))
|
|
974 (nth 1 (window-pixel-edges window))))
|
|
975 (> (window-pixel-height other)
|
|
976 (window-pixel-height window)))
|
|
977 (enlarge-window (- (/ (+ (window-height other)
|
|
978 (window-height window))
|
|
979 2)
|
|
980 (window-height upper))
|
903
|
981 nil upper))
|
1669
|
982 ;; Klaus Berndl <klaus.berndl@sdm.de>: Only in
|
|
983 ;; this situation we shrink-to-fit but we can do
|
|
984 ;; this first after we have displayed buffer in
|
|
985 ;; window (s.b. (set-window-buffer window buffer))
|
|
986 (setq shrink-it shrink-to-fit))))
|
428
|
987
|
|
988 (setq window (get-lru-window target-frame)))
|
|
989
|
|
990 ;; Bring the window's previous buffer to the top of the MRU chain.
|
|
991 (if (window-buffer window)
|
|
992 (save-excursion
|
|
993 (save-selected-window
|
|
994 (select-window window)
|
|
995 (record-buffer (window-buffer window)))))
|
|
996
|
|
997 (set-window-buffer window buffer)
|
|
998
|
1669
|
999 ;; Now window's previous buffer has been brought to the top
|
|
1000 ;; of the MRU chain and window displays buffer - now we can
|
|
1001 ;; shrink-to-fit if necessary
|
|
1002 (if shrink-it
|
|
1003 (shrink-window-if-larger-than-buffer window))
|
|
1004
|
428
|
1005 (display-buffer-1 window)))))
|
|
1006 (or (equal wconfig (current-window-configuration))
|
|
1007 (push-window-configuration wconfig))
|
|
1008 result))
|
|
1009
|
|
1010 ;;; window-xemacs.el ends here
|