(python-open-block-statement-p): Fix
[emacs.git] / lisp / window.el
blob188b3acf311d7619302de8ed5dd76c6f718e53fa
1 ;;; window.el --- GNU Emacs window commands aside from those written in C
3 ;; Copyright (C) 1985, 1989, 1992, 1993, 1994, 2000, 2001, 2002, 2004
4 ;; Free Software Foundation, Inc.
6 ;; Maintainer: FSF
7 ;; Keywords: internal
9 ;; This file is part of GNU Emacs.
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
12 ;; it 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.
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
26 ;;; Commentary:
28 ;; Window tree functions.
30 ;;; Code:
32 (defmacro save-selected-window (&rest body)
33 "Execute BODY, then select the window that was selected before BODY.
34 Also restore the selected window of each frame as it was at the start
35 of this construct.
36 However, if a window has become dead, don't get an error,
37 just refrain from reselecting it."
38 `(let ((save-selected-window-window (selected-window))
39 ;; It is necessary to save all of these, because calling
40 ;; select-window changes frame-selected-window for whatever
41 ;; frame that window is in.
42 (save-selected-window-alist
43 (mapcar (lambda (frame) (list frame (frame-selected-window frame)))
44 (frame-list))))
45 (unwind-protect
46 (progn ,@body)
47 (dolist (elt save-selected-window-alist)
48 (and (frame-live-p (car elt))
49 (window-live-p (cadr elt))
50 (set-frame-selected-window (car elt) (cadr elt))))
51 (if (window-live-p save-selected-window-window)
52 (select-window save-selected-window-window)))))
54 (defun window-body-height (&optional window)
55 "Return number of lines in window WINDOW for actual buffer text.
56 This does not include the mode line (if any) or the header line (if any)."
57 (or window (setq window (selected-window)))
58 (if (window-minibuffer-p window)
59 (window-height window)
60 (with-current-buffer (window-buffer window)
61 (max 1 (- (window-height window)
62 (if mode-line-format 1 0)
63 (if header-line-format 1 0))))))
65 (defun one-window-p (&optional nomini all-frames)
66 "Return non-nil if the selected window is the only window (in its frame).
67 Optional arg NOMINI non-nil means don't count the minibuffer
68 even if it is active.
70 The optional arg ALL-FRAMES t means count windows on all frames.
71 If it is `visible', count windows on all visible frames.
72 ALL-FRAMES nil or omitted means count only the selected frame,
73 plus the minibuffer it uses (which may be on another frame).
74 If ALL-FRAMES is neither nil nor t, count only the selected frame."
75 (let ((base-window (selected-window)))
76 (if (and nomini (eq base-window (minibuffer-window)))
77 (setq base-window (next-window base-window)))
78 (eq base-window
79 (next-window base-window (if nomini 'arg) all-frames))))
81 (defun window-current-scroll-bars (&optional window)
82 "Return the current scroll-bar settings in window WINDOW.
83 Value is a cons (VERTICAL . HORISONTAL) where VERTICAL specifies the
84 current location of the vertical scroll-bars (left, right, or nil),
85 and HORISONTAL specifies the current location of the horisontal scroll
86 bars (top, bottom, or nil)."
87 (let ((vert (nth 2 (window-scroll-bars window)))
88 (hor nil))
89 (when (or (eq vert t) (eq hor t))
90 (let ((fcsb (frame-current-scroll-bars
91 (window-frame (or window (selected-window))))))
92 (if (eq vert t)
93 (setq vert (car fcsb)))
94 (if (eq hor t)
95 (setq hor (cdr fcsb)))))
96 (cons vert hor)))
98 (defun walk-windows (proc &optional minibuf all-frames)
99 "Cycle through all visible windows, calling PROC for each one.
100 PROC is called with a window as argument.
102 Optional second arg MINIBUF t means count the minibuffer window even
103 if not active. MINIBUF nil or omitted means count the minibuffer iff
104 it is active. MINIBUF neither t nor nil means not to count the
105 minibuffer even if it is active.
107 Several frames may share a single minibuffer; if the minibuffer
108 counts, all windows on all frames that share that minibuffer count
109 too. Therefore, if you are using a separate minibuffer frame
110 and the minibuffer is active and MINIBUF says it counts,
111 `walk-windows' includes the windows in the frame from which you
112 entered the minibuffer, as well as the minibuffer window.
114 ALL-FRAMES is the optional third argument.
115 ALL-FRAMES nil or omitted means cycle within the frames as specified above.
116 ALL-FRAMES = `visible' means include windows on all visible frames.
117 ALL-FRAMES = 0 means include windows on all visible and iconified frames.
118 ALL-FRAMES = t means include windows on all frames including invisible frames.
119 If ALL-FRAMES is a frame, it means include windows on that frame.
120 Anything else means restrict to the selected frame."
121 ;; If we start from the minibuffer window, don't fail to come back to it.
122 (if (window-minibuffer-p (selected-window))
123 (setq minibuf t))
124 (save-selected-window
125 (if (framep all-frames)
126 (select-window (frame-first-window all-frames)))
127 (let* (walk-windows-already-seen
128 (walk-windows-current (selected-window)))
129 (while (progn
130 (setq walk-windows-current
131 (next-window walk-windows-current minibuf all-frames))
132 (not (memq walk-windows-current walk-windows-already-seen)))
133 (setq walk-windows-already-seen
134 (cons walk-windows-current walk-windows-already-seen))
135 (funcall proc walk-windows-current)))))
137 (defun get-window-with-predicate (predicate &optional minibuf
138 all-frames default)
139 "Return a window satisfying PREDICATE.
141 This function cycles through all visible windows using `walk-windows',
142 calling PREDICATE on each one. PREDICATE is called with a window as
143 argument. The first window for which PREDICATE returns a non-nil
144 value is returned. If no window satisfies PREDICATE, DEFAULT is
145 returned.
147 Optional second arg MINIBUF t means count the minibuffer window even
148 if not active. MINIBUF nil or omitted means count the minibuffer iff
149 it is active. MINIBUF neither t nor nil means not to count the
150 minibuffer even if it is active.
152 Several frames may share a single minibuffer; if the minibuffer
153 counts, all windows on all frames that share that minibuffer count
154 too. Therefore, if you are using a separate minibuffer frame
155 and the minibuffer is active and MINIBUF says it counts,
156 `walk-windows' includes the windows in the frame from which you
157 entered the minibuffer, as well as the minibuffer window.
159 ALL-FRAMES is the optional third argument.
160 ALL-FRAMES nil or omitted means cycle within the frames as specified above.
161 ALL-FRAMES = `visible' means include windows on all visible frames.
162 ALL-FRAMES = 0 means include windows on all visible and iconified frames.
163 ALL-FRAMES = t means include windows on all frames including invisible frames.
164 If ALL-FRAMES is a frame, it means include windows on that frame.
165 Anything else means restrict to the selected frame."
166 (catch 'found
167 (walk-windows #'(lambda (window)
168 (when (funcall predicate window)
169 (throw 'found window)))
170 minibuf all-frames)
171 default))
173 (defalias 'some-window 'get-window-with-predicate)
175 (defun minibuffer-window-active-p (window)
176 "Return t if WINDOW (a minibuffer window) is now active."
177 (eq window (active-minibuffer-window)))
179 (defun count-windows (&optional minibuf)
180 "Return the number of visible windows.
181 This counts the windows in the selected frame and (if the minibuffer is
182 to be counted) its minibuffer frame (if that's not the same frame).
183 The optional arg MINIBUF non-nil means count the minibuffer
184 even if it is inactive."
185 (let ((count 0))
186 (walk-windows (function (lambda (w)
187 (setq count (+ count 1))))
188 minibuf)
189 count))
191 (defun window-safely-shrinkable-p (&optional window)
192 "Non-nil if the WINDOW can be shrunk without shrinking other windows.
193 If WINDOW is nil or omitted, it defaults to the currently selected window."
194 (with-selected-window (or window (selected-window))
195 (let ((edges (window-edges)))
196 (or (= (nth 2 edges) (nth 2 (window-edges (previous-window))))
197 (= (nth 0 edges) (nth 0 (window-edges (next-window))))))))
200 (defun balance-windows ()
201 "Make all visible windows the same height (approximately)."
202 (interactive)
203 (let ((count -1) levels newsizes level-size
204 ;; Don't count the lines that are above the uppermost windows.
205 ;; (These are the menu bar lines, if any.)
206 (mbl (nth 1 (window-edges (frame-first-window (selected-frame)))))
207 (last-window (previous-window (frame-first-window (selected-frame))))
208 ;; Don't count the lines that are past the lowest main window.
209 total)
210 ;; Bottom edge of last window determines what size we have to work with.
211 (setq total
212 (+ (window-height last-window)
213 (nth 1 (window-edges last-window))))
215 ;; Find all the different vpos's at which windows start,
216 ;; then count them. But ignore levels that differ by only 1.
217 (let (tops (prev-top -2))
218 (walk-windows (function (lambda (w)
219 (setq tops (cons (nth 1 (window-edges w))
220 tops))))
221 'nomini)
222 (setq tops (sort tops '<))
223 (while tops
224 (if (> (car tops) (1+ prev-top))
225 (setq prev-top (car tops)
226 count (1+ count)))
227 (setq levels (cons (cons (car tops) count) levels))
228 (setq tops (cdr tops)))
229 (setq count (1+ count)))
230 ;; Subdivide the frame into desired number of vertical levels.
231 (setq level-size (/ (- total mbl) count))
232 (save-selected-window
233 ;; Set up NEWSIZES to map windows to their desired sizes.
234 ;; If a window ends at the bottom level, don't include
235 ;; it in NEWSIZES. Those windows get the right sizes
236 ;; by adjusting the ones above them.
237 (walk-windows (function
238 (lambda (w)
239 (let ((newtop (cdr (assq (nth 1 (window-edges w))
240 levels)))
241 (newbot (cdr (assq (+ (window-height w)
242 (nth 1 (window-edges w)))
243 levels))))
244 (if newbot
245 (setq newsizes
246 (cons (cons w (* level-size (- newbot newtop)))
247 newsizes))))))
248 'nomini)
249 ;; Make walk-windows start with the topmost window.
250 (select-window (previous-window (frame-first-window (selected-frame))))
251 (let (done (count 0))
252 ;; Give each window its precomputed size, or at least try.
253 ;; Keep trying until they all get the intended sizes,
254 ;; but not more than 3 times (to prevent infinite loop).
255 (while (and (not done) (< count 3))
256 (setq done t)
257 (setq count (1+ count))
258 (walk-windows (function (lambda (w)
259 (select-window w)
260 (let ((newsize (cdr (assq w newsizes))))
261 (when newsize
262 (enlarge-window (- newsize
263 (window-height))
264 nil t)
265 (unless (= (window-height) newsize)
266 (setq done nil))))))
267 'nomini))))))
269 ;; I think this should be the default; I think people will prefer it--rms.
270 (defcustom split-window-keep-point t
271 "*If non-nil, split windows keeps the original point in both children.
272 This is often more convenient for editing.
273 If nil, adjust point in each of the two windows to minimize redisplay.
274 This is convenient on slow terminals, but point can move strangely."
275 :type 'boolean
276 :group 'windows)
278 (defun split-window-vertically (&optional arg)
279 "Split current window into two windows, one above the other.
280 The uppermost window gets ARG lines and the other gets the rest.
281 Negative arg means select the size of the lowermost window instead.
282 With no argument, split equally or close to it.
283 Both windows display the same buffer now current.
285 If the variable `split-window-keep-point' is non-nil, both new windows
286 will get the same value of point as the current window. This is often
287 more convenient for editing.
289 Otherwise, we chose window starts so as to minimize the amount of
290 redisplay; this is convenient on slow terminals. The new selected
291 window is the one that the current value of point appears in. The
292 value of point can change if the text around point is hidden by the
293 new mode line."
294 (interactive "P")
295 (let ((old-w (selected-window))
296 (old-point (point))
297 (size (and arg (prefix-numeric-value arg)))
298 (window-full-p nil)
299 new-w bottom switch moved)
300 (and size (< size 0) (setq size (+ (window-height) size)))
301 (setq new-w (split-window nil size))
302 (or split-window-keep-point
303 (progn
304 (save-excursion
305 (set-buffer (window-buffer))
306 (goto-char (window-start))
307 (setq moved (vertical-motion (window-height)))
308 (set-window-start new-w (point))
309 (if (> (point) (window-point new-w))
310 (set-window-point new-w (point)))
311 (and (= moved (window-height))
312 (progn
313 (setq window-full-p t)
314 (vertical-motion -1)))
315 (setq bottom (point)))
316 (and window-full-p
317 (<= bottom (point))
318 (set-window-point old-w (1- bottom)))
319 (and window-full-p
320 (<= (window-start new-w) old-point)
321 (progn
322 (set-window-point new-w old-point)
323 (select-window new-w)))))
324 (split-window-save-restore-data new-w old-w)))
326 ;; This is to avoid compiler warnings.
327 (defvar view-return-to-alist)
329 (defun split-window-save-restore-data (new-w old-w)
330 (with-current-buffer (window-buffer)
331 (if view-mode
332 (let ((old-info (assq old-w view-return-to-alist)))
333 (if old-info
334 (push (cons new-w (cons (car (cdr old-info)) t))
335 view-return-to-alist))))
336 new-w))
338 (defun split-window-horizontally (&optional arg)
339 "Split current window into two windows side by side.
340 This window becomes the leftmost of the two, and gets ARG columns.
341 Negative arg means select the size of the rightmost window instead.
342 The argument includes the width of the window's scroll bar; if there
343 are no scroll bars, it includes the width of the divider column
344 to the window's right, if any. No arg means split equally."
345 (interactive "P")
346 (let ((old-w (selected-window))
347 (size (and arg (prefix-numeric-value arg))))
348 (and size (< size 0)
349 (setq size (+ (window-width) size)))
350 (split-window-save-restore-data (split-window nil size t) old-w)))
353 (defun set-window-text-height (window height)
354 "Sets the height in lines of the text display area of WINDOW to HEIGHT.
355 This doesn't include the mode-line (or header-line if any) or any
356 partial-height lines in the text display area.
358 If WINDOW is nil, the selected window is used.
360 Note that the current implementation of this function cannot always set
361 the height exactly, but attempts to be conservative, by allocating more
362 lines than are actually needed in the case where some error may be present."
363 (let ((delta (- height (window-text-height window))))
364 (unless (zerop delta)
365 (let ((window-min-height 1))
366 (if (and window (not (eq window (selected-window))))
367 (save-selected-window
368 (select-window window)
369 (enlarge-window delta))
370 (enlarge-window delta))))))
373 (defun enlarge-window-horizontally (arg)
374 "Make current window ARG columns wider."
375 (interactive "p")
376 (enlarge-window arg t))
378 (defun shrink-window-horizontally (arg)
379 "Make current window ARG columns narrower."
380 (interactive "p")
381 (shrink-window arg t))
383 (defun window-buffer-height (window)
384 "Return the height (in screen lines) of the buffer that WINDOW is displaying."
385 (save-excursion
386 (set-buffer (window-buffer window))
387 (goto-char (point-min))
388 (let ((ignore-final-newline
389 ;; If buffer ends with a newline, ignore it when counting height
390 ;; unless point is after it.
391 (and (not (eobp)) (eq ?\n (char-after (1- (point-max)))))))
392 (+ 1 (nth 2 (compute-motion (point-min)
393 '(0 . 0)
394 (- (point-max) (if ignore-final-newline 1 0))
395 (cons 0 100000000)
396 (window-width window)
398 window))))))
400 (defun count-screen-lines (&optional beg end count-final-newline window)
401 "Return the number of screen lines in the region.
402 The number of screen lines may be different from the number of actual lines,
403 due to line breaking, display table, etc.
405 Optional arguments BEG and END default to `point-min' and `point-max'
406 respectively.
408 If region ends with a newline, ignore it unless optional third argument
409 COUNT-FINAL-NEWLINE is non-nil.
411 The optional fourth argument WINDOW specifies the window used for obtaining
412 parameters such as width, horizontal scrolling, and so on. The default is
413 to use the selected window's parameters.
415 Like `vertical-motion', `count-screen-lines' always uses the current buffer,
416 regardless of which buffer is displayed in WINDOW. This makes possible to use
417 `count-screen-lines' in any buffer, whether or not it is currently displayed
418 in some window."
419 (unless beg
420 (setq beg (point-min)))
421 (unless end
422 (setq end (point-max)))
423 (if (= beg end)
425 (save-excursion
426 (save-restriction
427 (widen)
428 (narrow-to-region (min beg end)
429 (if (and (not count-final-newline)
430 (= ?\n (char-before (max beg end))))
431 (1- (max beg end))
432 (max beg end)))
433 (goto-char (point-min))
434 (1+ (vertical-motion (buffer-size) window))))))
436 (defun fit-window-to-buffer (&optional window max-height min-height)
437 "Make WINDOW the right size to display its contents exactly.
438 If WINDOW is omitted or nil, it defaults to the selected window.
439 If the optional argument MAX-HEIGHT is supplied, it is the maximum height
440 the window is allowed to be, defaulting to the frame height.
441 If the optional argument MIN-HEIGHT is supplied, it is the minimum
442 height the window is allowed to be, defaulting to `window-min-height'.
444 The heights in MAX-HEIGHT and MIN-HEIGHT include the mode-line and/or
445 header-line."
446 (interactive)
448 (when (null window)
449 (setq window (selected-window)))
450 (when (null max-height)
451 (setq max-height (frame-height (window-frame window))))
453 (let* ((buf
454 ;; Buffer that is displayed in WINDOW
455 (window-buffer window))
456 (window-height
457 ;; The current height of WINDOW
458 (window-height window))
459 (desired-height
460 ;; The height necessary to show the buffer displayed by WINDOW
461 ;; (`count-screen-lines' always works on the current buffer).
462 (with-current-buffer buf
463 (+ (count-screen-lines)
464 ;; If the buffer is empty, (count-screen-lines) is
465 ;; zero. But, even in that case, we need one text line
466 ;; for cursor.
467 (if (= (point-min) (point-max))
468 1 0)
469 ;; For non-minibuffers, count the mode-line, if any
470 (if (and (not (window-minibuffer-p window))
471 mode-line-format)
472 1 0)
473 ;; Count the header-line, if any
474 (if header-line-format 1 0))))
475 (delta
476 ;; Calculate how much the window height has to change to show
477 ;; desired-height lines, constrained by MIN-HEIGHT and MAX-HEIGHT.
478 (- (max (min desired-height max-height)
479 (or min-height window-min-height))
480 window-height))
481 ;; We do our own height checking, so avoid any restrictions due to
482 ;; window-min-height.
483 (window-min-height 1))
485 ;; Don't try to redisplay with the cursor at the end
486 ;; on its own line--that would force a scroll and spoil things.
487 (when (with-current-buffer buf
488 (and (eobp) (bolp) (not (bobp))))
489 (set-window-point window (1- (window-point window))))
491 (save-selected-window
492 (select-window window)
494 ;; Adjust WINDOW to the nominally correct size (which may actually
495 ;; be slightly off because of variable height text, etc).
496 (unless (zerop delta)
497 (enlarge-window delta))
499 ;; Check if the last line is surely fully visible. If not,
500 ;; enlarge the window.
501 (let ((end (with-current-buffer buf
502 (save-excursion
503 (goto-char (point-max))
504 (when (and (bolp) (not (bobp)))
505 ;; Don't include final newline
506 (backward-char 1))
507 (when truncate-lines
508 ;; If line-wrapping is turned off, test the
509 ;; beginning of the last line for visibility
510 ;; instead of the end, as the end of the line
511 ;; could be invisible by virtue of extending past
512 ;; the edge of the window.
513 (forward-line 0))
514 (point)))))
515 (set-window-vscroll window 0)
516 (while (and (< desired-height max-height)
517 (= desired-height (window-height window))
518 (not (pos-visible-in-window-p end window)))
519 (enlarge-window 1)
520 (setq desired-height (1+ desired-height)))))))
522 (defun shrink-window-if-larger-than-buffer (&optional window)
523 "Shrink the WINDOW to be as small as possible to display its contents.
524 If WINDOW is omitted or nil, it defaults to the selected window.
525 Do not shrink to less than `window-min-height' lines.
526 Do nothing if the buffer contains more lines than the present window height,
527 or if some of the window's contents are scrolled out of view,
528 or if shrinking this window would also shrink another window.
529 or if the window is the only window of its frame.
530 Return non-nil if the window was shrunk."
531 (interactive)
532 (when (null window)
533 (setq window (selected-window)))
534 (let* ((frame (window-frame window))
535 (mini (frame-parameter frame 'minibuffer))
536 (edges (window-edges window)))
537 (if (and (not (eq window (frame-root-window frame)))
538 (window-safely-shrinkable-p)
539 (pos-visible-in-window-p (point-min) window)
540 (not (eq mini 'only))
541 (or (not mini)
542 (let ((mini-window (minibuffer-window frame)))
543 (or (null mini-window)
544 (not (eq frame (window-frame mini-window)))
545 (< (nth 3 edges)
546 (nth 1 (window-edges mini-window)))
547 (> (nth 1 edges)
548 (frame-parameter frame 'menu-bar-lines))))))
549 (fit-window-to-buffer window (window-height window)))))
551 (defun kill-buffer-and-window ()
552 "Kill the current buffer and delete the selected window."
553 (interactive)
554 (let ((window-to-delete (selected-window))
555 (delete-window-hook (lambda ()
556 (condition-case nil
557 (delete-window)
558 (error nil)))))
559 (add-hook 'kill-buffer-hook delete-window-hook t t)
560 (if (kill-buffer (current-buffer))
561 ;; If `delete-window' failed before, we rerun it to regenerate
562 ;; the error so it can be seen in the minibuffer.
563 (when (eq (selected-window) window-to-delete)
564 (delete-window))
565 (remove-hook 'kill-buffer-hook delete-window-hook t))))
567 (defun quit-window (&optional kill window)
568 "Quit the current buffer. Bury it, and maybe delete the selected frame.
569 \(The frame is deleted if it is contains a dedicated window for the buffer.)
570 With a prefix argument, kill the buffer instead.
572 Noninteractively, if KILL is non-nil, then kill the current buffer,
573 otherwise bury it.
575 If WINDOW is non-nil, it specifies a window; we delete that window,
576 and the buffer that is killed or buried is the one in that window."
577 (interactive "P")
578 (let ((buffer (window-buffer window))
579 (frame (window-frame (or window (selected-window))))
580 (window-solitary
581 (save-selected-window
582 (if window
583 (select-window window))
584 (one-window-p t)))
585 window-handled)
587 (save-selected-window
588 (if window
589 (select-window window))
590 (or (window-minibuffer-p)
591 (window-dedicated-p (selected-window))
592 (switch-to-buffer (other-buffer))))
594 ;; Get rid of the frame, if it has just one dedicated window
595 ;; and other visible frames exist.
596 (and (or (window-minibuffer-p) (window-dedicated-p window))
597 (delq frame (visible-frame-list))
598 window-solitary
599 (if (and (eq default-minibuffer-frame frame)
600 (= 1 (length (minibuffer-frame-list))))
601 (setq window nil)
602 (delete-frame frame)
603 (setq window-handled t)))
605 ;; Deal with the buffer.
606 (if kill
607 (kill-buffer buffer)
608 (bury-buffer buffer))
610 ;; Maybe get rid of the window.
611 (and window (not window-handled) (not window-solitary)
612 (delete-window window))))
614 (defun handle-select-window (event)
615 "Handle select-window events."
616 (interactive "e")
617 (let ((window (posn-window (event-start event))))
618 (if (and (window-live-p window)
619 (or (not (window-minibuffer-p window))
620 (minibuffer-window-active-p window)))
621 (select-window window))))
623 (define-key ctl-x-map "2" 'split-window-vertically)
624 (define-key ctl-x-map "3" 'split-window-horizontally)
625 (define-key ctl-x-map "}" 'enlarge-window-horizontally)
626 (define-key ctl-x-map "{" 'shrink-window-horizontally)
627 (define-key ctl-x-map "-" 'shrink-window-if-larger-than-buffer)
628 (define-key ctl-x-map "+" 'balance-windows)
629 (define-key ctl-x-4-map "0" 'kill-buffer-and-window)
631 ;;; arch-tag: b508dfcc-c353-4c37-89fa-e773fe10cea9
632 ;;; window.el ends here