From 9e5686841337166bd5bf7b644293f0a0cf616f7c Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 30 Mar 2007 02:04:27 +0000 Subject: [PATCH] (Fprimitive_undo): Give clearer error message when trying to change text properties outside accessible part of buffer. --- src/undo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/undo.c b/src/undo.c index 0eca97df566..7a6ba37d0f8 100644 --- a/src/undo.c +++ b/src/undo.c @@ -548,6 +548,8 @@ Return what remains of the list. */) beg = Fcar (cdr); end = Fcdr (cdr); + if (XINT (beg) < BEGV || XINT (end) > ZV) + error ("Changes to be undone are outside visible portion of buffer"); Fput_text_property (beg, end, prop, val, Qnil); } else if (INTEGERP (car) && INTEGERP (cdr)) -- 2.39.5