|
From: | Emanuel Berg |
Subject: | Re: Bind two commands to one key to toggle between them for the same local keymap. |
Date: | Fri, 22 Oct 2021 13:04:12 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Hongyi Zhao wrote: > (defun hz-company-search () > (interactive) > (if company-search-abort > (company-search-abort) > (company-search-candidates))) > > (define-key company-active-map "\t" #'hz-company-search) > (define-key company-search-map "\t" #'hz-company-search) That's a function so if anything it should be (company-search-abort) ... but it doesn't seem to work like that, in the `if' setting you want something that always is, or can be interpreted as, t or nil ... -- underground experts united https://dataswamp.org/~incal
[Prev in Thread] | Current Thread | [Next in Thread] |