From bb9402e6e9c12938aee31b81e25511eb1f6335d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Wed, 1 Jan 2020 16:35:54 +0100 Subject: [PATCH 1/5] Raise default max-specpdl-size value Occasionally, loading cl-generic.el from source requires max_specpdl_size > 1600 when bootstrapping, and thus fails. In any case we are very close to the limit. * src/eval.c (init_eval_once): Raise max_specpdl_size to 1800. * doc/lispref/variables.texi (Local Variables): Update docs. --- doc/lispref/variables.texi | 2 +- src/eval.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 1ec97e2f3de..568eb0f7836 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -322,7 +322,7 @@ that Lisp avoids infinite recursion on an ill-defined function. @code{max-lisp-eval-depth} provides another limit on depth of nesting. @xref{Definition of max-lisp-eval-depth,, Eval}. -The default value is 1600. Entry to the Lisp debugger increases the +The default value is 1800. Entry to the Lisp debugger increases the value, if there is little room left, to make sure the debugger itself has room to execute. @end defopt diff --git a/src/eval.c b/src/eval.c index 4559a0e1f66..d1f74751446 100644 --- a/src/eval.c +++ b/src/eval.c @@ -219,7 +219,7 @@ void init_eval_once (void) { /* Don't forget to update docs (lispref node "Local Variables"). */ - max_specpdl_size = 1600; /* 1500 is not enough for cl-generic.el. */ + max_specpdl_size = 1800; /* 1600 is not enough for cl-generic.el. */ max_lisp_eval_depth = 800; Vrun_hooks = Qnil; pdumper_do_now_and_after_load (init_eval_once_for_pdumper); From 42f66aa5028b543085a77b7a1ded5132444442b2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 1 Jan 2020 18:30:58 +0200 Subject: [PATCH 2/5] ; Fix NEWS.24 * etc/NEWS.24: Minor retroactive wording changes and additions to fix the version shown by Help commands. (Bug#38844) --- etc/NEWS.24 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/etc/NEWS.24 b/etc/NEWS.24 index 8207a8ca59a..60c2b4dfc66 100644 --- a/etc/NEWS.24 +++ b/etc/NEWS.24 @@ -3604,10 +3604,12 @@ advertised at the time.) ** Debugger changes -*** New macro `condition-case-unless-debug' (this was actually added in -Emacs 23.1 as condition-case-no-debug, but not advertised) +*** New macro `condition-case-unless-debug'. +(This was actually added in Emacs 23.1 as condition-case-no-debug, but +not advertised) -*** The macro `with-demoted-errors' was added in Emacs 23.1, but not advertised. +*** The macro `with-demoted-errors'. +It was also added in Emacs 23.1, but not advertised. *** Variable `stack-trace-on-error' removed. @@ -3691,6 +3693,8 @@ argument is supplied (see Trash changes, above). *** New file predicates: `file-equal-p', `file-in-directory-p'. +*** New function `file-size-human-readable'. + ** Tool-bars can display separators. Tool-bar separators are handled like menu separators in menu-bar maps, i.e. via menu entries of the form `(menu-item "--")'. From fab3674b363143299b6bdfae1f6f1e6f6ee1daa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Wed, 1 Jan 2020 17:22:35 +0100 Subject: [PATCH 3/5] Revert "Raise default max-specpdl-size value" This reverts commit bb9402e6e9c12938aee31b81e25511eb1f6335d2. --- doc/lispref/variables.texi | 2 +- src/eval.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 568eb0f7836..1ec97e2f3de 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -322,7 +322,7 @@ that Lisp avoids infinite recursion on an ill-defined function. @code{max-lisp-eval-depth} provides another limit on depth of nesting. @xref{Definition of max-lisp-eval-depth,, Eval}. -The default value is 1800. Entry to the Lisp debugger increases the +The default value is 1600. Entry to the Lisp debugger increases the value, if there is little room left, to make sure the debugger itself has room to execute. @end defopt diff --git a/src/eval.c b/src/eval.c index d1f74751446..4559a0e1f66 100644 --- a/src/eval.c +++ b/src/eval.c @@ -219,7 +219,7 @@ void init_eval_once (void) { /* Don't forget to update docs (lispref node "Local Variables"). */ - max_specpdl_size = 1800; /* 1600 is not enough for cl-generic.el. */ + max_specpdl_size = 1600; /* 1500 is not enough for cl-generic.el. */ max_lisp_eval_depth = 800; Vrun_hooks = Qnil; pdumper_do_now_and_after_load (init_eval_once_for_pdumper); From 43203d5068eee68138007cac9d12a04d40d4ffb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Wed, 1 Jan 2020 17:35:01 +0100 Subject: [PATCH 4/5] * lisp/loadup.el: Set max-specpdl-size to 1800 when loading cl-generic.el. --- lisp/loadup.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/loadup.el b/lisp/loadup.el index 04ec5ca4754..97525b27086 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -245,7 +245,9 @@ (load "language/cham") (load "indent") -(load "emacs-lisp/cl-generic") +(let ((max-specpdl-size (max max-specpdl-size 1800))) + ;; A particularly demanding file to load; 1600 does not seem to be enough. + (load "emacs-lisp/cl-generic")) (load "minibuffer") ;Needs cl-generic (and define-minor-mode). (load "frame") (load "startup") From 071483b6f516b737182440264ec11c94ada53dc3 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 1 Jan 2020 19:49:57 +0200 Subject: [PATCH 5/5] Fix reverting customizations * lisp/custom.el (custom-push-theme): Don't use setcar to modify the recorded value of PROP; instead, cons a new property list by deleting the old value and adding the new one. (Bug#38812) --- lisp/custom.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/custom.el b/lisp/custom.el index ba7f9997821..037f6c5b1d5 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -886,7 +886,10 @@ See `custom-known-themes' for a list of known themes." (put theme 'theme-settings (cons (list prop symbol theme value) (delq res theme-settings))) - (setcar (cdr setting) value))) + ;; It's tempting to use setcar here, but that could + ;; inadvertently modify other properties in SYMBOL's proplist, + ;; if those just happen to share elements with the value of PROP. + (put symbol prop (cons (list theme value) (delq setting old))))) ;; Add a new setting: (t (when (custom--should-apply-setting theme)