From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [SUSPECTED SPAM] Re: [Emacs-diffs] scratch/widen-less a4ba846: Replace prog-widen with consolidating widen calls Date: Mon, 04 Dec 2017 21:53:36 +0200 Message-ID: <83a7yyxoan.fsf@gnu.org> References: <20171129233237.27462.23351@vcs0.savannah.gnu.org> <20171130214621.GA22157@ACM> <27985594-3bb4-ce88-8928-2ccfeac13eae@yandex.ru> <20171201154913.GB3840@ACM> <1e542021-e389-cca4-6acd-349efddb2652@yandex.ru> <20171201223529.GG3840@ACM> <4a94ec5c-efdd-50f1-ff4d-277f5f45c2df@yandex.ru> <83lgil1qme.fsf@gnu.org> <83d13x1j2s.fsf@gnu.org> <34abea95-c7f7-e8fa-8407-8c2fd2a4cfe1@yandex.ru> <83y3mkzw1n.fsf@gnu.org> <83mv2zzv7z.fsf@gnu.org> <83o9nexy48.fsf@gnu.org> <83d13uxug5.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1512417254 402 195.159.176.226 (4 Dec 2017 19:54:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 4 Dec 2017 19:54:14 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 04 20:54:09 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 1eLwoX-0007vf-Jz for ged-emacs-devel@m.gmane.org; Mon, 04 Dec 2017 20:54:05 +0100 Original-Received: from localhost ([::1]:44976 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLwoc-0000t7-Uj for ged-emacs-devel@m.gmane.org; Mon, 04 Dec 2017 14:54:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLwoU-0000sz-7s for emacs-devel@gnu.org; Mon, 04 Dec 2017 14:54:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eLwoP-00062y-A2 for emacs-devel@gnu.org; Mon, 04 Dec 2017 14:54:02 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLwoP-00062u-6C; Mon, 04 Dec 2017 14:53:57 -0500 Original-Received: from [176.228.60.248] (port=4642 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eLwoN-0005b0-1h; Mon, 04 Dec 2017 14:53:56 -0500 In-reply-to: (message from Stefan Monnier on Mon, 04 Dec 2017 12:52:39 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:220717 Archived-At: > From: Stefan Monnier > Date: Mon, 04 Dec 2017 12:52:39 -0500 > > >> > The code which supports PREV-CHUNK is already in Emacs, so the > >> > question IMO is "why remove it"? > >> ?Which code is that? > > prog-indentation-context and its support in prog-widen. > > AFAICT prog-widen doesn't look at the PREVIOUS-CHUNK part of > prog-indentation-context. But it looks at the other data in prog-indentation-context, and PREVIOUS-CHUNK, if it's a function, could store there something. Or a mode could use some other method to store the previous restriction directly in prog-indentation-context. Right? > >> Zero is not the intention: for the doc changes to be valid, we need to > >> add a few `widen` calls in places like indent-according-to-mode. > > If those calls are conditioned on MMM actually being active, then > > existing behavior will remain unchanged, and we are good. > > How do you propose we detect when MMM is active? I don't know (didn't look at its sources close enough), but I'd be surprised if there wasn't some variable or some other method to tell.