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: Re: [SUSPECTED SPAM] Re: [Emacs-diffs] scratch/widen-less a4ba846: Replace prog-widen with consolidating widen calls Date: Mon, 4 Dec 2017 23:50:29 +0200 Message-ID: <6385f033-c26b-9fc4-18cc-9d334f7da3e9@yandex.ru> 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> <83a7yyxoan.fsf@gnu.org> 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 1512424272 2771 195.159.176.226 (4 Dec 2017 21:51:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 4 Dec 2017 21:51:12 +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: Eli Zaretskii , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 04 22:51:08 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 1eLydn-0000TZ-6x for ged-emacs-devel@m.gmane.org; Mon, 04 Dec 2017 22:51:07 +0100 Original-Received: from localhost ([::1]:45396 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLydu-0003pN-Jz for ged-emacs-devel@m.gmane.org; Mon, 04 Dec 2017 16:51:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58001) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLydI-0003pH-Io for emacs-devel@gnu.org; Mon, 04 Dec 2017 16:50:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eLydF-0004x6-Fx for emacs-devel@gnu.org; Mon, 04 Dec 2017 16:50:36 -0500 Original-Received: from mail-wr0-x22b.google.com ([2a00:1450:400c:c0c::22b]:43067) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eLydF-0004we-8b; Mon, 04 Dec 2017 16:50:33 -0500 Original-Received: by mail-wr0-x22b.google.com with SMTP id z34so18925302wrz.10; Mon, 04 Dec 2017 13:50:33 -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=sd4SPkyZ/VcoWs5blhQ3+cWYXT1CYYkrZcJ2qiW5TfE=; b=SsJ8ca9bBaqp23fyqPQ1UJGPYe3S//mI1dJdj2SAlrQWwj/cQJYQtOXZRHKTSQlvu9 6gmQWfAy/wZxDDTaJG4O6u8WtoAjdUl+K5qgKAeZaZGMQvmFXauE1vtavDAxp09mooH6 d0Mn3OYS4XyMGq/4ehQ2txhdHK7ILM/tlRjiDVzvu1DmYDp4euzWzArzGpvWIvqWAzR7 crDV5P12PmiiSUcRPl+AzSlLfDG/HFKu4dnQIsU9FuIw6g10PEOApl6kA972mvjseDUf dhfn5ESui0TmozugDguHylgPWyqSGfQeaOZ8iMlaIR9MM8CFBsi8yAED7tqpv9IIcKNA QcmA== 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=sd4SPkyZ/VcoWs5blhQ3+cWYXT1CYYkrZcJ2qiW5TfE=; b=cARj8zs4dy9WbpI4Ns28F4XpaCOgjts2cKse3oNSMn9pH4jaU1fuiIulfZ37yjci5O gBUqPN+ZrLA/OEkuf18VliFqIUu3FMnONnXeTF/BPABySkkcrUr19g4ShFiPgtYmvBKf /KUbSozBkawapoz/CsFfHWmncMBILtVWcyTS/vqmwJq6PWfyutJKYgZPfiGkcp2FhkcM /UtQ+UHIAR1HR+AFUMEpVYKk/xQbFNwRO9BPhF9yAntWXBxA/o0OQlzpFx/wXnPHMT4X QgaMRzrU5CQdTYVxlDYbPzJHupXVqWgFyIbqedi0aJ6OhN3/ICg9mYeKnH29ILZtkGIv dk8A== X-Gm-Message-State: AJaThX63lzfzD77+zoM/v18Gggeve1zcE9XkSc8EzdjqmJDGWQEG8JYq vxqGerxY/WI4xRtLBVm2jylotwsC X-Google-Smtp-Source: AGs4zMZG0hpPa66gQhtbxbsADlLjhdqxmIzSFSTM4s0CCbTWAH2jV0+ItIABZhv15c5pZsP5xq3U4g== X-Received: by 10.223.133.250 with SMTP id 55mr15073470wru.23.1512424231898; Mon, 04 Dec 2017 13:50:31 -0800 (PST) Original-Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id q89sm16767988wrb.95.2017.12.04.13.50.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Dec 2017 13:50:31 -0800 (PST) In-Reply-To: <83a7yyxoan.fsf@gnu.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22b 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:220721 Archived-At: On 12/4/17 9:53 PM, Eli Zaretskii wrote: >>>> 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. I'm sorry, but this is some nonsense you are discussing. The change in question fixes an old problem, namely: some major modes perform indentation while taking the whole buffer into account, and some only look at the current restriction (which would be a bug, but nobody has reported it yet in those cases, apparently because there is some correlation between users of C and Python, and users of interactive narrowing). So the fix makes *all* indentation code take into account the whole buffer, even when interactive narrowing is in place. Unless mmm-mode, on something like it, applies an extra restriction through its custom indent-line-function. That part of the change seems obviously correct to me, no need to predicate it on mmm-mode being active.