From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 01 12:18:37 2021 Received: (at submit) by debbugs.gnu.org; 1 Apr 2021 16:18:37 +0000 Received: from localhost ([127.0.0.1]:58418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lS01k-0004b1-TI for submit@debbugs.gnu.org; Thu, 01 Apr 2021 12:18:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:57182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lS01j-0004ar-2W for submit@debbugs.gnu.org; Thu, 01 Apr 2021 12:18:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lS01i-0001ql-Tg for bug-guile@gnu.org; Thu, 01 Apr 2021 12:18:34 -0400 Received: from mout-p-202.mailbox.org ([2001:67c:2050::465:202]:60140) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1lS01g-00059o-P2 for bug-guile@gnu.org; Thu, 01 Apr 2021 12:18:34 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4FB7ds5kbczQk1m for ; Thu, 1 Apr 2021 18:18:25 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id es4w1GZecBSK for ; Thu, 1 Apr 2021 18:18:22 +0200 (CEST) Date: Thu, 1 Apr 2021 18:18:21 +0200 From: Vasilij Schneidermann To: bug-guile@gnu.org Subject: [PATCH] elisp mode doesn't support non-list argument lists Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3/c6/I9c63BJzxhK" Content-Disposition: inline X-MBO-SPAM-Probability: X-Rspamd-Score: -6.99 / 15.00 / 15.00 X-Rspamd-Queue-Id: CC76016F2 X-Rspamd-UID: d977c5 Received-SPF: pass client-ip=2001:67c:2050::465:202; envelope-from=mail@vasilij.de; helo=mout-p-202.mailbox.org X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) 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.6 (--) --3/c6/I9c63BJzxhK Content-Type: multipart/mixed; boundary="iXVoRSAvImT/v7j/" Content-Disposition: inline --iXVoRSAvImT/v7j/ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline When I've tried porting existing elisp code, I've found that `(defun foo nil 1)` errors out (on Guile 3 and master) , but `(defun foo () 1)` doesn't. The following patch rectifies this by treating `nil` the same as `()` when compiling a lambda. --iXVoRSAvImT/v7j/ Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-elisp-Handle-nil-argument-list.patch" Content-Transfer-Encoding: quoted-printable =46rom f3a7bd452e476f5769972ab2cac6da1cf4997c4f Mon Sep 17 00:00:00 2001 =46rom: Vasilij Schneidermann Date: Thu, 1 Apr 2021 18:05:07 +0200 Subject: [PATCH] elisp: Handle nil argument list * module/language/elisp/compile-tree.scm (parse-lambda-list): Handle nil the same as (). --- module/language/elisp/compile-tree-il.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/module/language/elisp/compile-tree-il.scm b/module/language/el= isp/compile-tree-il.scm index 0334e6f33..adbeb2005 100644 --- a/module/language/elisp/compile-tree-il.scm +++ b/module/language/elisp/compile-tree-il.scm @@ -259,6 +259,7 @@ (define (%match lst null optional rest symbol) (pmatch lst (() (null)) + (nil (null)) ((&optional . ,tail) (optional tail)) ((&rest . ,tail) (rest tail)) ((,arg . ,tail) (guard (symbol? arg)) (symbol arg tail)) --=20 2.31.1 --iXVoRSAvImT/v7j/-- --3/c6/I9c63BJzxhK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEE0dAcySl3bqM8O17WFmfJg6zCifoFAmBl8kUACgkQFmfJg6zC ifrH6Qf7B1r82LgREK4VqfQ6hkWT4O8dWrJ6A36HUoT5diSNS+P1K2vKGyiNl8rw RXPPbRx4EkD7uAUq8l2OMTqajDTzK5jlfimU6UIseVfrDjRM2B1cZ92zZ39jJsJu ca0uWC4tH76fVWURJOBPw8/cpeSn2aEa9B5Mf1vCl5pzaWm0DwuGe8Uc7k8mznEp XmnKrJe4in2vb/jdkJ99BKw5pvyK9AVSLyLpiTcbkuMcPHLELDeE7AxN5wjpejqh VShbHJ3nXiO8W+MQQ8AbZ07In1EmtIcPWejMDG6SBFB+vdi9Euqzw4bfJxPhciVS IotR4/4jNjLARbaiR7L8ou74XhgtRA== =xTpt -----END PGP SIGNATURE----- --3/c6/I9c63BJzxhK-- From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 01 14:59:14 2021 Received: (at 47550) by debbugs.gnu.org; 1 Apr 2021 18:59:14 +0000 Received: from localhost ([127.0.0.1]:58689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lS2XC-0000U1-CP for submit@debbugs.gnu.org; Thu, 01 Apr 2021 14:59:14 -0400 Received: from mail-vs1-f42.google.com ([209.85.217.42]:35695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lS2XA-0000Tk-8N for 47550@debbugs.gnu.org; Thu, 01 Apr 2021 14:59:13 -0400 Received: by mail-vs1-f42.google.com with SMTP id h11so1735096vsl.2 for <47550@debbugs.gnu.org>; Thu, 01 Apr 2021 11:59:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=NpaZdgihhVtgeCJijyieo5NiLqnfaAVJ0MHfetNWWRY=; b=SznRlSBdUVpVSnCLePUtBcdQc9GvkTU9NGd/lL2vkBfrK1CdMdV0xp5vSvTdA/0L98 orH25HR4UVly+XT+3SYl8qBSAbHBDlP5c6cJPGnVulJ5Aw4npbnw3vsK164ljBEY+Z3U NvqlJvmd9H7nMglwNuq9qCoYmF8nPtqb8WHrI69q+972aPEtTk8tfUaCCQFd/trZb62c KNI86K0ScWp/W60Jl998FG3bpC/AMefk0niZN2jkN6kkXhqbD7v1qMMx+9kJLMMT6GRb QNeifuQjFONBg2B5Tths3uefLAzLopt0Zw7m7C36tePpqOkmK+AR4QgkpjTvvV23Yvuo t5rQ== X-Gm-Message-State: AOAM533dhdu4Tj+CyuaxwLk8E2SjS1oYBbHfG5oOX9xhiUiqWhI1WWcG NUAg/Jy0defz4HYqFlaIYZPHbz0E0ZdLCauHEtqwwCqe6Uv4yA== X-Google-Smtp-Source: ABdhPJwm9F0QwyMz5G5L3OwYAb+2tGUXssfHfGY7vk1UEt+2lhKECCRfIOBYVuRirrxZWJwBj9PMLgB0tK/VQjFpntQ= X-Received: by 2002:a67:f995:: with SMTP id b21mr7040808vsq.6.1617303546559; Thu, 01 Apr 2021 11:59:06 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Mikael Djurfeldt Date: Thu, 1 Apr 2021 20:58:55 +0200 Message-ID: Subject: Re: bug#47550: [PATCH] elisp mode doesn't support non-list argument lists To: Vasilij Schneidermann Content-Type: multipart/alternative; boundary="00000000000062fe2c05beedd38c" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 47550 Cc: 47550@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: , Reply-To: mikael@djurfeldt.com Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --00000000000062fe2c05beedd38c Content-Type: text/plain; charset="UTF-8" Fixed in commit 01bfd18f. Thanks! On Thu, Apr 1, 2021 at 6:19 PM Vasilij Schneidermann wrote: > When I've tried porting existing elisp code, I've found that `(defun foo > nil 1)` errors out (on Guile 3 and master) , but `(defun foo () 1)` > doesn't. The following patch rectifies this by treating `nil` the same > as `()` when compiling a lambda. > --00000000000062fe2c05beedd38c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Fixed in commit 01bfd18f.

Th= anks!

On Thu, Apr 1, 2021 at 6:19 PM Vasilij Schneidermann <mail@vasilij.de> wrote:
When I've tried porting= existing elisp code, I've found that `(defun foo
nil 1)` errors out (on Guile 3 and master) , but `(defun foo () 1)`
doesn't. The following patch rectifies this by treating `nil` the same<= br> as `()` when compiling a lambda.
--00000000000062fe2c05beedd38c-- From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 02 12:11:28 2021 Received: (at 47550-done) by debbugs.gnu.org; 2 Apr 2021 16:11:28 +0000 Received: from localhost ([127.0.0.1]:32780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lSMON-00059m-Vv for submit@debbugs.gnu.org; Fri, 02 Apr 2021 12:11:28 -0400 Received: from mail-ua1-f46.google.com ([209.85.222.46]:37729) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lSMOL-00059Z-Ur for 47550-done@debbugs.gnu.org; Fri, 02 Apr 2021 12:11:26 -0400 Received: by mail-ua1-f46.google.com with SMTP id e1so1588139uaa.4 for <47550-done@debbugs.gnu.org>; Fri, 02 Apr 2021 09:11:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to; bh=dQKbDEOLwtgWsurMIyrMOfMFo+cZUpSiXytAAtIyTIY=; b=QJkypuqc/BmiL3cYbSxGe6QK+pRRCgnCDhhsmyhE9kzup/VQGXuu//c7Q7eJ0Krluq fi+SNTyEcqHyRHMN3rd44uACOpdoVlMVSSKmeliyTDI/kUP/gqbf03KUQ8qVBDQs5gjl bdCduh9hCSPWJg2G4n3wcavQ8LDJpAu/Rc7W4qa2UBvNbmyxsDnLqTUVqh1UPKp0qGyd fBzoQ4ReT7psqXX0OJCeDUgp5wDeCoBXL6TPKLeeh+YdWu4/a/2rIajMDcNdP+fGxS1H Krvu+ix8SgH+DMh2CDLrw5xwDmBQc3sT0NvBw9jcrJ35zNadKsEXbZKXOfzkKKzGM1Kx q94A== X-Gm-Message-State: AOAM531vpzrf/n1xfC8DqEQ4/uc/IKcHwZkZER1y5vfV0iZDooKfagGq f/CsGBs0g/+PcgZGKKdr0P8lP7aABXW9AwDGpiMPeri5KRY= X-Google-Smtp-Source: ABdhPJyoy9JY4M5pMw+T3aZL2ZDKIC530mHUUQNZaGmMCH3+ThFKLq6saDgcJW9UgAYFYe0p0AOPS7HE9OTgkaqVUeE= X-Received: by 2002:a9f:2d95:: with SMTP id v21mr8549747uaj.78.1617379880271; Fri, 02 Apr 2021 09:11:20 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Mikael Djurfeldt Date: Fri, 2 Apr 2021 18:11:08 +0200 Message-ID: Subject: Re: bug#47550: [PATCH] elisp mode doesn't support non-list argument lists To: 47550-done@debbugs.gnu.org Content-Type: multipart/alternative; boundary="0000000000003b032005beff99a6" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 47550-done 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: , Reply-To: mikael@djurfeldt.com Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --0000000000003b032005beff99a6 Content-Type: text/plain; charset="UTF-8" --0000000000003b032005beff99a6 Content-Type: text/html; charset="UTF-8"
--0000000000003b032005beff99a6-- From unknown Fri Sep 05 20:37:06 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 01 May 2021 11:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator