From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.devel Subject: Re: [Patch] hard-widen-limits [was Re: Syntax tables for multiple modes [was: bug#22983: syntax-ppss returns wrong result.]] Date: Tue, 22 Mar 2016 17:28:16 +0100 Message-ID: <87mvpqqxy7.fsf@gmail.com> References: <20160311151512.GD2888@acm.fritz.box> <2c301ec9-041d-9172-d628-479062314b23@yandex.ru> <20160314151621.GF1894@acm.fritz.box> <874mc2dqtk.fsf@gmail.com> <87egb5cpmg.fsf@gmail.com> <87a8lsd4j3.fsf@gmail.com> <87mvpsbeok.fsf_-_@gmail.com> <87pounew9e.fsf@gmail.com> <87twjzda4h.fsf@gmail.com> <87lh5bd4ib.fsf@gmail.com> <87egb3ryjc.fsf@gmail.com> <877fgusum3.fsf@gmail.com> <8737risu8d.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1458664121 29124 80.91.229.3 (22 Mar 2016 16:28:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Mar 2016 16:28:41 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 22 17:28:36 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aiPAV-000173-0k for ged-emacs-devel@m.gmane.org; Tue, 22 Mar 2016 17:28:31 +0100 Original-Received: from localhost ([::1]:38306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiPAU-00029w-I4 for ged-emacs-devel@m.gmane.org; Tue, 22 Mar 2016 12:28:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiPAM-00028H-F8 for emacs-devel@gnu.org; Tue, 22 Mar 2016 12:28:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiPAJ-0003Lk-9q for emacs-devel@gnu.org; Tue, 22 Mar 2016 12:28:22 -0400 Original-Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]:35990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiPAI-0003LX-Vb for emacs-devel@gnu.org; Tue, 22 Mar 2016 12:28:19 -0400 Original-Received: by mail-wm0-x22f.google.com with SMTP id r129so101373881wmr.1 for ; Tue, 22 Mar 2016 09:28:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=C5ZxhYQd3Ic8Ye64rEARO32Boknyx6Sf7igAQG5loiI=; b=aAGQuqYrLYcRC2Bsv+gchn8NQs8dvg9QhC0ZhbyLOV6UgBH1SPsw6mLd46V0XT0eTD n/k0JDcrKLut/UW2iL7HtbeQ71z3Nw/5/2/lBn6zsdheLTL6eSqkajjyGzl6cVSKlD4o 3DlC1oVp4UhpDwOz8emUArIDlWkR9GXkpe5N7W4PKa0jDbvm3SFFWcL3NDcU80jxTG2Z zY0HBohwBrGLvSj6lqvjwnrk76R0XF8ezOxyqJYQVRs4QP9FMUp2gveoFEmrMOzBu8gn I9sYuE72GLFbPVWtJRfxveel0yYLtqnck0vs8kzTsXDS991Uh+Tc7VDMVU+hwbDQ4nem X/Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=C5ZxhYQd3Ic8Ye64rEARO32Boknyx6Sf7igAQG5loiI=; b=bGhaJQO1GHJ5BZgErJ5PmCBpHSMg8h6Nuddi6lrMfRBr1DTH20jICEr8D8Bw3NYeX8 itjIPwb1KetHZHFquCAA4PA7p78iJJ+zBilzfP4HCElBh3NTRxx58ZzAY3exgxFbQ97d YF+ZVAJxD9z6A43crfpU0hoqTVCK+PVJgt297sYw2XJ/o2ZpNjwnqUS+UW6/93Xch6sm 85j4ALf1/RMee1thAUB2T3sfFXdgH0AfQRJBmjJb3yWIfZ65gonYyIoSSQIQFdxsMpVJ RavWyjm74m5hF3onMMk5o1xF/LKLepDmEpWu4NvGQLmwTqa/TrgO1R7kxYAhLqmvryKr Hbqw== X-Gm-Message-State: AD7BkJIVqUigF4aHYMt5H1E15YX98yufVHaYIopsR5fQqHKKrhV1+LZdW7tNmwyeNu9KtQ== X-Received: by 10.28.143.9 with SMTP id r9mr20265094wmd.37.1458664098239; Tue, 22 Mar 2016 09:28:18 -0700 (PDT) Original-Received: from localhost ([143.176.214.220]) by smtp.gmail.com with ESMTPSA id h7sm18084368wmf.9.2016.03.22.09.28.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Mar 2016 09:28:16 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Tue, 22 Mar 2016 07:57:27 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:202075 Archived-At: >> On Tue, Mar 22 2016 07:57, Stefan Monnier wrote: > IIRC past discussions on this issue, one option was to merge your > set-widen-limits into narrow-to-region by adding an optional argument `hard'. If narrowing is already in place, set-widen-limits will not touch it unless the visible region expands beyond the hard limits. I think widen limits is fundamentally about widening and only indirectly about narrowing. Mixing hard limit into a common user level function is a bad marketing strategy. We don't want to encourage major modes to use it in funny ways. If users and major modes decide to use hard limits we might end up in the same situation as now when narrow/widen is not perceived as a good tool for multi-modes. Static usage of hard widening, like in Info example, is not really a problem. Multi modes need to impose hard limits transiently, in specific contexts like indentation, syntax parsing or font lock, and will restore the limits at the end. Problems will occur if major modes start using hard limits in such contexts directly. Vitalie