From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Defun Self Documentation Date: Thu, 5 Nov 2020 08:07:28 -0800 (PST) Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14964"; mail-complaints-to="usenet@ciao.gmane.io" To: Christopher Dimech , Help Gnu Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 05 17:08:09 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kaho1-0003ou-8k for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 05 Nov 2020 17:08:09 +0100 Original-Received: from localhost ([::1]:39150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaho0-0001HL-BK for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 05 Nov 2020 11:08:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kahna-0001Gz-9d for help-gnu-emacs@gnu.org; Thu, 05 Nov 2020 11:07:42 -0500 Original-Received: from aserp2130.oracle.com ([141.146.126.79]:44066) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kahnX-0005ad-0I for help-gnu-emacs@gnu.org; Thu, 05 Nov 2020 11:07:41 -0500 Original-Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0A5Frdqj138166; Thu, 5 Nov 2020 16:07:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=wlL5ORwr/+mY1fvmcOmPXdPX8zKPQxuHtSLljiuo024=; b=vXMiz03Pajkz665f42nBSddU7MyIYuXqe1h33kUYYJqBscocdnMuilsQ9Gr8J+zN06ma Saz7xPoYeGOMsmtjswT60xGWdzdZdaCx/dZ6YotZ7lKmYPCL1/o0piLTa18DcwXX087F y2oXI3ZMfI3S5UKkQbbb9dYDBjI609sVA+0zq2V8lxbknAHO+Cky3a456NfIInr1He57 X0vkRVdvjARSxtirEfhvZG5+xp7q8BsDAJIQ7Ry8rktmg7OYR/g0D1BTMvKu0Y/7/pVr gttRfLZW4TOtgFEutSeA0yTMz/8ktfOc/7f3UlZMeFPMoYZoLXGNpfai6ALxw5XcdcZj fQ== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 34hhb2cnhd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 05 Nov 2020 16:07:31 +0000 Original-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0A5Fon0F187134; Thu, 5 Nov 2020 16:07:31 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3020.oracle.com with ESMTP id 34hw0hm8rr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 05 Nov 2020 16:07:30 +0000 Original-Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0A5G7ToL008026; Thu, 5 Nov 2020 16:07:29 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5056.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9795 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 spamscore=0 malwarescore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011050107 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9795 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 phishscore=0 suspectscore=0 clxscore=1015 mlxlogscore=999 impostorscore=0 malwarescore=0 lowpriorityscore=0 adultscore=0 spamscore=0 priorityscore=1501 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011050107 Received-SPF: pass client-ip=141.146.126.79; envelope-from=drew.adams@oracle.com; helo=aserp2130.oracle.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/05 10:19:10 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:125022 Archived-At: > When using defun, can one include a Self Documenting string or is > Self-Documentation only applicable for interactive functions? >=20 > (defun Gdn () > "Description" > Body ... > ) Ask Emacs: `C-h f defun'. ,---- | defun is a Lisp macro in =E2=80=98byte-run.el=E2=80=99. |=20 | (defun NAME ARGLIST &optional DOCSTRING DECL &rest BODY) ^^^^^^^^^ |=20 | Define NAME as a function. | The definition is (lambda ARGLIST [DOCSTRING] BODY...). | See also the function =E2=80=98interactive=E2=80=99. | DECL is a declaration, optional, of the form (declare DECLS...) where | DECLS is a list of elements of the form (PROP . VALUES). These are | interpreted according to =E2=80=98defun-declarations-alist=E2=80=99. | The return value is undefined. `---- That doesn't explicitly tell you that DOCSTRING is the doc string _for the function_ you're defining, but one might guess that. 1. `C-h i m elisp', to visit the Elisp manual. 2. `i defun', to go to the doc about `defun'. There you see this, about the optional doc-string arg: DOC, if present, should be a string specifying the function=E2=80=99s ^^^^^^^^^^^^^^ documentation string (*note Function Documentation::). ___ Ask Emacs.