From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: how to retrieve doc string for a face... Date: Sun, 20 Nov 2005 18:23:43 -0500 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1132529437 11878 80.91.229.2 (20 Nov 2005 23:30:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 20 Nov 2005 23:30:37 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 21 00:30:35 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Edyck-0000fp-Rm for ged-emacs-devel@m.gmane.org; Mon, 21 Nov 2005 00:29:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Edyck-00043a-7E for ged-emacs-devel@m.gmane.org; Sun, 20 Nov 2005 18:29:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EdyXA-00087l-Kw for emacs-devel@gnu.org; Sun, 20 Nov 2005 18:23:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EdyX9-000878-U9 for emacs-devel@gnu.org; Sun, 20 Nov 2005 18:23:44 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EdyX9-00086x-Og for emacs-devel@gnu.org; Sun, 20 Nov 2005 18:23:43 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EdyX9-0001mv-Qs for emacs-devel@gnu.org; Sun, 20 Nov 2005 18:23:43 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1EdyX9-0001y1-4L; Sun, 20 Nov 2005 18:23:43 -0500 Original-To: "Drew Adams" In-reply-to: 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:46379 Archived-At: It says nothing about retrieving the doc string supplied with `defface' or `defgroup' or `defmacro' or .... 1. How are those doc strings retrieved? (e.g. `face-documentation') 2. Shouldn't that retrieval be documented too? I will doc these. 3. Info mentions the `function-documentation' property, in parallel with the `variable-documentation' property. Is there no equivalent shortcut to `documentation-property' for retrieving the doc string of a keyboard macro, so that you must use `get'? As far as I know, the only way a keyboard macro can have a doc string is if it has a function name and that symbol has a `function-documentation' property. Is that correct? *** help.texi 11 Aug 2005 08:30:32 -0400 1.25 --- help.texi 20 Nov 2005 17:28:19 -0500 *************** *** 133,143 **** --- 133,149 ---- (symbol-plist 'command-line-processed) @result{} (variable-documentation 188902) @end group + @group + (documentation-property 'emacs 'group-documentation) + @result{} "Customization of the One True Editor." + @end group @end smallexample @end defun @defun documentation function &optional verbatim This function returns the documentation string of @var{function}. + @code{documentation} handles macros, named keyboard macros, and + special forms, as well as ordinary functions. If @var{function} is a symbol, this function first looks for the @code{function-documentation} property of that symbol; if that has a *************** *** 155,160 **** --- 161,171 ---- if @var{function} has no function definition. However, it is OK if the function definition has no documentation string. In that case, @code{documentation} returns @code{nil}. + @end defun + + @defun face-documentation face + This function returns the documentation string of @var{face} as a + face. @end defun @c Wordy to prevent overfull hboxes. --rjc 15mar92 This business of retrieving doc strings doesn't seem very homogeneous - it seems ad hoc. Shouldn't there be a simple, single way to get the doc string(s) of an object? No. I don't want to make changes in Emacs just to for the sake of increased consistency in fairly minor areas like this one.