From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Major modes using `widen' is a good, even essential, programming practice. Date: Sun, 07 Aug 2022 17:20:52 +0300 Message-ID: <835yj4xhh7.fsf@gnu.org> References: <6ae35c9306ade07b4c45@heytings.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39981"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gregory@heytings.org, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Aug 07 16:21:46 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oKhA1-000AEY-IW for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Aug 2022 16:21:45 +0200 Original-Received: from localhost ([::1]:39926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oKh9z-0001pa-OG for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Aug 2022 10:21:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKh9R-00019C-RY for emacs-devel@gnu.org; Sun, 07 Aug 2022 10:21:09 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55130) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKh9R-0007e0-AU; Sun, 07 Aug 2022 10:21:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=CsTPg4R0EWXELpGzwo/DitfUfVsiSwk/oCpV7ml+Fos=; b=flOhSTaHjE7n FchZ8ntUohQK8PlCvVQpkF/ftM1XWfPtSgGpBM8uNTNsatRNfw3l082CRVy3B4U8/laoGNaBXsp5O xjmkOqKxbUh9rbEo6c7tU1H7VSj750GzNihHMAVQlYZ/L5CbcKOVYAP4SyzVLijRVviyNuvsSRJax C4wbEljneHsibRTbOF+eWyZdJWuryk5smDNtsYkssc2K5QYIL+04sIYwtHF1OJYHaRcIz0qWs0tGc yzo0jDxluqimRbqzjBNNyYL536oBtomn1LsBTJvVpTFz2xlCbra0bB75BKZ1DrcqszNtz9QjgJYnk KgOg9wUFpVagOOZj+xen4w==; Original-Received: from [87.69.77.57] (port=2560 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKh9Q-00072o-Pg; Sun, 07 Aug 2022 10:21:09 -0400 In-Reply-To: (message from Alan Mackenzie on Sun, 7 Aug 2022 14:13:36 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:293206 Archived-At: > Date: Sun, 7 Aug 2022 14:13:36 +0000 > Cc: emacs-devel@gnu.org > From: Alan Mackenzie > > > jit-lock-functions is an API, with a contract. CC Mode decided to break > > that contract. > > Where, exactly are the terms of this supposed contract formulated? And > which part of this supposed contract has CC Mode broken? jit-lock calls the functions with two arguments, BEG and END, and expects them to work only on that chunk of text. > If you find CC Mode too sluggish for you (I don't), then configure it to > be faster and inaccurate by setting font-lock-maximum-decoration. It doesn't help, IME. The mode is still slow.