[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bind two commands to one key to toggle between them for the same loc
From: |
Hongyi Zhao |
Subject: |
Re: Bind two commands to one key to toggle between them for the same local keymap. |
Date: |
Fri, 22 Oct 2021 17:55:14 +0800 |
On Fri, Oct 22, 2021 at 5:46 PM Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
>
> On Fri, Oct 22, 2021 at 5:26 PM Emanuel Berg via Users list for the
> GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
> >
> > Hongyi Zhao wrote:
> >
> > > Thank you for your idea. `company-search-mode' is a minor
> > > mode
> >
> > Okay, my mistake, then just use the variable, i.e.
> > `company-search-mode'.
> >
> > (if company-search-mode ... )
>
> I changed to the following code snippet, but got the same result:
>
> (defun hz-company-search ()
> (interactive)
> (if company-search-mode
> (company-search-abort)
> (company-search-candidates)))
>
> (define-key company-active-map "\t" #'hz-company-search)
> (define-key company-search-map "\t" #'hz-company-search)
I brought up the discussion here [1].
[1] https://github.com/company-mode/company-mode/discussions/1244
- Re: Bind two commands to one key to toggle between them for the same local keymap., (continued)
- Re: Bind two commands to one key to toggle between them for the same local keymap., Michael Heerdegen, 2021/10/24
- Re: Bind two commands to one key to toggle between them for the same local keymap., Hongyi Zhao, 2021/10/25
- Re: Bind two commands to one key to toggle between them for the same local keymap., Michael Heerdegen, 2021/10/25
- Re: Bind two commands to one key to toggle between them for the same local keymap., Emanuel Berg, 2021/10/25
- Re: Bind two commands to one key to toggle between them for the same local keymap., Hongyi Zhao, 2021/10/25
- Re: Bind two commands to one key to toggle between them for the same local keymap., Emanuel Berg, 2021/10/25
- Re: Bind two commands to one key to toggle between them for the same local keymap., Hongyi Zhao, 2021/10/25
- Re: Bind two commands to one key to toggle between them for the same local keymap.,
Hongyi Zhao <=
- Re: Bind two commands to one key to toggle between them for the same local keymap., Hongyi Zhao, 2021/10/22
- Re: Bind two commands to one key to toggle between them for the same local keymap., Emanuel Berg, 2021/10/22
- Re: Bind two commands to one key to toggle between them for the same local keymap., Hongyi Zhao, 2021/10/22
- Re: Bind two commands to one key to toggle between them for the same local keymap., Emanuel Berg, 2021/10/22
- Re: Bind two commands to one key to toggle between them for the same local keymap., Hongyi Zhao, 2021/10/22
- RE: [External] : Re: Bind two commands to one key to toggle between them for the same local keymap., Drew Adams, 2021/10/22
- Re: [External] : Re: Bind two commands to one key to toggle between them for the same local keymap., Hongyi Zhao, 2021/10/22
- Re: [External] : Re: Bind two commands to one key to toggle between them for the same local keymap., Michael Heerdegen, 2021/10/23
- Re: [External] : Re: Bind two commands to one key to toggle between them for the same local keymap., Hongyi Zhao, 2021/10/23
- Re: [External] : Re: Bind two commands to one key to toggle between them for the same local keymap., Michael Heerdegen, 2021/10/23