/[cmucl]/src/code/macros.lisp
ViewVC logotype

Diff of /src/code/macros.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.119 by rtoy, Tue Apr 27 23:29:30 2010 UTC revision 1.120 by rtoy, Tue May 25 20:04:33 2010 UTC
# Line 150  Line 150 
150    "Define a compiler-macro for NAME."    "Define a compiler-macro for NAME."
151    (let ((whole (gensym "WHOLE-"))    (let ((whole (gensym "WHOLE-"))
152          (environment (gensym "ENV-")))          (environment (gensym "ENV-")))
153      (multiple-value-bind      (multiple-value-bind (validp block-name)
154          (body local-decs doc)          (valid-function-name-p name)
155          (parse-defmacro lambda-list whole body name 'define-compiler-macro        (unless validp
156                          :environment environment)          (simple-program-error (intl:gettext "~S is not a valid function name.") name))
157        (when doc        (multiple-value-bind
158          (intl::note-translatable intl::*default-domain* doc))              (body local-decs doc)
159        (let ((def `(lambda (,whole ,environment)            (parse-defmacro lambda-list whole body name 'define-compiler-macro
160                      ,@local-decs                            :environment environment)
161                      (block ,name          (when doc
162                        ,body))))            (intl::note-translatable intl::*default-domain* doc))
163          `(progn          (let ((def `(lambda (,whole ,environment)
164             (eval-when (:compile-toplevel)                        ,@local-decs
165               (c::do-compiler-macro-compile-time ',name #',def))                        (block ,block-name
166             (eval-when (:load-toplevel :execute)                          ,body))))
167               (c::%define-compiler-macro ',name #',def ',lambda-list ,doc)))))))            `(progn
168                 (eval-when (:compile-toplevel)
169                   (c::do-compiler-macro-compile-time ',name #',def))
170                 (eval-when (:load-toplevel :execute)
171                   (c::%define-compiler-macro ',name #',def ',lambda-list ,doc))))))))
172    
173    
174  (defun c::%define-compiler-macro (name definition lambda-list doc)  (defun c::%define-compiler-macro (name definition lambda-list doc)

Legend:
Removed from v.1.119  
changed lines
  Added in v.1.120

  ViewVC Help
Powered by ViewVC 1.1.5