From unknown Sat Aug 16 21:23:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59786: Allowing arbitrary expressions in cl-labels Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Dec 2022 19:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59786 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 59786@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16700102751927 (code B ref -1); Fri, 02 Dec 2022 19:45:01 +0000 Received: (at submit) by debbugs.gnu.org; 2 Dec 2022 19:44:35 +0000 Received: from localhost ([127.0.0.1]:48472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1Bxa-0000V1-Ko for submit@debbugs.gnu.org; Fri, 02 Dec 2022 14:44:35 -0500 Received: from lists.gnu.org ([209.51.188.17]:36754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1BxX-0000Uv-Ki for submit@debbugs.gnu.org; Fri, 02 Dec 2022 14:44:33 -0500 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 1p1BxX-00027L-5v for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2022 14:44:31 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1BxU-0003nD-JI for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2022 14:44:30 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 969C0100178 for ; Fri, 2 Dec 2022 14:44:25 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 40341100143 for ; Fri, 2 Dec 2022 14:44:23 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1670010263; bh=ygG05gcLZ+SDo7E6pzC9NP8ROSld7EA8xL1cemA/NfE=; h=From:To:Subject:Date:From; b=SPYLWX987WABGSL7zjz6c6OJ4LkAFm1kART330GTuKCVXHNrppaJQJQxF+Q79KNF8 AH6Q42uBl+dxP7wAff1jPfoAJZRyFgnd+66+SOgp2hw/fuAWI6a6Lc1akUuWPJOWSM NyheTgl73HhwAI0wG3n+zBU9Ue2NYFjJnfKl71rf/wY9W0iuetdcf++dG9w7J6MBWX m5PNwsyWebX05DLuIaU4M/Id4R4nOuw1AMzuQXDEBR4dFeeLPUatOI8LiPybLztIuj bB6MOqHTW8Y1zs7L2077cRVnZ2dyrP7yS4Ln9zJVZurSeti9qgDkphRRN3+BLnyZ6u I+N43NC+Nhdww== Received: from pastel (unknown [45.72.193.52]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 2A8D3122D8E for ; Fri, 2 Dec 2022 14:44:23 -0500 (EST) From: Stefan Monnier Date: Fri, 02 Dec 2022 14:44:13 -0500 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.311 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Tags: patch I have found some circumstances where I'd like to write things like: (cl-labels ((f1 (if blabla (lambda (x) (do one thing)) (lambda (x) (do another thing)))) (f2 (if bleble (lambda (y) (do some thing)) (lambda (y) (do some other thing))))) ...) I.e. define two, mutually-recursive functions, but where I want to perform some computation before "building/returning" each function. I could rewrite the above to (cl-labels ((f1 (x) (if blabla (do one thing) (do another thing))) (f2 (y) (if bleble (do some thing) (do some other thing)))) ...) but then the `if` tests are repeated at each call. I could also rewrite it to (letrec ((f1 (if blabla (lambda (x) (do one thing)) (lambda (x) (do another thing)))) (f2 (if bleble (lambda (y) (do some thing)) (lambda (y) (do some other thing))))) ...) but then I have to use (funcall f1 ..) and (funcall f2 ...) instead of just (f1 ...) and (f2 ...). I could add a (cl-flet ((f1 f1) (f2 f2)) ...) but that's inconvenient, especially because I'd have to add it in various places. So I'd like to propose to extend `cl-labels` in the same way that `cl-flet` was extended to allow each function to be defined by an expression that returns a function rather than by "args + body". One option is to use the same approach as I used in `cl-flet`, i.e. allow each binding to be either (FUNC ARGS BODY...) the normal existing syntax or (FUNC EXP) the new syntax After I introduced this in `cl-flet` it was pointed out that it was an incompatible change since BODY... can be the empty list. Another option is to use a syntax like: (FUNC = EXP) the new new syntax which should not suffer from such incompatibility since ARGS should never be of the form `=`. The patch below uses this "new new" syntax (and adjusts `cl-flet` to also support this new new syntax). It still lacks a NEWS entry (as well as updating the CL manual), but before I do that, I'd like to hear what other people think, Stefan In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) of 2022-11-29 built on pastel Repository revision: 4254a4a71d5d04cfcefaedfefe5d22af55650a6a Repository branch: work Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Debian GNU/Linux 11 (bullseye) Configured using: 'configure -C --enable-checking --enable-check-lisp-object-type --with-modules --with-cairo --with-tiff=ifavailable 'CFLAGS=-Wall -g3 -Og -Wno-pointer-sign' PKG_CONFIG_PATH=/home/monnier/lib/pkgconfig' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=cl-labels.patch diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 43a2ed92059..cc8c98f2264 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2028,11 +2028,11 @@ cl--labels-convert ;;;###autoload (defmacro cl-flet (bindings &rest body) "Make local function definitions. -Each definition can take the form (FUNC EXP) where +Each definition can take the form (FUNC = EXP) where FUNC is the function name, and EXP is an expression that returns the function value to which it should be bound, or it can take the more common form (FUNC ARGLIST BODY...) which is a shorthand -for (FUNC (lambda ARGLIST BODY)). +for (FUNC = (lambda ARGLIST BODY)). FUNC is defined only within FORM, not BODY, so you can't write recursive function definitions. Use `cl-labels' for that. See @@ -2055,8 +2055,12 @@ cl-flet (if (and (= (length args-and-body) 1) (symbolp (car args-and-body))) ;; Optimize (cl-flet ((fun var)) body). (setq var (car args-and-body)) - (push (list var (if (= (length args-and-body) 1) - (car args-and-body) + (push (list var (cond + ((= (length args-and-body) 1) ;Obsolete syntax. + (car args-and-body)) + ((eq '= (car args-and-body)) + (macroexp-progn (cdr args-and-body))) + (t `(cl-function (lambda . ,args-and-body)))) binds)) (push (cons (car binding) @@ -2203,12 +2207,13 @@ cl--self-tco ;;;###autoload (defmacro cl-labels (bindings &rest body) "Make local (recursive) function definitions. -+BINDINGS is a list of definitions of the form (FUNC ARGLIST BODY...) where -FUNC is the function name, ARGLIST its arguments, and BODY the -forms of the function body. FUNC is defined in any BODY, as well -as FORM, so you can write recursive and mutually recursive -function definitions. See info node `(cl) Function Bindings' for -details. +BINDINGS is a list of definitions of the form either: +- (FUNC ARGLIST BODY...) where FUNC is the function name, + ARGLIST its arguments, and BODY the forms of the function body. +- (FUNC = BODY) where BODY is an expression that evaluates to a function. +FUNC is defined in any BODY, as well as FORM, so you can write recursive +and mutually recursive function definitions. +See info node `(cl) Function Bindings' for details. \(fn ((FUNC ARGLIST BODY...) ...) FORM...)" (declare (indent 1) (debug cl-flet)) @@ -2226,17 +2231,31 @@ cl-labels (unless (assq 'function newenv) (push (cons 'function #'cl--labels-convert) newenv)) ;; Perform self-tail call elimination. - (setq binds (mapcar - (lambda (bind) - (pcase-let* - ((`(,var ,sargs . ,sbody) bind) - (`(function (lambda ,fargs . ,ebody)) - (macroexpand-all `(cl-function (lambda ,sargs . ,sbody)) - newenv)) - (`(,ofargs . ,obody) - (cl--self-tco var fargs ebody))) - `(,var (function (lambda ,ofargs . ,obody))))) - (nreverse binds))) + (setq binds + (mapcar + (lambda (bind) + (pcase-let* + ((`(,var ,sargs . ,sbody) bind)) + (list var + (named-let loop + ((mfunexp (macroexpand-all + (if (eq '= sargs) + (macroexp-progn sbody) + `(cl-function (lambda ,sargs . ,sbody))) + newenv))) + (pcase mfunexp + (`#'(lambda ,fargs . ,ebody) + `#'(lambda . ,(cl--self-tco var fargs ebody))) + (`(progn . ,exps) + `(progn ,@(butlast exps) ,(loop (car (last exps))))) + (`(let ,bindings ,exps) + `(let ,bindings + ,@(butlast exps) ,(loop (car (last exps))))) + (`(if ,exp1 ,exp2 ,exps) + `(if ,exp1 ,(loop exp2) + ,@(butlast exps) ,(loop (car (last exps))))) + (_ mfunexp)))))) + (nreverse binds))) `(letrec ,binds . ,(macroexp-unprogn (macroexpand-all --=-=-=-- From unknown Sat Aug 16 21:23:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59786: Allowing arbitrary expressions in cl-labels Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Dec 2022 20:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59786 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier , "59786@debbugs.gnu.org" <59786@debbugs.gnu.org> Received: via spool by 59786-submit@debbugs.gnu.org id=B59786.16700129813716 (code B ref 59786); Fri, 02 Dec 2022 20:30:02 +0000 Received: (at 59786) by debbugs.gnu.org; 2 Dec 2022 20:29:41 +0000 Received: from localhost ([127.0.0.1]:48706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1CfE-0000xs-Ve for submit@debbugs.gnu.org; Fri, 02 Dec 2022 15:29:41 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:61528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1CfC-0000xm-4A for 59786@debbugs.gnu.org; Fri, 02 Dec 2022 15:29:40 -0500 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2B2IMdvB027821; Fri, 2 Dec 2022 20:29:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=XlX+nVgj7ENySOgZ8J0TXM5y9a/4yu7fpsQgc59Qvnk=; b=zztorPLAR+iE4Mr6C/MmCHEZvL/DJCgrDfHiBJcrl+rsVH1kRYERW1+aaHc14j4QyNqA ODaxygpME3cNvAA2xcIkculKi62+gpHQTxHIfqP5iNyIfFWrBSoeijO8wBa0YHqjEM1z 4wzM2g3rTvs8uFyzwOJEDdQOeshBQ76/xm2SvdH2hqabvw2vGIH3etFiqG09g3OQc3IJ aVb9khjMEYcBFDarC1Pc2P5MjRT4hcdfhlvQuEufHA4422l7lGlmyMICnTj9MsogRNr/ ir43LtpJumxVZe9Z38zYTjlzX5c/eNnbKZFcmaGPL7wAYskFhmO9n8z+ukzV87JQ106C bA== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3m782j2gf3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 02 Dec 2022 20:29:37 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2B2JSY0F002774; Fri, 2 Dec 2022 20:29:35 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2174.outbound.protection.outlook.com [104.47.57.174]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3m398dh43w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 02 Dec 2022 20:29:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gJSQbkClnEsrUswRB7qpXQw/xyTLFUsGOulf3Tvd1Bblus5DtvLrLxRiZLF68Og3npHB3H1wm39noizGHoPnSnfhpErnKUnv6EcNPgecCtDLllZ7gPFAyBV1+tVDkiwwaYintCZGeR3XOuKNnOXLyPBThZJ55go6MR/tlKmju/z7HCvKqkU27dXx5zddMDJYTMBaRJGAjC7nsaZY5pqd6mBpldDYfKx1AzQcPZPBnrsHdOqWGb6lXdYi+UmFufUf3jHnWL8epY89ZzWYWa4PTRqURmHe9OkvjMz3T4P7a2gP3ggSDyd9Kbf4TpIV+H6Zopjh1hfdB8/svESyvHADdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XlX+nVgj7ENySOgZ8J0TXM5y9a/4yu7fpsQgc59Qvnk=; b=IJZc21MtAJOyZIHDU9Ze6Hpr6RGP2fzocSsrDWvCw6wRqqOXA71oVXg4E0aq9Ted6HEZwhmd6Xr4PAl8muzNwDLXb4N6ODFh+EW01gSrRYHhN2Kk0UMc8X3x75au+1LYSu4wabfyhH4vGTVPRRI5fTFDbsSZoIfqIxJs7d4/bMLjoHRGs3yqV1CIZ5AnxYIQRsg6mxKb6Bl+PNBiWNFE3YMyqxkRwofIqHkNvGbr9mSs81fgZeOh1JoQkExD12JnpsqSZSS7hwB8J9IefzZXDQdnL99KUxjyts88rFyXecT8/weitspJSdKmou/r1Ki+KKic5FzE+8LwDEQ/H2irHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XlX+nVgj7ENySOgZ8J0TXM5y9a/4yu7fpsQgc59Qvnk=; b=GY8qGqEK8VuY+Chvef2kt276Nna5dMdTO3kDqOymwo5AiW7t8G2Fr6hvfOhvbcwEm5tGGtIaXNQnLjVLwHLw0xiog9OrCbtciq2T2oQdS4nb1kyoktsSZoqAsdwld1qFDh5OXsqrqDzW27UoQsbD3Fh4cluKs2biB9oD+KAoafw= Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by SJ0PR10MB4542.namprd10.prod.outlook.com (2603:10b6:a03:2da::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.8; Fri, 2 Dec 2022 20:29:34 +0000 Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::6951:297b:f3d5:2588]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::6951:297b:f3d5:2588%9]) with mapi id 15.20.5880.008; Fri, 2 Dec 2022 20:29:33 +0000 From: Drew Adams Thread-Topic: [External] : bug#59786: Allowing arbitrary expressions in cl-labels Thread-Index: AQHZBoakAgisaWaNr0CrfbRaI7z0Iq5bCZkA Date: Fri, 2 Dec 2022 20:29:33 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|SJ0PR10MB4542:EE_ x-ms-office365-filtering-correlation-id: f20760a7-5502-4731-451b-08dad4a3ec6d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 7JtDBzRQrjsB/4q4D5WCYhWDpaPNi1yBuNY+1rAi+itKC4B2yzSqLHqk61aYlBHgJtbXhQ20RlKnzZWXAVdlND6SWS5RXfG4ulaKnsDn3Ph5WR7+UKDWCIad+LfqnQ/y9RlpIZ9CeUS3dbpyNB02jMPm8SyiSRJxlbl6vW1YnDq5Hcf7UZhS1d/VYQXlypANzd9dwlhirIJn8Zd7ug3bjIC6iIW5y9Np1PYwfMZN2eXYyH8iPVIu9v94vghA9ahH3MoymFIbYy8VU+g4HjHgWAtccz1jgXBrFjHcFGTytLaRi4d2yyDLqC0g3irh4SlgxG1DERARAQH9aD3OuC98R9x6XPlR2LrBUc7vX52m8G9g0OMZctEU+yGHT94kuvjT0sv4FaJHMEhypU3GPULhJTRqjNg7YSlQ6NGrGBg991y353dowUKZiu0TXr765LGX1oTCKwjPyu+u717OIIDGlh/dAsgO+KwgMk+JELIXGWUCHWGy8GjLl7CcqE+Gv78hy7ZnvSoyFxXi2bD96TuF71mn6w61fAdJO0mdRcPYuK7ZV+tr54fnxShW0fu/fggVfQnCUgoYpSyS4UkszPHX0HPER0E+KN6BPoon6llHz9AP77myt3yTRI33AG4SADMXE/Rls5wRHAIIKJVHAWyiQB/CaZXCghQ3pD8ztEhhzpg9Kvson2U6j/qo8FcDvF0aIwLRzLUlLy3rgCVbLrGBDg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(346002)(136003)(366004)(39860400002)(376002)(396003)(451199015)(66556008)(2906002)(41300700001)(4744005)(5660300002)(44832011)(38070700005)(122000001)(86362001)(66446008)(110136005)(66476007)(296002)(71200400001)(38100700002)(478600001)(316002)(33656002)(66946007)(8676002)(52536014)(64756008)(55016003)(76116006)(186003)(9686003)(26005)(6506007)(8936002)(7696005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: 8IFjnS0i1os+cGBhC8LHUSvv+ubcvTWTvpscnI1knLLzCTbUSUfHmr2lx0syGqztURE/A2bXbfcf4XDvRleuk4sHFjCLhCSoiKH5ujQGsYK169GH/wwuSCYNEta90qEjDlZSTmSCuQnInCjoFaqTPECee6Alz3Dd2wCkdB0+b9e5sbGZTXwhf+i+pNfp7oN+VM7pIGa/DKYxzxtZ5tiwETsMMVyu6SKbvVTmfSt7y8NQFXtPI9JD1dsuOVh1Dnk22UBJ4RuUavHNa61dATUnC8Q/o7dzs0utSbbxcfTefEnvsOUXJhMnXbMPGW0uh5T8TiohVdgiX8QG/i0w3Eqrt06f8R4+4EnTRDKDWpBcHcnXUr5CgELUybqITBatGnv1F8kITubOBPvnurIQFQTnkl4UDbINZM6Iu53rFds1bgfFgaEf/v1/yCmbvseuJ2lT2OX+E+A68+l/RnlirnI0BRyMyJvKJmLLTOAgoBuoFThhH5pHg2Qpr2zA0Y8fG3az42AtwrdxPDIXc1uq1Wbv73FHSf55dUpYNPmbNe42TMTp0/FR3A+L6E5lbJ5wqGgkZHAk4+kDyqAHTEKuP/D30hlsPFErNTCm9PHi5Nh2yIM0sTL9fwfJfmKQx7HvT8YP370zuivV6cMBRV+01jbhDBMJvrFKKqgkiI+l6yyVRAx1gGOV26D09nZfYSG95z7QK+8LgzTcUdXu4MFBK863GlvPLUUB4n8ZeqoSZHorcWOL/8mYbw3HqEMEcuRMc/EM405po6bJQbwlHgDFML5QQK9PPMcrz87xZT6xCb1YwbFKwHxu5U5rydviCNqPr13+wlqWVp3+HtS5VRrLt3ijWcVo8Ggmn0MiGK5OyAQrDq7VeDCuxKW86Z1KfbVmGhgQyWMI58Bl7fl1emFLe7s/2HY2kcjDe0Ir9g/8KJCvRX2x4DQjjqT0/uUdZ4wqlQSLX3cJrTSfSF7Z9BoOfRKl+46sqe30OGyXNwll7ZJ2//k4pBBtpKDgpSX9U/hZsYWqj4FiKogeeeJyd6EMgggLjhEQNiTUQY9HM4crd3gYlmxsMDZkkJd0UvZZwxV6GBhjdk21RRWC8BUVEbEiVxA2BKOfLPti90TPpsrwOEU2+gP4T2ZFt8nJ/ta3bXJO5HluxIrEtez3DuXbN/SuTc5jutL7Tg+fLljI09egq+wVQyfzCo8m6xH2Es0SXAyGk2koDHG+oMIqLk3gW/N0sgMPr42UZWnpjwNfIysdz0M4nkOHLC6lhGbFFcYVM7KRU2AJ0PmjKib8vle4br431QZBtI+tH5HQNHzglwOcu95ffIbCCfUBaeXYmfBdk1aqgpX5zRpDhBp3fEQ6CXw3AsD9wOHthY1vB2yE4SHA39fTH7+RDbbis+D+QC/r5h6a/enL3Y/tH4mQUezRFMiwiM74OiTZnaVyMvZpgobx+UCt9EYZVVxIOAhRIOf3Cq+S7sschuqmOCRrB/PBkg/l46hgDhP4IvNuu/EFUmWyF8rPsSLOK8s2tevGXC2TTElSbhI6zdXJzm9aRO1f8wpduIWl9jLnZ45ibHuzRD+KBCZ9S1qnVpHd4Gdh9xH971bO2Ile Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: NV3iKA+XSainmyLYdCoX+iGGRbIzWyN4zRpru53wiB0c0BluXBNP3UabatSDo6N1NzMzZVmsU2GDyyFnowW++E0YrSMWsnUhXvBbuEx7XsasTdCQ7MkylPHNMDk1sMsrmLDvXAnN6SCqRgI5NJmBLL9XR3y8ABKQdhlke4Hh4qrKhaGyRO0fPI1LQ3GWTkQwmgaBZ3Cr2iMFXutNRgJdLUj0jaMEPOBttbcezq9m3OR6Zb7l7fGzZ28f6bwy23PRIgDDwqm4HgVtvQui2VBVwWOl7X9kaqJC/AqoWLmQTBn3sk3hK7QmXaLOd2wYwHL0QQlwBL6flODRC4gMb6HATqK1bRDaOLeLajlU7iQQGPq21Zu9n27cU3MIBAVu3H0ITkv6vWNJWXgH326R4yJnRQ2h4f9tqtzeI65N5r0nUeEHa/qgCPNKpd2jUy1tG6kxo7mX8xwTLYpneWkoqNkmxhy5rSTeElGIamcHBzBRpF1TzWXci41DTeXUvA6iqEjXyX89obFAw10EX/Gg8UmPt1/IKVz54Dy3WNiUYe4aY8KChKlTURHo4KeuBxCWhqHiZLCxvGh6Vm8o0WD2CeuVRicC4Yhu9zfvylPqQRt0LQBHmfyd6iGRhyz/l1R1EX18QGwmLLzW7G7lGOnbMInaiNU9mnffxJTTIXlR7zINtZNc6AihMTfHWrEvyl3mYfUTynetuF7lx/LaRxFLX3T4Ajt5nHMT3T4xeHLu1QgZclAoKu2HviGA30ZeoLyBa9KVYtFYIfBFb6pByipH+uank6eTqz8144is0Aki0YJ54X6qc/oJxzl76MLID5K01OA9 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f20760a7-5502-4731-451b-08dad4a3ec6d X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Dec 2022 20:29:33.7220 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: /03NPh9N5dBd31gnGC+/RZQvpcC0n+RnoE/6tdm2pZtwnwjMl45rnoisMgboxUuDufW0r/pa9IR/wHrcSp92Eg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB4542 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-02_12,2022-12-01_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 phishscore=0 mlxscore=0 spamscore=0 adultscore=0 malwarescore=0 mlxlogscore=649 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212020164 X-Proofpoint-GUID: VjRkTDJJYg0MICzSf4of2VGWOdThHlqH X-Proofpoint-ORIG-GUID: VjRkTDJJYg0MICzSf4of2VGWOdThHlqH X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > I'd like to hear what other people think, FWIW, I think that our CL emulation library should emulate CL. (Shocking, I know.) In this=20 case, `cl-labels' should emulate CL's `labels'. It's bad enough that we've added some non-CL stuff to our CL library over the years (instead of putting it elsewhere and not giving it prefix `cl-'). It's worse when we co-opt a CL name to do something other than emulate the CL thingie that has that name. It's fine for Emacs Lisp to add whatever we like, including a `labels'-like function that acts differently from CL `labels'. What's misguided, IMO, is for us to use the name `cl-labels' for such non-`labels' behavior. Add a new function for that, without prefix `cl-'. I'd even like to see us backtrack on the other, divergences from CL emulation that use CL names=20 (but with prefix `cl-'). Just one opinion. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 19:59:06 2022 Received: (at control) by debbugs.gnu.org; 3 Dec 2022 00:59:06 +0000 Received: from localhost ([127.0.0.1]:49900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1Gry-0005uK-Ak for submit@debbugs.gnu.org; Fri, 02 Dec 2022 19:59:06 -0500 Received: from mail-oi1-f181.google.com ([209.85.167.181]:34517) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1Grx-0005t6-3T for control@debbugs.gnu.org; Fri, 02 Dec 2022 19:59:05 -0500 Received: by mail-oi1-f181.google.com with SMTP id n205so7049425oib.1 for ; Fri, 02 Dec 2022 16:59:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=TOb0lChm61Li/+iIrs4VhEGEefDmwQk7/ebN8sScReE=; b=IkHysmtZeU5TETeVSfGDrw9VzIKqveIRMcLRvvMjqYkqumvmYXEuVfGQvBsl4taK3c ESjFRw9VbD/LWLfke+Y5UaycYa/JjyzFCWFBYPJheyy2ftfGTsp6+tzyhQNW9l1ocMal oppQIFBor5mBx8IgkQml70WxE72vTEXKgoEzrw6rt8a+PxfZ7yyzZOPkjZ4YXYKkPIjD blYCjzO3dwFtuZgDsR23/QcbLzeIz1jjRRRZ6vATbuTFjLt13jCbNi6H/9wPMfM09zME hzoQ3wav66MqXCT2r8NoPD5K3jZyPsCC9tTR96DnRe5faZ601zPDoYfmoMwgaLXSpnks eOSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=TOb0lChm61Li/+iIrs4VhEGEefDmwQk7/ebN8sScReE=; b=tNrp0ikUDg1zcuWzxmkn0itwf6JmdRfYWiflYzpQMgnGDNEI/w04AH4Y2f35RXPiOs FBqN/cesYgGRz3E3M81F8cSaV3kwf2jc+84MrEoyJgNpApqBBtI/IBgOLZjqVKO7UYsz VH3CdyjZf8dqxcfaKlj3enNBqh4ZeA33tOxsZB3GTlv34vBAGWRILknN/CInxJDfrl3Q 5T9inh1KHjXkExcRtnr2vVG4VVXSay4FInTFjNeDubo5o91Wp+I67mhY21dDdOYtVgF5 BOBhgHw46s7qZmPAWOEIlVxtBe7UgUeinbm8xjuyDxF5lBcW143LQx85qcwb4IC8c2wl vPIw== X-Gm-Message-State: ANoB5plWS75Q1nf4mud1AAh0w1uKfs+fs4OggXZg0O5GcH8l9t+hyzqk fAyyS4uj9JQG+TInmG7Xk7OE4m7cv3UMUIALbSJ9pSX0 X-Google-Smtp-Source: AA0mqf48Fyd1q6tcQCpJxE8Bgl8quZtSRxEbnbeA4YJ+DS83+g4yJFSF44N31o0DUU0/ojD5wnvQge1/1I0MgsJGOHQ= X-Received: by 2002:aca:6547:0:b0:35b:c8a2:f7f6 with SMTP id j7-20020aca6547000000b0035bc8a2f7f6mr9403118oiw.199.1670029139625; Fri, 02 Dec 2022 16:58:59 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 2 Dec 2022 16:58:59 -0800 From: Stefan Kangas X-Hashcash: 1:20:221203:control@debbugs.gnu.org::MRZiZdNzuRYgZR+G:1awR MIME-Version: 1.0 Date: Fri, 2 Dec 2022 16:58:59 -0800 Message-ID: Subject: control message for bug #59786 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) severity 59786 wishlist quit From unknown Sat Aug 16 21:23:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59786: Allowing arbitrary expressions in cl-labels Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Jan 2023 13:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59786 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: 59786@debbugs.gnu.org Received: via spool by 59786-submit@debbugs.gnu.org id=B59786.167361768623288 (code B ref 59786); Fri, 13 Jan 2023 13:49:02 +0000 Received: (at 59786) by debbugs.gnu.org; 13 Jan 2023 13:48:06 +0000 Received: from localhost ([127.0.0.1]:49905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGKPe-00063X-5e for submit@debbugs.gnu.org; Fri, 13 Jan 2023 08:48:06 -0500 Received: from mout.web.de ([212.227.15.4]:59201) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGKPc-00062M-AF for 59786@debbugs.gnu.org; Fri, 13 Jan 2023 08:48:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1673617674; bh=nab5GbTjOU/8czPCqx5u5r26AUBPzLxV2zsUF4wZF30=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=TKU/pcHZGS8OqmK1jC5sjfY6fPao2JaXTkfqzZubL36E/L2rsc11O24E2mVM3VoTc ezgMuAI4FBOS9T7lwe7vtUBhPG2A4oXxaXqARutBDqf7fdQ1OyyH3r12TO1QN+M6zw z6938RSc64sEU04y18awDHH2+XAkbGyt6qF20QzH1fEapO1TCJdaL0qLaUc3xJHFU1 67nz8l6fj8Iy/+ohTWJSvdFb4nPH8TgReNIjHOPfLOJbjJubJHFBbIQ5K+VdqtiNDZ H3wyCq1oyj1yvAU+VFRlmtzpfS4enM2iCqP4GlBuHKM1Cq99ZOLkk6UyoivBzatsCe GWhdANXwxqSpg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from drachen.dragon ([84.59.210.57]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1N9LEG-1odt5a05G0-015Kz2; Fri, 13 Jan 2023 14:47:54 +0100 From: Michael Heerdegen In-Reply-To: (Stefan Monnier's message of "Fri, 02 Dec 2022 14:44:13 -0500") References: Date: Fri, 13 Jan 2023 14:47:52 +0100 Message-ID: <87r0vybl6f.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:qYyZMFEfQbE4UY73cK+vjnxTx1NUGWNPd/t2teNqGREsH3eTniF /SO6Ym6DiELZUX6wNcGiyjSy5hwkPCElAO4kx+nRdeNJS0LRLW7nqxhDIUdFCn2R4FfQXyL 5JqFfin2kQCr4IsWHh1Nia622/8efZ1MgzzWD9DV2lF/FkSJKHMJeE5Ei7jLpBzBU6qlOkv HupMRDz6JruH26ryULVfQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:DVXbCAW74z4=;bpkqgxEbOO4WTfCDvvWpDWYDw7p 4QH3OB3CqqVyzG0H62XPuyvc1OXUSxnAK4JhrlPNp9bVYJlsoZC8sYhsbO7bCtTd2dXeYOCeL BqJYdEPb//IEXTTvYLzHIw9pb35D+sTE4+lXbrqow90X3a0vg+JeRn6+uD3P6o6DBjBgcqPFL 3CbUKOe12zGyCKu35teni8IMUhPX3+U+SW1QfP+zN6DZdHSn/ZqYdHG/z2chUyc6TzLrs+6a5 UmKiWo+VFWvTySYSvWAHmGmsqQkrO96tkS3P4Hckcf8QBevnsggvsuHWRXpBDKKdez2z/ZpIS Viu3jXyc0zkpyo1skvXq3EkKSwn6H4zWrnqGVYTU1fy212UCTgQmf9G3AUPqVyXLkh40xCf9n 8z3NlPPNAZq8gsnicU9Z4jgg9l6F8L1JW+LSB8ZaTBYhKfQCnLP9QYs+JO0ajSkk5/3d9Rdxn cU+GsoUfNsdRvfeEEQW2rnArIr+UxbB4rkA4Ak7TQSsxuncdoRYK6VvuLSDO/xrBRHHB/M8EU nVxgiM89VyTmwM1k3u2BsUYR915zLHJ0MPXEMDCKbjX7QbIibQtrPJfbtnh6jo6066NBx+yF4 uPffSiJjam8AUkEOgdrKKJ+hH4qzHvwnzVInvOfcJ4JnvHkkm8dQC8X1K5I/dGWdhs+/MmYil LAc/SgrJKsR90USpP/qIjQvRzcpnB7EdfnwRNdcw0g+djo0y17JbLfav6lZQ27T8NZPe73vAF LR/XMRBNEW9s0ZVgNjbGFkZTs3RVvjnanZJKKIJ6oFB1cw8EGAaqEvjwYAfnOYGRn4gjeX42R lut3e7NVefF7sSc/NziygQPhgxiFk8JpujohBWf6q+tnL/I6FE2ATKDM/lej7HG6CnXhme5vo t08xh7cS488R75YgSc3uSDP2bbNq4GceE1j6OIE9TVceCZ6DqzkS8COwc5+1ZnZkykK7tn8+l eVYSFhrZno7xLWP6pa1hUXMAQJA= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Stefan Monnier writes: > The patch below uses this "new new" syntax (and adjusts `cl-flet` to > also support this new new syntax). It still lacks a NEWS entry (as > well as updating the CL manual), but before I do that, I'd like to hear > what other people think, I like the idea to implement this kind of feature for `cl-labels'. It's a good change IMO. I don't like the syntax I think (ugly). The rest of this answer is discussing this detail: I don't recall all details about the ambiguity of the empty body case, so forgive me if I'm missing something. A binding like (my-fun (var1 var2)) with an empty body would give you compiler warnings anyway. Would this be an alternative to your "=" style syntax: To specify a local function with an empty body one would have to use local variable names starting with "_": (my-fun (_var1 _var2)) If not all variables start with an underscore or not all list members are symbols, the binding is interpreted as specifying an expression evaluating to the function to bind. This assumes that "_var" never specifies a named function. Michael. From unknown Sat Aug 16 21:23:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59786: Allowing arbitrary expressions in cl-labels Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Jan 2023 17:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59786 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 59786@debbugs.gnu.org, Stefan Monnier Received: via spool by 59786-submit@debbugs.gnu.org id=B59786.167380272527487 (code B ref 59786); Sun, 15 Jan 2023 17:13:01 +0000 Received: (at 59786) by debbugs.gnu.org; 15 Jan 2023 17:12:05 +0000 Received: from localhost ([127.0.0.1]:59488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pH6Y9-00079H-6o for submit@debbugs.gnu.org; Sun, 15 Jan 2023 12:12:05 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:33085) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pH6Y7-00078l-CY for 59786@debbugs.gnu.org; Sun, 15 Jan 2023 12:12:03 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 552055C00AC; Sun, 15 Jan 2023 12:11:56 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sun, 15 Jan 2023 12:11:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1673802716; x=1673889116; bh=89v9WKSJBf guwUJ/1FROYeYQNdJagEx0EUSq8ExMZ2c=; b=RlLaETNl1ikeVRW5usVw6pOIht 9RmzwLUQJuFwqcatlUTZfFYYzORZu488DSVjrAKcE350+c+0oKl6qTRkRLSechaP /P/jE4jBFIqHIikkzLKmtiBV6/q0dc7D9sozufijI7GTwXRvhSFj1YX6D4J5tLvx vgqko+cTdAQ4ce+EBdTViQEwMlvoqU8Cxu0rsYlaDZfylDjjcv79HnZNzzWLfW5A aHSzOONUaCzjJ18iYAAp+6s6a7KvM9d8HDOpB/bWTy3oc8wj6GsmMlw91SPmJJi1 L0TF4UwTFfDkNnbn38EPZQQA1C+u/B25Z1zanFDVYyHUiGTs1OiVkmBQmiOw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1673802716; x=1673889116; bh=89v9WKSJBfguwUJ/1FROYeYQNdJa gEx0EUSq8ExMZ2c=; b=jIJvgwjADGKhMBiYzN32r54Jd/wzVCagCui1HLfchbV2 Tch+fqPrlvczxTZneqAeG+JTWAREDjM5qd5tRMWAvJBdXXhmyNawZY+yK15XoKEY 0dPEOVYUiD2c1lB85stSvxrexL+pdYYGL+3QPLOKbXlZPHej3xx3UOrr8U8S+rH4 zQR8kjm0/RPju8TgLAcEZHnCTX25kpayA9r8jEh1jnUqXH6Tu2mskHiEKgf1Jr7h KohUBSL5vtyC7jArXgqi5MEG7k3gd5Uklh9d6kcvwcOTHQYggyEudBnXVJCraE2/ 6zAz8Xgm1hx7KCqt6OvuzVYwHsVSfLDhHCV+kvT6uQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddtvddguddtudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffujghffffkfgggtgesthdttddttdertdenucfhrhhomhepufgvrghn ucghhhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqe enucggtffrrghtthgvrhhnpeffueettdefvddtteevgfeufeejgfegudfgfedutdegfeet keehuddvfeejjeeifeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg X-ME-Proxy: Feedback-ID: i23c04076:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 15 Jan 2023 12:11:55 -0500 (EST) Received: by melete.silentflame.com (Postfix, from userid 1000) id 8BD637F047D; Sun, 15 Jan 2023 10:11:54 -0700 (MST) From: Sean Whitton In-Reply-To: (Stefan Monnier via's message of "Fri, 02 Dec 2022 14:44:13 -0500") References: Date: Sun, 15 Jan 2023 10:11:54 -0700 Message-ID: <87k01nk9id.fsf@melete.silentflame.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello, On Fri 02 Dec 2022 at 02:44PM -05, Stefan Monnier wrote: > After I introduced this in `cl-flet` it was pointed out that it was an > incompatible change since BODY... can be the empty list. Another option > is to use a syntax like: > > (FUNC = EXP) the new new syntax > > which should not suffer from such incompatibility since ARGS should > never be of the form `=`. I'm usually in support adding new capabilities to existing macros, but in this case, the cost of using an equals sign is rather high. How about just defining a new macro fletrec that works this way, like letrec but for function cells? That would seem like it would address your usecase. -- Sean Whitton From unknown Sat Aug 16 21:23:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59786: Allowing arbitrary expressions in cl-labels Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Oct 2024 03:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59786 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Michael Heerdegen Cc: 59786@debbugs.gnu.org Received: via spool by 59786-submit@debbugs.gnu.org id=B59786.1730084922338 (code B ref 59786); Mon, 28 Oct 2024 03:09:02 +0000 Received: (at 59786) by debbugs.gnu.org; 28 Oct 2024 03:08:42 +0000 Received: from localhost ([127.0.0.1]:49458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5G7V-00005N-QG for submit@debbugs.gnu.org; Sun, 27 Oct 2024 23:08:42 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:22742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5G7S-00004y-FZ for 59786@debbugs.gnu.org; Sun, 27 Oct 2024 23:08:39 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 1AB7E442EA3; Sun, 27 Oct 2024 23:07:56 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1730084874; bh=jce2fPgv5fvMXoiH1PKHlsExVSlLLe7gntyTP8/ynI0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=nK6BcWJDCmfEejC0cqwYZqoDPTXNdNdlL43jTQzrB3fIgiF/2bvTHUL0shM6wtLuY jXCn+kThHDa2UDl676onkNTr0EHfogh/p6tLG5GbbOymj+yOOT/oLs0OMeE/UJFeKH GeolYCg5nH0WqMFnKP+TG+4hiF3V5Pu+iG/b+kZqdlGkkT62fwmygE36+trXCX0G7q p3b1A895UnlgYL4F5A9jGkFNNmLoq8zUAlrKk+Y9sdGcx72FpWJFKOLeoWwfsfPfbK 6pmD7Pow7hKqN/6YqovEFBaMtkazP9SbA6pra7Xx5A/GeYwgx16FIUEiX5r0QAiqQf oG6BKui1jPi2g== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 64B9B442DDB; Sun, 27 Oct 2024 23:07:54 -0400 (EDT) Received: from pastel (unknown [69.196.161.60]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3807912034F; Sun, 27 Oct 2024 23:07:54 -0400 (EDT) From: Stefan Monnier In-Reply-To: <87r0vybl6f.fsf@web.de> (Michael Heerdegen's message of "Fri, 13 Jan 2023 14:47:52 +0100") Message-ID: References: <87r0vybl6f.fsf@web.de> Date: Sun, 27 Oct 2024 23:07:45 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.162 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Michael Heerdegen [2023-01-13 14:47:52] wrote: > Stefan Monnier writes: >> The patch below uses this "new new" syntax (and adjusts `cl-flet` to >> also support this new new syntax). It still lacks a NEWS entry (as >> well as updating the CL manual), but before I do that, I'd like to hear >> what other people think, > > I like the idea to implement this kind of feature for `cl-labels'. It's > a good change IMO. > > I don't like the syntax I think (ugly). The rest of this answer is > discussing this detail: > > I don't recall all details about the ambiguity of the empty body case, > so forgive me if I'm missing something. > > A binding like (my-fun (var1 var2)) with an empty body would give you > compiler warnings anyway. Would this be an alternative to your "=" > style syntax: > > To specify a local function with an empty body one would have to use > local variable names starting with "_": > > (my-fun (_var1 _var2)) > > If not all variables start with an underscore or not all list members > are symbols, the binding is interpreted as specifying an expression > evaluating to the function to bind. This assumes that "_var" never > specifies a named function. I guess you're right. So we should just use the (FUNC EXP) syntax, exactly like we already do for `cl-flet`. The patch below does that. Stefan --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=cl-labels.patch diff --git a/etc/NEWS b/etc/NEWS index d1c7303f976..562c9c6bdc3 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -215,6 +215,11 @@ modal editing packages. * Changes in Specialized Modes and Packages in Emacs 31.1 +** CL-Lib ++++ +*** 'cl-labels' now also accepts (FUNC EXP) bindings, like 'cl-flet'. +Such bindings make it possible to compute which function to bind to FUNC. + ** Whitespace --- diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index b37f744b175..388281e4b1a 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2250,9 +2250,11 @@ cl--self-tco ;;;###autoload (defmacro cl-labels (bindings &rest body) "Make local (recursive) function definitions. -BINDINGS is a list of definitions of the form (FUNC ARGLIST BODY...) where +BINDINGS is a list of definitions of the form either (FUNC EXP) +where EXP is a form that should return the function to bind to the +function name FUNC, or (FUNC ARGLIST BODY...) where FUNC is the function name, ARGLIST its arguments, and BODY the -forms of the function body. FUNC is defined in any BODY, as well +forms of the function body. FUNC is defined in any BODY or EXP, as well as FORM, so you can write recursive and mutually recursive function definitions. See info node `(cl) Function Bindings' for details. @@ -2273,18 +2275,21 @@ cl-labels (unless (assq 'function newenv) (push (cons 'function #'cl--labels-convert) newenv)) ;; Perform self-tail call elimination. - (setq binds (mapcar - (lambda (bind) - (pcase-let* - ((`(,var ,sargs . ,sbody) bind) - (`(function (lambda ,fargs . ,ebody)) - (macroexpand-all `(cl-function (lambda ,sargs . ,sbody)) - newenv)) - (`(,ofargs . ,obody) - (cl--self-tco var fargs ebody))) - `(,var (function (lambda ,ofargs . ,obody))))) - (nreverse binds))) - `(letrec ,binds + `(letrec ,(mapcar + (lambda (bind) + (pcase-let* ((`(,var ,sargs . ,sbody) bind)) + `(,var + ,(if (null sbody) + ;; This is a (FUNC EXP) definition. + (macroexpand-all sargs newenv) + (pcase-let* + ((`(function (lambda ,fargs . ,ebody)) + (macroexpand-all + `(cl-function (lambda ,sargs . ,sbody)) newenv)) + (`(,ofargs . ,obody) + (cl--self-tco var fargs ebody))) + `(function (lambda ,ofargs . ,obody))))))) + (nreverse binds)) . ,(macroexp-unprogn (macroexpand-all (macroexp-progn body) diff --git a/test/lisp/emacs-lisp/cl-lib-tests.el b/test/lisp/emacs-lisp/cl-lib-tests.el index 14ff8628fb8..376ccebef98 100644 --- a/test/lisp/emacs-lisp/cl-lib-tests.el +++ b/test/lisp/emacs-lisp/cl-lib-tests.el @@ -558,5 +558,14 @@ cl-constantly (should (equal (mapcar (cl-constantly 3) '(a b c d)) '(3 3 3 3)))) +(ert-deftest cl-lib-test-labels () + (should (equal (cl-labels ((even (x) (if (= x 0) t (odd (1- x)))) + (odd (x) (if (= x 0) nil (even (1- x))))) + (list (even 42) (odd 42))) + '(t nil))) + (should (equal (cl-labels ((even (lambda (x) (if (= x 0) t (odd (1- x))))) + (odd (lambda (x) (if (= x 0) nil (even (1- x)))))) + (list (even 42) (odd 42))) + '(t nil)))) ;;; cl-lib-tests.el ends here --=-=-=-- From unknown Sat Aug 16 21:23:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59786: Allowing arbitrary expressions in cl-labels Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Oct 2024 12:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59786 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 59786@debbugs.gnu.org Cc: monnier@iro.umontreal.ca X-Debbugs-Original-To: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: 59786@debbugs.gnu.org, Stefan Monnier Received: via spool by submit@debbugs.gnu.org id=B.173020484110602 (code B ref -1); Tue, 29 Oct 2024 12:28:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Oct 2024 12:27:21 +0000 Received: from localhost ([127.0.0.1]:56304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5lJg-0002kw-O6 for submit@debbugs.gnu.org; Tue, 29 Oct 2024 08:27:20 -0400 Received: from lists.gnu.org ([209.51.188.17]:55244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5lJe-0002kq-4p for submit@debbugs.gnu.org; Tue, 29 Oct 2024 08:27:18 -0400 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 1t5lJd-0006Dz-NY for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 08:27:17 -0400 Received: from mout.web.de ([212.227.17.12]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5lJb-0000Vz-J5 for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 08:27:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1730204822; x=1730809622; i=michael_heerdegen@web.de; bh=RAmyBJW8vHfn6fyc/U63F6nvf3YrZKzlAjlV8J6o67U=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=nTfahLiKaKIbOVVLD5v0M8xqSQxEDF2xvBeF/gjKMmwh08p2dUpo74A74vtaoQys 8kit/NuvqtoBEL1ClispTdHwXCzmFSmaL4PcOQs26KatmYW4G2SuSddfRC5atBzmj HOAg4N32i7oQKd1rEEigrTBJwluobv4HT+CbXbypgPMldIslTF+zFs7RdDFss4e+J 5TxCwspm4p4RGSl0UTw/XBhqq9JGQJibSK1rq7lM2IPSBQG1Vd0jkXbZprkazZEtV BL+czvgFw8GkwfatWfwqh5DWAy6If2imqyqoHFmRvdGW5qLA6KyYVPiKarGq0URiv U3P4OGdQuVlC/+3fLg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from drachen.dragon ([92.75.138.198]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1Mf3qK-1tlxsq0mvC-00mNZh; Tue, 29 Oct 2024 13:27:02 +0100 From: Michael Heerdegen In-Reply-To: (Stefan Monnier via's message of "Sun, 27 Oct 2024 23:07:45 -0400") References: <87r0vybl6f.fsf@web.de> Date: Tue, 29 Oct 2024 13:28:01 +0100 Message-ID: <874j4vw0tq.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:nA8fym5XJW3v6Z1VXdi5EuFu6l4yVubrI+uiCP2LUcb2TteNBPT RjUsEPSiC4eDcAFD9rDagtahGirTzhhzNnCRCG8vQl9CoIFMD1OIXEfBGM2sPTpSGaa+PFw wVaNRwAjqBp1f6LuRm4ZpPzuMu/zy7IvBGGbAIlK6U4Vxcl3AizDKFyC2xlVTkzPsNfvTY0 AAUCgx49eEnnKtNJ0SNTw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:IBnhQKnTRHI=;M6Y8O3CRCMeraHSZ/73VRq43DKX Yk8vG0DtEKZjsgc9xwaC+zYB+oVW6lot1UUKgUeSozQi2eCaGv5nZ5mBkGDYVZwSkvZW1D2wd jXQblrrNG6dr9kpL908o4faFAV3eXg3X1myraOQIMnxQwc2DPameat/827TG1f19MvrEJZ/oK Z9lUVxNGiaHh8z3+qIDL83vOZxJip3WPgvz3u5tgYlnK3Qj5DRYhMPryC1D77WqFwD8G53WJq oDkzBvFRbC0Jbjf/albMtmFfD0980ZbxNtdWOz9tiyKK4adJ6euBYZ/7RYkNjQRTfDUXw0xVu KMBuLsEsgW7IpHO6XOHlF3L3jIiiuz3Kb9Mo/RIdcMBc2aY5X3Zt8IXdYUpfwZvWsr1POR1l2 4LTYzojQuaSm5t4nzwSn/weGkhkCECnppnH0dJAPYTRQ5MqfVg/ox10DCy0uNh+v+HQQi3CRV gLOeb4fj7mj3pETgWoDpTX2l8klT4BSqv04ao1L9ZF6KhdJYOfpiiRbN0kGvjtXuiHY0XapMh XvRH99drjw0h9Cn4y9NnFEel1M8nhjfbW/VCGOF0lj+5Wopfyq/jRy9seyUmqYMCqgH1MLOl7 H/lB4/A/SQ5hO1Tuu9U/s1s6Eokiu6+uI8UjAtatMZ98+Bw8Ex8FLTsH965FB/2c3nnHwURCX OCleKX+dbVTm8ZqhCyg/ZX31Jk9TrmOGg7386F8s2ZbpmNk7E2y8ksNEmVVsk7LyyFAVZJc8A OdH3wMpj9bZ+N2AbvJUqG+hOXd6Hq3nUS7Abj4jxFFCR1pEsdv6kRMgqcsTW1tWlIR3loMo+9 EUNWCpl4qnfQvP0f4ZdkQDOQ== Received-SPF: pass client-ip=212.227.17.12; envelope-from=michael_heerdegen@web.de; helo=mout.web.de 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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi Stefan, > -forms of the function body. FUNC is defined in any BODY, as well > +forms of the function body. FUNC is defined in any BODY or EXP, as well ^^^^^^ This is unfortunately not correct, e.g. (cl-labels ((even (if (odd 5) (lambda (x) (if (= x 0) t (odd (1- x)))) #'ignore)) (odd (lambda (x) (if (= x 0) nil (even (1- x)))))) (list (even 42) (odd 42))) ~~> funcall: Symbol's function definition is void: nil Only preceding definitions can be used in the EXP. Dunno how useful it is at all that the EXPs can use any of the defined functions. Michael. From unknown Sat Aug 16 21:23:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59786: Allowing arbitrary expressions in cl-labels Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Oct 2024 14:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59786 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Michael Heerdegen Cc: 59786@debbugs.gnu.org X-Debbugs-Original-Cc: "Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors" , 59786@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.173021349928842 (code B ref -1); Tue, 29 Oct 2024 14:52:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Oct 2024 14:51:39 +0000 Received: from localhost ([127.0.0.1]:56762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5nZK-0007V6-LO for submit@debbugs.gnu.org; Tue, 29 Oct 2024 10:51:39 -0400 Received: from lists.gnu.org ([209.51.188.17]:32864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5nZG-0007Ut-Ix for submit@debbugs.gnu.org; Tue, 29 Oct 2024 10:51:36 -0400 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 1t5nZE-0003X7-G0 for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 10:51:32 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5nZC-0003ii-2a for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 10:51:32 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id B490E807A8; Tue, 29 Oct 2024 10:51:27 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1730213486; bh=awWPCh+NnQMYA1DEyx6f6pUmg1IrY7cZsqm1M1t4wOA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=C1Wc+LCSd73rIdVDBoow1128D/A7RM7VGJgoXnn8RubGXmLb8rBjiu2BW0ACtxOjt yve4Fm8ZIPfAgBzQIOEXiKPiJM37nfGs6mwAEtcgcig4eDXKvTNPXFFPXnLeO2OB5W p8ttb/mRWjk97vMbovi1UeQ94Phcip/raa5a1uekiz8qCsVl1u9DXRCbiUeqiXBWIV 9aoC0gOkE7rpawhqhnwBHwOf/mDrdHOJYJ2v6GkkKtzZjh/PGaROl5d7VPyrHF8Y4/ J6tv+6jfWYbG7y4aUeaZBi6DeU3qgVU6cKHbOms10STHo3d60AHRjm2r6eZXZyxduN yLCFzLLirKi6w== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id DBC5A80966; Tue, 29 Oct 2024 10:51:26 -0400 (EDT) Received: from alfajor (modemcable094.121-70-69.static.videotron.ca [69.70.121.94]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B496B120346; Tue, 29 Oct 2024 10:51:26 -0400 (EDT) From: Stefan Monnier In-Reply-To: <874j4vw0tq.fsf@web.de> (Michael Heerdegen's message of "Tue, 29 Oct 2024 13:28:01 +0100") Message-ID: References: <87r0vybl6f.fsf@web.de> <874j4vw0tq.fsf@web.de> Date: Tue, 29 Oct 2024 10:51:26 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -9 X-Spam_score: -1.0 X-Spam_bar: - X-Spam_report: (-1.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 2.2 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >> -forms of the function body. FUNC is defined in any BODY, as well >> +forms of the function body. FUNC is defined in any BODY or EXP, as well > ^^^^^^ > This is unfortunately not correct, e.g. > > [...] Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [69.70.121.94 listed in zen.spamhaus.org] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.51.188.17 listed in bl.score.senderscore.com] 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.51.188.17 listed in sa-accredit.habeas.com] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >> -forms of the function body. FUNC is defined in any BODY, as well >> +forms of the function body. FUNC is defined in any BODY or EXP, as well > ^^^^^^ > This is unfortunately not correct, e.g. > > [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.51.188.17 listed in sa-accredit.habeas.com] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [69.70.121.94 listed in zen.spamhaus.org] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.51.188.17 listed in bl.score.senderscore.com] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager >> -forms of the function body. FUNC is defined in any BODY, as well >> +forms of the function body. FUNC is defined in any BODY or EXP, as well > ^^^^^^ > This is unfortunately not correct, e.g. > > (cl-labels ((even (if (odd 5) > (lambda (x) (if (= x 0) t (odd (1- x)))) > #'ignore)) > (odd (lambda (x) (if (= x 0) nil (even (1- x)))))) > (list (even 42) (odd 42))) > > ~~> funcall: Symbol's function definition is void: nil This is normal. Same happens with (letrec ((even (if (funcall odd 5) (lambda (x) (if (= x 0) t (funcall odd (1- x)))) #'ignore)) (odd (lambda (x) (if (= x 0) nil (funcall even (1- x)))))) (list (funcall even 42) (funcall odd 42))) This construct is used for recursive functions, not recursive expressions. Recursive expressions can't be handled without going for some kind of lazy evaluation strategy which is quite difficult to pull off in a macro. > Dunno how useful it is at all that the EXPs can use any of the defined > functions. As mentioned (admittedly, a long time ago), the purpose is to *compute* the recursive functions, e.g. (cl-labels ((f1 (if (fboundp 'foo) (lambda (x) ... (f1 ..) ...) (lambda (x) ... (f1 ..) ...)))) ...) My original motivation is to define recursive oclosures (for PEG): (cl-labels ((f1 (oclosure-lambda ... (f1 ..) ...))) ...) - Stefan From unknown Sat Aug 16 21:23:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59786: Allowing arbitrary expressions in cl-labels Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Oct 2024 15:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59786 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: 59786@debbugs.gnu.org X-Debbugs-Original-Cc: "Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors" , 59786@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17302169523180 (code B ref -1); Tue, 29 Oct 2024 15:50:01 +0000 Received: (at submit) by debbugs.gnu.org; 29 Oct 2024 15:49:12 +0000 Received: from localhost ([127.0.0.1]:57075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5oT1-0000pE-MP for submit@debbugs.gnu.org; Tue, 29 Oct 2024 11:49:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:53258) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5oSz-0000p8-IU for submit@debbugs.gnu.org; Tue, 29 Oct 2024 11:49:10 -0400 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 1t5oSz-0005li-C3 for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 11:49:09 -0400 Received: from mout.web.de ([212.227.17.12]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5oSx-0003w3-LJ for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2024 11:49:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1730216927; x=1730821727; i=michael_heerdegen@web.de; bh=yGXSoDWa/1bZlqUUYdvv6+UaVRk6S1ruYS3lcpUovYY=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=B30qSDM/s1cmEu/JIABA4GWhCgZUPQxP1ZPrIxeBJP2RhQUswOKjDTwtkDu6tKvn H6EoS3l53dkMvLglCVOP+iBt69oNF5NUzmLM9p33shv80pGPKkV3n3vAwLP1kaags lW45lyCCz45TI8C+hYLeXsd+axKkMBOMqwHVfOgG2OBtGkrCRzyKnir4Mek25BDO1 7NYhbAhUO+sUpIKdYGmC7OffVJYQ50OfdQUnbkeJ26xu2RINy08YfLKLGI0E5LCNy UW9NYPpSDoHTjAoiLEMhIrgbmc6OjIOIePnASTNMiny/N/jGfjrMJ6hCnr/gzvc7O L2ct2rzwSB8Uopf0Yw== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from drachen.dragon ([92.75.138.198]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MV2Oi-1tGMpt0utq-00OuEC; Tue, 29 Oct 2024 16:48:47 +0100 From: Michael Heerdegen In-Reply-To: (Stefan Monnier's message of "Tue, 29 Oct 2024 10:51:26 -0400") References: <87r0vybl6f.fsf@web.de> <874j4vw0tq.fsf@web.de> Date: Tue, 29 Oct 2024 16:49:46 +0100 Message-ID: <87v7xavrhh.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:zgqgCyn/aLD7OID1j2lM6TL2t6L+xKyjOK6sCv3Qhj5br0LsoB0 69mWiX5nc9rD0WqWQ8HIiTeLFFoD+bqs7IZg0q6+YsQjaZd+ZFhS0SleXuELrmgQxM1xPdi zKUHf8EzGBcLR88/7P8Swvba3pqu5gmO8zTOy9zaWcVKeCaq6Im4AOEdWKwJS0HkyYdWcVV H0wGVeHOnvNil6PRQVzxA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:22KfA81jdsw=;HwvAYsZJfjGIfH3xI2Xi+CngRJC NiMzDZ9/4yZcZ9puD+fWa2XtNanrec3Ase7RAkjgix29drHhN+uJHNbcqH6C+S+YiiBvXW6+X hkRrn6cJdgFlnG3oSsMFET5GAMxpuv3jxyJ3u4a+/3zdJ+0LREYyRqeO3tgmLrmNfTn2z1N5d 5grtH2hKMvPOxTppxXewCd2W9RLas6jtWhI/26bpPAfCA4V/wTff9US7Bk0ZPY9Rl4wOM6rp9 iroKNAB+pFPWmF5ldNjdC+d4m79xe5YvQOxLqKgMIGe79A84cYrPp1/0hHoc4VC/SeqdpJ2u+ /QXtOiMPsmF6KJNXd3aiXeqBRdI3HebYNw0XiM86KXhnpkcuCYEtxnwCZFt9kWIfo/TvBTX3J 2J93BquzrgcJ6QwXrPLO8Kq7EBO1iKTxuYLtqOf0rONNMTpPpE2LqrcY4urMxzxcQlCPWMKhT hKO+VK+21/mq25f30VMmKPF1Qc63PaHrxDVpxEqczvSHfBfx6AEytBv6/etgWoptrxmCzGfiL lUyXiKAarEm0OlKts5cMewUY/z5r8gYJT7cugZYioE7pSPxHUezT8kyc210nSP8O7Do/U4IRx njZAcOLqrCx3C6dvbCgEgWrq+x6rvH0EV4XvqjtyMOzFZNxcb8xgFMBOvF9aP1WfAExo31D80 FsvtPgQhSJ4qDuQe6qH43rVJ490E7KQx2nDThoHBXK5E1cBSGKHKNrLoOsvDJj42DJ96kzoHD W8a5bUWsoCwVy1SPpCIr8NRl1bZ6QfcstrNLzIfv2br++t97SDN/3vJZBCBnvgG89/yadkAJe wLnq+16iWKQ/teoUGQ5zK3HP7P2F7Wy7tIvRSZWxRf888= Received-SPF: pass client-ip=212.227.17.12; envelope-from=michael_heerdegen@web.de; helo=mout.web.de 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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Stefan Monnier writes: > >> -forms of the function body. FUNC is defined in any BODY, as well > >> +forms of the function body. FUNC is defined in any BODY or EXP, as well > This is normal. [...] Ok - fine with me. But can we avoid saying a FUNC would be defined in any EXP and try be clearer - like "defined in any EXP _result_" or so? EXP is the form that computes a function binding, so AFAIU it is wrong what we are saying - at least confusing. Do you follow what I mean? Michael. From unknown Sat Aug 16 21:23:25 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Stefan Monnier Subject: bug#59786: closed (Re: bug#59786: Allowing arbitrary expressions in cl-labels) Message-ID: References: X-Gnu-PR-Message: they-closed 59786 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 59786@debbugs.gnu.org Date: Wed, 13 Nov 2024 04:06:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1731470762-26702-1" This is a multi-part message in MIME format... ------------=_1731470762-26702-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #59786: Allowing arbitrary expressions in cl-labels which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 59786@debbugs.gnu.org. --=20 59786: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D59786 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1731470762-26702-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 59786-done) by debbugs.gnu.org; 13 Nov 2024 04:05:08 +0000 Received: from localhost ([127.0.0.1]:40281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tB4ct-0006pa-Sa for submit@debbugs.gnu.org; Tue, 12 Nov 2024 23:05:08 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:64185) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tB4cq-0006ou-Si for 59786-done@debbugs.gnu.org; Tue, 12 Nov 2024 23:05:05 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 6DFA080962; Tue, 12 Nov 2024 23:04:58 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1731470697; bh=yLKyWSMz6vgZVDjFU20oV0Ms12uN0a/r83QSPiUpYqc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=YMBuK04T2XXg4RTy+sxEdDAduHnYAwi3Wa/Ut5zq+7Qp8AwVB8pmGlMuEhg86zCq9 6by2r9NFBMD+5lHKpVHhk+V5s8IVAxAyQbiCMrRh7kCvP2c9O6AEOhU9S4Kn0WJBKk s8QyUZDGfuMEeRpJdMTP6u/Q9MkdTnSTXgVRMnJEEDclRsSOFdcPFTpZVNAYXmnQ1S PsE7y/UcRmAjaOPSDunMlqDKgPk81VYZyVyHdaH3HFN0SO0aTCJdL5MjyCVjUhgovf nbnYwYYqd0MJWL9VMMKNlmO09aLLXaCCIbmXSK5N7fAWN26Nk9dYNK3pbtuhY9+v2q 2WLKZzP2OLZ2Q== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id A55A880294; Tue, 12 Nov 2024 23:04:57 -0500 (EST) Received: from pastel (104-195-225-43.cpe.teksavvy.com [104.195.225.43]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7833812069F; Tue, 12 Nov 2024 23:04:57 -0500 (EST) From: Stefan Monnier To: Michael Heerdegen Subject: Re: bug#59786: Allowing arbitrary expressions in cl-labels In-Reply-To: <87v7xavrhh.fsf@web.de> (Michael Heerdegen's message of "Tue, 29 Oct 2024 16:49:46 +0100") Message-ID: References: <87r0vybl6f.fsf@web.de> <874j4vw0tq.fsf@web.de> <87v7xavrhh.fsf@web.de> Date: Tue, 12 Nov 2024 23:04:56 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.037 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59786-done Cc: 59786-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Pushed to `master`, closing, Stefan ------------=_1731470762-26702-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 2 Dec 2022 19:44:35 +0000 Received: from localhost ([127.0.0.1]:48472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1Bxa-0000V1-Ko for submit@debbugs.gnu.org; Fri, 02 Dec 2022 14:44:35 -0500 Received: from lists.gnu.org ([209.51.188.17]:36754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1BxX-0000Uv-Ki for submit@debbugs.gnu.org; Fri, 02 Dec 2022 14:44:33 -0500 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 1p1BxX-00027L-5v for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2022 14:44:31 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1BxU-0003nD-JI for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2022 14:44:30 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 969C0100178 for ; Fri, 2 Dec 2022 14:44:25 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 40341100143 for ; Fri, 2 Dec 2022 14:44:23 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1670010263; bh=ygG05gcLZ+SDo7E6pzC9NP8ROSld7EA8xL1cemA/NfE=; h=From:To:Subject:Date:From; b=SPYLWX987WABGSL7zjz6c6OJ4LkAFm1kART330GTuKCVXHNrppaJQJQxF+Q79KNF8 AH6Q42uBl+dxP7wAff1jPfoAJZRyFgnd+66+SOgp2hw/fuAWI6a6Lc1akUuWPJOWSM NyheTgl73HhwAI0wG3n+zBU9Ue2NYFjJnfKl71rf/wY9W0iuetdcf++dG9w7J6MBWX m5PNwsyWebX05DLuIaU4M/Id4R4nOuw1AMzuQXDEBR4dFeeLPUatOI8LiPybLztIuj bB6MOqHTW8Y1zs7L2077cRVnZ2dyrP7yS4Ln9zJVZurSeti9qgDkphRRN3+BLnyZ6u I+N43NC+Nhdww== Received: from pastel (unknown [45.72.193.52]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 2A8D3122D8E for ; Fri, 2 Dec 2022 14:44:23 -0500 (EST) From: Stefan Monnier To: bug-gnu-emacs@gnu.org Subject: Allowing arbitrary expressions in cl-labels Date: Fri, 02 Dec 2022 14:44:13 -0500 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.311 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Tags: patch I have found some circumstances where I'd like to write things like: (cl-labels ((f1 (if blabla (lambda (x) (do one thing)) (lambda (x) (do another thing)))) (f2 (if bleble (lambda (y) (do some thing)) (lambda (y) (do some other thing))))) ...) I.e. define two, mutually-recursive functions, but where I want to perform some computation before "building/returning" each function. I could rewrite the above to (cl-labels ((f1 (x) (if blabla (do one thing) (do another thing))) (f2 (y) (if bleble (do some thing) (do some other thing)))) ...) but then the `if` tests are repeated at each call. I could also rewrite it to (letrec ((f1 (if blabla (lambda (x) (do one thing)) (lambda (x) (do another thing)))) (f2 (if bleble (lambda (y) (do some thing)) (lambda (y) (do some other thing))))) ...) but then I have to use (funcall f1 ..) and (funcall f2 ...) instead of just (f1 ...) and (f2 ...). I could add a (cl-flet ((f1 f1) (f2 f2)) ...) but that's inconvenient, especially because I'd have to add it in various places. So I'd like to propose to extend `cl-labels` in the same way that `cl-flet` was extended to allow each function to be defined by an expression that returns a function rather than by "args + body". One option is to use the same approach as I used in `cl-flet`, i.e. allow each binding to be either (FUNC ARGS BODY...) the normal existing syntax or (FUNC EXP) the new syntax After I introduced this in `cl-flet` it was pointed out that it was an incompatible change since BODY... can be the empty list. Another option is to use a syntax like: (FUNC = EXP) the new new syntax which should not suffer from such incompatibility since ARGS should never be of the form `=`. The patch below uses this "new new" syntax (and adjusts `cl-flet` to also support this new new syntax). It still lacks a NEWS entry (as well as updating the CL manual), but before I do that, I'd like to hear what other people think, Stefan In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) of 2022-11-29 built on pastel Repository revision: 4254a4a71d5d04cfcefaedfefe5d22af55650a6a Repository branch: work Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Debian GNU/Linux 11 (bullseye) Configured using: 'configure -C --enable-checking --enable-check-lisp-object-type --with-modules --with-cairo --with-tiff=ifavailable 'CFLAGS=-Wall -g3 -Og -Wno-pointer-sign' PKG_CONFIG_PATH=/home/monnier/lib/pkgconfig' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=cl-labels.patch diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 43a2ed92059..cc8c98f2264 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2028,11 +2028,11 @@ cl--labels-convert ;;;###autoload (defmacro cl-flet (bindings &rest body) "Make local function definitions. -Each definition can take the form (FUNC EXP) where +Each definition can take the form (FUNC = EXP) where FUNC is the function name, and EXP is an expression that returns the function value to which it should be bound, or it can take the more common form (FUNC ARGLIST BODY...) which is a shorthand -for (FUNC (lambda ARGLIST BODY)). +for (FUNC = (lambda ARGLIST BODY)). FUNC is defined only within FORM, not BODY, so you can't write recursive function definitions. Use `cl-labels' for that. See @@ -2055,8 +2055,12 @@ cl-flet (if (and (= (length args-and-body) 1) (symbolp (car args-and-body))) ;; Optimize (cl-flet ((fun var)) body). (setq var (car args-and-body)) - (push (list var (if (= (length args-and-body) 1) - (car args-and-body) + (push (list var (cond + ((= (length args-and-body) 1) ;Obsolete syntax. + (car args-and-body)) + ((eq '= (car args-and-body)) + (macroexp-progn (cdr args-and-body))) + (t `(cl-function (lambda . ,args-and-body)))) binds)) (push (cons (car binding) @@ -2203,12 +2207,13 @@ cl--self-tco ;;;###autoload (defmacro cl-labels (bindings &rest body) "Make local (recursive) function definitions. -+BINDINGS is a list of definitions of the form (FUNC ARGLIST BODY...) where -FUNC is the function name, ARGLIST its arguments, and BODY the -forms of the function body. FUNC is defined in any BODY, as well -as FORM, so you can write recursive and mutually recursive -function definitions. See info node `(cl) Function Bindings' for -details. +BINDINGS is a list of definitions of the form either: +- (FUNC ARGLIST BODY...) where FUNC is the function name, + ARGLIST its arguments, and BODY the forms of the function body. +- (FUNC = BODY) where BODY is an expression that evaluates to a function. +FUNC is defined in any BODY, as well as FORM, so you can write recursive +and mutually recursive function definitions. +See info node `(cl) Function Bindings' for details. \(fn ((FUNC ARGLIST BODY...) ...) FORM...)" (declare (indent 1) (debug cl-flet)) @@ -2226,17 +2231,31 @@ cl-labels (unless (assq 'function newenv) (push (cons 'function #'cl--labels-convert) newenv)) ;; Perform self-tail call elimination. - (setq binds (mapcar - (lambda (bind) - (pcase-let* - ((`(,var ,sargs . ,sbody) bind) - (`(function (lambda ,fargs . ,ebody)) - (macroexpand-all `(cl-function (lambda ,sargs . ,sbody)) - newenv)) - (`(,ofargs . ,obody) - (cl--self-tco var fargs ebody))) - `(,var (function (lambda ,ofargs . ,obody))))) - (nreverse binds))) + (setq binds + (mapcar + (lambda (bind) + (pcase-let* + ((`(,var ,sargs . ,sbody) bind)) + (list var + (named-let loop + ((mfunexp (macroexpand-all + (if (eq '= sargs) + (macroexp-progn sbody) + `(cl-function (lambda ,sargs . ,sbody))) + newenv))) + (pcase mfunexp + (`#'(lambda ,fargs . ,ebody) + `#'(lambda . ,(cl--self-tco var fargs ebody))) + (`(progn . ,exps) + `(progn ,@(butlast exps) ,(loop (car (last exps))))) + (`(let ,bindings ,exps) + `(let ,bindings + ,@(butlast exps) ,(loop (car (last exps))))) + (`(if ,exp1 ,exp2 ,exps) + `(if ,exp1 ,(loop exp2) + ,@(butlast exps) ,(loop (car (last exps))))) + (_ mfunexp)))))) + (nreverse binds))) `(letrec ,binds . ,(macroexp-unprogn (macroexpand-all --=-=-=-- ------------=_1731470762-26702-1-- From unknown Sat Aug 16 21:23:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59786: Allowing arbitrary expressions in cl-labels Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Nov 2024 14:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59786 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: 59786@debbugs.gnu.org Received: via spool by 59786-submit@debbugs.gnu.org id=B59786.173150639732652 (code B ref 59786); Wed, 13 Nov 2024 14:00:03 +0000 Received: (at 59786) by debbugs.gnu.org; 13 Nov 2024 13:59:57 +0000 Received: from localhost ([127.0.0.1]:41297 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBDuW-0008UY-G9 for submit@debbugs.gnu.org; Wed, 13 Nov 2024 08:59:56 -0500 Received: from mout.web.de ([212.227.15.14]:47531) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBDuT-0008UI-Jh for 59786@debbugs.gnu.org; Wed, 13 Nov 2024 08:59:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1731506384; x=1732111184; i=michael_heerdegen@web.de; bh=ZD642A+3hrRHaz7UQQrstvWOjlR+rCcMkZEzjaMVUZM=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=ViVExPXU0QYv9KV7bLv8fbn86U1V1ILXmXyevJOClFflbkaErGv11MfZ9B8h2T/R HwT5Dfz4/4rwxRLkI3Hv2u3+U07XXmcNU3PBa7LqrcfnfSdzCj1yWIGRd24KOH6Pf WO7oeDLScZ3LlB7qVotu1CuROeoR3tNME6lrYpORybgsi9+oTsvg42dqC+wM4Giwc Hui7cieWteF8kEkAPBW4YhfBEQZV2e3rmKiQNx0zgAyFsz98bH+CZCGdUw1eJtTt0 waNo1TM0u+c59MuJ4uC80zidoGVGEYRKm58tdVmFUnj5s8qPoyaaQkJY+ujVFLxJz 5KF3G12W3i+7oKSjSQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from drachen.dragon ([92.75.138.197]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1N6sG3-1tqdn50VhP-00uFsi; Wed, 13 Nov 2024 14:59:44 +0100 From: Michael Heerdegen In-Reply-To: (Stefan Monnier's message of "Tue, 29 Oct 2024 10:51:26 -0400") References: <87r0vybl6f.fsf@web.de> <874j4vw0tq.fsf@web.de> Date: Wed, 13 Nov 2024 15:00:45 +0100 Message-ID: <87bjyjfd2q.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:CBSXK3An+aqgtoKzmVxeVoE52iw6en22O8l54oOaGi3e2vMYA5Q fRWb4x50oQ9gIb2xDhpL6/XQny/fdhPCHdoBk8FeM9fSETwv0Hmz9zFSMDE1UtM1qh/PXI/ SVOldNsxF55FxaH3Kg8FVFWr7NpmjO9XogNPmVEIXZQ8cYji3Avu0hqUZXgIkBwk4a9h1Cu o7HSEw846Z40MdXAO968A== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:FuMLDb1JmEA=;K8a8iI0xOspjNVwdcnpjEOYH7u/ BzCvbvnSIzFQAx+NAsHqiipPWwttr8aEJya02TM2CFFlvr3uhF9b9HetWrD4U/8AkQQsKh2te 3PPW3Rt7PK3qXOZcG3YpXHKHJ+VRZlN9DtUHlaPeRNS/Yhu/FZ2IFMoiq3mrf696QK75TKkNI Haa9I6IBVVKI0HBXC0lpBNtLpeijmkR+wH8cd1J+T12wd5ZlPLmgHM2C/wVI9MY+5jbEMiPG1 DM5glsUXFUm9II4PaSzO/u0fybGWj3WX+fFESsZ1+hbaV8KUijBeLrAVqOW02tLrVRNViyNqh WYlpJSJyWNWoLzYZegTVvYLQaC9Bugiu0+vMaBe+uvA9VBhCyztG/q/YouAwX7owzY7H+ON2+ jIzXLl5/eQCTfGYc18gqVhW4RygBwugoWLZu7hcHb94c6K1AgZxjMvHFfy/iIwS0RBnga5trI 7Tlq1kH80sFLe/pyiJB0qz77GtscScRBCru0Rqt46T22wKcZztjj23NshWoz+fkBvMkTFnx5M 8ZJXh0hD2sRibn2uhNBrR6cdo734y5N53SEvBeMqBSfXXlXAgkZKoz7FhUTvZy+KLig0upV4h rUWd6WLJ13cmlbC5KOzHmnY3NAeoKBnKfy/wlO+Zb6aiql+BHvnDPxYo29Cq0rxRb6EuipF7u Ot43YMBXiPBjwnKaduym7q9JgFJlmPMU7NSirjpzsIDl/8bAHV61V7Nt2E3RxuNtHVLg88fVX 41Z4v9lqpYPi+Y2sscB22apru2U9cX0rpRTz6QnUjnrfMwCTlahG4cSq6a9qmTby6V6OHt2kb I05By/2DFky4OXliyguKxseMtX4Os+sxTdCQCayD4qj9zWNvVTsYk54gwHz+Hy8Z13nDQDk4V z7/U4/xqbb0bDo2ABGCsfQDOyNQwhAAN8Mq41MrTbN0qXCXffBQAdwPQG Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Stefan Monnier writes: | (cl-labels): Add support for (FUNC EXP) bindings (bug#59786) | | Allow `cl-labels` to use the same (FUNC EXP) bindings as were already ad= ded | to `cl-flet` in Emacs-25. The Info doc (mistakenly) already documented = this | new feature. | | * lisp/emacs-lisp/cl-macs.el (cl--self-tco-on-form): New function. | (cl-labels): Use it to add support for (FUNC EXP) bindings. | | * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--labels): Add test for | tail-recursive (FUNC EXP) bindings. Thanks... but what happened to your `cl-lib-test-labels' ert test for "cl-lib-tests.el"? Michael. From unknown Sat Aug 16 21:23:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59786: Allowing arbitrary expressions in cl-labels Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Nov 2024 15:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59786 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Michael Heerdegen Cc: 59786@debbugs.gnu.org Received: via spool by 59786-submit@debbugs.gnu.org id=B59786.173151225019517 (code B ref 59786); Wed, 13 Nov 2024 15:38:02 +0000 Received: (at 59786) by debbugs.gnu.org; 13 Nov 2024 15:37:30 +0000 Received: from localhost ([127.0.0.1]:43162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBFQw-00054j-B8 for submit@debbugs.gnu.org; Wed, 13 Nov 2024 10:37:30 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:59938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBFQs-00054T-Hd for 59786@debbugs.gnu.org; Wed, 13 Nov 2024 10:37:28 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 5259B80995; Wed, 13 Nov 2024 10:37:19 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1731512238; bh=MzIMNDE8a5BzX9+mSTeRBvMwZVjvvBG+8eFhbUXcXjw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=I38Cm4+NPOw3WsKz7tukJBQDLAPIRpAe058oDuDJ5mJD38LhgSm3wU+1tELfb+Uy8 nfi+1L7D22zjOn6UHVtinIVshNeC19Cn7CU7ffK7QwgwTK9FsgXkwEqpLzr9Qzr+wK EYSufpPCenKXlHMywc4OQLPnsJ+qE2/28OwNRONKmZMKkdAGF2yFYjrrCh3xg/UHSR VJhjjFv/CZOGRRdzDsUeFpksCdRRMNmpz/GC6vVTZAnxIgRsyaOgdDKSR2ffEWiSZk RwMAq7J5ypOZ7n3kHdpRj8CGe9F2PCG9NuNfg/vVcvxoFdmYMcIp4LeWjT9/WU/klR HMxvLGljUKbMw== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 82D4680292; Wed, 13 Nov 2024 10:37:18 -0500 (EST) Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7211C1203BF; Wed, 13 Nov 2024 10:37:18 -0500 (EST) From: Stefan Monnier In-Reply-To: <87bjyjfd2q.fsf@web.de> (Michael Heerdegen's message of "Wed, 13 Nov 2024 15:00:45 +0100") Message-ID: References: <87r0vybl6f.fsf@web.de> <874j4vw0tq.fsf@web.de> <87bjyjfd2q.fsf@web.de> Date: Wed, 13 Nov 2024 10:37:17 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.174 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > | (cl-labels): Add support for (FUNC EXP) bindings (bug#59786) > | > | Allow `cl-labels` to use the same (FUNC EXP) bindings as were already added > | to `cl-flet` in Emacs-25. The Info doc (mistakenly) already documented this > | new feature. > | > | * lisp/emacs-lisp/cl-macs.el (cl--self-tco-on-form): New function. > | (cl-labels): Use it to add support for (FUNC EXP) bindings. > | > | * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--labels): Add test for > | tail-recursive (FUNC EXP) bindings. > > Thanks... but what happened to your `cl-lib-test-labels' ert test for > "cl-lib-tests.el"? I moved it to `cl-macs--labels` in `cl-macs-tests.el` after noticing that this is where the other `cl-labels` tests were. Stefan From unknown Sat Aug 16 21:23:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59786: Allowing arbitrary expressions in cl-labels Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Nov 2024 22:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59786 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: 59786@debbugs.gnu.org Received: via spool by 59786-submit@debbugs.gnu.org id=B59786.173153570923017 (code B ref 59786); Wed, 13 Nov 2024 22:09:01 +0000 Received: (at 59786) by debbugs.gnu.org; 13 Nov 2024 22:08:29 +0000 Received: from localhost ([127.0.0.1]:43988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBLXJ-0005zA-ES for submit@debbugs.gnu.org; Wed, 13 Nov 2024 17:08:29 -0500 Received: from mout.web.de ([212.227.15.3]:48113) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBLXG-0005yw-If for 59786@debbugs.gnu.org; Wed, 13 Nov 2024 17:08:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1731535695; x=1732140495; i=michael_heerdegen@web.de; bh=uyMqdgKo6bHmWJbR9lzwoQ4JtxVvnutSf2G23qTi5Ec=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=qqXxYwYvGMVcB5X38GY9qApeKCatmKzBFEVaj8ic0PXRFwuuPWRY47rKXnPKuc+W EAk5QV8cqek5ShP2CdKv6wTQ/2d/qcP7tQGE5sdSKGPLC8CGuc92lzKO5VE7itr/x 4fCvYrnsXI8+CPe9WXjqx6seUO3lZX30Tig3WRrFFS05wGVJav9jo8QS7xo8ASwQS lVP+HML0G5CWer8/w3+StYJgOLgSmgyEELWG+Pnt0DUdZ9zxlaOSmpg7Pfq+PNVSm dqEFZYi2aWufVWCnqAB2dbshOkmSKAXA053AN56nQtWKpV5uO1vMN3NxujDq9uMJM PK4UD/A4JX/7/Q1bVg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from drachen.dragon ([92.75.138.197]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1N4N98-1tsy4X2tjq-00wiWZ; Wed, 13 Nov 2024 23:08:15 +0100 From: Michael Heerdegen In-Reply-To: (Stefan Monnier's message of "Wed, 13 Nov 2024 10:37:17 -0500") References: <87r0vybl6f.fsf@web.de> <874j4vw0tq.fsf@web.de> <87bjyjfd2q.fsf@web.de> Date: Wed, 13 Nov 2024 23:09:17 +0100 Message-ID: <87a5e2eqgi.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:G1islZVEaZibjldZOQ3tlHA5Q5esiLcshVKr9xKJ5BDrvTjhHKo 71SYG5NmpyT1CUJlI/boaJaRCz4vwFpaIhjE3YyIOsRqEQpOQyIW3D3x6gBJVXHUPok50iH yWB2mBpeczd+JmR1EVbMyrNvhShoxveWr0/Rd6Y4WrghHC/Ce8kK+iwGauTDc1XzzBH66L+ YMPFT67P1fnPzGDGD8N4g== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:kEm1aA8NkXI=;fYjttCr0BQMYVAgJxhIMzl9ZEyl ZXu4TcEqhoHWSVrkGYxCKd6hpkCeDEW7OXdRi77JIiD/Z+9/t03g6+VtpJLa+RUpR32KrrFxn 9u3B6p6UGTagY5H7l44/UWO5tmnTLXcOrdzGCLi0YxKL+mY6DveSFA4k0yoJxltrZO5EI/Ho+ U9DQB9BE3Xa9RX5S9IcbWdQ/oqYMN2h+njvgjpti4B4PD8c3tk2EKTrND1bj087baSzkL2j5S 3JHaxIvptkGZZC6YEXA/4e2YS2W9bIOo3OZ4zcyH7hPsJKLRT29XE+/6BIIIkywIF7EawAGfm xnutA9nNCjOdZTpEiYPzKYGcWFeeATtbAKHrTTKFYWj8tR/qSzEKJQ1qTEMc+yJ6PLyDyK/VP FUL8M6OMfUjancc88/oZNYJkIfPory74mABM/i+j9uBwbFCCGQO52zNroI3WkAKLKVecnjj7h 3lb7oDMddkUnIsPgpbaOoad2wuAE0Q0Xx0oKTx5tnVMIe3m7bPYqob9ZCNTgaaZf6cwLXd6hL elsSU98Jn0V2IOexTfA7TtjpzB8RLRRriq4tsRfyMqSRT0z4CW5fiYmdQPyaYrhwRI5ibFO6j CDcRkdN1RI45yY3oej28CxjHWAC9cE+HXfjSsmBtLbSc7w35etbkRLPFbIL8eZpjS28PmlX8G qvPy7vM8pNXl2Vqiuf3xOGrh5p8YzXUlNCEJfJdAg+L2+t1ShWs1Mxvcd0C+dnhfbX6ZxNqpB tiA9DLS0s+b2iSrFWvrcAUH54bu2HsK+w8WG9ZHH0N8Wi6IxCbb+02wkK1KZq3YfytHsIq5J+ xx6syNweNZYxcKGXAagGqO8K2TVMHrniiYR/rwtB14oK57OfwJfA5dYoMvnW3FAqXsMLusuJM /C/zbGH51RFxDuD1EiwaVQBudt1JSPtvXTJZFlawRR44TMAN1p+ibHCws X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Stefan Monnier writes: > I moved it to `cl-macs--labels` in `cl-macs-tests.el` after noticing > that this is where the other `cl-labels` tests were. Ah ok, I had missed it. Thx, Michael.