emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scratch/command 064f146 1/2: Change command to interactive ... modes


From: Dmitry Gutov
Subject: Re: scratch/command 064f146 1/2: Change command to interactive ... modes
Date: Tue, 16 Feb 2021 23:44:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 16.02.2021 22:30, Stefan Kangas wrote:
But I would claim that the more verbose form in this case is less clear
and harder to understand.

That's because 'completion' is not a good name for it: it doesn't, indeed, explain what the value is. Nor does it say that it will be used by the proposed execute-extended-current-mode-command command.

OTOH, if we had annotations like

(declare (applicable-major-modes MODE1 MODE2 ...))
(declare (applicable-minor-modes MODE1 MODE2 ...))

it would both allow some speed improvement in the completion predicate (don't have to apply both major and minor mode checks to each symbol) and more consistently allow read-extended-command-predicate to use arbitrary conditions (at the user's choice).

The list of annotations can be expanded with other tags, too, as well as with a free-form predicate

(declare (applicable-pred PRED))

P.S. I'm guessing the applicable-* names look pretty long for a number of readers here. Surely someone can pick a shorter naming scheme that's still semantic.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]