Subject: bug#47550: closed (Re: bug#47550: [PATCH] elisp mode doesn't support non-list argument lists)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 02 Apr 2021 16:12:02 +0000

Your bug report

#47550: [PATCH] elisp mode doesn't support non-list argument lists

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
47550: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=47550
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#47550: [PATCH] elisp mode doesn't support non-list argument lists
From: Mikael Djurfeldt <[email-masked]>
To: [email-masked]
Date: Fri, 2 Apr 2021 18:11:08 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Subject: [PATCH] elisp mode doesn't support non-list argument lists
From: Vasilij Schneidermann <[email-masked]>
To: [email-masked]
Date: Thu, 1 Apr 2021 18:18:21 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

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.
From f3a7bd452e476f5769972ab2cac6da1cf4997c4f Mon Sep 17 00:00:00 2001
From: Vasilij Schneidermann <[email-masked]>
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/elisp/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))
-- 
2.31.1