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-aent.el


From: Jay Belanger
Subject: [Emacs-diffs] Changes to emacs/lisp/calc/calc-aent.el
Date: Fri, 26 Nov 2004 23:13:38 -0500

Index: emacs/lisp/calc/calc-aent.el
diff -c emacs/lisp/calc/calc-aent.el:1.15 emacs/lisp/calc/calc-aent.el:1.16
*** emacs/lisp/calc/calc-aent.el:1.15   Tue Nov 23 05:58:20 2004
--- emacs/lisp/calc/calc-aent.el        Sat Nov 27 04:07:22 2004
***************
*** 240,248 ****
                             res (cdr res)))
                     buf)))))))))
  
  (defun calc-eval-error (msg)
!   (if (and (boundp 'calc-eval-error)
!          calc-eval-error)
        (if (eq calc-eval-error 'string)
          (nth 1 msg)
        (error "%s" (nth 1 msg)))
--- 240,253 ----
                             res (cdr res)))
                     buf)))))))))
  
+ (defvar calc-eval-error nil
+   "Determines how calc handles errors.
+ NIL means return a list containing the character position of error.
+ STRING means return error message as string rather than list.
+ T means abort and give an error message.")
+ 
  (defun calc-eval-error (msg)
!   (if calc-eval-error
        (if (eq calc-eval-error 'string)
          (nth 1 msg)
        (error "%s" (nth 1 msg)))
***************
*** 385,390 ****
--- 390,397 ----
      (and (> (length calc-alg-exp) 0) (setq calc-previous-alg-entry 
calc-alg-exp))
      (exit-minibuffer)))
  
+ (defvar calc-buffer)
+ 
  (defun calcAlg-enter ()
    (interactive)
    (let* ((str (minibuffer-contents))
***************
*** 442,447 ****
--- 449,458 ----
         ((eq last-command-char ?@) "0@ ")
         (t (char-to-string last-command-char)))))
  
+ ;; The variable calc-digit-value is initially declared in calc.el,
+ ;; but can be set by calcDigit-algebraic and calcDigit-edit.
+ (defvar calc-digit-value)
+ 
  (defun calcDigit-algebraic ()
    (interactive)
    (if (calc-minibuffer-contains "address@hidden *[^'m ]+[^'m]*\\'")
***************
*** 458,471 ****
  
  ;;; Algebraic expression parsing.   [Public]
  
! ;;; The next few variables are local to math-read-exprs (and math-read-expr)
! ;;; but are set in functions they call.
  
  (defvar math-exp-pos)
  (defvar math-exp-str)
  (defvar math-exp-old-pos)
  (defvar math-exp-token)
  (defvar math-exp-keep-spaces)
  
  (defun math-read-exprs (math-exp-str)
    (let ((math-exp-pos 0)
--- 469,483 ----
  
  ;;; Algebraic expression parsing.   [Public]
  
! ;; The next few variables are local to math-read-exprs (and math-read-expr
! ;; in calc-ext.el), but are set in functions they call.
  
  (defvar math-exp-pos)
  (defvar math-exp-str)
  (defvar math-exp-old-pos)
  (defvar math-exp-token)
  (defvar math-exp-keep-spaces)
+ (defvar math-expr-data)
  
  (defun math-read-exprs (math-exp-str)
    (let ((math-exp-pos 0)
***************
*** 727,732 ****
--- 739,747 ----
                   math-expr-data (char-to-string ch)
                   math-exp-pos (1+ math-exp-pos)))))))
  
+ (defconst math-alg-inequalities
+   '(calcFunc-lt calcFunc-gt calcFunc-leq calcFunc-geq
+               calcFunc-eq calcFunc-neq))
  
  (defun math-read-expr-level (exp-prec &optional exp-term)
    (let* ((x (math-read-factor)) (first t) op op2)
***************
*** 941,950 ****
              matches "Failed"))
      matches))
  
- (defconst math-alg-inequalities
-   '(calcFunc-lt calcFunc-gt calcFunc-leq calcFunc-geq
-               calcFunc-eq calcFunc-neq))
- 
  (defun math-remove-dashes (x)
    (if (string-match "\\`\\(.*\\)-\\(.*\\)\\'" x)
        (math-remove-dashes
--- 956,961 ----




reply via email to

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