]> git.eshelyaron.com Git - emacs.git/commitdiff
(calc-selection-history): New variable.
authorJay Belanger <jay.p.belanger@gmail.com>
Thu, 20 Jul 2006 20:24:40 +0000 (20:24 +0000)
committerJay Belanger <jay.p.belanger@gmail.com>
Thu, 20 Jul 2006 20:24:40 +0000 (20:24 +0000)
(calc-enter-selection, calc-sel-mult-both-sides, calc-sel-add-both-sides):
Use calc-selection-history.

lisp/calc/calc-sel.el

index bf18fa968c512ffb7df1fd9ecbd11db4c4fa2fea..7f6dbb7f9992471dfc960db4f4b944d18bf8dc94 100644 (file)
      (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
          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)))
                (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 '/)
                (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)