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: master 6d4179957a8: Fix test of whether to insert lexical-binding cookies in custom files Date: Sat, 11 May 2024 20:09:22 +0300 Message-ID: <86o79c1dj1.fsf@gnu.org> References: <86r0e81f21.fsf@gnu.org> <875xvkcmp7.fsf@igel.home> <871q68cmkx.fsf@igel.home> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="694"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 11 19:10:23 2024 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 1s5qEp-000AV4-07 for ged-emacs-devel@m.gmane-mx.org; Sat, 11 May 2024 19:10:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s5qE0-0005fm-1q; Sat, 11 May 2024 13:09:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s5qDx-0005fV-T7 for emacs-devel@gnu.org; Sat, 11 May 2024 13:09:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s5qDv-0005QM-Gs; Sat, 11 May 2024 13:09:27 -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=7gWwc9Pq8oS3tH0PoeTylGJxS0VFttMUYELGtWI5PRY=; b=IKuBbTvn5r6V 8kis3xVzmFi6QBOj6KB5Hys0hyESY9Ro6evF23VuFaAvFQgw1beyhW8iY8I2kz77bftr5g1A8sct3 6GgKb8OHGV649iS6mwJe9eWgyh6FtdVhHq86mUnfNTEgpz1FGK25E6rFtodJnuR6h682R0hfO4W2L B2lE4/IAtD3lDks+oQ5vtfkzMhwkLnG+TEIoCYNL/YB2k0uZkHgoFnijVr/VaM5P7sX57dXV2DaZ9 fxfqrVKq17QwmMLjHowB9x5u0buQNNMzn9OyclsJKhERq5N9GTgK+bKjv4ajDQquCx0qHvg/JxQcU 4M2bWujVNRfo0qSo8ye8Mg==; In-Reply-To: <871q68cmkx.fsf@igel.home> (message from Andreas Schwab on Sat, 11 May 2024 18:58:22 +0200) 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:319169 Archived-At: > From: Andreas Schwab > Cc: Po Lu , emacs-devel@gnu.org > Date: Sat, 11 May 2024 18:58:22 +0200 > > On Mai 11 2024, Andreas Schwab wrote: > > > On Mai 11 2024, Eli Zaretskii wrote: > > > >>> + ;; The previous test `eobp' was written with an appalling > >>> + ;; lack of forethought or testing, being easily misled if > >>> + ;; the user should have left point at eob in a buffer > >>> + ;; visiting the custom file. > >>> + (when (eq (point-min) (point-max)) > >> > >> Is this test robust enough? Why not use buffer-size instead? > > > > buffer-size also ignores narrowing. > > I missed the preceding (widen), though. Right, but buffer-size is cheaper.