Subject: [bug#47402] 回复： Re: [bug#47402] gnu: Add emacs-sdcv

From: qblade <[email-masked]>
Date: Sat, 27 Mar 2021 11:42:44 +0000

OK.

From de8f980187524dc311d6160e67f1abf077e209e2 Mon Sep 17 00:00:00 2001
From: qblade <[email-masked]>
Date: Sat, 27 Mar 2021 06:57:55 +0000
Subject: [PATCH 1/2] gnu: Add emacs-showtip.

* gnu/packages/emacs-xyz.scm (emacs-showtip): New variable.
---
 gnu/packages/emacs-xyz.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index f45507c647..ec810e2bca 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -95,6 +95,7 @@
 ;;; Copyright © 2021 Alexey Abramov <[email-masked]>
 ;;; Copyright © 2021 Xinglu Chen <[email-masked]>
 ;;; Copyright © 2021 Stefan Reichör <[email-masked]>
+;;; Copyright © 2021 qblade <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27350,3 +27351,27 @@ and prefered services can easily be configured.")
 quasi-prefix map, with many useful bindings.  These bindings are
 shorter than usual, using mostly unprefixed keys.")
     (license license:gpl3+)))
+
+(define-public emacs-showtip
+  (let ((commit "930da302809a4257e8d69425455b29e1cc91949b")
+        (revision "0"))
+    (package
+      (name "emacs-showtip")
+      (version (git-version "0.01" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/emacsorphanage/showtip")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "01zak0zhha6dp7a2hm28d065gjnc462iwpsfyxhbxgfzcdlicqc7"))))
+      (build-system emacs-build-system)
+      (home-page "https://github.com/emacsorphanage/showtip")
+      (synopsis "Show tip at cursor")
+      (description
+       "This library provide one function to show
+tooltip near the cursor.")
+      (license license:gpl2+))))
-- 
2.31.0

From c3c36399e2ad7a0229dbec855f1bf3a7aaf0c169 Mon Sep 17 00:00:00 2001
From: qblade <[email-masked]>
Date: Sat, 27 Mar 2021 07:01:56 +0000
Subject: [PATCH 2/2] gnu: Add emacs-sdcv.

* gnu/packages/emacs-xyz.scm (emacs-sdcv): New variable.
---
 gnu/packages/emacs-xyz.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index ec810e2bca..cfd5b83947 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -27375,3 +27375,33 @@ shorter than usual, using mostly unprefixed keys.")
        "This library provide one function to show
 tooltip near the cursor.")
       (license license:gpl2+))))
+
+(define-public emacs-sdcv
+  (let ((commit "943ae3e90cc9a0a88a37cc710acd7424fd4defc4" )
+        (revision "0"))
+    (package
+      (name "emacs-sdcv")
+      (version (git-version "1.5.2" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/stardiviner/sdcv.el")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0i1ylvw7p46pkf3yyyzcdmdhsspzymnnnvx8s0i7vynngr5x0vzh"))))
+      (build-system emacs-build-system)
+      (propagated-inputs
+       `(("emacs-popup" ,emacs-popup)
+         ("emacs-showtip" ,emacs-showtip)
+         ("emacs-pos-tip" ,emacs-pos-tip)))
+      (home-page
+       "https://www.emacswiki.org/emacs/download/sdcv.el")
+      (synopsis
+       "Emacs interface for $code{sdcv}")
+      (description
+       "This plugin translate word by @code{sdcv}, and display
+translation use popup tooltip or buffer.")
+      (license license:gpl3+))))
-- 
2.31.0