Initial revision
This commit is contained in:
42
runes/dep-acl.lisp
Normal file
42
runes/dep-acl.lisp
Normal file
@ -0,0 +1,42 @@
|
||||
;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: RUNES; -*-
|
||||
;;; ---------------------------------------------------------------------------
|
||||
;;; Title: ACL-4.3 dependent stuff + fixups
|
||||
;;; Created: 1999-05-25 22:33
|
||||
;;; Author: Gilbert Baumann <unk6@rz.uni-karlsruhe.de>
|
||||
;;; License: LLGPL (See file COPYING for details).
|
||||
;;; ---------------------------------------------------------------------------
|
||||
;;; (c) copyright 1998,1999 by Gilbert Baumann
|
||||
|
||||
;;; This code is free software; you can redistribute it and/or modify it
|
||||
;;; under the terms of the version 2.1 of the GNU Lesser General Public
|
||||
;;; License as published by the Free Software Foundation, as clarified
|
||||
;;; by the "Preamble to the Gnu Lesser General Public License" found in
|
||||
;;; the file COPYING.
|
||||
;;;
|
||||
;;; This code is distributed in the hope that it will be useful,
|
||||
;;; but without any warranty; without even the implied warranty of
|
||||
;;; merchantability or fitness for a particular purpose. See the GNU
|
||||
;;; Lesser General Public License for more details.
|
||||
;;;
|
||||
;;; Version 2.1 of the GNU Lesser General Public License is in the file
|
||||
;;; COPYING that was distributed with this file. If it is not present,
|
||||
;;; you can access it from http://www.gnu.org/copyleft/lesser.txt (until
|
||||
;;; superseded by a newer version) or write to the Free Software
|
||||
;;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
;; ACL is incapable to define compiler macros on (setf foo)
|
||||
;; Unfortunately it is also incapable to declaim such functions inline.
|
||||
;; So we revoke the DEFUN hack from dep-gcl here.
|
||||
|
||||
(defmacro runes::defsubst (fun args &body body)
|
||||
(if (and (consp fun) (eq (car fun) 'setf))
|
||||
(let ((fnam (intern (concatenate 'string "(SETF " (symbol-name (cadr fun)) ")")
|
||||
(symbol-package (cadr fun)))))
|
||||
`(progn
|
||||
(defsetf ,(cadr fun) (&rest ap) (new-value) (list* ',fnam new-value ap))
|
||||
(runes::defsubst ,fnam ,args .,body)))
|
||||
`(progn
|
||||
(defun ,fun ,args .,body)
|
||||
(define-compiler-macro ,fun (&rest .args.)
|
||||
(cons '(lambda ,args .,body)
|
||||
.args.)))))
|
||||
Reference in New Issue
Block a user