aboutsummaryrefslogtreecommitdiff
path: root/src/interp/macros.lisp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-05-01 21:54:43 +0000
committerdos-reis <gdr@axiomatics.org>2011-05-01 21:54:43 +0000
commit786cd98c9ab4543bb9d4a901a3d71497dd858aa5 (patch)
tree9732a63ec7dff4b26da3e1faef7f3582770d65fe /src/interp/macros.lisp
parent50ffaabb3e56f7dec884c7e44c0fc0296772dfc8 (diff)
downloadopen-axiom-786cd98c9ab4543bb9d4a901a3d71497dd858aa5.tar.gz
* interp/macros.lisp (WI, tryLine, embrace indentNB, tryBreak)
(tryBreakNB, MARKHASH): Remove. * interp/spad.lisp (NEWNAMTRANS): Likewise. * interp/sys-macros.lisp: Remove more Lispy junk.
Diffstat (limited to 'src/interp/macros.lisp')
-rw-r--r--src/interp/macros.lisp76
1 files changed, 4 insertions, 72 deletions
diff --git a/src/interp/macros.lisp b/src/interp/macros.lisp
index e2dbf4f1..0deffb0e 100644
--- a/src/interp/macros.lisp
+++ b/src/interp/macros.lisp
@@ -232,14 +232,14 @@
;; PF(item) x PF(item) x LIST(of pairs) -> LIST(of pairs with (A . B) added)
;; destructive on L; if (A . C) appears already, C is replaced by B
(cond ((null l) (list (cons a b)))
- ((equal a (caar l)) (rplac (cdar l) b) l)
+ ((equal a (caar l)) (rplacd (car l) b) l)
((?order a (caar l)) (cons (cons a b) l))
(t (as-insert1 a b l) l)))
(defun as-insert1 (a b l)
- (cond ((null (cdr l)) (rplac (cdr l) (list (cons a b))))
- ((equal a (caadr l)) (rplac (cdadr l) b))
- ((?order a (caadr l)) (rplac (cdr l) (cons (cons a b) (cdr l))))
+ (cond ((null (cdr l)) (rplacd l (list (cons a b))))
+ ((equal a (caadr l)) (rplacd (cadr l) b))
+ ((?order a (caadr l)) (rplacd l (cons (cons a b) (cdr l))))
(t (as-insert1 a b (cdr l)))))
@@ -655,77 +655,9 @@ terminals and empty or at-end files. In Common Lisp, we must assume record size
(setq bol (+ eol 1)))
(|reverse!| line-list)))
-; part of the old spad to new spad translator
-; these are here because they need to be in depsys
-; they were in nspadaux.lisp
-
-(defmacro wi (a b) b)
-
-(defmacro |tryLine| (X)
- `(LET ((|$autoLine|))
- (declare (special |$autoLine|))
- (|tryToFit| (|saveState|) ,X)))
-
-(defmacro |embrace| (X) `(|wrapBraces| (|saveC|) ,X (|restoreC|)))
-(defmacro |indentNB| (X) `(|wrapBraces| (|saveD|) ,X (|restoreD|)))
-
-(defmacro |tryBreak| (a b c d)
-; Try to format <a b> by:
-; (1) with no line breaking ($autoLine = nil)
-; (2) with possible line breaks within a;
-; (3) otherwise use a brace
- `(LET
- ((state))
- (setq state (|saveState| 't))
- (or
- (LET ((|$autoLine|))
- (declare (special |$autoLine|))
- (and ,a (|formatRight| '|formatPreferPile| ,b ,c ,d)))
- (|restoreState| state)
- (and (eqcar ,b (quote seq))
- (|embrace| (and
- ,a
- (|formatLB|)
- (|formatRight| '|formatPreferPile| ,b ,c ,d))))
- (|restoreState| state)
- (|embrace| (and ,a
- (|formatLB|)
- (|formatRight| '|formatPreferPile| ,b ,c ,d))))))
-
-(defmacro |tryBreakNB| (a b c d)
-; Try to format <a b> by:
-; (1) with no line breaking ($autoLine = nil)
-; (2) with possible line breaks within a;
-; (3) otherwise display without a brace
- `(LET
- ((state))
- (setq state (|saveState| 't))
- (or
- (markhash ,b 0)
- (LET ((|$autoLine|))
- (declare (special |$autoLine|))
- (and ,a (|formatRight| '|formatPreferPile| ,b ,c ,d)))
- (|restoreState| state)
- (markhash ,b 1)
- (and (eqcar ,b (quote seq))
- (|embrace| (and
- ,a
- (|formatLB|)
- (|formatRight| '|formatPreferPile| ,b ,c ,d))))
- (markhash ,b 2)
- (|restoreState| state)
- (|indentNB| (and ,a
- (|formatRight| '|formatPreferPile| ,b ,c ,d)))
- (markhash ,b 3)
-
-)))
(defvar HT nil)
-(defun markhash (key n) (progn (cond
- ((equal n 3) (remhash key ht))
- ('t (hput ht key n)) ) nil))
-
;;
;; -*- Record Structures -*-
;;