;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: *LISP-I; Base: 10 -*-

;;;**************************************************************************************
;;; CHANGE HISTORY
;;;
;;; 10/22/87  WEG  Created this problem to solve a problem with *defun, namely that every
;;;		   *defun defines a function in the same package, *lisp-defun, causing
;;;		   name collisions.  The new macro *defunc (one-line change to *defun)
;;;		   puts the function definition in the same package, but with the 
;;;		   prefix *lisp-internal added to the name.  Example: (*defunc frob ())
;;;	      	   creates a macro named frob and a function named *lisp-internal-frob,
;;;		   both in the current package.
;;;
;;; 10/23/87  WEG  Made *defunc indent in the same way as *defun (thanks to Todd).
;;;		   Added an alternative name for *defunc, *define.
;;;
;;; 88DEC29   PAO  In CM-5.0, this is done "correctly".
;;;
;;;**************************************************************************************

(in-package :*lisp-i)

;;; indent in the same way as the real *defun
#+lispm
(zwei::defindentation `(*defunc ,(zwei::get-indentation '*defun)))

;;; Fixed *defun so that instead of creating a macro in the current package and a
;;; function in package *lisp-defun, it creates the function in the current package
;;; with the prefix "*lisp-internal-".  This prevents collisions between *defuns in
;;; different packages.  (WEG 10/20/87)

;;; Since *DEFUN has been fixed for several releases now, we should rename all calls.
;;;  I'm certainly not going to bother.  (PAO 3/11/91 15:36:33)
;;(compiler:make-obsolete *defunc "*DEFUN does the package right, finally.")
;;(compiler:make-obsolete *define "*DEFUN does the package right, finally.")


(defmacro *defunc (&rest args) `(*defun . ,args))

(setf (symbol-function '*define) #'*defunc)	;alternative name for *defunc
#+lispm
(zwei::defindentation `(*define ,(zwei::get-indentation '*defun)))
