From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: Keywords in GOOPS methods Date: Thu, 21 Nov 2024 23:00:45 +0100 Organization: AvatarAcademy.nl Message-ID: <87iksg2qnm.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11950"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: guile-devel , Ludovic =?utf-8?Q?Court=C3=A8s?= , guile-user , Andy Wingo To: Mikael Djurfeldt Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Thu Nov 21 23:01:23 2024 Return-path: Envelope-to: guile-devel@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 1tEFEp-0002xX-2P for guile-devel@m.gmane-mx.org; Thu, 21 Nov 2024 23:01:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tEFEN-0000UF-C2; Thu, 21 Nov 2024 17:00:55 -0500 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 1tEFEK-0000TW-Hh; Thu, 21 Nov 2024 17:00:52 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tEFEJ-0002fP-9R; Thu, 21 Nov 2024 17:00:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=eTSbbeGz0mEhRmyJHEM3sUmP1DzF38Ss5E3tnhrmf6k=; b=DGYm0TcY0i9uOzTIWOQE HQjD1XbCES6O5171yDmX7IcH3Mq/tjstgdSaUS/0zgLhkvjhMtpo7xuZ1asnKRC67x9rmGZL8jN+b 2WA+WlaEbT/L/bfp9FiU/Uo8u2IpE/jkrImANE6Yt1pf2ojLYQQaROBtZXwQssMOctlN+dNFdxu9z e4D8gVluGt/YlODncE0EixhrDYFCq4zc5SplQmb26xiBXNtg/Ky3V4mOiTYTMDN+lt9vu19mrEMpq aobbXWj2FjxbDKUQOjE45gl7S5TnFmGhq6E5cw51MntlB3+2r06LdsmQBANAFhet3kriC6ijzcrQM 1mYeXgzCiw6L/A==; In-Reply-To: (Mikael Djurfeldt's message of "Thu, 21 Nov 2024 21:33:09 +0100") X-Url: http://AvatarAcademy.nl X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:22782 gmane.lisp.guile.user:19909 Archived-At: --=-=-= Content-Type: text/plain Mikael Djurfeldt writes: Hi Mikael, > Since there are no comments, I'm inclined to apply this patch. I will do > that on Sunday if there are no comments before that. Just FYI, have you seen the attached patch by Mark Weaver? I've been carrying that for some time now, functionality like this is very welcome. Greetings, Janneke --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-Add-define-method-for-GOOPS.patch Content-Transfer-Encoding: quoted-printable >From f4d73b5590cd2e6ff30341aa824a3f1005b50220 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Fri, 15 Apr 2022 11:11:16 +0200 Subject: [PATCH] Add define-method* for GOOPS. Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=3DUTF-8 * dzn/define-method-star.scm: New file. * dzn/local.mk (dist_%C%_scm_DATA): Add it. --- dzn/define-method-star.scm | 40 ++++++++++++++++++++++++++++++++++++++ dzn/local.mk | 1 + 2 files changed, 41 insertions(+) create mode 100644 dzn/define-method-star.scm diff --git a/dzn/define-method-star.scm b/dzn/define-method-star.scm new file mode 100644 index 0000000000..a958907e35 --- /dev/null +++ b/dzn/define-method-star.scm @@ -0,0 +1,40 @@ +;;; Dezyne --- Dezyne command line tools +;;; +;;; Copyright =C2=A9 2015 Mark H Weaver +;;; +;;; This file is part of Dezyne. +;;; +;;; Dezyne is free software: you can redistribute it and/or modify it +;;; under the terms of the GNU Affero General Public License as +;;; published by the Free Software Foundation, either version 3 of the +;;; License, or (at your option) any later version. +;;; +;;; Dezyne is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; Affero General Public License for more details. +;;; +;;; You should have received a copy of the GNU Affero General Public +;;; License along with Dezyne. If not, see . +;;; +;;; Commentary: +;;; +;;; Code: + +(define-module (8sync define-method-star) + #:use-module (oop goops) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-11) + #:export (define-method*)) + +(define-syntax define-method* + (lambda (x) + (syntax-case x () + ((_ (generic arg-spec ... . tail) body ...) + (let-values (((required-arg-specs other-arg-specs) + (break (compose keyword? syntax->datum) + #'(arg-spec ...)))) + #`(define-method (generic #,@required-arg-specs . rest) + (apply (lambda* (#,@other-arg-specs . tail) + body ...) + rest))))))) diff --git a/dzn/local.mk b/dzn/local.mk index a6cef16408..99d84ae105 100644 --- a/dzn/local.mk +++ b/dzn/local.mk @@ -29,6 +29,7 @@ dist_%C%_scm_DATA =3D \ %D%/code.scm \ %D%/code-util.scm \ %D%/command-line.scm \ + %D%/define-method-star.scm \ %D%/display.scm \ %D%/explore.scm \ %D%/goops.scm \ --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com --=-=-=--