Ignore:
Timestamp:
10/12/03 01:21:56 (19 years ago)
Author:
piso
Message:

ENSURE-GENERIC-FUNCTION: signal a program error if the function name is already fbound.

File:
1 edited

Legend:

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

    r4319 r4320  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: defclass.lisp,v 1.13 2003-10-11 20:41:28 piso Exp $
     4;;; $Id: defclass.lisp,v 1.14 2003-10-12 01:21:56 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    644644;;; ensure-generic-function
    645645
    646 (defun ensure-generic-function
    647   (function-name
    648    &rest all-keys
    649    &key (generic-function-class the-class-standard-gf)
    650    (method-class the-class-standard-method)
    651    &allow-other-keys)
    652 ;;   (format t "ensure-generic-function function-name = ~S~%" function-name)
    653 ;;   (when (fboundp function-name)
    654 ;;     (error "~A already names an ordinary function, macro, or special operator"
    655 ;;            function-name))
     646(defun ensure-generic-function (function-name
     647                                &rest all-keys
     648                                &key
     649                                (generic-function-class the-class-standard-gf)
     650                                (method-class the-class-standard-method)
     651                                &allow-other-keys)
    656652  (if (find-generic-function function-name nil)
    657653      (find-generic-function function-name)
    658654      (progn
    659655        (when (fboundp function-name)
    660           (error "~A already names an ordinary function, macro, or special operator"
     656          (error 'program-error
     657                 "~A already names an ordinary function, macro, or special operator"
    661658                 function-name))
    662659        (let ((gf (apply (if (eq generic-function-class the-class-standard-gf)
Note: See TracChangeset for help on using the changeset viewer.