From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel 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 Message-ID: <874lawfadq.fsf@gmail.com> References: <20181221180327.7142.84494@vcs0.savannah.gnu.org> <20181221180328.D755D20538@vcs0.savannah.gnu.org> <87sgyp6ysy.fsf@gmail.com> <87lg49fh18.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1546109238 10605 195.159.176.226 (29 Dec 2018 18:47:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 29 Dec 2018 18:47:18 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 29 19:47:14 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdJdi-0002hQ-2m for ged-emacs-devel@m.gmane.org; Sat, 29 Dec 2018 19:47:14 +0100 Original-Received: from localhost ([127.0.0.1]:41216 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gdJfo-0008LU-Tw for ged-emacs-devel@m.gmane.org; Sat, 29 Dec 2018 13:49:24 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gdJel-0007u0-OO for emacs-devel@gnu.org; Sat, 29 Dec 2018 13:48:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gdJTS-0002jq-60 for emacs-devel@gnu.org; Sat, 29 Dec 2018 13:36:41 -0500 Original-Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:53477) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gdJTS-0002iW-0V for emacs-devel@gnu.org; Sat, 29 Dec 2018 13:36:38 -0500 Original-Received: by mail-wm1-x334.google.com with SMTP id d15so21063465wmb.3 for ; Sat, 29 Dec 2018 10:36:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=FxMSQYRt66umn5O4Lq3QI+CnNZoszPsmHvUXNuV5Jtc=; b=OB2gvqFF9dz3S/GKeK/lOgz2QjXB7g0xH8OUCfJQLa3XxqVX/SCfu/X09GQQhV2DDE 5K22ZwrL6nxJZX9EKN9rRpMhKLjJqXvNQ0oYwmwl2eLPc9UXhMgN9XAhqdVl3MSCm80r Ob/P1ZldqYTwMzijO/XSw4YDDelan2dXe/WmFmBA+AHUq2ExWIPKNAJp8GXM4V0/aeFB 3VYQMYMT6/XwKCuW92EY2FV42/dautFSIW8obfwdWeHKAcLBYz8Ph3JI2uHeWNo7FEPJ VUAnva4h2ejGKDjdyZV/GwNhFCZlHSebk03Hm/RD9YWqAqB3KGIuX3TUP6Q8mQpnsUYW oI0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=FxMSQYRt66umn5O4Lq3QI+CnNZoszPsmHvUXNuV5Jtc=; b=HdwWunnvVD2D8NLEr9qah6WrbS1lsWhI11Km4tmZJEs0ynEr0WG9UK4YRf0D5qh7WQ Gy0MWvb4YzgVRZjEnZhHADAQ1FkHFDPQ29r8Z+G7ftYGOi/KxCz/qZXhyTj/xSJUcXwp 3dkGINXf05UiHADfJk7G+/qFNTs5A8b7qsyq83wUGyMsMxADgkwdjNilFv4epWDobNbG J3axcJdyE6pjA9Mr1tvq68fpn1oO1TFL9Jgw/LJA24EpukztDTEF8CMNvHQHeRO+PcVl lrKBvufIBd3yZQL3BIv04g6o6TERMZXJ1ux+Ek39IsSHzvHNF7ThEbmA7vOb+PCzd9Kx iIVA== X-Gm-Message-State: AA+aEWZAGbJNkYT9edrVqaN2sFa4e85BV2Fz/rsIc+fTdptwuoK+piEC 4R5hMzx/HZdwA4htvJsKvvqnexzl X-Google-Smtp-Source: AFSGD/Uk3z0cdFP2kbV+cIWVqdCebF807+Tj0jhLReNSDqyaObl71Lcm2NT7Swkab+ad5jDZ2+e/Kg== X-Received: by 2002:a1c:38c4:: with SMTP id f187mr26340091wma.90.1546108596578; Sat, 29 Dec 2018 10:36:36 -0800 (PST) Original-Received: from lolita.yourcompany.com (188.139.62.94.rev.vodafone.pt. [94.62.139.188]) by smtp.gmail.com with ESMTPSA id k7sm30481723wrl.51.2018.12.29.10.36.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 29 Dec 2018 10:36:35 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Sat, 29 Dec 2018 10:59:51 -0500") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::334 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232036 Archived-At: Stefan Monnier 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=C3=A3o