Ignore:
Timestamp:
12/10/03 21:35:17 (18 years ago)
Author:
asimon
Message:

DEFMACRO sets arglist

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/precompiler.lisp

    r4997 r5060  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: precompiler.lisp,v 1.19 2003-12-07 01:16:53 piso Exp $
     4;;; $Id: precompiler.lisp,v 1.20 2003-12-10 21:35:17 asimon Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    553553
    554554;; Redefine DEFMACRO to compile the expansion function on the fly.
     555
    555556(defmacro defmacro (name lambda-list &rest body)
    556557  (let* ((form (gensym))
     
    560561         (expander `(lambda (,form ,env) (block ,name ,body))))
    561562    `(progn
    562        (if (special-operator-p ',name)
    563            (%put ',name
    564                  'macroexpand-macro
    565                  (make-macro (or (precompile nil ,expander) ,expander)))
    566            (fset ',name
    567                  (make-macro (or (precompile nil ,expander) ,expander))))
    568        ',name)))
     563       (let ((mac (make-macro (or (precompile nil ,expander) ,expander))))
     564   (if (special-operator-p ',name)
     565           (%put ',name 'macroexpand-macro mac)
     566           (fset ',name mac))
     567   (%set-arglist mac ',lambda-list)
     568   ',name))))
    569569
    570570;; Make an exception just this one time...
     
    577577     (precompile ',name)
    578578     ',name))
     579
     580
Note: See TracChangeset for help on using the changeset viewer.