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: Wed, 28 Dec 2005 20:15:02 -0800 Message-ID: References: <87oe307fuq.fsf-monnier+emacs@gnu.org> 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 1135829735 20149 80.91.229.2 (29 Dec 2005 04:15:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Dec 2005 04:15:35 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 29 05:15:33 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 1ErpCH-0004Ez-6g for ged-emacs-devel@m.gmane.org; Thu, 29 Dec 2005 05:15:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ErpDc-00010e-2W for ged-emacs-devel@m.gmane.org; Wed, 28 Dec 2005 23:16:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ErpDR-0000xP-Et for emacs-devel@gnu.org; Wed, 28 Dec 2005 23:16:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ErpDP-0000vR-NV for emacs-devel@gnu.org; Wed, 28 Dec 2005 23:16:37 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ErpDP-0000vD-H6 for emacs-devel@gnu.org; Wed, 28 Dec 2005 23:16:35 -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 1ErpDh-0005X2-2G for emacs-devel@gnu.org; Wed, 28 Dec 2005 23:16:53 -0500 Original-Received: from rgmsgw300.us.oracle.com (rgmsgw300.us.oracle.com [138.1.186.49]) by agminet01.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id jBT4FAaI027256 for ; Wed, 28 Dec 2005 22:15:10 -0600 Original-Received: from rgmsgw300.us.oracle.com (localhost [127.0.0.1]) by rgmsgw300.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id jBT4F9Ia011365 for ; Wed, 28 Dec 2005 21:15:09 -0700 Original-Received: from dradamslap (dhcp-amer-rmdc-csvpn-gw6-141-144-112-189.vpn.oracle.com [141.144.112.189]) by rgmsgw300.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id jBT4F9O9011344 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Wed, 28 Dec 2005 21:15:09 -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: <87oe307fuq.fsf-monnier+emacs@gnu.org> 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:48476 Archived-At: > 1. The set-text-properties doc string should say what the > function returns. Why? I should have said, "Does the value of set-text-properties change, or is it always the same? If it changes, then the value is significant and it should be documented." > 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? Why is it useful for `push' and `pop' to return values that correspond to the updated list and the removed car? It would be convenient to say (setq foo (or (remove-text-properties start end props toto) ...)) Of course, you can always write (setq foo (if (remove-text-properties start end props toto) toto ...)) As for `push' and `pop' and many other "functions", returning a richer value offers only a slight convenience, but why not?