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

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

bug#15814: 24.3.50; Signal error on malformed bindings in `cl-symbol-mac


From: Stefan Monnier
Subject: bug#15814: 24.3.50; Signal error on malformed bindings in `cl-symbol-macrolet' (patch)
Date: Tue, 05 Nov 2013 19:46:45 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> --- a/lisp/emacs-lisp/cl-macs.el
> +++ b/lisp/emacs-lisp/cl-macs.el
> @@ -1988,6 +1988,8 @@ by EXPANSION, and (setq NAME ...) will act like (setf 
> EXPANSION ...).
>         (cl-symbol-macrolet ,(cdr bindings) ,@body)))
>     ((null bindings) (macroexp-progn body))
>     (t
> +    (cl-assert (and (cdar bindings) (null (cl-cddar bindings))) nil
> +            "Malformed `cl-symbol-macrolet' binding: %S" (car bindings))
>      (let ((previous-macroexpand (symbol-function 'macroexpand)))
>        (unwind-protect
>            (progn

Good idea.  Could you try and use macroexp--warn-and-return instead, so
we get a file&line location when byte-compiling?

BTW, the same holds for the "let" sanity checks you added to cconv
(which should probably be moved to macroexp, now that I think about it,
so we can remove them from bytecomp.el).


        Stefan





reply via email to

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