From: Stefan Monnier Date: Fri, 8 Jun 2012 02:47:26 +0000 (-0400) Subject: * src/eval.c (Fmacroexpand): Stop if the macro returns the same form. X-Git-Tag: emacs-24.2.90~1199^2~474^2~97 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4f18a4ed84d7268090a92a194dcda40cae1197dd;p=emacs.git * src/eval.c (Fmacroexpand): Stop if the macro returns the same form. --- diff --git a/src/ChangeLog b/src/ChangeLog index 3acf12e4483..e16da43761f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-06-08 Stefan Monnier + + * eval.c (Fmacroexpand): Stop if the macro returns the same form. + 2012-06-07 Paul Eggert * doprnt.c (doprnt): Truncate multibyte char correctly. diff --git a/src/eval.c b/src/eval.c index 1da841a4073..85ff3ae19e6 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1020,7 +1020,13 @@ definitions to shadow the loaded ones for use in file byte-compilation. */) if (NILP (expander)) break; } - form = apply1 (expander, XCDR (form)); + { + Lisp_Object newform = apply1 (expander, XCDR (form)); + if (EQ (form, newform)) + break; + else + form = newform; + } } return form; }