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: Fri, 28 Dec 2018 22:00:35 +0000 Message-ID: <87lg49fh18.fsf@gmail.com> References: <20181221180327.7142.84494@vcs0.savannah.gnu.org> <20181221180328.D755D20538@vcs0.savannah.gnu.org> <87sgyp6ysy.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 1546036905 30616 195.159.176.226 (28 Dec 2018 22:41:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 28 Dec 2018 22:41:45 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 28 23:41:41 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 1gd0p2-0007rK-2m for ged-emacs-devel@m.gmane.org; Fri, 28 Dec 2018 23:41:40 +0100 Original-Received: from localhost ([127.0.0.1]:33595 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gd0r8-0006Na-RN for ged-emacs-devel@m.gmane.org; Fri, 28 Dec 2018 17:43:50 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gd0qm-0006FH-LX for emacs-devel@gnu.org; Fri, 28 Dec 2018 17:43:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gd0aS-0004Ob-0g for emacs-devel@gnu.org; Fri, 28 Dec 2018 17:26:42 -0500 Original-Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:42217) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gd0BM-0007wH-4q for emacs-devel@gnu.org; Fri, 28 Dec 2018 17:00:40 -0500 Original-Received: by mail-wr1-x436.google.com with SMTP id q18so21993812wrx.9 for ; Fri, 28 Dec 2018 14:00:39 -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=aT7Zvx8mnUZV/cE/L87Yz9XOGhdw6Mqn3waKdItG4U8=; b=oBJ2cok/1LA7vD2cnljA09fQ36UYkvMW5cfkU/cDj6igO8WFwRw3MpEI//9rjstybp IzKoxF1J39njW99oU50CMm6l5zFBUrJ2Te3a6ZWt6JiYv4BNR4OOc8rZZwwHGZ1CfTkh ZOVNo8OBmDfCe5lpe+DkvLwPoWXOH4nO/WNFTVHNZtIBjXCkCuw71uOdOK1M/2nJel8h 90RtNXB34O6SA+fVJG9l2GrRG57b15AiszJYmiZC7X6JdrW7cH2mimdHw2l+xoLwxOKo UwlWoyEmUHq9q3vcIyQ3UkjvPj9SMFWmFaciDZlzwyBH5p38bDZMi1h0oeHq4Bblv+pE VS0Q== 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=aT7Zvx8mnUZV/cE/L87Yz9XOGhdw6Mqn3waKdItG4U8=; b=pVZSuvYAheeUiE743SQaa1AYOA2XE5kaLbpHoTCUJIuPqHBwDA5yEkJhKj4Z7KHHI6 JpYMsy/14nRZblS9GYQzxp8j1LfxDa9TCZi8JbLABFSF+GT//mQ7BLTSvMDpB3WTzkU9 Q3jLrFW+lfUlwW2NwdKj7Uz9Qhmv1ekKcUL12k0v2Ah1tX+P4lo72Xtp0CR+Ig1XOntA RTwdb15CgX9nhIYrEonh778t4LyHKBxv6kC9hu9vEb2NHB9bPlx/sDZk5Y1fTP2uyq9X nBu0PUhi6sVZHSh6TGV7NA5XZ0OCvc9wEuVxI3fiabs6mxjg9ixYQW9sOkrpaGxfLEpV 5Osg== X-Gm-Message-State: AJcUukf1PPtV363x4Bv9qtiVC7z7V9Uz1x1ZcirVuqRx6s8jJMP/XfkL PMLZ7505ixJ/OWgY6pOXVj5QbE+p X-Google-Smtp-Source: ALg8bN6oJVjyDKdN0UH+hsZI+cb2WzBgbAnJsjZK8eruwptR+qjkxRfyHhH/z0QeYRSTyy/99J+H+Q== X-Received: by 2002:a5d:4586:: with SMTP id p6mr25830352wrq.69.1546034438387; Fri, 28 Dec 2018 14:00:38 -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 y145sm27080852wmd.30.2018.12.28.14.00.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Dec 2018 14:00:37 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Fri, 28 Dec 2018 12:51:41 -0500") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::436 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:232024 Archived-At: Stefan Monnier writes: > The new API looks good to me, thanks. Cool. > Could we pass the inserted char to the function, so the function doesn't > need to choose between looking at last-command-event, char-before, or > yet something else? Passed it last-command event. Perhaps I should also mention that the function runs with point set to char-after of the insertion. > 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). > I think I'm fine with allowing MATCHER to be a function, and I'm fine with > allowing (MATCHER . WHERE) to be a function, but I don't like the idea > of allowing both, which seem a bit redundant Makes sense. MATCHER is only a character now. Tell me if it's good to go, and if I should squash the scratch branch into a single commit or just rebase the whole thing onto master, or merge or whatever. Jo=C3=A3o