Function: math-read-big-balance

math-read-big-balance is an autoloaded and byte-compiled function defined in calc-lang.el.gz.

Signature

(math-read-big-balance H V WHAT &optional COMMAS)

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-lang.el.gz
(defun math-read-big-balance (h v what &optional commas)
  (let* ((line (nth v math-read-big-lines))
	 (len (min math-rb-h2 (length line)))
	 (count 1))
    (while (> count 0)
      (if (>= h len)
	  (if what
	      (math-read-big-error nil v (format-message
                                          "Unmatched `%s'" what))
	    (setq count 0))
	(if (memq (aref line h) '(?\( ?\[))
	    (setq count (1+ count))
	  (if (if (and commas (= count 1))
		  (or (memq (aref line h) '(?\) ?\] ?\, ?\;))
		      (and (eq (aref line h) ?\.)
			   (< (1+ h) len)
			   (eq (aref line (1+ h)) ?\.)))
		(memq (aref line h) '(?\) ?\])))
	      (setq count (1- count))))
	(setq h (1+ h))))
    h))