aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorDaniel Colascione2012-09-17 04:07:36 -0800
committerDaniel Colascione2012-09-17 04:07:36 -0800
commit2ab329f3b5d52a39f0a45c3d9c129f1c19560142 (patch)
tree6dd6784d63e54cb18071df8e28fbdbc27d418728 /src/window.c
parentf701ab72dd55460d23c8b029550aa4d7ecef3cfa (diff)
parentbb7dce392f6d9d5fc4b9d7de09ff920a52f07669 (diff)
downloademacs-2ab329f3b5d52a39f0a45c3d9c129f1c19560142.tar.gz
emacs-2ab329f3b5d52a39f0a45c3d9c129f1c19560142.zip
Merge from trunk
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c49
1 files changed, 20 insertions, 29 deletions
diff --git a/src/window.c b/src/window.c
index 117e86065e3..114bd28c310 100644
--- a/src/window.c
+++ b/src/window.c
@@ -23,7 +23,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
23#define WINDOW_INLINE EXTERN_INLINE 23#define WINDOW_INLINE EXTERN_INLINE
24 24
25#include <stdio.h> 25#include <stdio.h>
26#include <setjmp.h>
27 26
28#include "lisp.h" 27#include "lisp.h"
29#include "character.h" 28#include "character.h"
@@ -176,11 +175,6 @@ wset_new_total (struct window *w, Lisp_Object val)
176 w->new_total = val; 175 w->new_total = val;
177} 176}
178static inline void 177static inline void
179wset_next_buffers (struct window *w, Lisp_Object val)
180{
181 w->next_buffers = val;
182}
183static inline void
184wset_normal_cols (struct window *w, Lisp_Object val) 178wset_normal_cols (struct window *w, Lisp_Object val)
185{ 179{
186 w->normal_cols = val; 180 w->normal_cols = val;
@@ -201,11 +195,6 @@ wset_pointm (struct window *w, Lisp_Object val)
201 w->pointm = val; 195 w->pointm = val;
202} 196}
203static inline void 197static inline void
204wset_prev_buffers (struct window *w, Lisp_Object val)
205{
206 w->prev_buffers = val;
207}
208static inline void
209wset_right_fringe_width (struct window *w, Lisp_Object val) 198wset_right_fringe_width (struct window *w, Lisp_Object val)
210{ 199{
211 w->right_fringe_width = val; 200 w->right_fringe_width = val;
@@ -386,7 +375,7 @@ the first window of that frame. */)
386 else if (! NILP (XWINDOW (window)->vchild)) 375 else if (! NILP (XWINDOW (window)->vchild))
387 window = XWINDOW (window)->vchild; 376 window = XWINDOW (window)->vchild;
388 else 377 else
389 abort (); 378 emacs_abort ();
390 } 379 }
391 380
392 return window; 381 return window;
@@ -1289,7 +1278,7 @@ If they are in the windows's left or right marginal areas, `left-margin'\n\
1289 return Qnil; 1278 return Qnil;
1290 1279
1291 default: 1280 default:
1292 abort (); 1281 emacs_abort ();
1293 } 1282 }
1294} 1283}
1295 1284
@@ -1866,23 +1855,23 @@ return value is a list of elements of the form (PARAMETER . VALUE). */)
1866DEFUN ("window-parameter", Fwindow_parameter, Swindow_parameter, 1855DEFUN ("window-parameter", Fwindow_parameter, Swindow_parameter,
1867 2, 2, 0, 1856 2, 2, 0,
1868 doc: /* Return WINDOW's value for PARAMETER. 1857 doc: /* Return WINDOW's value for PARAMETER.
1869WINDOW must be a valid window and defaults to the selected one. */) 1858WINDOW can be any window and defaults to the selected one. */)
1870 (Lisp_Object window, Lisp_Object parameter) 1859 (Lisp_Object window, Lisp_Object parameter)
1871{ 1860{
1872 Lisp_Object result; 1861 Lisp_Object result;
1873 1862
1874 result = Fassq (parameter, decode_valid_window (window)->window_parameters); 1863 result = Fassq (parameter, decode_any_window (window)->window_parameters);
1875 return CDR_SAFE (result); 1864 return CDR_SAFE (result);
1876} 1865}
1877 1866
1878DEFUN ("set-window-parameter", Fset_window_parameter, 1867DEFUN ("set-window-parameter", Fset_window_parameter,
1879 Sset_window_parameter, 3, 3, 0, 1868 Sset_window_parameter, 3, 3, 0,
1880 doc: /* Set WINDOW's value of PARAMETER to VALUE. 1869 doc: /* Set WINDOW's value of PARAMETER to VALUE.
1881WINDOW must be a valid window and defaults to the selected one. 1870WINDOW can be any window and defaults to the selected one.
1882Return VALUE. */) 1871Return VALUE. */)
1883 (Lisp_Object window, Lisp_Object parameter, Lisp_Object value) 1872 (Lisp_Object window, Lisp_Object parameter, Lisp_Object value)
1884{ 1873{
1885 register struct window *w = decode_valid_window (window); 1874 register struct window *w = decode_any_window (window);
1886 Lisp_Object old_alist_elt; 1875 Lisp_Object old_alist_elt;
1887 1876
1888 old_alist_elt = Fassq (parameter, w->window_parameters); 1877 old_alist_elt = Fassq (parameter, w->window_parameters);
@@ -1948,7 +1937,7 @@ unshow_buffer (register struct window *w)
1948 buf = w->buffer; 1937 buf = w->buffer;
1949 b = XBUFFER (buf); 1938 b = XBUFFER (buf);
1950 if (b != XMARKER (w->pointm)->buffer) 1939 if (b != XMARKER (w->pointm)->buffer)
1951 abort (); 1940 emacs_abort ();
1952 1941
1953#if 0 1942#if 0
1954 if (w == XWINDOW (selected_window) 1943 if (w == XWINDOW (selected_window)
@@ -2668,8 +2657,8 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame
2668 /* Check for a window that has a killed buffer. */ 2657 /* Check for a window that has a killed buffer. */
2669 case CHECK_ALL_WINDOWS: 2658 case CHECK_ALL_WINDOWS:
2670 if (! NILP (w->buffer) 2659 if (! NILP (w->buffer)
2671 && NILP (BVAR (XBUFFER (w->buffer), name))) 2660 && !BUFFER_LIVE_P (XBUFFER (w->buffer)))
2672 abort (); 2661 emacs_abort ();
2673 break; 2662 break;
2674 2663
2675 case WINDOW_LOOP_UNUSED: 2664 case WINDOW_LOOP_UNUSED:
@@ -3273,7 +3262,7 @@ This function runs `window-scroll-functions' before running
3273 XSETWINDOW (window, w); 3262 XSETWINDOW (window, w);
3274 buffer = Fget_buffer (buffer_or_name); 3263 buffer = Fget_buffer (buffer_or_name);
3275 CHECK_BUFFER (buffer); 3264 CHECK_BUFFER (buffer);
3276 if (NILP (BVAR (XBUFFER (buffer), name))) 3265 if (!BUFFER_LIVE_P (XBUFFER (buffer)))
3277 error ("Attempt to display deleted buffer"); 3266 error ("Attempt to display deleted buffer");
3278 3267
3279 tem = w->buffer; 3268 tem = w->buffer;
@@ -3338,7 +3327,7 @@ displaying that buffer. */)
3338 3327
3339 if (STRINGP (object)) 3328 if (STRINGP (object))
3340 object = Fget_buffer (object); 3329 object = Fget_buffer (object);
3341 if (BUFFERP (object) && !NILP (BVAR (XBUFFER (object), name))) 3330 if (BUFFERP (object) && BUFFER_LIVE_P (XBUFFER (object)))
3342 { 3331 {
3343 /* Walk all windows looking for buffer, and force update 3332 /* Walk all windows looking for buffer, and force update
3344 of each of those windows. */ 3333 of each of those windows. */
@@ -5549,7 +5538,7 @@ the return value is nil. Otherwise the value is t. */)
5549 saved_windows = XVECTOR (data->saved_windows); 5538 saved_windows = XVECTOR (data->saved_windows);
5550 5539
5551 new_current_buffer = data->current_buffer; 5540 new_current_buffer = data->current_buffer;
5552 if (NILP (BVAR (XBUFFER (new_current_buffer), name))) 5541 if (!BUFFER_LIVE_P (XBUFFER (new_current_buffer)))
5553 new_current_buffer = Qnil; 5542 new_current_buffer = Qnil;
5554 else 5543 else
5555 { 5544 {
@@ -5624,7 +5613,7 @@ the return value is nil. Otherwise the value is t. */)
5624 w = XWINDOW (window); 5613 w = XWINDOW (window);
5625 if (!NILP (w->buffer) 5614 if (!NILP (w->buffer)
5626 && !EQ (w->buffer, p->buffer) 5615 && !EQ (w->buffer, p->buffer)
5627 && !NILP (BVAR (XBUFFER (p->buffer), name))) 5616 && BUFFER_LIVE_P (XBUFFER (p->buffer)))
5628 /* If a window we restore gets another buffer, record the 5617 /* If a window we restore gets another buffer, record the
5629 window's old buffer. */ 5618 window's old buffer. */
5630 call1 (Qrecord_window_buffer, window); 5619 call1 (Qrecord_window_buffer, window);
@@ -5774,7 +5763,7 @@ the return value is nil. Otherwise the value is t. */)
5774 if (NILP (p->buffer)) 5763 if (NILP (p->buffer))
5775 /* An internal window. */ 5764 /* An internal window. */
5776 wset_buffer (w, p->buffer); 5765 wset_buffer (w, p->buffer);
5777 else if (!NILP (BVAR (XBUFFER (p->buffer), name))) 5766 else if (BUFFER_LIVE_P (XBUFFER (p->buffer)))
5778 /* If saved buffer is alive, install it. */ 5767 /* If saved buffer is alive, install it. */
5779 { 5768 {
5780 wset_buffer (w, p->buffer); 5769 wset_buffer (w, p->buffer);
@@ -5793,7 +5782,7 @@ the return value is nil. Otherwise the value is t. */)
5793 Fgoto_char (w->pointm); 5782 Fgoto_char (w->pointm);
5794 } 5783 }
5795 else if (!NILP (w->buffer) 5784 else if (!NILP (w->buffer)
5796 && !NILP (BVAR (XBUFFER (w->buffer), name))) 5785 && BUFFER_LIVE_P (XBUFFER (w->buffer)))
5797 /* Keep window's old buffer; make sure the markers are 5786 /* Keep window's old buffer; make sure the markers are
5798 real. */ 5787 real. */
5799 { 5788 {
@@ -6576,15 +6565,17 @@ freeze_window_starts (struct frame *f, int freeze_p)
6576/* Return 1 if window configurations CONFIGURATION1 and CONFIGURATION2 6565/* Return 1 if window configurations CONFIGURATION1 and CONFIGURATION2
6577 describe the same state of affairs. This is used by Fequal. 6566 describe the same state of affairs. This is used by Fequal.
6578 6567
6579 ignore_positions non-zero means ignore non-matching scroll positions 6568 IGNORE_POSITIONS means ignore non-matching scroll positions
6580 and the like. 6569 and the like.
6581 6570
6582 This ignores a couple of things like the dedication status of 6571 This ignores a couple of things like the dedication status of
6583 window, combination_limit and the like. This might have to be 6572 window, combination_limit and the like. This might have to be
6584 fixed. */ 6573 fixed. */
6585 6574
6586int 6575bool
6587compare_window_configurations (Lisp_Object configuration1, Lisp_Object configuration2, int ignore_positions) 6576compare_window_configurations (Lisp_Object configuration1,
6577 Lisp_Object configuration2,
6578 bool ignore_positions)
6588{ 6579{
6589 register struct save_window_data *d1, *d2; 6580 register struct save_window_data *d1, *d2;
6590 struct Lisp_Vector *sws1, *sws2; 6581 struct Lisp_Vector *sws1, *sws2;