all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* add-face-text-property destructively modified properties
@ 2019-10-09 18:14 Lars Ingebrigtsen
  2019-10-09 21:45 ` Stefan Monnier
  2019-10-10  6:51 ` Eli Zaretskii
  0 siblings, 2 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-09 18:14 UTC (permalink / raw)
  To: emacs-devel

Up until yesterday, using this function on copies of strings would
modify the original string:

(progn
  (setq str1 (propertize "foo" 'face '(underline highlight)))
  (setq str2 (concat str1))
  (add-face-text-property 0 3 'foobar t str2)
  (pp str1 (current-buffer)))
->

#("foo" 0 3
  (face
   (underline highlight foobar)))

This didn't seem right to me, so I modified it to not do that, but only
modify str2 when I told it to modify str2.

Eli wanted comments about whether anybody thinks this is a surprising
change.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




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

end of thread, other threads:[~2019-10-13 14:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-09 18:14 add-face-text-property destructively modified properties Lars Ingebrigtsen
2019-10-09 21:45 ` Stefan Monnier
2019-10-11  7:57   ` Lars Ingebrigtsen
2019-10-11 13:25     ` Stefan Monnier
2019-10-12 21:32       ` Lars Ingebrigtsen
2019-10-13 14:31         ` Stefan Monnier
2019-10-10  6:51 ` Eli Zaretskii
2019-10-10 12:56   ` Stefan Monnier

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.