Bug fix: simplode on a singleton list could return a non-string
[maxima.git] / src / lmdcls.lisp
blobeab94f63b332c15021056ac857e94fcaab948106
1 ;;; -*- Mode: Lisp; Package: Maxima; Syntax: Common-Lisp; Base: 8 -*- ;;;;;
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3 ;;; The data in this file contains enhancments. ;;;;;
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 "#define MAKE_UNSPECIAL(x) (check_type_symbol(&(x)),(x)->s.s_stype = stp_ordinary, 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* #+gcl '(compile eval load)
27 #-gcl '(:compile-toplevel :load-toplevel :execute) )
28 (t #+gcl '(eval compile) #-gcl '(:compile-toplevel :execute)))
29 ,@(loop for v in decl-specs
30 unless (member (car v) '(special unspecial)) nconc nil
31 else
32 when (eql (car v) 'unspecial)
33 collect `(progn
34 ,@(loop for w in (cdr v)
35 collect #-(or gcl scl cmu ecl)
36 `(remprop ',w
37 #-excl 'special
38 #+excl 'excl::.globally-special.)
39 #+(or gcl scl cmu ecl)
40 `(make-unspecial ',w)))
41 else collect `(proclaim ',v))))
43 ;;; This list should contain all specials required by runtime or more than one maxima file,
44 ;;; except for some specials declared in the macro files, eg displm
46 (declaim (special
47 $% $%% $%edispflag $%emode $%enumer $%e_to_numlog $%iargs $%piargs
48 $%rnum $%rnum_list $absboxchar $activecontexts $algebraic $algexact
49 $aliases $arrays $askexp $assumescalar $backsubst $berlefact
50 $beta_args_sum_to_integer $bftorat $bftrunc $boxchar
51 $breakup $cauchysum $change_filedefaults $compgrind $context
52 $contexts $current_let_rule_package $debugmode
53 $default_let_rule_package $demoivre $dependencies $derivabbrev
54 $derivsubst $detout $dispflag $display2d $displayset
55 $display_format_internal $doallmxops $domain $domxexpt $domxmxops
56 $domxnctimes $domxplus $domxtimes $dontfactor $doscmxops
57 $doscmxplus $dot0nscsimp $dot0simp $dot1simp $dotassoc
58 $dotconstrules $dotdistrib $dotexptsimp $dotident $dotscrules
59 $erfflag $errexp $error $error_size $error_syms $expon
60 $exponentialize $expop $exptdispflag $exptisolate $exptsubst
61 $facexpand $factorflag $features $file_search
62 $float $float2bf $floatformat $floatfrac $floatint
63 $floatoptions $floatprec $floatwidth $fortfloat $fortindent
64 $fortspaces $fpprec $fpprintprec $fptrunc $functions $gammalim $gcd
65 $genindex $gensumnum $globalsolve $gradefs $halfangles $homog_hack
66 $inchar $infeval $inflag $intfaclim
67 $isolate_wrt_times $keepfloat $labels $leftjust $letrat $letvarsimp
68 $let_rule_packages $liflag $linechar $linenum $linel
69 $linsolvewarn $linsolve_params $lispdisp $listarith $listconstvars
70 $lmxchar $logarc $logconcoeffp $logexpand $lognegint $lognumer
71 $logsimp $m1pbranch $macroexpansion $macros $maperror $mapprint
72 $matrix_element_add $matrix_element_mult $matrix_element_transpose
73 $maxapplydepth $maxapplyheight $maxnegex $maxposex $maxprime
74 $maxtayorder $mode_checkp $mode_check_errorp $mode_check_warnp
75 $morewait $multiplicities $mx0simp $myoptions $nalgfac $negdistrib
76 $negsumdispflag $newfac $nolabels $norepeat $noundisp $numer
77 $numer_pbranch $operators $opsubst $optimprefix $optionset $outchar
78 $pagepause $parsewindow $partswitch $pfeformat $piece $pointbound
79 $poislim $powerdisp $prederror $programmode $props
80 $radexpand $ratalgdenom $ratdenomdivide $ratepsilon $ratexpand
81 $ratfac $ratmx $ratprint $ratsimpexpons $ratvars $ratvarswitch
82 $ratweights
83 $ratwtlvl $realonly $refcheck $resultant $rmxchar $rootsconmode
84 $rules $savedef $savefactors $scalarmatrixp $setcheck
85 $setcheckbreak $setval $showtime $signbfloat $simp $simpsum
86 $solvedecomposes $solveexplicit $solvefactors $solvenullwarn
87 $solveradcan $solvetrigwarn $sparse
88 $sqrtdispflag $stardisp $sublis_apply_lambda
89 $subnumsimp $sumexpand $sumsplitfact
90 $suspend $taylor_logexpand
91 $taylor_truncate_polynomials $timer $timer_devalue
92 $to_call_lisp_compiler $trace $trace_break_arg $trace_max_indent
93 $trace_safety $transcompile $translate $transrun
94 $trigexpand $trigexpandplus $trigexpandtimes $triginverses
95 $trigsign $tr_array_as_ref $tr_bound_function_applyp
96 $tr_file_tty_messagesp $tr_float_can_branch_complex
97 $tr_function_call_default $tr_gen_tags $tr_numer
98 $tr_optimize_max_loop $tr_output_file_default
99 $tr_predicate_brain_damage $tr_semicompile $tr_state_vars
100 $tr_true_name_of_file_being_translated $tr_warn_bad_function_calls
101 $tr_warn_fexpr $tr_warn_meval $tr_warn_mode $tr_warn_undeclared
102 $tr_warn_undefined_variable
103 $universe $user_mesfile $use_fast_arrays $values $vect_cross
104 $zerobern %e-val %p%i %pi-val %pi//2 %pi//4 %pi2 *$any-modes*
105 *alpha *const* *fnewvarsw *gcdl* *in *in-$batchload* *in-compile*
106 *in-macsyma-indexer* *in-translate-file* *inv* *irreds *min* *mx*
107 *n *opers-list *out *ratweights *tr-warn-break* *transl-backtrace*
108 *transl-debug* *warned-fexprs*
109 *warned-mode-vars* *warned-un-declared-vars* *zexptsimp? |-1//2|
110 -sqrt3//2 |1//2| adn* aexprp algfac* algnotexact
111 alpha *alphabet* arrays aryp assigns *atp* atvars *baktrcl*
112 bfhalf bfmhalf bigfloat%e bigfloat%pi bigfloatone bigfloatzero
113 bindlist bvars *mdebug*
114 declares defined_variables defintdebug derivflag derivlist
115 derivsimp displayp dn* dosimp dsksetp dummy-variable-operators
116 dumping envlist errorsw evarrp evp expandflag expandp
117 exprs exptrlsw factlist featurel fexprs fmaplvl
118 fourth%pi fr-factor gauss
119 generate-atan2 genpairs genvar half%pi half%pi3
120 implicit-real in-p infinitesimals infinities inratsimp inside-mprog
121 integerl *islinp* lexprs limit-answers limitp linel
122 *linelabel* local loclist low* maplp master-mesfile mdop
123 meta-prop-l meta-prop-p mfexprp minpoly* mlocp mm* modulus *mopl*
124 mplc* mprogp mproplist mspeclist mspeclist2 msump munbindp
125 need-prog? negprods negsums nn* noevalargs noitems nonintegerl
126 *nounl* *nounsflag* opers opers-list outargs1 outargs2
127 preserve-direction prods putl radcanp rd*
128 real-infinities realonlyratnum *refchkl* return-mode returns rulefcnl
129 rulesw scanmapp sfindex sign-imag-errp simplimplus-problems
130 *small-primes* specials sqrt3//2 state-pdl $stringdisp substp
131 sums tellratlist timesinp tr-abort tr-progret tr-unique
132 transl-file translate-time-evalables transp
133 tstack typel user-mesfile varlist wflag
134 $cflength *trunclist $taylordepth
135 $maxtaydiff $verbose $psexpand ps-bmt-disrep
136 silent-taylor-flag $define_variable $infolists
137 $factor_max_degree $factor_max_degree_print_warning))
139 (declaim (declaration unspecial))