unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Pierpaolo Bernardi <olopierpa@gmail.com>,
	Emanuel Berg <moasenwood@zoho.eu>,
	"help-gnu-emacs@gnu org" <help-gnu-emacs@gnu.org>
Subject: RE: [External] : Re: The function naming convention used by Emacs.
Date: Sun, 26 Sep 2021 17:26:13 +0000	[thread overview]
Message-ID: <SJ0PR10MB5488DB9F30250E0C8D3FFF24F3A69@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <f2q3ei4xqfh9icqmiije01j2.1632663120283@email.android.com>

> >there is also the "f" suffix for "function", e.g. `cl-incf'
> >and `cl-decf' ...
> 
> The "f" in these cases stands for "field".

A suffix of `f' can stand for different things.
I think generally it stands loosely for "function".
The general idea is that some sort of function is
used to determine a generalized "place" that gets
updated in some way.

The most obvious and general case is `setf' whose
doc says that the first arg is a "function call
form" or it otherwise generally refers to a function.

And functions that are related to, or based on,
`setf' tend to use the `f' suffix.

Common Lisp uses lots of such "functions" (including
macros etc.) that are named with suffix `f'.

https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node80.html

There are also obvious exceptions where the `f'
isn't really a suffix.  E.g. `...aref', `...if',
`...of', `ldiff', `result-of', `svref'.

And less obvious exceptions, which are related
to `setf': `getf', `remf', `incf', `decf',
`rotatef', `shiftf'.

  parent reply	other threads:[~2021-09-26 17:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-26 13:32 The function naming convention used by Emacs Pierpaolo Bernardi
2021-09-26 13:35 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-26 17:26 ` Drew Adams [this message]
2021-09-27  1:54   ` [External] : " Emanuel Berg via Users list for the GNU Emacs text editor

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=SJ0PR10MB5488DB9F30250E0C8D3FFF24F3A69@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=moasenwood@zoho.eu \
    --cc=olopierpa@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).