~ubuntu-branches/ubuntu/karmic/maxima/karmic

« back to all changes in this revision

Viewing changes to share/contrib/nset/nset-init.lisp

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2004-11-13 18:39:14 UTC
  • mto: (2.1.2 hoary) (3.2.1 sid) (1.1.5 upstream)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20041113183914-ttig0evwuatnqosl
Tags: upstream-5.9.1
ImportĀ upstreamĀ versionĀ 5.9.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
;; This version of setup_autoload uses file_search.
 
2
 
 
3
(defun $setup_autoload (filename &rest functions)
 
4
  (let ((file ($file_search filename)))
 
5
    (dolist (func functions)
 
6
      (nonsymchk func '$setup_autoload)
 
7
      (putprop (setq func (dollarify-name func)) file 'autoload)
 
8
      (add2lnc func $props)))
 
9
  '$done)
 
10
 
 
11
;; This version of generic-autoload in Maxima 5.9.0 doesn't recognize
 
12
;; "fas", "fasl" and "x86f" as valid extensions for compiled Lisp
 
13
;; code.
 
14
 
 
15
#+cl
 
16
(defun generic-autoload (file &aux type)
 
17
  (setq file (pathname (cdr file)))
 
18
  (setq type (pathname-type file))
 
19
  (let ((bin-ext #+gcl "o"
 
20
                 #+cmu (c::backend-fasl-file-type c::*target-backend*)
 
21
                 #+clisp "fas"
 
22
                 #+allegro "fasl"
 
23
                 #-(or gcl cmu clisp allegro) ""))
 
24
    (if (member type (list bin-ext "lisp" "lsp")  :test 'equalp)
 
25
        (load file) ($batchload file))))
 
26
 
 
27
;; Add set to Maxima's prop list.
 
28
 
 
29
(add2lnc '$set $props)
 
30
 
 
31
;; Autoload the functions in nset.
 
32
 
 
33
($setup_autoload "nset" '$adjoin '$cardinality '$complement 
 
34
'$cartesian_product, '$disjointp '$dupe '$elementp '$equiv_classes 
 
35
'$extremal_subset '$flatten  '$full_listify '$fullsetify '$intersect 
 
36
'$intersection '$listify  '$partition_set '$permutations '$powerset 
 
37
'$setdifference '$setequality  '$setify '$setp '$subpowerset '$subset 
 
38
'$subsetp '$symmdifference '$union)