unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#65105: Reusing the same string as 'display on consecutive characters evades display
@ 2023-08-05 18:35 JD Smith
  2023-08-05 19:03 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: JD Smith @ 2023-08-05 18:35 UTC (permalink / raw)
  To: 65105

Evaluate:

(let ((s1 "test1")
      (s2 "test2"))
  (insert "\n"
          (propertize " " 'display s1)
          (propertize " " 'display s1)
          (propertize " " 'display s2)
          (propertize " " 'display s1)))


The first space display does not take effect, since the s1 string is used for two consecutive characters.  This has a practical impact for font-lock backends that use the ‘display text-property and would like to minimize string allocation.  

Tested Emacs 27/28/29.






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

end of thread, other threads:[~2023-08-06 17:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-05 18:35 bug#65105: Reusing the same string as 'display on consecutive characters evades display JD Smith
2023-08-05 19:03 ` Eli Zaretskii
2023-08-05 20:49   ` JD Smith
2023-08-05 22:46     ` Dmitry Gutov
2023-08-05 22:49       ` JD Smith
2023-08-06  4:55         ` Eli Zaretskii
2023-08-06  4:54       ` Eli Zaretskii
2023-08-06 17:48         ` Dmitry Gutov

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).