From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel 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 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1135874150 27459 80.91.229.2 (29 Dec 2005 16:35:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Dec 2005 16:35:50 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 29 17:35:44 2005 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Es0kg-0007zL-5X for ged-emacs-devel@m.gmane.org; Thu, 29 Dec 2005 17:35:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Es0lz-0007U0-GQ for ged-emacs-devel@m.gmane.org; Thu, 29 Dec 2005 11:37:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Es0HL-0006NL-T6 for emacs-devel@gnu.org; Thu, 29 Dec 2005 11:05:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Es0HG-0006Mq-3r for emacs-devel@gnu.org; Thu, 29 Dec 2005 11:05:19 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Es0HF-0006MZ-3g for emacs-devel@gnu.org; Thu, 29 Dec 2005 11:05:17 -0500 Original-Received: from [141.146.126.228] (helo=agminet01.oracle.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1Es0Hb-0000pa-SK for emacs-devel@gnu.org; Thu, 29 Dec 2005 11:05:40 -0500 Original-Received: from rgmsgw301.us.oracle.com (rgmsgw301.us.oracle.com [138.1.186.50]) by agminet01.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id jBTG3nOD028163 for ; Thu, 29 Dec 2005 10:03:50 -0600 Original-Received: from rgmsgw301.us.oracle.com (localhost [127.0.0.1]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id jBTG3nH6020334 for ; Thu, 29 Dec 2005 09:03:49 -0700 Original-Received: from dradamslap (dhcp-amer-rmdc-csvpn-gw6-141-144-112-189.vpn.oracle.com [141.144.112.189]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id jBTG3miA020326 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Thu, 29 Dec 2005 09:03:48 -0700 Original-To: "Emacs-Devel" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:48493 Archived-At: >> 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?