From unknown Tue Jun 17 20:20:18 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#26564 <26564@debbugs.gnu.org> To: bug#26564 <26564@debbugs.gnu.org> Subject: Status: Document that only functions and not variables can end with "-p" Reply-To: bug#26564 <26564@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:20:18 +0000 retitle 26564 Document that only functions and not variables can end with "= -p" reassign 26564 emacs submitter 26564 Kaushal Modi severity 26564 wishlist tag 26564 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 19 11:47:30 2017 Received: (at submit) by debbugs.gnu.org; 19 Apr 2017 15:47:30 +0000 Received: from localhost ([127.0.0.1]:57140 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0rpK-0003h1-BF for submit@debbugs.gnu.org; Wed, 19 Apr 2017 11:47:30 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43925) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0rpI-0003gi-A8 for submit@debbugs.gnu.org; Wed, 19 Apr 2017 11:47:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0rpC-0002Mj-05 for submit@debbugs.gnu.org; Wed, 19 Apr 2017 11:47:23 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47204) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d0rpB-0002Md-TC for submit@debbugs.gnu.org; Wed, 19 Apr 2017 11:47:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0rpA-0005bE-IC for bug-gnu-emacs@gnu.org; Wed, 19 Apr 2017 11:47:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0rp9-0002L0-I3 for bug-gnu-emacs@gnu.org; Wed, 19 Apr 2017 11:47:20 -0400 Received: from mail-lf0-x229.google.com ([2a00:1450:4010:c07::229]:36761) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d0rp9-0002KU-86 for bug-gnu-emacs@gnu.org; Wed, 19 Apr 2017 11:47:19 -0400 Received: by mail-lf0-x229.google.com with SMTP id c80so14701590lfh.3 for ; Wed, 19 Apr 2017 08:47:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=JM2KHcTi1w4HF23RmGfBpal+eMq1NCbHoKBk6aHxOOk=; b=sm4B6qSCAOv9DzvjvCBNSXzh7ilf7+dBVEuP/iBwUZlNDrGgODlQjKlr9RY25b3sEW bBszWcy70uPCWSb7hH/nIAfExLheol1vNpr0dNtNg+GxWcQTyIQcGkShQ5wvr4RNOofv acExYOzPA6dtDM/L6ZWQPQ6QXE9DkAl2o3+qRpjDpju0eEKuCWcYskmaaaLz+4hrGUqQ zy7DS2YYhpf75r6/MBy3+N2E8qjnm/k6YtyIX3Y1q65xwnZ9JgJWPxMg0S97YR1lrc/4 K1j0b3VzPwn9wBt+VSC1WuqIpTaZmEVb2r36AGnN9aDdIa+j7qWxEjULP3uF25ZwlJ8Y FVTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=JM2KHcTi1w4HF23RmGfBpal+eMq1NCbHoKBk6aHxOOk=; b=Va44RCXACe43LBeIE3JOEl/+boLV/XCHJIZoUUTny3IB729Hrh6gavdh5wRCzKjlFY A9Sk3B8v89eo/dO/DxxcuOqy7u4iezsqe1pFHkB7UYtNrcyMQWySEiCldNwt4YzFCQsq 8E7WjRqB2FL3kBuL8lcBVNgXs6tj+uUZVpzLq0z48smAGqOvbG9hu0L1cWxnR8fTO+wS o8lEgWZ1G1YvmTRN7fIbDJsh8XiGvgqHUghZ0y381pozcNLGp4J5ss6yt3Xtim6z3rit OWh9SIXOJ9z54OSs/KDUF7cKEVIMB4MbHR/G4AFZR/pQ8/OiuyWmV5vDuW3useP5wiOJ Yhjg== X-Gm-Message-State: AN3rC/5wcGakQK21umkWYGSuiHXb0LRYsNCeHXkdiud2uXfyjLmM+HCC 1E+JQ5Epvp0zPUYMyww8loIbTkvhbQ== X-Received: by 10.25.145.83 with SMTP id y19mr1310085lfj.5.1492616837430; Wed, 19 Apr 2017 08:47:17 -0700 (PDT) MIME-Version: 1.0 From: Kaushal Modi Date: Wed, 19 Apr 2017 15:47:06 +0000 Message-ID: Subject: Document that only functions and not variables can end with "-p" To: "bug-gnu-emacs@gnu.org" Content-Type: multipart/alternative; boundary=94eb2c1cc63661855f054d86f0b0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --94eb2c1cc63661855f054d86f0b0 Content-Type: text/plain; charset=UTF-8 The discussion on whether variables should end in "-p" came up few time on emacs-devel, at least the ones I was part of: 1. https://lists.gnu.org/archive/html/emacs-devel/2016-07/msg00734.html 2. http://lists.gnu.org/archive/html/emacs-devel/2017-04/msg00540.html Doing a rudimentary search in emacs/lisp/ code-base shows a sign of an undocumented convention that predicate functions, functions that return either nil or non-nil can end in "-p" (if the function name is multi-word, like nested-alist-p), or just "p" (if the function name is a single word, like stringp). I ran ag[1] in emacs/lisp: 1. 1511 matches -- defuns and defsubsts ending in -p -- ag 'def(un|subst)\s+[^ ]+-p\s+' --stats 2. 149 matches -- defvars, defconsts and defcustoms ending in -p -- ag 'def(var|const|custom)\s+[^ ]+-p\s+' --stats 3. 65 matches -- Just the user-facing defcustoms -- ag 'defcustom\s+[^ ]+-p\s+' --stats That corroborates that more functions tend to end in "-p" than variables. This bug report is to make a request to incorporate this unspoken rule as a rule in the Elisp manual. What would be the correct section to do so? [1]: https://github.com/ggreer/the_silver_searcher -- Kaushal Modi --94eb2c1cc63661855f054d86f0b0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The discussion on whether variables should end in "-p= " came up few time on emacs-devel, at least the ones I was part of:

D= oing a rudimentary search in emacs/lisp/ code-base shows a sign of an undoc= umented convention that predicate functions, functions that return either n= il or non-nil can end in "-p" (if the function name is multi-word= , like nested-alist-p), or just "p" (if the function name is a si= ngle word, like stringp).

I ran ag[1] in emacs/lisp:

1. 1511 matches -- defuns and defsubsts ending in -p -- a= g 'def(un|subst)\s+[^ ]+-p\s+' --stats
2. 149 matches -- defvars, defconsts and defcust= oms ending in -p -- ag 'def(var|const|custom)\s+[^ ]+-p\s+' --stats= =C2=A0
3. 65 matche= s -- Just the user-facing defcustoms -- ag 'defcustom\s+[^ ]+-p\s+'= --stats

That corroborates that more functions tend to end in "-p" than = variables.

This bug report is to make a request to= incorporate this unspoken rule as a rule in the Elisp manual.
What would be the correct section to do so?
--

Kaus= hal Modi

