From 49b2e83db4e53168cfdef4caf0c9ea975397e044 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 16 Jun 2010 17:11:06 -0400 Subject: * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Don't handle `lambda' specially, since it's a macro. Fix up wrong hint passed to maybe-cons. --- lisp/emacs-lisp/macroexp.el | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lisp/emacs-lisp/macroexp.el') diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index 364e3540703..aabf940964b 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -134,7 +134,7 @@ Assumes the caller has bound `macroexpand-all-environment'." (maybe-cons fun (maybe-cons (macroexpand-all-forms (cadr form) 2) nil - (cadr form)) + (cdr form)) form) form)) ((memq fun '(let let*)) @@ -145,11 +145,6 @@ Assumes the caller has bound `macroexpand-all-environment'." form)) ((eq fun 'quote) form) - ((and (consp fun) (eq (car fun) 'lambda)) - ;; embedded lambda - (maybe-cons (macroexpand-all-forms fun 2) - (macroexpand-all-forms (cdr form)) - form)) ;; The following few cases are for normal function calls that ;; are known to funcall one of their arguments. The byte ;; compiler has traditionally handled these functions specially -- cgit v1.2.3 From e20f04215a264939f74306fa7a29deb97bad3f1c Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 16 Jun 2010 20:17:22 -0400 Subject: * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Put back special handling for `lambda' (misunderstanding). --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/macroexp.el | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'lisp/emacs-lisp/macroexp.el') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ce2560ffa8e..479d8673bf1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-06-17 Stefan Monnier + + * emacs-lisp/macroexp.el (macroexpand-all-1): Put back special + handling for `lambda' (misunderstanding). + 2010-06-16 Jay Belanger * calc/calc-poly.el: (math-accum-factors): Make sure that diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index aabf940964b..876b9a468ac 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -145,6 +145,11 @@ Assumes the caller has bound `macroexpand-all-environment'." form)) ((eq fun 'quote) form) + ((and (consp fun) (eq (car fun) 'lambda)) + ;; Embedded lambda in function position. + (maybe-cons (macroexpand-all-forms fun 2) + (macroexpand-all-forms (cdr form)) + form)) ;; The following few cases are for normal function calls that ;; are known to funcall one of their arguments. The byte ;; compiler has traditionally handled these functions specially -- cgit v1.2.3