~ubuntu-branches/ubuntu/hardy/texmacs/hardy

« back to all changes in this revision

Viewing changes to TeXmacs/progs/utils/cas/cas-out.scm

  • Committer: Bazaar Package Importer
  • Author(s): Michele Angrisano
  • Date: 2007-06-12 12:50:14 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070612125014-qifjye1qab4l42gx
Tags: 1:1.0.6.10-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/patches/11-desktop-file.dpatch
    Fix category in desktop file
  - Update maintainer in field debian/control.

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
    cas-times-op-table
120
120
    cas-over-op-table
121
121
    cas-prefix-op-table
122
 
    (list->ahash-set '(%prime factorial ^ _ conj choose))
123
 
    (list->ahash-set '(matrix det row tuple list set comma))
124
 
    (list->ahash-set '(| ||))))
 
122
    (list->ahash-set '(%prime factorial ^ _ %dotaccess %sqaccess))
 
123
    (list->ahash-set '(quote quasiquote eval))
 
124
    (list->ahash-set '(matrix det row tuple list set comma | ||))
 
125
    (list->ahash-set '(conj choose))))
125
126
 
126
127
(define (cas-special-op? x)
127
128
  (ahash-ref cas-special-op-table x))
258
259
(define (cas-out-cell x)
259
260
  `(cell ,(cas-out x)))
260
261
 
 
262
(define (cas-out-quasiquote x)
 
263
  (cond ((nlist? x) x)
 
264
        ((func? x 'unquote 1) (cas-out (cadr x)))
 
265
        (else (map cas-out-quasiquote x))))
 
266
 
261
267
(define (cas-out-atom x)
262
268
  (cond ((null? x) "null")
263
269
        ((number? x) (number->string x))
264
270
        ((symbol? x) (cas->tmsymbol x))
265
271
        ((string? x) x)
 
272
        ((func? x 'quote 1) (cadr x))
 
273
        ((func? x 'quasiquote 1) (cas-out-quasiquote (cadr x)))
 
274
        ((func? x 'eval 1) (eval (cadr x)))
 
275
        ((func? x 'eval 2)
 
276
         (plugin-eval (cadr x) "default" (tm->tree (caddr x))))
266
277
        ((func? x 'matrix) `(matrix (table ,@(map cas-out (cdr x)))))
267
278
        ((func? x 'det) `(det (table ,@(map cas-out (cdr x)))))
268
279
        ((func? x 'row) `(row ,@(map cas-out-cell (cdr x))))