# HG changeset patch # User Aidan Kehoe # Date 1309699059 -3600 # Node ID 1b054bc2ac40913a80076e3958dc7b81e840253d # Parent 17bcc2aab11161bf7fd501f045072f1a09625ff7 Allow disabling a symbol macro with a macro environment, #'cl-macroexpand 2011-07-03 Aidan Kehoe * 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. diff -r 17bcc2aab111 -r 1b054bc2ac40 lisp/ChangeLog --- 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 + + * 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 * gtk-init.el: diff -r 17bcc2aab111 -r 1b054bc2ac40 lisp/cl.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))