[Top][All Lists]

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

RE: set-text-properties, remove-set-properties, add-text-properties: 1)

From: Drew Adams
Subject: RE: set-text-properties, remove-set-properties, add-text-properties: 1) doc string 2) return value
Date: Thu, 29 Dec 2005 08:03:39 -0800

    >> 2. Wouldn't it be more useful for set-text-properties,
    >> remove-set-properties, and add-text-properties to return the modified
    >> OBJECT (or nil if no modification occurred)? In case OBJECT
    >> is a buffer (or nil), the modified buffer substring could be
    > Why would that be useful?

    Even if it was useful in some cases, it would be extremely
    wasteful in general.

I believe you, but could you explain why, so I can learn? I don't know much
about how C interfaces with Lisp. Is it because a new OBJECT would in fact
need to be created? I was thinking that the operation could just return (the
equivalent of) a pointer to the original OBJECT. IOW, where is the waste?

I guess, in the case of a buffer, a new string would need to be created. Is
that what you meant, or is there also a problem when the OBJECT (string)
argument is explicitly supplied?

reply via email to

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