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.bugs Subject: bug#48264: [PATCH v3 03/15] Add and use BUFFER_DEFAULT_VALUE_P Date: Fri, 07 May 2021 16:42:28 +0300 Message-ID: <83lf8qbqyj.fsf@gnu.org> References: <877dkbsj9d.fsf@catern.com> <20210506213346.9730-4-sbaugh@catern.com> <83czu3c88w.fsf@gnu.org> <87tuner9mw.fsf@catern.com> <83wnsabt00.fsf@gnu.org> <87a6p6r7eb.fsf@catern.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13964"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48264@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 07 15:43:12 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1lf0l5-0003Vb-UG for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 May 2021 15:43:11 +0200 Original-Received: from localhost ([::1]:55214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lf0l4-0006EE-89 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 May 2021 09:43:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lf0kx-0006E3-Ac for bug-gnu-emacs@gnu.org; Fri, 07 May 2021 09:43:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60677) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lf0kw-0002rp-0m for bug-gnu-emacs@gnu.org; Fri, 07 May 2021 09:43:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lf0kv-0006x1-VK for bug-gnu-emacs@gnu.org; Fri, 07 May 2021 09:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 May 2021 13:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48264 X-GNU-PR-Package: emacs Original-Received: via spool by 48264-submit@debbugs.gnu.org id=B48264.162039496026710 (code B ref 48264); Fri, 07 May 2021 13:43:01 +0000 Original-Received: (at 48264) by debbugs.gnu.org; 7 May 2021 13:42:40 +0000 Original-Received: from localhost ([127.0.0.1]:43989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lf0ka-0006wk-Iz for submit@debbugs.gnu.org; Fri, 07 May 2021 09:42:40 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lf0kZ-0006we-5q for 48264@debbugs.gnu.org; Fri, 07 May 2021 09:42:39 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48696) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lf0kT-0002cr-Sm; Fri, 07 May 2021 09:42:33 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4666 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.86_2) (envelope-from ) id 1lf0kT-0003Mq-Gm; Fri, 07 May 2021 09:42:33 -0400 In-Reply-To: <87a6p6r7eb.fsf@catern.com> (message from Spencer Baugh on Fri, 07 May 2021 09:38:20 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:205940 Archived-At: > From: Spencer Baugh > Cc: 48264@debbugs.gnu.org > Date: Fri, 07 May 2021 09:38:20 -0400 > > > It's the other way around here: the test "if (idx > 0)" is clear, > > whereas "if (BUFFER_DEFAULT_VALUE_P (offset))" makes me go look up the > > definition of the macro, because the name is not expressive enough, > > and the argument "offset" doesn't help, either. > > Sure; what about the name "BUFFER_VAR_HAS_DEFAULT_VALUE_P"? Much better. Maybe BVAR_HAS_DEFAULT_VALUE_P? it's shorter. > "idx > 0" is only clear if one has memorized how all the different > pieces of DEFVAR_PER_BUFFER metadata (such as the index) work. But I > don't think a casual reader would have done that. Sure; but the number of such places is small, and we could have a comment there explaining the semantics.