[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/window.el,v
From: |
Martin Rudalics |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/window.el,v |
Date: |
Tue, 04 Nov 2008 06:50:17 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Martin Rudalics <m061211> 08/11/04 06:50:16
Index: window.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/window.el,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -b -r1.161 -r1.162
--- window.el 2 Nov 2008 11:02:24 -0000 1.161
+++ window.el 4 Nov 2008 06:50:12 -0000 1.162
@@ -39,40 +39,20 @@
(make-variable-buffer-local 'window-size-fixed)
(defmacro save-selected-window (&rest body)
- "Execute BODY, then select the window that was selected before BODY.
+ "Execute BODY, then select the previously selected window.
The value returned is the value of the last form in BODY.
-This macro saves and restores the current buffer, since otherwise
-its normal operation could potentially make a different
-buffer current. It does not alter the buffer list ordering.
+This macro saves and restores the selected window, as well as the
+selected window in each frame. If the previously selected window
+is no longer live, then whatever window is selected at the end of
+BODY remains selected. If the previously selected window of some
+frame is no longer live at the end of BODY, that frame's selected
+window is left alone.
-This macro saves and restores the selected window, as well as
-the selected window in each frame. If the previously selected
-window of some frame is no longer live at the end of BODY, that
-frame's selected window is left alone. If the selected window is
-no longer live, then whatever window is selected at the end of
-BODY remains selected."
- `(let ((save-selected-window-window (selected-window))
- ;; It is necessary to save all of these, because calling
- ;; select-window changes frame-selected-window for whatever
- ;; frame that window is in.
- (save-selected-window-alist
- (mapcar (lambda (frame) (cons frame (frame-selected-window frame)))
- (frame-list))))
- (save-current-buffer
- (unwind-protect
- (progn ,@body)
- (dolist (elt save-selected-window-alist)
- (and (frame-live-p (car elt))
- (window-live-p (cdr elt))
- (set-frame-selected-window (car elt) (cdr elt))))
- (if (window-live-p save-selected-window-window)
- (select-window save-selected-window-window))))))
-
-(defmacro save-selected-window-norecord (&rest body)
- "Execute BODY, then select, but do not record previously selected window.
-This macro is like `save-selected-window' but changes neither the
-order of recently selected windows nor the buffer list."
+This macro saves and restores the current buffer, since otherwise
+its normal operation could make a different buffer current. The
+order of recently selected windows and the buffer list ordering
+are not altered by this macro (unless they are altered in BODY)."
`(let ((save-selected-window-window (selected-window))
;; It is necessary to save all of these, because calling
;; select-window changes frame-selected-window for whatever
@@ -192,9 +172,9 @@
(when (window-minibuffer-p (selected-window))
(setq minibuf t))
;; Make sure to not mess up the order of recently selected
- ;; windows. Use `save-selected-window-norecord' and `select-window'
+ ;; windows. Use `save-selected-window' and `select-window'
;; with second argument non-nil for this purpose.
- (save-selected-window-norecord
+ (save-selected-window
(when (framep all-frames)
(select-window (frame-first-window all-frames) 'norecord))
(let* (walk-windows-already-seen
@@ -1232,7 +1212,7 @@
;; the modeline.
(let ((window-min-height (min 2 height))) ; One text line plus a
modeline.
(if (and window (not (eq window (selected-window))))
- (save-selected-window-norecord
+ (save-selected-window
(select-window window 'norecord)
(enlarge-window delta))
(enlarge-window delta))))))
@@ -1350,7 +1330,7 @@
(and (eobp) (bolp) (not (bobp))))
(set-window-point window (1- (window-point window))))
- (save-selected-window-norecord
+ (save-selected-window
(select-window window 'norecord)
;; Adjust WINDOW to the nominally correct size (which may actually
- [Emacs-diffs] Changes to emacs/lisp/window.el,v, Martin Rudalics, 2008/11/02
- [Emacs-diffs] Changes to emacs/lisp/window.el,v,
Martin Rudalics <=
- [Emacs-diffs] Changes to emacs/lisp/window.el,v, Martin Rudalics, 2008/11/05
- [Emacs-diffs] Changes to emacs/lisp/window.el,v, Martin Rudalics, 2008/11/15
- [Emacs-diffs] Changes to emacs/lisp/window.el,v, Martin Rudalics, 2008/11/15
- [Emacs-diffs] Changes to emacs/lisp/window.el,v, Stefan Monnier, 2008/11/16
- [Emacs-diffs] Changes to emacs/lisp/window.el,v, Martin Rudalics, 2008/11/17
- [Emacs-diffs] Changes to emacs/lisp/window.el,v, Stefan Monnier, 2008/11/18