summaryrefslogtreecommitdiff
path: root/src/undo.c
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2007-03-30 02:04:27 +0000
committerChong Yidong <cyd@stupidchicken.com>2007-03-30 02:04:27 +0000
commit9e5686841337166bd5bf7b644293f0a0cf616f7c (patch)
treedc4dee69606db3676cab79c46942ce037e657ca4 /src/undo.c
parent6cf1226a720e76e05e412899e04aa4588053a5c0 (diff)
downloademacs-9e5686841337166bd5bf7b644293f0a0cf616f7c.tar.gz
(Fprimitive_undo): Give clearer error message when trying to change
text properties outside accessible part of buffer.
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c2
1 files changed, 2 insertions, 0 deletions
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))