all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Perry Smith'" <pedzsan@gmail.com>, <gebser@mousecar.com>
Cc: 'GNU Emacs List' <help-gnu-emacs@gnu.org>
Subject: RE: canonical name  ending "-p"
Date: Fri, 18 Mar 2011 11:31:37 -0700	[thread overview]
Message-ID: <84CBE66E993C47F5971F92D7E71B47E0@us.oracle.com> (raw)
In-Reply-To: <E7907DCE-F47F-478C-8106-8E7A8929A2EC@gmail.com>

> > Lots of things in elisp end in "-p"... is there some 
> > particular meaning in this?
> 
> I was told it means "predicate" long ago by the guy who 
> introduced me to lisp and emacs.

Yes.  It is an old Lisp idiom, not just Emacs Lisp.

> In Ruby, they use a '?' so they have 'blank?'
> -- but '?' isn't a legal character in a 
> symbol so they append "p" for predicate.

This part is incorrect.  `?' is perfectly legal in a Lisp symbol.
Put your cursor on a `?' char in Emacs Lisp mode and do `C-u C-x ='.  You will
see this: "syntax: _    which means: symbol".  Then try it:

(defun foo? () (forward-char 1))

[Unfortunately, vanilla Emacs completion treats `?' specially, so you'll need to
quote it using `C-q ?' if you want to use `C-h f' to get help on `foo?': `C-h
foo C-q ?']

> I'm curious if I have this right or not...

Yes, except for `?'.




  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 [this message]
2011-03-18 18:20 ` Tom Rauchenwald
2011-03-18 18:31   ` Drew Adams
     [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=84CBE66E993C47F5971F92D7E71B47E0@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=gebser@mousecar.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=pedzsan@gmail.com \
    /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.