From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: [External] : Supplying DOC string in a `defun' using `defvar' Date: Wed, 2 Jun 2021 18:14:54 +0200 Message-ID: References: <871r9ly7v3.fsf@web.de> <87r1hlw6pn.fsf@web.de> 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="10788"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 02 18:15:48 2021 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 1loTX1-0002ZV-Fm for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Jun 2021 18:15:47 +0200 Original-Received: from localhost ([::1]:57252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loTX0-00037Y-08 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Jun 2021 12:15:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loTWH-00037K-O5 for help-gnu-emacs@gnu.org; Wed, 02 Jun 2021 12:15:01 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:56723) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loTWF-0004j9-MD for help-gnu-emacs@gnu.org; Wed, 02 Jun 2021 12:15:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1622650494; bh=0c+6KKngrn7d7GgaZSPJKTG2xQnZY5xV3lSBDPkueQE=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=jfJqfqVEK2qz3UJYwWMO0kSG4oT1fmwuK8Tyt5Mt8ghUFBlJsQAYMzidXNAP1EacU YCh7XOJpNSwHVsEIm6THGj/byykHcCwKPrHWTDQxo3Pa66yiT0RwGUAKJ+TRKN2gEM IhoZlLopu9SbJURJdZbBSPXPb2ssAZK/IX37sudk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs03.server.lan [172.19.170.169]) (via HTTP); Wed, 2 Jun 2021 18:14:54 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:2Uuw7KW27Q3i3ypfpnG7g+rAW/PXx8EY3zrdMkO0X6/dPenio9/NMRNZ/wtaJK1WNnD9z At4iE/JhT2507PhrCGldFvBuh2MImJjAthDno64PjG1xSvBIW7sxlHG9MHv3bXCVx1gum5mV4B7u QQwNktabhhnPsG8HMKf9WEa4kQmCBekVul2vdJ2gKAIUYUv2HqGDZS+ibSVNaawoXG69hi+FkRAv KhFwPMWcqiYlsbkuXqx69PSo6Vh0PlpS+M1ef0MSiWzXX5x5pHDKJX0w5XMGkHqihGepBmUEiuRW +w= X-UI-Out-Filterresults: notjunk:1;V03:K0:FjSvBjn1Blc=:rEzQE4y8wKKJ3H+TYCRVUo rp2XBNTXhOSVEZGgJ7OalL4XEajEDm6Ils9CVzMHpYdCCvUX93v9DAGzTgr1N5mC5myi9Gw6V EYRhSC3k2f8zEPkDWDMKZJGfsaSY10dHXH2H3uiWmBbBKBEiCplveXmBu1CJ/GSLrTuh7Yyu6 0LeIIYq/bQ1oUAKWJGmYzGqt9xLmQN/EJK5i4HkFjeUBXVpxAxNEzi9a57eKsr9R71N46HWQB RF8teWCBPp3TAeT+eI5tTSgRbTo377Tpx6R9YMyJghsm/CwlOW9mWuJjXi1GnpzECeO0+RuM8 5n5MFfwqK+s6jjVCJoqte6z2ZaZHUM6tZIRgDFIp1ku6DZbOUaGZNdeb3Kgzc7slkV39Uy5zm O2DwZEQfOFG4irevb7lsSdjTR7ClgKtFtxGRxC+e+va/BC+BzxoGdPUKWZgHWf4ABF4g7ISJ0 CmHk1JDhHIPIDv8N9tBPmIuE+7U202r7UW4iSbJwLB2C3H5LvXJ35boq37CrUpt8FTfcfiFRG ZLMEYffaWJ+fMnazVnuAk/kPXsa0Q5IpSkwCZ5aEYZPEsjEqTSghs/SOnlFV8AnRAFFWYvyF+ 0Fso7n/FO0g/ebUitG8oY87QdyhNcXhImzlEslTH04dMsEgcc5KVAnGVxt9zSN1Rw47jnRyMp qAuNuEhIn1/w6ai0zjREkA1Sx1KXbugfPQ0qz7FEURXlERSqXegxIt0/p+pzxvx1Y4hsM5Bgz C87fDRUiBq5IeIhyFKB1gyPP0RJcuRRun5nvKxnGzJxh2DMvPhxyEoeRz0est1fSAI5vVIpM Received-SPF: pass client-ip=212.227.15.19; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=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:130506 Archived-At: > Sent: Thursday, June 03, 2021 at 3:08 AM > From: "Stefan Monnier" > To: "Christopher Dimech" > Cc: help-gnu-emacs@gnu.org > Subject: Re: [External] : Supplying DOC string in a `defun' using `defva= r' > > >> Have you tried to click on that "/d"? > > > > It introduced -*- lexical-binding: t; -*- at the top of the file > > Indeed. > > > Is that enough or would I need additional setup commands? > > Does (:documentation ) work now? > > > Stefan It does work. So now I can pass a variable as documuntation. The next thing is to first write a brief description as a normal string - as normally done with defun, then append the detail string after that. (defvar detail "this is a detailed description") (defun myfun (x) (:documentation (concat "Brief\n" detail)) (+ x 42)) This is working. Would you be satisfied with the approach?