[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#28595: In mode-line-format, `:propertize' drops some existing text p
From: |
Eli Zaretskii |
Subject: |
bug#28595: In mode-line-format, `:propertize' drops some existing text properties |
Date: |
Mon, 25 Sep 2017 19:52:57 +0100 |
User-agent: |
K-9 Mail for Android |
On September 24, 2017 2:03:02 PM GMT+01:00, "Clément Pit--Claudel"
<clement.pitclaudel@live.com> wrote:
> Hi all,
>
> Based on the docs, the three following forms should yield the same
> results:
>
> (format-mode-line `(:propertize #("AB" 1 2 (x 0)) y 0))
> (format-mode-line `(:propertize ("A" #("B" 0 1 (x 0))) y 0))
> (format-mode-line '(:propertize ("A" (:propertize "B" x 0)) y 0))
>
> But they don't:
>
> (format-mode-line `(:propertize #("AB" 1 2 (x 0)) y 0))
> => #("AB" 0 2 (y 0)) ;; x 0 is dropped
>
> (format-mode-line '(:propertize ("A" (:propertize "B" x 0)) y 0))
> ⇒ #("AB" 0 1 (y 0) 1 2 (x 0)) ;; y 0 is dropped on 1..2
>
> (format-mode-line `(:propertize ("A" #("B" 0 1 (x 0))) y 0))
> ⇒ #("AB" 0 1 (y 0) 1 2 (y 0 x 0)) ;; Seems right
>
> Am I misreading the docs?
> Clément.
You already asked the same in bug#26291.