minad / corfu

:desert_island: corfu.el - COmpletion in Region FUnction
GNU General Public License v3.0
1.11k stars 43 forks source link

corfu--on: when (not foo) in global-corfu-modes, enable when not foo #379

Closed mekeor closed 11 months ago

mekeor commented 11 months ago

I set global-corfu-modes to '((not erc-modes)) and it stopped working anywhere. I'd expect this PR to fix this.

But I'm not sure if this is the right solution in general.

minad commented 11 months ago

I assume a final t is needed:

(setq global-corfu-modes '((not org-mode) t))
mekeor commented 11 months ago

2023-10-10 22:13 @.***:

I assume a final t is needed:

(setq global-corfu-modes '((not org-mode) t))

Oh right. Thank you very much.

I didn't know that cl-loop's thereis clause will also stop when it's 0, i.e. non-nil.

‘thereis CONDITION’ This clause stops the loop when the specified form is non-‘nil’; in this case, it returns that non-‘nil’ value. If all the values were ‘nil’, the loop returns ‘nil’.