changeset 5531:1b054bc2ac40

Allow disabling a symbol macro with a macro environment, #'cl-macroexpand 2011-07-03 Aidan Kehoe <kehoea@parhasard.net> * cl.el (cl-macroexpand): Allow code to disable a given symbol macro while expanding code by prepending a cons with a nil cdr to the macro environment.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 03 Jul 2011 14:17:39 +0100
parents 17bcc2aab111
children 69a08906ad27 11da5b828d10
files lisp/ChangeLog lisp/cl.el
diffstat 2 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Jun 28 18:34:26 2011 +0100
+++ b/lisp/ChangeLog	Sun Jul 03 14:17:39 2011 +0100
@@ -1,3 +1,9 @@
+2011-07-03  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* cl.el (cl-macroexpand):
+	Allow code to disable a given symbol macro while expanding code by
+	prepending a cons with a nil cdr to the macro environment.
+
 2011-06-25  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* gtk-init.el:
--- a/lisp/cl.el	Tue Jun 28 18:34:26 2011 +0100
+++ b/lisp/cl.el	Sun Jul 03 14:17:39 2011 +0100
@@ -234,9 +234,9 @@
 			(macroexpand-internal cl-macro cl-macro-environment))
 		  (and (symbolp cl-macro)
 		       (setq eq-hash (eq-hash cl-macro))
-		       (if (fixnump eq-hash)
-			   (assq eq-hash cl-macro-environment)
-			 (assoc eq-hash cl-macro-environment))))
+		       (cdr (if (fixnump eq-hash)
+                                (assq eq-hash cl-macro-environment)
+                              (assoc eq-hash cl-macro-environment)))))
       (setq cl-macro (cadr (assoc* eq-hash cl-macro-environment))))
     cl-macro))