aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/calc/calc-sel.el
diff options
context:
space:
mode:
authorJay Belanger <[email protected]>2006-07-20 20:24:40 +0000
committerJay Belanger <[email protected]>2006-07-20 20:24:40 +0000
commit64d96023ac590312a5383816e5b64b1625f6e9a8 (patch)
treec8b3013a2425bb6bf553cd6a7bd9a82a3bb0b949 /lisp/calc/calc-sel.el
parenta5ff30757f1d5a8225ad3b3eae3cfda547415518 (diff)
(calc-selection-history): New variable.
(calc-enter-selection, calc-sel-mult-both-sides, calc-sel-add-both-sides): Use calc-selection-history.
Diffstat (limited to 'lisp/calc/calc-sel.el')
-rw-r--r--lisp/calc/calc-sel.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/calc/calc-sel.el b/lisp/calc/calc-sel.el
index bf18fa968c..7f6dbb7f99 100644
--- a/lisp/calc/calc-sel.el
+++ b/lisp/calc/calc-sel.el
@@ -633,6 +633,9 @@
(setcar (nthcdr 2 entry) (and (not (eq sel (car entry))) sel))
(calc-delete-selection num))))
+(defvar calc-selection-history nil
+ "History for calc selections.")
+
(defun calc-enter-selection ()
(interactive)
(calc-wrapper
@@ -645,7 +648,8 @@
alg)
(let ((calc-dollar-values (list sel))
(calc-dollar-used 0))
- (setq alg (calc-do-alg-entry "" "Replace selection with: "))
+ (setq alg (calc-do-alg-entry "" "Replace selection with: " nil
+ 'calc-selection-history))
(and alg
(progn
(setq alg (calc-encase-atoms (car alg)))
@@ -765,7 +769,8 @@
(car (calc-do-alg-entry ""
(if divide
"Divide both sides by: "
- "Multiply both sides by: ")))))
+ "Multiply both sides by: ")
+ nil 'calc-selection-history))))
(and alg
(progn
(if (and (or (eq func '/)
@@ -830,7 +835,8 @@
(car (calc-do-alg-entry ""
(if subtract
"Subtract from both sides: "
- "Add to both sides: ")))))
+ "Add to both sides: ")
+ nil 'calc-selection-history))))
(and alg
(progn
(if (and (assq func calc-tweak-eqn-table)