From 306e7308ba76ce1e1d1300aade7c79418b60ef4a Mon Sep 17 00:00:00 2001 From: Nathan Trapuzzano Date: Mon, 4 Nov 2013 14:48:07 -0500 Subject: [PATCH] * lisp/emacs-lisp/cconv.el (cconv-convert): Check form of let binding. Fixes: debbugs:15786 --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/cconv.el | 15 +++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d3760e4c626..02513660ff0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-11-04 Nathan Trapuzzano (tiny change) + + * emacs-lisp/cconv.el (cconv-convert): Check form of let binding + (bug#15786). + 2013-11-04 Stefan Monnier * emacs-lisp/helpers.el: Move from helpers.el. Use lexical-binding. diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el index f24e503fd6d..2a236b35e56 100644 --- a/lisp/emacs-lisp/cconv.el +++ b/lisp/emacs-lisp/cconv.el @@ -289,12 +289,15 @@ places where they originally did not directly appear." (dolist (binder binders) (let* ((value nil) - (var (if (not (consp binder)) - (prog1 binder (setq binder (list binder))) - (setq value (cadr binder)) - (car binder))) - (new-val - (cond + (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)) + (setq value (cadr binder)) + (car binder))) + (new-val + (cond ;; Check if var is a candidate for lambda lifting. ((and (member (cons binder form) cconv-lambda-candidates) (progn -- 2.39.2