GNU bug report logs - #64232
28.2; Incorrect(?) byte compilation warning about ‘ansi-color-apply-on-region’

Previous Next

Package: emacs;

Reported by: Zack Weinberg <zack <at> owlfolio.org>

Date: Thu, 22 Jun 2023 19:57:02 UTC

Severity: normal

Found in version 28.2

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

Bug is archived. No further changes may be made.

Full log


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

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Zack Weinberg <zack <at> owlfolio.org>
Cc: 64232 <at> debbugs.gnu.org
Subject: Re: bug#64232: 28.2; Incorrect(?) byte compilation warning about
 ‘ansi-color-apply-on-region’
Date: Thu, 29 Jun 2023 06:17:43 +0200
Zack Weinberg <zack <at> owlfolio.org> writes:

> (eval-when-compile
>   (check-declare-file byte-compile-current-file))

BTW, I think a better alternative might be

#+begin_src emacs-lisp
(require 'cl-lib)
(cl-eval-when (compile)
  (check-declare-file byte-compile-current-file))
#+end_src

which behaves like you want and also doesn't break loading the source of
your file like your version does.  If you don't want to load cl-lib, I
guess adding something like

#+begin_src emacs-lisp
(defmacro check-declarations ()
  (check-declare-file byte-compile-current-file)
  t)
(check-declarations)
#+end_src

could also work.

Michael.




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

Previous Next


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