summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-12-20 18:14:47 +0000
committerRichard M. Stallman <rms@gnu.org>1996-12-20 18:14:47 +0000
commit5cf18e390f4c6e9a43d8bc49af5abdb6103de944 (patch)
treeb620723372718a781f95d4c917f24bf04e581aae /src
parent2727019cfca30784206c8ff4a5ff1762077df5c5 (diff)
downloademacs-5cf18e390f4c6e9a43d8bc49af5abdb6103de944.tar.gz
(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 ()
Lisp_Object tail, frame;
int count = specpdl_ptr - specpdl;
- record_unwind_protect (Fstore_match_data, Fmatch_data ());
+ record_unwind_protect (Fstore_match_data, Fmatch_data (Qnil, Qnil));
FOR_EACH_FRAME (tail, frame)
{
@@ -1396,7 +1396,7 @@ update_menu_bar (f, save_match_data)
set_buffer_internal_1 (XBUFFER (w->buffer));
if (save_match_data)
- record_unwind_protect (Fstore_match_data, Fmatch_data ());
+ record_unwind_protect (Fstore_match_data, Fmatch_data (Qnil, Qnil));
if (NILP (Voverriding_local_map_menu_flag))
{
specbind (Qoverriding_terminal_local_map, Qnil);
@@ -2048,6 +2048,11 @@ try_window (window, pos)
int width = window_internal_width (w) - 1;
struct position val;
+ /* POS should never be out of range! */
+ if (pos < XBUFFER (w->buffer)->begv
+ || pos > XBUFFER (w->buffer)->zv)
+ abort ();
+
Fset_marker (w->start, make_number (pos), Qnil);
cursor_vpos = -1;
overlay_arrow_seen = 0;