aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2007-03-30 02:04:27 +0000
committerChong Yidong2007-03-30 02:04:27 +0000
commit9e5686841337166bd5bf7b644293f0a0cf616f7c (patch)
treedc4dee69606db3676cab79c46942ce037e657ca4 /src
parent6cf1226a720e76e05e412899e04aa4588053a5c0 (diff)
downloademacs-9e5686841337166bd5bf7b644293f0a0cf616f7c.tar.gz
emacs-9e5686841337166bd5bf7b644293f0a0cf616f7c.zip
(Fprimitive_undo): Give clearer error message when trying to change
text properties outside accessible part of buffer.
Diffstat (limited to 'src')
-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. */)
548 beg = Fcar (cdr); 548 beg = Fcar (cdr);
549 end = Fcdr (cdr); 549 end = Fcdr (cdr);
550 550
551 if (XINT (beg) < BEGV || XINT (end) > ZV)
552 error ("Changes to be undone are outside visible portion of buffer");
551 Fput_text_property (beg, end, prop, val, Qnil); 553 Fput_text_property (beg, end, prop, val, Qnil);
552 } 554 }
553 else if (INTEGERP (car) && INTEGERP (cdr)) 555 else if (INTEGERP (car) && INTEGERP (cdr))