diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2023-08-10 12:30:10 +0200 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-08-10 12:30:10 +0200 |
| commit | faeb9a17186e6c6acf06eeace56701a21f7beff5 (patch) | |
| tree | 0e698f7ee2333ca84cd95d22466fea64d1a364a4 | |
| parent | 099e27d9b4782f912effa1d4964f7625984bb2b7 (diff) | |
Fix condition
| -rw-r--r-- | corfu.el | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -1280,16 +1280,15 @@ symbols or elements of the form (not modes)." (defun corfu--on () "Turn `corfu-mode' on." - (unless (or noninteractive - (eq (aref (buffer-name) 0) ?\s) - ;; TODO backport `easy-mmode--globalized-predicate-p' - (eq t global-corfu-modes) - (eq t (cl-loop for p in global-corfu-modes thereis - (pcase-exhaustive p - ('t t) - ('nil 0) - ((pred symbolp) (and (derived-mode-p p) t)) - (`(not . ,m) (and (apply #'derived-mode-p m) 0)))))) + (when (and (not (or noninteractive (eq (aref (buffer-name) 0) ?\s))) + ;; TODO backport `easy-mmode--globalized-predicate-p' + (or (eq t global-corfu-modes) + (eq t (cl-loop for p in global-corfu-modes thereis + (pcase-exhaustive p + ('t t) + ('nil 0) + ((pred symbolp) (and (derived-mode-p p) t)) + (`(not . ,m) (and (apply #'derived-mode-p m) 0))))))) (corfu-mode 1))) ;; Emacs 28: Do not show Corfu commands with M-X |
