1 ;;; -*- Mode: Lisp; package:maxima; syntax:common-lisp -*- ;;;;;;;;;;;;;;;;;
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3 ;;; The data in this file contains enhancments. ;;;;;
5 ;;; Copyright (c) 1984 by William Schelter,University of Texas ;;;;;
6 ;;; All rights reserved ;;;;;
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
11 (defvar $default_buffer_name
'&Macsyma_Buffer
)
15 (defun into-buffer-name (args)
16 (let ((name (cond ((zl-NLISTP args
) ;
18 ((and ($listp
(car args
))
19 (not (null (cadr args
))))
23 (t $default_buffer_name
))))
24 (substring (strmeval name
) 1)))
28 (defun into-buffer-objs (args)
29 (let ((objs (cond ((zl-NLISTP args
)
36 (mapcar #'meval objs
)))
40 (defmspec $into_buffer
(args)
41 (let ((buffer-name (into-buffer-name (cdr args
)))
42 (things-to-output (into-buffer-objs (cdr args
))))
43 (if (null things-to-output
)
44 (merror "INTO_BUFFER: No objects given to put in to buffer"))
45 (let ((temp zwei
::*default-major-mode
* ))
46 ;(setf zwei::*default-major-mode* :macsyma)
47 (zwei::with-editor-stream
(*standard-output
* ':buffer-name buffer-name
)
48 (loop for element in things-to-output
49 do
(cl-macsyma::i-$grind element
)
51 ;(setf zwei::*default-major-mode* temp )
61 (defun zwei::macsyma-arglist
(fun &aux spec
)
63 ((setq spec
(get fun
'mfexpr
*))(arglist spec
))
64 ((setq spec
(mgetl fun
'(mexpr aexpr fexpr
)))
65 (cdr (second (second spec
))))))
70 (defun new-concat (&rest l
) (intern (lexpr-funcall 'string-append
"$" (mapcar 'string l
))
73 (defun $new_concat
(&rest l
) (intern (lexpr-funcall 'string-append
"$" (mapcar 'string l
))