GNU bug report logs - #58396
29.0.50; Optimization failure for add-to-list

Previous Next

Package: emacs;

Reported by: German Pacenza <germanp82 <at> hotmail.com>

Date: Sun, 9 Oct 2022 16:26:02 UTC

Severity: normal

Merged with 58148, 58557

Found in version 29.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #54 received at 58396 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
Cc: German Pacenza <germanp82 <at> hotmail.com>, 58396 <at> debbugs.gnu.org,
 Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#58396: 29.0.50; Optimization failure for add-to-list
Date: Sat, 30 Sep 2023 09:56:09 -0400
> +                  (let ((inhibit-message t)     ;[1]
> +                        (warning-minimum-log-level :emergency))
>                      (advice-add 'macroexpand :around macroexpand-advice)
> -                    (macroexpand-all sexp))
> +                    (condition-case nil         ;[3]
> +                        (macroexpand-all sexp)
> +                      (t sexp)))

This `t` catches more than errors.  Better replace it with `error`.

> -                  (let ((warning-minimum-log-level :emergency))
> +                  (let ((inhibit-message t)                  ;[1]
> +                        (macroexp-inhibit-compiler-macros t) ;[2]
> +                        (warning-minimum-log-level :emergency))
>                      (advice-add 'macroexpand-1 :around macroexpand-advice)
> -                    (macroexpand-all sexp elisp--local-macroenv))
> +                    (condition-case nil         ;[3]
> +                        (macroexpand-all sexp elisp--local-macroenv)
> +                      (t sexp)))

What kind of errors are we expecting to catch with this
`condition-case`?  The pre-existing advice is supposed to catch macro
expansion errors, and the new let-binding is supposed to catch
compiler-macro errors, so it seems to me there aren't any *expected*
errors left.  If so, better remove this `condition-case` (or replace it
with `with-demoted-errors`) since all it has left to do is to hide any
real coding error that may come up and that we'd like to be told about.


        Stefan





This bug report was last modified 1 year and 320 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.