emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] scratch/fix-33794-extend-electric-layout-mode 41a9132:


From: João Távora
Subject: Re: [Emacs-diffs] scratch/fix-33794-extend-electric-layout-mode 41a9132: Extend electric-layout-mode to handle more complex layouts
Date: Sat, 29 Dec 2018 18:36:33 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> Passed it last-command event.  Perhaps I should also mention that the
>> function runs with point set to char-after of the insertion.
>
> Is it guaranteed that it's the case?

Err no... Why the habit of making me think Stefan?  Should be fixed now.

>>> nil doesn't need to be mentioned here, since it's a special case of
>>> "list of the preceding symbols".
>>
>> OK, but notice that because of the subtlety that when using the compound
>> function, nil has the meaning of "no match".  So if that function wants
>> to match but don't insert anything, it has to return a list of the
>> single element nil.  So maybe I should add it back to the docstring (I
>> just pushed the commit that removes it).
>
> It's not a problem here.  It's a problem for the case where (MATCHER
> . WHERE) is a function (in which case returning nil is ambiguous, it
> could mean "matched but don't do anything" or "didn't match").

Yes, that was I was saying.  I'm saying let's break the ambiguity like
this:

* If it returns nil it means "didn't match";
* If it returns (nil) it means "matches but don't do anything"';

So I've added the nil back to the symbols list.  It's not super pretty,
but not horrible either.

João



reply via email to

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