From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: [External] : Re: Bind two commands to one key to toggle between them for the same local keymap. Date: Sat, 23 Oct 2021 16:48:38 +0800 Message-ID: References: <87y26lporl.fsf@zoho.eu> <874k98m9wj.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34106"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 23 11:14:09 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1meD6P-0008iC-FT for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 23 Oct 2021 11:14:09 +0200 Original-Received: from localhost ([::1]:48512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1meD6O-0001vC-A5 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 23 Oct 2021 05:14:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1meCi0-0003s9-01 for help-gnu-emacs@gnu.org; Sat, 23 Oct 2021 04:48:56 -0400 Original-Received: from mail-ua1-x930.google.com ([2607:f8b0:4864:20::930]:45845) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1meChv-0007Xi-5Y for help-gnu-emacs@gnu.org; Sat, 23 Oct 2021 04:48:55 -0400 Original-Received: by mail-ua1-x930.google.com with SMTP id a17so12072934uax.12 for ; Sat, 23 Oct 2021 01:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6bzYKtHBprwwBJqHnwV7QNCVcsyUupufyg/MCO3n4f4=; b=XBXK65NOExwnpBrhxy8t7jHuWelkevs1RpJ1ZL1LpGCQzil65rnJNvfAeDa179Rpnj IpTH16nnNdvAAPnTZxpSnIvmQihQLpYUt+ADVMOR/VNl5k08rb3UzSWvUCdCREJoPwn+ xP7IxAMwtGN1BQ7kwwjLL/g2lR3T/KOZrw6qkZataXF0R7m6N5Q4wWVZAytxF9ct9f75 Bs+UeoatZy3KwMy8QjqkDF+S9pcXIFBQUYlc8U0c+YbBw0taCgfXh+hRLkyZJvaodZws H6FckLy9R0nDer5dCJx0MS9tL7ugoCMnLC+XHVE5ima1hYdtgwvPU5UA8BV2ZWQfsNQL +jPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6bzYKtHBprwwBJqHnwV7QNCVcsyUupufyg/MCO3n4f4=; b=uTvbAJS17fPJk2KeJXlTurwcoNcl1IdELxJhspST6zMrQyx/LaYlF2jNJu2fOlbVCH Z7C7gG8IXkbGm5gPC16lnyXTc0wnXcRhDE9vfKBDKyXWID4sg5o8rrX/aOGxwtgbueLb GH0kad9MJrm1i71BRtGd2CX8Y0QMRX1+UAvkX07Eq/MPqafQ0Ek6wqx1EJMCjPuvslpX xxQyL0LBftAClnUIV9+fMShNWTts2CCt7JK6uObYYJ7WgpStpO/vDSyZvwqVEWk1D3OG pbsYu+puZ3uwaHRyLYjwhFsP9MJ5Y2bij694fG3SIA0zA9bflZ6rBrPKosokEPn0Ejna uCwg== X-Gm-Message-State: AOAM530M/nvBHU/LtCKeSmfxvacNRmn4TLJ/IgvaeyWu69xZNbwHxgAP Pnvdimzhut+JyXfRnQ8XYYOsTNV6YRLUoiUOycs= X-Google-Smtp-Source: ABdhPJwyVS261rGg8XW9O0FpvIaDNvyvr72i85KbAKAG+EJnAHd5B85PpT3C4clRqPdTx4qR/ajakhKDlfzDhSU01HA= X-Received: by 2002:a9f:2aca:: with SMTP id d10mr5314522uaj.26.1634978929348; Sat, 23 Oct 2021 01:48:49 -0700 (PDT) In-Reply-To: <874k98m9wj.fsf@web.de> Received-SPF: pass client-ip=2607:f8b0:4864:20::930; envelope-from=hongyi.zhao@gmail.com; helo=mail-ua1-x930.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:134042 Archived-At: On Sat, Oct 23, 2021 at 4:20 PM Michael Heerdegen wrote: > > Hongyi Zhao writes: > > > ("" . (lambda () > > (interactive) > > (if (company--active-p) #'company-search-abort > > #'company-search-candidates))) > > Your lambda only returns a command name, but it doesn't call any > command. It will just do "nothing". I'm in a confusion for this problem. The fix?