From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Corwin Brust Newsgroups: gmane.emacs.help Subject: Re: global-set-key with function taking arguments Date: Sun, 1 Nov 2020 17:38:55 -0600 Message-ID: References: <87r1pdxqey.fsf@zoho.eu> <87lfflxo76.fsf@zoho.eu> <87h7q9xmim.fsf@zoho.eu> <87361txkor.fsf@zoho.eu> <87lfflw2gp.fsf@zoho.eu> 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="1038"; mail-complaints-to="usenet@ciao.gmane.io" To: Emanuel Berg , Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 02 00:39:53 2020 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 1kZMwx-00009s-17 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 02 Nov 2020 00:39:51 +0100 Original-Received: from localhost ([::1]:48392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZMww-0008Pr-2t for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 01 Nov 2020 18:39:50 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZMwI-0008PN-8W for help-gnu-emacs@gnu.org; Sun, 01 Nov 2020 18:39:10 -0500 Original-Received: from mail-ej1-f52.google.com ([209.85.218.52]:42475) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZMwF-00076N-U7 for help-gnu-emacs@gnu.org; Sun, 01 Nov 2020 18:39:09 -0500 Original-Received: by mail-ej1-f52.google.com with SMTP id i19so5458838ejx.9 for ; Sun, 01 Nov 2020 15:39:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=yKgLyMNRObP0HtSzyyXdg1nLQZcgdzaAk4VAWGC1XmE=; b=L0cGpO7lkQIFlznNAkChQHXdFF9vCLPUgvf1d8/k/K9AwyHUnBdeIxivB/ewRpwVmq r+w/irFtjgfjf72T9r/y3ojEQ1tt937lDB/c8Cs81ePUTzkKw1HNMlvZ0nsTAQa1tUCt AsoH/E6w6oa3C4xcXEMIDlV9cpAprV6lheygSb/quW8QRwIlJZbZUHiZ5cnnGaIxbvTv OR6w1yJcycoeZmOEmWcwMv3yhk/qfk2I7diNS5Et6WwQAHPUapcCKUX89WvaH9UGXlpQ UwPQlvxV5zXOWvDA3PyVDEggkGkVXuA4YU0hdgli258ira9CL7W5NPG6vuc4pheW8tTa u6MA== X-Gm-Message-State: AOAM533X66aE7ZrAPJvZjGha0ePSLyuSF+GWe0/dDOGqthwBtSG8LqLT Hj0lZbPK85pMBQVNtZgrTrBxT0SJU10k5v9svBA= X-Google-Smtp-Source: ABdhPJwSf77MnS11WwaP/cnwpYGFOC0oC1jReWQctG/hKbpl+h4YsWgc9QpVDiN/uV0RKu8Uwg9M6EkvMqTSFn9n9cQ= X-Received: by 2002:a17:906:6b86:: with SMTP id l6mr8516391ejr.524.1604273946117; Sun, 01 Nov 2020 15:39:06 -0800 (PST) In-Reply-To: <87lfflw2gp.fsf@zoho.eu> Received-SPF: pass client-ip=209.85.218.52; envelope-from=mplscorwin@gmail.com; helo=mail-ej1-f52.google.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/01 18:39:06 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:124935 Archived-At: On Sun, Nov 1, 2020 at 8:56 AM Emanuel Berg via Users list for the GNU Emacs text editor wrote: > > Christopher Dimech wrote: > > > My only complaint was that you would not get a description when > > using in a key binding. But now I know that one can put > > a description. > > Yeah, but they are not intended to be used in exactly the same way. > Please read: C-h f lambda RET Rebinding is something specific that is harder if one uses binds a lambda to a key. This example from the top of the Elisp Manual section 22.12 would be difficult if `kill-line' has been implemented with a lambda: (define-key my-mode-map [remap kill-line] 'my-kill-line) In addition to (info "(elisp)Controlling-Active-Maps") see `substitute-key-definition' in (info "(elisp)Changing Key Bindings") for other problematic cases. > > -- > underground experts united > http://user.it.uu.se/~embe8573 > https://dataswamp.org/~incal > > Regards, Corwin