emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/calc/calc-lang.el


From: Jay Belanger
Subject: [Emacs-diffs] Changes to emacs/lisp/calc/calc-lang.el
Date: Tue, 09 Nov 2004 16:08:10 -0500

Index: emacs/lisp/calc/calc-lang.el
diff -c emacs/lisp/calc/calc-lang.el:1.6 emacs/lisp/calc/calc-lang.el:1.7
*** emacs/lisp/calc/calc-lang.el:1.6    Mon Sep  1 15:45:18 2003
--- emacs/lisp/calc/calc-lang.el        Tue Nov  9 20:32:13 2004
***************
*** 264,277 ****
      (prog1
        (math-read-brackets t "]")
        (setq exp-token (car math-parsing-fortran-vector)
!           exp-data (cdr math-parsing-fortran-vector)))))
  
  (defun math-parse-fortran-vector-end (x op)
    (if math-parsing-fortran-vector
        (progn
!       (setq math-parsing-fortran-vector (cons exp-token exp-data)
              exp-token 'end
!             exp-data "\000")
        x)
      (throw 'syntax "Unmatched closing `/'")))
  
--- 264,277 ----
      (prog1
        (math-read-brackets t "]")
        (setq exp-token (car math-parsing-fortran-vector)
!           math-expr-data (cdr math-parsing-fortran-vector)))))
  
  (defun math-parse-fortran-vector-end (x op)
    (if math-parsing-fortran-vector
        (progn
!       (setq math-parsing-fortran-vector (cons exp-token math-expr-data)
              exp-token 'end
!             math-expr-data "\000")
        x)
      (throw 'syntax "Unmatched closing `/'")))
  
***************
*** 384,390 ****
  
  (defun math-parse-tex-sum (f val)
    (let (low high save)
!     (or (equal exp-data "_") (throw 'syntax "Expected `_'"))
      (math-read-token)
      (setq save exp-old-pos)
      (setq low (math-read-factor))
--- 384,390 ----
  
  (defun math-parse-tex-sum (f val)
    (let (low high save)
!     (or (equal math-expr-data "_") (throw 'syntax "Expected `_'"))
      (math-read-token)
      (setq save exp-old-pos)
      (setq low (math-read-factor))
***************
*** 392,398 ****
        (progn
          (setq exp-old-pos (1+ save))
          (throw 'syntax "Expected equation")))
!     (or (equal exp-data "^") (throw 'syntax "Expected `^'"))
      (math-read-token)
      (setq high (math-read-factor))
      (list (nth 2 f) (math-read-factor) (nth 1 low) (nth 2 low) high)))
--- 392,398 ----
        (progn
          (setq exp-old-pos (1+ save))
          (throw 'syntax "Expected equation")))
!     (or (equal math-expr-data "^") (throw 'syntax "Expected `^'"))
      (math-read-token)
      (setq high (math-read-factor))
      (list (nth 2 f) (math-read-factor) (nth 1 low) (nth 2 low) high)))
***************
*** 484,513 ****
  
  (defun math-parse-eqn-matrix (f sym)
    (let ((vec nil))
!     (while (assoc exp-data '(("ccol") ("lcol") ("rcol")))
        (math-read-token)
!       (or (equal exp-data calc-function-open)
          (throw 'syntax "Expected `{'"))
        (math-read-token)
        (setq vec (cons (cons 'vec (math-read-expr-list)) vec))
!       (or (equal exp-data calc-function-close)
          (throw 'syntax "Expected `}'"))
        (math-read-token))
!     (or (equal exp-data calc-function-close)
        (throw 'syntax "Expected `}'"))
      (math-read-token)
      (math-transpose (cons 'vec (nreverse vec)))))
  
  (defun math-parse-eqn-prime (x sym)
    (if (eq (car-safe x) 'var)
!       (if (equal exp-data calc-function-open)
          (progn
            (math-read-token)
!           (let ((args (if (or (equal exp-data calc-function-close)
                                (eq exp-token 'end))
                            nil
                          (math-read-expr-list))))
!             (if (not (or (equal exp-data calc-function-close)
                           (eq exp-token 'end)))
                  (throw 'syntax "Expected `)'"))
              (math-read-token)
--- 484,513 ----
  
  (defun math-parse-eqn-matrix (f sym)
    (let ((vec nil))
!     (while (assoc math-expr-data '(("ccol") ("lcol") ("rcol")))
        (math-read-token)
!       (or (equal math-expr-data calc-function-open)
          (throw 'syntax "Expected `{'"))
        (math-read-token)
        (setq vec (cons (cons 'vec (math-read-expr-list)) vec))
!       (or (equal math-expr-data calc-function-close)
          (throw 'syntax "Expected `}'"))
        (math-read-token))
!     (or (equal math-expr-data calc-function-close)
        (throw 'syntax "Expected `}'"))
      (math-read-token)
      (math-transpose (cons 'vec (nreverse vec)))))
  
  (defun math-parse-eqn-prime (x sym)
    (if (eq (car-safe x) 'var)
!       (if (equal math-expr-data calc-function-open)
          (progn
            (math-read-token)
!           (let ((args (if (or (equal math-expr-data calc-function-close)
                                (eq exp-token 'end))
                            nil
                          (math-read-expr-list))))
!             (if (not (or (equal math-expr-data calc-function-close)
                           (eq exp-token 'end)))
                  (throw 'syntax "Expected `)'"))
              (math-read-token)
***************
*** 622,631 ****
  
  (defun math-read-math-subscr (x op)
    (let ((idx (math-read-expr-level 0)))
!     (or (and (equal exp-data "]")
             (progn
               (math-read-token)
!              (equal exp-data "]")))
        (throw 'syntax "Expected ']]'"))
      (math-read-token)
      (list 'calcFunc-subscr x idx)))
--- 622,631 ----
  
  (defun math-read-math-subscr (x op)
    (let ((idx (math-read-expr-level 0)))
!     (or (and (equal math-expr-data "]")
             (progn
               (math-read-token)
!              (equal math-expr-data "]")))
        (throw 'syntax "Expected ']]'"))
      (math-read-token)
      (list 'calcFunc-subscr x idx)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]