From: googleartist@yahoo.com (Artist)
Subject: Re: Built-in Functions and Special Forms
Date: 28 Feb 2003 10:51:07 -0800 [thread overview]
Message-ID: <de3ad953.0302281051.186e6612@posting.google.com> (raw)
In-Reply-To: mailman.2511.1046318512.21513.help-gnu-emacs@gnu.org
Greg Hill <ghill@synergymicro.com> wrote in message news:<mailman.2511.1046318512.21513.help-gnu-emacs@gnu.org>...
> >At 2:38 AM +0100 2/27/03, Pascal Bourguignon wrote:
> >>I've not found any predicate to distinguish between built-in functions
> >>and special forms.
> >
> >In Emacs-21, the documentation is consistent enough that this seems
> >to always work.
> >
> >(defun special-form-p (symbol)
> > (string-match "\\.\\.\\.\\|&rest" (documentation symbol)))
>
> Of course that should really be:
>
> (defun special-form-p (symbol)
> (and (subrp (symbol-function symbol))
> (string-match "\\.\\.\\.\\|&rest" (documentation symbol))))
>
> --Greg
> --
Code below works fine.
(defun my-special-forms ()
(let
((internals () ))
(mapatoms (lambda (sym)
(when
(and
(functionp sym)
(subrp (symbol-function sym))
(eq 'unevalled (cdr (subr-arity (symbol-function sym))))
)
(push sym internals)
)
)
)
internals
; (insert (format "%S\n" internals))
)
)
next parent reply other threads:[~2003-02-28 18:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.2511.1046318512.21513.help-gnu-emacs@gnu.org>
2003-02-28 18:51 ` Artist [this message]
2003-02-27 4:02 Built-in Functions and Special Forms Greg Hill
-- strict thread matches above, loose matches on Subject: below --
2003-02-26 20:50 Artist
2003-02-26 21:08 ` Barry Margolin
2003-02-27 0:02 ` Unknown
2003-02-27 1:38 ` Pascal Bourguignon
2003-02-27 3:42 ` Greg Hill
2003-02-27 7:31 ` Miles Bader
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=de3ad953.0302281051.186e6612@posting.google.com \
--to=googleartist@yahoo.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.