Hi,

I’m interested in how is text properties stored in a string/buffer. From what I see (printing propertzied string and try reading textprop.c), it seems that they are stored in ranges. Is that true?

If that’s the case, I have two more questions:

1. How is it implemented? I.e., is it like (very roughly):

struct string {
  char* string;
  property* properties;
};

struct property {
  int beg;
  int end;
  Lisp_Object* plist;
}

?

2. In my naive minds, if the text properties are implemented like this, every time when the user insert something in to a buffer/string, all the properties after the point of insert has to adjust their position (like overlays). That’s probably not the case since text property is supposed to be more efficient than overlays. So how does it work?

Sincerely, Yuan