Clean up implementation of printing options table
[maxima.git] / share / misc / diffop.lisp
blobfa60caa2523fbfba77bb5023577641063505be6d
1 ;;; -*- Lisp -*-
2 ;;; DIFFOP: A Library for making ' a more useful character in Macsyma
3 ;;;
4 ;;; Loading this file sets things up so that you can do
5 ;;;
6 ;;; DEPENDS(F,X); => [F(X)]
7 ;;;
8 ;;; F'; => dF/dX
9 ;;;
10 ;;; 3
11 ;;; F'3; or F'''; => d F
12 ;;; -----
13 ;;; 3
14 ;;; dX
15 ;;;
16 ;;; If a variable has more than one DEPENDS property, the variable
17 ;;; which will be used is undefined.
18 ;;; If a variable has no DEPENDS property, UND will be used as the
19 ;;; variable to differentiate by.
21 (DEFUN INFER-DEPENDENCY (X)
22 (OR (CAR (MGET (CADR ($LISTOFVARS X)) 'DEPENDS)) '$UND))
24 (DECLARE (SPECIAL STRING))
26 ;Makes awfully big assumptions about the internals of GRAM
28 (DEFUN PARSE-PRIME (OP LEFT)
29 (SETQ LEFT (CDR LEFT))
30 (CONS '$ANY
31 (LIST '($DIFF)
32 LEFT
33 (INFER-DEPENDENCY LEFT)
34 (+ -1
35 (FLATC OP)
36 (COND ((AND STRING (NUMBERP (CAR STRING)))
37 (POP STRING))
38 (T 0))))))
40 (DEFPROP $/' 195. LBP)
42 (DEFPROP $/' PARSE-PRIME LED)
44 (DEFPROP $/'/' 195. LBP)
46 (DEFPROP $/'/' PARSE-PRIME LED)