changeset 76800:3f97b6926170

(Fprimitive_undo): Give clearer error message when trying to change text properties outside accessible part of buffer.
author Chong Yidong <cyd@stupidchicken.com>
date Fri, 30 Mar 2007 02:04:27 +0000
parents 60292a8c7998
children aac76e7c087c
files src/undo.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/undo.c	Fri Mar 30 02:04:02 2007 +0000
+++ b/src/undo.c	Fri Mar 30 02:04:27 2007 +0000
@@ -548,6 +548,8 @@
 		  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))