diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-09-22 23:46:59 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-09-22 23:47:04 +0200 |
commit | bb3a045501281f7aafe800f729c253688780fc48 (patch) | |
tree | 4c5fa624eb5392ac7bb7b246ee28eb097a82d59d /lisp/emacs-lisp | |
parent | 25019f5e249f39614f4f48b34a461b9f85b5416a (diff) | |
download | emacs-bb3a045501281f7aafe800f729c253688780fc48.tar.gz emacs-bb3a045501281f7aafe800f729c253688780fc48.tar.bz2 emacs-bb3a045501281f7aafe800f729c253688780fc48.zip |
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))
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/cconv.el | 2 |
1 files changed, 2 insertions, 0 deletions
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) |