bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#26291: In mode-line-format, `:propertize' drops some existing text p


From: Eli Zaretskii
Subject: bug#26291: In mode-line-format, `:propertize' drops some existing text properties
Date: Wed, 29 Mar 2017 17:28:34 +0300

> From: Clément Pit-Claudel <address@hidden>
> Date: Tue, 28 Mar 2017 19:42:02 -0400
> 
> (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?

Which docs were you reading that led you to believe the above should
work?

(And btw, why did you use backticks here?  I don't think they are
needed in this case.)





reply via email to

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