--94eb2c1cc63661855f054d86f0b0-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 19 12:08:06 2017 Received: (at 26564) by debbugs.gnu.org; 19 Apr 2017 16:08:06 +0000 Received: from localhost ([127.0.0.1]:57155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0s9G-0004Jh-Km for submit@debbugs.gnu.org; Wed, 19 Apr 2017 12:08:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0s9F-0004JC-22 for 26564@debbugs.gnu.org; Wed, 19 Apr 2017 12:08:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0s94-00065J-SY for 26564@debbugs.gnu.org; Wed, 19 Apr 2017 12:07:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0s94-00065C-PL; Wed, 19 Apr 2017 12:07:54 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1743 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d0s94-0001y2-0F; Wed, 19 Apr 2017 12:07:54 -0400 Date: Wed, 19 Apr 2017 19:08:31 +0300 Message-Id: <831ssocrcw.fsf@gnu.org> From: Eli Zaretskii To: Kaushal Modi In-reply-to: (message from Kaushal Modi on Wed, 19 Apr 2017 15:47:06 +0000) Subject: Re: bug#26564: Document that only functions and not variables can end with "-p" References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26564 Cc: 26564@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Kaushal Modi > Date: Wed, 19 Apr 2017 15:47:06 +0000 > > This bug report is to make a request to incorporate this unspoken rule as a rule in the Elisp manual. > > What would be the correct section to do so? "Coding Conventions", of course. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 19 12:22:57 2017 Received: (at 26564) by debbugs.gnu.org; 19 Apr 2017 16:22:57 +0000 Received: from localhost ([127.0.0.1]:57198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0sNd-0004gb-J3 for submit@debbugs.gnu.org; Wed, 19 Apr 2017 12:22:57 -0400 Received: from mail-lf0-f54.google.com ([209.85.215.54]:36128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0sNc-0004gP-33 for 26564@debbugs.gnu.org; Wed, 19 Apr 2017 12:22:56 -0400 Received: by mail-lf0-f54.google.com with SMTP id c80so15246894lfh.3 for <26564@debbugs.gnu.org>; Wed, 19 Apr 2017 09:22:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Yw8Hxt6/1SRqn2++ND3QTP/Xh2cWCioha23R4sgIQBw=; b=Ubh9p6yT8UxNIO6Xz4mI65V748x4mheeCW400INZ59sfTLzs+kvj19dSn+QTpVeKkF A14dhWVGkeJWq0nqCwXNdrYfI66NgFnu7qQTWdFBNB34l3Pl61fN/ytMG3Ek8typHUel kN/SbA+ObrKBoDIcbDqKoveWR/LIy6lZ/N5Pnlz/t6hUmpsASS6xGfWInbAwKYCj781P 6CLiVhZePx6mhR6WPFx4/P+IwLXraMFkSTHdEu2sgx/eMe/hMagmF8JDqDBGBMSv9R8r PoZGhkLVAiJruHuYUvek9jylHH4+Gcu+UXWpj8mffVtIhaS/WYokj8LIBM6RBEI42mv0 SdrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Yw8Hxt6/1SRqn2++ND3QTP/Xh2cWCioha23R4sgIQBw=; b=pEd/7bxm541wFvw9bqqW4cDU1RYHixfguM57Y0YbV34MglYBzeiMQ1FL27S1HUR2w4 GuF2CU5tGrobmanYnAa+nDce5HR0FRPjLPQgjR8J9oaMJVLDqZt8EiJ84qYW/2/tRWI1 WFkAhMag/Hus54w2eKVMXuipCkBYdguYmuQrRavuDuNj4GGHI5s305It7w1ghsCtpcQr vCoEORiUTqcUopkhFgHwWM+SoeHbZuqamW7V8ryVR/YzEnA+2K2uPzLbOAYVuHvgW3qR TSxs1FHT3IUgsrOeuA0RI/ZBF/VVkbQ4Un2790jh2SnLtxXnTU/PuuckbnIa1rd4QAwI cArA== X-Gm-Message-State: AN3rC/6TE8uPXlG1EsIp8eXHxEJhb5PEKZWNPQQVaPYvafcgoVPZ7QFt YqvF8LtceOSzgqIMD4fmH4ltJU2lcA== X-Received: by 10.25.16.29 with SMTP id f29mr1415875lfi.134.1492618969892; Wed, 19 Apr 2017 09:22:49 -0700 (PDT) MIME-Version: 1.0 References: <831ssocrcw.fsf@gnu.org> In-Reply-To: <831ssocrcw.fsf@gnu.org> From: Kaushal Modi Date: Wed, 19 Apr 2017 16:22:39 +0000 Message-ID: Subject: Re: bug#26564: Document that only functions and not variables can end with "-p" To: Eli Zaretskii Content-Type: multipart/alternative; boundary=001a11401da47c54f1054d876f16 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26564 Cc: 26564@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --001a11401da47c54f1054d876f16 Content-Type: text/plain; charset=UTF-8 On Wed, Apr 19, 2017 at 12:08 PM Eli Zaretskii wrote: > > What would be the correct section to do so? > > "Coding Conventions", of course. > Please review this patch: >From 9749603b7c3ba45c9c81f9624d6dc42f740aee39 Mon Sep 17 00:00:00 2001 From: Kaushal Modi Date: Wed, 19 Apr 2017 12:20:05 -0400 Subject: [PATCH] Document convention to reserve "p" or "-p" suffix for predicate fns * doc/lispref/tips.texi (Coding Conventions): The "p" or "-p" suffix should be used for only predicate functions, and not variables. (Bug#26564) --- doc/lispref/tips.texi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index 4e2a0fad1f..ec76fcb5ce 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi @@ -154,7 +154,9 @@ Coding Conventions condition is true or false, give the function a name that ends in @samp{p} (which stands for ``predicate''). If the name is one word, add just @samp{p}; if the name is multiple words, add @samp{-p}. -Examples are @code{framep} and @code{frame-live-p}. +Examples are @code{framep} and @code{frame-live-p}. This predicate +suffix should not be used in variable names (i.e., you might name a +variable @code{foo-feature} instead of @code{foo-feature-p}). @item If the purpose of a variable is to store a single function, give it a -- 2.11.0 -- Kaushal Modi --001a11401da47c54f1054d876f16 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Wed, Apr 19= , 2017 at 12:08 PM Eli Zaretskii <eliz@g= nu.org> wrote:
> What wou= ld be the correct section to do so?

"Coding Conventions", of course.

<= div>Please review this patch:

From 9749603b7c3ba45= c9c81f9624d6dc42f740aee39 Mon Sep 17 00:00:00 2001
From: Kaushal = Modi <kaushal.modi@gmail.com>

* doc/lispref/= tips.texi (Coding Conventions): The "p" or "-p" suffix<= /div>
=C2=A0 should be used for only predicate functions, and not
=
=C2=A0 variables. =C2=A0(Bug#26564)
---
=C2=A0doc/= lispref/tips.texi | 4 +++-
=C2=A01 file changed, 3 insertions(+),= 1 deletion(-)

diff --git a/doc/lispref/tips.texi = b/doc/lispref/tips.texi
index 4e2a0fad1f..ec76fcb5ce 100644
=
--- a/doc/lispref/tips.texi
+++ b/doc/lispref/tips.texi
@@ -154,7 +154,9 @@ Coding Conventions
=C2=A0condition is t= rue or false, give the function a name that ends in
=C2=A0@samp{p= } (which stands for ``predicate'').=C2=A0 If the name is one word,<= /div>
=C2=A0add just @samp{p}; if the name is multiple words, add @samp= {-p}.
-Examples are @code{framep} and @code{frame-live-p}.
<= div>+Examples are @code{framep} and @code{frame-live-p}.=C2=A0 This predica= te
+suffix should not be used in variable names (i.e., you might = name a
+variable @code{foo-feature} instead of @code{foo-feature-= p}).
=C2=A0
=C2=A0@item
=C2=A0If the purpose = of a variable is to store a single function, give it a
--=C2=A0
2.11.0

=C2=A0
--

Kaushal Modi

--001a11401da47c54f1054d876f16-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 19 13:27:06 2017 Received: (at 26564) by debbugs.gnu.org; 19 Apr 2017 17:27:06 +0000 Received: from localhost ([127.0.0.1]:57282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0tNh-0006Fs-OG for submit@debbugs.gnu.org; Wed, 19 Apr 2017 13:27:06 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:26092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0tNf-0006FP-Qy for 26564@debbugs.gnu.org; Wed, 19 Apr 2017 13:27:04 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v3JHQuKm019365 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 19 Apr 2017 17:26:57 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v3JHQuuR004423 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 19 Apr 2017 17:26:56 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id v3JHQsrZ018856; Wed, 19 Apr 2017 17:26:55 GMT MIME-Version: 1.0 Message-ID: Date: Wed, 19 Apr 2017 10:26:53 -0700 (PDT) From: Drew Adams To: Kaushal Modi , 26564@debbugs.gnu.org Subject: RE: bug#26564: Document that only functions and not variables can end with "-p" References: In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6767.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26564 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > The discussion on whether variables should end in "-p" came up few time o= n emacs-devel, at least the ones I was part of: >=20 > 1.=C2=A0https://lists.gnu.org/archive/html/emacs-devel/2016-07/msg00734.h= tml > 2.=C2=A0http://lists.gnu.org/archive/html/emacs-devel/2017-04/msg00540.ht= ml >=20 > Doing a rudimentary search in emacs/lisp/ code-base shows a sign of an un= documented convention that predicate functions, functions that return eithe= r nil or non-nil can end in "-p" (if the function name is multi-word, like = nested-alist-p), or just "p" (if the function name is a single word, like s= tringp). >=20 > I ran ag[1] in emacs/lisp: >=20 > 1. 1511 matches -- defuns and defsubsts ending in -p -- ag 'def(un|subst)= \s+[^ ]+-p\s+' --stats > 2. 149 matches -- defvars, defconsts and defcustoms ending in -p -- ag 'd= ef(var|const|custom)\s+[^ ]+-p\s+' --stats =C2=A0 > 3. 65 matches -- Just the user-facing defcustoms -- ag 'defcustom\s+[^ ]+= -p\s+' --stats >=20 > That corroborates that more functions tend to end in "-p" than variables. A better measure would be # of `-p' vs number of NON-`-p', for both functions and variables. But I'm sure that the same result holds: far more `-p' functions than `-p' vars. Stefan, at least, has actively discouraged the use of vars with `-p' names, in emacs-devel. That could partly explain the numbers. Also, there is nothing in the Elisp manual coding conventions about `-p' for var names, so users wouldn't get the idea to do that from the manual. That too could partly explain the numbers. > This bug report is to make a request to incorporate this unspoken rule as= a rule in the Elisp manual. >=20 > What would be the correct section to do so? > > [1]:=C2=A0https://github.com/ggreer/the_silver_searcher FWIW, I disagree with a guideline to not name Boolean vars using `-p'. 1. Variables and functions are already in separate spaces - they can be examined/found separately (`boundp' vs `fboundp'). =20 What do you hope to gain by outlawing/discouraging `-p' for=20 Boolean variable names? It cannot be to avoid confusing a variable and a function, since the those kinds of animal are already separate in Emacs Lisp. 2. A variable is, abstractly (e.g., in a formal abstract data type), a nullary function. It makes just as much sense to name a Boolean variable using `*-p' as it does to name a Boolean function using that convention. Just one opinion. Stefan disagrees, for instance (but with no reasons given). 3. Is there a proposal for a _different_ naming convention for Boolean variables? I'd argue that we should have some such a naming convention. And I'd argue that it should be different for options and non-option variables. I use `-flag' for Boolean options and `-p' for Boolean non-option variables. (I did not come up with the `-flag' convention, BTW. Someone else did, long ago. I thought it was a GNU Emacs convention, (maybe it was?) so I stuck to it. Stefan is not a fan of `-flag' (or any naming convention for vars). 4. There should be some easy way to ask for help on Boolean variables. Better yet would be a way to ask for help on a user option, filtering by defcustom type. FWIW, I have code that does that. It provides help commands that let you show the help for things based on different=20 criteria, and for options that includes the custom type. You can match the type in different ways, depending on the prefix argument: - None: OPTION is defined with TYPE or a subtype of TYPE. TYPE is a regexp. - `C-u': OPTION is defined with TYPE or a subtype of TYPE, or its current value is compatible with TYPE. TYPE is a type definition or its first symbol. - Negative: OPTION is defined with TYPE (exact match). TYPE is a regexp. - Positive: OPTION is defined with TYPE, or its current value is compatible with TYPE. TYPE is a type definition or its first symbol. - Zero: OPTION is defined with TYPE or a subtype of TYPE. TYPE is a type definition or its first symbol. - `C-u C-u': OPTION is defined with TYPE (exact match). TYPE is a type definition or its first symbol. _Without_ such a capability, it should be possible, at a minimum, to get only Boolean options, using a name-pattern match. Again, just one opinion. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 19 17:44:20 2017 Received: (at 26564) by debbugs.gnu.org; 19 Apr 2017 21:44:20 +0000 Received: from localhost ([127.0.0.1]:57515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0xOd-0007er-V8 for submit@debbugs.gnu.org; Wed, 19 Apr 2017 17:44:20 -0400 Received: from mout.web.de ([212.227.15.14]:61830) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0xOb-0007eZ-Tz for 26564@debbugs.gnu.org; Wed, 19 Apr 2017 17:44:18 -0400 Received: from drachen.dragon ([94.216.184.104]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Le4fk-1cFXHm1C6W-00pxW6; Wed, 19 Apr 2017 23:44:06 +0200 From: Michael Heerdegen To: Drew Adams Subject: Re: bug#26564: Document that only functions and not variables can end with "-p" References: Date: Wed, 19 Apr 2017 23:44:12 +0200 In-Reply-To: (Drew Adams's message of "Wed, 19 Apr 2017 10:26:53 -0700 (PDT)") Message-ID: <87h91kdqdv.fsf@drachen> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:nfRYZl0fMvRkox3KS4W+D85e1eWOqUat+52+zcP3JoeERpYWkXk kvpFkl6rTe6j0mHR66Bom5lDD8gUnLP1IkBRQm+CzGBJbbeI10xJW2JCowXYJlE98foKwbL vvXdiYtO6yIIIpC9Od4NIMRdQwMYuHXjI8knEP2qkAmUe+4WrzXeuFDt5K+yE89TrU49fNP W4r34M9AqwhqbKhylg9OQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:A9slH9I7obE=:wvIXjgGWhwoC51jI/foOTa G7xd2FksuAsA0Oqi3AMpI/+TyWNO/Tk2VruABC6BWxt9IYvOtQJgwctRMMQYP5pAfQeG4y2Hg Z5mscczAIEowl5Wo5NXu5kbSkgbhOcE+LD6UBO+7UF5wtOQUAz0fmeHtXAwAEp72sOUWS3K88 xW8EzY9975ggb61xLbJ4YjZEFs7Tx/lNCaxs0nrrvu8utnXh+8Ag8bwaoIMlVncOF7C93PVpW ZAx/UIFnGukToVU2a1oUMc0i7Q5ldhNXQNNYLY+s0rbJbVmsr9e+qngKNgZnNWFDS+IsvSb/w jdIMX7jRWEUyfRLOj1C4jZrttbj4Ty8BDwqa1g2eOKeAbMfn7ZcWL3SKL9oubhmvW8Le+TjK6 Hblal7Rvj4aR+3hxpX+JqmBD0fhvGnyQftr0CaG0NxFgVJgi+aU/xlvOC26K2N20yAW+AOvpe iLZcxMoe5IG8GPpxlJH1nDTiUcslJOxzv0h/3qdn5dvyHRwfjbScD5zCQ199GlhW0hvOLPuLC p4BusAsx9H0cT7o3tsf0ndJ7UkCzUfQUACD4kAcXzlc0TquQrP7RKe9Ni8hkxLYoXqfv7VywW OV/V3uvQTQqA4Smgj/oCLKrp33HSQzkOEDz/Q+wFhY+0vSs+nHDNtFIg7c/HWChGdyUFF0KiW r5TYecCyMRvuFttj76ezHp+GuS8gndI3l7VidShiCjGZPveb802El9+pYhOfD0X15I7ywORJn 9yiDYweG1DU4ypYAuQXs58TQvDE5ntH4IW3Yp4knNIqZKo+QEqJrQYwdBGV1TO2F1UogA8JPq IKsHhCU X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 26564 Cc: 26564@debbugs.gnu.org, Kaushal Modi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.5 (---) Drew Adams writes: > 3. Is there a proposal for a _different_ naming convention > for Boolean variables? I'd argue that we should have some > such a naming convention. And I'd argue that it should be > different for options and non-option variables. That's a good point indeed. An alternative to "-p" would be "is-", like `foo-is-negative'. Not using -p would also have an advantage: you could distinguish boolean variables from variables bound to a predicate function. Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 19 17:49:21 2017 Received: (at 26564) by debbugs.gnu.org; 19 Apr 2017 21:49:21 +0000 Received: from localhost ([127.0.0.1]:57525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0xTU-0007mx-PL for submit@debbugs.gnu.org; Wed, 19 Apr 2017 17:49:20 -0400 Received: from mout.web.de ([212.227.15.3]:54750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0xTS-0007mj-Ms for 26564@debbugs.gnu.org; Wed, 19 Apr 2017 17:49:19 -0400 Received: from drachen.dragon ([94.216.184.104]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MYNof-1cVpfb30hV-00V8I7; Wed, 19 Apr 2017 23:49:10 +0200 From: Michael Heerdegen To: Kaushal Modi Subject: Re: bug#26564: Document that only functions and not variables can end with "-p" References: <831ssocrcw.fsf@gnu.org> Date: Wed, 19 Apr 2017 23:49:16 +0200 In-Reply-To: (Kaushal Modi's message of "Wed, 19 Apr 2017 16:22:39 +0000") Message-ID: <87d1c8dq5f.fsf@drachen> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:/UI61PDaw004pzWS7JXfvCvdcf76aJFEvjva7I1HGoL82kmSWdN SI8LGQ3b4z/txiE8A96lCMvKD5KlgQgzebKEIx8954nn6FT0TGFhU4FoQTeHHDCxOEXhyhs 8Ix8jqBBPs9MbHIy3VZWaAVat39UDG/gU2mV4FYwMGb8ccLhgRDsMktca6Kbo3ZorKC2uyx Fs+j/3mzPP61TG+BOdNEQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:8yEoQNnQHAk=:oAonHwoZG9Imh3JfgnBJth eZ2gsTRFqE2s0T5WP9la6kMC0yNABXAjveVBFj2CwhxoyFFB0kTAjG9DKSzzM+YmqV1OpS0Gd F327vomnFoMiZLyaTW8ZTDLTJehqFD77qgeymFcEg8JIOpqlDkKRFyM6Aqo69qoiPFn1kjkZD Eg5WbFnrfhylQFjAGDUvr7nbmMU2LAkJpW36+xyPybFys6cIYzMXU+MIz16b0jj6h+ydhwVEi D3rLlKbumfFSVzm85c3TanWg536IypRDQqZGkdwWWpabQdRnjH+RpEtBOB1GhPIzCkpLhn7TG guoxpcUFApxH4EmQUXPGEnTECGwf2IAK1wUdfWa/N5ghvfzYoIqy4apACKqmqlBs5hsCJ23tL IPwUrM77OJVrJqSCBxW66U/K3/Nlx/nbV8k2D2Wgc30w/MQW0slR8T+XbYHJOoYZksvoisK5N dVHm45pJ2QbqL+XnQKGP0c3fxFAZY8B2dmdNJtNMaTZewNjji3ev2uHaaUXqkILDlpCUe4NSB GVfIrxnA4NOK/TNbGneBk+Jlsgo/5UVwb98xvp2Kfg6rM8QAllDm7TOKk1WUtV05mA3U8f273 l5Izb3Vnh3xahh2C1pUZiEM0d5qrv78h/f8sc56NIoZkQNobLhxiMV7IlgLSpE2xlDfxtmcXY Tv9NA0cMAGLEXV+4xHCNDpL5mNlP9rQMbFY8lDC53b39QjMvoujVPFeO44+SB2Qu3iHbXUqbn 1+jO+ejyJYuYkXNignkbQN4GUFZdhgOnKmYk+WlxBgJZ9ip/diK6kPysgT2x9r2Y8xwq0eoXs yMhCTWZ X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26564 Cc: 26564@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Kaushal Modi writes: > -Examples are @code{framep} and @code{frame-live-p}. > +Examples are @code{framep} and @code{frame-live-p}. This predicate > +suffix should not be used in variable names (i.e., you might name a > +variable @code{foo-feature} instead of @code{foo-feature-p}). I think we should not discourage naming variables bound to a predicate "-p". I guess you only mean "boolean variables" here? Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 19 18:01:16 2017 Received: (at 26564) by debbugs.gnu.org; 19 Apr 2017 22:01:17 +0000 Received: from localhost ([127.0.0.1]:57549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0xf2-00085d-Ng for submit@debbugs.gnu.org; Wed, 19 Apr 2017 18:01:16 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:42247) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0xf0-000858-TA for 26564@debbugs.gnu.org; Wed, 19 Apr 2017 18:01:15 -0400 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v3JM17xw032680 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Apr 2017 22:01:08 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v3JM17I7014528 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Apr 2017 22:01:07 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v3JM15hS025189; Wed, 19 Apr 2017 22:01:06 GMT MIME-Version: 1.0 Message-ID: <716db14c-b67b-4477-b4c2-75478df0c313@default> Date: Wed, 19 Apr 2017 15:01:04 -0700 (PDT) From: Drew Adams To: Michael Heerdegen Subject: RE: bug#26564: Document that only functions and not variables can end with "-p" References: <87h91kdqdv.fsf@drachen> In-Reply-To: <87h91kdqdv.fsf@drachen> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6767.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0022.oracle.com [156.151.31.74] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26564 Cc: 26564@debbugs.gnu.org, Kaushal Modi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > 3. Is there a proposal for a _different_ naming convention > > for Boolean variables? I'd argue that we should have some > > such a naming convention. And I'd argue that it should be > > different for options and non-option variables. >=20 > That's a good point indeed. >=20 > An alternative to "-p" would be "is-", like `foo-is-negative'. Not great for cases where "has-" would be more appropriate (and vice versa, for cases where "is-" would be more appropriate). Not good for lots of other cases too. E.g., `box-cursor-when-idle-p' or `use-foo-bar-p' or `remove-foo-props-p' or `iac1-was-cycling-p' or `foo-names-only-p' or `hl-line-when-idle-p'? I suggest we stay away from helper verbs (or even any words). Verbs, in particular, can be different for singular and plural (e.g. `fancy-candidates-p'). > Not using -p would also have an advantage: you could distinguish > boolean variables from variables bound to a predicate function. How is it difficult to distinguish those if `-p' is used for both? It's true that in some (very few) contexts just looking at "'foo-p" in some code might not let you know whether `foo-p' is a variable or a function (or is both), but it is trivial to find out which is the case, for any symbol that is already defined as a variable or a function. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 19 18:05:10 2017 Received: (at 26564) by debbugs.gnu.org; 19 Apr 2017 22:05:10 +0000 Received: from localhost ([127.0.0.1]:57554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0xio-0008B7-8G for submit@debbugs.gnu.org; Wed, 19 Apr 2017 18:05:10 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:43776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0xil-0008At-IU for 26564@debbugs.gnu.org; Wed, 19 Apr 2017 18:05:08 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v3JM51G9004456 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Apr 2017 22:05:01 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v3JM51l1020501 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Apr 2017 22:05:01 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v3JM51W7017053; Wed, 19 Apr 2017 22:05:01 GMT MIME-Version: 1.0 Message-ID: Date: Wed, 19 Apr 2017 15:04:59 -0700 (PDT) From: Drew Adams To: Michael Heerdegen , Kaushal Modi Subject: RE: bug#26564: Document that only functions and not variables can end with "-p" References: <831ssocrcw.fsf@gnu.org> <87d1c8dq5f.fsf@drachen> In-Reply-To: <87d1c8dq5f.fsf@drachen> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6767.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0021.oracle.com [156.151.31.71] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26564 Cc: 26564@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > -Examples are @code{framep} and @code{frame-live-p}. > > +Examples are @code{framep} and @code{frame-live-p}. This predicate > > +suffix should not be used in variable names (i.e., you might name a > > +variable @code{foo-feature} instead of @code{foo-feature-p}). >=20 > I think we should not discourage naming variables bound to a predicate > "-p". I guess you only mean "boolean variables" here? I _would_ discourage that. And I'd promote the practice of naming variables expected to be bound to a Boolean _value_ with suffix `-p'. Just as a predicate _returns_ a Boolean value, so does a Boolean-valued variable. A variable whose value is a _predicate_ I'd name something like `foo-predicate' or `foo-pred' or even `foo-function' (the last one following the current convention). From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 19 18:18:41 2017 Received: (at 26564) by debbugs.gnu.org; 19 Apr 2017 22:18:41 +0000 Received: from localhost ([127.0.0.1]:57570 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0xvt-0008Uw-5o for submit@debbugs.gnu.org; Wed, 19 Apr 2017 18:18:41 -0400 Received: from mout.web.de ([212.227.17.12]:52629) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0xvq-0008Uj-Q7 for 26564@debbugs.gnu.org; Wed, 19 Apr 2017 18:18:39 -0400 Received: from drachen.dragon ([94.216.184.104]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M7sw0-1c5a543Td2-00vN2y; Thu, 20 Apr 2017 00:18:27 +0200 From: Michael Heerdegen To: Drew Adams Subject: Re: bug#26564: Document that only functions and not variables can end with "-p" References: <831ssocrcw.fsf@gnu.org> <87d1c8dq5f.fsf@drachen> Date: Thu, 20 Apr 2017 00:18:32 +0200 In-Reply-To: (Drew Adams's message of "Wed, 19 Apr 2017 15:04:59 -0700 (PDT)") Message-ID: <878tmwdosn.fsf@drachen> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:s6wPm7qMpQp5Pu5aOm3vYQG/KMYgjwbiSUFGkFWtUgru+yrNtFj rgUidr59lljg6sbxqPafpqDihXXS+DFHTXjD/8O5IHK9BKs/GzWLqwivgdfh2Sob0bIIzA1 in8nM/WwUHtUKPnpTysS6sOhNxRaRN0SE5HO6Scoxb7j5BJooG/EfutDBetPLZQ2lM2uKzz T72yCq2WDTo8chCzZU8HA== X-UI-Out-Filterresults: notjunk:1;V01:K0:7eQk4sEjvIM=:W4iUBwn9hRRoCap3ft07j7 N6Z1MH5HuiLRZhntiKrFoZtMDV0p4aJDNz3wRV2vOfgcNEYarQC1ltA6kKjot0QWWXnl2Ujvv MdMUtx1dNBBCcKv1UC9r9uT2+80uIrAoxOnQqwfh2rWnvuUhocbdWFHBUmxqAr5dGoHQ2cfk/ PS8+VIMxXswwNyBoxQL3eoLe72ZVTtW8eC0jM8jcgn0PU7+GTDI6PNjFf7D+6CUobU5rqUkuR 64oZhBHW+oTSWnlqd3Fa/g2knlZ5n32w5a9t/y7Uxcd9k5wgQjcOPNM11aQvA9VQ9nRrnqzMk fuj2DXyxUosJHdRFxi9E80mAyAc1I2KSDGIRVpaVkS9pxTfjUWbooA4TnLB6SfoLODC/ozk4m G6Lmb2u2q3vRTiRSmIdNlvnr3JXPEJAapGn/Ah8HhArihNKGLQ9EvfEVz18zS3cB2/gSviwan xuayVEiweEuWbtrU+a/JiTlhxe67vBhwSQVoeqG7LvKDssz+N1VgSVjJMS93tzLPR21meWFkn jt2cafqKYWYojS7aqu/kNjWKUWZaCeozHVuBfk8bLmghCKYOBJrN0lc8oPSXUkhxGu1xPouRR cuihKbynvBSUoQ2C7hyt4svNZEcpAn966+FsQqsp/SDStzxBuZmXScFJ+20Adn3uQ/MfRSLTF +WvCoXiC7H9rAJF0VNMOJ4qMVH8rwh6Cy9HtuJrD9aSYQMsoK3symQc86toirK12Ma3k7pzk9 tfv+iUtvrxU/MU73pjIbu17Jjz9NBnCChgzKjaI2pnHHxzyhZKRcg2mVo3Ji6Mz++JA4IrfgX ouLwdyp X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 26564 Cc: 26564@debbugs.gnu.org, Kaushal Modi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) Drew Adams writes: > A variable whose value is a _predicate_ I'd name something like > `foo-predicate' or `foo-pred' or even `foo-function' (the last one > following the current convention). For "exported" defvar'd variables I agree. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 19 18:23:36 2017 Received: (at 26564) by debbugs.gnu.org; 19 Apr 2017 22:23:37 +0000 Received: from localhost ([127.0.0.1]:57579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0y0e-0000Bt-O0 for submit@debbugs.gnu.org; Wed, 19 Apr 2017 18:23:36 -0400 Received: from mout.web.de ([217.72.192.78]:58745) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0y0d-0000Bg-7R for 26564@debbugs.gnu.org; Wed, 19 Apr 2017 18:23:35 -0400 Received: from drachen.dragon ([94.216.184.104]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MJl1M-1czs4m02fE-001DkK; Thu, 20 Apr 2017 00:23:24 +0200 From: Michael Heerdegen To: Drew Adams Subject: Re: bug#26564: Document that only functions and not variables can end with "-p" References: <87h91kdqdv.fsf@drachen> <716db14c-b67b-4477-b4c2-75478df0c313@default> Date: Thu, 20 Apr 2017 00:23:30 +0200 In-Reply-To: <716db14c-b67b-4477-b4c2-75478df0c313@default> (Drew Adams's message of "Wed, 19 Apr 2017 15:01:04 -0700 (PDT)") Message-ID: <874lxkdokd.fsf@drachen> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:qVSZ7tlPJAajL5Vw/onyMNK++K5Cb9xFgXQruQE4ghJyr9/zwzd WsTDq5Bq+i3Go5TvI9mUyTAiP+tXN0trr+P7VfmYd/T6GaGDWJfWWaNvwUvhXPzNP1bXdpC FFkOeN4igjCyFie3Tf13srltmUha2PJ29X57G0n6gLZNcWQ/vpTc4oDxN5ZnxwbnmPXjk93 NBtrtq8KHcATwFI/KyP3w== X-UI-Out-Filterresults: notjunk:1;V01:K0:UN1FuS51AUE=:zSRUTk4dBeqAaIlm1XxlQl tlScPw1YG8F2da2TBVCnC/UbXr3BVCL2m14PlU2oS7gUvGzOgRsLKuUysGYqxaGbS7DoXfdiq NbLtRoxYrxhfmzmYm3L+YEZTC+OZJq2ZSmVp1LWN5YZ8nroVVy36CTCN24eSH2ScWkEOqgsHu BQQQ+wHWdZYgWTU/FzlV4YU6hBDnJAti38/ip+QrDE2+dtE4StdX45XPS79BMVdGUUOr5TnhM BnBuYwsF4TvJg1OkV+8wbWlKZtTA699u0JC/JxJ0E3Rq+4zhYavcZRLlXvVC1nNzPQxVxqdER 60CWEGPjmCTo7BjcxnG4FogkCGL8Zabe1AkvQVz/pda0QY6Uh4qiAu3aBnJ+yl3L1RkQbppc1 X235m3et9BGNeUFG9hzuPTRk2hW46MXjvRmWu8hMZdXJz9sI2iWBjAsBXyvSQd7tV+GXlCWA0 h5SZud8yPoMH82g9jnsGaY5mWigU0vBYmUkMP9AF3qLGzUeLRYY1Csv8M4Cjg0e7l4qVatS5v IzDCTriWTg0bbHbPPAPh4fSHJyvHxx3tqD3+F95s3XlNA4RBu9amPYrj0WDRxNmbUNUZkucZw iX7Vus7FYwR+t+F0zkfMDwUGNXTYfEV60srWYXY218ekflyper4BsqtVrJGgZwXJL6pXcR9H8 bla8dwNKA4lqFaWKxp5M8ZZT0+8jV2TqIJV1uBbGPAP/z5nS41Ods+mokUMxAYHuq8NmSHEMA OmpVcUKVkIbX/qnWufLGo+lYyjL1VsQ2jQ05CzeIgza1FtQcMOfaJA1E9va7c4cvEeeNiU6D8 5SqVtCh X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 26564 Cc: 26564@debbugs.gnu.org, Kaushal Modi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.5 (---) Drew Adams writes: > I suggest we stay away from helper verbs (or even any words). > Verbs, in particular, can be different for singular and plural > (e.g. `fancy-candidates-p'). It's a matter of taste. I like when symbols have names that speak to me, even when there is no clear rule of how to name them. The most important thing is that you see how the binding is intended to be used. Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 19 18:29:01 2017 Received: (at 26564) by debbugs.gnu.org; 19 Apr 2017 22:29:01 +0000 Received: from localhost ([127.0.0.1]:57588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0y5t-0000Jk-Gw for submit@debbugs.gnu.org; Wed, 19 Apr 2017 18:29:01 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:35652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0y5s-0000JU-A7 for 26564@debbugs.gnu.org; Wed, 19 Apr 2017 18:29:00 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v3JMSrws016034 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 19 Apr 2017 22:28:54 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v3JMSrOP013108 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 19 Apr 2017 22:28:53 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v3JMSqQJ027508; Wed, 19 Apr 2017 22:28:52 GMT MIME-Version: 1.0 Message-ID: <48bc4857-9d10-4768-ba71-5bb21f30fc78@default> Date: Wed, 19 Apr 2017 15:28:51 -0700 (PDT) From: Drew Adams To: Michael Heerdegen Subject: RE: bug#26564: Document that only functions and not variables can end with "-p" References: <87h91kdqdv.fsf@drachen> <716db14c-b67b-4477-b4c2-75478df0c313@default> <874lxkdokd.fsf@drachen> In-Reply-To: <874lxkdokd.fsf@drachen> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6767.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-Spam-Score: -5.1 (-----) X-Debbugs-Envelope-To: 26564 Cc: 26564@debbugs.gnu.org, Kaushal Modi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.1 (-----) > > I suggest we stay away from helper verbs (or even any words). > > Verbs, in particular, can be different for singular and plural > > (e.g. `fancy-candidates-p'). >=20 > It's a matter of taste. I like when symbols have names that speak to > me, even when there is no clear rule of how to name them. Yes. But here we're talking about coming up with a general naming convention (or not doing so). > The most important thing is that you see how the binding is > intended to be used. Agreed. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 19 21:42:28 2017 Received: (at 26564) by debbugs.gnu.org; 20 Apr 2017 01:42:28 +0000 Received: from localhost ([127.0.0.1]:57713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d1175-0004yQ-V4 for submit@debbugs.gnu.org; Wed, 19 Apr 2017 21:42:28 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:33485) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d1174-0004yC-DX for 26564@debbugs.gnu.org; Wed, 19 Apr 2017 21:42:27 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v3K1gIAS017021 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 20 Apr 2017 01:42:19 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v3K1gHLc031788 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 20 Apr 2017 01:42:18 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v3K1gHMf004020; Thu, 20 Apr 2017 01:42:17 GMT MIME-Version: 1.0 Message-ID: <365f3ab4-457f-4843-a3bb-afe83e323ccd@default> Date: Wed, 19 Apr 2017 18:42:15 -0700 (PDT) From: Drew Adams To: Michael Heerdegen Subject: RE: bug#26564: Document that only functions and not variables can end with "-p" References: <87h91kdqdv.fsf@drachen> <716db14c-b67b-4477-b4c2-75478df0c313@default> <874lxkdokd.fsf@drachen> <48bc4857-9d10-4768-ba71-5bb21f30fc78@default> In-Reply-To: <48bc4857-9d10-4768-ba71-5bb21f30fc78@default> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6767.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26564 Cc: 26564@debbugs.gnu.org, Kaushal Modi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) BTW, another short, simple suffix to indicate a Boolean value or test is `?'. Scheme conventionally uses that for predicates, for example. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 12 16:27:23 2019 Received: (at 26564) by debbugs.gnu.org; 12 Oct 2019 20:27:23 +0000 Received: from localhost ([127.0.0.1]:34286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJNz1-0005ZY-2n for submit@debbugs.gnu.org; Sat, 12 Oct 2019 16:27:23 -0400 Received: from quimby.gnus.org ([80.91.231.51]:39380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJNyz-0005ZO-9c for 26564@debbugs.gnu.org; Sat, 12 Oct 2019 16:27:21 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iJNyv-00082N-Ln; Sat, 12 Oct 2019 22:27:20 +0200 From: Lars Ingebrigtsen To: Kaushal Modi Subject: Re: bug#26564: Document that only functions and not variables can end with "-p" References: <831ssocrcw.fsf@gnu.org> Date: Sat, 12 Oct 2019 22:27:17 +0200 In-Reply-To: (Kaushal Modi's message of "Wed, 19 Apr 2017 16:22:39 +0000") Message-ID: <87d0f1k8uy.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Kaushal Modi writes: > Subject: [PATCH] Document convention to reserve "p" or "-p" suffix for > predicate fns > > * doc/lispref/tips.texi (Coding Conventions): The "p" or "-p" suffix > should be used for only predicate fu [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 26564 Cc: 26564@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Kaushal Modi writes: > Subject: [PATCH] Document convention to reserve "p" or "-p" suffix for > predicate fns > > * doc/lispref/tips.texi (Coding Conventions): The "p" or "-p" suffix > should be used for only predicate functions, and not > variables. (Bug#26564) I've now applied this to Emacs 27. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 12 16:27:28 2019 Received: (at control) by debbugs.gnu.org; 12 Oct 2019 20:27:28 +0000 Received: from localhost ([127.0.0.1]:34289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJNz6-0005Zs-E3 for submit@debbugs.gnu.org; Sat, 12 Oct 2019 16:27:28 -0400 Received: from quimby.gnus.org ([80.91.231.51]:39396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJNz4-0005Zk-L2 for control@debbugs.gnu.org; Sat, 12 Oct 2019 16:27:27 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iJNz1-00082V-Tv for control@debbugs.gnu.org; Sat, 12 Oct 2019 22:27:25 +0200 Date: Sat, 12 Oct 2019 22:27:23 +0200 Message-Id: <87blulk8us.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #26564 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 26564 fixed close 26564 27.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 26564 fixed close 26564 27.1 quit From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 12 16:47:41 2019 Received: (at 26564) by debbugs.gnu.org; 12 Oct 2019 20:47:41 +0000 Received: from localhost ([127.0.0.1]:34307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJOIf-0001jh-1r for submit@debbugs.gnu.org; Sat, 12 Oct 2019 16:47:41 -0400 Received: from mail-lj1-f176.google.com ([209.85.208.176]:39831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJOId-0001jT-0C for 26564@debbugs.gnu.org; Sat, 12 Oct 2019 16:47:39 -0400 Received: by mail-lj1-f176.google.com with SMTP id y3so12998427ljj.6 for <26564@debbugs.gnu.org>; Sat, 12 Oct 2019 13:47:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=m010sDM/wucj3PPjPSEiH4Tls2CHPgB5Mc1ELJ+KeVE=; b=lMoST4vqSQd3t6kkAL85lIFTA2B0ShyOm0BhzDq1SbuAg9+Tf5jiC5oCnZAJbAocBx DrGYeJEwYO/WXTZEzfL7nOfL12UIVqmhhh66+Kf2ouv7HpFG1+nDdPc1q2MGkVo/lia6 llGgnNbe4HhOGoS8QDyMcV3rKS2fYZyqa9v5mrGytXp0DGI2HguRhJ5ATChxvK3juxOL +JDmeeUkIK1T3LgK5mqXqe7KuOXYijoef8fp1vSW0YsiiXtSYEEQNehLyYVUqokEKYjb 87pAaSXSFT1MXsbsz8lNRzjxZLYKi5Zrt6QNsgVJK/z0yhPe8XgAZnzrU8Z4nyHywe9s JUuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=m010sDM/wucj3PPjPSEiH4Tls2CHPgB5Mc1ELJ+KeVE=; b=MZws7c8cSKd8hloq1FOP4y5LdJ/rCQeAUdz2tB1X85sxxnx6D2pKk79Lt3P6vRYIQB 16aI32ZXLTUMIxjNXj/rktaTwec0kewaQ9fi3NYxgqfPiYIi/EY3WukQ9CNRKCEc3vaq SgpsVa9kBj05EutRknBl6uQsRpVCsiwKBmhOuxxpZFROTnLTMvu09tvqRoD2KaDZYfEq gzzYF7IMaH/lri7vb5md0vnJnHT4z/PWGJz2mKX/dVoWxyXXOaun4G79cmNhTiHO0G7G gFDdRNkaXokI/24hvl89sq9k0iDF9xEhx9CwWguURi4zLZ1MtfZSikh9eqlCom0UQgT3 v/uA== X-Gm-Message-State: APjAAAXBA69aFCpnnGftFgX7fyihkCzQO7NK9+ozCRE2MmTJMM5Zc5dj BEI3PAb9WgXCzWPhifplSnuhvy4s1ZMxwkpBFy8= X-Google-Smtp-Source: APXvYqw/EkzYiCcUBZ8YfFYiDUXfuvAIjI8orB7Kc1kzF21SCPRsp1aDlF2vBnhAWkOC7wxw911kNHCVtvcvqdFJmA8= X-Received: by 2002:a2e:501c:: with SMTP id e28mr13204563ljb.201.1570913252758; Sat, 12 Oct 2019 13:47:32 -0700 (PDT) MIME-Version: 1.0 References: <831ssocrcw.fsf@gnu.org> <87d0f1k8uy.fsf@gnus.org> In-Reply-To: <87d0f1k8uy.fsf@gnus.org> From: Kaushal Modi Date: Sat, 12 Oct 2019 16:47:20 -0400 Message-ID: Subject: Re: bug#26564: Document that only functions and not variables can end with "-p" To: Lars Ingebrigtsen Content-Type: multipart/alternative; boundary="0000000000006759e10594bcbef6" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 26564 Cc: 26564@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000006759e10594bcbef6 Content-Type: text/plain; charset="UTF-8" On Sat, Oct 12, 2019, 4:27 PM Lars Ingebrigtsen wrote: > Kaushal Modi writes: > > > Subject: [PATCH] Document convention to reserve "p" or "-p" suffix for > > predicate fns > > > > * doc/lispref/tips.texi (Coding Conventions): The "p" or "-p" suffix > > should be used for only predicate functions, and not > > variables. (Bug#26564) > > I've now applied this to Emacs 27. > Thank you! > --0000000000006759e10594bcbef6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Kaushal Modi <kaushal.modi@gmail.com> writes= :

> Subject: [PATCH] Document convention to reserve "p" or "= ;-p" suffix for
>=C2=A0 predicate fns
>
> * doc/lispref/tips.texi (Coding Conventions): The "p" or &qu= ot;-p" suffix
>=C2=A0 =C2=A0should be used for only predicate functions, and not
>=C2=A0 =C2=A0variables.=C2=A0 (Bug#26564)

I've now applied this to Emacs 27.

Thank you!
--0000000000006759e10594bcbef6-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 12 19:18:54 2019 Received: (at 26564) by debbugs.gnu.org; 12 Oct 2019 23:18:54 +0000 Received: from localhost ([127.0.0.1]:34478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJQf0-0007Zb-AN for submit@debbugs.gnu.org; Sat, 12 Oct 2019 19:18:54 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:55314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJQey-0007ZO-KL for 26564@debbugs.gnu.org; Sat, 12 Oct 2019 19:18:53 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x9CNE0FR159186; Sat, 12 Oct 2019 23:18:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=K+MW5cXTEkOOLXnSTZdsPeaK+gEK9yVrrehR+gYb0wo=; b=e6M242hDyyyq8nH6ozxqAQSmUJSe5dqBnouSSH2NWDed53r9VZYAGZ/Yg9Ah2f2RS0D3 oPi5kUvdmmYFbybaXn/LveNiWXvUizJT8lzn+sQhPuzTdD2kHjvllzaQ2NuBrrig5AzC w84JWiPvUyAaK7wPJXD/DcXIIoL6KE21IuWgpTefv4w4w2crm9oQVB0pOgd/QoyTGrza aemFpLtjoYQtrdlYuitLAyp6BKGRVNI1nfN3OmJRLLen3ZP03sdL/gsIv3rRRLXEmcuE epTBUAl+0IrbRdkJMB7NDMaPO93WP5Gs5sU/9Jy42Rl4ddKMqdxFzDwysl/gTkdrnVtk Vw== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 2vk6sq2cpg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 12 Oct 2019 23:18:46 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x9CNHtnn170039; Sat, 12 Oct 2019 23:18:45 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3030.oracle.com with ESMTP id 2vkr9t86kj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 12 Oct 2019 23:18:45 +0000 Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x9CNIfnR004510; Sat, 12 Oct 2019 23:18:41 GMT MIME-Version: 1.0 Message-ID: <20e6d9e7-fa6e-4a6f-8aea-7fb5cd4f91e3@default> Date: Sat, 12 Oct 2019 23:18:40 +0000 (UTC) From: Drew Adams To: Lars Ingebrigtsen , Kaushal Modi Subject: RE: bug#26564: Document that only functions and not variables can end with "-p" References: <831ssocrcw.fsf@gnu.org> <87d0f1k8uy.fsf@gnus.org> In-Reply-To: <87d0f1k8uy.fsf@gnus.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4900.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9408 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910120214 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9408 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910120214 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26564 Cc: 26564@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > +This predicate > +suffix should not be used in variable names (i.e., you might name a > +variable @code{foo-feature} instead of @code{foo-feature-p}). FWIW, I disagree with this new "convention". 1. There's no need for it. What does it protect? 2. And using suffix `-p' can make clear the meaning and use of a variable, regardless of whether it's a formal parameter, a defvar, or a let variable. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 13 21:50:46 2019 Received: (at 26564) by debbugs.gnu.org; 14 Oct 2019 01:50:46 +0000 Received: from localhost ([127.0.0.1]:37390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJpVW-0002qq-AZ for submit@debbugs.gnu.org; Sun, 13 Oct 2019 21:50:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJpVS-0002qb-GW for 26564@debbugs.gnu.org; Sun, 13 Oct 2019 21:50:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iJpVN-0005BF-3v; Sun, 13 Oct 2019 21:50:37 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1iJpVK-0004Uh-Rd; Sun, 13 Oct 2019 21:50:35 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Drew Adams In-Reply-To: <20e6d9e7-fa6e-4a6f-8aea-7fb5cd4f91e3@default> (message from Drew Adams on Sat, 12 Oct 2019 23:18:40 +0000 (UTC)) Subject: Re: bug#26564: Document that only functions and not variables can end with "-p" References: <831ssocrcw.fsf@gnu.org> <87d0f1k8uy.fsf@gnus.org> <20e6d9e7-fa6e-4a6f-8aea-7fb5cd4f91e3@default> Message-Id: Date: Sun, 13 Oct 2019 21:50:34 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26564 Cc: 26564@debbugs.gnu.org, larsi@gnus.org, kaushal.modi@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] -p is used in function names. For a variable, it is better to end in -flag. -- Dr Richard Stallman Founder, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 13 22:22:54 2019 Received: (at 26564) by debbugs.gnu.org; 14 Oct 2019 02:22:54 +0000 Received: from localhost ([127.0.0.1]:37398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJq0b-0003bF-Vv for submit@debbugs.gnu.org; Sun, 13 Oct 2019 22:22:54 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:41886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJq0Z-0003ax-Ib for 26564@debbugs.gnu.org; Sun, 13 Oct 2019 22:22:52 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x9E2JQel194317; Mon, 14 Oct 2019 02:22:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=M4tC9yBYCnMxEilzTwI9E9KIbHKrZRGVx99SqzDHopg=; b=mvTuB4NxuukqEyQaJnJZuG9ZMYY02+mJEYPdfP4K/GXwNFdFsrorWFVdIpp9K5NIeiud /kd/OKHro5nO9LYYysRBrZbgpZXlmsS7irgV98JV4ZC8Fl5GTMI4Pv2RV5TK2JhdjWoq mPiSNKS0KVimilDTEv5CfPBh5/ueBZFt+17EkHMvQGBgx17mOGRV2c0dpbndpIVSA75L 19zJaPcATqsYPhATqOIUC3kSBRlkz7SxsTa/4iIp/lSXIwfjbMo2GeY3vHqJj8/plNaL PtR0AwFjyOVGo02Q2bSJNDGglR+4VFRvPTumrNVM7I7k/P5gr1WMi49NYPPpe32uM9JN 2Q== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 2vk6sq5m4e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 14 Oct 2019 02:22:45 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x9E2I9af073869; Mon, 14 Oct 2019 02:22:45 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3020.oracle.com with ESMTP id 2vkrbhuu4y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 14 Oct 2019 02:22:45 +0000 Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x9E2Mh9a015115; Mon, 14 Oct 2019 02:22:43 GMT MIME-Version: 1.0 Message-ID: <73e7bcd4-768a-4ac6-8a41-6fa1acf55c76@default> Date: Mon, 14 Oct 2019 02:22:42 +0000 (UTC) From: Drew Adams To: rms@gnu.org Subject: RE: bug#26564: Document that only functions and not variables can end with "-p" References: <831ssocrcw.fsf@gnu.org> <87d0f1k8uy.fsf@gnus.org> <20e6d9e7-fa6e-4a6f-8aea-7fb5cd4f91e3@default> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4900.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9409 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=967 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910140021 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9409 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910140021 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26564 Cc: 26564@debbugs.gnu.org, larsi@gnus.org, kaushal.modi@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > -p is used in function names. > For a variable, it is better to end in -flag. `-flag' has been used only, AFAIK, for user options. --- What I use, FWIW: * `-flag' for user options. (I'm about the only one who does this anymore, it seems.) * `-p' for non-option variables whose values are used just as Booleans (`nil', non-`nil'). * No suffix for non-option variables whose values are used other than just as Booleans (`nil', non-`nil'). From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 14 03:21:30 2019 Received: (at 26564) by debbugs.gnu.org; 14 Oct 2019 07:21:30 +0000 Received: from localhost ([127.0.0.1]:37827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJufa-0004Xe-9u for submit@debbugs.gnu.org; Mon, 14 Oct 2019 03:21:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36000) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJufY-0004XR-FY for 26564@debbugs.gnu.org; Mon, 14 Oct 2019 03:21:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47807) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iJufT-00064Z-2b; Mon, 14 Oct 2019 03:21:23 -0400 Received: from [176.228.60.248] (port=3133 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iJufM-0000el-10; Mon, 14 Oct 2019 03:21:16 -0400 Date: Mon, 14 Oct 2019 10:21:11 +0300 Message-Id: <83h84bkd20.fsf@gnu.org> From: Eli Zaretskii To: rms@gnu.org In-reply-to: (message from Richard Stallman on Sun, 13 Oct 2019 21:50:34 -0400) Subject: Re: bug#26564: Document that only functions and not variables can end with "-p" References: <831ssocrcw.fsf@gnu.org> <87d0f1k8uy.fsf@gnus.org> <20e6d9e7-fa6e-4a6f-8aea-7fb5cd4f91e3@default> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26564 Cc: 26564@debbugs.gnu.org, larsi@gnus.org, drew.adams@oracle.com, kaushal.modi@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Richard Stallman > Date: Sun, 13 Oct 2019 21:50:34 -0400 > Cc: 26564@debbugs.gnu.org, larsi@gnus.org, kaushal.modi@gmail.com > > -p is used in function names. > For a variable, it is better to end in -flag. I provided that example, along with others, in the manual. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 14 03:24:56 2019 Received: (at 26564) by debbugs.gnu.org; 14 Oct 2019 07:24:56 +0000 Received: from localhost ([127.0.0.1]:37831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJuit-0004dB-Ro for submit@debbugs.gnu.org; Mon, 14 Oct 2019 03:24:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJuir-0004cy-QM for 26564@debbugs.gnu.org; Mon, 14 Oct 2019 03:24:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47859) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iJuim-0006wg-MJ; Mon, 14 Oct 2019 03:24:48 -0400 Received: from [176.228.60.248] (port=3343 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iJuie-0004Ci-Lf; Mon, 14 Oct 2019 03:24:41 -0400 Date: Mon, 14 Oct 2019 10:24:36 +0300 Message-Id: <83ftjvkcwb.fsf@gnu.org> From: Eli Zaretskii To: Drew Adams In-reply-to: <73e7bcd4-768a-4ac6-8a41-6fa1acf55c76@default> (message from Drew Adams on Mon, 14 Oct 2019 02:22:42 +0000 (UTC)) Subject: Re: bug#26564: Document that only functions and not variables can end with "-p" References: <831ssocrcw.fsf@gnu.org> <87d0f1k8uy.fsf@gnus.org> <20e6d9e7-fa6e-4a6f-8aea-7fb5cd4f91e3@default> <73e7bcd4-768a-4ac6-8a41-6fa1acf55c76@default> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26564 Cc: 26564@debbugs.gnu.org, larsi@gnus.org, rms@gnu.org, kaushal.modi@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Drew Adams > Cc: 26564@debbugs.gnu.org, larsi@gnus.org, kaushal.modi@gmail.com > > > -p is used in function names. > > For a variable, it is better to end in -flag. > > `-flag' has been used only, AFAIK, for user options. User options are variables, and I see no reason not to use it for variables that are not user options. If you want to see the text that is now actually in the manual, please use the cgit interface at savannah. I suggest to do that before arguing further about this. From unknown Tue Jun 17 20:20:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 11 Nov 2019 12:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator