all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 26564@debbugs.gnu.org
Subject: bug#26564: Document that only functions and not variables can end with "-p"
Date: Wed, 19 Apr 2017 16:22:39 +0000	[thread overview]
Message-ID: <CAFyQvY3KMin5sLs_7=zG=yyzc16Nw8viRwKC84M8x=8T_hvqGQ@mail.gmail.com> (raw)
In-Reply-To: <831ssocrcw.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1417 bytes --]

On Wed, Apr 19, 2017 at 12:08 PM Eli Zaretskii <eliz@gnu.org> 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 <kaushal.modi@gmail.com>
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

[-- Attachment #2: Type: text/html, Size: 2239 bytes --]

  reply	other threads:[~2017-04-19 16:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 15:47 bug#26564: Document that only functions and not variables can end with "-p" Kaushal Modi
2017-04-19 16:08 ` Eli Zaretskii
2017-04-19 16:22   ` Kaushal Modi [this message]
2017-04-19 21:49     ` Michael Heerdegen
2017-04-19 22:04       ` Drew Adams
2017-04-19 22:18         ` Michael Heerdegen
2019-10-12 20:27     ` Lars Ingebrigtsen
2019-10-12 20:47       ` Kaushal Modi
2019-10-12 23:18       ` Drew Adams
2019-10-14  1:50         ` Richard Stallman
2019-10-14  2:22           ` Drew Adams
2019-10-14  7:24             ` Eli Zaretskii
2019-10-14  7:21           ` Eli Zaretskii
2017-04-19 17:26 ` Drew Adams
2017-04-19 21:44   ` Michael Heerdegen
2017-04-19 22:01     ` Drew Adams
2017-04-19 22:23       ` Michael Heerdegen
2017-04-19 22:28         ` Drew Adams
2017-04-20  1:42           ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFyQvY3KMin5sLs_7=zG=yyzc16Nw8viRwKC84M8x=8T_hvqGQ@mail.gmail.com' \
    --to=kaushal.modi@gmail.com \
    --cc=26564@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.