From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: The new keymap functions Date: Thu, 17 Nov 2022 16:04:10 +0100 Message-ID: <87tu2xr5at.fsf@gmail.com> References: <87zgq8sfw3.fsf@gnus.org> <86k0h8ts66.fsf@mail.linkov.net> <87r1bfp72g.fsf@gnus.org> <86v90r6w3j.fsf@mail.linkov.net> <87o86jm83k.fsf@gmail.com> <86wn7wf6rl.fsf@mail.linkov.net> <86zgcqrqio.fsf@mail.linkov.net> <87wn7uasgj.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13345"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , Emacs developers To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 17 16:05:00 2022 Return-path: Envelope-to: ged-emacs-devel@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 1ovgRm-0003De-MY for ged-emacs-devel@m.gmane-mx.org; Thu, 17 Nov 2022 16:04:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovgR9-0003OS-CX; Thu, 17 Nov 2022 10:04:19 -0500 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 1ovgR7-0003Ny-Hx for emacs-devel@gnu.org; Thu, 17 Nov 2022 10:04:17 -0500 Original-Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ovgR5-00026i-O2 for emacs-devel@gnu.org; Thu, 17 Nov 2022 10:04:17 -0500 Original-Received: by mail-wr1-x436.google.com with SMTP id bs21so4304880wrb.4 for ; Thu, 17 Nov 2022 07:04:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/bkAWZtRfz2k3t7cAYpXPvUMbjQVil4uWqwcPOwDiJE=; b=kFQ7Ct87Oviajjfa3U2F7oOZSXRhgeVTKW889lFQGGU3JW49fiTH0gc36b8luyHODp qGwz5s6n5ZeCE1K8a9kZawLYnB1pFYtfOh+nKKbt5ZkPpFpjCcQQ/Tz8g/dHwa8EsbVF MDHu7r280GJPXP58m7utR/xVDD3J7Tbtv6/Hw3yXDLwwPbLMFQa8UCPbFugE0xy1DxOq e5qbgsbAC083Q4//FDYljZ4ykpiV28RdxSon9NKHTTWOBj5WNOKVrCAo3Cjms3fD/+aL Pr8JSy9wrWwUxOUWuj44wqavuaJgeq1tbo+2GIGB/7cWcHLrV9dcxe5im4gfHr1b5OwX ynhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/bkAWZtRfz2k3t7cAYpXPvUMbjQVil4uWqwcPOwDiJE=; b=MLmK7t40HIlCnFgjykslQF84Uusl+gJrU1aZAo8gZBswSjKbDS49NJbu2kY+BDQJW6 DRTO/OpJWbB1tVDKvA8bYJ1wRYBcD9/Y1BsIZ9KSENgviehZTuQWDMT6bikkMzFKsy2b MqfaMcstEoATqzXn8LA3oaA4ViG9URv1gBm3T3xF/mmEJ/697JoGRJpVUMLgEPEjL49Z w5HJrALx5GZkZ3ZfQYXcXOjpWlLFRSb3Ix3O6gld6TNftYOmTdjVAwad3ZoGYtKWFhor 4KNt3bDzlCrYhSwVi4MmWrQ8toAU78jt9ToWxIZjIHQd6hVA55vK40JCqMsYTLXgIxhS ffNg== X-Gm-Message-State: ANoB5pl+MLx5odLsinIaap9dO2padLEJTCGyFCCq4RKpMnX/avkrKeBS 1tPMN+llxu6ixlOkUgSwdpqXadFhBpU= X-Google-Smtp-Source: AA0mqf6y9/w+zB5i6yhKXN9P/QD2wCtNHY/kJV5AP5c+3VDeOMRQj7mgtjMI2HbdDMITo/PKlzRcIg== X-Received: by 2002:adf:eb81:0:b0:236:4ba1:fb2d with SMTP id t1-20020adfeb81000000b002364ba1fb2dmr1768698wrn.570.1668697452441; Thu, 17 Nov 2022 07:04:12 -0800 (PST) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id n38-20020a05600c182600b003c6deb5c1edsm1351007wmp.45.2022.11.17.07.04.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 07:04:11 -0800 (PST) In-Reply-To: <87wn7uasgj.fsf@gmail.com> (Robert Pluim's message of "Thu, 17 Nov 2022 09:35:56 +0100") Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=rpluim@gmail.com; helo=mail-wr1-x436.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: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300048 Archived-At: >>>>> On Thu, 17 Nov 2022 09:35:56 +0100, Robert Pluim s= aid: Robert> It looks good. I think the docstring needs some small adjusteme= nts, Robert> I=CA=BCll work on those over the next few days. Juri, what do you think of the following: diff --git a/lisp/keymap.el b/lisp/keymap.el index 0285c0571f..eaeba96644 100644 --- a/lisp/keymap.el +++ b/lisp/keymap.el @@ -559,18 +559,26 @@ defvar-keymap macro also accepts a `:doc' keyword, which (if present) is used as the variable documentation string. =20 -When a `:repeat' keyword is non-nil, put `repeat-map' symbol -properties on commands in this map for `repeat-mode'. The value -could also be a property list with properties `:enter' and `:exit', -for example, :repeat (:enter (commands ...) :exit (commands ...)). -`:enter' is a list of additional commands that only enter `repeat-mode'. -When the list is empty then by default all commands in the map enter -`repeat-mode'. This is applicable when a command has the `repeat-map' -symbol property on its symbol, but doesn't exist in the map. `:exit' -is a list of commands that exit `repeat-mode'. When the list is -empty, no commands in the map exit `repeat-mode'. This is applicable -when a command exists in the map, but doesn't have the `repeat-map' -symbol property on its symbol. +The `:repeat' keyword can also be specified; it controls the +`repeat-mode' behavior of the bindings in the keymap. When it is +non-nil, all commands in the map will have the `repeat-map' +symbol property. + +More control is available over which commands are repeatable; the +value can also be a property list with properties `:enter' and +`:exit', for example: + + :repeat (:enter (commands ...) :exit (commands ...)) + +`:enter' specifies the list of additional commands that only +enter `repeat-mode'. When the list is empty, then by default all +commands in the map enter `repeat-mode'. This is useful when +there is a command that has the `repeat-map' symbol property, but +doesn't exist in this specific map. `:exit' is a list of +commands that exit `repeat-mode'. When the list is empty, no +commands in the map exit `repeat-mode'. This is useful when a +command exists in this specific map, but it doesn't have the +`repeat-map' symbol property on its symbol. =20 \(fn VARIABLE-NAME &key DOC FULL PARENT SUPPRESS NAME PREFIX KEYMAP REPEAT= &rest [KEY DEFINITION]...)" (declare (indent 1)) Robert --=20