help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bind two commands to one key to toggle between them for the same local k


From: Hongyi Zhao
Subject: Bind two commands to one key to toggle between them for the same local keymap.
Date: Fri, 22 Oct 2021 13:42:51 +0800

I installed company with use-package, and want to bind the "<tab>" key
to the following commands when the local keymaps are
company-search-map or company-active-map to toggle between them:

("<tab>" . company-search-candidates)

and

("<tab>" . company-search-abort)

If the company-search-candidates command is in active, then run
company-search-abort when hitting <tab>, and vice versa.

How can this be achieved?

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province



reply via email to

[Prev in Thread] Current Thread [Next in Thread]