From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Current mode command discovery Date: Thu, 18 Feb 2021 00:46:01 +0200 Message-ID: <80e8c434-888d-23c5-13f0-c513bbf13ee4@yandex.ru> References: <87v9aubm96.fsf@gnus.org> <87czwzfn9p.fsf@telefonica.net> <87eehfnd83.fsf@gnus.org> <1fb773f6-1480-53ce-08ae-1f7d0ba23428@yandex.ru> <87k0r637k4.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39395"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: =?UTF-8?Q?=c3=93scar_Fuentes?= , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Feb 17 23:47:52 2021 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 1lCVbs-000A9q-9E for ged-emacs-devel@m.gmane-mx.org; Wed, 17 Feb 2021 23:47:52 +0100 Original-Received: from localhost ([::1]:57036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCVbr-0006Lq-A4 for ged-emacs-devel@m.gmane-mx.org; Wed, 17 Feb 2021 17:47:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCVaB-0005qc-MY for emacs-devel@gnu.org; Wed, 17 Feb 2021 17:46:07 -0500 Original-Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:33371) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lCVa9-0005yF-Tf for emacs-devel@gnu.org; Wed, 17 Feb 2021 17:46:07 -0500 Original-Received: by mail-ed1-x530.google.com with SMTP id c6so19139445ede.0 for ; Wed, 17 Feb 2021 14:46:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=AFLCpreKZyU4tzpr6gehTUIx0yf7IP4nt+uMbmVLBL0=; b=CGLI5jQhI8YeTGY5yXSmtXTrAlIRso2hDszRdMlV4wc2JPKD3S1LYbFZA3903yT06o AeL18JxrSX4whgt7Xb8RYxX0K7s6ibvAp35KZitW8ApMMxAqxSH14+1EI7ZksWMoqHfF R+uF/9Y27nfkRlh2BEB8Lj+zrXh2wG2J6NpMr3YxqED6KOIgdaXLC/wyUzqYFxrxSJ3D cJgX4lFMwHbt/Gj9zsVGD+/h2fvx9M+gQ57uq8OkqePqrrXvokNcZN2Cuhwf3hb7N5Es mlivHgXX56gBK5viWcZgXBDH55/KQOMbhLm6NP7n5MXh3pZpe+VeolY2hOtssMPVioOL ITew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=AFLCpreKZyU4tzpr6gehTUIx0yf7IP4nt+uMbmVLBL0=; b=PehG1OIeCcEHpS2/7lLUVUOyuFJZmjXWQRzLBsrq6XoWz/Yuy0CwmR/ZowSn8SnkMM xhGAlgxjAMzin+APE7cB8HleEPdtpVFQZxhT5AtTszUVhr1t7mOAlw67n54HX/iF3Hqu Amdt1UIYL74uzHaDl/ZmHm8GptoRrF/EJSxMMheapZbaGoE+Cgf09+Um+9bEWpang78Q zC5Uq+GbBn4gKUv9VQvhkipFRgG0OEpqwI4cV2zes9lcIlskzKT2ASKYATM6KdSt1bM4 SbY1lH3S2/7IshQqA/hCJK037pzJohdIS023vDe/XYTAmUe/lefOK9kIQMkHCx7AqES6 thCQ== X-Gm-Message-State: AOAM530cxfB5JUr74Gv3A4QTAR5j1vZQ4g2CdNvGFPHzvsGlPAeWjX9T No20RFOS7DrSFANxLXromPvRVTC41Ls= X-Google-Smtp-Source: ABdhPJwCijpoGEExZT8PYGTjXKkCKJFPG7e2XRlfBQc5vsiCzBAXgGNIr1nTUAbD99hyEQ66Vd0L2w== X-Received: by 2002:aa7:d9cb:: with SMTP id v11mr1000925eds.153.1613601964101; Wed, 17 Feb 2021 14:46:04 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id gh36sm1185832ejc.33.2021.02.17.14.46.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Feb 2021 14:46:03 -0800 (PST) In-Reply-To: <87k0r637k4.fsf@gnus.org> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=raaahh@gmail.com; helo=mail-ed1-x530.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:265106 Archived-At: On 17.02.2021 19:52, Lars Ingebrigtsen wrote: > Dmitry Gutov writes: > >> Moving the checking logic inside the read-extended-command-predicate >> implementation seems logical. > > I'm not sure I understand what you mean here... that's where the > checking is done today? Bad phrasing, I guess. I'm referring to the same thing you do below: that byte-run--set-modes just sets the 'completion-predicate' property, instead of setting some transparent tag which any read-extended-command-predicate could interpret according to its own particular intent. >> (declare (modes ...)) would just add a tag to the command, with >> natural possibility to add other tags, which a different >> read-extended-command-predicate could use. > > Yeah, I think so too -- (declare (modes ...)) should have the same > effect as `interactive "p" ...', not create a predicate. Probably. Or both (interactive "p" ...) and (declare (modes ...)) should do something similar to what (declare (completion ...)) does (except use a different property). I'm curious to know whether the change in performance will be at all noticeable.