diff options
| author | Mattias EngdegÄrd | 2022-09-19 10:55:09 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2022-09-19 19:30:03 +0200 |
| commit | 60102016e416e5c19fa5945aeb80693dac7ff2e6 (patch) | |
| tree | 69979ff773d7031634e7bc4f4388abc4ae104717 /lisp/cedet/semantic | |
| parent | a7c65fc6660878e244432a5b25fb3a4ff20e8604 (diff) | |
| download | emacs-60102016e416e5c19fa5945aeb80693dac7ff2e6.tar.gz emacs-60102016e416e5c19fa5945aeb80693dac7ff2e6.zip | |
Abolish max-specpdl-size (bug#57911)
The max-lisp-eval-depth limit is sufficient to prevent unbounded stack
growth including the specbind stack; simplify matters for the user by
not having them to worry about two different limits. This change
turns max-specpdl-size into a harmless variable with no effects,
to keep existing code happy.
* lisp/subr.el (max-specpdl-size):
Define as an ordinary (but obsolete) dynamic variable.
* admin/grammars/Makefile.in:
* doc/lispintro/emacs-lisp-intro.texi (Loops & Recursion):
* doc/lispref/control.texi (Cleanups):
* doc/lispref/edebug.texi (Checking Whether to Stop):
* doc/lispref/eval.texi (Eval):
* doc/lispref/variables.texi (Local Variables):
* doc/misc/calc.texi (Recursion Depth):
Update documentation.
* etc/NEWS: Announce.
* src/eval.c
(FletX): Use safe iteration to guard against circular bindings list.
(syms_of_eval): Remove old max-specpdl-size definition.
(init_eval_once, restore_stack_limits, call_debugger)
(signal_or_quit, grow_specpdl_allocation):
* leim/Makefile.in:
* lisp/Makefile.in:
* lisp/calc/calc-stuff.el (calc-more-recursion-depth)
(calc-less-recursion-depth):
* lisp/calc/calc.el (calc-do):
* lisp/cedet/semantic/ede-grammar.el (ede-proj-makefile-insert-rules):
* lisp/cedet/semantic/grammar.el (semantic-grammar-batch-build-one-package):
* lisp/cus-start.el (standard):
* lisp/emacs-lisp/comp.el (comp--native-compile):
* lisp/emacs-lisp/edebug.el (edebug-max-depth):
(edebug-read-and-maybe-wrap-form, edebug-default-enter):
* lisp/emacs-lisp/regexp-opt.el (regexp-opt):
* lisp/eshell/esh-mode.el (eshell-mode):
* lisp/loadup.el (max-specpdl-size):
* lisp/mh-e/mh-e.el (mh-invisible-headers):
* lisp/net/shr.el (shr-insert-document, shr-descend):
* lisp/play/hanoi.el (hanoi-internal):
* lisp/progmodes/cperl-mode.el:
* src/fileio.c (Fdo_auto_save):
Remove references to and modifications of max-specpdl-size.
Diffstat (limited to 'lisp/cedet/semantic')
| -rw-r--r-- | lisp/cedet/semantic/ede-grammar.el | 7 | ||||
| -rw-r--r-- | lisp/cedet/semantic/grammar.el | 1 |
2 files changed, 3 insertions, 5 deletions
diff --git a/lisp/cedet/semantic/ede-grammar.el b/lisp/cedet/semantic/ede-grammar.el index ff9f991ff4a..40ff8fc86d3 100644 --- a/lisp/cedet/semantic/ede-grammar.el +++ b/lisp/cedet/semantic/ede-grammar.el | |||
| @@ -177,10 +177,9 @@ Lays claim to all -by.el, and -wy.el files." | |||
| 177 | 177 | ||
| 178 | (cl-defmethod ede-proj-makefile-insert-rules :after ((this semantic-ede-proj-target-grammar)) | 178 | (cl-defmethod ede-proj-makefile-insert-rules :after ((this semantic-ede-proj-target-grammar)) |
| 179 | "Insert rules needed by THIS target. | 179 | "Insert rules needed by THIS target. |
| 180 | This raises `max-specpdl-size' and `max-lisp-eval-depth', which can be | 180 | This raises `max-lisp-eval-depth', which can be needed for the compilation |
| 181 | needed for the compilation of the resulting parsers." | 181 | of the resulting parsers." |
| 182 | (insert (format "%s: EMACSFLAGS+= --eval '(setq max-specpdl-size 1500 \ | 182 | (insert (format "%s: EMACSFLAGS+= --eval '(setq max-lisp-eval-depth 700)'\n" |
| 183 | max-lisp-eval-depth 700)'\n" | ||
| 184 | (oref this name)))) | 183 | (oref this name)))) |
| 185 | 184 | ||
| 186 | (cl-defmethod ede-proj-makefile-insert-dist-dependencies ((this semantic-ede-proj-target-grammar)) | 185 | (cl-defmethod ede-proj-makefile-insert-dist-dependencies ((this semantic-ede-proj-target-grammar)) |
diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el index 72037f47108..8ba0e346fff 100644 --- a/lisp/cedet/semantic/grammar.el +++ b/lisp/cedet/semantic/grammar.el | |||
| @@ -1009,7 +1009,6 @@ Return non-nil if there were no errors, nil if errors." | |||
| 1009 | packagename (byte-compile-dest-file packagename)) | 1009 | packagename (byte-compile-dest-file packagename)) |
| 1010 | (let (;; Some complex grammar table expressions need a few | 1010 | (let (;; Some complex grammar table expressions need a few |
| 1011 | ;; more resources than the default. | 1011 | ;; more resources than the default. |
| 1012 | (max-specpdl-size (max 3000 max-specpdl-size)) | ||
| 1013 | (max-lisp-eval-depth (max 1000 max-lisp-eval-depth)) | 1012 | (max-lisp-eval-depth (max 1000 max-lisp-eval-depth)) |
| 1014 | ) | 1013 | ) |
| 1015 | ;; byte compile the resultant file | 1014 | ;; byte compile the resultant file |