From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.bugs Subject: bug#26564: Document that only functions and not variables can end with "-p" Date: Wed, 19 Apr 2017 16:22:39 +0000 Message-ID: References: <831ssocrcw.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11401da47c54f1054d876f16 X-Trace: blaine.gmane.org 1492619047 10600 195.159.176.226 (19 Apr 2017 16:24:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 19 Apr 2017 16:24:07 +0000 (UTC) Cc: 26564@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 19 18:24:01 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0sOd-0002cW-R4 for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Apr 2017 18:24:00 +0200 Original-Received: from localhost ([::1]:49322 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0sOj-0000lE-Ol for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Apr 2017 12:24:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0sNn-0000J2-5G for bug-gnu-emacs@gnu.org; Wed, 19 Apr 2017 12:23:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0sNj-0005bF-0A for bug-gnu-emacs@gnu.org; Wed, 19 Apr 2017 12:23:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59000) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d0sNi-0005bB-Sj for bug-gnu-emacs@gnu.org; Wed, 19 Apr 2017 12:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d0sNi-0004hF-OS for bug-gnu-emacs@gnu.org; Wed, 19 Apr 2017 12:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kaushal Modi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Apr 2017 16:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26564 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26564-submit@debbugs.gnu.org id=B26564.149261897718021 (code B ref 26564); Wed, 19 Apr 2017 16:23:02 +0000 Original-Received: (at 26564) by debbugs.gnu.org; 19 Apr 2017 16:22:57 +0000 Original-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 Original-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 Original-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) In-Reply-To: <831ssocrcw.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:131763 Archived-At: --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--