Changeset 5060


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

DEFMACRO sets arglist

Location:
trunk/j/src/org/armedbear/lisp
Files:
2 edited

Legend:

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

    r5048 r5060  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Primitives.java,v 1.521 2003-12-10 08:55:00 asimon Exp $
     5 * $Id: Primitives.java,v 1.522 2003-12-10 21:34:50 asimon Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    14561456            else
    14571457                symbol.setSymbolFunction(macroObject);
     1458      macroObject.setArglist(lambdaList);
    14581459            LispThread.currentThread().clearValues();
    14591460            return symbol;
  • 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.