[Top][All Lists]
[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: |
Mon, 29 Nov 2004 01:02:29 -0500 |
Index: emacs/lisp/calc/calc-aent.el
diff -c emacs/lisp/calc/calc-aent.el:1.16 emacs/lisp/calc/calc-aent.el:1.17
*** emacs/lisp/calc/calc-aent.el:1.16 Sat Nov 27 04:07:22 2004
--- emacs/lisp/calc/calc-aent.el Mon Nov 29 05:56:06 2004
***************
*** 27,36 ****
;;; Code:
;; This file is autoloaded from calc.el.
- (require 'calc)
(require 'calc-macs)
- (eval-when-compile '(require calc-macs))
(defun calc-Need-calc-aent () nil)
--- 27,35 ----
;;; Code:
;; This file is autoloaded from calc.el.
+ (require 'calc)
(require 'calc-macs)
(defun calc-Need-calc-aent () nil)
***************
*** 51,70 ****
(entry (calc-do-alg-entry "" "Quick calc: " t))
(alg-exp (mapcar (function
(lambda (x)
! (if (and (not calc-extensions-loaded)
calc-previous-alg-entry
(string-match
"\\`[-0-9._+*/^() ]+\\'"
calc-previous-alg-entry))
(calc-normalize x)
! (calc-extensions)
(math-evaluate-expr x))))
entry)))
(when (and (= (length alg-exp) 1)
(eq (car-safe (car alg-exp)) 'calcFunc-assign)
(= (length (car alg-exp)) 3)
(eq (car-safe (nth 1 (car alg-exp))) 'var))
! (calc-extensions)
(set (nth 2 (nth 1 (car alg-exp))) (nth 2 (car alg-exp)))
(calc-refresh-evaltos (nth 2 (nth 1 (car alg-exp))))
(setq alg-exp (list (nth 2 (car alg-exp)))))
--- 50,69 ----
(entry (calc-do-alg-entry "" "Quick calc: " t))
(alg-exp (mapcar (function
(lambda (x)
! (if (and (not (featurep 'calc-ext))
calc-previous-alg-entry
(string-match
"\\`[-0-9._+*/^() ]+\\'"
calc-previous-alg-entry))
(calc-normalize x)
! (require 'calc-ext)
(math-evaluate-expr x))))
entry)))
(when (and (= (length alg-exp) 1)
(eq (car-safe (car alg-exp)) 'calcFunc-assign)
(= (length (car alg-exp)) 3)
(eq (car-safe (nth 1 (car alg-exp))) 'var))
! (require 'calc-ext)
(set (nth 2 (nth 1 (car alg-exp))) (nth 2 (car alg-exp)))
(calc-refresh-evaltos (nth 2 (nth 1 (car alg-exp))))
(setq alg-exp (list (nth 2 (car alg-exp)))))
***************
*** 91,97 ****
"")
")")))
(if (and (< (length buf) (frame-width)) (= (length entry) 1)
! calc-extensions-loaded)
(let ((long (concat (math-format-value (car entry) 1000)
" => " buf)))
(if (<= (length long) (- (frame-width) 8))
--- 90,96 ----
"")
")")))
(if (and (< (length buf) (frame-width)) (= (length entry) 1)
! (featurep 'calc-ext))
(let ((long (concat (math-format-value (car entry) 1000)
" => " buf)))
(if (<= (length long) (- (frame-width) 8))
***************
*** 147,153 ****
((eq separator 'eval)
(eval str))
((eq separator 'macro)
! (calc-extensions)
(let* ((calc-buffer (current-buffer))
(calc-window (get-buffer-window calc-buffer))
(save-window (selected-window)))
--- 146,152 ----
((eq separator 'eval)
(eval str))
((eq separator 'macro)
! (require 'calc-ext)
(let* ((calc-buffer (current-buffer))
(calc-window (get-buffer-window calc-buffer))
(save-window (selected-window)))
***************
*** 208,214 ****
(and (memq 'clear-message calc-command-flags)
(message ""))
(cond ((eq separator 'pred)
! (calc-extensions)
(if (= (length res) 1)
(math-is-true (car res))
(calc-eval-error '(0 "Single value expected"))))
--- 207,213 ----
(and (memq 'clear-message calc-command-flags)
(message ""))
(cond ((eq separator 'pred)
! (require 'calc-ext)
(if (= (length res) 1)
(math-is-true (car res))
(calc-eval-error '(0 "Single value expected"))))
***************
*** 276,294 ****
(alg-exp (calc-do-alg-entry initial prompt t)))
(if (stringp alg-exp)
(progn
! (calc-extensions)
(calc-alg-edit alg-exp))
(let* ((calc-simplify-mode (if (eq last-command-char ?\C-j)
'none
calc-simplify-mode))
(nvals (mapcar 'calc-normalize alg-exp)))
(while alg-exp
! (calc-record (if calc-extensions-loaded (car alg-exp) (car nvals))
"alg'")
(calc-pop-push-record-list calc-dollar-used
(and (not (equal (car alg-exp)
(car nvals)))
! calc-extensions-loaded
"")
(list (car nvals)))
(setq alg-exp (cdr alg-exp)
--- 275,293 ----
(alg-exp (calc-do-alg-entry initial prompt t)))
(if (stringp alg-exp)
(progn
! (require 'calc-ext)
(calc-alg-edit alg-exp))
(let* ((calc-simplify-mode (if (eq last-command-char ?\C-j)
'none
calc-simplify-mode))
(nvals (mapcar 'calc-normalize alg-exp)))
(while alg-exp
! (calc-record (if (featurep 'calc-ext) (car alg-exp) (car nvals))
"alg'")
(calc-pop-push-record-list calc-dollar-used
(and (not (equal (car alg-exp)
(car nvals)))
! (featurep 'calc-ext)
"")
(list (car nvals)))
(setq alg-exp (cdr alg-exp)
***************
*** 786,792 ****
(if (not (equal (car op) "2x"))
(math-read-token))
(and (memq (nth 1 op) '(sdev mod))
! (calc-extensions))
(setq x (cond ((consp (nth 1 op))
(funcall (car (nth 1 op)) x op))
((eq (nth 3 op) -1)
--- 785,791 ----
(if (not (equal (car op) "2x"))
(math-read-token))
(and (memq (nth 1 op) '(sdev mod))
! (require 'calc-ext))
(setq x (cond ((consp (nth 1 op))
(funcall (car (nth 1 op)) x op))
((eq (nth 3 op) -1)
***************
*** 802,808 ****
((and (not first)
(memq (nth 1 op) math-alg-inequalities)
(memq (car-safe x) math-alg-inequalities))
! (calc-extensions)
(math-composite-inequalities x op))
(t (list (nth 1 op)
x
--- 801,807 ----
((and (not first)
(memq (nth 1 op) math-alg-inequalities)
(memq (car-safe x) math-alg-inequalities))
! (require 'calc-ext)
(math-composite-inequalities x op))
(t (list (nth 1 op)
x
***************
*** 830,836 ****
(or (not (listp
(setq matches (calc-match-user-syntax rule))))
(let ((args (progn
! (calc-extensions)
calc-arg-values))
(conds nil)
temp)
--- 829,835 ----
(or (not (listp
(setq matches (calc-match-user-syntax rule))))
(let ((args (progn
! (require 'calc-ext)
calc-arg-values))
(conds nil)
temp)
***************
*** 845,851 ****
conds)
match (nth 1 match)))
(while (and conds match)
! (calc-extensions)
(cond ((eq (car-safe (car conds))
'calcFunc-let)
(setq temp (car conds))
--- 844,850 ----
conds)
match (nth 1 match)))
(while (and conds match)
! (require 'calc-ext)
(cond ((eq (car-safe (car conds))
'calcFunc-let)
(setq temp (car conds))
***************
*** 1037,1043 ****
(throw 'syntax "Expected `)'"))
(math-read-token)
(if (and (eq calc-language 'fortran) args
! (calc-extensions)
(let ((calc-matrix-mode 'scalar))
(math-known-matrixp
(list 'var sym
--- 1036,1042 ----
(throw 'syntax "Expected `)'"))
(math-read-token)
(if (and (eq calc-language 'fortran) args
! (require 'calc-ext)
(let ((calc-matrix-mode 'scalar))
(math-known-matrixp
(list 'var sym
***************
*** 1096,1102 ****
((eq math-exp-token 'hash)
(or calc-hashes-used
(throw 'syntax "#'s not allowed in this context"))
! (calc-extensions)
(if (<= math-expr-data (length calc-arg-values))
(let ((num math-expr-data))
(math-read-token)
--- 1095,1101 ----
((eq math-exp-token 'hash)
(or calc-hashes-used
(throw 'syntax "#'s not allowed in this context"))
! (require 'calc-ext)
(if (<= math-expr-data (length calc-arg-values))
(let ((num math-expr-data))
(math-read-token)
***************
*** 1127,1133 ****
(setq exp (if (and exp2 (Math-realp exp)
(Math-anglep exp2))
(math-normalize (list 'polar exp exp2))
! (calc-extensions)
(list '* exp
(list 'calcFunc-exp
(list '*
--- 1126,1132 ----
(setq exp (if (and exp2 (Math-realp exp)
(Math-anglep exp2))
(math-normalize (list 'polar exp exp2))
! (require 'calc-ext)
(list '* exp
(list 'calcFunc-exp
(list '*
***************
*** 1154,1169 ****
(math-read-token)
exp))
((eq math-exp-token 'string)
! (calc-extensions)
(math-read-string))
((equal math-expr-data "[")
! (calc-extensions)
(math-read-brackets t "]"))
((equal math-expr-data "{")
! (calc-extensions)
(math-read-brackets nil "}"))
((equal math-expr-data "<")
! (calc-extensions)
(math-read-angle-brackets))
(t (throw 'syntax "Expected a number")))))
--- 1153,1168 ----
(math-read-token)
exp))
((eq math-exp-token 'string)
! (require 'calc-ext)
(math-read-string))
((equal math-expr-data "[")
! (require 'calc-ext)
(math-read-brackets t "]"))
((equal math-expr-data "{")
! (require 'calc-ext)
(math-read-brackets nil "}"))
((equal math-expr-data "<")
! (require 'calc-ext)
(math-read-angle-brackets))
(t (throw 'syntax "Expected a number")))))