From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: [External] : Re: From global-set-key to keymap-global-set Date: Thu, 06 Jul 2023 11:45:11 +0300 Message-ID: <83cz15ig2w.fsf@gnu.org> References: <83zg4bk4oe.fsf@gnu.org> <83h6qik2wv.fsf@gnu.org> <838rbujxiz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19886"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 06 10:46:43 2023 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 1qHKdP-000540-9O for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 06 Jul 2023 10:46:43 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qHKcA-0006mZ-8D; Thu, 06 Jul 2023 04:45:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHKc7-0006lb-Up for help-gnu-emacs@gnu.org; Thu, 06 Jul 2023 04:45:24 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHKc7-0006SC-JE for help-gnu-emacs@gnu.org; Thu, 06 Jul 2023 04:45:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:Subject:In-Reply-To:To:From: Date; bh=7NclPdb+klf1grYKivw7dFeokgo47LxLDPMG8wU45sk=; b=a0HWYVS/lq0TiRryZThx 1II/lUNtd2usTum8s4a3dIB5aq4SNHC79KyBedy7uGhCIgmwpMk4dLwwGh8dctmMWBSlOco1EaIsD cveODVmE36s4PCTOA7y5GOOVyZdojdat5DXPhR++Jk8+0k59lWixRvNLvsKeYJd1BvgW2s+wfqnRQ YlTSVrstMlOBPEQrLteCGSaYVwvQ6t6yAHDcV+KpDRYzYkjWOAfd4IXUmMJiIX6QjWhrsXwKRc2fg 7WhxCZPUWMm4L8ExTmOSCLk3cOyqSp/7YPd4u0rS0K0qAxszE6XexPGJPv+J3XT5OYIZIr0So/+i9 mYDV0eFH9QILEQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHKbw-0004zr-MS for help-gnu-emacs@gnu.org; Thu, 06 Jul 2023 04:45:23 -0400 In-Reply-To: (message from uzibalqa on Wed, 05 Jul 2023 14:01:51 +0000) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:144131 Archived-At: > Date: Wed, 05 Jul 2023 14:01:51 +0000 > From: uzibalqa > Cc: help-gnu-emacs@gnu.org > > ------- Original Message ------- > On Thursday, July 6th, 2023 at 1:30 AM, Eli Zaretskii wrote: > > > > > Date: Wed, 05 Jul 2023 12:02:54 +0000 > > > From: uzibalqa uzibalqa@proton.me > > > Cc: help-gnu-emacs@gnu.org > > > > > > ------- Original Message ------- > > > On Wednesday, July 5th, 2023 at 11:34 PM, Eli Zaretskii eliz@gnu.org wrote: > > > > > > > > Eli, are we meant to use keymap-global-set this way in order > > > > > to make an alternative keymap ? > > > > > > > > > > (keymap-global-set "C-;" "C-x C-;") > > > > > > > > I don't think I understand the question. What do you mean by "make an > > > > alternative map"? > > > > > > Following up on Drew's "What's a command and its purported replacement", > > > are "keymap-set" and "keymap-global-set" supposed to accept the declarations > > > where command is actually a keymap like so > > > > > > (keymap-set "C-;" "C-x C-;") > > > (keymap-global-set "C-;" "C-x C-;") > > > > > > Which is intended to add the keymap "C-;" as an equivalence to "C-x C-;",'and > > > thusly having "C-;" as an alternative keymap to using "C-x C-;". > > > > > > Except that "C-x C-;" is not a keymap, so I still don't understand > > what are you asking about when you say "alternative keymap". > > Drew has corrected me about the terminology. > > I am quite confused with the following > > (global-set-key KEY COMMAND) > (keymap-global-set KEY COMMAND) > > (define-key KEYMAP KEY DEF &optional REMOVE) > (keymap-set KEYMAP KEY DEFINITION) > > Previously one was able to add a Key Sequence KSQ as equivalent to a > previously defined Key Sequence KSQ-ORIGINAL. How would we do this > now with "keymap-set" and "keymap-global-set" ? The same. In non-interactive usage keymap-global-set accepts strings as COMMAND.