/[emacs]/emacs/lisp/calc/calc-ext.el
ViewVC logotype

Diff of /emacs/lisp/calc/calc-ext.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.23 by jpb, Wed Nov 17 19:22:31 2004 UTC revision 1.24 by jpb, Mon Nov 22 04:52:48 2004 UTC
# Line 2943  calc-kill calc-kill-region calc-yank)))) Line 2943  calc-kill calc-kill-region calc-yank))))
2943                (math-expr-function-mapping (get 'tex 'math-function-table))                (math-expr-function-mapping (get 'tex 'math-function-table))
2944                (math-expr-variable-mapping (get 'tex 'math-variable-table)))                (math-expr-variable-mapping (get 'tex 'math-variable-table)))
2945            (math-read-expr str)))            (math-read-expr str)))
2946      (let ((lines nil)      (let ((math-read-big-lines nil)
2947            (pos 0)            (pos 0)
2948            (width 0)            (width 0)
2949            (err-msg nil)            (math-read-big-err-msg nil)
2950            the-baseline the-h2            math-read-big-baseline math-read-big-h2
2951            new-pos p)            new-pos p)
2952        (while (setq new-pos (string-match "\n" str pos))        (while (setq new-pos (string-match "\n" str pos))
2953          (setq lines (cons (substring str pos new-pos) lines)          (setq math-read-big-lines
2954                  (cons (substring str pos new-pos) math-read-big-lines)
2955                pos (1+ new-pos)))                pos (1+ new-pos)))
2956        (setq lines (nreverse (cons (substring str pos) lines))        (setq math-read-big-lines
2957              p lines)              (nreverse (cons (substring str pos) math-read-big-lines))
2958                p math-read-big-lines)
2959        (while p        (while p
2960          (setq width (max width (length (car p)))          (setq width (max width (length (car p)))
2961                p (cdr p)))                p (cdr p)))
2962        (if (math-read-big-bigp lines)        (if (math-read-big-bigp math-read-big-lines)
2963            (or (catch 'syntax            (or (catch 'syntax
2964                  (math-read-big-rec 0 0 width (length lines)))                  (math-read-big-rec 0 0 width (length math-read-big-lines)))
2965                err-msg                math-read-big-err-msg
2966                '(error 0 "Syntax error"))                '(error 0 "Syntax error"))
2967          (math-read-expr str)))))          (math-read-expr str)))))
2968    
2969  (defun math-read-big-bigp (lines)  (defun math-read-big-bigp (math-read-big-lines)
2970    (and (cdr lines)    (and (cdr math-read-big-lines)
2971         (let ((matrix nil)         (let ((matrix nil)
2972               (v 0)               (v 0)
2973               (height (if (> (length (car lines)) 0) 1 0)))               (height (if (> (length (car math-read-big-lines)) 0) 1 0)))
2974           (while (and (cdr lines)           (while (and (cdr math-read-big-lines)
2975                       (let* ((i 0)                       (let* ((i 0)
2976                              j                              j
2977                              (l1 (car lines))                              (l1 (car math-read-big-lines))
2978                              (l2 (nth 1 lines))                              (l2 (nth 1 math-read-big-lines))
2979                              (len (min (length l1) (length l2))))                              (len (min (length l1) (length l2))))
2980                         (if (> (length l2) 0)                         (if (> (length l2) 0)
2981                             (setq height (1+ height)))                             (setq height (1+ height)))
# Line 2984  calc-kill calc-kill-region calc-yank)))) Line 2986  calc-kill calc-kill-region calc-yank))))
2986                                              (= (aref l2 i) (aref l1 i)))                                              (= (aref l2 i) (aref l1 i)))
2987                                         (and (eq (aref l1 i) ?\[)                                         (and (eq (aref l1 i) ?\[)
2988                                              (eq (aref l2 i) ?\[)                                              (eq (aref l2 i) ?\[)
2989                                              (let ((h2 (length l1)))                                              (let ((math-rb-h2 (length l1)))
2990                                                (setq j (math-read-big-balance                                                (setq j (math-read-big-balance
2991                                                         (1+ i) v "[")))                                                         (1+ i) v "[")))
2992                                              (setq i (1- j)))))                                              (setq i (1- j)))))
# Line 2994  calc-kill calc-kill-region calc-yank)))) Line 2996  calc-kill calc-kill-region calc-yank))))
2996                                  (eq (aref l2 i) ?\[)                                  (eq (aref l2 i) ?\[)
2997                                  (setq matrix t)                                  (setq matrix t)
2998                                  nil))))                                  nil))))
2999             (setq lines (cdr lines)             (setq math-read-big-lines (cdr math-read-big-lines)
3000                   v (1+ v)))                   v (1+ v)))
3001           (or (and (> height 1)           (or (and (> height 1)
3002                    (not (cdr lines)))                    (not (cdr math-read-big-lines)))
3003               matrix))))               matrix))))
3004    
3005  ;;; Nontrivial "flat" formatting.  ;;; Nontrivial "flat" formatting.

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26