From 3461073c547945a8fc8a1f0b1da1e610a794203b Mon Sep 17 00:00:00 2001 From: Tim Landscheidt Date: Wed, 17 Jan 2024 13:46:33 +0000 Subject: [PATCH] Add -W option to %_emacs_bytecompile The new option -W to %_emacs_bytecompile causes the byte-compilation to fail on warnings. Also, the amendment of load-path is simplified and the macro %bytecompargs that is no longer used is removed. --- emacs.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/emacs.spec b/emacs.spec index f7e686b..c4d3ef7 100644 --- a/emacs.spec +++ b/emacs.spec @@ -106,7 +106,6 @@ Supplements: (libwayland-server and emacs-common) %define site_lisp %{_datadir}/emacs/site-lisp %define site_start_d %{site_lisp}/site-start.d -%define bytecompargs -batch --no-init-file --no-site-file -f batch-byte-compile %define pkgconfig %{_datadir}/pkgconfig %define emacs_libexecdir %{_libexecdir}/emacs/%{version}/%{_host} %define native_lisp %{_libdir}/emacs/%{version}/native-lisp @@ -373,7 +372,7 @@ cat > macros.emacs << EOF %%_emacs_evr %{?epoch:%{epoch}:}%{version}-%{release} %%_emacs_sitelispdir %{site_lisp} %%_emacs_sitestartdir %{site_start_d} -%%_emacs_bytecompile /usr/bin/emacs -batch --no-init-file --no-site-file --eval '(progn (setq load-path (cons "." load-path)))' -f batch-byte-compile +%%_emacs_bytecompile(W) /usr/bin/emacs -batch --no-init-file --no-site-file --eval '(push nil load-path)' %%{-W:--eval '(setq byte-compile-error-on-warn t)' }-f batch-byte-compile %%* EOF %install