From bb3a045501281f7aafe800f729c253688780fc48 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Wed, 22 Sep 2021 23:46:59 +0200 Subject: Improve error messaging from byte-compiling dotted lists * lisp/emacs-lisp/cconv.el (cconv-analyze-form): Improve error messaging when byte-compiling dotted lists (bug#35186). Test case -- byte-compile the following file: ;;; -*- lexical-binding: t -*- (defun foo () (+ 1 2) (a . b)) --- lisp/emacs-lisp/cconv.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el index ba29e4ec85e..0a6b04b4c1f 100644 --- a/lisp/emacs-lisp/cconv.el +++ b/lisp/emacs-lisp/cconv.el @@ -794,6 +794,8 @@ This function does not return anything but instead fills the ;; (`(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) -- cgit v1.2.3