Mercurial > hg > xemacs-beta
comparison lisp/cl.el @ 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 | f2881cb841b4 |
children | 855b667dea13 |
comparison
equal
deleted
inserted
replaced
5530:17bcc2aab111 | 5531:1b054bc2ac40 |
---|---|
232 eq-hash) | 232 eq-hash) |
233 (while (progn (setq cl-macro | 233 (while (progn (setq cl-macro |
234 (macroexpand-internal cl-macro cl-macro-environment)) | 234 (macroexpand-internal cl-macro cl-macro-environment)) |
235 (and (symbolp cl-macro) | 235 (and (symbolp cl-macro) |
236 (setq eq-hash (eq-hash cl-macro)) | 236 (setq eq-hash (eq-hash cl-macro)) |
237 (if (fixnump eq-hash) | 237 (cdr (if (fixnump eq-hash) |
238 (assq eq-hash cl-macro-environment) | 238 (assq eq-hash cl-macro-environment) |
239 (assoc eq-hash cl-macro-environment)))) | 239 (assoc eq-hash cl-macro-environment))))) |
240 (setq cl-macro (cadr (assoc* eq-hash cl-macro-environment)))) | 240 (setq cl-macro (cadr (assoc* eq-hash cl-macro-environment)))) |
241 cl-macro)) | 241 cl-macro)) |
242 | 242 |
243 ;;; Declarations. | 243 ;;; Declarations. |
244 | 244 |