/* 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.
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
{
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. */
}
}
+ 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. */
/* 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);
interval_insert_in_front_hooks = Qnil;
- /* Common attributes one might give text */
+ /* Common attributes one might give text. */
DEFSYM (Qforeground, "foreground");
DEFSYM (Qbackground, "background");
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");