Add the latest changes to etags behaviour.
[bpt/emacs.git] / src / undo.c
index 40cebba..83c2327 100644 (file)
@@ -412,8 +412,9 @@ Return what remains of the list.")
   next = Qnil;
   GCPRO2 (next, list);
 
-  /* Don't let read-only properties interfere with undo.  */
-  if (!NILP (current_buffer->read_only))
+  /* In a writable buffer, enable undoing read-only text that is so
+     because of text properties.  */
+  if (NILP (current_buffer->read_only))
     specbind (Qinhibit_read_only, Qt);
 
   /* Don't let `intangible' properties interfere with undo.  */
@@ -478,7 +479,6 @@ Return what remains of the list.")
              else if (INTEGERP (car) && INTEGERP (cdr))
                {
                  /* Element (BEG . END) means range was inserted.  */
-                 Lisp_Object end;
 
                  if (XINT (car) < BEGV
                      || XINT (cdr) > ZV)