[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112091: * window.c (Fwindow_combinat
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112091: * window.c (Fwindow_combination_limit, Fset_window_combination_limit): |
Date: |
Tue, 19 Mar 2013 13:21:31 +0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 112091
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Tue 2013-03-19 13:21:31 +0400
message:
* window.c (Fwindow_combination_limit, Fset_window_combination_limit):
Signal error if window is not internal. Adjust docstring.
(delete_all_child_windows): Use combination_limit to save the buffer.
(Fset_window_configuration): Adjust accordingly.
modified:
src/ChangeLog
src/window.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-03-18 13:21:12 +0000
+++ b/src/ChangeLog 2013-03-19 09:21:31 +0000
@@ -1,3 +1,10 @@
+2013-03-19 Dmitry Antipov <address@hidden>
+
+ * window.c (Fwindow_combination_limit, Fset_window_combination_limit):
+ Signal error if window is not internal. Adjust docstring.
+ (delete_all_child_windows): Use combination_limit to save the buffer.
+ (Fset_window_configuration): Adjust accordingly.
+
2013-03-18 Dmitry Antipov <address@hidden>
* window.c (window_resize_check, window_resize_apply)
=== modified file 'src/window.c'
--- a/src/window.c 2013-03-18 13:21:12 +0000
+++ b/src/window.c 2013-03-19 09:21:31 +0000
@@ -635,30 +635,37 @@
DEFUN ("window-combination-limit", Fwindow_combination_limit,
Swindow_combination_limit, 1, 1, 0,
doc: /* Return combination limit of window WINDOW.
+WINDOW must be a valid window used in horizontal or vertical combination.
If the return value is nil, child windows of WINDOW can be recombined with
WINDOW's siblings. A return value of t means that child windows of
-WINDOW are never \(re-)combined with WINDOW's siblings.
-
-WINDOW must be a valid window. The return value is meaningful for
-internal windows only. */)
+WINDOW are never \(re-)combined with WINDOW's siblings. */)
(Lisp_Object window)
{
+ struct window *w;
+
CHECK_VALID_WINDOW (window);
+ w = XWINDOW (window);
+ if (!NILP (w->buffer))
+ error ("Combination limit is meaningful for internal windows only");
return XWINDOW (window)->combination_limit;
}
DEFUN ("set-window-combination-limit", Fset_window_combination_limit,
Sset_window_combination_limit, 2, 2, 0,
doc: /* Set combination limit of window WINDOW to LIMIT; return LIMIT.
+WINDOW must be a valid window used in horizontal or vertical combination.
If LIMIT is nil, child windows of WINDOW can be recombined with WINDOW's
siblings. LIMIT t means that child windows of WINDOW are never
\(re-)combined with WINDOW's siblings. Other values are reserved for
-future use.
-
-WINDOW must be a valid window. Setting the combination limit is
-meaningful for internal windows only. */)
+future use. */)
(Lisp_Object window, Lisp_Object limit)
{
- wset_combination_limit (decode_valid_window (window), limit);
+ struct window *w;
+
+ CHECK_VALID_WINDOW (window);
+ w = XWINDOW (window);
+ if (!NILP (w->buffer))
+ error ("Combination limit is meaningful for internal windows only");
+ wset_combination_limit (w, limit);
return limit;
}
@@ -5711,10 +5718,9 @@
}
}
- /* If we squirreled away the buffer in the window's height,
- restore it now. */
- if (BUFFERP (w->total_lines))
- wset_buffer (w, w->total_lines);
+ /* If we squirreled away the buffer, restore it now. */
+ if (BUFFERP (w->combination_limit))
+ wset_buffer (w, w->combination_limit);
wset_left_col (w, p->left_col);
wset_top_line (w, p->top_line);
wset_total_cols (w, p->total_cols);
@@ -5918,9 +5924,6 @@
/* Delete WINDOW's siblings (we traverse postorderly). */
delete_all_child_windows (w->next);
- /* See Fset_window_configuration for excuse. */
- wset_total_lines (w, w->buffer);
-
if (!NILP (w->vchild))
{
delete_all_child_windows (w->vchild);
@@ -5936,6 +5939,10 @@
unshow_buffer (w);
unchain_marker (XMARKER (w->pointm));
unchain_marker (XMARKER (w->start));
+ /* Since combination limit makes sense for an internal windows
+ only, we use this slot to save the buffer for the sake of
+ possible resurrection in Fset_window_configuration. */
+ wset_combination_limit (w, w->buffer);
wset_buffer (w, Qnil);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112091: * window.c (Fwindow_combination_limit, Fset_window_combination_limit):,
Dmitry Antipov <=