comparison lisp/cl.el @ 5476:f2881cb841b4

Merged with trunk.
author Mats Lidell <matsl@xemacs.org>
date Tue, 26 Apr 2011 23:41:47 +0200
parents 248176c74e6b 97ac18bd1fa3
children 1b054bc2ac40
comparison
equal deleted inserted replaced
5475:248176c74e6b 5476:f2881cb841b4
225 Otherwise, the macro is expanded and the expansion is considered 225 Otherwise, the macro is expanded and the expansion is considered
226 in place of FORM. When a non-macro-call results, it is returned. 226 in place of FORM. When a non-macro-call results, it is returned.
227 227
228 The second optional arg ENVIRONMENT specifies an environment of macro 228 The second optional arg ENVIRONMENT specifies an environment of macro
229 definitions to shadow the loaded ones for use in file byte-compilation." 229 definitions to shadow the loaded ones for use in file byte-compilation."
230 (let ((cl-macro-environment cl-env)) 230 (let ((cl-macro-environment
231 (while (progn (setq cl-macro (funcall cl-old-macroexpand cl-macro cl-env)) 231 (if cl-macro-environment (append cl-env cl-macro-environment) cl-env))
232 eq-hash)
233 (while (progn (setq cl-macro
234 (macroexpand-internal cl-macro cl-macro-environment))
232 (and (symbolp cl-macro) 235 (and (symbolp cl-macro)
233 (cdr (assq (symbol-name cl-macro) cl-env)))) 236 (setq eq-hash (eq-hash cl-macro))
234 (setq cl-macro (cadr (assq (symbol-name cl-macro) cl-env)))) 237 (if (fixnump eq-hash)
238 (assq eq-hash cl-macro-environment)
239 (assoc eq-hash cl-macro-environment))))
240 (setq cl-macro (cadr (assoc* eq-hash cl-macro-environment))))
235 cl-macro)) 241 cl-macro))
236 242
237 ;;; Declarations. 243 ;;; Declarations.
238 244
239 (defvar cl-compiling-file nil) 245 (defvar cl-compiling-file nil)