GNU bug report logs - #35186
26.1; confusing error message and location on eager dotted pair evaluation

Previous Next

Package: emacs;

Reported by: Ernesto Alfonso <erjoalgo <at> gmail.com>

Date: Sun, 7 Apr 2019 21:30:01 UTC

Severity: minor

Found in version 26.1

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: Ernesto Alfonso <erjoalgo <at> gmail.com>, 35186 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#35186: 26.1; confusing error message and location on eager dotted pair evaluation
Date: Thu, 20 Aug 2020 18:28:11 +0200
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> Lars Ingebrigtsen <larsi <at> 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 <at> 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




This bug report was last modified 3 years and 238 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.