From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.devel Subject: Re: master 2399541: Remove font-lock toggle from font-lock-update Date: Thu, 25 Mar 2021 10:14:06 +0000 Message-ID: References: <20210324143048.23515.75257@vcs0.savannah.gnu.org> <20210324143050.40C6E20D10@vcs0.savannah.gnu.org> <8786a8e8fa731c1bd1ef@heytings.org> <87h7l0blrc.fsf@gnus.org> <87czvobksy.fsf@gnus.org> <87r1k4a1c0.fsf@gnus.org> <87czvna9cc.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="sKixHkxq24" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40157"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 25 11:15:01 2021 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 1lPN12-000AJt-Rk for ged-emacs-devel@m.gmane-mx.org; Thu, 25 Mar 2021 11:15:00 +0100 Original-Received: from localhost ([::1]:47444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lPN11-0002pp-Ry for ged-emacs-devel@m.gmane-mx.org; Thu, 25 Mar 2021 06:14:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPN0E-0002Mh-CG for emacs-devel@gnu.org; Thu, 25 Mar 2021 06:14:10 -0400 Original-Received: from heytings.org ([95.142.160.155]:44630) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPN0C-0003mY-8D for emacs-devel@gnu.org; Thu, 25 Mar 2021 06:14:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1616667246; bh=JWwBupoUAdf57i1X19/8JgM5zMhGnL1KC/jnBxAuSy8=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=ryY6Tw7YQqwmu+W7Fm4yEfcEaclN0A7/yLj70jMD68qH/Kj6XpLPvc74FWHxhkQKo gLklZEqQuH0KZPFyNd1dhMGlL1HH5n/2GmjBpYJs7kJE3CEjT7QYsIyEt9CtQCDTaf M01EEotF19xt8li6mZgRywxbafmcukvq3KsaTI3peEoWw/EDm7SsIRRie912OQLhT9 RFhMnEwQIo//P3sMw6VGJCLMuvoFpS9iRxg5/TnSS2wgcG48pIoWIwqgbksRP3/Uqc NQCM3LCMUgDoUX5bf/5y6TKnQniNCkbKG+Rdb7cHNaph0KY+BVWw+ycGNk4D2rerKK gJlOATi5uzP6Q== In-Reply-To: <87czvna9cc.fsf@gnus.org> Content-ID: Received-SPF: pass client-ip=95.142.160.155; envelope-from=gregory@heytings.org; helo=heytings.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:267011 Archived-At: --sKixHkxq24 Content-Type: text/plain; charset=us-ascii; format=flowed Content-ID: >> I'd much prefer a longer `font-lock-fontify-diwm` which tries to >> reproduce more or less the same behavior as your favorite, but by >> explicitly testing the different circumstances you care about. > > Sure. It could, for instance, refontify the region (if selected) > instead of the entire buffer. And probably a lot of other DWIM-ish > niceness. > Here's a patch to do this, and to fix the problem when "too large" buffers are refontified (xdisp.c for example). --sKixHkxq24 Content-Type: text/x-diff; name=0001-Improve-font-lock-update-and-rename-it-to-font-lock-.patch; charset=us-ascii Content-Transfer-Encoding: base64 Content-ID: Content-Description: Content-Disposition: attachment; filename=0001-Improve-font-lock-update-and-rename-it-to-font-lock-.patch RnJvbSA0NDMzMjQ5M2E4Nzk2ZjY5MjYwNWU3ZTdlYzU1MzkwNzQyZmYyM2Jj IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0 aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBUaHUsIDI1IE1h ciAyMDIxIDA5OjUwOjA1ICswMDAwDQpTdWJqZWN0OiBbUEFUQ0hdIEltcHJv dmUgZm9udC1sb2NrLXVwZGF0ZSBhbmQgcmVuYW1lIGl0IHRvIGZvbnQtbG9j ay1kd2ltDQoNCiogbGlzcC9mb250LWxvY2suZWwgKGZvbnQtbG9jay1kd2lt KTogUmVuYW1lZCBmcm9tICdmb250LWxvY2stdXBkYXRlJy4NCk9ubHkgcmVm b250aWZ5IHRoZSByZWdpb24gd2hlbiBpdCBpcyBhY3RpdmUuICBEbyBub3Qg cmVmb250aWZ5IHRvbw0KbGFyZ2UgYnVmZmVycyBhdCBvbmNlLg0KDQoqIGxp c3AvYmluZGluZ3MuZWwgKGN0bC14LXgtbWFwKTogQWRqdXN0IHRoZSBjb21t YW5kIG5hbWUuDQoNCiogZXRjL05FV1M6IEFkanVzdCB0aGUgY29tbWFuZCBu YW1lLg0KLS0tDQogZXRjL05FV1MgIC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0KICAgKHNhdmUtZXhjdXJzaW9uDQogICAgIChpZiAoYW5kIChub3QgYXJn KSBmb250LWxvY2stbW9kZSkNCi0gICAgICAgIChmb250LWxvY2stZm9udGlm eS1yZWdpb24gKHBvaW50LW1pbikgKHBvaW50LW1heCkpDQorICAgICAgICAo aWYgKHVzZS1yZWdpb24tcCkNCisgICAgICAgICAgICAoZm9udC1sb2NrLWZv bnRpZnktcmVnaW9uIChyZWdpb24tYmVnaW5uaW5nKSAocmVnaW9uLWVuZCkp DQorICAgICAgICAgIChmb250LWxvY2stZmx1c2ggKHBvaW50LW1pbikgKHBv aW50LW1heCkpDQorICAgICAgICAgIChmb250LWxvY2stZm9udGlmeS1yZWdp b24gKG1heCAocG9pbnQtbWluKSAoLSAocG9pbnQpIDUwMDAwKSkNCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWluIChwb2ludC1t YXgpICgrIChwb2ludCkgNTAwMDApKSkpDQogICAgICAgKGZvbnQtbG9jay11 bmZvbnRpZnktcmVnaW9uIChwb2ludC1taW4pIChwb2ludC1tYXgpKQ0KICAg ICAgIChmb250LWxvY2stbW9kZSAndG9nZ2xlKSkpKQ0KIA0KLS0gDQoyLjMw LjINCg0K --sKixHkxq24--