From: "João Távora" <joaotavora@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
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 [thread overview]
Message-ID: <874lawfadq.fsf@gmail.com> (raw)
In-Reply-To: <jwvk1js5nrq.fsf-monnier+gmane.emacs.devel@gnu.org> (Stefan Monnier's message of "Sat, 29 Dec 2018 10:59:51 -0500")
Stefan Monnier <monnier@iro.umontreal.ca> 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
next prev parent reply other threads:[~2018-12-29 18:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20181221180327.7142.84494@vcs0.savannah.gnu.org>
[not found] ` <20181221180328.D755D20538@vcs0.savannah.gnu.org>
2018-12-22 16:26 ` [Emacs-diffs] scratch/fix-33794-extend-electric-layout-mode 41a9132: Extend electric-layout-mode to handle more complex layouts Stefan Monnier
2018-12-22 21:23 ` João Távora
2018-12-28 16:33 ` João Távora
2018-12-28 17:51 ` Stefan Monnier
2018-12-28 22:00 ` João Távora
2018-12-29 15:59 ` Stefan Monnier
2018-12-29 18:36 ` João Távora [this message]
2019-01-02 1:53 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874lawfadq.fsf@gmail.com \
--to=joaotavora@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).