]> code.delx.au - gnu-emacs/blobdiff - src/textprop.c
; ChangeLog fixes
[gnu-emacs] / src / textprop.c
index 91ade8ae2984f283209de5e2784d376f675b7a8f..740b96227cfcb9c55a2c82eb06ad44c58d580e13 100644 (file)
@@ -1,5 +1,5 @@
 /* Interface code for dealing with text properties.
-   Copyright (C) 1993-1995, 1997, 1999-2014 Free Software Foundation,
+   Copyright (C) 1993-1995, 1997, 1999-2015 Free Software Foundation,
    Inc.
 
 This file is part of GNU Emacs.
@@ -44,21 +44,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
   is enforced by the subrs installing properties onto the intervals.  */
 
 \f
-/* Types of hooks.  */
-static Lisp_Object Qmouse_left;
-static Lisp_Object Qmouse_entered;
-Lisp_Object Qpoint_left;
-Lisp_Object Qpoint_entered;
-Lisp_Object Qcategory;
-Lisp_Object Qlocal_map;
-
-/* Visual properties text (including strings) may have.  */
-static Lisp_Object Qforeground, Qbackground, Qunderline;
-Lisp_Object Qfont;
-static Lisp_Object Qstipple;
-Lisp_Object Qinvisible, Qintangible, Qmouse_face;
-static Lisp_Object Qread_only;
-Lisp_Object Qminibuffer_prompt;
 
 enum property_set_type
 {
@@ -67,9 +52,6 @@ enum property_set_type
   TEXT_PROPERTY_APPEND
 };
 
-/* Sticky properties.  */
-Lisp_Object Qfront_sticky, Qrear_nonsticky;
-
 /* If o1 is a cons whose cdr is a cons, return non-zero and set o2 to
    the o1's cdr.  Otherwise, return zero.  This is handy for
    traversing plists.  */
@@ -2298,6 +2280,11 @@ verify_interval_modification (struct buffer *buf,
                }
            }
 
+         if (i->position + LENGTH (i) < end
+             && (!NILP (BVAR (current_buffer, read_only))
+                 && NILP (Vinhibit_read_only)))
+           xsignal1 (Qbuffer_read_only, Fcurrent_buffer ());
+
          i = next_interval (i);
        }
       /* Keep going thru the interval containing the char before END.  */
@@ -2369,8 +2356,7 @@ inherits it if NONSTICKINESS is nil.  The `front-sticky' and
   /* Text properties `syntax-table'and `display' should be nonsticky
      by default.  */
   Vtext_property_default_nonsticky
-    = list2 (Fcons (intern_c_string ("syntax-table"), Qt),
-            Fcons (intern_c_string ("display"), Qt));
+    = list2 (Fcons (Qsyntax_table, Qt), Fcons (Qdisplay, Qt));
 
   staticpro (&interval_insert_behind_hooks);
   staticpro (&interval_insert_in_front_hooks);
@@ -2378,7 +2364,7 @@ inherits it if NONSTICKINESS is nil.  The `front-sticky' and
   interval_insert_in_front_hooks = Qnil;
 
 
-  /* Common attributes one might give text */
+  /* Common attributes one might give text */
 
   DEFSYM (Qforeground, "foreground");
   DEFSYM (Qbackground, "background");
@@ -2396,7 +2382,7 @@ inherits it if NONSTICKINESS is nil.  The `front-sticky' and
   DEFSYM (Qmouse_face, "mouse-face");
   DEFSYM (Qminibuffer_prompt, "minibuffer-prompt");
 
-  /* Properties that text might use to specify certain actions */
+  /* Properties that text might use to specify certain actions */
 
   DEFSYM (Qmouse_left, "mouse-left");
   DEFSYM (Qmouse_entered, "mouse-entered");