[bug#57992] gnu: emacs-use-package: Emit deprecation messages.
Commit Message
* gnu/packages/patches/emacs-use-package-avoid-positional-arguments.patch: New
file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/emacs-xyz.scm (emacs-use-package)[patches]: Add
emacs-use-package-avoid-positional-arguments.patch.
---
gnu/local.mk | 1 +
gnu/packages/emacs-xyz.scm | 6 ++++-
...e-package-avoid-positional-arguments.patch | 26 +++++++++++++++++++
3 files changed, 32 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/emacs-use-package-avoid-positional-arguments.patch
base-commit: 1a1ff7ed8fdaae58aff0e8625399cd7354038ca3
Comments
Emit: to throw or give out; "emit a warning" means "print a warning"
Omit: to leave out; "omit a warning" means "not printing a warning even
though you should".
In these cases, you are proactively working against the warnings, i.e.
preventing them.
Cheers
Hello,
Hilton Chain via Guix-patches via <guix-patches@gnu.org> writes:
> * gnu/packages/patches/emacs-use-package-avoid-positional-arguments.patch: New
> file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/emacs-xyz.scm (emacs-use-package)[patches]: Add
> emacs-use-package-avoid-positional-arguments.patch.
Thank you.
However, unless I'm missing something, I'm not sure we should bother
fixing compilation warnings. This patch can wait next version bump,
can't it?
Regards,
On Sat, 24 Sep 2022 00:29:16 +0800,
Liliana Marie Prikler wrote:
>
> Emit: to throw or give out; "emit a warning" means "print a warning"
> Omit: to leave out; "omit a warning" means "not printing a warning even
> though you should".
>
> In these cases, you are proactively working against the warnings, i.e.
> preventing them.
>
> Cheers
Oops :P
I'll take care in the future, thank you!
On Sun, 25 Sep 2022 01:42:38 +0800,
Nicolas Goaziou wrote:
> However, unless I'm missing something, I'm not sure we should bother
> fixing compilation warnings. This patch can wait next version bump,
> can't it?
No problem :)
Hello,
Hilton Chain via Guix-patches via <guix-patches@gnu.org> writes:
> On Sun, 25 Sep 2022 01:42:38 +0800,
> Nicolas Goaziou wrote:
>> However, unless I'm missing something, I'm not sure we should bother
>> fixing compilation warnings. This patch can wait next version bump,
>> can't it?
>
> No problem :)
Fair enough. Closing then. Feel free to re-open the issue if you change
your mind.
Regards,
@@ -1054,6 +1054,7 @@ dist_patch_DATA = \
%D%/packages/patches/emacs-source-date-epoch.patch \
%D%/packages/patches/emacs-telega-path-placeholder.patch \
%D%/packages/patches/emacs-telega-test-env.patch \
+ %D%/packages/patches/emacs-use-package-avoid-positional-arguments.patch \
%D%/packages/patches/emacs-wordnut-require-adaptive-wrap.patch \
%D%/packages/patches/emacs-yasnippet-fix-tests.patch \
%D%/packages/patches/emacs-kv-fix-tests.patch \
@@ -14994,7 +14994,11 @@ (define-public emacs-use-package
(file-name (git-file-name name version))
(sha256
(base32
- "088kl3bml0rs5bkfymgzr15ram9qvy66h1kaisrbkynh0yxvf8g9"))))
+ "088kl3bml0rs5bkfymgzr15ram9qvy66h1kaisrbkynh0yxvf8g9"))
+ (patches
+ (search-patches
+ ;; NOTE: Cherry-picked from upstream commit.
+ "emacs-use-package-avoid-positional-arguments.patch"))))
(build-system emacs-build-system)
(native-inputs
(list texinfo))
new file mode 100644
@@ -0,0 +1,26 @@
+From cb90d3fa4168d7e1b2f035f4fbb0d5d08db1fbec Mon Sep 17 00:00:00 2001
+From: Jonas Bernoulli <jonas@bernoul.li>
+Date: Tue, 18 May 2021 15:44:34 +0200
+Subject: [PATCH] Avoid positional arguments to define-minor-mode
+
+Back in Emacs-21.1, `define-minor-mode' grew keyword arguments to
+replace its old positional arguments. Starting with Emacs-28.1
+a warning will be omitted if positional arguments are still used.
+---
+ bind-key.el | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/bind-key.el b/bind-key.el
+index 1d611c2..9a2ddcd 100644
+--- a/bind-key.el
++++ b/bind-key.el
+@@ -131,7 +131,8 @@
+
+ (define-minor-mode override-global-mode
+ "A minor mode so that keymap settings override other modes."
+- t "")
++ :global t
++ :lighter "")
+
+ ;; the keymaps in `emulation-mode-map-alists' take precedence over
+ ;; `minor-mode-map-alist'