From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: set-text-properties, remove-set-properties, add-text-properties: 1) doc string 2) return value
Date: Thu, 29 Dec 2005 12:41:14 -0700 [thread overview]
Message-ID: <dp1e4t$5me$2@sea.gmane.org> (raw)
In-Reply-To: <DNEMKBNJBGPAOPIJOOICAEODDAAA.drew.adams@oracle.com>
Drew Adams wrote:
> >> 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
> returned.
> >
> > 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?
Exactly. I think it should just return OBJECT, whether that is a buffer
(or the current buffer, when nil) or a string.
--
Kevin Rodgers
next prev parent reply other threads:[~2005-12-29 19:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-28 21:59 set-text-properties, remove-set-properties, add-text-properties: 1) doc string 2) return value Drew Adams
2005-12-29 3:18 ` Stefan Monnier
2005-12-29 4:15 ` Drew Adams
2005-12-30 2:18 ` Richard M. Stallman
2005-12-30 3:47 ` Luc Teirlinck
2005-12-30 3:57 ` Luc Teirlinck
2005-12-30 11:24 ` David Kastrup
2005-12-29 11:10 ` Kim F. Storm
2005-12-29 16:03 ` Drew Adams
2005-12-29 19:41 ` Kevin Rodgers [this message]
2005-12-30 0:57 ` Juri Linkov
2006-02-18 19:37 ` Drew Adams
2006-02-19 15:14 ` Stefan Monnier
2005-12-29 22:41 ` Kim F. Storm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='dp1e4t$5me$2@sea.gmane.org' \
--to=ihs_4664@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.