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: (fn ...) - please fill it at the point of generation Date: Sat, 29 Dec 2007 16:04:22 -0800 Message-ID: References: <87y7bdp0ep.fsf@ambire.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1198973066 24536 80.91.229.12 (30 Dec 2007 00:04:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Dec 2007 00:04:26 +0000 (UTC) To: "Thien-Thi Nguyen" , Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 30 01:04:41 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J8lfU-0006sX-Bw for ged-emacs-devel@m.gmane.org; Sun, 30 Dec 2007 01:04:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J8lf9-0003A9-3Q for ged-emacs-devel@m.gmane.org; Sat, 29 Dec 2007 19:04:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J8lf3-00035U-UV for emacs-devel@gnu.org; Sat, 29 Dec 2007 19:04:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J8lf3-00033h-11 for emacs-devel@gnu.org; Sat, 29 Dec 2007 19:04:13 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J8lf2-00033V-Se for emacs-devel@gnu.org; Sat, 29 Dec 2007 19:04:12 -0500 Original-Received: from rgminet01.oracle.com ([148.87.113.118]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1J8lf2-000521-9W for emacs-devel@gnu.org; Sat, 29 Dec 2007 19:04:12 -0500 Original-Received: from agmgw2.us.oracle.com (agmgw2.us.oracle.com [152.68.180.213]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id lBU049fi003252; Sat, 29 Dec 2007 17:04:10 -0700 Original-Received: from acsmt350.oracle.com (acsmt350.oracle.com [141.146.40.150]) by agmgw2.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id lBTNjw14011982; Sat, 29 Dec 2007 17:04:09 -0700 Original-Received: from dhcp-amer-csvpn-gw1-141-144-64-21.vpn.oracle.com by acsmt351.oracle.com with ESMTP id 3469098951198973047; Sat, 29 Dec 2007 16:04:07 -0800 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal In-Reply-To: <87y7bdp0ep.fsf@ambire.localdomain> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:85646 Archived-At: > If that is the intention, then, yes, it should be not only > semantically but also practically distinguished from the rest > of the string (which is presentation-ready). IOW, we should > have separate retrieval functions for the doc string per se and > the interface spec (signature). > > what you seek has been done, just not where you seek it. the > function `documentation' is called by others that make this > distinction. why don't you look at using those, instead? I see, thank you. `help-split-fundoc' was apparently added in Emacs 22. I can use that. I did not find any "others", but that one seems to work OK. It's not foolproof (just matches "(fn ...)"), but if it's good enough for `describe-function' then I guess it's good enough for me. It makes the distinction you speak of only after the fact, however - it digs out the signature (fn ...) after it was already embedded in the doc string. I still say that it would be better to keep them separate and then put them together when needed, instead of having to parse the combination like that. And no, a string is not a good representation of a data structure with two components. I agree that it can be better to have a single data structure for this, with two components (doc and signature), but a string is not a good choice for such a structure. Oh well, sometimes Moh must go to the Mountain. In any case, thank you for pointing me toward `help-split-fundoc'. I wasn't aware of it.