From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: master e8488bcc9c: Avoid having font locking triggering unnecessary auto-saving Date: Tue, 10 May 2022 13:45:56 +0200 Message-ID: <87wnetk3uz.fsf@gnus.org> References: <165191796540.22789.3432288633082546349@vcs2.savannah.gnu.org> <20220507100605.B7CA7C051FF@vcs2.savannah.gnu.org> <87fsli7uhf.fsf@gnus.org> <87bkw67rru.fsf@gnus.org> <8735hi7r7k.fsf@gnus.org> <87ilqe4roc.fsf@gnus.org> <83levau0r4.fsf@gnu.org> <87v8ue3b9g.fsf@gnus.org> <87mtfq38r3.fsf@gnus.org> <87k0aunohy.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6486"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 10 13:48:05 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 1noOLU-0001UT-Tb for ged-emacs-devel@m.gmane-mx.org; Tue, 10 May 2022 13:48:04 +0200 Original-Received: from localhost ([::1]:39494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1noOLT-0002l4-Tb for ged-emacs-devel@m.gmane-mx.org; Tue, 10 May 2022 07:48:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1noOJe-000135-Jb for emacs-devel@gnu.org; Tue, 10 May 2022 07:46:11 -0400 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:43632) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1noOJb-0008R9-Q9; Tue, 10 May 2022 07:46:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XeGh/WV74rxHC+SSUSRYQ1VefokIBj8zoZla3ciXBC4=; b=qzoU7Ks8/qqorioDrPR85NBHGI jCAinel5cMLjn0XmiERmxVE/dy1slLrf6pNpV4lhEMziSbpTJ93w+k1cO83SH/VxvGRNtGjAgZZNW GLKWzmsfle6I2RVwq8tNYQtPLbQdxR/pRqrGu/xpjBVmbCzb9W3wsWmvPWkOQ/StMn+k=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1noOJR-0002tA-0j; Tue, 10 May 2022 13:45:59 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJ1BMVEX0uWz8x3TapWKo cUXJkle2jF391IGOWDduTjCaZTy4pYW2hjr///8gnOpWAAAAAWJLR0QMgbNRYwAAAAd0SU1FB+YF CgsoGZ731KAAAAGOSURBVDjLndI9T8JAGAfwPgdJjdP9GwNhawsR3FSqho1iEzVsAgmMJC5sxpJA 4ugAjpgm4AdgYfULen1/ZdAn1yZ3vz5399xVkvJB3G25UUjwWjbghsSRTwiiMCGGcC0iDvAEMIOj pAEK3UwhJ8Cqs/K4a+gy7OtuywyBHOdxufye2YvP5npp74wI5g2dqV1OXNWfOLQTigAgrwFMPHKc wVM1pAGchyU048UFUFxcCqKjyMNUrKxKOQAqUHSVcosnZjoO1QR49bn7db+oUgq8MpiuJsFxB91H saxeDkRP2Q/1PIBpp4fRcwI4eRfAmaYc9gMnBiLREafFNIwm648YEALQWq3egZoP4v0mQPVOt//j RCD244N/g5QAfAUj4ZGkgBeB4//IIdXSEKfEYCAVmYwsUApIlO9BJYALEyZKZ+XbzqsALcwwXswN lE57ct+72wCzczfDnWCrz5fty4fRdrHYbcrWWGRMvYy6Kdv9K1bq6QNTqw/FlQQADDRkIoAGjgD+ ANI/oHgyCcVQ+QXOAGak/arHkAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wNS0xMFQxMTo0MDoy NSswMDowMHu9iiAAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDUtMTBUMTE6NDA6MjUrMDA6MDAK 4DKcAAAAAElFTkSuQmCC X-Now-Playing: Joni Mitchell's _Court and Spark_: "Just Like This Train" In-Reply-To: (Stefan Monnier's message of "Mon, 09 May 2022 22:11:41 -0400") Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:289577 Archived-At: Stefan Monnier writes: > Fair enough. In that case, maybe it can even call > `restore-buffer-modified-p` unconditionally. Probably, but I don't think it makes much difference. >> Yeah, the semantics are slightly obscure now, but you're not supposed to >> call the function with `autosaved' when it hasn't been modified. >> Perhaps it should just signal an error in that case? > > Why not make it DTRT and make sure > > (buffer-modified-p (restore-buffer-modified-p FLAG)) > > always returns FLAG if FLAG is one of nil/t/autosaved (and add a few > tests while we're at it)? I'm actually not quite sure what the semantics should be if the buffer is buffer-modified-p => nil and we're called with (restore-buffer-modified-p 'autosaved)... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no