Merge branch 'master' into gcl_cleanup
[maxima/cygwin.git] / src / lmdcls.lisp
blobd07f7aaf44af03ae54cc8f42d7b6cc9b6eed4e46
1 ;;; -*- Mode: Lisp; Package: Maxima; Syntax: Common-Lisp; Base: 8 -*- ;;;;;
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3 ;;; The data in this file contains enhancements. ;;;;;
4 ;;; ;;;;;
5 ;;; Copyright (c) 1984,1987 by William Schelter,University of Texas ;;;;;
6 ;;; All rights reserved ;;;;;
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
9 (in-package :maxima)
11 (defvar *macro-file* nil)
13 #+gcl
14 (progn
15 (system::clines "object MAKE_UNSPECIAL(object x) {if (type_of(x)==t_symbol) x->s.s_stype=0;return Cnil;}")
16 (system::defentry make-unspecial (system::object) (system::object "MAKE_UNSPECIAL")))
18 #+(or scl cmu)
19 (defun make-unspecial (symbol)
20 (ext:clear-info variable c::kind symbol)
21 symbol)
24 (defmacro declare-top (&rest decl-specs)
25 `(eval-when
26 ,(cond (*macro-file* '(:compile-toplevel :load-toplevel :execute) )
27 (t '(:compile-toplevel :execute)))
28 ,@(loop for v in decl-specs
29 unless (member (car v) '(special unspecial)) nconc nil
30 else
31 when (eql (car v) 'unspecial)
32 collect `(progn
33 ,@(loop for w in (cdr v)
34 collect #-(or gcl scl cmu ecl)
35 `(remprop ',w
36 #-excl 'special
37 #+excl 'excl::.globally-special.)
38 #+(or gcl scl cmu ecl)
39 `(make-unspecial ',w)))
40 else collect `(proclaim ',v))))
42 ;;; This list should contain all specials required by runtime or more
43 ;;; than one maxima file, except for specials defined in globals.lisp,
44 ;;; or for some specials declared in the macro files, eg displm.
46 (declaim (special
47 *alpha *in *in-compile*
48 *n *out
49 alpha
50 defined_variables derivlist
51 dn*
52 local
53 nn*
54 opers-list outargs1 outargs2
55 returns
56 $define_variable))
58 (declaim (declaration unspecial))