branch: externals/corfu-doc
commit 767e7574ef7003b54f4848160c1f53c43deea9cb
Author: Yuwei Tian <[email protected]>
Commit: Yuwei Tian <[email protected]>

    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