[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: question concerning overlay before-strings and property inheritance
From: |
Eli Zaretskii |
Subject: |
Re: question concerning overlay before-strings and property inheritance |
Date: |
Tue, 26 Apr 2011 00:31:21 +0300 |
> From: az <ujfubvur@gmail.com>
> Date: Mon, 25 Apr 2011 20:34:54 +0000 (UTC)
>
> (save-excursion
> (goto-char 1)
> (insert ";; String\n")
> (let ((o (make-overlay 6 7))
> (o2 (make-overlay 4 8)))
> (overlay-put o 'before-string "FOO")
> (overlay-put o2 'face 'highlight)))
>
> As you can see, the before-string "FOO" doesn't inherit any
> highlighting from the second overlay. Is it possible to set up
> the overlays up so that the before-string inherits the face
> property from the second overlay?
Why should the before-string "inherit" from o2? If we were to
introduce such "inheritance", how would Emacs determine from which
overlay to "inherit"?