branch: externals/corfu
commit 032f7cc3b7ffa3f9030624ef8528d2fb50c53fa6
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>

    Rename function
---
 corfu.el                 | 6 +++---
 extensions/corfu-echo.el | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/corfu.el b/corfu.el
index a9603491db..15082b9444 100644
--- a/corfu.el
+++ b/corfu.el
@@ -832,7 +832,7 @@ A scroll bar is displayed from LO to LO+BAR."
   (undo-boundary) ;; Necessary to support `corfu-reset'
   (activate-change-group (setq corfu--change-group (prepare-change-group)))
   (setcdr (assq #'completion-in-region-mode minor-mode-overriding-map-alist) 
corfu-map)
-  (add-hook 'pre-command-hook #'corfu--pre-command nil 'local)
+  (add-hook 'pre-command-hook #'corfu--prepare nil 'local)
   (add-hook 'post-command-hook #'corfu--post-command)
   ;; Disable default post-command handling, since we have our own
   ;; checks in `corfu--post-command'.
@@ -1017,7 +1017,7 @@ Auto completion is only performed if the tick did not 
change."
                (add-face-text-property 0 (length c) 'corfu-deprecated 'append 
c)))
     (cons mf cands)))
 
-(cl-defgeneric corfu--pre-command ()
+(cl-defgeneric corfu--prepare ()
   "Insert selected candidate unless command is marked to continue completion."
   (when corfu--preview-ov
     (delete-overlay corfu--preview-ov)
@@ -1065,7 +1065,7 @@ AUTO is non-nil when initializing auto completion."
 (cl-defgeneric corfu--teardown ()
   "Teardown Corfu."
   (corfu--popup-hide)
-  (remove-hook 'pre-command-hook #'corfu--pre-command 'local)
+  (remove-hook 'pre-command-hook #'corfu--prepare 'local)
   (remove-hook 'post-command-hook #'corfu--post-command)
   (when corfu--preview-ov (delete-overlay corfu--preview-ov))
   (accept-change-group corfu--change-group)
diff --git a/extensions/corfu-echo.el b/extensions/corfu-echo.el
index 83eaa99fe4..0f30132fc8 100644
--- a/extensions/corfu-echo.el
+++ b/extensions/corfu-echo.el
@@ -96,7 +96,7 @@ floats to specify initial and subsequent delay."
 (cl-defmethod corfu--teardown :before (&context (corfu-echo-mode (eql t)))
   (corfu-echo--cancel))
 
-(cl-defmethod corfu--pre-command :before (&context (corfu-echo-mode (eql t)))
+(cl-defmethod corfu--prepare :before (&context (corfu-echo-mode (eql t)))
   (corfu-echo--cancel corfu-echo--message))
 
 ;;;###autoload

Reply via email to