bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#35186: 26.1; confusing error message and location on eager dotted pa


From: Lars Ingebrigtsen
Subject: bug#35186: 26.1; confusing error message and location on eager dotted pair evaluation
Date: Thu, 20 Aug 2020 18:28:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> I've tried sprinkling some messaging liberally over cconv-analyze-form,
>> and I'm unable to make it trigger in the test case.  It does seem likely
>> that the error is from a dolist somewhere, but it seems to happen before
>> we get to that function...
>
> Did you enable lexical-binding mode?  I guess it will make a difference.
> A had done it AFAIR.

Ah, yes, that made a difference.  With the following patch I get:

larsi@xo:~/src/emacs/trunk$ emake ; ./src/emacs -Q --batch -f 
batch-byte-compile /tmp/r.el
  ELC      emacs-lisp/cconv.elc

In toplevel form:
/tmp/r.el:3:1: Error: Wrong type argument: proper-list-p, (a . b)

Does this makes sense to everybody?

diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el
index 351a097ad1..c024cda876 100644
--- a/lisp/emacs-lisp/cconv.el
+++ b/lisp/emacs-lisp/cconv.el
@@ -750,6 +750,8 @@ cconv-analyze-form
     ;; (`(declare . ,_) nil)               ;The args don't contain code.
 
     (`(,_ . ,body-forms)    ; First element is a function or whatever.
+     (unless (listp body-forms)
+       (signal 'wrong-type-argument (list 'proper-list-p form)))
      (dolist (form body-forms) (cconv-analyze-form form env)))
 
     ((pred symbolp)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]