Function: corfu--teardown

corfu--teardown is a byte-compiled function defined in corfu.el.

Signature

(corfu--teardown BUFFER)

Documentation

Tear-down Corfu in BUFFER, which might be dead at this point.

Implementations

:before (corfu--teardown BUF (NIL ((&context . corfu-popupinfo-mode) eql t))) in `corfu-popupinfo.el'.

Undocumented

:before (corfu--teardown BUF (NIL ((&context . corfu-echo-mode) eql t))) in `corfu-echo.el'.

Undocumented

:before (corfu--teardown BUF (NIL ((&context . corfu-mouse-mode) eql t))) in `corfu-mouse.el'.

Undocumented

(corfu--teardown BUFFER) in `corfu.el'.

Undocumented

Source Code

;; Defined in ~/.emacs.d/elpa/corfu-20260813.950/corfu.el
(cl-defgeneric corfu--teardown (buffer)
  "Tear-down Corfu in BUFFER, which might be dead at this point."
  (corfu--popup-hide)
  (corfu--preview-delete)
  (remove-hook 'post-command-hook #'corfu--post-command)
  (when (buffer-live-p buffer)
    (with-current-buffer buffer
      (remove-hook 'window-selection-change-functions #'corfu--window-change 'local)
      (remove-hook 'window-buffer-change-functions #'corfu--window-change 'local)
      (remove-hook 'pre-command-hook #'corfu--prepare 'local)
      (accept-change-group corfu--change-group)))
  (cl-loop for (k . v) in corfu--initial-state do (set k v)))