unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Roland Winkler <winkler@gnu.org>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: coding standard for allowed arguments of predicates
Date: Fri, 18 Dec 2020 16:00:14 +0100	[thread overview]
Message-ID: <CAArVCkTYun4nwkRsyqNXU_cJPL8nnLbB9oTmBzhMtJrkWRmUHg@mail.gmail.com> (raw)
In-Reply-To: <49517.59733.699042.24540@gargle.gargle.HOWL>

Am Fr., 18. Dez. 2020 um 15:49 Uhr schrieb Roland Winkler <winkler@gnu.org>:
>
> Is there a coding standard for allowed arguments of predicates?
> I have always assumed that predicates should accept any type of
> argument;  but I cannot find this documented anywhere.
>
> The context of my question is `iso8601-valid-p'.  It assumes that
> its argument must be a string.  Is this a bug?  In my usage example,
> the argument of `iso8601-valid-p' could also be nil.
>
> If, indeed, predicates should always accept any type of argument,
> I suggest to document this in the elisp manual.
>

There are lots of predicates that accept only certain types, e.g.
(file-readable-p 123) also signals an error. Typically only the
predicates that check for types (stringp, integerp, listp, etc.)
accept any type.



  reply	other threads:[~2020-12-18 15:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 14:49 coding standard for allowed arguments of predicates Roland Winkler
2020-12-18 15:00 ` Philipp Stephani [this message]
2020-12-18 21:59   ` Roland Winkler

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=CAArVCkTYun4nwkRsyqNXU_cJPL8nnLbB9oTmBzhMtJrkWRmUHg@mail.gmail.com \
    --to=p.stephani2@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=winkler@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 public inbox

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

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).