mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-30 00:51:50 -08:00
(math-read-big-expr, math-read-big-bigp): Replace variable lines by
math-read-big-lines. (math-read-big-expr): Replace variables the-baseline, the-h2 and err-msg by math-read-big-baseline, math-read-big-h2 and math-read-err-msg. (math-read-big-bigp): Replace variable h2 with math-rb-h2.
This commit is contained in:
parent
58cf70d3fd
commit
c308c46341
1 changed files with 20 additions and 18 deletions
|
|
@ -2943,37 +2943,39 @@ calc-kill calc-kill-region calc-yank))))
|
|||
(math-expr-function-mapping (get 'tex 'math-function-table))
|
||||
(math-expr-variable-mapping (get 'tex 'math-variable-table)))
|
||||
(math-read-expr str)))
|
||||
(let ((lines nil)
|
||||
(let ((math-read-big-lines nil)
|
||||
(pos 0)
|
||||
(width 0)
|
||||
(err-msg nil)
|
||||
the-baseline the-h2
|
||||
(math-read-big-err-msg nil)
|
||||
math-read-big-baseline math-read-big-h2
|
||||
new-pos p)
|
||||
(while (setq new-pos (string-match "\n" str pos))
|
||||
(setq lines (cons (substring str pos new-pos) lines)
|
||||
(setq math-read-big-lines
|
||||
(cons (substring str pos new-pos) math-read-big-lines)
|
||||
pos (1+ new-pos)))
|
||||
(setq lines (nreverse (cons (substring str pos) lines))
|
||||
p lines)
|
||||
(setq math-read-big-lines
|
||||
(nreverse (cons (substring str pos) math-read-big-lines))
|
||||
p math-read-big-lines)
|
||||
(while p
|
||||
(setq width (max width (length (car p)))
|
||||
p (cdr p)))
|
||||
(if (math-read-big-bigp lines)
|
||||
(if (math-read-big-bigp math-read-big-lines)
|
||||
(or (catch 'syntax
|
||||
(math-read-big-rec 0 0 width (length lines)))
|
||||
err-msg
|
||||
(math-read-big-rec 0 0 width (length math-read-big-lines)))
|
||||
math-read-big-err-msg
|
||||
'(error 0 "Syntax error"))
|
||||
(math-read-expr str)))))
|
||||
|
||||
(defun math-read-big-bigp (lines)
|
||||
(and (cdr lines)
|
||||
(defun math-read-big-bigp (math-read-big-lines)
|
||||
(and (cdr math-read-big-lines)
|
||||
(let ((matrix nil)
|
||||
(v 0)
|
||||
(height (if (> (length (car lines)) 0) 1 0)))
|
||||
(while (and (cdr lines)
|
||||
(height (if (> (length (car math-read-big-lines)) 0) 1 0)))
|
||||
(while (and (cdr math-read-big-lines)
|
||||
(let* ((i 0)
|
||||
j
|
||||
(l1 (car lines))
|
||||
(l2 (nth 1 lines))
|
||||
(l1 (car math-read-big-lines))
|
||||
(l2 (nth 1 math-read-big-lines))
|
||||
(len (min (length l1) (length l2))))
|
||||
(if (> (length l2) 0)
|
||||
(setq height (1+ height)))
|
||||
|
|
@ -2984,7 +2986,7 @@ calc-kill calc-kill-region calc-yank))))
|
|||
(= (aref l2 i) (aref l1 i)))
|
||||
(and (eq (aref l1 i) ?\[)
|
||||
(eq (aref l2 i) ?\[)
|
||||
(let ((h2 (length l1)))
|
||||
(let ((math-rb-h2 (length l1)))
|
||||
(setq j (math-read-big-balance
|
||||
(1+ i) v "[")))
|
||||
(setq i (1- j)))))
|
||||
|
|
@ -2994,10 +2996,10 @@ calc-kill calc-kill-region calc-yank))))
|
|||
(eq (aref l2 i) ?\[)
|
||||
(setq matrix t)
|
||||
nil))))
|
||||
(setq lines (cdr lines)
|
||||
(setq math-read-big-lines (cdr math-read-big-lines)
|
||||
v (1+ v)))
|
||||
(or (and (> height 1)
|
||||
(not (cdr lines)))
|
||||
(not (cdr math-read-big-lines)))
|
||||
matrix))))
|
||||
|
||||
;;; Nontrivial "flat" formatting.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue