From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.user Subject: [ANN] scheme-texi minor mode for emacs Date: Sun, 13 Aug 2023 19:48:58 -0700 Message-ID: <03938f21-c902-1234-f4f2-161d4c1e4001@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13081"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 To: Guile User Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Mon Aug 14 04:49:30 2023 Return-path: Envelope-to: guile-user@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 1qVNe6-0003Gc-9V for guile-user@m.gmane-mx.org; Mon, 14 Aug 2023 04:49:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qVNdk-0007CE-R1; Sun, 13 Aug 2023 22:49:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVNdi-0007Bf-B8 for guile-user@gnu.org; Sun, 13 Aug 2023 22:49:06 -0400 Original-Received: from mail-oi1-x22c.google.com ([2607:f8b0:4864:20::22c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qVNdg-0000A2-9v for guile-user@gnu.org; Sun, 13 Aug 2023 22:49:05 -0400 Original-Received: by mail-oi1-x22c.google.com with SMTP id 5614622812f47-3a7d7de894bso2661423b6e.3 for ; Sun, 13 Aug 2023 19:49:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691981341; x=1692586141; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=r4g/hjYjthCtSU1018p/FQqpo3Sb4ObYye626fzzlHA=; b=l6EIqLf5VRJkhDVI6zata+kXcNXbukqMqqpi1GOy2Wo07itV3QYALuZR+PvBU2W90P /Rc+tdwP7dkdJNVYohqce/Z6z8stFQW0ub56HBjGPyuhthbIJpGoY4gYfFx1Igi5pCF7 Va9wxXAHHD6B2ZwnhUVqnSyAU/1tGfyEzF99TzYlex24xlaNVobM/a5QuJPrFHtp3meJ vwRpBFOEsoYz77+rxVUNJKt0BLI9WTjAHp/oU7QpHQz3YLHEB0rCq4D1QOfajyL5uYmz s0kcv1cO+A0CcAkM/LEgVLgIU7QX7d27J0MVv0TKZHcQffhrLYUApJqG3EVHkxeTcxBn ygxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691981341; x=1692586141; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=r4g/hjYjthCtSU1018p/FQqpo3Sb4ObYye626fzzlHA=; b=HcbUSsGHgvIctwS/KkCk+2WwszEFfLTF8bsCumz7/q7YiEiZBO1pK+g6nhw0JViKeF 9Y9MwWOPHXIN6xXA9H+m7kjfLNPCMQkA7BNmA8lvk3RJuy+ZGp7Eg7INDpXunbfIfum5 Tu5fesQmjeejNyo/9AEurCbUwaNM4lZFiEXRjNDK9U+VzBXwO4IAyv0UvcweSUOXr/3q VT1U845iMrfj6cC8Hvd92jCH6hMwT/Du2hieDhskPXKu8Lb7VHJay4Ha6OzgnvekNqaA WeWXLrNTmMrcvGfVO6KnlqAcBbBmsosb+kB3kxfQ9M3kM3tZ/6pnIsxTEIr96Rcenw4R +7aA== X-Gm-Message-State: AOJu0Yx+C/0RhmF/v+UgjOkPmBrNmWPh1ppIRiQBOxaSLF1AgBNHzYya XHIJY2u+ilwkot1IsNPMmkZDNqnkyow= X-Google-Smtp-Source: AGHT+IF+CckodFzxiRFWILVlm8xss+Ij0wIqSqyOMXiSCvbW0E9ouCAM+8KYRW8A1hAd8Rm8Whepkg== X-Received: by 2002:a05:6808:1a0f:b0:3a5:98b4:c137 with SMTP id bk15-20020a0568081a0f00b003a598b4c137mr10041073oib.51.1691981340825; Sun, 13 Aug 2023 19:49:00 -0700 (PDT) Original-Received: from [192.168.2.155] (64-52-138-37.championbroadband.com. [64.52.138.37]) by smtp.gmail.com with ESMTPSA id bj32-20020a05680819a000b003a43759b9cdsm4086431oib.29.2023.08.13.19.48.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 13 Aug 2023 19:49:00 -0700 (PDT) Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::22c; envelope-from=matt.wette@gmail.com; helo=mail-oi1-x22c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19160 Archived-At: Hi All, I have created a minor mode for emacs that generates docstrings for procedures from comments provided in the code.   I announced this a few years ago, but the version released then was not very robust.   I have reworked this and it is more robust.   (It probably needs graceful failure still.) The code is available in my guile-contrib repo on github: https://github.com/mwette/guile-contrib The path to the file is here: https://github.com/mwette/guile-contrib/blob/main/scheme-texidoc.el What the file does is turn this: ;; @deffn {Scheme} foo a b c ;; This function is pretty silly.  Given @var{a}, @var{b} @var{c} ;; return the sum plus 3. ;; @example ;; > (foo 4 5 6) ;; $1 = 18 ;; @end example ;; @end deffn (define (foo a b c)   (let ((x 1)         (y 2))     (+ x y a b c))) into ;; @deffn {Scheme} foo a b c ;; This function is pretty silly.  Given @var{a}, @var{b} @var{c} ;; return the sum plus 3. ;; @example ;; > (foo 4 5 6) ;; $1 = 18 ;; @end example ;; @end deffn (define (foo a b c)   "- Scheme: foo a b c      This function is pretty silly.  Given A, B C return the sum plus 3.           > (foo 4 5 6)           $1 = 18"   (let ((x 1)         (y 2))     (+ x y a b c))) All it takes is to have point in the body of the code or the comments, and then hit Cx-td. If there is already an old docstring, it will replace it. Similarly ;; @deffn {Scheme} bar a b c ;; This function is pretty silly.  Given @var{a}, @var{b} @var{c} ;; return the sum plus 3. ;; @example ;; > (bar 4 5 6) ;; $1 = 18 ;; @end example ;; @end deffn (define bar   (lambda (a b c)     (let ((x 1)           (y 2))       (+ x y a b c)))) ;; @deffn {Scheme} baz a b c ;; This function is pretty silly.  Given @var{a}, @var{b} @var{c} ;; return the sum plus 3. ;; @example ;; > (baz 4 5 6) ;; $1 = 18 ;; @end example ;; @end deffn (define foo   (let ((x 1) (y 2))     (lambda (a b c)       (+ x y a b c)))) turns into ;; @deffn {Scheme} bar a b c ;; This function is pretty silly.  Given @var{a}, @var{b} @var{c} ;; return the sum plus 3. ;; @example ;; > (bar 4 5 6) ;; $1 = 18 ;; @end example ;; @end deffn (define bar   (lambda (a b c)     "- Scheme: bar a b c      This function is pretty silly.  Given A, B C return the sum plus 3.           > (bar 4 5 6)           $1 = 18"     (let ((x 1)           (y 2))       (+ x y a b c)))) ;; @deffn {Scheme} baz a b c ;; This function is pretty silly.  Given @var{a}, @var{b} @var{c} ;; return the sum plus 3. ;; @example ;; > (baz 4 5 6) ;; $1 = 18 ;; @end example ;; @end deffn (define foo   (let ((x 1) (y 2))     (lambda (a b c)       "- Scheme: baz a b c      This function is pretty silly.  Given A, B C return the sum plus 3.           > (baz 4 5 6)           $1 = 18"       (+ x y a b c)))) ` Matt