unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#26291: In mode-line-format, `:propertize' drops some existing text properties
@ 2017-03-28 23:42 Clément Pit-Claudel
  2017-03-29 14:28 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Clément Pit-Claudel @ 2017-03-28 23:42 UTC (permalink / raw)
  To: 26291

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.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-29 14:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-28 23:42 bug#26291: In mode-line-format, `:propertize' drops some existing text properties Clément Pit-Claudel
2017-03-29 14:28 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).