From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: multi-modes and widen (again), was: Re: forward-comment and syntax-ppss Date: Wed, 29 Nov 2017 23:48:06 +0000 Message-ID: References: <20161207220447.GA4503@acm.fritz.box> <20161208201517.GB3120@acm.fritz.box> <20161209190747.GC2203@acm.fritz.box> <5a70902f-882e-f616-74b2-df6eb81fc70c@yandex.ru> <20161211101715.GA14084@acm.fritz.box> <51c0554f-40d0-37a5-b134-17058343aa3f@yandex.ru> <20161216200630.GB3858@acm.fritz.box> <83r3576lxs.fsf@gnu.org> <838tre7gqt.fsf@gnu.org> <9e3a5f1b-2bd6-4223-bcb0-790be47d52ab@yandex.ru> <58afc3fb-a191-40c5-a6e9-8666f3e9ee21@yandex.ru> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1511999312 18737 195.159.176.226 (29 Nov 2017 23:48:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 29 Nov 2017 23:48:32 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Thunderbird/57.0 Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 30 00:48:26 2017 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 1eKC5S-0003ud-Vo for ged-emacs-devel@m.gmane.org; Thu, 30 Nov 2017 00:48:19 +0100 Original-Received: from localhost ([::1]:45667 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKC5Y-00017B-N9 for ged-emacs-devel@m.gmane.org; Wed, 29 Nov 2017 18:48:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKC5P-00016v-Cd for emacs-devel@gnu.org; Wed, 29 Nov 2017 18:48:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eKC5M-00083Y-8y for emacs-devel@gnu.org; Wed, 29 Nov 2017 18:48:15 -0500 Original-Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]:34567) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eKC5M-00082o-1w for emacs-devel@gnu.org; Wed, 29 Nov 2017 18:48:12 -0500 Original-Received: by mail-wm0-x22c.google.com with SMTP id y82so38339693wmg.1 for ; Wed, 29 Nov 2017 15:48:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=iXixCWcTZbrR/JNISOniN4Al8bVvWNkRKNo3QLXwKQ8=; b=oT4/yAxImlUrAwfmd9+4W3IKIDe99QiSNJOsA95gEmptAnoujj03jWkdPMEApFleI1 dBLEv7Js0qLtIITFb6Y0VDi1i2ZQr63KbO+rYUOKTpJC05XSGD4t36EN9rgzQYyzElaQ uqtbT8CJsP3mDlto1Zm2T7jMoZyZpYAsk603zPWzju+XexmJxnhNNvP7uO/Ndgig+UUO dmsI8tfJ4aKKurVPWBYgjz5a2lu5fdzlwFc5JoCA2LPuxEuvNWGq7aA/iVJaq0NVRZ4E q6qO+xAzbzgaCGGXsgxti2ap/XbP6U/4FlfXIugY5cGJqoOaHriVGuuJpnJpEo6AwYKH pk6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=iXixCWcTZbrR/JNISOniN4Al8bVvWNkRKNo3QLXwKQ8=; b=sdXnH2r+FfP/xfYo6AtOw2EFNy1i3hgddovP6uYF2cA1BtCRMSGUbMMu4FF/kCJebj F25JWxzuGl1DSaFfx8UdGUEeK8X3h3sEQD5cn5UDZ6i/0CsT6EYzhYMBKRjjaCUGVztj a49XMqV2atNS32LRfSLRYfad7fyh9aWMQS0lnjc96fTwQsXUyty6Da06UXw7y1bZjegQ JSewakSugUKxnChpRPepz+C3D66UHHjYDQA18juNCmZXlire0AKrmY7Mb7dKdwGIlBk/ umAjv3biY+ch+DWUJPD+vk8cP3vUzv2s2EiWABT7j9WRZsGgJB6cE0puDHA1voVp3V/y w7aQ== X-Gm-Message-State: AJaThX5eu+LNI7ERtjVyodfWO6uxz/Gal//0pD18/b9gmOfws3OWVMft WnduiPuNs2fmMC8GlFcdjdfwxSUZ X-Google-Smtp-Source: AGs4zMZNEtGICXnEYFc9vwom6aPnzZkGrOz6UnEEWrC1N0GTuwDeaLlRnD1xTvlPmld3ClqClEhTNQ== X-Received: by 10.80.208.150 with SMTP id v22mr9900781edd.62.1511999290325; Wed, 29 Nov 2017 15:48:10 -0800 (PST) Original-Received: from [192.168.1.152] (157-157-238-185.dsl.dynamic.simnet.is. [157.157.238.185]) by smtp.googlemail.com with ESMTPSA id i17sm2257624ede.64.2017.11.29.15.48.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Nov 2017 15:48:08 -0800 (PST) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22c 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:220525 Archived-At: Hi Stefan, I'm only now working on this. :-( On 12/20/16 1:33 PM, Stefan Monnier wrote: >> I really meant widen, though. Not sure what calling prog-widen in there >> would mean, semantically, because according to the previous discussion >> prog-narrowing was something a mixed-mode code would institute. But it's >> down the call stack from indent-according-to-mode (via a mixed-mode aware >> indent-line-function), not above it. > > Indeed, but I meant "somewhere between a call to > indent-according-to-mode and the call to major-mode specific > indent-line-function". > > The point is that the indent-line-function should not need to widen, > although maybe the buffer is not fully widened (depending on whether > the multi-mode system uses narrowing, maybe). Yes, so, I've pushed a change like this into scratch/widen-less. It removes prog-widen, thus leaving prog-indentation-context too complex for the only remaining use it has left. So I was thinking of replacing it with just a variable prog-first-column (and an accessor function for convenience). The CHUNKS (or, now ...REST) element will go away because nobody has found any practical use for it by now. prog-first-column is definitely needed, though. After thinking on it for some time, I still haven't come up with a suitable replacement. WDYT? It is unfortunate that we're doing it this late in Emacs 26 development cycle, but if we agree on this change, it will be fairly small.