From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: /srv/bzr/emacs/trunk r101338: * lisp/emacs-lisp/syntax.el (syntax-ppss): More sanity check to catch Date: Fri, 14 Feb 2014 20:21:32 +0200 Message-ID: <83wqgxbln7.fsf@gnu.org> References: <87r47bi1e5.fsf@yandex.ru> <52F96284.50507@yandex.ru> <52FAE12B.6060101@yandex.ru> <52FC3BEE.60604@yandex.ru> <52FCD2B4.5080006@yandex.ru> <52FD9F1D.50205@yandex.ru> <83mwhucg1h.fsf@gnu.org> <8338jldaju.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1392402106 20478 80.91.229.3 (14 Feb 2014 18:21:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Feb 2014 18:21:46 +0000 (UTC) Cc: emacs-devel@gnu.org, dgutov@yandex.ru To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 14 19:21:53 2014 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 1WENOa-000877-Lz for ged-emacs-devel@m.gmane.org; Fri, 14 Feb 2014 19:21:52 +0100 Original-Received: from localhost ([::1]:53281 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WENOa-0002Rs-82 for ged-emacs-devel@m.gmane.org; Fri, 14 Feb 2014 13:21:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WENOT-0002R6-Lu for emacs-devel@gnu.org; Fri, 14 Feb 2014 13:21:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WENON-00046t-9Q for emacs-devel@gnu.org; Fri, 14 Feb 2014 13:21:45 -0500 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:35252) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WENON-00046k-10 for emacs-devel@gnu.org; Fri, 14 Feb 2014 13:21:39 -0500 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0N0Z00J00ZO30I00@mtaout29.012.net.il> for emacs-devel@gnu.org; Fri, 14 Feb 2014 20:23:54 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N1000HJG0FTFN50@mtaout29.012.net.il>; Fri, 14 Feb 2014 20:23:54 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.185 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:169627 Archived-At: > From: Stefan Monnier > Cc: dgutov@yandex.ru, emacs-devel@gnu.org > Date: Fri, 14 Feb 2014 11:53:48 -0500 > > > My line of reasoning was that since fontification happens on the > > display engine level, we need to have a way to call a different > > fontification function for different portions of text. And similarly > > with indentation and other mode-specific behavior. > > And all of those are done in Elisp, so there's no need for C-level changes. Maybe I'm missing something, but how do you define fontification functions that are only in effect in a portion of a buffer? > >> What we need instead is some conventions that major modes need to > >> follow to play well in things like mmm-mode or mumamo. > > Like what? > > Like "font-lock-keywords can only look before/after the provided region > boundaries by calling special functions". And why would this not play well? > > Examples, please: which conventions are those? There's almost no code > > in Emacs that ignores the buffer restrictions (everything uses BEGV > > and ZV). > > That's not the issue. The issue is that code can misbehave if it is > prevented from seeing some of the "outer" text. Narrowing is used > sufficiently rarely that we don't see it too often, but such problems do > occur already with narrowing. We are not talking about narrowing to an arbitrary portion of text. We are talking about narrowing to a portion that presents a syntactically complete snippet of code.