diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2007-03-30 02:04:27 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2007-03-30 02:04:27 +0000 |
commit | 9e5686841337166bd5bf7b644293f0a0cf616f7c (patch) | |
tree | dc4dee69606db3676cab79c46942ce037e657ca4 /src/undo.c | |
parent | 6cf1226a720e76e05e412899e04aa4588053a5c0 (diff) | |
download | emacs-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.c | 2 |
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)) |