Package: gtk

Function gtk-text-buffer-deserialize-can-create-tags

Lambda List

gtk-text-buffer-deserialize-can-create-tags (buffer format)

Syntax

(gtk-text-buffer-deserialize-can-create-tags buffer format) => create
(setf (gtk-text-buffer-deserialize-can-create-tags buffer format) create)

Arguments

buffer -- a gtk-text-buffer object
format -- a gdk-atom as a string representing a registered rich text format
create -- a boolean whether deserializing this format may create tags

Details

Use this function to allow a rich text deserialization function to create new tags in the receiving text buffer. Note that using this function is almost always a bad idea, because the rich text functions you register should know how to map the rich text format they handle to your text buffers set of tags.

The ability of creating new tags in the receiving text buffer is meant for special rich text formats like the internal one that is registered using the gtk-text-buffer-register-deserialize-tagset function, because that format is essentially a dump of the internal structure of the source buffer, including its tag names.

You should allow creation of tags only if you know what you are doing, e.g. if you defined a tagset name for your application text buffers and you know that it is fine to receive new tags from these buffers, because you know that your application can handle the newly created tags.
 

See also

2021-11-16