unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: The function naming convention used by Emacs.
Date: Sun, 26 Sep 2021 13:48:43 +0200	[thread overview]
Message-ID: <87sfxrtv50.fsf@zoho.eu> (raw)
In-Reply-To: CAGP6POJ3FyyVWmu3wZ7V84dODaSiBrafHvnSLE1f-Nt-ZRMqfw@mail.gmail.com

Hongyi Zhao wrote:

> As far as function names are concerned, are there some
> established conventions used by Emacs? For example,
> I noticed that there are so many functions in Emacs named by
> the suffix `-p', say, `file-exists-p', `ht-equal-p', and so
> on. But I still can't figure out the meaning of this suffix.
> Any tips will be appreciated.

It stands for "predicate", such a function returns t or nil.

there is also the "f" suffix for "function", e.g. `cl-incf'
and `cl-decf' ... and a couple of other conventions I can't
remember right now.

Speaking of CL, the convention for *global-variables* is not
encouraged in Elisp.

Other than that do this

(require 'checkdoc)

(setq checkdoc-permit-comma-termination-flag t)

(defun check-package-style ()
  (interactive)
  (let ((msg "Style check..."))
    (message msg)
    (checkdoc-current-buffer t) ; TAKE-NOTES
    (message "%sdone" msg) ))
(defalias 'check-style #'check-package-style)

and do byte-compile for more pointers ...

-- 
underground experts united
https://dataswamp.org/~incal




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

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-26 11:05 The function naming convention used by Emacs Hongyi Zhao
2021-09-26 11:27 ` 2QdxY4RzWzUUiLuE
2021-09-26 11:49   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-26 11:50   ` Hongyi Zhao
2021-09-26 11:48 ` Emanuel Berg via Users list for the GNU Emacs text editor [this message]
2021-09-26 12:18   ` Hongyi Zhao
2021-09-26 13:34     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-26 17:04 ` [External] : " Drew Adams
2021-09-27  5:46   ` Hongyi Zhao
2021-09-27 14:53     ` Drew Adams
  -- strict thread matches above, loose matches on Subject: below --
2021-09-26 13:32 Pierpaolo Bernardi
2021-09-26 13:35 ` 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=87sfxrtv50.fsf@zoho.eu \
    --to=help-gnu-emacs@gnu.org \
    --cc=moasenwood@zoho.eu \
    /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).