aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1996-12-20 18:14:47 +0000
committerRichard M. Stallman1996-12-20 18:14:47 +0000
commit9cbab4ff0727ca1d9443ad55c3626445d194ab96 (patch)
treea7f1169f90ee806dd7ac6f579bd6d3e57754bdbd /src
parente900ced401d7fd6b000a07dd716f107cd5e44d8c (diff)
downloademacs-9cbab4ff0727ca1d9443ad55c3626445d194ab96.tar.gz
emacs-9cbab4ff0727ca1d9443ad55c3626445d194ab96.zip
(try_window): Add error check for POS.
(prepare_menu_bars, update_menu_bar): Call Fmatch_data with new explicit arguments.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 9fffd65cc91..dc8b23daff8 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -775,7 +775,7 @@ prepare_menu_bars ()
775 Lisp_Object tail, frame; 775 Lisp_Object tail, frame;
776 int count = specpdl_ptr - specpdl; 776 int count = specpdl_ptr - specpdl;
777 777
778 record_unwind_protect (Fstore_match_data, Fmatch_data ()); 778 record_unwind_protect (Fstore_match_data, Fmatch_data (Qnil, Qnil));
779 779
780 FOR_EACH_FRAME (tail, frame) 780 FOR_EACH_FRAME (tail, frame)
781 { 781 {
@@ -1396,7 +1396,7 @@ update_menu_bar (f, save_match_data)
1396 1396
1397 set_buffer_internal_1 (XBUFFER (w->buffer)); 1397 set_buffer_internal_1 (XBUFFER (w->buffer));
1398 if (save_match_data) 1398 if (save_match_data)
1399 record_unwind_protect (Fstore_match_data, Fmatch_data ()); 1399 record_unwind_protect (Fstore_match_data, Fmatch_data (Qnil, Qnil));
1400 if (NILP (Voverriding_local_map_menu_flag)) 1400 if (NILP (Voverriding_local_map_menu_flag))
1401 { 1401 {
1402 specbind (Qoverriding_terminal_local_map, Qnil); 1402 specbind (Qoverriding_terminal_local_map, Qnil);
@@ -2048,6 +2048,11 @@ try_window (window, pos)
2048 int width = window_internal_width (w) - 1; 2048 int width = window_internal_width (w) - 1;
2049 struct position val; 2049 struct position val;
2050 2050
2051 /* POS should never be out of range! */
2052 if (pos < XBUFFER (w->buffer)->begv
2053 || pos > XBUFFER (w->buffer)->zv)
2054 abort ();
2055
2051 Fset_marker (w->start, make_number (pos), Qnil); 2056 Fset_marker (w->start, make_number (pos), Qnil);
2052 cursor_vpos = -1; 2057 cursor_vpos = -1;
2053 overlay_arrow_seen = 0; 2058 overlay_arrow_seen = 0;