]> code.delx.au - gnu-emacs/blobdiff - src/undo.c
Groff \# comments.
[gnu-emacs] / src / undo.c
index bf774affac5d1204e4c3fffeaf7d7eacf476b0e8..7a6ba37d0f88e056b409f410a52f9a976c716db4 100644 (file)
@@ -1,6 +1,6 @@
 /* undo handling for GNU Emacs.
-   Copyright (C) 1990, 1993, 1994, 2000, 2002, 2003, 2004,
-                 2005 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1993, 1994, 2000, 2001, 2002, 2003, 2004,
+                 2005, 2006, 2007  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -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))