all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Tom Rauchenwald'"
	<sehnsucht.nach.unendlichkeit@quantentunnel.de>,
	<help-gnu-emacs@gnu.org>
Subject: RE: canonical name  ending "-p"
Date: Fri, 18 Mar 2011 11:31:44 -0700	[thread overview]
Message-ID: <4C9FBB09BB6746F1B6B849FF8FBBEC49@us.oracle.com> (raw)
In-Reply-To: <877hbw9tp4.fsf@sec.modprobe.de>

> It means predicate. Functions ending in -p return either t
> or nil, and variables ending in -p contain either t or nil.

Actually, either non-nil (true) or nil (false).

"Boolean" in Lisp can mean this or it can mean strictly `t' or `nil'.
Generally, any non-nil value is taken to mean true, but for `defcustom' the
:type `boolean' limits the value to t or nil.

Also, most people do _not_ use `-p' when naming a boolean variable.  I use it
that way quite often, but some Emacs developers frown on this use.

For user options, some people (including me) use the suffix `-flag' for a
boolean option.  I tend to use `-p' for internal variables (non-options).




  reply	other threads:[~2011-03-18 18:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-18 17:39 canonical name ending "-p" ken
2011-03-18 18:11 ` Allan Gottlieb
2011-03-18 18:18 ` Perry Smith
2011-03-18 18:31   ` Drew Adams
2011-03-18 18:20 ` Tom Rauchenwald
2011-03-18 18:31   ` Drew Adams [this message]
     [not found] ` <mailman.12.1300472466.7441.help-gnu-emacs@gnu.org>
2011-03-19  1:52   ` Stefan Monnier
     [not found] <mailman.8.1300470004.7441.help-gnu-emacs@gnu.org>
2011-03-18 17:56 ` Pascal J. Bourguignon
2011-03-18 20:36 ` Evans Winner
2011-03-19  4:32   ` rusi

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=4C9FBB09BB6746F1B6B849FF8FBBEC49@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=sehnsucht.nach.unendlichkeit@quantentunnel.de \
    /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.