Changeset 10189


Ignore:
Timestamp:
10/22/05 19:34:45 (16 years ago)
Author:
piso
Message:

Documentation.

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

Legend:

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

    r10137 r10189  
    33 *
    44 * Copyright (C) 2002-2005 Peter Graves
    5  * $Id: Primitives.java,v 1.835 2005-10-17 18:06:41 piso Exp $
     5 * $Id: Primitives.java,v 1.836 2005-10-22 19:34:25 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    30533053    };
    30543054
    3055     // ### fset name function &optional source-position arglist => function
     3055    // ### fset name function &optional source-position arglist documentation
     3056    // => function
    30563057    private static final Primitive FSET =
    30573058        new Primitive("fset", PACKAGE_SYS, true)
     
    30603061            throws ConditionThrowable
    30613062        {
    3062             return execute(first, second, NIL, NIL);
    3063         }
    3064 
     3063            return execute(first, second, NIL, NIL, NIL);
     3064        }
    30653065        public LispObject execute(LispObject first, LispObject second,
    30663066                                  LispObject third)
    30673067            throws ConditionThrowable
    30683068        {
    3069             return execute(first, second, third, NIL);
    3070         }
    3071 
     3069            return execute(first, second, third, NIL, NIL);
     3070        }
    30723071        public LispObject execute(LispObject first, LispObject second,
    30733072                                  LispObject third, LispObject fourth)
     3073            throws ConditionThrowable
     3074        {
     3075            return execute(first, second, third, fourth, NIL);
     3076        }
     3077        public LispObject execute(LispObject first, LispObject second,
     3078                                  LispObject third, LispObject fourth,
     3079                                  LispObject fifth)
    30743080            throws ConditionThrowable
    30753081        {
     
    30973103                return signal(new TypeError(first, FUNCTION_NAME));
    30983104            if (second instanceof Operator) {
    3099                 ((Operator)second).setLambdaName(first);
     3105                Operator op = (Operator) second;
     3106                op.setLambdaName(first);
    31003107                if (fourth != NIL)
    3101                     ((Operator)second).setLambdaList(fourth);
     3108                    op.setLambdaList(fourth);
     3109                if (fifth != NIL)
     3110                    op.setDocumentation(Symbol.FUNCTION, fifth);
    31023111            }
    31033112            return second;
     
    57685777            throws ConditionThrowable
    57695778        {
    5770             return object.getDocumentation(docType);
     5779            LispObject doc = object.getDocumentation(docType);
     5780            if (doc == NIL) {
     5781                if (docType == Symbol.FUNCTION && object instanceof Symbol) {
     5782                    LispObject function = object.getSymbolFunction();
     5783                    if (function != null)
     5784                        doc = function.getDocumentation(docType);
     5785                }
     5786            }
     5787            return doc;
    57715788        }
    57725789    };
  • trunk/j/src/org/armedbear/lisp/describe.lisp

    r9976 r10189  
    22;;;
    33;;; Copyright (C) 2005 Peter Graves
    4 ;;; $Id: describe.lisp,v 1.4 2005-09-15 10:47:14 piso Exp $
     4;;; $Id: describe.lisp,v 1.5 2005-10-22 19:34:45 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    6666           (format stream "Its function binding is ~S.~%" function)
    6767           (describe-arglist function stream)))
    68        (let ((docstring (get object '%function-documentation)))
    69          (when docstring
    70            (format stream "Function documentation:~%  ~A~%" docstring)))
     68       (let ((doc (documentation object 'function)))
     69         (when doc
     70           (format stream "Function documentation:~%  ~A~%" doc)))
    7171       (let ((plist (symbol-plist object)))
    7272         (when plist
Note: See TracChangeset for help on using the changeset viewer.