Mercurial > emacs
comparison src/window.c @ 28417:4b675266db04
* lisp.h (XCONS, XSTRING, XSYMBOL, XFLOAT, XPROCESS, XWINDOW, XSUBR, XBUFFER):
Verify correct object type before returning pointer, using eassert.
* frame.h (XFRAME): Likewise.
* buffer.c (Frename_buffer, Fset_buffer_multibyte,
swap_out_buffer_local_variables, Fmove_overlay): Don't apply XSYMBOL, XBUFFER,
etc, to values that may be nil or of the wrong type.
* data.c (set_internal): Likewise.
* dispextern.h (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P): Likewise.
* fileio.c (auto_save_1): Likewise.
* insdel.c (check_markers): Likewise.
* marker.c (buf_charpos_to_bytepos, unchain_marker): Likewise.
* undo.c (record_insert): Likewise.
* vmsproc.c (child_sig): Likewise.
* window.c (unshow_buffer, window_loop): Likewise.
* xterm.c (x_erase_phys_cursor): Likewise.
author | Ken Raeburn <raeburn@raeburn.org> |
---|---|
date | Thu, 30 Mar 2000 09:56:31 +0000 |
parents | 7eb1735d6d4d |
children | 4591d285fb65 |
comparison
equal
deleted
inserted
replaced
28416:24ba809218ad | 28417:4b675266db04 |
---|---|
903 /* Point in the selected window's buffer | 903 /* Point in the selected window's buffer |
904 is actually stored in that buffer, and the window's pointm isn't used. | 904 is actually stored in that buffer, and the window's pointm isn't used. |
905 So don't clobber point in that buffer. */ | 905 So don't clobber point in that buffer. */ |
906 if (! EQ (buf, XWINDOW (selected_window)->buffer) | 906 if (! EQ (buf, XWINDOW (selected_window)->buffer) |
907 /* This line helps to fix Horsley's testbug.el bug. */ | 907 /* This line helps to fix Horsley's testbug.el bug. */ |
908 && !(w != XWINDOW (b->last_selected_window) | 908 && !(WINDOWP (b->last_selected_window) |
909 && w != XWINDOW (b->last_selected_window) | |
909 && EQ (buf, XWINDOW (b->last_selected_window)->buffer))) | 910 && EQ (buf, XWINDOW (b->last_selected_window)->buffer))) |
910 temp_set_point_both (b, | 911 temp_set_point_both (b, |
911 clip_to_bounds (BUF_BEGV (b), | 912 clip_to_bounds (BUF_BEGV (b), |
912 XMARKER (w->pointm)->charpos, | 913 XMARKER (w->pointm)->charpos, |
913 BUF_ZV (b)), | 914 BUF_ZV (b)), |
914 clip_to_bounds (BUF_BEGV_BYTE (b), | 915 clip_to_bounds (BUF_BEGV_BYTE (b), |
915 marker_byte_position (w->pointm), | 916 marker_byte_position (w->pointm), |
916 BUF_ZV_BYTE (b))); | 917 BUF_ZV_BYTE (b))); |
917 | 918 |
918 if (w == XWINDOW (b->last_selected_window)) | 919 if (WINDOWP (b->last_selected_window) |
920 && w == XWINDOW (b->last_selected_window)) | |
919 b->last_selected_window = Qnil; | 921 b->last_selected_window = Qnil; |
920 } | 922 } |
921 | 923 |
922 /* Put replacement into the window structure in place of old. */ | 924 /* Put replacement into the window structure in place of old. */ |
923 static void | 925 static void |
1631 break; | 1633 break; |
1632 | 1634 |
1633 case GET_LARGEST_WINDOW: | 1635 case GET_LARGEST_WINDOW: |
1634 /* Ignore dedicated windows and minibuffers. */ | 1636 /* Ignore dedicated windows and minibuffers. */ |
1635 if (MINI_WINDOW_P (XWINDOW (w)) | 1637 if (MINI_WINDOW_P (XWINDOW (w)) |
1636 || !NILP (XWINDOW (w)->dedicated)) | 1638 || !NILP (XWINDOW (w)->dedicated) |
1639 || NILP (best_window)) | |
1637 break; | 1640 break; |
1638 { | 1641 { |
1639 struct window *best_window_ptr = XWINDOW (best_window); | 1642 struct window *best_window_ptr = XWINDOW (best_window); |
1640 struct window *w_ptr = XWINDOW (w); | 1643 struct window *w_ptr = XWINDOW (w); |
1641 if (NILP (best_window) | 1644 if (NILP (best_window) |