From: Chong Yidong Date: Fri, 30 Mar 2007 02:04:27 +0000 (+0000) Subject: (Fprimitive_undo): Give clearer error message when trying to change X-Git-Tag: emacs-pretest-22.0.97~121 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9e5686841337166bd5bf7b644293f0a0cf616f7c;p=emacs.git (Fprimitive_undo): Give clearer error message when trying to change text properties outside accessible part of buffer. --- 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))