all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Yuwei Tian <ibluefocus@outlook.com>
Cc: Akib Azmain Turja <akib@disroot.org>, emacs-devel@gnu.org
Subject: Re: [NonGNU ELPA] New packages: corfu-doc and corfu-doc-terminal
Date: Sat, 28 May 2022 11:02:11 -0400	[thread overview]
Message-ID: <jwvfskten8o.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87czfxu7be.fsf@disroot.org> (Akib Azmain Turja's message of "Sat, 28 May 2022 19:15:33 +0600")

[-- Attachment #1: Type: text/plain, Size: 643 bytes --]

Hi,

Akib just suggested we add `corfu-doc` to NonGNU ELPA but it seems like
you have signed the copyright paperwork so we could add it to GNU ELPA.
I think that would be a great addition.
Are you OK with it?

This assumes you'll be careful to make sure future contributors have
signed copyright paperwork as well, and also you'll need to change the
Copyright line in the file (which is a way to state that you consider
this file as covered by the copyright assignment you recently signed).

Also, while I'm here, I attach a patch resulting from my superficial
reading of your code.

Thank you for your contribution to Emacs,


        Stefan

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: corfu-doc.patch --]
[-- Type: text/x-diff, Size: 3837 bytes --]

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000..39090e0af5
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+*.elc
+/corfu-doc-autoloads.el
+/corfu-doc-pkg.el
diff --git a/corfu-doc.el b/corfu-doc.el
index eed0bbbaaa..014804e4f7 100644
--- a/corfu-doc.el
+++ b/corfu-doc.el
@@ -1,6 +1,6 @@
 ;;; corfu-doc.el --- Documentation popup for Corfu -*- lexical-binding: t -*-
 
-;; Copyright (C) 2021-2022 Yuwei Tian
+;; Copyright (C) 2021-2022  Free Software Foundation, Inc.
 
 ;; Author: Yuwei Tian <ibluefocus@NOSPAM.gmail.com>
 ;; URL: https://github.com/galeo/corfu-doc
@@ -44,14 +44,12 @@
 
 (defcustom corfu-doc-auto t
   "Display documentation popup automatically."
-  :type 'boolean
-  :group 'corfu-doc)
+  :type 'boolean)
 
 (defcustom corfu-doc-delay 0.1
   "The number of seconds to wait before displaying the documentation popup."
   :type 'float
-  :safe #'floatp
-  :group 'corfu-doc)
+  :safe #'floatp)
 
 (defcustom corfu-doc-hide-threshold 0.2
   "Threshold value to hide the documentation popup when browsing candidates.
@@ -60,28 +58,24 @@ When the selected candidate is changed, if the value of `corfu-doc-delay'
 is greater than this threshold value, the documentation popup frame will
 be hided immediately. Else, just clear the doc frame content."
   :type 'float
-  :safe #'floatp
-  :group 'corfu-doc)
+  :safe #'floatp)
 
 (defcustom corfu-doc-max-width 60
   "The max width of the corfu doc frame in characters."
   :type 'integer
-  :safe #'integerp
-  :group 'corfu-doc)
+  :safe #'integerp)
 
 (defcustom corfu-doc-max-height 10
   "The max height of the corfu doc frame in characters."
   :type 'integer
-  :safe #'integerp
-  :group 'corfu-doc)
+  :safe #'integerp)
 
 (defcustom corfu-doc-resize-frame t
   "Non-nil means resize the corfu doc frame automatically.
 
 If this is nil, do not resize corfu doc frame automatically."
   :type 'boolean
-  :safe #'booleanp
-  :group 'corfu-doc)
+  :safe #'booleanp)
 
 (defcustom corfu-doc-display-within-parent-frame nil
   "Display the doc frame within the parent frame.
@@ -100,8 +94,7 @@ still being visible themselves.
 
 Please see \"(elisp) Child Frames\" in Emacs manual for details."
   :type 'boolean
-  :safe #'booleanp
-  :group 'corfu-doc)
+  :safe #'booleanp)
 
 (defvar corfu-doc--frame nil
   "Doc frame.")
@@ -443,12 +436,14 @@ FWIDTH and FHEIGHT."
   :global t
   :group 'corfu
   (cond
-    (corfu-doc-mode
-     (advice-add 'corfu--popup-show :after #'corfu-doc--popup-show)
-     (advice-add 'corfu--popup-hide :after #'corfu-doc--popup-hide))
-    (t
-     (advice-remove 'corfu--popup-show #'corfu-doc--popup-show)
-     (advice-remove 'corfu--popup-hide #'corfu-doc--popup-hide))))
+   (corfu-doc-mode
+    (corfu-doc--manual-popup-show)
+    (advice-add 'corfu--popup-show :after #'corfu-doc--popup-show)
+    (advice-add 'corfu--popup-hide :after #'corfu-doc--popup-hide))
+   (t
+    (corfu-doc--popup-hide)
+    (advice-remove 'corfu--popup-show #'corfu-doc--popup-show)
+    (advice-remove 'corfu--popup-hide #'corfu-doc--popup-hide))))
 
 (defun corfu-doc--popup-support-p ()
   (display-graphic-p))
@@ -528,18 +523,7 @@ corfu doc mode is turned on and `corfu-doc-auto' is set to Non-nil."
     (advice-add 'corfu--popup-show :after #'corfu-doc--popup-show)))
 
 ;;;###autoload
-(defun toggle-corfu-doc-mode (&optional arg)
-  "Toggles corfu doc mode on or off.
-With optional ARG, turn corfu doc mode on if and only if ARG is positive."
-  (interactive "P")
-  (if (null arg)
-      (setq arg (if corfu-doc-mode -1 1))
-    (setq arg (prefix-numeric-value arg)))
-  (if (> arg 0)
-      (corfu-doc--manual-popup-show)
-    (corfu-doc--popup-hide))
-  (corfu-doc-mode arg))
-
+(define-obsolete-function-alias 'toggle-corfu-doc-mode #'corfu-doc-mode "0.7")
 
 (provide 'corfu-doc)
 ;;; corfu-doc.el ends here

  parent reply	other threads:[~2022-05-28 15:02 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-28 13:15 [NonGNU ELPA] New packages: corfu-doc and corfu-doc-terminal Akib Azmain Turja
2022-05-28 13:55 ` Philip Kaludercic
2022-05-28 14:38 ` Stefan Monnier
2022-05-28 16:30   ` Akib Azmain Turja
2022-05-28 17:47     ` Stefan Monnier
2022-05-28 20:27       ` Akib Azmain Turja
2022-05-28 22:03         ` Stefan Monnier
2022-05-28 19:16     ` Eli Zaretskii
2022-05-28 20:40       ` Akib Azmain Turja
2022-05-29  6:26         ` Eli Zaretskii
2022-07-12  3:19           ` Implementing child frames on terminal Akib Azmain Turja
2022-07-12  5:13             ` Po Lu
2022-07-12  8:35               ` Akib Azmain Turja
2022-07-12  9:44                 ` Po Lu
2022-07-12 13:25                   ` Eli Zaretskii
2022-07-12 13:38                     ` Po Lu
2022-07-12 13:48                       ` Eli Zaretskii
2022-07-12 13:19                 ` Eli Zaretskii
2022-07-12 14:21                   ` Akib Azmain Turja
2022-07-12 15:46                     ` Eli Zaretskii
2022-07-13 14:33                       ` Akib Azmain Turja
2022-07-13 15:57                         ` Eli Zaretskii
2022-07-13 17:55                           ` Akib Azmain Turja
2022-07-13 18:11                             ` Eli Zaretskii
2022-07-14  7:14                               ` Akib Azmain Turja
2022-07-14  7:27                                 ` Eli Zaretskii
2022-07-12 13:06             ` Eli Zaretskii
2022-07-12 13:40               ` Po Lu
2022-07-12 13:50                 ` Eli Zaretskii
2022-07-12 13:54                   ` Po Lu
2022-07-12 14:17                     ` Eli Zaretskii
2022-07-14  1:27                       ` Po Lu
2022-07-14  1:55                       ` Stefan Monnier
2022-07-14  3:34                         ` Po Lu
2022-07-14 14:00                           ` Stefan Monnier
2022-07-14  5:56                         ` Eli Zaretskii
2022-07-14  6:29                           ` Po Lu
2022-07-14  6:53                           ` Akib Azmain Turja
2022-07-14  7:20                             ` Eli Zaretskii
2022-07-14 12:07                               ` Akib Azmain Turja
2022-07-14 13:12                                 ` Eli Zaretskii
2022-07-14 13:52                                   ` Akib Azmain Turja
2022-07-14 14:00                                     ` Eli Zaretskii
2022-07-15  2:37                                     ` Po Lu
2022-07-15  3:35                                       ` Stefan Monnier
2022-07-15  4:24                                         ` Po Lu
2022-07-15  5:07                                           ` tomas
2022-07-14  7:25                             ` Po Lu
2022-07-14 12:11                               ` Akib Azmain Turja
2022-07-14 19:33                               ` Tassilo Horn
2022-07-14 14:03                           ` Stefan Monnier
2022-07-15 10:28                             ` Akib Azmain Turja
2022-07-12 14:03                 ` Akib Azmain Turja
2022-05-28 15:02 ` Stefan Monnier [this message]
2022-05-28 16:06 ` [NonGNU ELPA] New packages: corfu-doc and corfu-doc-terminal Akib Azmain Turja
2022-05-28 17:46   ` Philip Kaludercic
2022-05-28 20:31     ` Akib Azmain Turja
2022-05-29  8:14       ` Daniel Mendler
2022-07-15 15:06         ` Akib Azmain Turja
2022-07-17 14:53           ` Philip Kaludercic
2022-07-17 17:06             ` Akib Azmain Turja
2022-07-17 18:27               ` Philip Kaludercic
2022-07-18  9:27                 ` Akib Azmain Turja
2022-07-17 19:08               ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvfskten8o.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=akib@disroot.org \
    --cc=emacs-devel@gnu.org \
    --cc=ibluefocus@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.