[PATCH] gnu: emacs-rime: Emit deprecation warning.

  • Done
  • quality assurance status badge
Details
3 participants
  • Hilton Chain
  • Liliana Marie Prikler
  • Nicolas Goaziou
Owner
unassigned
Submitted by
Hilton Chain
Severity
normal
H
H
Hilton Chain wrote on 22 Sep 2022 06:58
(address . guix-patches@gnu.org)
y76mtasm2dd.wl-hako@ultrarare.space
* gnu/packages/patches/emacs-rime-update-define-minor-mode-usage.patch: New
file.
* gnu/local.mk (dist_patch_DATA): Add patch.
* gnu/packages/emacs-xyz.scm (emacs-rime)[patches]: Add
emacs-rime-update-define-minor-mode-usage.patch
---
gnu/local.mk | 1 +
gnu/packages/emacs-xyz.scm | 6 ++-
...-rime-update-define-minor-mode-usage.patch | 38 +++++++++++++++++++
3 files changed, 44 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/emacs-rime-update-define-minor-mode-usage.patch

Toggle diff (77 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index ef1bae5f3c..82e980a272 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1051,6 +1051,7 @@ dist_patch_DATA = \
%D%/packages/patches/emacs-libgit-use-system-libgit2.patch \
%D%/packages/patches/emacs-lispy-fix-thread-last-test.patch \
%D%/packages/patches/emacs-polymode-fix-lexical-variable-error.patch \
+ %D%/packages/patches/emacs-rime-update-define-minor-mode-usage.patch \
%D%/packages/patches/emacs-source-date-epoch.patch \
%D%/packages/patches/emacs-telega-path-placeholder.patch \
%D%/packages/patches/emacs-telega-test-env.patch \
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 32e4c33f16..5811fb410a 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -29523,7 +29523,11 @@ (define-public emacs-rime
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "0z0iwsqr92g8ykxb51gkawwxwzx0faw0027zgdi7c38ngjqld237"))))
+ (base32 "0z0iwsqr92g8ykxb51gkawwxwzx0faw0027zgdi7c38ngjqld237"))
+ (patches
+ (search-patches
+ ;; NOTE: Cherry-picked from upstream, remove when bumping.
+ "emacs-rime-update-define-minor-mode-usage.patch"))))
(build-system emacs-build-system)
(arguments
'(#:include (cons "\\.so$" %default-include)
diff --git a/gnu/packages/patches/emacs-rime-update-define-minor-mode-usage.patch b/gnu/packages/patches/emacs-rime-update-define-minor-mode-usage.patch
new file mode 100644
index 0000000000..4f905ca0bf
--- /dev/null
+++ b/gnu/packages/patches/emacs-rime-update-define-minor-mode-usage.patch
@@ -0,0 +1,38 @@
+From 5c2ade217134f6f20cd405447af20825e5b44513 Mon Sep 17 00:00:00 2001
+From: tianshu <doglooksgood@gmail.com>
+Date: Sat, 11 Dec 2021 02:06:35 +0800
+Subject: [PATCH] update define-minor-mode usage
+
+---
+ rime.el | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/rime.el b/rime.el
+index 64a4d70..044ab97 100644
+--- a/rime.el
++++ b/rime.el
+@@ -1084,18 +1084,18 @@ Argument NAME ignored."
+ "Mode used in composition.
+
+ Should not be enabled manually."
+- nil
+- nil
+- nil
++ :lighter nil
++ :init-value nil
++ :keymap nil
+ (if rime-active-mode
+ (rime-active-mode--init)
+ (rime-active-mode--uninit)))
+
+ (define-minor-mode rime-mode
+ "Mode used when input method is activated."
+- nil
+- nil
+- rime-mode-map)
++ :lighter nil
++ :init-value nil
++ :keymap rime-mode-map)
+
+ ;;;###autoload
+ (register-input-method "rime" "euc-cn" 'rime-activate rime-title)

base-commit: 33d4992b69bfed2ec6b15b7b842599efb1cb1e31
--
2.37.3
L
L
Liliana Marie Prikler wrote on 23 Sep 2022 18:29
Emit != omit
(name . Hilton Chain)(address . hako@ultrarare.space)
83cfc1b31312f9eec3ca45a70d690db4c2cee3b5.camel@gmail.com
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
H
H
Hilton Chain wrote on 25 Sep 2022 01:41
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
y765yhcgx16.wl-hako@ultrarare.space
On Sat, 24 Sep 2022 00:29:16 +0800,
Liliana Marie Prikler wrote:
Toggle quote (10 lines)
>
> 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!
N
N
Nicolas Goaziou wrote on 25 Sep 2022 14:57
Re: [bug#57997] [PATCH] gnu: emacs-rime: Emit deprecation warning.
(name . Hilton Chain via Guix-patches via)(address . guix-patches@gnu.org)
874jwvvcgr.fsf@nicolasgoaziou.fr
Hello,

Hilton Chain via Guix-patches via <guix-patches@gnu.org> writes:

Toggle quote (6 lines)
> * gnu/packages/patches/emacs-rime-update-define-minor-mode-usage.patch: New
> file.
> * gnu/local.mk (dist_patch_DATA): Add patch.
> * gnu/packages/emacs-xyz.scm (emacs-rime)[patches]: Add
> emacs-rime-update-define-minor-mode-usage.patch

Closing. See bug #57992.

Regards,
--
Nicolas Goaziou
?