aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/calc
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/calc')
-rw-r--r--lisp/calc/calc-stuff.el8
-rw-r--r--lisp/calc/calc.el3
2 files changed, 3 insertions, 8 deletions
diff --git a/lisp/calc/calc-stuff.el b/lisp/calc/calc-stuff.el
index 0e8ea42bedc..758b9201843 100644
--- a/lisp/calc/calc-stuff.el
+++ b/lisp/calc/calc-stuff.el
@@ -52,18 +52,14 @@ With a prefix, push that prefix as a number onto the stack."
52 (calc-less-recursion-depth n) 52 (calc-less-recursion-depth n)
53 (let ((n (if n (prefix-numeric-value n) 2))) 53 (let ((n (if n (prefix-numeric-value n) 2)))
54 (if (> n 1) 54 (if (> n 1)
55 (setq max-specpdl-size (* max-specpdl-size n) 55 (setq max-lisp-eval-depth (* max-lisp-eval-depth n))))
56 max-lisp-eval-depth (* max-lisp-eval-depth n))))
57 (message "max-lisp-eval-depth is now %d" max-lisp-eval-depth)))) 56 (message "max-lisp-eval-depth is now %d" max-lisp-eval-depth))))
58 57
59(defun calc-less-recursion-depth (n) 58(defun calc-less-recursion-depth (n)
60 (interactive "P") 59 (interactive "P")
61 (let ((n (if n (prefix-numeric-value n) 2))) 60 (let ((n (if n (prefix-numeric-value n) 2)))
62 (if (> n 1) 61 (if (> n 1)
63 (setq max-specpdl-size 62 (setq max-lisp-eval-depth (max (/ max-lisp-eval-depth n) 200))))
64 (max (/ max-specpdl-size n) 600)
65 max-lisp-eval-depth
66 (max (/ max-lisp-eval-depth n) 200))))
67 (message "max-lisp-eval-depth is now %d" max-lisp-eval-depth)) 63 (message "max-lisp-eval-depth is now %d" max-lisp-eval-depth))
68 64
69 65
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index 5077c8c8528..c0f87ad3d42 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -1625,8 +1625,7 @@ See calc-keypad for details."
1625 (error 1625 (error
1626 (if (and (eq (car err) 'error) 1626 (if (and (eq (car err) 'error)
1627 (stringp (nth 1 err)) 1627 (stringp (nth 1 err))
1628 (string-match "max-specpdl-size\\|max-lisp-eval-depth" 1628 (string-search "max-lisp-eval-depth" (nth 1 err)))
1629 (nth 1 err)))
1630 (error (substitute-command-keys 1629 (error (substitute-command-keys
1631 "Computation got stuck or ran too long. Type \\`M' to increase the limit")) 1630 "Computation got stuck or ran too long. Type \\`M' to increase the limit"))
1632 (setq calc-aborted-prefix nil) 1631 (setq calc-aborted-prefix nil)