[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How is text properties stored?

From: Yuan Fu
Subject: How is text properties stored?
Date: Wed, 8 May 2019 17:08:06 -0400


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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]