diff options
| author | Ken Raeburn | 2000-03-30 09:56:31 +0000 |
|---|---|---|
| committer | Ken Raeburn | 2000-03-30 09:56:31 +0000 |
| commit | 8801a864d2f7d9b6a77dfffa606f27f338127582 (patch) | |
| tree | 470499e90d35dabee56b08f00c6841a886dccdee /src/window.c | |
| parent | 326855a0f45fe45c4ddd9000046ed6a9aa31534b (diff) | |
| download | emacs-8801a864d2f7d9b6a77dfffa606f27f338127582.tar.gz emacs-8801a864d2f7d9b6a77dfffa606f27f338127582.zip | |
* 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.
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c index 95edbf8e13e..72547cad4b1 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -905,7 +905,8 @@ unshow_buffer (w) | |||
| 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), |
| @@ -915,7 +916,8 @@ unshow_buffer (w) | |||
| 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 | ||
| @@ -1633,7 +1635,8 @@ window_loop (type, obj, mini, frames) | |||
| 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); |