From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Andreas_R=c3=b6hler?= Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] widen-limits c331b66: Implement buffer-widen-limits functionality Date: Wed, 23 Mar 2016 18:24:38 +0100 Message-ID: <56F2D156.9040401@online.de> References: <20160322022539.16038.77264@vcs.savannah.gnu.org> <8737riqouj.fsf@gmail.com> <221845e0-b194-433e-bfbc-105272ae5752@default> <87twjyp21k.fsf@gmail.com> <56F242E0.7060004@online.de> <877fgtpfrw.fsf@gmail.com> <56F293E7.2000703@online.de> <87a8lpnusg.fsf@gmail.com> <83r3f12oo5.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1458753822 1357 80.91.229.3 (23 Mar 2016 17:23:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2016 17:23:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii , Vitalie Spinu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 23 18:23:34 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 1aimVJ-00043a-5U for ged-emacs-devel@m.gmane.org; Wed, 23 Mar 2016 18:23:33 +0100 Original-Received: from localhost ([::1]:45162 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aimVI-0000Ls-Gy for ged-emacs-devel@m.gmane.org; Wed, 23 Mar 2016 13:23:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aimUo-000809-2o for emacs-devel@gnu.org; Wed, 23 Mar 2016 13:23:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aimUm-00073Q-TA for emacs-devel@gnu.org; Wed, 23 Mar 2016 13:23:01 -0400 Original-Received: from mout.kundenserver.de ([212.227.17.13]:59997) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aimUi-000738-Qc; Wed, 23 Mar 2016 13:22:57 -0400 Original-Received: from [192.168.178.35] ([77.12.167.38]) by mrelayeu.kundenserver.de (mreue102) with ESMTPSA (Nemesis) id 0MTxib-1aIcl41Cc5-00QnL0; Wed, 23 Mar 2016 18:22:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Icedove/38.5.0 In-Reply-To: <83r3f12oo5.fsf@gnu.org> X-Provags-ID: V03:K0:ERbyOubVUirPGX1tIoGwnU/N9eGKuHh3P1ivXvBIx/E7woCmr23 r3/39dEAdBXzOpd320X099GmZxwvg+BzaJTQdhlYztiofFk/fuIKRYfDodd8O8vHd/Ivx/c V0SsV/9IiZoDL3kvmTmzK402Yn4ytOM20QPAdlMNsjFIVbTZdF6PrIiznyDNI1N2GJSdoi4 u5Kz7136pVvEBRVsQDljg== X-UI-Out-Filterresults: notjunk:1;V01:K0:y9Ikj2Z1h1w=:rbSonWyphpGTBHKDOZbd3D xpu02DGTwlAivisONEye8wiagYlyIHAmiKzQbpStK28k/0zekSo/bZyDNbhSZLpmoWwax5qCD 8FB+u+3PcRwtz2Yt67XzX8wT9mcX50up5KE4N2H1vbyru30cTmPedTpLtoUP6AnHhP7srr6R9 1CL0unr0zENZVDIoZkVGXtC+61Z75FC901UTga+QiyeU/9fFyV+2JVsZYf77m2ZBsFwkddiv5 5APeonvFN4NAN92l5oZBpX3zMBpcP8ed1pTxzRm+SZ9fEn76D/rfGLsC4hLIf3gbVoBuM9bys smi0752a9uWVNRimRrsSORTGo0ayZunUpNMa3LcWaTbT+KkQxXFAYmECG2GZ+J7jWKHp17j3m Mv+G/9phrtRcePCnJgZMFAoOi5GX3DrreTHMgmPDaerhad4w/wlWl6aNtGsRGKC8qkPH3lXtW 0emcGIXoq4rswj4qQeiJQFRqowlgeepAxqJj/xJebpnlFPdtUM9yL10tdNgfpj3Rp0rW8wKcV AxnNgMpc2bMl30Qz03G0C9OutkvM5JJBL3K0P/oK9jgmGVMkghl5SgwCUZ8OZuNQrLxHEQSc2 lTXOJ/TtgNJobrG2rhc+IO/FQkt8Qu6LvyVXbzt/7nVmTakUImZ57Z4MICR+1hdGgGQuMoMdk aWIQ6xCMZwM9YVV+jpAKyFAjazCwlmC+M8IH8QONvt+zTETpYK8B/leRzluVF6jp2+l8/jZv4 /iwru3jV9mTo5ux0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.13 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:202141 Archived-At: On 23.03.2016 16:34, Eli Zaretskii wrote: >> From: Vitalie Spinu >> Date: Wed, 23 Mar 2016 15:17:03 +0100 >> Cc: emacs-devel@gnu.org >> >> Widen doesn't go wrong in itself. It what you do when you widen. In multi-modes >> which use narrowing to create a micro-universe for inner modes, inner mode might >> widen then compute some stuff on code from other language regions. This leads to >> errors of all kind. >> >> For example when multi-mode advices font-lock-default-fontify-region it cannot >> control what individual functions in font-lock-keywords are doing. In case of >> syntax-propertize-function it's a complete black box. The function can decide to >> do whatever there. >> >> Luckily if major-modes doesn't use widen or parse-partial-sexp directly it all >> seem to work quite well with proper advice of relevant functions. > Isn't prog-widen the solution to those issues? Hi Eli, doku of prog-widen says "This variable enables the major mode of the main language to use the indentation engine of the sub-mode" This also doesn't sound right. A mode should not need to fiddle with other modes. Seems it's time to introduce a true multi-mode, and abandon the notion of a buffers major-mode when multi-mode is on - even if the symbol of a than regional-mode is still called major-mode for legacy reasons. A multi-mode could keep a register, an index about the modes to employ according to position. Best, Andreas