emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/corfu-doc 767e7574ef 89/95: Obsolete toggle-corfu-doc-m


From: ELPA Syncer
Subject: [elpa] externals/corfu-doc 767e7574ef 89/95: Obsolete toggle-corfu-doc-mode command
Date: Tue, 19 Jul 2022 15:58:07 -0400 (EDT)

branch: externals/corfu-doc
commit 767e7574ef7003b54f4848160c1f53c43deea9cb
Author: Yuwei Tian <ibluefocus@outlook.com>
Commit: Yuwei Tian <ibluefocus@outlook.com>

    Obsolete toggle-corfu-doc-mode command
---
 corfu-doc.el | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/corfu-doc.el b/corfu-doc.el
index b3ac2f194b..bb1f0a1baa 100644
--- a/corfu-doc.el
+++ b/corfu-doc.el
@@ -478,9 +478,11 @@ The optional CANDIDATE-INDEX is the the current completion 
candidate index."
   :group 'corfu
   (cond
     (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))))
 
@@ -572,18 +574,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)
-  "Toggle 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]