bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64232: 28.2; Incorrect(?) byte compilation warning about ‘ansi-color


From: Michael Heerdegen
Subject: bug#64232: 28.2; Incorrect(?) byte compilation warning about ‘ansi-color-apply-on-region’
Date: Thu, 29 Jun 2023 06:17:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Zack Weinberg <zack@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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]