Subject: Re: bug#15814: 24.3.50; Signal error on malformed bindings in `cl-symbol-macrolet' (patch)

From: Nathan Trapuzzano <[email-masked]>
Date: Fri, 08 Nov 2013 21:06:34 -0500

Stefan Monnier <[email-masked]> writes:

>> We can make cconv work while preserving the malformed bindings, but when
>> the compiler prints the warnings, there's a good chance that the
>> malformed binding that gets printed will not look like the binding as it
>> appears in the source, since cconv might transform the VALUE part.
>> Therefore I think it's preferable to use byte-compile-log-warning in
>> cconv.
>
> OK, fair enough,

# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: [email-masked]
# target_branch: file:///home/nathan/opt/etc/bzr-repos/emacs/trunk/
# testament_sha1: a475ad3ca1826fb0b56abf8dfb460185dd5fd144
# timestamp: 2013-11-08 20:28:15 -0500
# base_revision_id: [email-masked]
# 
# Begin patch
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2013-11-08 11:22:52 +0000
+++ lisp/ChangeLog	2013-11-09 01:04:52 +0000
@@ -1,3 +1,8 @@
+2013-11-09  Nathan Trapuzzano  <[email-masked]>
+
+	* emacs-lisp/cconv.el (cconv-convert): Print warning instead of
+	throwing error over malrofmed let/let*.
+
 2013-11-08  Dmitry Gutov  <[email-masked]>
 
 	* progmodes/ruby-mode.el (ruby-smie--indent-to-stmt): Use

=== modified file 'lisp/emacs-lisp/cconv.el'
--- lisp/emacs-lisp/cconv.el	2013-11-04 19:48:07 +0000
+++ lisp/emacs-lisp/cconv.el	2013-11-08 16:50:27 +0000
@@ -291,9 +291,9 @@
          (let* ((value nil)
 		(var (if (not (consp binder))
 			 (prog1 binder (setq binder (list binder)))
-		       (cl-assert (null (cdr (cdr binder))) nil
-				  "malformed let binding: `%s'"
-                                  (prin1-to-string binder))
+                       (when (cddr binder)
+                         (byte-compile-log-warning
+                          (format "Malformed `%S' binding: %S" letsym binder)))
 		       (setq value (cadr binder))
 		       (car binder)))
 		(new-val

# Begin bundle
IpwoSAzypyIA